diff --git a/src/ifcgeom/mapping/mapping.cpp b/src/ifcgeom/mapping/mapping.cpp index b4685a7a86..ebf854eb93 100644 --- a/src/ifcgeom/mapping/mapping.cpp +++ b/src/ifcgeom/mapping/mapping.cpp @@ -372,6 +372,18 @@ const IfcUtil::IfcBaseEntity* mapping::get_single_material_association(const Ifc } } #endif + +#ifdef SCHEMA_HAS_IfcMaterialConstituent + if (associated_material->as()) { + IfcSchema::IfcMaterialConstituentSet* constituentset = associated_material->as(); + if (settings_.get().value ? constituentset->MaterialConstituents()->get()->size() >= 1 : constituentset->MaterialConstituents()->get()->size() == 1) { + IfcSchema::IfcMaterialConstituent* constituent = (*constituentset->MaterialConstituents()->get()->begin()); + if (auto* m_ = constituent->Material()) { + single_material = m_; + } + } + } +#endif } } }