// Construct a circular arc counterclockwise from (2, 1) to (1, 2) such that the embedded
// circle has center point at (1, 1) and radius = 1.
// Use a builder convenience method or use a builder constructor.
MapPoint fromPt = MapPointBuilder.CreateMapPoint(2, 1, SpatialReferences.WGS84);
double chordLength = Math.Sqrt(2);
double chordBearing = 3 * Math.PI / 4;
double radius = 1;
esriArcOrientation orientation = esriArcOrientation.esriArcCounterClockwise;
MinorOrMajor minorOrMajor = MinorOrMajor.Minor;
// Builder convenience methods don't need to run on the MCT.
EllipticArcSegment circularArc = EllipticArcBuilder.CreateEllipticArcSegment(fromPt, chordLength, chordBearing, radius, orientation, minorOrMajor);
// Builder constructors need to run on the MCT.
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
using (EllipticArcBuilder cab = new EllipticArcBuilder(fromPt, chordLength, chordBearing, radius, orientation, minorOrMajor))
{
// do something with the builder
EllipticArcSegment anotherCircularArc = cab.ToSegment();
}
});