A curve in parametric surface space, part of a trim boundary.
#include <AlTrimCurve.h>
class AlTrimCurve : public AlObject
virtual ~AlTrimCurve();
virtual AlObject* copyWrapper() const;
virtual AlObjectType type() const;
AlTrimBoundary* parentBoundary() const;
AlTrimRegion* parentRegion() const;
AlDagNode* parentDagNode() const;
AlCurve* worldSpace3DCopy( double = 1.0e-5 ) const;
AlCurve* unaffected3DCopy( double = 1.0e-5 ) const;
AlCurve* affected3DCopy( AlTM&, double = 1.0e-5 ) const;
AlTrimCurve* getTwinCurve() const;
boolean isReversed() const;
curveFormType form() const;
int degree() const;
int numberOfSpans() const;
int numberOfKnots() const;
int numberOfCVs() const;
statusCode CVsUVPosition( double[], double[][3] ) const;
int realNumberOfKnots() const;
statusCode realKnotVector( double[] ) const;
statusCode periodicToNonPeriodic( ) const;
AlTrimCurve* nextCurve() const;
statusCode nextCurveD();
AlTrimCurve* prevCurve() const;
statusCode prevCurveD();
statusCode eval(double t, double *p, double *p1, double *p2) const;
This class holds the trim curve data and provides access methods for the data. A trim curve is defined over a surface’s parametric space.
AlTrimCurve* AlTrimCurve::getTwinCurve() const
Trim curves on shells are ’twinned’ - the edges where faces meet in a shell are tightly coupled. This function, given an AlTrimCurve, will return the AlTrimCurve which corresponds to the trim curve’s twin. In the case of trimmed surfaces, edges are not twinned, so NULL is returned. If the trim curve in question is a true edge of the shell, NULL is returned.
curveFormType AlTrimCurve::form() const
Returns the form of the curve, which is kOpen, kClosed or kPeriodic. If a trim curve is periodic, it is tangent continuous at the point where it is closed. (If you use the "close" tool in the interactive Alias package, you actually make a curve periodic.) If a curve is periodic, it implies that it is closed. If a curve is kClosed, then it just means that its endpoints are coincident. Otherwise, the curve is kOpen.
statusCode AlTrimCurve::CVsUVPosition( double knotVector[], double CVs[][3] ) const
Assumes that the ’knotVector’ is of length ’numberOfKnots()’ and the ’CVs’ array is of length ’numberOfCVs()’ and returns the values of the knots and CVs points in these arrays. Notice that each CV has three coordinates - the three coordinates describe 2D parameter space, with a homogeneous coordinate. Each control point is u, v and w, where u and v are parameter space and w is the homogeneous coordinate.
AlCurve* AlTrimCurve::worldSpace3DCopy( double tolerance ) const
Returns a pointer to a temporary curve that represents a world space copy of the surface trim curve.
This returns the world space (xyz) copy of the parameter space (uv) trim curve with all DAG transformations that affect the surface applied to the returned curve. That is, if you were to draw this curve, it would show up right on the surface.
The default value for tolerance is 1.0E-5.
AlCurve* AlTrimCurve::unaffected3DCopy( double tolerance ) const
Returns a pointer to a temporary curve that represents a world space copy of the surface trim curve.
This returns the world space (xyz) copy of the parameter space (uv) trim curve but with no DAG transformations applied. If you were to draw this curve, it would show up near the xyz origin.
The default value for tolerance is 1.0E-5.
AlCurve* AlTrimCurve::unaffected3DCopyNoReverse( double tolerance ) const
In a loop of AlTrimCurves, all the parameter space versions are connected nose to tail to form a closed boundary. The world space copies are not guaranteed to be all in the same direction like this. worldSpace3DCopy, unaffected3DCopy, and affected3D copy will reverse the direction of the curve if necessary so that if you get a copy of the whole loop, the curves are all in the same direction. unaffected3DCopyNoReverse will not reverse a curve's direction to guarantee this.
The default value for tolerance is 1.0E-5.
AlCurve* AlTrimCurve::affected3DCopy( AlTM& tm, double tolerance ) const
Returns a pointer to a temporary curve that represents a world spacecopy of the surface trim curve.
This is like worldSpace3DCopy, except that instead of the transformations affecting the surface being applied to the curve, you specify your own transformation matrix.
tm is the transformation matrix generated while walking the DAG.
The default value for tolerance is 1.0E-5.