Get the Z distance between 2 objects: a 2 point generic adaptive and a topography

Hi Can someone help with this:
I have made a 2 point adaptive generic models that intersect a topography, in order to get the Z direction from any building elevation to the topo. At the moment, I place the first adaptive point to say a corner of the parapet roof, the second adaptive point at below the topo. Then I move the second adaptive point manually so it intersect with the topo. Then I run the script to get the Z direction between point 1 and 2. See graph.

Is there an automatic way to move the second point to be snap in the topo ? or a way to measure the first point and its distance to the topo ?

Many thanks.

Hi,
quick answer to your second question, check the OOTB geometry.distanceTo node Dynamo Dictionary

and to reply to your first question, dig into this:

or this

1 Like

You can get the geometry of topo and then use Point.Project node to get point on topo.

1 Like

Thanks Jean. Will take a look.

Thanks Deniz will take a look.

Thanks everyone. I was able to get this working, using Spring nodes Geometry.IndexByDistance.
Pretty sweat :slight_smile:

1 Like