From ebda02255c19e597daaa3ab4526103977dea1893 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Mon, 13 Sep 2021 21:17:22 -0400 Subject: [PATCH] Fix step pcb coloring --- utils/kicad2step/pcb/oce_utils.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/utils/kicad2step/pcb/oce_utils.cpp b/utils/kicad2step/pcb/oce_utils.cpp index 805ac8b8d4..0f4e145fe7 100644 --- a/utils/kicad2step/pcb/oce_utils.cpp +++ b/utils/kicad2step/pcb/oce_utils.cpp @@ -858,9 +858,8 @@ bool PCBMODEL::CreatePCB() // push the board to the data structure ReportMessage( "\nGenerate board full shape.\n" ); - // Add board to the assembly "expanded", meaning the shape gets tacked into an assembly - // which will better match how all the other models end up being added - m_pcb_label = m_assy->AddComponent( m_assy_label, board, true ); + // Dont expand the component or else coloring it gets hard + m_pcb_label = m_assy->AddComponent( m_assy_label, board, false ); if( m_pcb_label.IsNull() ) return false; @@ -870,11 +869,11 @@ bool PCBMODEL::CreatePCB() // Why are we trying to name the bare board? Because CAD tools like SolidWorks do fun things // like "deduplicate" imported STEPs by swapping STEP assembly components with already identically named assemblies // So we want to avoid having the PCB be generally defaulted to "Component" or "Assembly". - Handle( TDataStd_TreeNode ) Node; + Handle( TDataStd_TreeNode ) node; - if( m_pcb_label.FindAttribute( XCAFDoc::ShapeRefGUID(), Node ) ) + if( m_pcb_label.FindAttribute( XCAFDoc::ShapeRefGUID(), node ) ) { - TDF_Label label = Node->Father()->Label(); + TDF_Label label = node->Father()->Label(); if( !label.IsNull() ) { wxString pcbName = wxString::Format( "%s PCB", m_pcbName );