IConstructEllipticArc Interface

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

Description

IConstructEllipticArc contains methods for constructing Full EllipticArcs, Quarter EllipticArcs, suggested EllipticArcs, and general EllipticArcs. Only ConstructUpToFivePoints can construct a rotated EllipticArc. All other EllipticArcs are unrotated (or rotated by Pi/2).

Members

Name Description
Method ConstructEnvelope Constructs the inscribed ellipse of the given envelope. The ellipse is oriented clockwise.
Method ConstructQuarterEllipse 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.
Method ConstructTwoPointsEnvelope 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.
Method ConstructUpToFivePoints 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.

IConstructEllipticArc.ConstructEnvelope Method

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

Public Sub ConstructEnvelope ( _
    ByVal boundingEnvelope As IEnvelope _
)
public void ConstructEnvelope (
    IEnvelope boundingEnvelope
);

Description

ConstructEnvelope creates an EllipticArc from a given Envelope. The constructed EllipticArc is the full EllipticArc that has the given Envelope as its Envelope. The EllipticArc has a Major Axis equal to the larger of the Width and Height, and the Minor Axis equal to the smaller of the Width and Height. The CenterPoint of the EllipticArc is the CenterPoint of the Envelope.

Remarks

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

IConstructEllipticArc ConstructEnvelope Example

public IEllipticArc CreateFullEclipticArcFull(IEnvelope envelope)

{

   IConstructEllipticArc constructEllipticArc = new EllipticArcClass();

   constructEllipticArc.ConstructEnvelope(envelope);

   return constructEllipticArc as IEllipticArc;

}
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

IConstructEllipticArc.ConstructQuarterEllipse Method

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.

Public Sub ConstructQuarterEllipse ( _
    ByVal FromPoint As IPoint, _
    ByVal ToPoint As IPoint, _
    ByVal CCW As Boolean _
)
public void ConstructQuarterEllipse (
    IPoint FromPoint,
    IPoint ToPoint,
    bool CCW
);

Description

ConstructQuarterEllipse constructs a quarter EllipticArc between a given From Point and To Point with the desired orientation. The From Point and the To Point lie on the ends of the EllipticArc Axes. The constructed quarter Ellipse can be thought of as being the EllipticArc within the envelope defined by the From Point and To Point with a semiMajor axis equal to the longer side of the envelope and a semiMinor axis equal to the shorter side of the envelope.

Remarks

ConstructEllipticArc ConstructQuarterEllipse Example

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);

}
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

IConstructEllipticArc.ConstructTwoPointsEnvelope Method

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.

Public Sub ConstructTwoPointsEnvelope ( _
    ByVal FromPoint As IPoint, _
    ByVal ToPoint As IPoint, _
    ByVal suggestedEnvelope As IEnvelope, _
    ByVal orientation As esriArcOrientation _
)
public void ConstructTwoPointsEnvelope (
    IPoint FromPoint,
    IPoint ToPoint,
    IEnvelope suggestedEnvelope,
    esriArcOrientation orientation
);

Description

ConstructTwoPointsEnvelope constructs an EllipticArc given the From and To Points and a suggested Envelope as input. The constructed EllipticArc has characteristics similar to the full ellipse defined by the input Envelope. The final EllipticArc may vary slightly from the input Envelope depending on how well the input Points fit the suggested EllipticArc.

Remarks

IConstructEllipticArc ConstructTwoPointsEnvelope Example

IConstructEllipticArc.ConstructUpToFivePoints Method

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.

Public Sub ConstructUpToFivePoints ( _
    ByVal from As IPoint, _
    ByVal to As IPoint, _
    ByVal thru As IPoint, _
    ByVal point4 As IPoint, _
    ByVal point5 As IPoint _
)
public void ConstructUpToFivePoints (
    IPoint from,
    IPoint to,
    IPoint thru,
    IPoint point4,
    IPoint point5
);

Description

Constructs an EllipticArc using as many of the zero to five input points as possible. The first input point is always the From Point of the constructed EllipticArc. The second input point is always the To Point of the constructed EllipticArc. The third point is the Thru Point of the EllipticArc and is always guaranteed to lie on the constructed EllipticArc. The fourth and fifth points may lie on either the constructed EllipticArc or the embedded extension of the EllipticArc. The first three input points are guaranteed to be used in the construction of the EllipticArc. The fourth and fifth points are used in preferential order as long as they do not create an invalid EllipticArc. All points used to construct an EllipticArc must lie on a Convex Hull, otherwise the fourth or fifth non-convex points are discarded to maintain convexity. Zero input points defines an empty EllipticArc. One input point defines a degenerate IsPoint EllipticArc. Two disjoint input points uniquely define a degenerate IsLine EllipticArc with the points at the end of the semiMajor axis with a Minor/Major Ratio of 0. Three non-colinear input points uniquely define an IsCircular EllipticArc in the same manner as ConstructThreePoints constructs a CircularArc. Four input points on a convex hull may be sufficient to uniquely define an unrotated (or Pi / 2 rotated) EllipticArc. For cases where an unrotated EllipticArc cannot be fit to the input points, a reasonable rotated EllipticArc is constructed to fit the input points (this EllipticArc is not the only rotated EllipticArc that can be fit to the input points.).

Remarks

ConstructEllipticArc ConstructUpToFivePoints Example

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);

}
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

Classes that implement IConstructEllipticArc

Classes Description
EllipticArc A portion of the boundary of a 2D ellipse that connects two points; optionally has measure, height and ID attributes at each endpoint.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.