Add3DFace 方法 (ActiveX)
创建一个给定四个顶点的 3DFace 对象。 支持的平台:仅限 Windows 签名VBA: RetVal = object.Add3DFace(Point1, Point2, Point3 [, Point4]) 言论要创建三面面,请省略最后一点。使用该方法设置边的可见性。SetInvisibleEdge 必须按顺时针或逆时针方向依次输入点才能创建对象。通过将附加面的前两点与前一个面的最后两点完全相同来创建多个相邻面。3DFace 例子VBA: 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 可视化 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, 2024-12-15 11:43
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.