/// <summary> /// 通过开始点和结束点创建半圆弧片段 /// </summary> /// <param name="fromPoint">开始点</param> /// <param name="toPoint">结束点</param> /// <returns>半圆弧片段</returns> public static ISegment CreateHalfCircularArcByTwoPoints(IPoint fromPoint, IPoint toPoint) { ILine line = CreateLineByTwoPoints(fromPoint, toPoint); ILine normal = new Line(); line.QueryNormal(esriSegmentExtension.esriNoExtension, 0.5, true, (double)(line.Length / 2.0), normal); IConstructCircularArc Constructor = new CircularArc() as IConstructCircularArc; Constructor.ConstructThreePoints(fromPoint, normal.ToPoint, toPoint, true); return((ISegment)Constructor); }
private ICircularArc method_1(IPoint ipoint_1, IPoint ipoint_2, IPoint ipoint_3) { ICircularArc circularArc; try { IConstructCircularArc circularArcClass = new CircularArc() as IConstructCircularArc; circularArcClass.ConstructThreePoints(ipoint_1, ipoint_3, ipoint_2, false); circularArc = circularArcClass as ICircularArc; } catch (Exception exception) { exception.ToString(); ICircularArc circularArcClass1 = new CircularArc() { FromPoint = ipoint_1, ToPoint = ipoint_2 }; circularArc = circularArcClass1; } return(circularArc); }