From 9cab063671e2aeec58d4051310a9038d59e8927a Mon Sep 17 00:00:00 2001 From: AlaaB2020 <56257353+AlaaB2020@users.noreply.github.com> Date: Mon, 24 Feb 2020 13:08:21 +0200 Subject: [PATCH] Update IfcGeomFunctions.cpp get the first material even if there are more than one material layer --- src/ifcgeom/IfcGeomFunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index de263b3755..e5e3fdfe64 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -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::IfcMaterialLayerSet* layerset = associated_material->as()->ForLayerSet(); - if (layerset->MaterialLayers()->size() == 1) { + if (layerset->MaterialLayers()->size() >= 1) { IfcSchema::IfcMaterialLayer* layer = (*layerset->MaterialLayers()->begin()); if (layer->hasMaterial()) { single_material = layer->Material();