mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Fix errors removing layers/constituents after eeac0a2
This commit is contained in:
@@ -52,7 +52,7 @@ def remove_constituent(
|
|||||||
# invalid.
|
# invalid.
|
||||||
ifcopenshell.api.material.remove_constituent(model, constituent=glazing)
|
ifcopenshell.api.material.remove_constituent(model, constituent=glazing)
|
||||||
"""
|
"""
|
||||||
material = layer.Material
|
material = constituent.Material
|
||||||
file.remove(constituent)
|
file.remove(constituent)
|
||||||
if material and should_remove_material:
|
if material and should_remove_material:
|
||||||
ifcopenshell.util.element.remove_deep2(file, subelement)
|
ifcopenshell.util.element.remove_deep2(file, material)
|
||||||
|
|||||||
@@ -57,4 +57,4 @@ def remove_layer(
|
|||||||
material = layer.Material
|
material = layer.Material
|
||||||
file.remove(layer)
|
file.remove(layer)
|
||||||
if material and should_remove_material:
|
if material and should_remove_material:
|
||||||
ifcopenshell.util.element.remove_deep2(file, subelement)
|
ifcopenshell.util.element.remove_deep2(file, material)
|
||||||
|
|||||||
Reference in New Issue
Block a user