请问:用3DMesh绘制后的网格如何平滑为曲面?谢谢!程序如下"
Private Sub CommandButton1_Click() Dim Meshobj As AcadPolygonMesh '定义曲面图元变量 Dim Msize, Nsize, Count As Integer '定义曲面图元节点 Dim Fitpoints As Variant Dim Utilobj As Object
Set Utilobj = ThisDrawing.Utility
'创建点阵 Utilobj.CreateTypedArray Fitpoints, vbDouble, 0, 0, 0, 2, 0, 1, 4, 0, 0, 6, 0, 1, 0, 2, 0, 2, 2, 1, 4, 2, 0, 6, 2, 0, 0, 4, 0, 2, 4, 1, 4, 4, 0, 6, 4, 0, 0, 6, 0, 2, 6, 1, 4, 6, 0, 6, 6, 0
'将离散数据点读入FitPoints 数组中
Msize = 4 Nsize = 4
'在模型空间创建3D网格 Set Meshobj = ThisDrawing.ModelSpace.Add3DMesh(Msize, Nsize, Fitpoints)
'改变视口方向以便观看网格 Dim direction As Variant Utilobj.CreateTypedArray direction, vbDouble, -1, -1, 1 ThisDrawing.ActiveViewport.direction = direction ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport
End Sub
|