Account 2x3/4 differences in Shading/Rendering::Transparency()

This commit is contained in:
Thomas Krijnen
2025-10-30 18:35:20 +01:00
parent ba3517f3aa
commit bd5a1b5bda
+12 -1
View File
@@ -670,12 +670,23 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceStyle* style) {
if (rendering_style->TransmissionColour()) { if (rendering_style->TransmissionColour()) {
// Not supported // Not supported
} }
#ifndef SCHEMA_IfcSurfaceStyleShading_HAS_Transparency
// ifc2x3
if (rendering_style->Transparency()) { if (rendering_style->Transparency()) {
const double d = *rendering_style->Transparency(); const double d = *rendering_style->Transparency();
surface_style->transparency = d; surface_style->transparency = d;
} }
#endif
} }
#ifdef SCHEMA_IfcSurfaceStyleShading_HAS_Transparency
// ifc4 and onwards
if (shading->Transparency()) {
const double d = *shading->Transparency();
surface_style->transparency = d;
}
#endif
return surface_style; return surface_style;
} }