高手们,进来看看啊,你们举手就能解决的问题
<P>各位高手:</P><P> 我想利用三维多段线,通过拉伸一个圆环,在三维空间中生成管道,帮我看看程序哪里有问题,多谢了啊</P>
<P>Sub pipe()<BR> Dim circle1(0) As AcadEntity<BR> Dim circle2(0) As AcadEntity<BR> Dim regionObj1 As Variant<BR> Dim regionObj2 As Variant<BR> Dim point1(0 To 11) As Double<BR> Dim point2(0 To 2) As Double<BR> Dim radius1 As Double<BR> Dim radius2 As Double<BR> Dim line1 As Acad3DPolyline<BR> Dim solidObj As Acad3DSolid<BR> point1(0) = 0<BR> point1(1) = 0<BR> point1(2) = 0<BR> point1(3) = 100<BR> point1(4) = 0<BR> point1(5) = 0<BR> point1(6) = 100<BR> point1(7) = 100<BR> point1(8) = 0<BR> point1(9) = 100<BR> point1(10) = 100<BR> point1(11) = 100<BR> <BR> radius1 = 7<BR> radius2 = 5<BR> <BR> '创建面域<BR> Set circle1(0) = ThisDrawing.ModelSpace.AddCircle(point1, radius1)<BR> Set circle2(0) = ThisDrawing.ModelSpace.AddCircle(point1, radius2)<BR> regionObj1 = ThisDrawing.ModelSpace.AddRegion(circle1)<BR> regionObj2 = ThisDrawing.ModelSpace.AddRegion(circle2)<BR> <BR> '布尔运算<BR> regionObj1(0).Boolean acSubtraction, regionObj2(0)<BR> <BR> '拉伸路径<BR> Set line1 = ThisDrawing.ModelSpace.Acad3DPolyline(point1)<BR> Set solidObj = ThisDrawing.ModelSpace.AddExtrudedSolidAlongPath(regionObj1(0), line1)</P>
<P>End Sub</P>
页:
[1]