[求助]利用自定义规则在三维空间创建面
<p>版上各位高手,现有一问题想向各位求助,我想在三维空间中利用自定义规则创建一个面,请问如何操作。代码如下:</p><p>wd.Geometry中哪些函数可以利用,谢谢大家了!</p><p>public class DrawOverrule : DrawableOverrule<br/> {<br/> public static DrawOverrule TheOverrule = new DrawOverrule();</p><p> //显示重载<br/> public override bool WorldDraw(Drawable drawable, WorldDraw wd)<br/> {<br/> try<br/> {<br/> if (!(drawable is Line))<br/> {<br/> return base.WorldDraw(drawable, wd);<br/> }<br/> Line wall = (Line)drawable;<br/> ResultBuffer rb = ModelSpace.GetXRecordData(wall, "WallPropertyDic", "WallPropertyXRec");</p><p> Point3d point1 = (Point3d)rb.AsArray().Value;<br/> Point3d point2 = (Point3d)rb.AsArray().Value;<br/> Point3d point3 = (Point3d)rb.AsArray().Value;<br/> Point3d point4 = (Point3d)rb.AsArray().Value;<br/> <br/> //利用以上四个点在三维空间创建一个面<br/> //创建思路:在XY平面创建一个面,然后以point1,point2为轴旋转90度<br/> wd.Geometry.....</p><p> return base.WorldDraw(drawable, wd);<br/> }<br/> catch<br/> {<br/> return false;<br/> }<br/> }<br/> }</p> <p>先创建面实体</p><p>再wd.Geometry.Draw()</p> 谢谢,刚学自定义规则,里面很多东西不是很熟悉。问题已解决:)
页:
[1]