This document is archived and information here might be outdated. Recommended version. |
Constructs an arc with one endpoint being p, tangent to s, and connected to s. If atFrom is true, the connection is at s's from point, otherwise at s's to point.
[Visual Basic .NET] Public Sub ConstructTangentAndPoint ( _ ByVal s As ISegment, _ ByVal atFrom As Boolean, _ ByVal p As IPoint _ )
[C#] public void ConstructTangentAndPoint ( ISegment s, bool atFrom, IPoint p );
[C++]
HRESULT ConstructTangentAndPoint(
ISegment* s,
VARIANT_BOOL atFrom,
IPoint* p
);
[C++]
Parameters s
s is a parameter of type ISegment* atFrom
atFrom is a parameter of type bool p
p is a parameter of type IPoint*
Constructs a CircularArc given the Tangent Segment, the desired segment endpoint (the From Point), and the desired To Point. The Center Point of the constructed CircularArc lies on the Normal to the desired segment endpoint on the same side of the extended tangent as the To Point. If the To Point lies on the tangent line from the desired segment endpoint, an IsLine CircularArc is constructed.
private void ConstructTangentAndPoint()
{
IConstructCircularArc constructCircularArc=new CircularArcClass();
ICircularArc circularArc=constructCircularArc as ICircularArc;
IPoint fromPoint1=new PointClass();
fromPoint1.PutCoords(100, 100);
IPoint toPoint1=new PointClass();
toPoint1.PutCoords(50, 50);
ILine line1=new LineClass();
line1.PutCoords(fromPoint1, toPoint1);
IPoint point=new PointClass();
point.PutCoords(100, 75);
constructCircularArc.ConstructTangentAndPoint(line1 as ISegment, false, point);
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);
}
Private Sub ConstructTangentAndPoint()
Dim pConstructCircularArc As ESRI.ArcGIS.Geometry.IConstructCircularArc
Dim pCArc As ESRI.ArcGIS.Geometry.ICircularArc
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
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)
pConstructCircularArc.ConstructTangentAndPoint(pLine1, False, pPoint)
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
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