ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.Geometry Namespace / EllipticArcBuilderEx Class / EllipticArcBuilderEx Constructor / EllipticArcBuilderEx Constructor(Segment,Segment,Double,Coordinate2D,SpatialReference)
The first segment. The segment must be a line segment or a circular arc.
The second segment. The segment must be a line segment or a circular arc.
The radius of the circular arc.
The point that determines which arc is constructed.
(Optional) The spatial reference of the arc. The default value is null.
Example

In This Topic
    EllipticArcBuilderEx Constructor(Segment,Segment,Double,Coordinate2D,SpatialReference)
    In This Topic
    Creates a new instance of the EllipticArcBuilderEx class. The new instance will be a circular arc of the given radius and tangent to two segments. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function New( _
       ByVal segment1 As Segment, _
       ByVal segment2 As Segment, _
       ByVal radius As Double, _
       ByVal hintPoint As Coordinate2D, _
       Optional ByVal spatialReference As SpatialReference _
    )

    Parameters

    segment1
    The first segment. The segment must be a line segment or a circular arc.
    segment2
    The second segment. The segment must be a line segment or a circular arc.
    radius
    The radius of the circular arc.
    hintPoint
    The point that determines which arc is constructed.
    spatialReference
    (Optional) The spatial reference of the arc. The default value is null.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    segment1 or segment2 is not a line segment or a circular arc.
    radius is 0.
    Remarks
    The circular arc is a fillet arc which means it is constructed between the two input segments such that it is tangential to both embedded segments at the circular arc endpoints.

    The hintPoint determines which arc is to be constructed.

    The endpoints of the arc lie on the embedded extensions of the input segments. The start point of the arc always lies on the embedded extension of segment1.

    Use QueryFilletRadiusRange to find the range of radii for a given set of inputs such that the constructed arc has endpoints on both of the non-extended input segments.

    Example
    Construct a Circular Arc - using two segments and radius
    // Construct a segment from (100, 100) to (50, 50) and another segment from (100, 100) to (150, 50).
    // Use a builderEx convenience method or use a builderEx constructor.
    
    LineSegment segment1 = LineBuilderEx.CreateLineSegment(new Coordinate2D(100, 100), new Coordinate2D(50, 50));
    LineSegment segment2 = LineBuilderEx.CreateLineSegment(new Coordinate2D(100, 100), new Coordinate2D(150, 50));
    
    // Construct the hint point to determine where the arc will be constructed.
    Coordinate2D hintPoint = new Coordinate2D(100, 75);
    
    // Call QueryFilletRadius to get the minimum and maximum radii that can be used with these segments.
    var minMaxRadii = EllipticArcBuilderEx.QueryFilletRadiusRange(segment1, segment2, hintPoint);
    
    // Use the maximum radius to create the arc.
    double maxRadius = minMaxRadii.Item2;
    
    // BuilderEx convenience methods don't need to run on the MCT.
    //At 2.x - EllipticArcSegment circularArc = EllipticArcBuilderEx.CreateEllipticArcSegment(segment1, segment2, maxRadius, hintPoint);
    EllipticArcSegment circularArc = EllipticArcBuilderEx.CreateCircularArc(
                        segment1, segment2, maxRadius, hintPoint);
    
    // This EllipticArcBuilderEx constructor needs to run on the MCT either.
    EllipticArcBuilderEx cab = new EllipticArcBuilderEx(segment1, segment2, maxRadius, hintPoint);
    EllipticArcSegment otherCircularArc = cab.ToSegment();
    
    Create Circle Text Element
    //Must be on QueuedTask.Run(() => { ...
    
    //Build geometry
    Coordinate2D center = new Coordinate2D(4.5, 4);
    var eabCir = new EllipticArcBuilderEx(center, 0.5, ArcOrientation.ArcClockwise);
    var cir = eabCir.ToSegment();
    
    var poly = PolygonBuilderEx.CreatePolygon(
      PolylineBuilderEx.CreatePolyline(cir, AttributeFlags.AllAttributes));
    
    //Set symbolology, create and add element to layout
    CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(
                    ColorFactory.Instance.GreenRGB, 10, "Arial", "Regular");
    string text = "Circle, circle, circle";
    
    GraphicElement cirTxtElm = ElementFactory.Instance.CreateTextGraphicElement(
      container, TextType.CircleParagraph, poly, sym, text, "New Circle Text", false);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also