IPolyline mStandLinePolyline = new PolylineClass();
ILine pLine1 = new LineClass();
//创建垂线
//esriSegmentExtension:扩展类型
//i:距起点距离
//pRectangleHeight / 2:线段长度
//pLine1:线的名称
mStandLinePolyline.QueryNormal(esriSegmentExtension.esriExtendAtFrom, i, false, pRectangleHeight / 2, pLine1);
//获取点
IPoint pPoint1 = new PointClass();
IGeometryCollection pPolyline1 = new PolylineClass();
ISegmentCollection pPath1 = new PathClass();
pPath1.AddSegment((ISegment)pLine1, ref missing, ref missing);
pPolyline1.AddGeometry((IGeometry)pPath1, ref missing, ref missing);
IPolyline pHandlePolyline1 = (IPolyline)pPolyline1;
//pRectangleHeight / 2:距离起点的距离
//pPoint1:新建的点
pHandlePolyline1.QueryPoint(esriSegmentExtension.esriExtendAtFrom, pRectangleHeight / 2, false, pPoint1);
C#+AE创建垂线并获取端点
最新推荐文章于 2021-09-11 11:39:51 发布