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


IConstructCircularArc.ConstructChordDistance Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IC > IConstructCircularArc Interface > IConstructCircularArc.ConstructChordDistance Method
ArcGIS Developer Help

IConstructCircularArc.ConstructChordDistance Method

Constructs an arc from a center point, a starting point, and a chord length.

[Visual Basic .NET]
Public Sub ConstructChordDistance ( _
    ByVal Center As IPoint, _
    ByVal from As IPoint, _
    ByVal isCCW As Boolean, _
    ByVal chordDistance As Double _
)
[C#]
public void ConstructChordDistance (
    IPoint Center,
    IPoint from,
    bool isCCW,
    double chordDistance
);
[C++]
HRESULT ConstructChordDistance(
  IPoint* Center,
  IPoint* from,
  VARIANT_BOOL isCCW,
  double chordDistance
);
[C++]
Parameters
Center 

Center is a parameter of type IPoint* from
from is a parameter of type IPoint* isCCW
isCCW is a parameter of type bool chordDistance
chordDistance is a parameter of type double

Product Availability

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

Description

Constructs a CircularArc given the Center PointFrom Point, the desired orientation, and the desired Chord Length.  The Chord Distance must be less than 2 * the Radius (the distance between the From Point and the Center Point), otherwise an error is returned.  Only IsMinor CircularArcs can be constructed.

Remarks

-isCCW stands for "is counter clockwise"

Note : To construct a major CircularArc using the same paramaters use the IConstructCircularcArc2::ConstructChordDistanceEx method with the IsMinor parameter equal to false.

ConstructCircularArc ChordDistance Example

[C#]

        private void ConstructChordDistance()
        {
            IConstructCircularArc constructCircularArc = new CircularArcClass();
            ICircularArc circularArc = constructCircularArc as ICircularArc;
            IPoint fromPoint = new PointClass();
            IPoint toPoint = new PointClass();
            fromPoint.PutCoords(100, 100);
            toPoint.PutCoords(50, 50); constructCircularArc.ConstructChordDistance(fromPoint, toPoint, true, 100); String report = "Length : " + circularArc.Length + "\n" +
                          "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 + "\n" +
                          "From Point : " + circularArc.FromPoint.X + " , " + circularArc.FromPoint.Y + "\n" +
                          "To Point : " + circularArc.ToPoint.X + " , " + circularArc.ToPoint.Y;
            System.Windows.Forms.MessageBox.Show(report);
        }

[Visual Basic .NET]

    Private Sub ConstructChordDistance()
        Dim pConstructCircularArc As ESRI.ArcGIS.Geometry.IConstructCircularArc
        Dim pCArc As ESRI.ArcGIS.Geometry.ICircularArc
        Dim pCenterPoint As ESRI.ArcGIS.Geometry.IPoint
        Dim pFromPoint As ESRI.ArcGIS.Geometry.IPoint

        pConstructCircularArc = New ESRI.ArcGIS.Geometry.CircularArc
        pCArc = pConstructCircularArc
        pFromPoint = New ESRI.ArcGIS.Geometry.Point
        pCenterPoint = New ESRI.ArcGIS.Geometry.Point
        pFromPoint.PutCoords(100, 100)
        pCenterPoint.PutCoords(50, 50)
        pConstructCircularArc.ConstructChordDistance(pCenterPoint, pFromPoint, True, 100)

        Debug.Print("Length : " & pCArc.Length)
        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)
        Debug.Print("From Point : " & pCArc.FromPoint.X & " , " & pCArc.FromPoint.Y)
        Debug.Print("To Point : " & pCArc.ToPoint.X & " , " & pCArc.ToPoint.Y)
    End Sub

See Also

IConstructCircularArc Interface | IConstructCircularArc.ConstructTangentDistance Method | IConstructCircularArc.ConstructArcDistance Method | IConstructCircularArc.ConstructChordDistance Method