I was preparing a Terrain model with some building footprints these days.This should be an frequent task, so I imagine a lots of you did this also.
Since it cost me more time than I thought it would to develop this, and I think probably I am overseeing the easiest and most obvious way I would like to ask you how you do this tasks normally or how you would solve it.
So that’s the input, a Brep for the Terrain and some curves as building footprints:
My workflow is the following:
- Contouring the brep
- Make a mesh out of the contour
- Project the contourCurves on the XY Plane
- Project the Footprints
- Split the Footprints with the contours
- Make A midpoint on each fragment of the splitted Footprints
- Shoot a ray from the midpoints through the Mesh from the contour curves
- collecting the last mesh that got shot gives me the path to which contour the footprint splitter belongs.
For later nesting it is important that the footprint splitter match the contour tree exactly(a path with 2 dimensions),like in the picture below:
I hope I could explain it.
Thanks for every input!
Here the file with my attempt:20210426_TerrainLaserCut.gh (507.1 KB)
Also: I posted it in the GH category since I don’t want to limit it to a scripted solution.