IEllipticArc Interface

Provides access to members that control properties of elliptic arc segments.

Description

An Elliptic Arc is an object that describes any portion of an ellipse. The Major axis of the Elliptic Arc is the largest axis spanning between points on opposite sides of the ellipse. The Minor axis is the perpendicular bisector of the Major axis. Together, the Major and Minor axes determine the full ellipse on which the Elliptic Arc is generated. These parameters may also be specified in terms of the semi-Major axis (half of the Major axis) and the MinorMajorRatio (the ratio of the Minor axis to the Major axis). The ellipse may also be rotated. Rotation is described by the Rotation Angle. However, the effect of the Rotation Angle depends on the value of EllipseStd. If EllipseStd is TRUE, all angles and axes are calculated with respect to the Major Axis as though the Major Axis was at 0 radians. Also, the location of the From Point and To Point are given relative to the Center Point as though it is the origin. If EllipseStd is FALSE, all angles are caluclated in standard Cartesian coordinates. The portion of the complete ellipse represented by the Elliptic Arc is determined by the From Angle and Central Angle, both measured in radians.

Members

Name Description
Read-only property CenterPoint The center point of the arc.
Read/write property CentralAngle The included (or central) angle.
Method Complement Changes this ellipse into its complement; 'from' and 'to' points are unchanged.
Read-only property Dimension The topological dimension of this geometry.
Read-only property Envelope Creates a copy of this geometry's envelope and returns it.
Read/write property FromAngle The start angle (measured from a horizontal line through the center point) defining where the arc starts.
Read/write property FromPoint The 'from' point of the curve.
Read-only property GeometryType The type of this geometry.
Method GeoNormalize Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method GeoNormalizeFromLongitude Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
Method GetAxes Gets the semi-major and semi-minor axes.
Method GetSubcurve Extracts a portion of this curve into a new curve.
Read-only property IsCircular Indicates if this elliptical arc is acutally circular (major and minor axes same length).
Read-only property IsClosed Indicates if 'from' and 'to' points (of each part) are identical.
Read/write property IsCounterClockwise Indicates if this elliptic arc is oriented counter-clockwise from its 'from' point to its 'to' point.
Read-only property IsEmpty Indicates whether this geometry contains any points.
Read-only property IsLine Indicates if the arc is degenerated to a line.
Read/write property IsMinor Indicates whether the arc is a minor arc or a major arc.
Read-only property IsPoint Indicates if the arc is degenerated to a point.
Read-only property Length The length of the curve.
Method Project Projects this geometry into a new spatial reference.
Method PutAxes Sets the semi-major and semi-minor axes.
Method PutCoords Sets the center point and endpoints, angle of rotation, and orientation.
Method PutCoordsByAngle Sets the center point, starting angle, signed central angle, angle of rotation, ratio of the minor axis to the major axis, and axes.
Method QueryCenterPoint Copies the center of this arc to the input point.
Method QueryCoords Copies the center and endpoints, angle of rotation, orientation and major/minor properties into the method parameters.
Method QueryCoordsByAngle Returns the center point, starting angle, signed central angle, angle of rotation, ratio of the minor axis to the major axis, and axes.
Method QueryEnvelope Copies this geometry's envelope properties into the specified envelope.
Method QueryFromPoint Copies this curve's 'from' point to the input point.
Method QueryNormal Constructs a line normal to a curve from a point at a specified distance along the curve.
Method QueryPoint Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
Method QueryPointAndDistance Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
Method QueryTangent Constructs a line tangent to a curve from a point at a specified distance along the curve.
Method QueryToPoint Copies the curve's 'to' point into the input point.
Method ReverseOrientation Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).
Method SetEmpty Removes all points from this geometry.
Method SnapToSpatialReference Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
Read/write property SpatialReference The spatial reference associated with this geometry.
Read/write property ToAngle The end angle (measured from a horizontal line through the center point) defining where the arc ends.
Read/write property ToPoint The 'to' point of the curve.

IEllipticArc.CenterPoint Property

The center point of the arc.

Public ReadOnly Property CenterPoint As IPoint
public IPoint CenterPoint {get;}

Description

The CenterPoint is the point where the Major Axis and Minor Axis of the EllipticArc intersect. The CenterPoint is the point from which all angles and distances are calculated to create the EllipticArc.

Remarks

EllipticArc CenterPoint Example

IEllipticArc.CentralAngle Property

The included (or central) angle.

Public Property CentralAngle As Double
public double CentralAngle {get; set;}

Description

The CentralAngle describes the span of the EllipticArc. The CentralAngle is the angular measure between the FromAngle and the ToAngle. The CentralAngle is measured in Radians and is always between -2*Pi and 2*Pi. If the CentralAngle > 0, then the EllipticArc is oriented in a CounterClockwise direction.

Remarks

EllipticArc CentralAngle Example

IEllipticArc.Complement Method

Changes this ellipse into its complement; 'from' and 'to' points are unchanged.

Public Sub Complement ( _
)
public void Complement (
);

Description

The Complement of an EllipticArc is the EllipticArc between the ToPoint and the FromPoint of the original EllipticArc that creates a full ellipse when combined with the original EllipticArc. The Complement maintains the same FromPoint and ToPoint as the original EllipticArc, but has the different IsMinor and IsCounterClockwise values.

Remarks

Complement Example

IEllipticArc.FromAngle Property

The start angle (measured from a horizontal line through the center point) defining where the arc starts.

Public Function get_FromAngle ( _
    ByVal ellipseStd As Boolean _
) As Double
Public Sub set_FromAngle ( _
    ByVal ellipseStd As Boolean, _
    ByVal FromAngle As Double _
)
public double get_FromAngle (
    bool ellipseStd
);
public void set_FromAngle (
    bool ellipseStd,
    double FromAngle
);

Description

The From Angle is the angle of the Line defined by the Center Point and the From Point of the Elliptic Arc. Setting the From Angle changes the From Point of the Elliptic Arc without altering the embedded geometry. The From Angle is measured in radians (there are 2*pi radians in a full ellipse). If EllipseStd = TRUE, the From Angle is relative to the rotated semi-Major Axis rather than the X-Axis.

Remarks

EllipticArc FromAngle Example

IEllipticArc.GetAxes Method

Gets the semi-major and semi-minor axes.

Public Sub GetAxes ( _
    ByRef semiMajor As Double, _
    ByRef semiMinor As Double, _
    ByRef minorMajorRatio As Double _
)
public void GetAxes (
    ref double semiMajor,
    ref double semiMinor,
    ref double minorMajorRatio
);

Description

Returns the Major Axis, the Minor Axis, and the ratio of the Minor Axis to the Major Axis. The Major Axis is the larger of the two Axes, and the Minor Axis is the smaller Axis. The Major Axis always lies on the line between 0 and Pi Radians in EllipseStd, and the Minor Axis always lies on the line between Pi/2 and 3*Pi/2 Radian in EllipseStd.

Remarks

The Axes can be set using PutAxes.

EllipticArc GetAxes Example

IEllipticArc.IsCircular Property

Indicates if this elliptical arc is acutally circular (major and minor axes same length).

Public ReadOnly Property IsCircular As Boolean
public bool IsCircular {get;}

Description

IsCircular returns TRUE when the minorMajorRatio = 1.

IEllipticArc.IsCounterClockwise Property

Indicates if this elliptic arc is oriented counter-clockwise from its 'from' point to its 'to' point.

Public Property IsCounterClockwise As Boolean
public bool IsCounterClockwise {get; set;}

Description

IsCounterClockwise returns TRUE if the CentralAngle is greater than 0. If the IsCounterClockwise values differ, setting IsCounterClockwise changes the EllipticArc to its Complement.

Remarks

IsCCW Example

IEllipticArc.IsLine Property

Indicates if the arc is degenerated to a line.

Public ReadOnly Property IsLine As Boolean
public bool IsLine {get;}

Description

IsLine returns TRUE when the minorMajorRatio = 0. This is analgous to the semiMinor Axis having a length of 0.

Remarks

EllipticArc IsLine Example

IEllipticArc.IsMinor Property

Indicates whether the arc is a minor arc or a major arc.

Public Property IsMinor As Boolean
public bool IsMinor {get; set;}

Description

IsMinor is TRUE when the CentralAngle < Pi (180 degrees). IsMinor also returns TRUE when the semiMajor axis = 0. If the IsMinor values differ, setting IsMinor changes the EllipticArc to its Complement.

Remarks

EllipticArc IsMinor Example

IEllipticArc.IsPoint Property

Indicates if the arc is degenerated to a point.

Public ReadOnly Property IsPoint As Boolean
public bool IsPoint {get;}

Description

IsPoint returns TRUE when the semiMajor axis = 0. IsPoint returns FALSE when the semiMajor axis > 0 (this includes when the CentralAngle = 0, as this is a well-defined EllipticArc.).

IEllipticArc.PutAxes Method

Sets the semi-major and semi-minor axes.

Public Sub PutAxes ( _
    ByVal semiMajor As Double, _
    ByVal minorMajorRatio As Double _
)
public void PutAxes (
    double semiMajor,
    double minorMajorRatio
);

Description

Sets the Major Axis and the Minor Axis. The Major Axis is the larger of the two Axes, and the Minor Axis is the smaller Axis. The Major Axis always lies on the line between 0 and Pi Radians in EllipseStd, and the Minor Axis always lies on the line between Pi/2 and 3*Pi/2 Radian in EllipseStd.

Remarks

The Axes can be returned using GetAxes.

EllipticArc PutAxes Example

IEllipticArc.PutCoords Method

Sets the center point and endpoints, angle of rotation, and orientation.

Public Sub PutCoords ( _
    ByVal ellipseStd As Boolean, _
    ByVal Center As IPoint, _
    ByVal from As IPoint, _
    ByVal to As IPoint, _
    ByVal rotationAngle As Double, _
    ByVal minorMajorRatio As Double, _
    ByVal orientation As esriArcOrientation _
)
public void PutCoords (
    bool ellipseStd,
    IPoint Center,
    IPoint from,
    IPoint to,
    double rotationAngle,
    double minorMajorRatio,
    esriArcOrientation orientation
);

Description

PutCoords creates an Elliptic Arc given the EllipseStd value, Center Point, From Point, To Point, Rotation Angle, Minor Axis to Major Axis Ratio, and the Arc Orientation. If EllipseStd = TRUE, the From Point and To Point locations are relative offsets from the Center Point rather than the origin.

Remarks

Unless the coordinates of the From and To Points are exactly on the defined Elliptic Arc, PutCoords is likely to create an invalid Elliptic Arc. Therefore, it is highly recommended that another Elliptic Arc creation method is used unless all of the necessary input parameters are exactly known.

IEllipticArc PutCoords Example

IEllipticArc.PutCoordsByAngle Method

Sets the center point, starting angle, signed central angle, angle of rotation, ratio of the minor axis to the major axis, and axes.

Public Sub PutCoordsByAngle ( _
    ByVal ellipseStd As Boolean, _
    ByVal Center As IPoint, _
    ByVal FromAngle As Double, _
    ByVal CentralAngle As Double, _
    ByVal rotationAngle As Double, _
    ByVal semiMajor As Double, _
    ByVal minorMajorRatio As Double _
)
public void PutCoordsByAngle (
    bool ellipseStd,
    IPoint Center,
    double FromAngle,
    double CentralAngle,
    double rotationAngle,
    double semiMajor,
    double minorMajorRatio
);

Description

Creates an Elliptic Arc given the EllipseStd value, Center Point, From Angle, Central Angle, Rotation Angle, semi-Major Axis length, and Minor Axis to Major Axis Ratio. If EllipseStd = TRUE, the From Angle is relative to the rotated semi-Major Axis rather than the X-Axis.

Remarks

This is the recommended way to create an arbitrary Elliptic Arc. However, due to numeric accuracy limitations of computers and trigonometric functions, the From and To Points may be very slightly offset from the expected coordinates. This is important to keep in mind when attempting to connect the endpoints to other segments.

IEllipticArc PutCoordsByAngle Example

IEllipticArc.QueryCenterPoint Method

Copies the center of this arc to the input point.

Public Sub QueryCenterPoint ( _
    ByVal Center As IPoint _
)
public void QueryCenterPoint (
    IPoint Center
);

Description

The CenterPoint is the point where the Major Axis and Minor Axis of the EllipticArc intersect. The CenterPoint is the point from which all angles and distances are calculated to create the EllipticArc. You must instantiate the Point before calling QueryCenterPoint. For example,

Dim pPoint as IPoint
Set pPoint = New Point

Remarks

The QueryCenterPoint method should be used in performance critical situations, where the center point of several arcs needs to be retrieved. The point is populated (not created) by the method. For example, this can be used to get the center point of several arcs in a loop. Creating the point only once outside the loop may improve performance for large number of arcs.

EllipticArc QueryCenterPoint Example

//This example demonstrates how to use the QueryCenterPoint method

 private void QueryCenterPoint()

 {

     IPoint center = new PointClass();

     center.PutCoords(10, 10);

     IEllipticArc ellipticArc = new EllipticArcClass();

     ellipticArc.PutCoordsByAngle(false, center, 0, Math.PI / 2, 0, 20, 0.4);

     //Cocreate the center point

     IPoint theCenterPoint = new PointClass();

     ellipticArc.QueryCenterPoint(theCenterPoint);

     System.Windows.Forms.MessageBox.Show("Center point coordinates \n" + theCenterPoint.X + ", " + theCenterPoint.Y);

 }
'This example demonstrates how to use the QueryCenterPoint method

     Sub QueryCenterPoint_example()

         Dim pEArc As IEllipticArc, dpi As Double

         Dim pCenter As IPoint, pTheCenterPoint As IPoint

         dpi = Math.Atan(1) * 4

         pCenter = New Point

         pEArc = New EllipticArc

         pCenter.PutCoords(10, 10)

         pEArc.PutCoordsByAngle(False, pCenter, 0, dpi / 2, 0, 20, 0.4)

         'Cocreate the center point

         pTheCenterPoint = New Point

         pEArc.queryCenterPoint(pTheCenterPoint)

         Debug.Print("Center point coordinates")

         Debug.Print(pTheCenterPoint.X & " , " & pTheCenterPoint.Y)

     End Sub

IEllipticArc.QueryCoords Method

Copies the center and endpoints, angle of rotation, orientation and major/minor properties into the method parameters.

Public Sub QueryCoords ( _
    ByVal ellipseStd As Boolean, _
    ByVal Center As IPoint, _
    ByVal from As IPoint, _
    ByVal to As IPoint, _
    ByRef rotationAngle As Double, _
    ByRef minorMajorRatio As Double, _
    ByRef isCCW As Boolean, _
    ByRef minor As Boolean _
)
public void QueryCoords (
    bool ellipseStd,
    IPoint Center,
    IPoint from,
    IPoint to,
    ref double rotationAngle,
    ref double minorMajorRatio,
    ref bool isCCW,
    ref bool minor
);

Description

Given the EllipseStd value, returns the Center Point, From Point, To Point, Rotation Angle, Minor Axis to Major Axis Ratio, IsCounterClockwise value, and IsMinor value of the Elliptic Arc. If EllipseStd = TRUE, the From Point and To Point locations are relative offsets from the Center Point rather than the origin.

Remarks

These are the necessary inputs for PutCoords, except in special cases (half ellipse, full ellipse, Central Angle = 0, and Minor to Major Ratio = 0) where the ArcOrientation must know which of these cases exists to ensure that the desired Elliptic Arc is unambiguous. Any of the output parameters can be set to nil if that info is not desired.

-isCCW stands for "is counter clockwise"

IEllipticArc QueryCoords Example

IEllipticArc.QueryCoordsByAngle Method

Returns the center point, starting angle, signed central angle, angle of rotation, ratio of the minor axis to the major axis, and axes.

Public Sub QueryCoordsByAngle ( _
    ByVal ellipseStd As Boolean, _
    ByVal Center As IPoint, _
    ByRef FromAngle As Double, _
    ByRef CentralAngle As Double, _
    ByRef rotationAngle As Double, _
    ByRef semiMajor As Double, _
    ByRef minorMajorRatio As Double _
)
public void QueryCoordsByAngle (
    bool ellipseStd,
    IPoint Center,
    ref double FromAngle,
    ref double CentralAngle,
    ref double rotationAngle,
    ref double semiMajor,
    ref double minorMajorRatio
);

Description

Given the EllipseStd value, returns the Center Point, From Angle, Central Angle, Rotation Angle, semi-Major axis length, and Minor Axis to Major Axis Ratio for the Elliptic Arc. These are the same parameters used by PutCoordsByAngle to create the Elliptic Arc. If EllipseStd = TRUE, the From Angle is relative to the rotated semi-Major Axis rather than the X-Axis.

Remarks

IEllipticArc QueryCoordsByAngle Example

IEllipticArc.ToAngle Property

The end angle (measured from a horizontal line through the center point) defining where the arc ends.

Public Function get_ToAngle ( _
    ByVal ellipseStd As Boolean _
) As Double
Public Sub set_ToAngle ( _
    ByVal ellipseStd As Boolean, _
    ByVal ToAngle As Double _
)
public double get_ToAngle (
    bool ellipseStd
);
public void set_ToAngle (
    bool ellipseStd,
    double ToAngle
);

Description

The To Angle is the angle of the Line defined by the Center Point and the To Point of the Elliptic Arc. Setting the To Angle changes the To Point of the Elliptic Arc without altering the embedded geometry. The To Angle is measured in radians (there are 2*pi radians in a full ellipse). If EllipseStd = TRUE, the To Angle is relative to the rotated semi-Major Axis rather than the X-Axis.

Remarks

EllipticArc ToAngle Example

Inherited Interfaces

Interfaces Description
ICurve Provides access to properties and methods of all 1 dimensional curves (polylines, segments, boundaries of polygons, etc.).
IGeometry Provides access to members that describe properties and behavior of all geometric objects.

Classes that implement IEllipticArc

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.

Remarks

A CircularArc is a special case of an EllipticArc where the MinorMajorRatio is 1 (however, a CircularArc is NOT an EllipticArc).

EllipticArc Example

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