// Construct a circular arc from (2, 1) to (1, 2) with interior pt (1 + sqrt(2)/2, 1 + sqrt(2)/2).
// Use a builder convenience method or use a builder constructor.
MapPoint fromPt = MapPointBuilder.CreateMapPoint(2, 1);
MapPoint toPt = MapPointBuilder.CreateMapPoint(1, 2);
Coordinate2D interiorPt = new Coordinate2D(1 + Math.Sqrt(2) / 2, 1 + Math.Sqrt(2) / 2);
// Builder convenience methods don't need to run on the MCT.
EllipticArcSegment circularArc = EllipticArcBuilder.CreateEllipticArcSegment(fromPt, toPt, interiorPt);
// Builder constructors need to run on the MCT.
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
using (EllipticArcBuilder cab = new EllipticArcBuilder(fromPt, toPt, interiorPt))
{
// do something with the builder
EllipticArcSegment anotherCircularArc = cab.ToSegment();
}
});