关于沿平面镜像对象 (VBA/ActiveX) 
使用该方法,可以沿由三个点指定的指定镜像平面镜像对象。Mirror3D ![]() 3D镜像本示例在模型空间中创建一个框。然后,它将盒子镜像到一个平面上,并将镜像的盒子涂成红色。 Sub Ch8_MirrorABox3D()
    ' Create the box object
    Dim boxObj As Acad3DSolid
    Dim length As Double
    Dim width As Double
    Dim height As Double
    Dim center(0 To 2) As Double
    center(0) = 5#: center(1) = 5#: center(2) = 0
    length = 5#: width = 7: height = 10#
    ' Create the box (3DSolid) object in model space
    Set boxObj = ThisDrawing.ModelSpace. _
 AddBox(center, length, width, height)
    ' Define the mirroring plane with three points
    Dim mirrorPt1(0 To 2) As Double
    Dim mirrorPt2(0 To 2) As Double
    Dim mirrorPt3(0 To 2) As Double
    mirrorPt1(0) = 1.25: mirrorPt1(1) = 0: mirrorPt1(2) = 0
    mirrorPt2(0) = 1.25: mirrorPt2(1) = 2: mirrorPt2(2) = 0
    mirrorPt3(0) = 1.25: mirrorPt3(1) = 2: mirrorPt3(2) = 2
    ' Mirror the box
    Dim mirrorBoxObj As Acad3DSolid
    Set mirrorBoxObj = boxObj.Mirror3D _
 (mirrorPt1, mirrorPt2, mirrorPt3)
    mirrorBoxObj.Color = acRed
    ZoomAll
End Sub
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 14:37
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.