ppblog 发表于 2005-10-12 13:34:00

三维绘图.net

<P>Public Function AddBox(ByVal lengthAlongX As Double, ByVal lengthAlongY As Double, ByVal lengthAlongZ As Double, ByVal LayerName As String) As ObjectId<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox("长方体box,存在一个问题,不能设置3d实体的位置")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim mybox As New Solid3d</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '不能设置3d实体的位置<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim intC As New IntegerCollection<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intC.Add(200)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intC.Add(200)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intC.Add(80)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim offset As Vector3d<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; offset = Vector3d.ZAxis<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mybox.MoveGripPointsAt(intC, New Vector3d(200, 200, 0))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '不能设置3d实体的位置<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mybox.Layer = LayerName<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mybox.CreateBox(lengthAlongX, lengthAlongY, lengthAlongZ)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return AddEntity(mybox)<BR>&nbsp;&nbsp;&nbsp; End Function<BR>&nbsp;&nbsp;&nbsp; &lt;CommandMethod("mybox")&gt; Public Sub myBox()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddLayer("PPBlogLayer", PublicClass.PPColor.Green, LineWeight.LineWeight080, "CENTER")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddBox(200, 200, 100, "PPBlogLayer")</P>
<P>&nbsp;&nbsp;&nbsp; End Sub</P>
页: [1]
查看完整版本: 三维绘图.net