Help with Sloped Roof Trimming and Path Offsets

"Hi, I’m working on a masterplan project using Grasshopper. I need help streamlining my script logic.

What I’m doing:

  1. Islands: Subtracting road polygons from a site boundary to create building footprints.

  2. Offset: Creating a 100cm inward buffer using ‘Offset Intersection’ (to handle sharp triangular corners).

  3. Courtyards: Adding a central rectangular void (15% of area).

  4. Volumes: Extruding buildings to 27m outside, and trimming buildings inside to fit an existing Sawtooth Roof Brep.

The Problem:
My script is getting messy and I’m getting ‘self-intersection’ errors in sharp corners. I also need to ensure the final geometry is projected correctly to the model’s Z-elevation.

Looking for a clean, linear way to handle the Boolean Difference of the paths and the Brep Split with the sloped roof without crashing.

Thanks for any help!"

unnamed.gh (17.7 KB)