mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Account 2x3/4 differences in Shading/Rendering::Transparency()
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user