🔶Distance Between Two Points
Function Description
This operator calculates the Euclidean distance between two points. It can calculate the straight-line distance in 3D space (XYZ), or consider only specific axes or axial plane projection distances (such as X-axis distance only, Y-axis distance only, Z-axis distance only, XY plane distance, XZ plane distance, YZ plane distance).
Supports multiple input modes: calculate distances between corresponding points in two point lists, calculate the distance between one point and all points in a point list, or calculate the distance between all points in a point list and a fixed point defined in parameters.
Usage Scenarios
-
Distance Measurement: Calculate spatial distance between two positioning points, feature points, or object centers.
-
Conditional Judgment: Make decisions based on whether the distance between two objects or feature points meets specific conditions (e.g., less than safe distance, greater than grasping distance).
-
Relative Positioning: Analyze the distance of one point relative to another point (or fixed reference point) in specific axial directions.
Input/Output
Input |
Position One: A list containing one or more 3D point coordinates [X, Y, Z], obtainable from split pick points or pick object pose nodes. Position Two: A list containing one or more 3D point coordinates [X, Y, Z]. This input port is invalid when the "Calculate Distance to Fixed Point" parameter switch is enabled. |
Output |
Distance Between Two Points: A list containing the calculated distance values. List length depends on input mode:
|
Parameter Description
|
Input list length matching: If the calculate distance to fixed point switch is disabled, Position One and Position Two lengths must be equal (e.g., both containing N points, calculating N pairs of point distances), or one list contains only 1 point (calculating distance between this 1 point and all N points in another list). If lengths don’t match and neither is 1, the operator will report an error. |
Specify Axis or Axis Combination for Distance Calculation
Parameter Description |
Selects which coordinate axes to consider when calculating distance. |
Parameter Adjustment |
|
Calculate Distance to Fixed Point
Parameter Description |
Controls whether to calculate distance between two input lists or between input list Position One and a fixed point. |
Parameter Adjustment |
|
Fixed Point Position
Parameter Description |
Takes effect when "Calculate Distance to Fixed Point" switch is enabled, defining the 3D coordinates [X, Y, Z] of the fixed reference point for distance calculation. |
Parameter Adjustment |
Enter a fixed 3D coordinate value here, for example [100, 200, 300]. Each point in Position One will calculate distance to this point. |