| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Adding a window/skylight to a parametric IfcRoof left the filling vertical with no opening cut, because roofs never get an IfcMaterialLayerSetUsage. get_material_layer_parameters() defaulted the layer set direction to AXIS2 (wall-like: translation only) whenever no material was found, so a roof silently fell into the wall placement branch instead of the slab-like AXIS3 one. get_material_layer_parameters() now falls back to a class-based direction (reusing the same class list get_usage_type() already uses) when there's no material to read LayerSetDirection from, so IfcRoof/ IfcSlab/IfcRamp/IfcPlate default to AXIS3 instead of AXIS2. That alone would only flatten the filling horizontally, since the existing AXIS3 placement assumed a single flat top face (host's own world rotation, twisted -90 degrees around X) and never looked at the actual face being cut. A parametric roof's own object usually isn't tilted at all even though individual faces are sloped, so a new get_surface_aligned_rotation() helper derives the rotation from the raycasted face normal instead, only for hosts with no material layer set to read a flat elevation from. Hosts with a real material layer set (the previously working flat-slab and whole-object-tilted "Horizontal Layers" roof cases) keep the exact old code path, unchanged. Verified live in headless Blender: a default hipped parametric roof's skylight now rotates to match the sloped face exactly (thickness axis dot product with the face normal is 1.0) and cuts a real opening. Wall windows and flat-slab-with-material skylights are unaffected. Fixes IfcOpenShell#5611. This file was modified with the assistance of an AI coding tool.
Sorry, something went wrong.
|
Weird, but even freshly made opening objects have the same effect on roof objects. I need to revert your PR from my build and see if the problem goes away. |
Sorry, something went wrong.
|
OK, the issue predates your PR. I can't give confirmation that this PR fixes the original issue till I figure out why roof openings don't work. I'm looking into that. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #5611.
Adding a window/skylight to a parametric Roof left the filling vertical with no opening cut. get_material_layer_parameters() defaulted the layer set direction to AXIS2 (wall-like, translation only) whenever no material was found, and parametric roofs never get a material layer set, so they silently fell into the wall placement branch. The AXIS3 (slab-like) placement also assumed a single flat top face, so it wouldn't have aligned to a sloped face even with the right default.
This adds:
Hosts with a real IfcMaterialLayerSetUsage (flat slabs, tilted "Horizontal Layers" roofs) keep the exact previous code path, so those working cases are unaffected by construction.
Test plan
Thanks @sboddy for the report.
Generated with the assistance of an AI coding tool.