From 7d50491a998687f3567345886cefe61210070fa5 Mon Sep 17 00:00:00 2001 From: Cristian Ritter Date: Tue, 20 Aug 2024 12:16:19 -0300 Subject: [PATCH] checking if diffuse has value, if not, use surface Signed-off-by: Cristian Ritter --- src/ifcgeom/taxonomy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeom/taxonomy.h b/src/ifcgeom/taxonomy.h index 6399f513aa..e9b2a5afe1 100644 --- a/src/ifcgeom/taxonomy.h +++ b/src/ifcgeom/taxonomy.h @@ -327,7 +327,7 @@ typedef item const* ptr; style(const std::string& name) : name(name), specularity(std::numeric_limits::quiet_NaN()), transparency(std::numeric_limits::quiet_NaN()), use_surface_color(false) {} colour get_color() const { - if (use_surface_color && surface) { + if ((use_surface_color && surface) || !diffuse) { return surface; } return diffuse;