扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:ZHANGJ 来源:论坛 2007年10月14日
关键字:
Sub CreateSpline() Dim splineObj As AcadSpline Dim noOfPoints As Integer Dim startTan(0 To 2) As Double Dim endTan(0 To 2) As Double Dim fitPoints(0 To 8) As Double noOfPoints = 3 startTan(0) = 0.5: startTan(1) = 0.5: startTan(2) = 0 endTan(0) = 0.5: endTan(1) = 0.5: endTan(2) = 0 fitPoints(0) = 1: fitPoints(1) = 1: fitPoints(2) = 0 fitPoints(3) = 5: fitPoints(4) = 5: fitPoints(5) = 0 fitPoints(6) = 10: fitPoints(7) = 0: fitPoints(8) = 0 Set splineObj =moSpace.AddSpline (fitPoints, startTan, endTan) ZoomAll End Sub |
4.三维谢氏塔的自相似结构:
三棱锥型的创建法:
1)生成三维线(Add3Dpolyline);
2)产生区域(AddRegion)后通过挤压(AddExtrudedSolid)
sub CreatePyramid() Dim polyObj As Acad3Dpolyline Dim points(0 To 11) As Double Point(0)=0: Point(1)=0: Point(2)=0 Point(3)=255: Point(4)=0: Point(5)=0 Point(6)=128: Point(7)=221.7025: Point(8)=0 Point(9)=0: Point(10)=0: Point(11)=0 Set polyObj=moSpace.Add3Dpolyline(poits) Dim regionObj As Variant Set RegionObj=moSpace.AddRegion(polyObj) Dim height As Double Dim taperAngle As Double height=255:taperAngle= Dim solidObj As Acad3Dsoild Set solidObj=moSpace.AddExtrudeSolid(regionObj,height,taperAngle) End sub |
布尔运算法语法为:solidObj1.Boolean acUnion,solidObj2(并运算)
solidObj1.Boolean acIntersection,solidObj2(交运算)
图例如下:
![]() |
![]() |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。