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

#include <GeOffsetCurve2d.h>

Inheritance diagram for OdGeOffsetCurve2d:
OdGeCurve2d OdGeEntity2d

Public Member Functions

 OdGeOffsetCurve2d ()
 
 OdGeOffsetCurve2d (const OdGeCurve2d &baseCurve, double offsetDistance, bool makeCopy=false)
 
 OdGeOffsetCurve2d (const OdGeOffsetCurve2d &source)
 
const OdGeCurve2dcurve () const
 
double offsetDistance () const
 
bool paramDirection () const
 
OdGeMatrix2d transformation () const
 
OdGeOffsetCurve2dsetCurve (const OdGeCurve2d &baseCurve, bool makeCopy=false)
 
OdGeOffsetCurve2dsetOffsetDistance (double distance)
 
OdGeOffsetCurve2doperator= (const OdGeOffsetCurve2d &offsetCurve)
 
- Public Member Functions inherited from OdGeCurve2d
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
 

Additional Inherited Members

- Static Public Member Functions inherited from OdGeCurve2d
static OdGeCurve2drestoreUvCurve (const OdGeCurve3d *curve, const OdGeSurface *surface, const OdGeTol &tol=OdGeContext::gTol)
 
- Protected Member Functions inherited from OdGeCurve2d
 OdGeCurve2d ()
 
 OdGeCurve2d (const OdGeCurve2d &source)
 
- Protected Member Functions inherited from OdGeEntity2d
 OdGeEntity2d ()
 
 OdGeEntity2d (const OdGeEntity2d &)
 
void connectTo (OdGeEntity2dImpl *)
 

Detailed Description

This class represents 2D curves that are exact offsets of other curves.

Remarks
Every GeOffsetCurve2d contains a pointer to the curve from which it is offset. Modifying the base curve modifies the offset curve. Modifying the offset curve does not modify the base curve. Actual base curve can be obtained by calling curve() method, it can be changed relative to the curve passed in constructor due to cloning under the flag in constructor or applying transformBy() and reverseParam() methods. setInterval() for an offset curve result create a curve that is an offset of the specified interval in the base curve.

This curve may be self-intersecting, even if the base curve is not.

Positive offset distances at any point on the base curve are defined as 90° counterclockwise from the tangent of the base curve at that point.

An offset curve with a 0.0 offset distance is exact replica of the base curve. An offset curve with a non-zero 0.0 offset distance has a continuity of one less than that of the base curve. To insure that the offset curve is a valid curve, the base curve must have a continuity of at least 1.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

See also
<link ge_OdGeOffsetCurve3d, Working with Offset Curves>

Definition at line 60 of file GeOffsetCurve2d.h.

Constructor & Destructor Documentation

◆ OdGeOffsetCurve2d() [1/3]

OdGeOffsetCurve2d::OdGeOffsetCurve2d ( )

Default constructor for the OdGeOffsetCurve2d class. Sets the base curve pointer to NULL, and the offset distance to 0.0.

◆ OdGeOffsetCurve2d() [2/3]

OdGeOffsetCurve2d::OdGeOffsetCurve2d ( const OdGeCurve2d baseCurve,
double  offsetDistance,
bool  makeCopy = false 
)

Sets the base curve pointer to baseCurve, and the offset distance to offsetDistance.

Parameters
baseCurve[in] Any 2D curve to be set as the base curve.
offsetDistance[in] Offset distance.
makeCopy[in] If true, makes a copy of the base curve specified by the baseCurve parameter.
Remarks
If makeCopy is true, the constructor makes a copy of the 2D curve entity specified by the baseCurve parameter. The OdGeOffsetCurve2d object that is being created becomes the owner of the newly made copy of the given 2D curve. The direction of the offset is determined by the sign of the offsetDistance parameter.

◆ OdGeOffsetCurve2d() [3/3]

OdGeOffsetCurve2d::OdGeOffsetCurve2d ( const OdGeOffsetCurve2d source)

Creates a copy of the specified OdGeOffsetCurve2d object.

Parameters
source[in] Object to be copied.

Member Function Documentation

◆ curve()

const OdGeCurve2d * OdGeOffsetCurve2d::curve ( ) const

Returns a pointer to the base curve.

Returns
Pointer to the actual base curve.
Remarks
It can be different relative to the curve passed in constructor due to cloning under the flag in constructor or applying transformBy() and reverseParam() methods.

◆ offsetDistance()

double OdGeOffsetCurve2d::offsetDistance ( ) const

Returns the offset distance of this curve.

Returns
Offset distance to the base curve.
Remarks
Offset distance is a distance by which this curve is offset from the base curve. Positive offset distances at any point on the base curve are defined as 90° counterclockwise from the tangent of the base curve at that point.

◆ operator=()

OdGeOffsetCurve2d & OdGeOffsetCurve2d::operator= ( const OdGeOffsetCurve2d offsetCurve)

Assignment operator for the OdGeOffsetCurve2d object.

Parameters
offsetCurve[in] Offset curve to assign.
Returns
Reference to this OdGeOffsetCurve2d object.

◆ paramDirection()

bool OdGeOffsetCurve2d::paramDirection ( ) const

Checks whether this curve has the same parameter direction as the base curve.

Returns
True if this curve has the same parameter direction as the base curve, or false otherwise.

◆ setCurve()

OdGeOffsetCurve2d & OdGeOffsetCurve2d::setCurve ( const OdGeCurve2d baseCurve,
bool  makeCopy = false 
)

Sets the base curve for this OdGeOffsetCurve2d object.

Parameters
baseCurve[in] Any 2D curve to be set as the base curve.
makeCopy[in] If true, makes a copy of the base curve specified by the baseCurve parameter.
Returns
Reference to this OdGeOffsetCurve2d object.
Remarks
If makeCopy is true, the method makes a copy of the 2D curve entity specified by the baseCurve parameter. This OdGeOffsetCurve2d object becomes the owner of the newly made copy of the given 2D curve.

◆ setOffsetDistance()

OdGeOffsetCurve2d & OdGeOffsetCurve2d::setOffsetDistance ( double  distance)

Sets the offset distance for this curve.

Parameters
distance[in] Distance by which this curve is offset from the base curve.
Returns
Reference to this OdGeOffsetCurve2d object.
Remarks
Positive offset distances at any point on the base curve are defined as 90° counterclockwise from the tangent of the base curve at that point. The direction of offset is determined by the sign of the distance parameter.

An offset curve with a 0.0 offset distance is exact replica of the base curve.

◆ transformation()

OdGeMatrix2d OdGeOffsetCurve2d::transformation ( ) const

Returns the concatenation of the transformation matrices applied to this curve with transformBy().

Returns
Transformation matrix applied to this curve as the concatenation of all of the transformation matrices applied to this curve with transformBy().
Remarks
If no transformation matrices have been applied to this curve, returns the identity matrix.

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