Interface ICurve
Provides access to properties and methods of all 1 dimensional curves (polylines, segments, boundaries of polygons, etc.).
[Guid("1B077916-38C5-11D0-92D2-00805F7C28B0")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ICurve : IGeometry
Properties
Dimension
esriGeometryDimension Dimension { get; }
Property Value
Envelope
IEnvelope Envelope { get; }
Property Value
FromPoint
The 'from' point of the curve.
IPoint FromPoint { get; set; }
Property Value
Remarks

GeometryType
esriGeometryType GeometryType { get; }
Property Value
IsClosed
Indicates if 'from' and 'to' points (of each part) are identical.
bool IsClosed { get; }
Property Value
Remarks
IsClosed may still return TRUE if the curve consists of improperly constructed geometries (ex. non-continuous paths). IsClosed only checks the location of the From and To points of each part, it does not check the internal parts for topological consistency.

IsEmpty
bool IsEmpty { get; }
Property Value
Length
The length of the curve.
double Length { get; }
Property Value
SpatialReference
ISpatialReference SpatialReference { get; set; }
Property Value
ToPoint
The 'to' point of the curve.
IPoint ToPoint { get; set; }
Property Value
Remarks

Methods
GeoNormalize()
void GeoNormalize()
GeoNormalizeFromLongitude(double)
void GeoNormalizeFromLongitude(double Longitude)
Parameters
Longitudedouble
GetSubcurve(double, double, bool, out ICurve)
Extracts a portion of this curve into a new curve.
void GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)
Parameters
Remarks

Project(ISpatialReference)
void Project(ISpatialReference newReferenceSystem)
Parameters
newReferenceSystemISpatialReference
QueryEnvelope(IEnvelope)
void QueryEnvelope(IEnvelope outEnvelope)
Parameters
outEnvelopeIEnvelope
QueryFromPoint(IPoint)
Copies this curve's 'from' point to the input point.
void QueryFromPoint(IPoint from)
Parameters
fromIPoint
Remarks
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

//The example shows how to query the from and to points of a curve.
public void ICurveQueryPoints(IFeature currentFeature)
{
if (currentFeature.Shape.GeometryType == esriGeometryType.esriGeometryPolyline ||
currentFeature.Shape.GeometryType == esriGeometryType.esriGeometryLine)
{
ICurve curve = currentFeature.Shape as ICurve;
IPoint fromPoint = new PointClass();
IPoint toPoint = new PointClass();
curve.QueryFromPoint(fromPoint);
curve.QueryToPoint(toPoint);
System.Windows.Forms.MessageBox.Show("ICurve properties..." + "\n" +
"Curve.QueryFromPoint (x,y) = " + fromPoint.X + "," + fromPoint.Y + "\n" +
"Curve.QueryToPoint (x,y) = " + toPoint.X + "," + toPoint.Y);
}
}
' The example shows how to query the from and to points of a curve.
Public Sub t_ICurve_QueryPoints(ByVal pFeature As IFeature)
Dim pCurve As ICurve
Dim pPointFrom As IPoint
Dim pPointTo As IPoint
pPointFrom = New Point
pPointTo = New Point
If pFeature.Shape.GeometryType = esriGeometryType.esriGeometryPolyline Or _
esriGeometryType.esriGeometryPolyline Or esriGeometryType.esriGeometryLine Then
pCurve = pFeature.Shape
pCurve.QueryFromPoint(pPointFrom)
pCurve.QueryToPoint(pPointTo)
MsgBox("+++ICurve properties..." & vbCrLf _
& "Curve.QueryFromPoint (x,y) = " & pPointFrom.X & "," & pPointFrom.Y & vbCrLf _
& "Curve.QueryToPoint (x,y) = " & pPointTo.X & "," & pPointTo.Y & vbCrLf)
End If
End Sub
QueryNormal(esriSegmentExtension, double, bool, double, ILine)
Constructs a line normal to a curve from a point at a specified distance along the curve.
void QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatioboolLengthdoublenormalILine
Remarks

QueryPoint(esriSegmentExtension, double, bool, IPoint)
Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
void QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatiobooloutPointIPoint
Remarks
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)
Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
void QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)
Parameters
extensionesriSegmentExtensioninPointIPointasRatiobooloutPointIPointDistanceAlongCurvedoubledistanceFromCurvedoublebRightSidebool
Remarks
AsRatio is an input parameter that only affects the DistanceAlongCurve
distanceFromCurve is an output parameter that represents the minimum distance between the curve and the input point.
DistanceAlongCurve is an output parameter that represents the distance between the Frompoint of the input curve and the returned point on the curve.
bRightSide is an output parameter that tells if the input point is on the right side of the curve. The direction of the curve determines the right and left sides.
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryTangent(esriSegmentExtension, double, bool, double, ILine)
Constructs a line tangent to a curve from a point at a specified distance along the curve.
void QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatioboolLengthdoubletangentILine
Remarks

QueryToPoint(IPoint)
Copies the curve's 'to' point into the input point.
void QueryToPoint(IPoint to)
Parameters
toIPoint
Remarks
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

ReverseOrientation()
Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).
void ReverseOrientation()
Remarks
The ReverseOrientation method works the same way as the Arcedit FLIP command. It reverses the order of the vertices in the Curve.
Caution should be taken in using ReverseOrientation on Polygons. Since ReverseOrientation changes the direction of each Ring within the Polygon, all Exterior Rings become Interior Rings and vice versa.

public void ReverseOrientation(IFeatureClass featureClass, int oidToEdit)
{
IFeature feature = featureClass.GetFeature(oidToEdit);
if (feature.Shape.GeometryType == esriGeometryType.esriGeometryPolygon)
{
IArea area = feature.Shape as IArea;
double beforeReverse = area.Area;
ICurve curve = feature.Shape as ICurve;
curve.ReverseOrientation();
double afterReverse = area.Area;
System.Windows.Forms.MessageBox.Show(String.Format("The polygon area is originally {0}, after the orientation was reversed the area is {1}.",beforeReverse,afterReverse));
}
}
SetEmpty()
void SetEmpty()
SnapToSpatialReference()
void SnapToSpatialReference()