mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +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
|
subelement.SweptArea = profile
|
||||||
|
|
||||||
def create_layer_set_usage(self, material_set):
|
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(
|
return self.file.create_entity(
|
||||||
"IfcMaterialLayerSetUsage",
|
"IfcMaterialLayerSetUsage",
|
||||||
**{
|
**{
|
||||||
"ForLayerSet": material_set,
|
"ForLayerSet": material_set,
|
||||||
"LayerSetDirection": "AXIS2" if self.settings["product"].is_a("IfcWall") else "AXIS3",
|
"LayerSetDirection": layer_set_direction,
|
||||||
"DirectionSense": "POSITIVE",
|
"DirectionSense": "POSITIVE",
|
||||||
"OffsetFromReferenceLine": 0,
|
"OffsetFromReferenceLine": 0,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user