mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +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)
|
||||
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)
|
||||
layer_set.MaterialLayers = layers
|
||||
return layer
|
||||
|
||||
Reference in New Issue
Block a user