Distance Between two meshs on specific points

This is probably way over my head but…

I’m trying to find a way to measure the closest distance between two meshes on a Z axis, the problem is that i have random meshes on my project and I need to measure from each mesh

And I need to do the measurement from each single on off those on the two extreme points to the closest mesh that “hit” the line on a Z axis.test - brises.gh (22.6 KB)

Do you only want to measure in the “downward” direction, from the end points of the meshes above?

// Rolf

yes, just that, but from each one

I opened the file, bu there’s no defined “up” or “down”. It’s a circlular pattern,

… so I guess you would want to test in the tangential direction at each position around the cirle. Looing at the pitcure above, the Y axis would be “up”, then the question is, should the tangential direction be clockwise or counter clockwise? Perhaps it doesn’t matter?

Edit: Ah, sorry, there was another group of meshes… (they were hidden)

// Rolf

yeah, the other group will be another problem but i think once i figure the horizontal ones right ill be able to do on the vertical ones. so, did you understood the idea that im trying to do?

Is there a way to move a point untill it hits another mesh? (just on the Z axis downwards)

Yes, you can “shoot rays”, but that is not a good idea in this case because you can miss. But you are not interested in hits from specific points, only closest points, from the ends of the breps.

I assuming that it’s a good starting point to test from the midpoint of the (lower) cross edge of the ends of each brep, by placing a perpendicular plane rigtht there, and testing downwards. I think the best strategy is to do plane intersection tests on all edges of the breps below, from those “end planes” and that will result in points where the edges intersects the planes, and then check those (few) points for the closest point from each end plane.

I’m a bit busy now, but I think that strategy should work.

Planes beingplaced like so, and then do intersection tests on the breps-edges below:

I hope you get the idea.

// Rolf