This document is archived and information here might be outdated. Recommended version. |
Constructs the angle between the infinite line containing the input line segment and the positive x-axis.
[Visual Basic .NET] Public Function ConstructLine ( _ ByVal inLine As ILine _ ) As Double
[C#] public double ConstructLine ( ILine inLine );
[C++]
HRESULT ConstructLine(
ILine* inLine
);
[C++] Parameters inLine
inLine is a parameter of type ILine*
ConstructLine returns the Angle defined by a given Line input. This is the same Angle returned by the ILine::Angle method. The Angle is displacement of the Line from a baseline through the From Point extending in the positive X direction. The returned angle is the smaller angle with measure between -Pi and Pi.
Private Shared Sub constructLine()
Dim pPtFrom As IPoint
Dim pPtTo As IPoint
pPtFrom = New Point
pPtTo = New Point
Dim pLine As ILine
pLine = New Line
pPtFrom.PutCoords(0, 0)
pPtTo.PutCoords(1, 1)
pLine.PutCoords(pPtFrom, pPtTo)
Dim pCAngle As IConstructAngle
Dim pGEnv As GeometryEnvironment
pGEnv = New GeometryEnvironment
pCAngle = pGEnv
Dim dAngle As Double
dAngle = pCAngle.ConstructLine(pLine)
MsgBox("The angle from the x-axis to the line is " & dAngle)
End Sub
IConstructAngle Interface | IConstructAngle.ConstructThreePoint Method | IConstructAngle.ConstructLine Method