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

IConstructPoint.ConstructDeflection Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IC > IConstructPoint Interface > IConstructPoint.ConstructDeflection Method
ArcGIS Developer Help

IConstructPoint.ConstructDeflection Method

Constructs a point in the polar coordinate system defined by baseLine and its 'from' point. The angle is in radians.

[Visual Basic .NET]
Public Sub ConstructDeflection ( _
    ByVal baseLine As ILine, _
    ByVal distance As Double, _
    ByVal inAngle As Double _
public void ConstructDeflection (
    ILine baseLine,
    double distance,
    double inAngle
HRESULT ConstructDeflection(
  ILine* baseLine,
  double distance,
  double inAngle

baseLine is a parameter of type ILine* distance
distance is a parameter of type double inAngle
inAngle is a parameter of type double

Product Availability

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


The ConstructDeflection method, given a line (baseline), creates a new point at a distance (distance) and at an angle (inAngle).


The point is constructed from the baseline start point using the deflection angle (the angle from the baseline to the point) and the distance. The deflection angle is given in radians the distance in map units. When distance is > 0, a positive value for angle rotates the constructed point counter-clockwise about the start point of baseline, and a negative value for angle rotates it the other way. Vice versa when distance is < 0.
ConstructDeflection Example

//Constructs a point from the baseline from (0,0) to (1,1)
// with the deflection angle of 45 degrees (PI/4 radians).

public void ConstructDeflection()
    IPoint fromPoint = new PointClass();
    fromPoint.PutCoords(0, 0);
    IPoint toPoint = new PointClass();
    toPoint.PutCoords(1, 1);
    ILine line = new LineClass();
    line.PutCoords(fromPoint, toPoint);
    double distance = 1.4142135623731;
    double angle = Math.PI / 4;
    IConstructPoint constructionPoint = new PointClass();
    constructionPoint.ConstructDeflection(line, distance, angle);
    IPoint point = constructionPoint as IPoint;
    System.Windows.Forms.MessageBox.Show("x,y = " + point.X + ", " + point.Y);

[Visual Basic .NET]

    '+++ Constructs a point from the baseline from (0,0) to (1,1)
    '+++ with the deflection angle of 45 degrees (PI/4 radians).
    Public Sub t_ConstructDeflection()
        On Error GoTo Errorhandler
        Dim pPointFrom As IPoint
        Dim pPointTo As IPoint
        Dim pLine As ILine
        Dim pPoint As IPoint
        Dim pCPoint As IConstructPoint
        Dim dDist As Double
        Dim dAngle As Double
        Dim pi As Double

        pPointFrom = New Point
        pPointTo = New Point
        pCPoint = New Point
        pPoint = New Point
        pLine = New Line

        pPointFrom.PutCoords(0, 0)
        pPointTo.PutCoords(1, 1)
        pLine.PutCoords(pPointFrom, pPointTo)

        dDist = 1.4142135623731
        pi = 4 * Math.Atan(1)
        dAngle = pi / 4
        pCPoint.ConstructDeflection(pLine, dDist, dAngle)
        pPoint = pCPoint
        MsgBox("x,y = " & pPoint.X & "," & pPoint.Y)
        Exit Sub

        MsgBox(Err.Number & "..." & Err.Description)
        Exit Sub
    End Sub

See Also

IConstructPoint Interface