ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / CubicBezierBuilderEx Class / CubicBezierBuilderEx Constructor / CubicBezierBuilderEx Constructor(IEnumerable<MapPoint>,SpatialReference)
The enumeration of points from which the curve will be constructed. Four points must be supplied.
(Optional) The spatial reference. The default value is null. The spatial references of the input points are ignored.
Example

In This Topic
    CubicBezierBuilderEx Constructor(IEnumerable<MapPoint>,SpatialReference)
    In This Topic
    Creates a new instance of the CubicBezierBuilderEx class from a set of points. Four points must be supplied.
    Syntax
    Public Function New( _
       ByVal points As IEnumerable(Of MapPoint), _
       Optional ByVal spatialReference As SpatialReference _
    )

    Parameters

    points
    The enumeration of points from which the curve will be constructed. Four points must be supplied.
    spatialReference
    (Optional) The spatial reference. The default value is null. The spatial references of the input points are ignored.
    Exceptions
    ExceptionDescription
    Four points are required for a cubic bezier.
    points is null or one of the 4 points is null or empty.
    Remarks
    The four points of the cubic bezier segment. points[0] is the start point, points[1] and points[2] are the control points, and points[3] is the end point.
    Example
    Construct a Cubic Bezier - from an enumeration of MapPoints
    // Use a buildeExr convenience method or use a builderEx constructor.
    
    MapPoint startPt = MapPointBuilderEx.CreateMapPoint(1.0, 1.0, SpatialReferences.WGS84);
    MapPoint endPt = MapPointBuilderEx.CreateMapPoint(2.0, 2.0, SpatialReferences.WGS84);
    
    MapPoint ctrl1Pt = MapPointBuilderEx.CreateMapPoint(1.0, 2.0, SpatialReferences.WGS84);
    MapPoint ctrl2Pt = MapPointBuilderEx.CreateMapPoint(2.0, 1.0, SpatialReferences.WGS84);
    
    List<MapPoint> listMapPoints = new List<MapPoint>();
    listMapPoints.Add(startPt);
    listMapPoints.Add(ctrl1Pt);
    listMapPoints.Add(ctrl2Pt);
    listMapPoints.Add(endPt);
    
    // BuilderEx convenience methods don't need to run on the MCT
    CubicBezierSegment bezier = CubicBezierBuilderEx.CreateCubicBezierSegment(listMapPoints);
    
    // builderEx constructors don't need to run on the MCT
    CubicBezierBuilderEx cbbEx = new CubicBezierBuilderEx(listMapPoints);
    bezier = cbbEx.ToSegment() as CubicBezierSegment;
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also