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


IBezierCurve.QueryChordLengthTangentAtFrom Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

IBezierCurve.QueryChordLengthTangentAtFrom Method

Returns tangent vector at 'from' point, based on chord length parametrization; and whether it has been set by user or by smoothing process.

[Visual Basic .NET]
Public Sub QueryChordLengthTangentAtFrom ( _
    ByVal tangent As IPoint, _
    ByRef setByUser As Boolean _
)
[C#]
public void QueryChordLengthTangentAtFrom (
    IPoint tangent,
    ref bool setByUser
);
[C++]
HRESULT QueryChordLengthTangentAtFrom(
  IPoint* tangent,
  VARIANT_BOOL* setByUser
);
[C++]

Parameters tangent
tangent is a parameter of type IPoint setByUser [in, out] setByUser is a parameter of type VARIANT_BOOL

Product Availability

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

Description

Returns the ChordLength Tangent at the From Point of the BezierCurve along with a flag indicating whether this ChordLength Tangent was set by the user or defined from Control Points.  The ChordLength Tangent is not the same as the internal Control Points or the Tangent at the From Point although both lie on the same line. The coordinates of the returned point are in reality a Dx and Dy which can be added to the From point in order to get the tangent.

[C#]     private void QueryChordLengthTangentAtFrom()
    {
        //Control points
        IPoint[] controlPoints=new IPoint[4];
        //Bezier FromPoint / From Tangent FromPoint
        controlPoints[0]=new ESRI.ArcGIS.Geometry.Point();
        //From Tangent ToPoint
        controlPoints[1]=new ESRI.ArcGIS.Geometry.Point();
        //To Tangent FromPoint
        controlPoints[2]=new ESRI.ArcGIS.Geometry.Point();
        //Bezier To Point / To Tangent ToPoint
        controlPoints[3]=new ESRI.ArcGIS.Geometry.Point();
        //Define the Bezier Control Points.  This is a simple S-Curve.
        controlPoints[0].PutCoords(100, 100);
        controlPoints[1].PutCoords(150, 200);
        controlPoints[2].PutCoords(250, 0);
        controlPoints[3].PutCoords(400, 100);
        IBezierCurveGEN bezierCurve=new BezierCurve();
        bezierCurve.PutCoords(ref controlPoints);
        //QueryChordLengthTangentAtFrom
        IPoint tangentPoint=new ESRI.ArcGIS.Geometry.Point();
        bool isUserSet=false;
        bezierCurve.QueryChordLengthTangentAtFrom(tangentPoint, ref isUserSet);
        //Report
        String report="QueryChordLengthTangentAtFrom \n" +
                        "Point At From : " + tangentPoint.X + " , " + tangentPoint.Y + "\n" +
                        "Set by the user : " + isUserSet;
        System.Windows.Forms.MessageBox.Show(report);
    }

See Also

IBezierCurve Interface