zhang12345
路人甲
路人甲
  • 注册日期2005-03-11
  • 发帖数2
  • QQ
  • 铜币116枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1113回复:0

求救 C#开发AO遇到的问题

楼主#
更多 发布于:2006-05-27 17:37
<P>今天用C#写了一个面转线的程序,代码如下:</P>
<P>public IPolyline PolygonToPolyline(IPolygon pPolygon)<BR>  {<BR>   IGeometryCollection pGeoCol;<BR>   IClone pClone;<BR>   ISegmentCollection pSegCol;<BR>   IPolyline pPolyline;<BR>   IGeometryCollection pPLCol;</P>
<P>   pPolyline= new PolylineClass();<BR>   pPLCol= new PolylineClass();<BR>   pClone= (IClone)pPolygon;<BR>   pGeoCol= (IGeometryCollection)pClone.Clone();   <BR>   object oo=Type.Missing;<BR>   for(int i=0;i<pGeoCol.GeometryCount;i++)<BR>   {<BR>    pSegCol= new PathClass();<BR>    pSegCol.AddSegmentCollection((ISegmentCollection)pGeoCol.get_Geometry(i));<BR>    pPLCol.AddGeometry((IGeometry)pSegCol,ref oo,ref oo); <BR>   } <BR>   pPolyline= pPLCol as IPolyline;<BR>   return pPolyline ;<BR>  }</P>
<P>面中有Z值,但是转成线后没有Z值,不知道那里错了,请帮忙,谢谢。</P>
喜欢0 评分0
游客

返回顶部