Minimum distance between surfaces Dynamo

Hi,
I need to make a routine to be able to get the minimum distance between 2 surfaces, I already tried with Geometry.DistanceTo but I couldn’t get a geometry from my existing surfaces so this node was not useful, someone knows if there is a way to do this?

Hello mate. I managed to get this working:

(Camber package installed)

1 Like

That doesn’t give you the minimum distance, because the vertical projection onto the face represents the minimum distance.
image

The solution above will get the distance between two geometry objects - your illustration a comment indicates you want the distance on in the vertical axis only though.

If you have two TIN surfaces for this you can use the ‘elevation at point’ node and subtract the difference to get that value.

As an idea
Get lower level point for first surface
Then calculate distance to tow surface

the lower point on surface 1 is not necessarily always the point closest to surface 2.

You are right
So get all Vertexes from first surface
Then calculate distance to the second surface

I sometimes use nodes from the ArkanceSystems Package. However, I encounter issues with complex surfaces.

I’m confused. In this section are you trying to find the distance 1 or the distance 2?

Distance 1 I would get by converting the relevant portion of the surfaces to a MeshToolkit mesh or PolySurface and using a Geometry.DistanceTo node.

Distance 2 I would get by extracting the lowest point from the upper surface’s points list and pulling the distance to a MeahToolkit mesh or a PolySurface built from the lower surface.

1 Like

After many tests, I found that it works the same way as the ‘Minimum Distance Between Surfaces’ command in Civil 3D.
Min_distance
Civil 3D