Curves have the following characteristics:
The orientation of a curve is determined by the direction in which its parameter increases. You can use the AcGeCurve2d::reverseParam() or AcGeCurve3d::reverseParam() function to reverse the orientation of a curve.
Some curves are periodic, which means that they repeat themselves after a certain interval. For example, the period of a circle is 2pi. Use these functions to determine whether a curve is periodic:
Adesk::Boolean AcGeCurve2d::isPeriodic(double& period) const; Adesk::Boolean AcGeCurve3d::isPeriodic(double& period) const;
A closed curve has start points and endpoints that are the same. Curves can be either closed or open. Use these functions to determine whether a curve is closed:
Adesk::Boolean AcGeCurve2d::isClosed( const AcGeTol& tol = AcGeContext::gTol) const; Adesk::Boolean AcGeCurve3d::isClosed( const AcGeTol& tol = AcGeContext::gTol) const;
A 3D curve can be planar (meaning that all of its points reside in the same plane) or nonplanar. Use this function to determine whether a 3D curve is planar:
Adesk::Boolean AcGeCurve3d::isPlanar( AcGePlane& plane, const AcGeTol& tol = AcGeContext::gTol) const;
Given two parameter values, you can obtain the length of the curve between these two values using the following functions:
double AcGeCurve2d::length( double fromParam, double toParam, double tol = AcGeContext::gTol.equalPoint()) const; double AcGeCurve3d::length( double fromParam, double toParam, double tol = AcGeContext::gTol.equalPoint()) const;
You can use the AcGeCurve2d::evalPoint() and AcGeCurve3d::evalPoint() functions to obtain the model space point that corresponds to a given parametric value. If your application performs evaluation frequently, you'll probably find the AcGePointOnCurve3d and AcGePointOnCurve2d classes more efficient (see Special Evaluation Classes). The curve functions for evaluating points are as follows:
AcGePoint2d AcGeCurve2d::evalPoint( double param) const; AcGePoint2d AcGeCurve2d::evalPoint( double param, int numDeriv, AcGeVector2dArray& derivArray) const; AcGePoint3d AcGeCurve3d::evalPoint( double param) const; AcGePoint3d AcGeCurve3d::evalPoint( double param, int numDeriv, AcGeVector3dArray& derivArray) const;