[求助]根据网格化数据建立三维模型
zzz8662
zzz8662 Lv.2
2004年04月25日 14:55:49
只看楼主

现在已经有了网格化以后的数据,怎样才能实现三维模型的显示?用VBA实现。请大家指导,谢谢了!

现在已经有了网格化以后的数据,怎样才能实现三维模型的显示?用VBA实现。
请大家指导,谢谢了!
免费打赏
yeats
2004年06月02日 09:34:49
12楼
这是拉伸面为实体的例程,是不规则的体:

Sub Example_AddSolid()
Dim solidObj As Acad3DSolid
Dim points1(0 To 2) As Double, points2(0 To 2) As Double, _
points3(0 To 2) As Double, points4(0 To 5) As Double
Dim polyObj As Acad3DPolyline
Dim lineObj(0 To 2) As AcadLine
Dim regionObj As Variant
points1(0) = 10: points1(1) = 10: points1(2) = 0
points2(0) = 30: points2(1) = 10: points2(2) = 0
points3(0) = 20: points3(1) = 30: points3(2) = 10
points4(0) = 20: points4(1) = 30: points4(2) = 5
points4(3) = 10: points4(4) = 10: points4(5) = 50
Set polyObj = ThisDrawing.ModelSpace.Add3DPoly(points4)
Set lineObj(0) = ThisDrawing.ModelSpace.AddLine(points1, points2)
Set lineObj(1) = ThisDrawing.ModelSpace.AddLine(points2, points3)
Set lineObj(2) = ThisDrawing.ModelSpace.AddLine(points3, points1)
regionObj = ThisDrawing.ModelSpace.AddRegion(lineObj)
Set solidObj = ThisDrawing.ModelSpace.AddExtrudedSolidAlongPath(regionObj(0), polyObj)
ZoomAll
End Sub
回复
wflihui
2004年06月21日 09:39:49
13楼
如果用第三方软件会方便些
回复
yeats
2004年06月27日 17:09:49
14楼
to gzymjtd
你的意思我明白!
……
在2002/2000下拉伸后的实体跟2004 下的有一点区别!
建议大家仔细看看!!
回复

相关推荐

APP内打开