Operator Reference

distance_point_linedistance_point_lineDistancePointLineDistancePointLinedistance_point_line (Operator)

distance_point_linedistance_point_lineDistancePointLineDistancePointLinedistance_point_line — Calculate the distance between a 3D point and a 3D line given by two points on the line.

Signature

distance_point_line( : : PointX, PointY, PointZ, Point1X, Point1Y, Point1Z, Point2X, Point2Y, Point2Z : Distance)

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_linedistance_point_lineDistancePointLineDistancePointLinedistance_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 DistanceDistanceDistancedistancedistance. The input tuples can define 1 or n points. The points are specified by (PointXPointXPointXpointXpoint_x, PointYPointYPointYpointYpoint_y, PointZPointZPointZpointZpoint_z). The line is specified by two points on the line (Point1XPoint1XPoint1Xpoint1Xpoint_1x, Point1YPoint1YPoint1Ypoint1Ypoint_1y, Point1ZPoint1ZPoint1Zpoint1Zpoint_1z) and (Point2XPoint2XPoint2Xpoint2Xpoint_2x, Point2YPoint2YPoint2Ypoint2Ypoint_2y, Point2ZPoint2ZPoint2Zpoint2Zpoint_2z).

Let denote the point (PointXPointXPointXpointXpoint_x, PointYPointYPointYpointYpoint_y, PointZPointZPointZpointZpoint_z), the first point (Point1XPoint1XPoint1Xpoint1Xpoint_1x, Point1YPoint1YPoint1Ypoint1Ypoint_1y, Point1ZPoint1ZPoint1Zpoint1Zpoint_1z) on the line, and the second point (Point2XPoint2XPoint2Xpoint2Xpoint_2x, Point2YPoint2YPoint2Ypoint2Ypoint_2y, Point2ZPoint2ZPoint2Zpoint2Zpoint_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 DistanceDistanceDistancedistancedistance. 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

PointXPointXPointXpointXpoint_x (input_control)  point3d.x(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

X coordinate of the original points.

PointYPointYPointYpointYpoint_y (input_control)  point3d.y(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

Y coordinate of the original points.

PointZPointZPointZpointZpoint_z (input_control)  point3d.z(-array) HTupleMaybeSequence[float]HTupleHtuple (real) (double) (double) (double)

Z coordinate of the original points.

Point1XPoint1XPoint1Xpoint1Xpoint_1x (input_control)  point3d.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

X coordinate of the first point on the line.

Point1YPoint1YPoint1Ypoint1Ypoint_1y (input_control)  point3d.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Y coordinate of the first point on the line.

Point1ZPoint1ZPoint1Zpoint1Zpoint_1z (input_control)  point3d.z(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Z coordinate of the first point on the line.

Point2XPoint2XPoint2Xpoint2Xpoint_2x (input_control)  point3d.x(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

X coordinate of the second point on the line.

Point2YPoint2YPoint2Ypoint2Ypoint_2y (input_control)  point3d.y(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Y coordinate of the second point on the line.

Point2ZPoint2ZPoint2Zpoint2Zpoint_2z (input_control)  point3d.z(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Z coordinate of the second point on the line.

DistanceDistanceDistancedistancedistance (output_control)  real(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Distance between the points and the lines.

Possible Predecessors

get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightget_line_of_sight

Alternatives

distance_point_pluecker_linedistance_point_pluecker_lineDistancePointPlueckerLineDistancePointPlueckerLinedistance_point_pluecker_line

See also

point_pluecker_line_to_hom_mat3dpoint_pluecker_line_to_hom_mat3dPointPlueckerLineToHomMat3dPointPlueckerLineToHomMat3dpoint_pluecker_line_to_hom_mat3d

Module

Foundation