From fe1cb9e92bb8a5cb1970565142db59e7ba91907f Mon Sep 17 00:00:00 2001 From: Otso Alho Date: Tue, 13 Mar 2018 11:00:23 +0200 Subject: [PATCH] default to blank material with IfcMaterial name --- src/ifcgeom/IfcGeomRenderStyles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomRenderStyles.cpp b/src/ifcgeom/IfcGeomRenderStyles.cpp index c47f10a236..09c211a58b 100644 --- a/src/ifcgeom/IfcGeomRenderStyles.cpp +++ b/src/ifcgeom/IfcGeomRenderStyles.cpp @@ -131,7 +131,8 @@ const IfcGeom::SurfaceStyle* IfcGeom::Kernel::get_style(const IfcSchema::IfcMate } } } - return 0; + IfcGeom::SurfaceStyle material_style = IfcGeom::SurfaceStyle(material->id(), material->Name()); + return &(style_cache[material->id()] = material_style); } static std::map default_materials;