|
CFx SDK Documentation 2024 SP0
|
#include <GeCurve2d.h>
Static Public Member Functions | |
| static OdGeCurve2d * | restoreUvCurve (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 *) |
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.
|
protected |
| source | [in] Object to be cloned. |
|
protected |
| 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.
| 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. |
| void OdGeCurve2d::appendSamplePoints | ( | int | numSample, |
| OdGePoint2dArray & | pointArray | ||
| ) | const |
Appends sample points along this curve and their parameter values to the specified arrays.
| numSample | [in] Number of samples. |
| pointArray | [out] Receives an array of sample points. |
| 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.
| 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. |
| OdGeBoundBlock2d OdGeCurve2d::boundBlock | ( | ) | const |
Calculates the oriented bounding box of curve.
| OdGeBoundBlock2d OdGeCurve2d::boundBlock | ( | const OdGeInterval & | range | ) | const |
Calculates the oriented bounding box of curve.
| range | [in] Sub-interval of this curve to be bounded. |
| 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.
| curve2d | [in] Input curve. |
| pntOnOtherCrv | [out] Closest point on the input curve. |
| tol | [in] Geometric tolerance. |
| OdGePoint2d OdGeCurve2d::closestPointTo | ( | const OdGePoint2d & | point, |
| const OdGeTol & | tol = OdGeContext::gTol |
||
| ) | const |
Finds the closest point on this curve to the input point.
| point | [in] Input point according to which the closest point on this curve is searched. |
| tol | [in] Geometric tolerance. |
| 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.
| point | [in] Point to be evaluated. |
| param | [out] uv-coord of closest point. |
| range | [in] Interval on the curve. |
| tol | [in] Geometric tolerance. |
| OdGeCurve3d * OdGeCurve2d::convertTo3d | ( | ) | const |
Creates a new 3D variant of the curve (z-coordinate equal to zero).
| void OdGeCurve2d::convertTo3d | ( | OdGeCurve3d & | curve3d | ) | const |
Gets a 3D variant of the curve (z-coordinate equal to zero).
| curve3d | [out] Reference to the resulting 3D curve of suitable type. |
| 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.
| otherCur | [in] Input curve. |
| tol | [in] Geometric tolerance. |
| 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.
| point | [in] Input point. |
| tol | [in] Geometric tolerance. |
| OdGePoint2d OdGeCurve2d::evalPoint | ( | double | param | ) | const |
Returns the point on the curve corresponding to the specified parameter value.
| param | [in] Parameter to be evaluated. |
| 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.
| 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. |
| bool OdGeCurve2d::explode | ( | OdGeCurve2dPtrArray & | explodedCurves, |
| OdGeIntArray & | newExplodedCurve, | ||
| const OdGeInterval * | interval = NULL |
||
| ) | const |
Explodes the curve into its component sub-curves.
| 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. |
| 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.
| 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. |
| 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.
| point | [in] Input point. |
| pntOnCrv | [out] Closest point on this curve to the input point. |
| tol | [in] Geometric tolerance. |
| 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.
| range | [in] The part of the curve to be bounded. |
| coordSystem | [in] The local coordinate system in which box extents are computed. |
| void OdGeCurve2d::getInterval | ( | OdGeInterval & | interval | ) | const |
Gets the parametric interval of the curve.
| interval | [out] Receives the parametric interval of the curve. |
| void OdGeCurve2d::getInterval | ( | OdGeInterval & | interval, |
| OdGePoint2d & | start, | ||
| OdGePoint2d & | end | ||
| ) | const |
Gets the parametric interval of the curve.
| 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. |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| point | [in] Input point. |
| pntOnCrv | [out] Closest point on this curve whose normal passes through the input point. |
| tol | [in] Geometric tolerance. |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| numSample | [out] Receives a quantity of sample points. |
| pointArray | [out] Receives sample points. |
| 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.
| 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. |
| 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.
| 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. |
By default this function throws the exception "not Implemented". Should be implemented in derived classes.
Throws:
eNotImplemented eInvalidInput
| 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.
| endPoint | [out] Receives the end point of the interval. |
| 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.
| point | [out] Receives the point from the curve interval that corresponds to the coefficient. |
| coef | [in] Coefficient from the interval [0; 1]. |
| 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.
| startPoint | [out] Receives the start point of the interval. |
| bool OdGeCurve2d::isClosed | ( | const OdGeTol & | tol = OdGeContext::gTol | ) | const |
Returns true if and only if the curve is closed within the specified tolerance.
| tol | [in] Geometric tolerance. |
| 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.
| degenerateType | [out] Output type of degenerate entity. |
| tol | [in] Geometric tolerance. |
| 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.
| pConvertedEntity | [out] Output entity that the curve degenerates into. |
| tol | [in] Geometric tolerance. |
| bool OdGeCurve2d::isLinear | ( | OdGeLine2d & | line, |
| const OdGeTol & | tol = OdGeContext::gTol |
||
| ) | const |
Checks if this curve is linear.
| line | [out] Receives the line coincident with this curve. |
| tol | [in] Geometric tolerance. |
| bool OdGeCurve2d::isOn | ( | const OdGePoint2d & | point, |
| double & | param, | ||
| const OdGeTol & | tol = OdGeContext::gTol |
||
| ) | const |
Determines if a point lies on the curve.
| point | [in] Input point. |
| param | [out] Output parameter value of point if the point lies on the curve. |
| tol | [in] Geometric tolerance. |
| 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.
| param | [in] Input parameter value. |
| tol | [in] Geometric tolerance. |
| bool OdGeCurve2d::isPeriodic | ( | double & | period | ) | const |
Determines if the curve is periodic.
| period | [in] Period of the curve value. |
| 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.
| 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. |
| double OdGeCurve2d::length | ( | double | tol = OdGeContext::gTol.equalPoint() | ) | const |
Returns the arc length of the curve.
| tol | [in] Geometric tolerance. |
| OdGePoint2d OdGeCurve2d::midPoint | ( | double | coef = 0.5 | ) | const |
Calculates a point from the curve interval that corresponds to the specified coefficient.
| coef | [in] Coefficient from the interval [0; 1]. |
| OdGeCurve2d & OdGeCurve2d::operator= | ( | const OdGeCurve2d & | curve | ) |
The assignment operator for objects of the OdGeCurve2d class.
| curve | [in] Input 2D curve. |
| OdGeBoundBlock2d OdGeCurve2d::orthoBoundBlock | ( | ) | const |
Calculates the bounding box whose edges are aligned with the coordinate axes.
| OdGeBoundBlock2d OdGeCurve2d::orthoBoundBlock | ( | const OdGeInterval & | range | ) | const |
Calculates the bounding box whose edges are aligned with the coordinate axes.
| range | [in] Interval of this curve to be bounded. |
| 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.
| datumParam | [in] Input parameter value. |
| length | [in] Input arc length. |
| posParamDir | [in] Input parameter direction. |
| tol | [in] Geometric tolerance. |
| double OdGeCurve2d::paramOf | ( | const OdGePoint2d & | point, |
| const OdGeInterval * | range, | ||
| const OdGeTol & | tol | ||
| ) | const |
Returns the parameter value of a point.
| point | [in] Input point on the curve. |
| range | [in] Interval on the curve. |
| tol | [in] Geometric tolerance. |
| double OdGeCurve2d::paramOf | ( | const OdGePoint2d & | point, |
| const OdGeTol & | tol = OdGeContext::gTol |
||
| ) | const |
Returns the parameter value of a point.
| point | [in] Input point on the curve. |
| tol | [in] Geometric tolerance. |
|
static |
Restores a 2D parametric curve on a surface from a 3D curve.
| curve | [in] 3D curve from which this curve is restored. |
| surface | [in] Surface on which a restored curve lies. |
| tol | [in] Geometric tolerance. |
| OdGeCurve2d & OdGeCurve2d::reverseParam | ( | ) |
Reverses the parameter direction of this curve.
| OdGeCurve2d & OdGeCurve2d::setInterval | ( | ) |
Sets to natural domain of this curve.
| bool OdGeCurve2d::setInterval | ( | const OdGeInterval & | interval | ) |
Sets the parametric interval of this curve.
| interval | [in] Parametric interval of this curve. |
| OdGeCurve2d::TD_USING | ( | OdGeEntity2d::isOn | ) |