mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 19:36:21 +00:00
Update IfcGeomFunctions.cpp
get the first material even if there are more than one material layer
This commit is contained in:
@@ -1422,7 +1422,7 @@ const IfcSchema::IfcMaterial* IfcGeom::Kernel::get_single_material_association(c
|
|||||||
// in accordance with other viewers.
|
// in accordance with other viewers.
|
||||||
if (!single_material && associated_material->as<IfcSchema::IfcMaterialLayerSetUsage>()) {
|
if (!single_material && associated_material->as<IfcSchema::IfcMaterialLayerSetUsage>()) {
|
||||||
IfcSchema::IfcMaterialLayerSet* layerset = associated_material->as<IfcSchema::IfcMaterialLayerSetUsage>()->ForLayerSet();
|
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());
|
IfcSchema::IfcMaterialLayer* layer = (*layerset->MaterialLayers()->begin());
|
||||||
if (layer->hasMaterial()) {
|
if (layer->hasMaterial()) {
|
||||||
single_material = layer->Material();
|
single_material = layer->Material();
|
||||||
|
|||||||
Reference in New Issue
Block a user