Provides access to members that extend the functionality of one dimensional curves.
Description
ICurve2 extends Segment functionality to allow both endpoints to be set simultaneously. This allows the segment parameterization to be maintained when relocating both the From Point and the To Point.
Members
Name | Description | |
---|---|---|
Dimension | The topological dimension of this geometry. | |
Envelope | Creates a copy of this geometry's envelope and returns it. | |
FromPoint | The 'from' point of the curve. | |
GeometryType | The type of this geometry. | |
GeoNormalize | Shifts longitudes, if need be, into a continuous range of 360 degrees. | |
GeoNormalizeFromLongitude | Normalizes longitudes into a continuous range containing the longitude. This method is obsolete. | |
GetSubcurve | Extracts a portion of this curve into a new curve. | |
IsClosed | Indicates if 'from' and 'to' points (of each part) are identical. | |
IsEmpty | Indicates whether this geometry contains any points. | |
Length | The length of the curve. | |
Project | Projects this geometry into a new spatial reference. | |
PutCoordsEx | Sets this segment's endpoints to 'from' and 'to'. | |
QueryEnvelope | Copies this geometry's envelope properties into the specified envelope. | |
QueryFromPoint | Copies this curve's 'from' point to the input point. | |
QueryNormal | Constructs a line normal to a curve from a point at a specified distance along the curve. | |
QueryPoint | Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve. | |
QueryPointAndDistance | Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items. | |
QueryTangent | Constructs a line tangent to a curve from a point at a specified distance along the curve. | |
QueryToPoint | Copies the curve's 'to' point into the input point. | |
ReverseOrientation | Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc). | |
SetEmpty | Removes all points from this geometry. | |
SnapToSpatialReference | Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. | |
SpatialReference | The spatial reference associated with this geometry. | |
ToPoint | The 'to' point of the curve. |
ICurve2.PutCoordsEx Method
Sets this segment's endpoints to 'from' and 'to'.
Public Sub PutCoordsEx ( _
ByVal from As IPoint, _
ByVal to As IPoint _
)
public void PutCoordsEx (
IPoint from,
IPoint to
);
Description
PutCoordsEx allows both the fromPoint and the toPoint to be set simultaneously.A Conformal Transformation based on the original points and the new pointsis applied to the curve.
//This example demonstrates how to use the PutCoordsEx method
static void PutCoordsEx_Example()
{
//Create a new CircularArc
IPoint fromPoint = new PointClass();
fromPoint.PutCoords(0, 0);
IPoint centerPoint = new PointClass();
centerPoint.PutCoords(5, 0);
IPoint toPoint = new PointClass();
toPoint.PutCoords(10, 0);
ICircularArc circularArc = new CircularArcClass();
circularArc.PutCoords(centerPoint, fromPoint, toPoint, esriArcOrientation.esriArcClockwise);
ICurve2 curve = circularArc as ICurve2;
//Create new points
IPoint newFromPoint = new PointClass();
newFromPoint.PutCoords(-5, 0);
IPoint newToPoint = new PointClass();
newToPoint.PutCoords(15, 10);
//Use the new points to modify the end points
//of the CircularArc. The method will perform a conformal
//transformation on the curves to adjust the end points
String report = "Curves before PutCoordsEx \n";
report = report + printCircularArcProperties(curve as ICircularArc);
curve.PutCoordsEx(newFromPoint, newToPoint);
report = report + "Curves after PutCoordsEx \n";
report = report + printCircularArcProperties(curve as ICircularArc);
System.Windows.Forms.MessageBox.Show(report);
}
static String printCircularArcProperties(ICircularArc circularArc)
{
String report = "Radius : " + circularArc.Radius + "\n" +
"Chord Height : " + circularArc.ChordHeight + "\n" +
"Central Angle (Rad) : " + circularArc.CentralAngle + "\n" +
"From Angle (Rad) : " + circularArc.FromAngle + "\n" +
"To Angle (Rad) : " + circularArc.ToAngle + "\n" +
"Center Point : " + circularArc.CenterPoint.X + " , " + circularArc.CenterPoint.Y;
return report;
}
'This example demonstrates how to use the PutCoordsEx method
Sub PutCoordsEx_Example()
Dim pCarc As ICircularArc, pCurve As ICurve2
Dim ptc As IPoint, pfr As IPoint, pto As IPoint
Dim pNewFr As IPoint, pNewTo As IPoint
'Create a new CircularArc
pCarc = New CircularArc
ptc = New Point
ptc.PutCoords(5, 0)
pfr = New Point
pfr.PutCoords(0, 0)
pto = New Point
pto.PutCoords(10, 0)
pCarc.PutCoords(ptc, pfr, pto, esriArcOrientation.esriArcClockwise)
pCurve = pCarc 'QI
'Create new points
pNewFr = New Point
pNewFr.PutCoords(-5, 0)
pNewTo = New Point
pNewTo.PutCoords(15, 10)
'Use the new points to modify the end points
'of the CircularArc. The method will perform a conformal
'transformation on the curves to adjust the end points
Debug.Print("*** Curves before PutCoordsEx ***")
printCArcProp(pCurve)
pCurve.PutCoordsEx(pNewFr, pNewTo)
Debug.Print("*** Curves after PutCoordsEx ***")
printCArcProp(pCurve)
End Sub
Sub printCArcProp(ByVal pCarc As ICircularArc)
Debug.Print("Radius : " & pCarc.Radius)
Debug.Print("Chord Height : " & pCarc.ChordHeight)
Debug.Print("Central Angle (Rad) : " & pCarc.CentralAngle)
Debug.Print("From Angle (Rad) : " & pCarc.FromAngle)
Debug.Print("To Angle (Rad) : " & pCarc.ToAngle)
Debug.Print("Center Point : " & pCarc.CenterPoint.X & " , " & pCarc.CenterPoint.Y)
End Sub
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 ICurve2
Classes | Description |
---|---|
BezierCurve | A cubic Bezier curve defined between two points; optionally has measure, height and ID attributes at each endpoint. |
CircularArc | A portion of a circle that connects two points optionally has measure, height and ID attributes at each endpoint. |
EllipticArc | A portion of the boundary of a 2D ellipse that connects two points; optionally has measure, height and ID attributes at each endpoint. |
Line | A 2D straight line between a pair of 2D endpoints; can optionally have height, measure and ID attributes at each endpoint. |
Polyline | An ordered collection of paths; optionally has measure, height and ID attributes. |