Start and end points of measurement vector

Hello everyone!

I am interested in being able to find the two points that the measure command measures between when calling it between two surfaces. For example, measure between surface 1 and 2 will return the shortest distance between those surfaces, but not the points that that distance lies between. The vector displayed in the GUI surely uses those points, so I imagine the information is available, I just have been unable to figure out a method to access it.

Any ideas would be appreciated!

Thanks

Hi @Edgar21,

you can query the distance and closest points with the python interface for entities.

cubit.init("")
cubit.cmd("reset")
cubit.cmd("create brick x 1")
cubit.cmd("volume 1 copy move x 2 y 2 z 2")

dist_info = cubit.measure_between_entities("volume" , 1, "volume" , 2)
dist = dist_info[0]
vol_1_point = [dist_info[1], dist_info[2], dist_info[3]]
vol_2_point = [dist_info[4], dist_info[5], dist_info[6]]

print("Distance:")
print(dist)
print("Coordinates on Volume 1:")
print(vol_1_point)
print("Coordinates on Volume 2:")
print(vol_2_point)

1 Like

This works! thank you very much