Pcbnew, gerber job file: add "name" field in stackup section

This commit is contained in:
jean-pierre charras 2019-09-14 09:36:23 +02:00
parent 115e1e33da
commit fc6dc81878
1 changed files with 8 additions and 1 deletions

View File

@ -682,6 +682,13 @@ void GERBER_JOBFILE_WRITER::addJSONMaterialStackup()
if( next_copper_layer >= m_pcb->GetCopperLayerCount()-1 ) if( next_copper_layer >= m_pcb->GetCopperLayerCount()-1 )
next_copper_layer = B_Cu; next_copper_layer = B_Cu;
addJSONObject( wxString::Format( "\"Name\": \"%s %s/%s\",\n",
formatStringFromUTF32( item->m_TypeName ), // core or prepreg
formatStringFromUTF32( m_pcb->GetLayerName( last_copper_layer ) ),
formatStringFromUTF32( m_pcb->GetLayerName( next_copper_layer ) ) )
);
// Add a comment ("Notes"): // Add a comment ("Notes"):
wxString note = "\"Notes\": "; wxString note = "\"Notes\": ";
@ -696,7 +703,7 @@ void GERBER_JOBFILE_WRITER::addJSONMaterialStackup()
} }
else else
{ {
addJSONObject( wxString::Format( "\"Notes\": \"Layer: %s\",\n", layer_name.c_str() ) ); addJSONObject( wxString::Format( "\"Name\": \"%s\",\n", layer_name.c_str() ) );
} }
removeJSONSepararator(); removeJSONSepararator();