Interface
to Alias deviation locator.
Synopsis
#include <AlDeviationLocator.h>
class AlDeviationLocator : public AlLocator
AlDeviationLocator();
virtual ~AlDeviationLocator();
virtual AlObject * copyWrapper() const;
virtual AlObjectType type() const;
statusCode create(const AlCurve *, const AlCurve *, double = 0.0);
statusCode create(const AlCurveOnSurface *, const AlCurve *, double = 0.0);
statusCode create(const AlCurveOnSurface *, const AlCurveOnSurface *, double = 0.0);
statusCode deviation(double &) const;
statusCode deviationComponents(double &, double &, double &) const;
statusCode setParameter(double);
statusCode parameter(double &) const;
statusCode parameterTargetCurve(double &) const;
statusCode setOffset(double, double, double);
statusCode offset(double &, double &, double &) const;
statusCode setLength(double);
statusCode length(double &) const;
statusCode setLeftJustify(boolean);
statusCode leftJustify(boolean &) const;
statusCode attachedTo( AlObject *&, AlObject *& );
Description
A deviation locator finds
and displays the shortest distance between two curves, from a given
point on the first curve to the second curve. The two curves can
be any of the AlCurve or AlCurveOnSurface curves.
This class contains methods to create the locator, query the minimum
distance, and set the display attributes in the Alias windows.
If any two curves on which this locator depends is deleted, this
locator is deleted.
AlDeviationLocator::AlDeviationLocator(void)
Description
Constructs
an AlDeviationLocator wrapper object.
AlDeviationLocator::~AlDeviationLocator()
Description
Deletes
an AlDeviationLocator wrapper object.
AlObject *AlDeviationLocator::copyWrapper()
const
Description
Returns an exact copy of the AlDeviation
wrapper.
AlObjectType AlDeviationLocator::type()
const
Description
Returns the class identifier kDeviationLocatorType.
statusCode AlDeviationLocator::create(const
AlCurve *baseCurve, const AlCurve *targetCurve, double baseParameter)
Description
Creates a Deviation locator between two
curves.
Arguments
< baseCurve - the
curve from which the deviation is calculated
< targetCurve - the
curve to which the minimum deviation is calculated
< baseParameter -
the parameter on baseCurve from which the minimum deviation to the target
curve is calculated
Return Codes
sSuccess - the deviation
locator was successfully created
sFailure - the locator
was not created
sAlreadyCreated - the
object was already created
sInvalidArgument - the
baseCurve or targetCurve is not valid
statusCode AlDeviationLocator::create(const
AlCurveOnSurface *baseCurve, const AlCurve *targetCurve, double
baseParameter)
Description
Creates a deviation locator between
a curve on surface and a curve.
Arguments
< baseCurve - the
curve on surface from which the deviation is calculated
< targetCurve - the
curve to which the minimum deviation is calculated
< baseParameter -
the parameter on baseCurve from which the minimum deviation to the target
curve is calculated
Return Codes
sSuccess - the deviation
locator was successfully created
sFailure - the locator
was not created
sAlreadyCreated - the
object has already been created
sInvalidArgument - the
baseCurve or targetCurve is not valid
statusCode AlDeviationLocator::create(const
AlCurveOnSurface *baseCurve, const AlCurveOnSurface *targetCurve,
double baseParameter)
Description
Creates a Deviation
locator between two curves on surface.
Arguments
< baseCurve - the
curve on surface from which the deviation is calculated
< targetCurve - the
curve on surface to which the minimum deviation is calculated
< baseParameter -
the parameter on baseCurve from which the minimum deviation to the target
curve is calculated
Return Codes
sSuccess - the deviation
locator was successfully created
sFailure - the locator
was not created
sAlreadyCreated - the
object has already been created
sInvalidArgument - the
baseCurve or targetCurve is not valid
statusCode AlDeviationLocator::deviation(double
&dev) const
Description
Finds the minimum deviation
as calculated by the deviation locator.
Arguments
> dev - the minimum
deviation
Return Codes
sSuccess - the deviation
was found
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::deviationComponents(double
&x, double &y, double &z) const
Description
Finds the components of minimum deviation as calculated
by the deviation locator.
Arguments
> x, y, z - the x,
y, and z components of minimum deviation
Return Codes
sSuccess - the deviation
was found
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::setParameter(double
param)
Description
Sets the parameter on the
baseCurve from which the minimum deviation to targetCurve is calculated.
Arguments
< param - the parameter
on baseCurve to be set
Return Codes
sSuccess - the parameter
was set successfully
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::parameter(double
¶m) const
Description
Finds the parameter
on the baseCurve from which the minimum deviation to targetCurve is
calculated.
Arguments
> param - the parameter
on baseCurve
Return Codes
sSuccess - the parameter
was found successfully
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::parameterTargetCurve(double ¶m)
const
Description
Finds
the parameter on the targetCurve which is at the minimum deviation
to the baseCurve.
Arguments
> param - the parameter
on targetCurve
Return Codes
sSuccess - the parameter
was found successfully
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::setOffset(double
x, double y, double z)
Description
Sets the components
of display offset in the deviation locator. The display offset is
the relative vector between the deviation locator and start of the
leader line which displays the deviation value.
Arguments
> x, y, z - the offset
components
Return Codes
sSuccess - the components
were found successfully
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::offset(double
&x, double &y, double &z) const
Description
Finds
the components of display offset in the deviation locator.
Arguments
> x, y, z - the x,
y, and z components of the display offset
Return Codes
sSuccess - the offset
was found successfully
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::setLength(double
len)
Description
Sets the length of the leader
line in the deviation display in the modeling windows.
Arguments
< len - the length
of the leader line
Return Codes
sSuccess - the length
was set successfully
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::length(double
&len) const
Description
Finds the length of the
leader line in the deviation locator.
Arguments
> len - the length
of the leader line
Return Codes
sSuccess - the length
was found successfully
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::setLeftJustify(boolean
leftJustify)
Description
Aligns text for
the deviation locator. The text can be aligned to the right or to
the left.
Arguments
< leftJustify - a
value of true aligns text to the left, while a value of false aligns
text to the right.
Return Codes
sSuccess - setting was
successful
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::leftJustify(boolean
&leftJustify) const
Description
Determines
whether the deviation locator text is aligned to the left or right.
Arguments
> leftJustify - a
value of true indicates that it is aligned to the left; false indicates
that it is aligned to the right.
Return Codes
sSuccess - the alignment
was found
sInvalidObject - the
object is not valid
statusCode AlDeviationLocator::attachedTo(
AlObject *&objectOne, AlObject *& objectTwo )
Description
Returns the two objects
that are used to create the deviation locator. This locator can
be attached to curves on surfaces or curve nodes.
Arguments
> objectOne, objectTwo
- locator is attached to these objects
Return Codes
sSuccess - the attached
to objects were found
sInvalidObject - the
object is not valid
sFailure - the method
failed