SpatialReference sr = SpatialReferences.WGS84;
List<Coordinate2D> coords = new List<Coordinate2D>()
{
new Coordinate2D(-111, 72),
new Coordinate2D(-108, 68),
new Coordinate2D(-114, 68)
};
Polyline polyline = PolylineBuilderEx.CreatePolyline(coords, sr);
Polyline subCurve = GeometryEngine.Instance.GetSubCurve(polyline, 0, 5, AsRatioOrLength.AsLength);
// subCurve.PartCount = 1
// subCurve.PointCount = 2
ReadOnlyPointCollection points = subCurve.Points;
// points[0] = -111, 72
// points[1] = -108, 68
subCurve = GeometryEngine.Instance.GetSubCurve(polyline, 0, 0.5, AsRatioOrLength.AsRatio);
// subCurve.PointCount = 3
points = subCurve.Points;
// points[0] = -111, 72
// points[1] = -108, 68
// points[2] = -108.5, 68
List<Coordinate3D> coords3D = new List<Coordinate3D>()
{
new Coordinate3D(0, 0, 0),
new Coordinate3D(0, 1, 1),
new Coordinate3D(1, 1, 2),
new Coordinate3D(1, 0, 3)
};
Polygon polygon = PolygonBuilderEx.CreatePolygon(coords3D, sr);
subCurve = GeometryEngine.Instance.GetSubCurve3D(polygon, 0, 1, AsRatioOrLength.AsLength);
// subCurve.HasZ = true
points = subCurve.Points;
// points.Count = 2
// points[0] = 0, 0, 0
// points[1] = 0, 0.70710678118654746, 0.70710678118654746