Fix #6258. Fix #5727 properly. Only assume layerset axis on "standard case" elements, nothing else.

This commit is contained in:
Dion Moult
2025-10-26 22:33:39 +11:00
parent 1789406299
commit eea585a3cd
+9 -5
View File
@@ -786,17 +786,21 @@ class Model(bonsai.core.tool.Model):
elif material.is_a("IfcMaterialLayerSet"):
axis = ifcopenshell.util.element.get_pset(element, "EPset_Parametric", "LayerSetDirection")
if axis is None:
if element.is_a() in [
if element.is_a() in (
"IfcSlabType",
"IfcRoofType",
"IfcRampType",
"IfcPlateType",
"IfcCovering",
"IfcFurniture",
]:
"IfcSlab",
"IfcRoof",
"IfcRamp",
"IfcPlate",
):
axis = "AXIS3"
else:
elif element.is_a() in ("IfcWallType", "IfcWall"):
axis = "AXIS2"
else:
return
return f"LAYER{axis[-1]}"
elif material.is_a("IfcMaterialProfileSetUsage"):
# TODO: remove after we support editing profile usages with IfcRevolvedAreaSolid.