Skip to content
Snippets Groups Projects
Commit 470fbf54 authored by Seth Hillbrand's avatar Seth Hillbrand :flag_il: Committed by Wayne Stambaugh
Browse files

Prevent FACE color overrides

Currently, face colors are not correctly parsed/loaded and so z-fight
with the body color in renders.

Fixes kicad/code/kicad#9835

Fixes kicad/code/kicad#9416
parent 57af9900
No related branches found
No related tags found
No related merge requests found
Pipeline #430656531 passed
......@@ -1086,21 +1086,26 @@ bool processFace( const TopoDS_Face& face, DATA& data, SGNODE* parent,
if( triangulation.IsNull() == Standard_True )
return false;
Quantity_Color lcolor;
// TODO(snh): This is removed as face color checks create problematic
// color fights in models. See
// https://gitlab.com/kicad/code/kicad/-/issues/9835
// https://gitlab.com/kicad/code/kicad/-/issues/9416
// check for a face color; this has precedence over SOLID colors
do
{
TDF_Label L;
if( data.m_color->ShapeTool()->Search( face, L ) )
{
if( data.m_color->GetColor( L, XCAFDoc_ColorGen, lcolor )
|| data.m_color->GetColor( L, XCAFDoc_ColorCurv, lcolor )
|| data.m_color->GetColor( L, XCAFDoc_ColorSurf, lcolor ) )
color = &lcolor;
}
} while( 0 );
Quantity_Color lcolor;
// do
// {
// TDF_Label L;
//
// if( data.m_color->ShapeTool()->Search( face, L ) )
// {
// if( data.m_color->GetColor( L, XCAFDoc_ColorGen, lcolor )
// || data.m_color->GetColor( L, XCAFDoc_ColorCurv, lcolor )
// || data.m_color->GetColor( L, XCAFDoc_ColorSurf, lcolor ) )
// color = &lcolor;
// }
// } while( 0 );
SGNODE* ocolor = data.GetColor( color );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment