ifcopenshell.api.material.copy_material
¶
Module Contents¶
- ifcopenshell.api.material.copy_material.copy_material(file: ifcopenshell.file, material: ifcopenshell.entity_instance) ifcopenshell.entity_instance ¶
Copies a material or material set
All material psets and styles are copied. The copied material is not associated to any elements.
If a material set is copied, the set items are also copied. However the underlying materials (and profiles) used within the set items are reused.
If a material is associated with a presentation style, that presentation style is reused.
- Parameters:
material (ifcopenshell.entity_instance) – The IfcMaterialDefinition to copy
- Returns:
The new copy of the material
- Return type:
ifcopenshell.entity_instance
Example:
concrete = ifcopenshell.api.material.add_material(model, name="CON01", category="concrete") # Let's duplicate the concrete material concrete_copy = ifcopenshell.api.material.copy_material(model, material=concrete)