ifcopenshell.api.material.remove_material_set

Module Contents

ifcopenshell.api.material.remove_material_set.remove_material_set(file: ifcopenshell.file, material: ifcopenshell.entity_instance) None

Removes a material set

All set items, such as layers, profiles, or constituents will also be removed. However, the materials and profile curves used by the layers, profiles and constituents will not be removed.

Parameters:

material (ifcopenshell.entity_instance) – The IfcMaterialLayerSet, IfcMaterialConstituentSet, IfcMaterialProfileSet entity you want to remove.

Returns:

None

Return type:

None

Example:

# Create a material set
material_set = ifcopenshell.api.material.add_material_set(model,
    name="GYP-ST-GYP", set_type="IfcMaterialLayerSet")

# Create some materials
gypsum = ifcopenshell.api.material.add_material(model, name="PB01", category="gypsum")
steel = ifcopenshell.api.material.add_material(model, name="ST01", category="steel")

# Add some layers
layer = ifcopenshell.api.material.add_layer(model, layer_set=material_set, material=gypsum)
layer = ifcopenshell.api.material.add_layer(model, layer_set=material_set, material=steel)
layer = ifcopenshell.api.material.add_layer(model, layer_set=material_set, material=gypsum)

# Completely delete the set and all layers. The gypsum and steel
# material still exist, though.
ifcopenshell.api.material.remove_material_set(model, material=material_set)