Skip to main content

create_material_relationship

Function create_material_relationship 

Source
pub fn create_material_relationship(
    tx: &mut Transaction,
    model: &Model,
    name: Option<&str>,
    description: Option<&str>,
    relating: EntityId,
    related: &[EntityId],
    expression: Option<&str>,
) -> MaterialResult<EntityId>
Expand description

Stage an IfcMaterialRelationship. IFC4 onwards.

Relates one material to the materials it is composed of or derived from: a concrete mix to its cement and aggregate. expression records the mix rule as authored prose (IFC4 Expression, IFC4X3 MaterialExpression), not something this crate evaluates.

ยงErrors

Refuses an empty RelatedMaterials set (SET [1:?]), a relating material that is also among the related ones, any reference that is not an IfcMaterial, and an IFC2X3 model.