mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 19:56:20 +00:00
Found out layer names don't exist in IFC2X3 that's incredible
This commit is contained in:
@@ -85,7 +85,10 @@ def add_layer(
|
|||||||
"""
|
"""
|
||||||
unit_scale = ifcopenshell.util.unit.calculate_unit_scale(file)
|
unit_scale = ifcopenshell.util.unit.calculate_unit_scale(file)
|
||||||
layers = list(layer_set.MaterialLayers or [])
|
layers = list(layer_set.MaterialLayers or [])
|
||||||
layer = file.create_entity("IfcMaterialLayer", Material=material, LayerThickness=0.1 / unit_scale, Name=name)
|
if file.schema == "IFC2X3":
|
||||||
|
layer = file.create_entity("IfcMaterialLayer", Material=material, LayerThickness=0.1 / unit_scale)
|
||||||
|
else:
|
||||||
|
layer = file.create_entity("IfcMaterialLayer", Material=material, LayerThickness=0.1 / unit_scale, Name=name)
|
||||||
layers.append(layer)
|
layers.append(layer)
|
||||||
layer_set.MaterialLayers = layers
|
layer_set.MaterialLayers = layers
|
||||||
return layer
|
return layer
|
||||||
|
|||||||
Reference in New Issue
Block a user