Interface IConstructLine

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

Provides access to members that construct a line segment using other geometries and measures.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("199120B6-C677-11D0-8307-0000F8034032")]
public interface IConstructLine

Methods

ConstructAngleBisector(IPoint, IPoint, IPoint, double, bool)

Constructs a line segment being the bisector through the angle defined by the three input points.

void ConstructAngleBisector(IPoint from, IPoint through, IPoint to, double Length, bool useAcuteAngle)

Parameters

from IPoint
through IPoint
to IPoint
Length double
useAcuteAngle bool

Remarks

 

ConstructLine ConstructAngleBisector Example

[C#]

// This example constructs a new line using the ConstructAngleBisector method.
// Note the usage of the acute angle.
public void ConstructLineFromAngleBisector()
{
    IPoint fromPoint = new PointClass();
    fromPoint.PutCoords(1, 0);
    IPoint throughPoint = new PointClass();
    throughPoint.PutCoords(1, 1);
    IPoint toPoint = new PointClass();
    toPoint.PutCoords(0, 1);








    IConstructLine constructLine = new LineClass();

    double distance = 1.4142135623731;
    constructLine.ConstructAngleBisector(fromPoint, throughPoint, toPoint, distance, false);
    ILine line = constructLine as ILine;

    printProperties(line);
    // Now use the the acute angle with the same data.
    //Gives same results as setting dDist to -1.4142135623731 and not using
    // the acute angle.
    constructLine.ConstructAngleBisector(fromPoint, throughPoint, toPoint, distance, true);
    ILine line2 = constructLine as ILine;
    printProperties(line2);
}
private void printProperties(ILine line)
{
    IPoint outFromPoint = new PointClass();
    IPoint outToPoint = new PointClass();
    line.QueryCoords(outFromPoint, outToPoint);
    System.Windows.Forms.MessageBox.Show(outFromPoint.X + " , " +
                                   outFromPoint.Y + " , " +
                                   outToPoint.X + " , " +
                                   outToPoint.Y + "\n" +
                                   "angle = " + line.Angle);
}

















[Visual Basic .NET]

    '+++ This example constructs a new line using the ConstructAngleBisector method.
    '+++ Note the usage of the acute angle.

    Public Sub t_Line_ConstructAngleBisector()
        On Error GoTo Errorhandler
        Dim pPointFrom As IPoint
        Dim pPointTo As IPoint
        Dim pPointThrough As IPoint
        Dim pLine As ILine
        Dim pCLine As IConstructLine
        Dim dDist As Double
        Dim pP1 As IPoint
        Dim pP2 As IPoint








        pPointFrom = New Point
        pPointTo = New Point
        pPointThrough = New Point
        pLine = New Line
        pCLine = New Line
        pP1 = New Point
        pP2 = New Point





        pPointFrom.PutCoords(1, 0)
        pPointTo.PutCoords(0, 1)
        pPointThrough.PutCoords(1, 1)
        dDist = 1.4142135623731


        pCLine.ConstructAngleBisector(pPointFrom, pPointThrough, pPointTo, dDist, False)
        pLine = pCLine
        pLine.QueryCoords(pP1, pP2)
        MsgBox(pP1.X & "," & pP1.Y & " to " & pP2.X & "," & pP2.Y _
        & vbCrLf & "angle = " & pLine.Angle)




        '+++ Now use the the acute angle with the same data.
        '+++ Gives same results as setting dDist to -1.4142135623731 and not using
        '+++ the acute angle.


        pCLine.ConstructAngleBisector(pPointFrom, pPointThrough, pPointTo, dDist, True)
        pLine = pCLine
        pLine.QueryCoords(pP1, pP2)
        MsgBox(pP1.X & "," & pP1.Y & " to " & pP2.X & "," & pP2.Y _
        & vbCrLf & "angle = " & pLine.Angle)



        Exit Sub

Errorhandler:
        MsgBox(Err.Number & "..." & Err.Description)
        Exit Sub

    End Sub

ConstructExtended(ILine, esriSegmentExtension)

Extends a line segment until one or both of its endpoints reaches the boundary of the domain of the line's associated spatial reference.

void ConstructExtended(ILine inLine, esriSegmentExtension extendHow)

Parameters

inLine ILine
extendHow esriSegmentExtension

Remarks

To extend a Line to another Curve, wrap the Line in a Polyline and use IConstructCurve::ConstructExtended.