Bookshelf Contents Previous Next Glossary Index Search

AlTrimCurve

A curve in parametric surface space, part of a trim boundary.

Synopsis

#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();

Description

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.

Summary

AlTrimCurve::~AlTrimCurve()

Description

Deletes an AlTrimCurve wrapper object.

AlObject *AlTrimCurve::copyWrapper() const

Description

Returns an exact duplicate of this AlTrimCurve wrapper.

AlObjectType AlTrimCurve::type() const

Description

Returns the class identifier kTrimCurve type.

AlTrimCurve* AlTrimCurve::getTwinCurve() const

Description

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.

boolean AlTrimCurve::isReversed() const

Description

Returns TRUE if the trim curve has been reversed.

int AlTrimCurve::degree() const

Description

Returns the degree of the trim curve.

curveFormType AlTrimCurve::form() const

Description

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.

int AlTrimCurve::numberOfSpans() const

Description

Returns the number of spans in the curve. -1 is returned if the curve is invalid.

int AlTrimCurve::numberOfKnots() const

Description

Returns the number of knot values (just numberOfSpans() + 1). -1 is returned if the curve is invalid.

int AlTrimCurve::numberOfCVs() const

Description

Returns the number of CVs (degree + numberOfSpans). -1 is returned if the curve is invalid.

statusCode AlTrimCurve::CVsUVPosition( double knotVector[], double CVs[][3] ) const

Description

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.

Arguments

> knotVector - contains the knots for this curve upon return

> CVs - contains the control points upon return

Return Codes

sSuccess - the CVs' positions were retrieved

sInvalidObject - the curve was invalid

int AlTrimCurve::realNumberOfKnots() const

Description

Returns the actual number of knots on the curve. That is uNumberOfSpans() + 2*degree() - 1. (Note that two additional knots are required to define a NURBS curve, but they have no effect on the curve so are not included in this count.) This method returns -1 if the curve is not valid.

statusCode AlTrimCurve::realKnotVector( double knotVector[] ) const

Description

Returns realNumberOfKnots() in 'knotVector' for the curve.

Arguments

> knotVector - array to place the knot vector into

Return Codes

sSuccess - successfully copied the curve's knot vector into knotVector

sInvalidArgument - knotVector was NULL

sInvalidObject - the curve was invalid

AlTrimCurve* AlTrimCurve::nextCurve() const

Description

Returns the next trim curve. Returns NULL if there is no such trim curve.

statusCode AlTrimCurve::nextCurveD()

Description

Destructively points this wrapper to the next curve. If there is no next curve, then the object is left unchanged.

Return Codes

sSuccess - the wrapper now points to the next curve

sFailure - there is no next curve

sInvalidObject - the curve is invalid

AlTrimCurve* AlTrimCurve::prevCurve() const

Description

Returns the previous trim curve. Returns NULL if there is no such trim curve.

statusCode AlTrimCurve::prevCurveD()

Description

Destructively points this wrapper to the previous curve. If there is no previous trim curve, then the object is left unchanged.

Return Codes

sSuccess - the wrapper now points to the previous curve

sFailure - there is no previous curve

sInvalidObject - the curve is invalid

AlCurve* AlTrimCurve::worldSpace3DCopy( double tolerance ) const

Description

Returns a pointer to a temporary curve that represents a world space copy of the surface trim curve.

The default value for tolerance is 1.0E-5.

AlCurve* AlTrimCurve::unaffected3DCopy( double tolerance ) const

Description

Returns a pointer to a temporary curve that represents a world space copy of the surface trim curve.

The default value for tolerance is 1.0E-5.

AlCurve* AlTrimCurve::affected3DCopy( AlTM& tm, double tolerance ) const

Description

Returns a pointer to a temporary curve that represents a world spacecopy of the surface trim curve.

tm is the transformation matrix generated while walking the DAG.

The default value for tolerance is 1.0E-5.

AlTrimBoundary* AlTrimCurve::parentBoundary() const

Description

Returns the parent trim boundary of the trim region.

AlTrimRegion* AlTrimCurve::parentRegion() const

Description

Returns the parent trim region of the trim curve.

AlDagNode* AlTrimCurve::parentDagNode() const

Description

Returns the parent DAG node of the trim curve.

statusCode AlTrimCurve::periodicToNonPeriodic() const

Description

Converts a periodic curve to a non-periodic curve (closed curve) by making it have multiple end knots.

Note: this method modifies the trim curve.

Return Codes

sInvalidObject - the trim curve was invalid

sFailure - the method did not succeed

sSuccess - the trim curve was converted to a non-periodic curve



Bookshelf Contents Previous Next Glossary Index Search

[email protected]
Copyright © 1998, Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved.