Seach full model for color information

Assemblies may not have their face information in the top level of the
file.  Search recurses to get the explicit shape in sub assemblies as
well.

Fixes https://gitlab.com/kicad/code/kicad/issues/5163
This commit is contained in:
Seth Hillbrand 2020-10-13 13:47:18 -07:00
parent b3cd829d9f
commit a2168c6add
1 changed files with 2 additions and 3 deletions

View File

@ -617,14 +617,13 @@ bool processShell( const TopoDS_Shape& shape, DATA& data, SGNODE* parent,
bool processSolid( const TopoDS_Shape& shape, DATA& data, SGNODE* parent, bool processSolid( const TopoDS_Shape& shape, DATA& data, SGNODE* parent,
std::vector< SGNODE* >* items ) std::vector< SGNODE* >* items )
{ {
TDF_Label label = data.m_assy->FindShape( shape, Standard_False ); TDF_Label label;
data.hasSolid = true; data.hasSolid = true;
std::string partID; std::string partID;
Quantity_Color col; Quantity_Color col;
Quantity_Color* lcolor = NULL; Quantity_Color* lcolor = NULL;
if( label.IsNull() ) if( !data.m_assy->Search( shape, label, Standard_False ) )
{ {
static int i = 0; static int i = 0;
std::ostringstream ostr; std::ostringstream ostr;