Parametric roof geometry is now whitelisted for IfcSlab.ROOF and IfcCovering.ROOFING too.

This commit is contained in:
Dion Moult
2025-03-12 18:47:50 +11:00
parent 226736eb41
commit a941eb3f90
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -425,8 +425,14 @@ def update_roof_modifier_ifc_data(context: bpy.types.Context) -> None:
return False
# type attributes
if props.roof_type == "HIP/GABLE ROOF":
element.PredefinedType = "GABLE_ROOF" if roof_is_gabled() else "HIP_ROOF"
ifc_class = element.is_a()
if ifc_class in ("IfcRoof", "IfcRoofType"):
if props.roof_type == "HIP/GABLE ROOF":
element.PredefinedType = "GABLE_ROOF" if roof_is_gabled() else "HIP_ROOF"
elif ifc_class in ("IfcSlab", "IfcSlabType"):
element.PredefinedType = "ROOF"
elif ifc_class in ("IfcCoveringType", "IfcCoveringType"):
element.PredefinedType = "ROOFING"
tool.Model.add_body_representation(obj)
+1 -1
View File
@@ -170,7 +170,7 @@ class IfcClassData:
templates.extend([None, ("STAIR", "Stair", "Parametric stair")])
elif ifc_class in ("IfcRailingType", "IfcRailing"):
templates.extend([None, ("RAILING", "Railing", "Parametric railing")])
elif ifc_class in ("IfcRoofType", "IfcRoof"):
elif ifc_class in ("IfcRoofType", "IfcRoof", "IfcSlabType", "IfcSlab", "IfcCovering", "IfcCoveringType"):
templates.extend([None, ("ROOF", "Roof", "Parametric roof with a constant pitch")])
elif ifc_class and "Segment" in ifc_class:
templates.extend(