Interface IConstructEllipticArc

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

Provides access to members that construct an elliptic arc segment using other geometries and measures.

[Guid("B12317D5-16D7-11D2-AA7A-00C04FA37BA4")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IConstructEllipticArc

Methods

ConstructEnvelope(IEnvelope)

Constructs the inscribed ellipse of the given envelope. The ellipse is oriented clockwise.

void ConstructEnvelope(IEnvelope boundingEnvelope)

Parameters

boundingEnvelope IEnvelope

Remarks

The method ignores the Z values of the given envelope and therefore the output elliptic arc is 2D.

 

IConstructEllipticArc ConstructEnvelope Example

[C#]
public IEllipticArc CreateFullEclipticArcFull(IEnvelope envelope)
{
   IConstructEllipticArc constructEllipticArc = new EllipticArcClass();
   constructEllipticArc.ConstructEnvelope(envelope);
   return constructEllipticArc as IEllipticArc;
}
[Visual Basic .NET]

    Public Function CreateEArcFull(ByVal pEnv As ESRI.ArcGIS.Geometry.IEnvelope) As ESRI.ArcGIS.Geometry.IEllipticArc
        Dim pConstEArc As ESRI.ArcGIS.Geometry.IConstructEllipticArc
        pConstEArc = New ESRI.ArcGIS.Geometry.EllipticArc
        pConstEArc.ConstructEnvelope(pEnv)
        CreateEArcFull = pConstEArc
    End Function





ConstructQuarterEllipse(IPoint, IPoint, bool)

Construct an elliptic arc that starts at fromPoint, goes to toPoint, and spans an angle of pi/2. The rotation of the ellipse will be either 0 or pi/2.

void ConstructQuarterEllipse(IPoint FromPoint, IPoint ToPoint, bool CCW)

Parameters

FromPoint IPoint
ToPoint IPoint
CCW bool

Remarks

 

ConstructEllipticArc ConstructQuarterEllipse Example

[C#]
private void ConstructQuarterEllipticArc()
{
   IPoint point1 = new PointClass();
   point1.PutCoords(0, 0);
   IPoint point2 = new PointClass();
   point2.PutCoords(100, 100);

IConstructEllipticArc constructionArc = new EllipticArcClass(); constructionArc.ConstructQuarterEllipse(point1, point2, true);

IEllipticArc ellipticArc = constructionArc as IEllipticArc; System.Windows.Forms.MessageBox.Show("Length : " + ellipticArc.Length); }

[Visual Basic .NET]

    Private Sub ConstructQuarterEllipticArc()
        Dim pCons As ESRI.ArcGIS.Geometry.IConstructEllipticArc
        Dim pT1 As ESRI.ArcGIS.Geometry.IPoint
        Dim pT2 As ESRI.ArcGIS.Geometry.IPoint
        Dim pEArc As ESRI.ArcGIS.Geometry.IEllipticArc
        pT1 = New ESRI.ArcGIS.Geometry.Point
        pT2 = New ESRI.ArcGIS.Geometry.Point
        pT1.PutCoords(0, 0)
        pT2.PutCoords(100, 100)
        pCons = New ESRI.ArcGIS.Geometry.EllipticArc
        pCons.ConstructQuarterEllipse(pT1, pT2, True)
        pEArc = pCons 'QI
        Debug.Print("Length : " & pEArc.Length)
    End Sub












ConstructTwoPointsEnvelope(IPoint, IPoint, IEnvelope, esriArcOrientation)

Construct an elliptic arc that starts at fromPoint, goes to toPoint, and tries to have the embedded ellipse inscribed in the suggestedEnvelope. The result will have rotation of 0 or pi/2.

void ConstructTwoPointsEnvelope(IPoint FromPoint, IPoint ToPoint, IEnvelope suggestedEnvelope, esriArcOrientation orientation)

Parameters

FromPoint IPoint
ToPoint IPoint
suggestedEnvelope IEnvelope
orientation esriArcOrientation

Remarks

 

IConstructEllipticArc ConstructTwoPointsEnvelope Example

ConstructUpToFivePoints(IPoint, IPoint, IPoint, IPoint, IPoint)

Constructs an elliptic arc, given up to 5 points, such that the embedded ellipse passes through as many as possible. The arc will start at the first point and end at the second, passing through the third.

void ConstructUpToFivePoints(IPoint from, IPoint to, IPoint thru, IPoint point4, IPoint point5)

Parameters

from IPoint
to IPoint
thru IPoint
point4 IPoint
point5 IPoint

Remarks

 

ConstructEllipticArc ConstructUpToFivePoints Example

[C#]
private void ConstructFivePointArc()
{
  IPoint point1 = new PointClass();
  point1.PutCoords(5, 10);
  IPoint point2 = new PointClass();
  point2.PutCoords(15, 10);
  IPoint point3 = new PointClass();
  point3.PutCoords(15, 100);
  IPoint point4 = new PointClass();
  point4.PutCoords(50, 10);
  IPoint point5 = new PointClass();
  point5.PutCoords(50, 100);
  IConstructEllipticArc constructEllipticArc = new EllipticArcClass();
  constructEllipticArc.ConstructUpToFivePoints(point1, point2, point3, point4, point5);
  IEllipticArc ellipitcArc = constructEllipticArc as IEllipticArc;
  String report = "X, Y Center Point : " + ellipitcArc.CenterPoint.X + " , " + ellipitcArc.CenterPoint.Y + "\n" +
                  "Center angle in rad : " + ellipitcArc.CentralAngle + "\n" +
                  "Length : " + ellipitcArc.Length;
  System.Windows.Forms.MessageBox.Show(report);
}
[Visual Basic .NET]

Private Sub ConstructUpToFivePointsEllipticArc()
   Dim pCons As ESRI.ArcGIS.Geometry.IConstructEllipticArc
   Dim pTr As ESRI.ArcGIS.Geometry.IPoint
   Dim pFr As ESRI.ArcGIS.Geometry.IPoint
   Dim pTo As ESRI.ArcGIS.Geometry.IPoint
   Dim p4 As ESRI.ArcGIS.Geometry.IPoint
   Dim p5 As ESRI.ArcGIS.Geometry.IPoint
   Dim pEArc As ESRI.ArcGIS.Geometry.IEllipticArc
   pTr = New ESRI.ArcGIS.Geometry.Point
   pFr = New ESRI.ArcGIS.Geometry.Point
   pTo = New ESRI.ArcGIS.Geometry.Point
   p4 = New ESRI.ArcGIS.Geometry.Point
   p5 = New ESRI.ArcGIS.Geometry.Point
   pFr.PutCoords(0, -100)
   pTo.PutCoords(0, -100)
   pTr.PutCoords(200, 0)
   p4.PutCoords(0, 100)
   p5.PutCoords(-200, -0)
   pCons = New ESRI.ArcGIS.Geometry.EllipticArc
   pCons.ConstructUpToFivePoints(pFr, pTo, pTr, p4, p5)
   pEArc = pCons 'QI
   'Report
   Debug.Print("X, Y Center Point : " & pEArc.CenterPoint.X & " , " & pEArc.CenterPoint.Y)
   Debug.Print("Center angle in rad : " & pEArc.CentralAngle)
   Debug.Print("Length : " & pEArc.Length)
End Sub