Distance from a point and topography in Z direction

I am trying to Element.SetParameterByname value for my pier’s height. So I’m trying to calculate distance from my pier’s insertion point to a created topography in Z Axis direction. Any ideas? I was trying to Point.Project to a topography but for that I think I have to first Topography.Mesh and then create polysurface from that mesh with Mesh.ToPolysurface, but that takes some times since my topography is pretty large. I was hoping you could help me with a more elegant and shorter solution. Maybe there is a DistanceTo type of node that calculates distance from a point to topography in Z Axis direction?

I would then calculate Z coordinate distance from pier’s insertion point and the point on topography and set it as my parameter value.


What format is your topo geometry in currently? Element.Geometry should already return the mesh as well as the perimeter curves for you.

If your mesh is clean and have no self intersections, turn it into solid and try this:

Look deeper into Invert option in node.

Why don’t you try to create a simple corridor to implement a featureline for piers insertion points which to be target to surface of the topography?

Now, You have your piers coordinated with the topography with the required distance.

Thank you all for your suggestions. I’ve tried @ingenieroahmad’s suggestion and it works like a charm for me.