Interface IEllipticArc

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

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

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("FA44C5F5-16C6-11D2-AA7A-00C04FA37BA4")]
public interface IEllipticArc : ICurve, IGeometry

Remarks

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

EllipticArc Example

Properties

CenterPoint

The center point of the arc.

IPoint CenterPoint { get; }

Property Value

IPoint

Remarks

 

EllipticArc CenterPoint Example

CentralAngle

The included (or central) angle.

double CentralAngle { get; set; }

Property Value

double

Remarks

 

EllipticArc CentralAngle Example

Dimension

esriGeometryDimension Dimension { get; }

Property Value

esriGeometryDimension

Envelope

IEnvelope Envelope { get; }

Property Value

IEnvelope

FromAngle[bool]

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

double FromAngle[bool ellipseStd] { get; set; }

Parameters

ellipseStd bool

Property Value

double

Remarks

 

EllipticArc FromAngle Example

FromPoint

IPoint FromPoint { get; set; }

Property Value

IPoint

GeometryType

esriGeometryType GeometryType { get; }

Property Value

esriGeometryType

IsCircular

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

bool IsCircular { get; }

Property Value

bool

IsClosed

bool IsClosed { get; }

Property Value

bool

IsCounterClockwise

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

bool IsCounterClockwise { get; set; }

Property Value

bool

Remarks

 

IsCCW Example

IsEmpty

bool IsEmpty { get; }

Property Value

bool

IsLine

Indicates if the arc is degenerated to a line.

bool IsLine { get; }

Property Value

bool

Remarks

 

EllipticArc IsLine Example

IsMinor

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

bool IsMinor { get; set; }

Property Value

bool

Remarks

 

EllipticArc IsMinor Example

IsPoint

Indicates if the arc is degenerated to a point.

bool IsPoint { get; }

Property Value

bool

Length

double Length { get; }

Property Value

double

SpatialReference

ISpatialReference SpatialReference { get; set; }

Property Value

ISpatialReference

ToAngle[bool]

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

double ToAngle[bool ellipseStd] { get; set; }

Parameters

ellipseStd bool

Property Value

double

Remarks

 

EllipticArc ToAngle Example

ToPoint

IPoint ToPoint { get; set; }

Property Value

IPoint

Methods

Complement()

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

void Complement()

Remarks

 

Complement Example

GeoNormalize()

void GeoNormalize()

GeoNormalizeFromLongitude(double)

void GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

GetAxes(ref double, ref double, ref double)

Gets the semi-major and semi-minor axes.

void GetAxes(ref double semiMajor, ref double semiMinor, ref double minorMajorRatio)

Parameters

semiMajor double
semiMinor double
minorMajorRatio double

Remarks

The Axes can be set using PutAxes.

EllipticArc GetAxes Example

GetSubcurve(double, double, bool, out ICurve)

void GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

Project(ISpatialReference)

void Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

PutAxes(double, double)

Sets the semi-major and semi-minor axes.

void PutAxes(double semiMajor, double minorMajorRatio)

Parameters

semiMajor double
minorMajorRatio double

Remarks

The Axes can be returned using GetAxes.

EllipticArc PutAxes Example

PutCoords(bool, IPoint, IPoint, IPoint, double, double, esriArcOrientation)

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

void PutCoords(bool ellipseStd, IPoint Center, IPoint from, IPoint to, double rotationAngle, double minorMajorRatio, esriArcOrientation orientation)

Parameters

ellipseStd bool
Center IPoint
from IPoint
to IPoint
rotationAngle double
minorMajorRatio double
orientation esriArcOrientation

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

PutCoordsByAngle(bool, IPoint, double, double, double, double, double)

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

void PutCoordsByAngle(bool ellipseStd, IPoint Center, double FromAngle, double CentralAngle, double rotationAngle, double semiMajor, double minorMajorRatio)

Parameters

ellipseStd bool
Center IPoint
FromAngle double
CentralAngle double
rotationAngle double
semiMajor double
minorMajorRatio double

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

QueryCenterPoint(IPoint)

Copies the center of this arc to the input point.

void QueryCenterPoint(IPoint Center)

Parameters

Center IPoint

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

[C#]

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










[Visual Basic .NET]

    '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














QueryCoords(bool, IPoint, IPoint, IPoint, ref double, ref double, ref bool, ref bool)

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

void QueryCoords(bool ellipseStd, IPoint Center, IPoint from, IPoint to, ref double rotationAngle, ref double minorMajorRatio, ref bool isCCW, ref bool minor)

Parameters

ellipseStd bool
Center IPoint
from IPoint
to IPoint
rotationAngle double
minorMajorRatio double
isCCW bool
minor bool

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

QueryCoordsByAngle(bool, IPoint, ref double, ref double, ref double, ref double, ref double)

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

void QueryCoordsByAngle(bool ellipseStd, IPoint Center, ref double FromAngle, ref double CentralAngle, ref double rotationAngle, ref double semiMajor, ref double minorMajorRatio)

Parameters

ellipseStd bool
Center IPoint
FromAngle double
CentralAngle double
rotationAngle double
semiMajor double
minorMajorRatio double

Remarks

 

IEllipticArc QueryCoordsByAngle Example

QueryEnvelope(IEnvelope)

void QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

QueryFromPoint(IPoint)

void QueryFromPoint(IPoint from)

Parameters

from IPoint

QueryNormal(esriSegmentExtension, double, bool, double, ILine)

void QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

QueryPoint(esriSegmentExtension, double, bool, IPoint)

void QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

void QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

QueryTangent(esriSegmentExtension, double, bool, double, ILine)

void QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

QueryToPoint(IPoint)

void QueryToPoint(IPoint to)

Parameters

to IPoint

ReverseOrientation()

void ReverseOrientation()

SetEmpty()

void SetEmpty()

SnapToSpatialReference()

void SnapToSpatialReference()