Update IfcGeomFunctions.cpp

get the first material even if there are more than one material layer
This commit is contained in:
AlaaB2020
2020-02-24 13:08:21 +02:00
committed by GitHub
parent 1426c7066b
commit 9cab063671
+1 -1
View File
@@ -1422,7 +1422,7 @@ const IfcSchema::IfcMaterial* IfcGeom::Kernel::get_single_material_association(c
// in accordance with other viewers.
if (!single_material && associated_material->as<IfcSchema::IfcMaterialLayerSetUsage>()) {
IfcSchema::IfcMaterialLayerSet* layerset = associated_material->as<IfcSchema::IfcMaterialLayerSetUsage>()->ForLayerSet();
if (layerset->MaterialLayers()->size() == 1) {
if (layerset->MaterialLayers()->size() >= 1) {
IfcSchema::IfcMaterialLayer* layer = (*layerset->MaterialLayers()->begin());
if (layer->hasMaterial()) {
single_material = layer->Material();