Merge pull request #5184 from csritter/v0.8.0

Adding --surface-colour in conversion settings to force the use of surface color instead of diffuse color. Issue #5075
This commit is contained in:
Thomas Krijnen
2024-10-02 17:24:34 +02:00
committed by GitHub
8 changed files with 38 additions and 15 deletions
+8 -5
View File
@@ -565,11 +565,14 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcStyledItem* inst) {
return surface_style;
}
static taxonomy::colour white = taxonomy::colour(1., 1., 1.);
double rgb[3];
if (process_colour(shading->SurfaceColour(), rgb)) {
surface_style->diffuse.components() << rgb[0], rgb[1], rgb[2];
}
surface_style->use_surface_color = settings_.get<settings::SurfaceColour>().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];
surface_style->diffuse = surface_style->surface;
}
if (auto rendering_style = shading->as<IfcSchema::IfcSurfaceStyleRendering>()) {
if (rendering_style->DiffuseColour() && process_colour(rendering_style->DiffuseColour(), rgb)) {