Put the project name back into the step pcb label.
Software like Solidworks and other CAD treat STEP labels as unique entries. When you import multi STEP files into the same project, it'll start deduplicating your design by those name. So two completely unrelated PCBs with the same "PCB" name will result in one being replaced by another.
This commit is contained in:
parent
ba4773e448
commit
b3de5aa08e
|
@ -557,10 +557,13 @@ bool STEP_PCB_MODEL::CreatePCB( SHAPE_POLY_SET& aOutline, VECTOR2D aOrigin )
|
|||
{
|
||||
wxString pcbName;
|
||||
|
||||
// Note, we include the pcb/project name as a prefix
|
||||
// because several STEP importing CAD software like SolidWorks
|
||||
// will deduplicate anything imported by it's STEP name
|
||||
if( m_pcb_labels.size() == 1 )
|
||||
pcbName = wxT( "PCB" );
|
||||
pcbName = wxString::Format( wxT( "%s PCB" ), m_pcbName );
|
||||
else
|
||||
pcbName = wxString::Format( wxT( "PCB%d" ), pcbIdx++ );
|
||||
pcbName = wxString::Format( wxT( "%s PCB%d" ), m_pcbName, pcbIdx++ );
|
||||
|
||||
std::string pcbNameStdString( pcbName.ToUTF8() );
|
||||
TCollection_ExtendedString partname( pcbNameStdString.c_str() );
|
||||
|
|
Loading…
Reference in New Issue