From 876f0594594a6a45d6a1648d53b62d8a0d4e19cf Mon Sep 17 00:00:00 2001 From: Cristian Ritter Date: Thu, 15 Aug 2024 14:18:13 -0300 Subject: [PATCH] remove surface white if doesn't have surface colour Signed-off-by: Cristian Ritter --- src/ifcgeom/mapping/mapping.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/ifcgeom/mapping/mapping.cpp b/src/ifcgeom/mapping/mapping.cpp index 00cbacaba4..50d7fad3f6 100644 --- a/src/ifcgeom/mapping/mapping.cpp +++ b/src/ifcgeom/mapping/mapping.cpp @@ -565,15 +565,13 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcStyledItem* inst) { return surface_style; } - surface_style->use_surface_color = settings_.get().get(); + surface_style->use_surface_color = settings_.get().get(); - static taxonomy::colour white = taxonomy::colour(1., 1., 1.); - double rgb[3]; - if (process_colour(shading->SurfaceColour(), rgb)) { - surface_style->surface.components() << rgb[0], rgb[1], rgb[2]; - } else { - surface_style->surface = white; - } + static taxonomy::colour white = taxonomy::colour(1., 1., 1.); + double rgb[3]; + if (process_colour(shading->SurfaceColour(), rgb)) { + surface_style->surface.components() << rgb[0], rgb[1], rgb[2]; + } if (auto rendering_style = shading->as()) { if (rendering_style->DiffuseColour() && process_colour(rendering_style->DiffuseColour(), rgb)) {