lincoln_ma 发表于 2010-6-7 07:38:00

[求助]Polyline.AddVertexAt()中Entity Coordinate System of the polyline是怎么确

[求助]Polyline.AddVertexAt()中Entity Coordinate System of the polyline是怎么确定的?<p>我在增加polyline对象的角点的时候,遇到了这个问题。</p>
<p>&nbsp;</p>
<p><strong>public</strong> <strong>void</strong> <strong>AddVertexAt</strong>(<br/>&nbsp;&nbsp;&nbsp; <strong>int</strong> <strong>index</strong>, <br/>&nbsp;&nbsp;&nbsp; Point2d <strong>pt</strong>, <br/>&nbsp;&nbsp;&nbsp; <strong>double</strong> <strong>bulge</strong>, <br/>&nbsp;&nbsp;&nbsp; <strong>double</strong> <strong>startWidth</strong>, <br/>&nbsp;&nbsp;&nbsp; <strong>double</strong> <strong>endWidth</strong><br/>);</p>
<p>&nbsp;</p>
<p class="Element10">pt must be specified in the Entity Coordinate System of the polyline, not in the World Coordinate System (WCS).&nbsp;</p>
<p class="Element10">&nbsp;</p>
<p class="Element10">其中我的polyline对象是在xoz平面上的,其Entity Coordinate System理所当然就是xoz平面,但其Entity Coordinate System的坐标圆点应该怎么确定呢?</p>
<p class="Element10">望指点。</p>

雪山飞狐_lzh 发表于 2010-6-7 10:12:00

<p>ECS,即对象坐标系,三维点使用<font face="Verdana">pl.GetPlane()</font>获取pl所在平面转换为二维点</p>
<p>&nbsp;</p>
<p><font face="Verdana">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Plane plane = pl.GetPlane();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Point3d pnt = new Point3d();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Point2d p2d = pnt.Convert2d(plane);<br/></font></p>
页: [1]
查看完整版本: [求助]Polyline.AddVertexAt()中Entity Coordinate System of the polyline是怎么确