Engine中可否获取两条线段延长线上的交点?

Engine中可否获取两条线段延长线上的交点?
已邀请:

朱新颖

赞同来自:

【解决办法】:
可以,使用IConstructMultipoint.ConstructIntersection方法。

参考链接:
http://resources.arcgis.com/en ... 00000


IConstructMultipoint constructMultipoint = new MultipointClass(); 
object param0;
object param1;
object isTangentPoint;  
constructMultipoint.ConstructIntersection(segment1, esriSegmentExtension.esriExtendTangents, segment2, esriSegmentExtension.esriExtendTangents, out param0, out param1, out isTangentPoint);
IMultipoint multipoint = constructMultipoint as IMultipoint;
IPointCollection pointCollection = multipoint as IPointCollection;
for (int i = 0; i < pointCollection.PointCount; i++)
{
    System.Windows.Forms.MessageBox.Show(Point : + i + X = + pointCollection.get_Point(i).X + Y = + pointCollection.get_Point(i).Y);
}

要回复问题请先登录注册