Action:
|
Gets the position, tangent direction, and parameter value at the foot of a perpendicular dropped from a point to the spline curve.
|
|
Prototype:
|
void bs3_curve_perp (
|
|
|
SPAposition const& pos,
|
|
// given point
|
|
|
bs3_curve cur,
|
|
// given curve
|
|
|
SPAposition& foot,
|
|
// returned foot of
|
|
|
|
|
|
// perpendicular
|
|
|
SPAunit_vector& tan,
|
|
// returned curve
|
|
|
|
|
|
// tangent
|
|
|
SPAparameter const&
|
|
// guess value
|
|
|
|
param_guess
|
|
// for parameter
|
|
|
|
=*(SPAparameter*)NULL_REF,
|
|
|
SPAparameter& param_actual
|
// returned actual
|
|
|
|
=*(SPAparameter*)NULL_REF,// parameter used
|
|
|
double quick_exit_dist_tol
|
// if non-zero, used
|
|
|
|
= 0.0
|
|
// to stop iteration
|
|
|
|
|
|
// when foot is
|
|
|
|
|
|
// closer than tol to
|
|
|
|
|
|
// pos
|
|
|
);
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "baseutil/vector/param.hxx"
|
|
#include "baseutil/vector/position.hxx"
|
|
#include "baseutil/vector/unitvec.hxx"
|
|
#include "kernel/spline/bs3_crv/bs3curve.hxx"
|
|
#include "kernel/spline/bs3_crv/sp3crtn.hxx"
|
|
Description:
|
All return parameters are optional (i.e., they may be
NULL references, meaning that the value is not required). If an approximate parameter is supplied, the returned point will be the one near (in some sense) to the specified parameter. If not, it will be the point nearest in object space to the given one.
|
|
|
For an open curve, there may be no perpendicular at all. In this case, one end of the curve is returned and the tangent and parameter at that point are returned as usual.
|
|
|
If a non-zero quick_exit_dist_tol is supplied, this value is used to stop the point perp iteration as soon as the near pt and pos are within quick_exit_dist_tol of each other.
|
|
Library:
|
kernel
|
|
Filename:
|
kern/kernel/spline/bs3_crv/sp3crtn.hxx
|
|
Effect:
|
Read-only
|