ArcGIS Pro 2.9 API Reference Guide
CubicBezierBuilder Constructor(MapPoint,Coordinate2D,Coordinate2D,MapPoint)
Example 

ArcGIS.Core.Geometry Namespace > CubicBezierBuilder Class > CubicBezierBuilder Constructor : CubicBezierBuilder Constructor(MapPoint,Coordinate2D,Coordinate2D,MapPoint)
The point from which the curve starts.
Control point 1 of the cubic bezier.
Control point 2 of the cubic bezier.
The point at which the curve ends.
Creates a new instance of the CubicBezierBuilder class from four control points. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Function New( _
   ByVal startPt As MapPoint, _
   ByVal controlPt1 As Coordinate2D, _
   ByVal controlPt2 As Coordinate2D, _
   ByVal endPt As MapPoint _
)

Parameters

startPt
The point from which the curve starts.
controlPt1
Control point 1 of the cubic bezier.
controlPt2
Control point 2 of the cubic bezier.
endPt
The point at which the curve ends.
Exceptions
ExceptionDescription
Incompatible spatial references. The spatial reference of the MapPoints do not match.
This method or property must be called within the lambda passed to QueuedTask.Run.
startPt or endPt is null.
An operation on an empty geometry was attempted. startPt or controlPt1 or controlPt2 or endPt is empty.
Example
// Use a builder convenience method or a builder constructor.

MapPoint startPt = MapPointBuilder.CreateMapPoint(1.0, 1.0, 3.0);
MapPoint endPt = MapPointBuilder.CreateMapPoint(2.0, 2.0, 3.0);

Coordinate2D ctrl1Pt = new Coordinate2D(1.0, 2.0);
Coordinate2D ctrl2Pt = new Coordinate2D(2.0, 1.0);

// Builder convenience methods don't need to run on the MCT
CubicBezierSegment bezier = CubicBezierBuilder.CreateCubicBezierSegment(startPt, ctrl1Pt, ctrl2Pt, endPt, SpatialReferences.WGS84);

// Builder constructors need to run on the MCT
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  using (CubicBezierBuilder cbb = new CubicBezierBuilder(startPt, ctrl1Pt, ctrl2Pt, endPt))
  {
    // do something with the builder

    bezier = cbb.ToSegment();
  }
});


// builderEx constructors dont need to run on the MCT
CubicBezierBuilderEx cbbEx = new CubicBezierBuilderEx(startPt, ctrl1Pt.ToMapPoint(), ctrl2Pt.ToMapPoint(), endPt);
bezier = cbbEx.ToSegment() as CubicBezierSegment;

// builderEx convenience methods dont need to run on the MCt
bezier = CubicBezierBuilderEx.CreateCubicBezierSegment(startPt, ctrl1Pt, ctrl2Pt, endPt);
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

CubicBezierBuilder Class
CubicBezierBuilder Members
Overload List