mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix bug where material layer set usage axis was not consistent for non walls
This commit is contained in:
@@ -91,11 +91,23 @@ class Usecase:
|
||||
subelement.SweptArea = profile
|
||||
|
||||
def create_layer_set_usage(self, material_set):
|
||||
if self.settings["product"].is_a() in [
|
||||
"IfcSlab",
|
||||
"IfcSlabStandardCase",
|
||||
"IfcSlabElementedCase",
|
||||
"IfcRoof",
|
||||
"IfcRamp",
|
||||
"IfcPlate",
|
||||
"IfcPlateStandardCase",
|
||||
]:
|
||||
layer_set_direction = "AXIS3"
|
||||
else:
|
||||
layer_set_direction = "AXIS2"
|
||||
return self.file.create_entity(
|
||||
"IfcMaterialLayerSetUsage",
|
||||
**{
|
||||
"ForLayerSet": material_set,
|
||||
"LayerSetDirection": "AXIS2" if self.settings["product"].is_a("IfcWall") else "AXIS3",
|
||||
"LayerSetDirection": layer_set_direction,
|
||||
"DirectionSense": "POSITIVE",
|
||||
"OffsetFromReferenceLine": 0,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user