Action:
|
Gets the distance from a point to a line, and the parameter along the line of the closest approach.
|
|
Prototype:
|
logical dist_pt_to_line (
|
|
|
SPAposition const& pt,
|
// position to project
|
|
|
SPAposition const& line_pt,// position on line
|
|
|
SPAvector const& line_vec,// direction of line
|
|
|
double& dist,
|
// distance returned
|
|
|
double& line_prm
|
// line parameter
|
|
|
|
|
// returned
|
|
|
);
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "kernel/geomhusk/geom_utl.hxx"
|
|
#include "baseutil/logical.h"
|
|
#include "baseutil/vector/position.hxx"
|
|
#include "baseutil/vector/vector.hxx"
|
|
Description:
|
This function drops a perpendicular to a line that's given by a point and a vector. The vector need not be normalized. The function returns the distance from the point to the line, and the parameter along the line.
|
|
Errors:
|
input
line_vec is zero
|
|
Library:
|
kernel
|
|
Filename:
|
kern/kernel/geomhusk/geom_utl.hxx
|
|
Effect:
|
Read-only
|