Hello everyone! I need some assistance with my Grasshopper project. I’m attempting to generate a house model using a cadastral plan. I wrote a Python script that removes all the black lines from the cadastral plan except the red lines, which represent my land lot. The resulting DXF file contains only the red lines that I need and I imported that into grasshopper. I’m now looking to modify the land lot borders to conform with building laws. My ultimate goal is to use this modified shape as the base for the house and extrude it with various roof shapes.
How can I edit the Edges separate from one another (without having to manually select them), so that it would be applicable on other cadastral plans aswell?
If you want to automate this process across several shapes, you need some geometrical rules to determine which offset to apply to which side. Like “if the edge is oriented north, then the offset if 4m.” or “if it’s adjacent to another block, then the offset is 6m”.
If it’s impossible to determine such rules without a human being analyzing the drawing, then you could set those edges manually in different layers and let Grasshopper compute the shape.
Either way, it would be great if you could post an example on the forum, with the aforementioned red lines internalized.
I used several other pieces of info to determine the lot’s characteristics, mainly adjacent lots, and the road info to determine the front of the lot. Through this, you can identify and operate on the setbacks of each case.
This is the script that basically takes my cadastral plan / copies it and saves it as a DXF-File with only the red lines that represent the lot boarders.
I live in Switzerland so every municipality has their own rules on how far the fassade can be from the lot boarder. Luckily they almost always go by N,E,S,W. So for example the building regulations state that the southern fassade has to be 6 meters away from the boarder and so on. Our cadastral plans or always facing north so the top of my shape is north. I don’t need to fully automate it, but have number slides to edit the 4 edges independent of each other.
The entire “trick” when using Grasshopper (or python, C#, …) to automate things is that you clearly state all the rules. In the image that you attached (note, you were asked for *.gh file with input geometry internalized), there aren’t “4 edges”. There are - at least - 7. How do the rules apply to these?
-wim
Got it, yeah my train of thought was way off. I worked with paths, these are the documents I was working with. My guess is, I have to work with the center of my form and then define with the help of a bounding box which edges/points belong to N, E, S, W and then move only the points along a vector. Cadastral Copy.gh (29.9 KB) Cadastralplan Form Red Lines.dxf (19.5 KB) Whole Cadastralplan.dxf (1.5 MB)
Here is an idea - filter the edges by side and apply the offsets.
Though I’m confident this will not work consistently given the variety of borders you can get…
Great! It works for the example. Thank you so much for your help, I appreciate it. However, I need to analyze the script first to fully understand it. As you may have noticed, I’m not yet very familiar with GH. Take care