## DGKC Control Documentation

 Home Page > API Reference > General Geometry > Curves > ICurve_DG Go to ActiveX docs Search Documentation

# ICurve_DG Interface

## Properties

RangeDg ParameterRange

## Methods

SetParameterRange
IsFiniteParameterRange
IsClosed
IsPeriodic
GetPeriod
GetPoint
GetPointAtRatio
GetTangent
GetEndPoint
SlideEndPoint
GetNearestPoint
GetLength
GetLengthAt
GetParameterAtLength
GetParameterAtRatio
GetRatioAt
GetIntersection
GetIntersection1
GetPointLocation
Reverse

A generic curve in 3D with a single parameter. This interface represents generic (abstract) functionality so it can not be constracted new using methods of IObjectGenerator_DG. It has to be constructed as a specific type.

Implements also: IGeometricObject_DG, IObject_DG.

void SetParameterRange(double min, double max)

bool IsFiniteParameterRange()

Returns true if length of the range returned by GetParameterRange is not greater than 1.0e+90. The return is false for a straight line, for an example.

bool IsClosed()

bool IsPeriodic()

Returns true if GetPoint(u) is same as GetPoint(u+T) for all u, where T = GetPeriod();

double GetPeriod()

Returns period for periodic curves or 1.0e+307 otherwise

PointDg GetPoint(double u)

PointDg GetPointAtRatio(double ratio)

A shortcut for GetPoint(GetParameterAtRatio(ratio)).

VectDg GetTangent(double u)

PointDg GetEndPoint(int end)

bool SlideEndPoint(int end, PointDg point)

Assuming that point lies on the curve, modifies parameter range so that the point becomes an end of the curve.

double GetNearestPoint(PointDg point, out PointDg pointNearest)

Returns parameter of the point on this curve nearest to point.
Distance between point and pointNearest is the distance of point to this curve.
This method is often used for obtaining parameter of a 3D point lying on the curve.

double GetLength()

double GetLengthAt(double u)

double GetParameterAtLength(double length)

double GetParameterAtRatio(double ratio)

double GetRatioAt(double u)

int GetIntersection(ICurve_DG curve, double tolerance, IArrayDouble_DG paramsThis, IArrayDouble_DG paramsCurve, out bool haveTangentialIntersection)

A simplified version of the generic GetIntersection1() method below. Returns an array of non-tangential intersections of the curves. Returns number of intersections, which coinsides with the sizes of both paramsThis and paramsCurve.

The paramsThis and paramsCurve arrays are synchronised: i-th element in each is the parameter value related to i-th intersection point.

haveTangentialIntersection indicates whether the curves have tangential intersection points, where tangents are collinear. If the returned haveTangentialIntersection is true, the GetIntersection1() method below can be used to obtain the full intersection.

bool GetIntersection1(ICurve_DG curve, double tolerance, ISetR1_DG paramsThis, ISetR1_DG paramsCurve, IArrayBool_DG flagsTangential)

Intersection of two 2D curves. Returns false if the intersection is empty.

The paramsThis, paramsCurve and flagsTangential are synchronised: i-th range in each, are the parameter values related to i-th intersection.

Isolated intersection points are returned as singleton (min = max) ranges.

flagsTangential[i] is true if the intersection is tangential (tangents are collinear) on the i-th range. flagsTangential can be false only for isolated intersection points.

PointVsCurveLocation_DG GetPointLocation(PointDg point, double tolerance)

Classifies location of a point relative to this curve.

void Reverse()

Reverses the curve. The last end becomes the first