Place objects on some topography

Hello everyone! I would like to add point objects on a topography but I also have to make sure that these are actually on the topography. Which script should I use? Currently I have tried this way, trying to use the geometry.intersect node and then I would have to link the 2 group of nodes to this to add the point objects to the centre of the polygons


Please make sure you pin all node preview bubbles before taking a screenshot. That way we can see what your data looks like in the graph. It can also help you troubleshoot on your own.

If you look at the outputs from the Element.Geometry and Element.Solids nodes you’ll see that each element returns a list of geometries. You either need to flatten/combine them before checking for intersections or adjust the list levels, otherwise the node won’t process your inputs correctly.

Which item is which, and what category are they?

I assume the select model element node is the topography, but what category is it?

Hello everyone! I tried this setting as a script, but it doesn’t work. The aim is to make the polygons intersect with the topography, so that they are at the right height. Where is the error?


I’ll just leave my grain of salt here. Hope I’m not wrong. Dealed with something similar last week.

If you are trying to intersect a topography (or a toposolid, that’s what i’m more familiar these days) with those elements, what you need is to project their position into the surface (raybounce, for instance) to generate an origin point for placement.

Another option is make (i.e.) a vertical line for each instance that intersects with the surface to get that point (OOTB intersect node).

If the instances are above the surface, the OOTB intersect node will not generate any results, because they do not intersect. (i’ve never used that ā€œstoolsā€ intersect, so can’t comment on that).

1 Like

I assume topografia is topography, if so then it is mesh and you can try Spring mesh to polysurface, but from 24 its toposolid but you can convert your topography mesh to toposolid and will be solid, but hard to say

1 Like

I’d assume two things here, but as always assumptions are often wrong so we may be way off. Only @VALENTINA.FEDE can confirm.

  1. This is related to the previous topic on converting GIS data imported into Revit over to BIM data in native Revit format, and the goal is to put ā€˜trees at the right elevation’.
  2. Element.Geometry really wants to be Element.Location, and the result of the location node would be a point for each family instance.
  3. Topografia is topography, and it will return a mesh if the geometry is correctly queried.

If the assumptions are correct…

  1. The topography can be converted from a Dynamo Mesh to a MeshToolkit mesh.
  2. The tree location points can then be pulled to a elevation well below the mesh by way of removing the Z component or using a Geometry.ClosestPointTo on the XY plane or the XY plane offset down a given distance.
  3. The tree points at the minimum elevation can be projected to the topography by way the Mesh.Project node in MeshToolkit.
  4. A vector can then be built between the points in the original location node to the poitns on the mesh (the result of the project node).
  5. The original tree elements in the SelectModelElement node can be moved byt he projected distance via the Element.MoveByVector node.

This would be a few orders of magnitude faster than converting to a PolySurface, never mind the intersection action or projection.

1 Like

yeah, but think some other thing as element.geometry give null. normally it should just give mesh i think…

Topography.Mesh feels like a good candidate there… or Element.Solids if it’s a newer toposolid. If that’s the case then looking into the HostElementUtils class is likely a good direction as I am 90% certain it can extract the top faces of the topography in a heartbeat. Those could be used to build a polysurface (slow) or converted into a mesh toolkit.

Again, lots of assumptions here and we have no way of knowing which assumptions are correct.

:wink: true

1 Like

you mention copy by vector is that a new node ootb in newer version ?..arh i read wrong, newer mind…it was move by vector…good morning…heheh

1 Like

Hello everyone! Thank you for your availability. I haven’t had a chance to test your suggestions yet. I will keep you updated

1 Like

asked for help for something similar awhile back. Final script may offer some guidance to a solution, but probably require some tweaking to your specifications. Take a look here: Why Is Dynamo Duplicating Element When Should Only Modify Existing Element - Geometry - Dynamo