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


IConstructCircularArc2.ConstructChordDistanceEx Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IConstructCircularArc2.ConstructChordDistanceEx Method

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

[Visual Basic .NET]
Public Sub ConstructChordDistanceEx ( _
    ByVal Center As IPoint, _
    ByVal from As IPoint, _
    ByVal isCCW As Boolean, _
    ByVal chordDistance As Double, _
    ByVal IsMinor As Boolean _
)
[C#]
public void ConstructChordDistanceEx (
    IPoint Center,
    IPoint from,
    bool isCCW,
    double chordDistance,
    bool IsMinor
);
[C++]
HRESULT ConstructChordDistanceEx(
  IPoint* Center,
  IPoint* from,
  VARIANT_BOOL isCCW,
  double chordDistance,
  VARIANT_BOOL IsMinor
);
[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 VARIANT_BOOL chordDistance chordDistance is a parameter of type double IsMinor IsMinor is a parameter of type VARIANT_BOOL

Product Availability

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

Remarks

Please see the ConstructChordDistance method for more details.

-isCCW stands for "is counter clockwise"

-If IsMinor is true the central angle of the output Arc will be smaller or equal than PI (Approx. 3.14 Rad)

[C#]

        private void ConstructChordDistanceEx()
        {
            IConstructCircularArc2 constructCircularArc=new CircularArcClass();
            ICircularArc circularArc=constructCircularArc as ICircularArc;

            IPoint fromPoint=new PointClass();
            fromPoint.PutCoords(100, 100);
            IPoint toPoint=new PointClass();
            toPoint.PutCoords(50, 50);
            constructCircularArc.ConstructChordDistanceEx(fromPoint, toPoint, true, 100, true);

            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 ConstructChordDistanceEx()
        Dim pConstructCircularArc As ESRI.ArcGIS.Geometry.IConstructCircularArc2
        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.ConstructChordDistanceEx(pCenterPoint, pFromPoint, True, 100, True)

        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

IConstructCircularArc2 Interface