CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OdGeCurve2d Class Reference

#include <GeCurve2d.h>

Inheritance diagram for OdGeCurve2d:
OdGeEntity2d OdGeCircArc2d OdGeCompositeCurve2d OdGeEllipArc2d OdGeExternalCurve2d OdGeLinearEnt2d OdGeOffsetCurve2d OdGeSplineEnt2d OdGeLine2d OdGeLineSeg2d OdGeRay2d OdGeCubicSplineCurve2d OdGeNurbCurve2d OdGePolyline2d OdGeSegmentChain2d

Public Member Functions

OdGeCurve3dconvertTo3d () const
 
void convertTo3d (OdGeCurve3d &curve3d) const
 
void getInterval (OdGeInterval &interval) const
 
void getInterval (OdGeInterval &interval, OdGePoint2d &start, OdGePoint2d &end) const
 
OdGeCurve2dreverseParam ()
 
OdGeCurve2dsetInterval ()
 
bool setInterval (const OdGeInterval &interval)
 
double distanceTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
double distanceTo (const OdGeCurve2d &otherCur, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGePoint2d &point, double &param, const OdGeInterval *range, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGePoint2d closestPointTo (const OdGeCurve2d &curve2d, OdGePoint2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
void getClosestPointTo (const OdGeCurve2d &curve2d, OdGePointOnCurve2d &pntOnThisCrv, OdGePointOnCurve2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
bool getNormalPoint (const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
 
 TD_USING (OdGeEntity2d::isOn)
 
bool isOn (const OdGePoint2d &point, double &param, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isOn (double param, const OdGeTol &tol=OdGeContext::gTol) const
 
double paramOf (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
double paramOf (const OdGePoint2d &point, const OdGeInterval *range, const OdGeTol &tol) const
 
void getTrimmedOffset (double distance, OdGeCurve2dPtrArray &offsetCurveList, OdGe::OffsetCrvExtType extensionType=OdGe::kFillet, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isClosed (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isPeriodic (double &period) const
 
bool isLinear (OdGeLine2d &line, const OdGeTol &tol=OdGeContext::gTol) const
 
double length (double fromParam, double toParam, double tol=OdGeContext::gTol.equalPoint()) const
 
double length (double tol=OdGeContext::gTol.equalPoint()) const
 
double paramAtLength (double datumParam, double length, bool posParamDir=true, double tol=OdGeContext::gTol.equalPoint()) const
 
bool area (double startParam, double endParam, double &value, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDegenerate (OdGe::EntityId &degenerateType, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isDegenerate (OdGeEntity2d *&pConvertedEntity, const OdGeTol &tol=OdGeContext::gTol) const
 
void getSplitCurves (double param, OdGeCurve2d *&piece1, OdGeCurve2d *&piece2) const
 
bool explode (OdGeCurve2dPtrArray &explodedCurves, OdGeIntArray &newExplodedCurve, const OdGeInterval *interval=NULL) const
 
void getLocalClosestPoints (const OdGePoint2d &point, OdGePointOnCurve2d &approxPnt, const OdGeInterval *nbhd=NULL, const OdGeTol &tol=OdGeContext::gTol) const
 
void getLocalClosestPoints (const OdGeCurve2d &otherCurve, OdGePointOnCurve2d &approxPntOnThisCrv, OdGePointOnCurve2d &approxPntOnOtherCrv, const OdGeInterval *nbhd1=NULL, const OdGeInterval *nbhd2=NULL, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeBoundBlock2d boundBlock () const
 
OdGeBoundBlock2d boundBlock (const OdGeInterval &range) const
 
OdGeBoundBlock2d orthoBoundBlock () const
 
OdGeBoundBlock2d orthoBoundBlock (const OdGeInterval &range) const
 
OdGeExtents2d getGeomExtents (const OdGeInterval &range=OdGeInterval(), const OdGeMatrix2d *coordSystem=NULL) const
 
bool hasStartPoint (OdGePoint2d &startPoint) const
 
bool hasEndPoint (OdGePoint2d &endPoint) const
 
bool hasMidPoint (OdGePoint2d &point, double coef=0.5) const
 
OdGePoint2d midPoint (double coef=0.5) const
 
OdGePoint2d evalPoint (double param) const
 
OdGePoint2d evalPoint (double param, int numDeriv, OdGeVector2dArray &derivatives) const
 
void getSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray &paramArray) const
 
void getSamplePoints (int numSample, OdGePoint2dArray &pointArray) const
 
OdGeCurve2doperator= (const OdGeCurve2d &curve)
 
void getSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
 
void appendSamplePoints (double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
 
void appendSamplePoints (int numSample, OdGePoint2dArray &pointArray) const
 
- Public Member Functions inherited from OdGeEntity2d
 ODRX_HEAP_OPERATORS ()
 
 ~OdGeEntity2d ()
 
bool isKindOf (OdGe::EntityId entType) const
 
OdGe::EntityId type () const
 
OdGeEntity2dcopy () const
 
OdGeEntity2doperator= (const OdGeEntity2d &entity)
 
bool operator== (const OdGeEntity2d &entity) const
 
bool operator!= (const OdGeEntity2d &entity) const
 
bool isEqualTo (const OdGeEntity2d &other, const OdGeTol &tol=OdGeContext::gTol) const
 
OdGeEntity2dtransformBy (const OdGeMatrix2d &xfm)
 
OdGeEntity2dtranslateBy (const OdGeVector2d &translateVec)
 
OdGeEntity2drotateBy (double angle, const OdGePoint2d &basePoint=OdGePoint2d::kOrigin)
 
OdGeEntity2dmirror (const OdGeLine2d &line)
 
OdGeEntity2dscaleBy (double scaleFactor, const OdGePoint2d &basePoint=OdGePoint2d::kOrigin)
 
bool isOn (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 

Static Public Member Functions

static OdGeCurve2drestoreUvCurve (const OdGeCurve3d *curve, const OdGeSurface *surface, const OdGeTol &tol=OdGeContext::gTol)
 

Protected Member Functions

 OdGeCurve2d ()
 
 OdGeCurve2d (const OdGeCurve2d &source)
 
- Protected Member Functions inherited from OdGeEntity2d
 OdGeEntity2d ()
 
 OdGeEntity2d (const OdGeEntity2d &)
 
void connectTo (OdGeEntity2dImpl *)
 

Detailed Description

This class is the base class for all OdGe 2D curves.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

Definition at line 56 of file GeCurve2d.h.

Constructor & Destructor Documentation

◆ OdGeCurve2d() [1/2]

OdGeCurve2d::OdGeCurve2d ( )
protected
Parameters
source[in] Object to be cloned.

◆ OdGeCurve2d() [2/2]

OdGeCurve2d::OdGeCurve2d ( const OdGeCurve2d source)
protected

Member Function Documentation

◆ appendSamplePoints() [1/2]

void OdGeCurve2d::appendSamplePoints ( double  fromParam,
double  toParam,
double  approxEps,
OdGePoint2dArray pointArray,
OdGeDoubleArray pParamArray = NULL 
) const

Appends sample points along this curve and their parameter values to the specified arrays.

Parameters
fromParam[in] Starting parameter value.
toParam[in] Ending parameter value.
approxEps[in] Approximate spacing along a curve.
pointArray[out] Pointer an array of sample points which are appended.
pParamArray[in] Pointer to an array to receive the parameters at each point.
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ appendSamplePoints() [2/2]

void OdGeCurve2d::appendSamplePoints ( int  numSample,
OdGePoint2dArray pointArray 
) const

Appends sample points along this curve and their parameter values to the specified arrays.

Parameters
numSample[in] Number of samples.
pointArray[out] Receives an array of sample points.

◆ area()

bool OdGeCurve2d::area ( double  startParam,
double  endParam,
double &  value,
const OdGeTol tol = OdGeContext::gTol 
) const

Gets the area of the interval of the curve defined by startParam and endParam.

Parameters
startParam[in] Parameter value of interval start.
endParam[in] Parameter value of interval end (must be greater than startParam).
value[out] Output area of curve between startParam and endParam.
tol[in] Geometric tolerance.
Returns
true if the area was successfully calculated with the given tolerance; false otherwise.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ boundBlock() [1/2]

OdGeBoundBlock2d OdGeCurve2d::boundBlock ( ) const

Calculates the oriented bounding box of curve.

Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.
Returns
Bounding box as an OdGeBoundBlock2d entity.

◆ boundBlock() [2/2]

OdGeBoundBlock2d OdGeCurve2d::boundBlock ( const OdGeInterval range) const

Calculates the oriented bounding box of curve.

Parameters
range[in] Sub-interval of this curve to be bounded.
Returns
Bounding box as a OdGeBoundBlock2d entity.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ closestPointTo() [1/3]

OdGePoint2d OdGeCurve2d::closestPointTo ( const OdGeCurve2d curve2d,
OdGePoint2d pntOnOtherCrv,
const OdGeTol tol = OdGeContext::gTol 
) const

Finds the closest point between this curve and the point of an input curve.

Parameters
curve2d[in] Input curve.
pntOnOtherCrv[out] Closest point on the input curve.
tol[in] Geometric tolerance.
Returns
The closest point of this curve.
Remarks
This function is the same as getClosestPointTo(). By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ closestPointTo() [2/3]

OdGePoint2d OdGeCurve2d::closestPointTo ( const OdGePoint2d point,
const OdGeTol tol = OdGeContext::gTol 
) const

Finds the closest point on this curve to the input point.

Parameters
point[in] Input point according to which the closest point on this curve is searched.
tol[in] Geometric tolerance.
Returns
The closest point on this curve.
Remarks
This function is the same as getClosestPointTo().

◆ closestPointTo() [3/3]

OdGePoint2d OdGeCurve2d::closestPointTo ( const OdGePoint2d point,
double &  param,
const OdGeInterval range,
const OdGeTol tol = OdGeContext::gTol 
) const

Finds the closest point on this curve to the input point.

Parameters
point[in] Point to be evaluated.
param[out] uv-coord of closest point.
range[in] Interval on the curve.
tol[in] Geometric tolerance.
Returns
The closest point on this curve.
Remarks
Native interval is not considered. If projection of the point does not lie in range-interval, the closest bound of the interval is returned. In case of uvBox == NULL closestPointTo(point, range, tol) is called where range is a native curves interval. An unbounded interval should not be used here.

◆ convertTo3d() [1/2]

OdGeCurve3d * OdGeCurve2d::convertTo3d ( ) const

Creates a new 3D variant of the curve (z-coordinate equal to zero).

Returns
Pointer to the created 3D variant of the curve (z-coordinate equal to zero).
Remarks
For OdGeOffsetCurve a base curve will be created that should be MANUALLY deleted. See documentation about OdGeOffsetCurve.

◆ convertTo3d() [2/2]

void OdGeCurve2d::convertTo3d ( OdGeCurve3d curve3d) const

Gets a 3D variant of the curve (z-coordinate equal to zero).

Parameters
curve3d[out] Reference to the resulting 3D curve of suitable type.
Remarks
The user of this method should pass a 3D curve to the method that corresponds to the type of 2D curve, otherwise an eNotThatKindOfClass exception will be thrown. Examples of corresponding curve types: OdGeRay2d - OdGeRay3d; OdGeLine2d - OdGeLine3d; OdGeLineSeg2d - OdGeLineSeg3d; OdGeCircArc2d - OdGeCircArc3d; OdGeEllipArc2d - OdGeEllipArc3d; OdGePolyline2d - OdGePolyline3d; OdGeNurbCurve2d - OdGeNurbCurve3d;

◆ distanceTo() [1/2]

double OdGeCurve2d::distanceTo ( const OdGeCurve2d otherCur,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the distance of the closest points between this curve and the input curve.

Parameters
otherCur[in] Input curve.
tol[in] Geometric tolerance.
Returns
Distance value.

◆ distanceTo() [2/2]

double OdGeCurve2d::distanceTo ( const OdGePoint2d point,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the distance between the input point and the closest point on this curve.

Parameters
point[in] Input point.
tol[in] Geometric tolerance.
Returns
Distance value.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ evalPoint() [1/2]

OdGePoint2d OdGeCurve2d::evalPoint ( double  param) const

Returns the point on the curve corresponding to the specified parameter value.

Parameters
param[in] Parameter to be evaluated.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ evalPoint() [2/2]

OdGePoint2d OdGeCurve2d::evalPoint ( double  param,
int  numDeriv,
OdGeVector2dArray derivatives 
) const

Returns the point on the curve corresponding to the specified parameter value and the derviatives at that point.

Parameters
param[in] Parameter to be evaluated.
numDeriv[in] The number of derivatives to be computed (should not be set larger than 2).
derivatives[out] Receives an array of derivatives at the point corresponding to param.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ explode()

bool OdGeCurve2d::explode ( OdGeCurve2dPtrArray explodedCurves,
OdGeIntArray newExplodedCurve,
const OdGeInterval interval = NULL 
) const

Explodes the curve into its component sub-curves.

Parameters
explodedCurves[out] List of curves into which this curve was exploded.
newExplodedCurve[out] Array of flags telling whether the returned curves should be deleted.
interval[in] Interval of curve that is to be exploded.
Returns
true if the curve is exploded (that is, the curve was a composite or a discontinuous spline) and false otherwise.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getClosestPointTo() [1/2]

void OdGeCurve2d::getClosestPointTo ( const OdGeCurve2d curve2d,
OdGePointOnCurve2d pntOnThisCrv,
OdGePointOnCurve2d pntOnOtherCrv,
const OdGeTol tol = OdGeContext::gTol 
) const

Finds the point on this curve which is the closest to the point of an input curve.

Parameters
curve2d[in] Input curve.
pntOnThisCrv[out] Receives the closest point on this curve.
pntOnOtherCrv[in] A point on the other curve.
tol[in] Geometric tolerance.
Returns
The closest point of this curve.
Remarks
This function is the same as getClosestPointTo(). By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getClosestPointTo() [2/2]

void OdGeCurve2d::getClosestPointTo ( const OdGePoint2d point,
OdGePointOnCurve2d pntOnCrv,
const OdGeTol tol = OdGeContext::gTol 
) const

Finds the closest point on this curve to the input point.

Parameters
point[in] Input point.
pntOnCrv[out] Closest point on this curve to the input point.
tol[in] Geometric tolerance.
Returns
The closest point of this curve.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getGeomExtents()

OdGeExtents2d OdGeCurve2d::getGeomExtents ( const OdGeInterval range = OdGeInterval(),
const OdGeMatrix2d coordSystem = NULL 
) const

Returns bounding box of the whole curve or a part of it. The box is axis-aligned in the specified local coordinate system. It is guaranteed to enclose the curve, but not guaranteed to be tight/minimal.

Parameters
range[in] The part of the curve to be bounded.
coordSystem[in] The local coordinate system in which box extents are computed.
Remarks
If the range is unbound (e.g. by default), the bounding box of the whole curve (range can be obtained by the getInterval method) is computed. Otherwise the bounding box is computed only for the set of points with the parameter in the specified range. If coordSystem is NULL (e.g. by default), then bounding box is aligned with global coordinate axes. Otherwise, the box will be axis-aligned in the local coordinate system specified by the coordSystem matrix.

◆ getInterval() [1/2]

void OdGeCurve2d::getInterval ( OdGeInterval interval) const

Gets the parametric interval of the curve.

Parameters
interval[out] Receives the parametric interval of the curve.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getInterval() [2/2]

void OdGeCurve2d::getInterval ( OdGeInterval interval,
OdGePoint2d start,
OdGePoint2d end 
) const

Gets the parametric interval of the curve.

Parameters
interval[out] Receives the parametric interval of the curve.
start[out] Receives the start point of the interval.
end[out] Receives the end point of the interval.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getLocalClosestPoints() [1/2]

void OdGeCurve2d::getLocalClosestPoints ( const OdGeCurve2d otherCurve,
OdGePointOnCurve2d approxPntOnThisCrv,
OdGePointOnCurve2d approxPntOnOtherCrv,
const OdGeInterval nbhd1 = NULL,
const OdGeInterval nbhd2 = NULL,
const OdGeTol tol = OdGeContext::gTol 
) const

Gets local closest points. Searches for the local minimum distance between two curves using the two input points as initial guesses.

Parameters
otherCurve[in] Input 2D curve.
approxPntOnThisCrv[in/out] Input/output point on this curve.
approxPntOnOtherCrv[in/out] Input/output point on input curve.
nbhd1[in] Interval for searching on this curve.
nbhd2[in] Interval for searching on input curve.
tol[in] Geometric tolerance.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getLocalClosestPoints() [2/2]

void OdGeCurve2d::getLocalClosestPoints ( const OdGePoint2d point,
OdGePointOnCurve2d approxPnt,
const OdGeInterval nbhd = NULL,
const OdGeTol tol = OdGeContext::gTol 
) const

Searches for the local minimum distance between this curve and the input point using the input point as an initial guess.

Parameters
point[in] Input 2D point.
approxPnt[in/out] Input/output point on this curve.
nbhd[in] Input interval for searching on this curve.
tol[in] Geometric tolerance.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getNormalPoint()

bool OdGeCurve2d::getNormalPoint ( const OdGePoint2d point,
OdGePointOnCurve2d pntOnCrv,
const OdGeTol tol = OdGeContext::gTol 
) const

Finds the point on the input curve whose normal passes through the input point.

Parameters
point[in] Input point.
pntOnCrv[out] Closest point on this curve whose normal passes through the input point.
tol[in] Geometric tolerance.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getSamplePoints() [1/3]

void OdGeCurve2d::getSamplePoints ( double  fromParam,
double  toParam,
double  approxEps,
OdGePoint2dArray pointArray,
OdGeDoubleArray paramArray 
) const

Returns sample points along this curve and their parameter values in the specified arrays.

Parameters
fromParam[in] Starting parameter value.
toParam[in] Ending parameter value.
approxEps[in] Approximate spacing along the curve.
pointArray[out] Output array of sample points.
paramArray[out] Output array of parameters at each point.

◆ getSamplePoints() [2/3]

void OdGeCurve2d::getSamplePoints ( double  fromParam,
double  toParam,
double  approxEps,
OdGePoint2dArray pointArray,
OdGeDoubleArray pParamArray = NULL 
) const

Gets sample points along this curve and their parameter values to the specified arrays.

Parameters
fromParam[in] Starting parameter value.
toParam[in] Ending parameter value.
approxEps[in] Approximate spacing along a curve.
pointArray[out] Receives an array of sample points.
pParamArray[out] Receives a pointer to an array of parameter values for each point.
Remarks
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ getSamplePoints() [3/3]

void OdGeCurve2d::getSamplePoints ( int  numSample,
OdGePoint2dArray pointArray 
) const

Returns a quantity of sample points along this curve and the points themselves in the specified arrays.

Parameters
numSample[out] Receives a quantity of sample points.
pointArray[out] Receives sample points.

◆ getSplitCurves()

void OdGeCurve2d::getSplitCurves ( double  param,
OdGeCurve2d *&  piece1,
OdGeCurve2d *&  piece2 
) const

Returns two segments that are obtained by splitting the curve at the input parameter value.

Parameters
param[in] Parameter value at which the curve is to be split.
piece1[out] Pointer to the first curve segment.
piece2[out] Pointer to the second curve segment.
Remarks
If the specified parameter value does not lie within the parametric interval of the curve or if it corresponds to the start or endpoint of the curve, then piece1 and piece2 are set to null.
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ getTrimmedOffset()

void OdGeCurve2d::getTrimmedOffset ( double  distance,
OdGeCurve2dPtrArray offsetCurveList,
OdGe::OffsetCrvExtType  extensionType = OdGe::kFillet,
const OdGeTol tol = OdGeContext::gTol 
) const

Retrieves one or more trimmed offset curves.

Parameters
distance[in] Offset distance.
offsetCurveList[out] List that stores offset curves.
extensionType[in] Determines how the offset curve will be extended at points of C1 discontinuity.
tol[in] Geometric tolerance.
Remarks
The direction of the positive offset at any point on this curve is along the tangent to the curve at that point rotated by 90 degrees counterclockwise. The offsets are trimmed to eliminate self-intersecting loops. If this curve has discontinuities of type C1 and offset curve is disjoint (e.g., polyline), then offset curve's parts will be closed with lines or arcs or they will be extended (depending on extensionType).

By default this function throws the exception "not Implemented". Should be implemented in derived classes.

Throws:

eNotImplemented eInvalidInput

◆ hasEndPoint()

bool OdGeCurve2d::hasEndPoint ( OdGePoint2d endPoint) const

Returns true, and the end point, if and only if the parametric interval of the curve has an upper bound.

Parameters
endPoint[out] Receives the end point of the interval.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ hasMidPoint()

bool OdGeCurve2d::hasMidPoint ( OdGePoint2d point,
double  coef = 0.5 
) const

Checks the boundaries of the curve interval and calculates a point from the curve interval that corresponds to the specified coefficient.

Parameters
point[out] Receives the point from the curve interval that corresponds to the coefficient.
coef[in] Coefficient from the interval [0; 1].
Returns
true if and only if the parametric interval of the curve is bounded and the value of the coef variable lies within [0; 1].
Remarks
The value of the coef variable must be within [0; 1], where 0 is the beginning of the curve interval 0.5 is the middle of the curve interval 1 is the end of the curve interval

◆ hasStartPoint()

bool OdGeCurve2d::hasStartPoint ( OdGePoint2d startPoint) const

Returns true, and the start point, if and only if the parametric interval of the curve has a lower bound.

Parameters
startPoint[out] Receives the start point of the interval.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ isClosed()

bool OdGeCurve2d::isClosed ( const OdGeTol tol = OdGeContext::gTol) const

Returns true if and only if the curve is closed within the specified tolerance.

Parameters
tol[in] Geometric tolerance.

◆ isDegenerate() [1/2]

bool OdGeCurve2d::isDegenerate ( OdGe::EntityId degenerateType,
const OdGeTol tol = OdGeContext::gTol 
) const

Determines if the curve is degenerate and if so returns the type of entity that the curve degenerates into.

Parameters
degenerateType[out] Output type of degenerate entity.
tol[in] Geometric tolerance.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ isDegenerate() [2/2]

bool OdGeCurve2d::isDegenerate ( OdGeEntity2d *&  pConvertedEntity,
const OdGeTol tol = OdGeContext::gTol 
) const

Determines if the curve is degenerate and if so returns the entity that the curve degenerates into.

Parameters
pConvertedEntity[out] Output entity that the curve degenerates into.
tol[in] Geometric tolerance.
Returns
true if the curve is degenerate; false otherwise.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ isLinear()

bool OdGeCurve2d::isLinear ( OdGeLine2d line,
const OdGeTol tol = OdGeContext::gTol 
) const

Checks if this curve is linear.

Parameters
line[out] Receives the line coincident with this curve.
tol[in] Geometric tolerance.
Returns
true if the curve is linear; false otherwise.
Remarks
Returns true, and a linear entity coincident with this curve, if and only if this curve is linear.

◆ isOn() [1/2]

bool OdGeCurve2d::isOn ( const OdGePoint2d point,
double &  param,
const OdGeTol tol = OdGeContext::gTol 
) const

Determines if a point lies on the curve.

Parameters
point[in] Input point.
param[out] Output parameter value of point if the point lies on the curve.
tol[in] Geometric tolerance.
Remarks
The param parameter is only set to a meaningful value if this function returns true.

◆ isOn() [2/2]

bool OdGeCurve2d::isOn ( double  param,
const OdGeTol tol = OdGeContext::gTol 
) const

Determines if an input parameter value is within a valid parametric range of the curve.

Parameters
param[in] Input parameter value.
tol[in] Geometric tolerance.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ isPeriodic()

bool OdGeCurve2d::isPeriodic ( double &  period) const

Determines if the curve is periodic.

Parameters
period[in] Period of the curve value.
Returns
true if the curve is periodic; false otherwise.
Remarks
The curve is periodic if and only if it is closed and the two points evalPoint(t) and evalPoint(t+period) are always the same point for all values of t. By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ length() [1/2]

double OdGeCurve2d::length ( double  fromParam,
double  toParam,
double  tol = OdGeContext::gTol.equalPoint() 
) const

Returns the arc length of the curve between the two parameter values.

Parameters
fromParam[in] First parameter value that represents the start of the curve.
toParam[in] Second parameter value that represents the end of the curve.
tol[in] Geometric tolerance.
Returns
Remarks
Arc length value. By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ length() [2/2]

double OdGeCurve2d::length ( double  tol = OdGeContext::gTol.equalPoint()) const

Returns the arc length of the curve.

Parameters
tol[in] Geometric tolerance.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ midPoint()

OdGePoint2d OdGeCurve2d::midPoint ( double  coef = 0.5) const

Calculates a point from the curve interval that corresponds to the specified coefficient.

Parameters
coef[in] Coefficient from the interval [0; 1].
Returns
Point from the curve interval that corresponds to the coefficient parameter.
Remarks
The value of the coef variable must be within [0; 1], where 0 is the beginning of the curve interval 0.5 is the middle of the curve interval 1 is the end of the curve interval Otherwise, an exception eNotApplicable will be thrown.
The curve must have a bounded interval otherwise, an exception eCurveEndsMissed will be thrown.

◆ operator=()

OdGeCurve2d & OdGeCurve2d::operator= ( const OdGeCurve2d curve)

The assignment operator for objects of the OdGeCurve2d class.

Parameters
curve[in] Input 2D curve.
Returns
Reference to this object.
Remarks
Assigns input 2D curve to this curve.

◆ orthoBoundBlock() [1/2]

OdGeBoundBlock2d OdGeCurve2d::orthoBoundBlock ( ) const

Calculates the bounding box whose edges are aligned with the coordinate axes.

Returns
Bounding box as an OdGeBoundBlock2d entity.

◆ orthoBoundBlock() [2/2]

OdGeBoundBlock2d OdGeCurve2d::orthoBoundBlock ( const OdGeInterval range) const

Calculates the bounding box whose edges are aligned with the coordinate axes.

Parameters
range[in] Interval of this curve to be bounded.
Returns
Bounding box as an OdGeBoundBlock2d entity.

◆ paramAtLength()

double OdGeCurve2d::paramAtLength ( double  datumParam,
double  length,
bool  posParamDir = true,
double  tol = OdGeContext::gTol.equalPoint() 
) const

Returns the parameter value of the point whose arc length distance is the input length.

Parameters
datumParam[in] Input parameter value.
length[in] Input arc length.
posParamDir[in] Input parameter direction.
tol[in] Geometric tolerance.
Returns
Parameter value of the point at the specified distance.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ paramOf() [1/2]

double OdGeCurve2d::paramOf ( const OdGePoint2d point,
const OdGeInterval range,
const OdGeTol tol 
) const

Returns the parameter value of a point.

Parameters
point[in] Input point on the curve.
range[in] Interval on the curve.
tol[in] Geometric tolerance.
Remarks
The returned parameters specify a point within tol of point. In case of uvBox == NULL paramOf(point, tol) is called. If you are not sure the point is on the curve, use isOn() instead of this function.
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ paramOf() [2/2]

double OdGeCurve2d::paramOf ( const OdGePoint2d point,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns the parameter value of a point.

Parameters
point[in] Input point on the curve.
tol[in] Geometric tolerance.
Remarks
The returned parameters specify a point within tol of point. If point is not on the curve, the results are unpredictable. If you are not sure the point is on the curve, use isOn () instead of this function.
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ restoreUvCurve()

static OdGeCurve2d * OdGeCurve2d::restoreUvCurve ( const OdGeCurve3d curve,
const OdGeSurface surface,
const OdGeTol tol = OdGeContext::gTol 
)
static

Restores a 2D parametric curve on a surface from a 3D curve.

Parameters
curve[in] 3D curve from which this curve is restored.
surface[in] Surface on which a restored curve lies.
tol[in] Geometric tolerance.
Returns
2D curve representing the projection of the 3D curve on the surface.
Remarks
NULL is returned if projection failed.

◆ reverseParam()

OdGeCurve2d & OdGeCurve2d::reverseParam ( )

Reverses the parameter direction of this curve.

Returns
Curve with the reversed direction parameter.
Remarks
The point set of this curve is unchanged.
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ setInterval() [1/2]

OdGeCurve2d & OdGeCurve2d::setInterval ( )

Sets to natural domain of this curve.

Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ setInterval() [2/2]

bool OdGeCurve2d::setInterval ( const OdGeInterval interval)

Sets the parametric interval of this curve.

Parameters
interval[in] Parametric interval of this curve.
Remarks
By default this function throws the exception "not Implemented". Should be implemented in derived classes.

◆ TD_USING()

OdGeCurve2d::TD_USING ( OdGeEntity2d::isOn  )

The documentation for this class was generated from the following file: