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


IConstructCircularArc.ConstructTangentAngleTangent 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.ConstructTangentAngleTangent Method
ArcGIS Developer Help

IConstructCircularArc.ConstructTangentAngleTangent Method

Constructs an arc with a common tangent to the input segment, a given central angle and a tangent length.

[Visual Basic .NET]
Public Sub ConstructTangentAngleTangent ( _
    ByVal Segment As ISegment, _
    ByVal atStart As Boolean, _
    ByVal isCCW As Boolean, _
    ByVal CentralAngle As Double, _
    ByVal tangentDistance As Double _
)
[C#]
public void ConstructTangentAngleTangent (
    ISegment Segment,
    bool atStart,
    bool isCCW,
    double CentralAngle,
    double tangentDistance
);
[C++]
HRESULT ConstructTangentAngleTangent(
  ISegment* Segment,
  VARIANT_BOOL atStart,
  VARIANT_BOOL isCCW,
  double CentralAngle,
  double tangentDistance
);
[C++]
Parameters
Segment 

Segment is a parameter of type ISegment* atStart
atStart is a parameter of type bool isCCW
isCCW is a parameter of type bool CentralAngle
CentralAngle is a parameter of type double tangentDistance
tangentDistance is a parameter of type double

Product Availability

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

Description

Constructs a CircularArc given the Tangent Segment, the desired segment endpoint (the From Point), the desired orientation, the desired Central Angle, and the desired Tangent Distance.  The Central Angle is measured in radians.  If the Central Angle is greater than or equal to Pi (half CircularArc), an empty CircularArc is constructed.

Remarks

-isCCW stands for "is counter clockwise"

ConstructCircularArc Tangent Segment Example

ConstructCircularArc Tangent Distance Example

[C#]
private void ConstructTangentAngleTangent()
{
  IConstructCircularArc constructCircularArc = new CircularArcClass();
  ICircularArc circularArc = constructCircularArc as ICircularArc;
  
  IPoint fromPoint = new PointClass();
  fromPoint.PutCoords(100, 100);
  IPoint toPoint = new PointClass();
  toPoint.PutCoords(100, 400);
  ILine line = new LineClass();
  line.PutCoords(fromPoint, toPoint);
  //The angles should be in Radians (Radians = Degrees * PI/180)
  constructCircularArc.ConstructTangentAngleTangent(line as ISegment, false, true, Math.PI / 2, 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 ConstructTangentAngleTangent()
        Dim pConstructCircularArc As ESRI.ArcGIS.Geometry.IConstructCircularArc
        Dim pCArc As ESRI.ArcGIS.Geometry.ICircularArc
        Dim Pi As Double
        Dim pToPoint As ESRI.ArcGIS.Geometry.IPoint
        Dim pFromPoint As ESRI.ArcGIS.Geometry.IPoint
        Dim pPoint As ESRI.ArcGIS.Geometry.IPoint
        Dim pLine1 As ESRI.ArcGIS.Geometry.ILine

        pConstructCircularArc = New ESRI.ArcGIS.Geometry.CircularArc
        pCArc = pConstructCircularArc
        Pi = 4 * Math.Atan(1) 'Calculate the value of pi.
        pFromPoint = New ESRI.ArcGIS.Geometry.Point
        pToPoint = New ESRI.ArcGIS.Geometry.Point
        pLine1 = New ESRI.ArcGIS.Geometry.Line
        pFromPoint.PutCoords(100, 100)
        pToPoint.PutCoords(100, 400)
        pLine1.PutCoords(pFromPoint, pToPoint)
        pPoint = New ESRI.ArcGIS.Geometry.Point
        pPoint.PutCoords(200, 400)
        'The angles should be in Radians (Radians = Degrees * PI/180)
        pConstructCircularArc.ConstructTangentAngleTangent(pLine1, False, True, Pi / 2, 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.ConstructTangentAngleTangent Method | IConstructCircularArc.ConstructTangentAngleChord Method | IConstructCircularArc.ConstructTangentArcTangent Method | IConstructCircularArc.ConstructTangentAngleArc Method | IConstructCircularArc.ConstructTangentChordTangent Method | IConstructCircularArc.ConstructTangentRadiusAngle Method | IConstructCircularArc.ConstructTangentRadiusArc Method | IConstructCircularArc.ConstructTangentAndPoint Method | IConstructCircularArc.ConstructTangentRadiusChord Method | IConstructCircularArc.ConstructTangentRadiusTangent Method | IConstructCircularArc.ConstructTangentChordArc Method