DGKC Control Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > API Reference > General Geometry > Curves > 2D > ILine2d_DG Go to ActiveX docs Search Documentation


ILine2d_DG Interface

ILine2d_DG represents a 2D line/ray/axis defined by its origin point and a direction

A standalone 2D line can be constructed with a IObjectGenerator_DG.Create<ILine2d_DG>() call.

Implements also: ICurve_DG, IObject_DG.

Properties

T2DDg Origin
T2DDg Direction

Methods

Init
Init
DirectTowards
GetPoint
ReverseDirection
GetDistance
GetAngle
GetPointLocation
IsCollinear
Copy
Clone

void Init(T2DDg origin, T2DDg direction)


void Init(T2DDg end0, T2DDg end1)

Raises an exception if end0 and end1 coinside (are closer than gTol(=1e-10)


bool DirectTowards(T2DDg target)

Returns false if target coinsides with the origin or this has invalid (zero length) direction


T2DDg GetPoint(double u)

Parameter u is the distance from the origin


void ReverseDirection()


double GetDistance(T2DDg point, out T2DDg pointNearestOnThis, out double paramOnThis)


double GetAngle(ILine2d_DG line)

Returns angle between directions of the two lines


PointVs2dLineLocation_DG GetPointLocation(T2DDg point, double tolerance)

Identifies relative position of the point.


bool IsCollinear(ILine2d_DG line, double tolerance)


void Copy(ILine2d_DG ray)


ILine2d_DG Clone()