Sub Example_AddRevolvedSolid() Dim cc As AcadCircle Dim ptc(0 To 2) As Double Dim rc As Double ptc(0) = 0: ptc(1) = 0: ptc(2) = 0 re = 5 Set cc = ThisDrawing.ModelSpace.AddCircle(ptc, re) ' 创建面域 Dim regionObj As Variant regionObj = ThisDrawing.ModelSpace.AddRegion(cc) ' 定义旋转轴 Dim axisPt(0 To 2) As Double Dim axisDir(0 To 2) As Double Dim angle As Double axisPt(0) = 10: axisPt(1) = -5: axisPt(2) = 0 axisDir(0) = 10: axisDir(1) = 5: axisDir(2) = 0 angle = 6.28 ' 创建实体 Dim solidObj As Acad3DSolid Set solidObj = ThisDrawing.ModelSpace.AddRevolvedSolid(regionObj(0), axisPt, axisDir, angle) ZoomAll End Sub 这又是这么回事?
按照你给的代码修改的 |