ifcopenshell.api.material.edit_layer
¶
Module Contents¶
- ifcopenshell.api.material.edit_layer.edit_layer(file: ifcopenshell.file, layer: ifcopenshell.entity_instance, attributes: dict[str, Any] | None = None, material: ifcopenshell.entity_instance | None = None) None ¶
Edits the attributes of an IfcMaterialLayer
For more information about the attributes and data types of an IfcMaterialLayer, consult the IFC documentation.
- Parameters:
layer (ifcopenshell.entity_instance) – The IfcMaterialLayer entity you want to edit
attributes (dict, optional) – a dictionary of attribute names and values.
material (ifcopenshell.entity_instance, optional) – The IfcMaterial entity you want the layer to be made from.
- Returns:
None
- Return type:
None
Example:
# Let's create two materials typically used for steel stud partition # walls with gypsum lining. gypsum = ifcopenshell.api.material.add_material(model, name="PB01", category="gypsum") steel = ifcopenshell.api.material.add_material(model, name="ST01", category="steel") # Create a material layer set to contain our layers. material_set = ifcopenshell.api.material.add_material_set(model, name="GYP-ST-GYP", set_type="IfcMaterialLayerSet") # Now let's use those materials as three layers in our set, such # that the steel studs are sandwiched by the gypsum. Let's imagine # we're setting the layer thickness in millimeters. layer = ifcopenshell.api.material.add_layer(model, layer_set=material_set, material=gypsum) ifcopenshell.api.material.edit_layer(model, layer=layer, attributes={"LayerThickness": 13}) layer = ifcopenshell.api.material.add_layer(model, layer_set=material_set, material=steel) ifcopenshell.api.material.edit_layer(model, layer=layer, attributes={"LayerThickness": 92}) layer = ifcopenshell.api.material.add_layer(model, layer_set=material_set, material=gypsum) ifcopenshell.api.material.edit_layer(model, layer=layer, attributes={"LayerThickness": 13})