创建给定四个顶点的 3DFace 对象。 支持的平台:仅窗口 签名工 务 局: RetVal = object.Add3DFace(Point1, Point2, Point3 [, Point4]) 言论要创建三边面,请省略最后一点。使用该方法设置边的可见性。SetInvisibleEdge 必须按顺时针或逆时针方向依次输入点才能创建对象。通过将附加面的前两个点与前一个面的最后两个点完全指定,可以创建多个相邻面。3DFace ![]() 例子工 务 局: Sub Example_Add3DFace()
' This example creates a 3D face in model space.
Dim faceObj As Acad3DFace
Dim point1(0 To 2) As Double
Dim point2(0 To 2) As Double
Dim point3(0 To 2) As Double
Dim point4(0 To 2) As Double
' Define the four coordinates of the face
point1(0) = 0#: point1(1) = 0#: point1(2) = 0#
point2(0) = 5#: point2(1) = 0#: point2(2) = 1#
point3(0) = 5#: point3(1) = 5#: point3(2) = 1#
point4(0) = 1#: point4(1) = 10#: point4(2) = 0#
' Create the 3DFace object in model space
Set faceObj = ThisDrawing.ModelSpace.Add3DFace(point1, point2, point3, point4)
ZoomAll
End Sub
Visual LISP: (vl-load-com)
(defun c:Example_Add3DFace()
;; This example creates a 3D face in model space.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the four coordinates of the face
(setq point1 (vlax-3d-point 0 0 0)
point2 (vlax-3d-point 5 0 1)
point3 (vlax-3d-point 5 10 1)
point4 (vlax-3d-point 0 10 0))
;; Create the 3DFace object in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq faceObj (vla-Add3DFace modelSpace point1 point2 point3 point4))
(vla-ZoomAll acadObj)
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 09:03
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.