Measure Position Distance

This function block calculates the distance between two specified positions in a 2D space. It outputs the differences in both the x and y coordinates, as well as the total distance between the two points.

πŸ“₯ Inputs

Point The first position in the format (x, y).

Point The second position in the format (x, y).

πŸ“€ Outputs

X Distance The difference in the x-coordinates between the two input points.

Y Distance The difference in the y-coordinates between the two input points.

Distance The overall distance between the two positions calculated using the Euclidean distance formula.

πŸ•ΉοΈ Controls

This function block does not have any controls.

🎨 Features

Distance Calculation Utilizes the Euclidean distance formula to provide an accurate measurement of distance between two points.

Multiple Outputs Produces separate values for x distance, y distance, and overall distance, allowing for detailed analysis.

πŸ“ Usage Instructions

  1. Input Points: Connect the first position as a Point input and the second position as another Point input. Ensure both positions are in (x, y) format.

  2. Evaluate the Block: Run the function block to obtain the distance measurements.

πŸ“Š Evaluation

Executing this function block will return the differences in both directions and the total distance between the two positions provided.

πŸ’‘ Tips and Tricks

Position Format

Make sure that the points are always in the correct (x, y) format. You can use Get Pixel or Get ROI function blocks to obtain point coordinates from images easily.

πŸ› οΈ Troubleshooting

Invalid Point Error

If you receive an error about invalid points, ensure that both inputs are connected and formatted correctly. You can also check for Is None to verify valid positions before passing to this function block.

Unexpected Zero Distance

If the distance is unexpectedly zero, confirm that the two input points are not the same. Adjust the inputs accordingly to analyze different points.

Last updated