distance_point_line distance_point_line DistancePointLine DistancePointLine distance_point_line (Operator)
distance_point_line distance_point_line DistancePointLine DistancePointLine distance_point_line
— Calculate the distance between a 3D point and a 3D line given by two
points on the line.
Signature
Herror distance_point_line (double PointX , double PointY , double PointZ , double Point1X , double Point1Y , double Point1Z , double Point2X , double Point2Y , double Point2Z , double* Distance )
Herror T_distance_point_line (const Htuple PointX , const Htuple PointY , const Htuple PointZ , const Htuple Point1X , const Htuple Point1Y , const Htuple Point1Z , const Htuple Point2X , const Htuple Point2Y , const Htuple Point2Z , Htuple* Distance )
void DistancePointLine (const HTuple& PointX , const HTuple& PointY , const HTuple& PointZ , const HTuple& Point1X , const HTuple& Point1Y , const HTuple& Point1Z , const HTuple& Point2X , const HTuple& Point2Y , const HTuple& Point2Z , HTuple* Distance )
static HTuple HMisc ::DistancePointLine (const HTuple& PointX , const HTuple& PointY , const HTuple& PointZ , const HTuple& Point1X , const HTuple& Point1Y , const HTuple& Point1Z , const HTuple& Point2X , const HTuple& Point2Y , const HTuple& Point2Z )
static double HMisc ::DistancePointLine (double PointX , double PointY , double PointZ , double Point1X , double Point1Y , double Point1Z , double Point2X , double Point2Y , double Point2Z )
static void HOperatorSet .DistancePointLine (HTuple pointX , HTuple pointY , HTuple pointZ , HTuple point1X , HTuple point1Y , HTuple point1Z , HTuple point2X , HTuple point2Y , HTuple point2Z , out HTuple distance )
static HTuple HMisc .DistancePointLine (HTuple pointX , HTuple pointY , HTuple pointZ , HTuple point1X , HTuple point1Y , HTuple point1Z , HTuple point2X , HTuple point2Y , HTuple point2Z )
static double HMisc .DistancePointLine (double pointX , double pointY , double pointZ , double point1X , double point1Y , double point1Z , double point2X , double point2Y , double point2Z )
def distance_point_line (point_x : MaybeSequence[float], point_y : MaybeSequence[float], point_z : MaybeSequence[float], point_1x : MaybeSequence[Union[float, int]], point_1y : MaybeSequence[Union[float, int]], point_1z : MaybeSequence[Union[float, int]], point_2x : MaybeSequence[Union[float, int]], point_2y : MaybeSequence[Union[float, int]], point_2z : MaybeSequence[Union[float, int]]) -> Sequence[float]
def distance_point_line_s (point_x : MaybeSequence[float], point_y : MaybeSequence[float], point_z : MaybeSequence[float], point_1x : MaybeSequence[Union[float, int]], point_1y : MaybeSequence[Union[float, int]], point_1z : MaybeSequence[Union[float, int]], point_2x : MaybeSequence[Union[float, int]], point_2y : MaybeSequence[Union[float, int]], point_2z : MaybeSequence[Union[float, int]]) -> float
Description
distance_point_line distance_point_line DistancePointLine DistancePointLine distance_point_line
calculates the orthogonal distance
between 3D points and 3D lines. The lines are specified by two
points on the line (
and
).
The result is returned in Distance Distance Distance distance distance
.
The input tuples can define 1 or n points.
The points are specified by
(PointX PointX PointX pointX point_x
, PointY PointY PointY pointY point_y
, PointZ PointZ PointZ pointZ point_z
).
The line is specified by two points on the line
(Point1X Point1X Point1X point1X point_1x
, Point1Y Point1Y Point1Y point1Y point_1y
, Point1Z Point1Z Point1Z point1Z point_1z
) and
(Point2X Point2X Point2X point2X point_2x
, Point2Y Point2Y Point2Y point2Y point_2y
, Point2Z Point2Z Point2Z point2Z point_2z
).
Let
denote the point
(PointX PointX PointX pointX point_x
, PointY PointY PointY pointY point_y
, PointZ PointZ PointZ pointZ point_z
),
the first point
(Point1X Point1X Point1X point1X point_1x
, Point1Y Point1Y Point1Y point1Y point_1y
, Point1Z Point1Z Point1Z point1Z point_1z
) on the line, and
the second point
(Point2X Point2X Point2X point2X point_2x
, Point2Y Point2Y Point2Y point2Y point_2y
, Point2Z Point2Z Point2Z point2Z point_2z
) on the line.
First, the line direction
and
its length
are computed.
If
, the points
and
do not define a line and an error is returned.
Furthermore, let
denote the distance Distance Distance Distance distance distance
. Then,
,
where
denotes the cross product of two vectors.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Processed without parallelization.
Parameters
PointX PointX PointX pointX point_x
(input_control) point3d.x(-array) →
HTuple MaybeSequence[float] HTuple Htuple (real) (double ) (double ) (double )
X coordinate of the original points.
PointY PointY PointY pointY point_y
(input_control) point3d.y(-array) →
HTuple MaybeSequence[float] HTuple Htuple (real) (double ) (double ) (double )
Y coordinate of the original points.
PointZ PointZ PointZ pointZ point_z
(input_control) point3d.z(-array) →
HTuple MaybeSequence[float] HTuple Htuple (real) (double ) (double ) (double )
Z coordinate of the original points.
Point1X Point1X Point1X point1X point_1x
(input_control) point3d.x(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
X coordinate of the first point on the line.
Point1Y Point1Y Point1Y point1Y point_1y
(input_control) point3d.y(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Y coordinate of the first point on the line.
Point1Z Point1Z Point1Z point1Z point_1z
(input_control) point3d.z(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Z coordinate of the first point on the line.
Point2X Point2X Point2X point2X point_2x
(input_control) point3d.x(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
X coordinate of the second point on the line.
Point2Y Point2Y Point2Y point2Y point_2y
(input_control) point3d.y(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Y coordinate of the second point on the line.
Point2Z Point2Z Point2Z point2Z point_2z
(input_control) point3d.z(-array) →
HTuple MaybeSequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Z coordinate of the second point on the line.
Distance Distance Distance distance distance
(output_control) real(-array) →
HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Distance between the points and the lines.
Possible Predecessors
get_line_of_sight get_line_of_sight GetLineOfSight GetLineOfSight get_line_of_sight
Alternatives
distance_point_pluecker_line distance_point_pluecker_line DistancePointPlueckerLine DistancePointPlueckerLine distance_point_pluecker_line
See also
point_pluecker_line_to_hom_mat3d point_pluecker_line_to_hom_mat3d PointPlueckerLineToHomMat3d PointPlueckerLineToHomMat3d point_pluecker_line_to_hom_mat3d
Module
Foundation