This document is archived and information here might be outdated.  Recommended version.


ICurve3D.GetSubcurve3D Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

ICurve3D.GetSubcurve3D Method

Extracts a portion of this curve into a new curve.

[Visual Basic .NET]
Public Sub GetSubcurve3D ( _
    ByVal fromDistance As Double, _
    ByVal toDistance As Double, _
    ByVal bAsRatio As Boolean, _
    ByRef ppOutSubCurve As ICurve3D _
)
[C#]
public void GetSubcurve3D (
    double fromDistance,
    double toDistance,
    bool bAsRatio,
    ref ICurve3D ppOutSubCurve
);
[C++]
HRESULT GetSubcurve3D(
  double fromDistance,
  double toDistance,
  VARIANT_BOOL bAsRatio,
  ICurve3D** ppOutSubCurve
);
[C++]

Parameters fromDistance fromDistance is a parameter of type double toDistance toDistance is a parameter of type double bAsRatio bAsRatio is a parameter of type VARIANT_BOOL ppOutSubCurve [out]
ppOutSubCurve is a parameter of type ICurve3D

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Gets the subcurve between the specified points along the original curve and creates a new curve. The elements in the new subcurve are the same type and have the same properties as the elements of the original curve.

[C#]

 

        public static void GetSubcurve3D()

        {

               const double FromDistance=0.27;

               const double ToDistance=0.823;

 

               IGeometry polygonGeometry = GetPolygonGeometry();

 

               IPointCollection pointCollection = 
                      polygonGeometry
as IPointCollection;

           

               IPoint firstPoint=pointCollection.get_Point(0);

 

               ICurve3D curve3D=polygonGeometry as ICurve3D;

 

               ICurve3D subcurve3D;

 

               curve3D.GetSubcurve3D(
                      FromDistance, ToDistance, true, out subcurve3D
               );

        }

See Also

ICurve3D Interface