CFx SDK Documentation  2020SP3
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

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 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
 
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
 
bool hasStartPoint (OdGePoint2d &startPoint) const
 
bool hasEndPoint (OdGePoint2d &endPoint) 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 ()
 
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
 
 ~OdGeEntity2d ()
 

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 52 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] Receives an array of sample points.
pParamArray[in] Pointer to an array to receive the parameters at each point.

◆ 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

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

◆ boundBlock() [1/2]

OdGeBoundBlock2d OdGeCurve2d::boundBlock ( ) const

Oriented bounding box of curve.

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

◆ boundBlock() [2/2]

OdGeBoundBlock2d OdGeCurve2d::boundBlock ( const OdGeInterval range) const

Oriented bounding box of curve.

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

◆ closestPointTo() [1/2]

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

Finds the closest points between this curve and the input curve.

Remarks
This function is the same as getClosestPointTo().

◆ closestPointTo() [2/2]

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

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

Remarks
This function is the same as getClosestPointTo().

◆ distanceTo() [1/2]

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

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

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

◆ 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.

Remarks
By default this function throws 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 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 exception "not Implemented". Should be implemented in derived classes.

◆ explode()

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

Explode curve into its component sub-curves.

Remarks
By default this function throws 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 closest points between this curve and the input curve.

Remarks
By default this function throws 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.

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

◆ getInterval() [1/2]

void OdGeCurve2d::getInterval ( OdGeInterval interval) const

Returns the parametric interval of the curve.

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

◆ getInterval() [2/2]

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

Returns the parametric interval of the curve.

Parameters
interval[out] Receives the parametric interval of the curve.
start[out] Receives the start point of interval.
end[out] Receives the end point of interval.
Remarks
By default this function throws 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

Local closest points.

Remarks
By default this function throws 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

Local closest points.

Remarks
By default this function throws 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.

Remarks
By default this function throws 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 a curve.
pointArray[out] Returns an array of sample points.
paramArray[out] Returns an array of parameters at each point.

◆ getSamplePoints() [2/3]

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

◆ getSamplePoints() [3/3]

void OdGeCurve2d::getSamplePoints ( int  numSample,
OdGePoint2dArray pointArray 
) 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 a curve. pointArray Returns an array of sample points. paramArray Returns an array of parameters at each point.

◆ 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. 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.

Remarks
By default this function throws 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

Return the offset of the curve.

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

◆ 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 exception "not Implemented". Should be implemented in derived classes.

◆ 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 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 type of entity that the curve degenerates.

Remarks
By default this function throws 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.

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

◆ isLinear()

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

Returns true, and a linear entity coincident with this curve, if and only if this curve is linear.

Parameters
line[out] Receives the line coincident with this curve.
tol[in] Geometric tolerance.
Remarks
An infinite line is returned, even if this curve is bounded.
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ isOn() [1/2]

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

Determines if pnt lies on curve. The param parameter is only set to a meaningful value if this function returns true.

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

◆ isOn() [2/2]

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

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

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

◆ isPeriodic()

bool OdGeCurve2d::isPeriodic ( double &  period) const

Determines if the curve is periodic. 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.

Remarks
By default this function throws 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.

Remarks
By default this function throws 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 between the two parameter values.

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

◆ operator=()

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

◆ orthoBoundBlock() [1/2]

OdGeBoundBlock2d OdGeCurve2d::orthoBoundBlock ( ) const

Bounding box whose sides are parallel to coordinate axes.

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

◆ orthoBoundBlock() [2/2]

OdGeBoundBlock2d OdGeCurve2d::orthoBoundBlock ( const OdGeInterval range) const

Bounding box whose sides are parallel to coordinate axes.

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

◆ 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.

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

◆ paramOf()

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 exception "not Implemented". Should be implemented in derived classes.

◆ reverseParam()

OdGeCurve2d& OdGeCurve2d::reverseParam ( )

Reverses the parameter direction this curve.

Remarks
The point set of this curve is unchanged.
By default this function throws exception "not Implemented". Should be implemented in derived classes.

◆ setInterval() [1/2]

OdGeCurve2d& OdGeCurve2d::setInterval ( )

Sets to natural domain of the curve

Remarks
By default this function throws 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 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: