This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| ifc_recolor_to_glb.py | |
| Load an IFC, paint every wall and slab red, write the model out, and convert it | |
| to GLB with the official IfcConvert binary. | |
| What it does: keeps ONLY IfcWall/IfcSlab (inheritance-aware, so *StandardCase subtypes | |
| count), assigns a red IfcSurfaceStyle to their representation items (recursing through | |
| IfcMappedItem), writes a temp IFC, and runs `IfcConvert --y-up --use-material-names`. | |
| Tested: ifcopenshell 0.8.5 / IfcConvert 0.8.5 / Python 3.12 on a synthetic IFC4 fixture | |
| and the buildingSMART PCERT Building-Architecture.ifc (IFC4) - every wall/slab verified |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.