Commit suggestion in #7276

This commit is contained in:
Thomas Krijnen
2025-10-22 13:23:34 +02:00
parent 381b0d379a
commit 200c0bf773
+12
View File
@@ -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>()) {
IfcSchema::IfcMaterialConstituentSet* constituentset = associated_material->as<IfcSchema::IfcMaterialConstituentSet>();
if (settings_.get<settings::LayersetFirst>().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
}
}
}