ArcObjects Library Reference (Geometry)  

IConstructCircularArc.ConstructThreePoints Method

Constructs an arc from three points. useExistingCenter can be set to true in order to help create a reasonable arc when from and to are identical.

[Visual Basic .NET]
Public Sub ConstructThreePoints ( _
    ByVal from As IPoint, _
    ByVal middle As IPoint, _
    ByVal to As IPoint, _
    ByVal useExistingCenter As Boolean _
)
[C#]
public void ConstructThreePoints (
    IPoint from,
    IPoint middle,
    IPoint to,
    bool useExistingCenter
);
[C++]
HRESULT ConstructThreePoints(
  IPoint* from,
  IPoint* middle,
  IPoint* to,
  VARIANT_BOOL useExistingCenter
);
[C++]

Parameters

from

  from is a parameter of type IPoint

middle

  middle is a parameter of type IPoint

to

  to is a parameter of type IPoint

useExistingCenter   useExistingCenter is a parameter of type VARIANT_BOOL

Product Availability

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

Description

Given a From Point, a Thru Point, and a To Point, the unique CircularArc defined by those points is constructed.  The From and To Points become the From and To Points of the CircularArc.  The Thru Point is a point that lies somewhere on the CircularArc.  For every three points, a single well-defined CircularArc can be created.  (The only exception is if all three points are colinear and the Thru Point is not between the From and To Points.)

Remarks

ConstructThreePoints is excellent for creating a CircularArc with exact endpoint coordinates.

 

The from and to points may be identical, in which case the third point, if it is distinct, will be on the circle and diametrically opposed to the from/to point (orientation will be clockwise).

 

CircularArc ConstructThreePoints Example

[C#]
public  ICircularArc CreateCArcThreePoint(IPoint fromPoint, IPoint thruPoint,IPoint toPoint)
{ 
   ICircularArc circularArcThreePoint = new CircularArcClass();
   IConstructCircularArc construtionCircularArc = circularArcThreePoint as IConstructCircularArc;
   construtionCircularArc.ConstructThreePoints(fromPoint, thruPoint, toPoint, true);
   return circularArcThreePoint;
}
[Visual Basic .NET]

Public Function CreateCArcThreePoint(ByVal FromPoint As ESRI.ArcGIS.Geometry.IPoint, ByVal ThruPoint As ESRI.ArcGIS.Geometry.IPoint, ByVal ToPoint As ESRI.ArcGIS.Geometry.IPoint) As ESRI.ArcGIS.Geometry.ICircularArc
   Dim ConstCArc As ESRI.ArcGIS.Geometry.IConstructCircularArc
   CreateCArcThreePoint = New ESRI.ArcGIS.Geometry.CircularArc
   ConstCArc = CreateCArcThreePoint
   ConstCArc.ConstructThreePoints(FromPoint, ThruPoint, ToPoint, True)
End Function

See Also

IConstructCircularArc Interface | IConstructCircularArc.ConstructEndPointsArc Method | IConstructCircularArc.ConstructEndPointsAngle Method | IConstructCircularArc.ConstructEndPointsTangent Method | IConstructCircularArc.ConstructEndPointsChordHeight Method | IConstructCircularArc.ConstructEndPointsRadius Method

.NET Samples

Curve conversion add-in (Code Files: CurveConversionDockWin) |

.NET Related Topics

How to create a multipoint using the ConstructIntersectionEx method | How to use some basic properties and methods on ICircularArc |