Skip to main content

create_material_definition_representation

Function create_material_definition_representation 

Source
pub fn create_material_definition_representation(
    tx: &mut Transaction,
    model: &Model,
    name: Option<&str>,
    description: Option<&str>,
    representations: &[EntityId],
    material: EntityId,
) -> MaterialResult<EntityId>
Expand description

Stage an IfcMaterialDefinitionRepresentation.

Gives a material its presentation: the styled representations that say how it draws. The schema states OnlyStyledRepresentations (IFC2X3 WR11), so every entry must be an IfcStyledRepresentation – a surface style hung on a plain IfcShapeRepresentation parses and then renders as nothing.

§Errors

Refuses an empty representation list (LIST [1:?]), any entry that is not an IfcStyledRepresentation, and a RepresentedMaterial that is not an IfcMaterial.