A list of trim boundaries defining a trim region.
Synopsis
#include <AlTrimRegion.h>
class AlTrimRegion : public AlObject
virtual ~AlTrimRegion();
virtual AlObject* copyWrapper() const;
virtual AlObjectType type() const;
AlDagNode* parentDagNode() const;
AlTrimBoundary* firstBoundary() const;
statusCode applyIteratorToBoundaries( AlIterator*, int& ) const;
AlTrimRegion* nextRegion() const;
statusCode nextRegionD();
AlTrimRegion* prevRegion() const;
statusCode prevRegionD();
// Stuff to get surface information
curveFormType uForm() const;
curveFormType vForm() const;
int uDegree() const;
int vDegree() const;
int uNumberOfSpans() const;
int vNumberOfSpans() const;
int uNumberOfCVs() const;
int vNumberOfCVs() const;
statusCode periodicToNonPeriodic( int, int );
statusCode periodicToNonPeriodic() const;
statusCode CVsWorldPosition( double[], int[], int[])const;
statusCode CVsAffectedPosition( const AlTM&, double[], int[], int[]) const;
statusCode CVsUnaffectedPosition( double[], int[], int[])const;
int uNumberOfKnots() const;
int vNumberOfKnots() const;
statusCode uKnotVector( double[] ) const;
statusCode vKnotVector( double[] ) const;
int uNumberOfCVsInclMultiples() const;
int vNumberOfCVsInclMultiples() const;
statusCode CVsWorldPositionInclMultiples( double[] ) const;
statusCode CVsAffectedPositionInclMultiples( const AlTM&, double[] ) const;
statusCode CVsUnaffectedPositionInclMultiples( double[] )const;
int realuNumberOfKnots() const;
int realvNumberOfKnots() const;
statusCode realuKnotVector( double[] ) const;
statusCode realvKnotVector( double[] ) const;
statusCode eval(double,double,boolean,double P[3]=NULL, double Pu[3]=NULL, double Pv[3]=NULL, double n[3]=NULL,boolean=FALSE,boolean=FALSE ) const;
statusCode persistentID( AlPersistentID *&id, int ut = 1 );
statusCode hasPersistentID( int ut = 1 );
statusCode setPersistentID( AlPersistentID &id, int ut );
Description
This class defines a region of a surface’s parametric space that identifies an area of interest on a surface. It holds at
least one AlTrimBoundary object. The first boundary on the list represents the outermost boundary of a trim region, and the
rest represent the inner boundaries (holes) if there are any.
For each trim boundary, the surface is to the left of the boundary when viewed from above (hence a hole is to the right of
the boundary).
For example, in this diagram we have a surface represented by As. Each additional letter is an island trimmed out of A and
each would be a separate AlTrimRegion. The AlTrimRegion for A would have two AlTrimBoundaries, B would have three, and C,
D, and E would have one each.
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA AA
AA BBBBBBBBBBB CCCCCCCCCC AA
AA BBBBBBBBBBB CCCCCCCCCC AA
AA BB BBBB AA
AA BB EEE BBBBBBBBBBBBBBB AA
AA BB EEE BBBB BB AA
AA BB BBBB DDDDDDD BB AA
AA BBBBBBBBBBB DDDDDDD BB AA
AA BBBBBBBBBBB BB AA
AA BBBBBBBBBBBBBBBBBBBBBB AA
AA AA
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AlTrimRegion::~AlTrimRegion()
Description
Deletes an AlTrimRegion wrapper object.
AlObject *AlTrimRegion::copyWrapper() const
Description
Returns an exact duplicate of this AlTrimRegion wrapper.
AlObjectType AlTrimRegion::type() const
Description
Returns the class identifier kTrimRegionType.
AlDagNode * AlTrimRegion::parentDagNode() const
Description
Gets the parent DagNode above this trim region. NULL is returned if there is no parent.
AlTrimBoundary* AlTrimRegion::firstBoundary() const
Description
Returns the first trim boundary of a list of trim boundaries or NULL if this region has no boundaries.
AlTrimRegion* AlTrimRegion::nextRegion() const
Description
Returns the next trim region. Returns NULL if there is no such trim region.
statusCode AlTrimRegion::nextRegionD()
Description
Destructively points this wrapper object to the next trim region. If there is no next trim region, then the object is left
unchanged.
Return Codes
sSuccess - the wrapper now points to the next trim region
sFailure - there is no next trim region
sInvalidObject - the region is invalid
AlTrimRegion* AlTrimRegion::prevRegion() const
Description
Returns the previous trim region. Returns NULL if there is no such trim region.
statusCode AlTrimRegion::prevRegionD()
Description
Destructively points this wrapper object to the previous trim region. If there is no previous trim region, then the object
is left unchanged.
Return Codes
sSuccess - the wrapper now points to the previous trim region
sFailure - there is no previous trim region
sInvalidObject - the region is invalid
curveFormType AlTrimRegion::uForm() const
Description
See the documentation for this function in AlSurface.
curveFormType AlTrimRegion::vForm() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::uDegree() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::vDegree() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::uNumberOfSpans() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::vNumberOfSpans() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::uNumberOfCVs() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::vNumberOfCVs() const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::CVsWorldPosition(double CVList[], int uMultiplicity[], int vMultiplicity[] ) const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::CVsAffectedPosition( const AlTM& tm, double CVList[],int uMultiplicity[],int vMultiplicity[] ) const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::CVsUnaffectedPosition( double CVList[],int uMultiplicity[],int vMultiplicity[] ) const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::uNumberOfKnots() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::vNumberOfKnots() const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::uKnotVector( double knotVector[] ) const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::vKnotVector( double knotVector[] ) const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::uNumberOfCVsInclMultiples() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::vNumberOfCVsInclMultiples() const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::CVsWorldPositionInclMultiples( double CVList[] ) const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::CVsAffectedPositionInclMultiples( const AlTM& tm, double CVList[] ) const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::CVsUnaffectedPositionInclMultiples( double CVList[] ) const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::realuNumberOfKnots() const
Description
See the documentation for this function in AlSurface.
int AlTrimRegion::realvNumberOfKnots() const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::realuKnotVector( double knotVector[] ) const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::realvKnotVector( double knotVector[] ) const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::eval(double u, double v, boolean worldCoordinates, double P[3], double Pu[3], double Pv[3], double
n[3], boolean uLimitFromBelow, boolean vLimitFromBelow ) const
Description
See the documentation for this function in AlSurface.
statusCode AlTrimRegion::applyIteratorToBoundaries(AlIterator* iter, int& rc ) const
Description
Applies an iterator to each trim region boundary.
Arguments
< iter - the iterator to apply
> rc - the return value of the last application of the iterator
Return Codes
sSuccess - the iterator was successfully applied to each trim region boundary
sInvalidArgument - 'iter' was NULL
statusCode AlTrimRegion::periodicToNonPeriodic( int u, int v )
Description
If an underlaying surface of the trim region is periodic, converts it to a non-periodic surface (closed surface) by making
it have multiple end knots in the selected direction (u/v).
Note: this method modifies the underlaying surface of the trim region.
Arguments
> u - change in u direction if u has the following value:
-1 make left (u0) end multiple
0 make both (u) ends multiple
1 make right(un) end multiple
> v - change in v direction if v has the following value:
-1 make left (v0) end multiple
0 make both (v) ends multiple
1 make right(vn) end multiple
Return Codes
sInvalidObject - the underlaying surface was invalid.
sFailure - the method did not succeed
sSuccess - the underlaying surface was converted to a non-periodic one in the u/v direction
statusCode AlTrimRegion::periodicToNonPeriodic( ) const
Description
If an underlying surface of the trim region is periodic, converts it to a non-periodic surface (closed surface) by making
it have multiple end knots at both endpoints in u/v directions.
Note: this method modifies the underlying surface of the trim region.
Return Codes
sInvalidObject - the underlaying surface was invalid
sFailure - the method did not succeed
sSuccess - the underlaying surface was converted to a non-periodic one in both u and v directions
statusCode AlTrimRegion::persistentID( AlPersistentID *&id, int userType )
Description
Returns a copy of the AlPersistentID associated with this face. For user type 1, persistent IDs are created if they do not
exist already. For all other user types, persistent IDs are not created if they do not exist already, and the method fails.
User types between 0 and 9999 are reserved. If you would like to reserve a block of user types please contact us.
Arguments
< type - user type of the persistent ID desired
> id - a copy of the AlPersistentID
Return Codes
sSuccess - normal completion
sInvalidObject - the given object is not valid
statusCode AlTrimRegion::setPersistentID( AlPersistentID &id, int userType )
Description
Sets the values of the AlPersistentID associated with this node. This method only allows you to create persistent IDs with
user types other than 1. If the persistent ID does not exist, it will be created.
User types between 0 and 9999 are reserved. If you would like to reserve a block of user types please contact us.
Arguments
< type - user type of the persistent ID desired
> id - a copy of the AlPersistentID
Return Codes
sSuccess - normal completion
sInvalidObject - the given object is not valid
sInvalidArgument - the given userType is not valid
sFailure - the id did not exist or could not be created
statusCode AlTrimRegion::hasPersistentID( int user_type )
Description
Checks that the AlTrimRegion has a persistent ID associated with it.
Arguments
< type - user type of the persistent ID desired
Return Codes
sSuccess - node has a persistent ID
sFailure - node does not have a persistent ID
sInvalidObject - the given object is not valid