Calculate Distance Between Two Points
Functional Description
This operator is used to calculate the Euclidean distance between two points. It can calculate the straight-line distance in 3D space (XYZ), or consider only the projection distance on specific axes or axial planes (e.g., X-axis distance only, Y-axis distance only, Z-axis distance only, XY plane distance, XZ plane distance, YZ plane distance). [cite: 2]
It supports multiple input modes: calculating the distance between corresponding points in two point lists, calculating the distance between one point and all points in a point list, or calculating the distance between all points in a point list and a fixed point defined in the parameters. [cite: 2]
Use Cases
-
Distance Measurement: Calculate the spatial distance between two positioning points, feature points, or object centers. [cite: 2]
-
Conditional Judgment: Make decisions based on whether the distance between two objects or feature points meets specific conditions (e.g., less than a safety distance, greater than a pick distance). [cite: 2]
-
Relative Positioning: Analyze the distance of one point relative to another point (or a fixed reference point) in a specific axial direction. [cite: 2]
Inputs and Outputs
Input Items |
Position 1: A list containing one or more 3D point coordinates [X, Y, Z], which can be obtained from the Split Pick Point or Grab Positional Information node. [cite: 2] Position Two[cite: 2]: A list containing one or more 3D point coordinates [X, Y, Z]. This input port is invalid when the "Calculate distance to the fixed point" switch is enabled. [cite: 2] |
Output Items |
Distance between the two points: A list containing the calculated distance values. The list length depends on the input mode: [cite: 2]
|
Parameter Descriptions
Input List Length Matching: If the "Calculate distance to the fixed point" switch is off, then the lengths of Position 1 and Position Two [cite: 2] must be equal (e.g., both contain N points, calculating the distance between N pairs of points), or one of the lists contains only 1 point (calculating the distance between this 1 point and all N points in the other list). If the lengths do not match and neither is 1, the operator will report an error. [cite: 2] |
Specify the method of distance calculation for an axis or combination of axes [cite: 2]
Parameter Description |
Select which coordinate axes to consider when calculating the distance. [cite: 2] |
Tuning Description |
|
Calculate distance to the fixed point [cite: 2]
Parameter Description |
Controls whether to calculate the distance between two input lists or between input list Position 1 and a fixed point. [cite: 2] |
Tuning Description |
|
Fixed point position [cite: 2]
Parameter Description |
Effective when the "Calculate distance to the fixed point" switch is enabled. Defines the 3D coordinates [X, Y, Z] of the fixed reference point used for distance calculation. [cite: 2] |
Tuning Description |
Input a fixed 3D coordinate value here, e.g., [100, 200, 300]. Each point in Position 1 will have its distance calculated to this point. [cite: 2] |