From 8a1fd49377a6bc1d5cabebcaf569e60f8546d6cd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 1 Jul 2014 21:20:38 +0200 Subject: [PATCH] Minor fixes in Gerber files, in file attribute for copper layers. --- common/common_plotGERBER_functions.cpp | 2 +- pcbnew/pcbplot.cpp | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index fbed464092..bfbe00c3a7 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -104,7 +104,7 @@ bool GERBER_PLOTTER::StartPlot() m_gerberUnitInch ? "inch" : "mm" ); wxString Title = creator + wxT( " " ) + GetBuildVersion(); - fprintf( outputFile, "G04 (created by %s) date %s*\n", + fprintf( outputFile, "G04 Created by KiCad (%s) date %s*\n", TO_UTF8( Title ), TO_UTF8( DateAndTime() ) ); /* Mass parameter: unit = INCHES/MM */ diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 830ffee636..7b492ad349 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -135,29 +135,22 @@ wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer ) break; case Eco1_User: - case Eco2_User: - attrib = wxString::Format( wxT( "Other,ECO%d" ), aLayer - Eco1_User + 1 ); + attrib = wxString( wxT( "Other,ECO1" ) ); break; - case F_Cu: - attrib = wxString( wxT( "Copper,L1" ) ); + case Eco2_User: + attrib = wxString( wxT( "Other,ECO2" ) ); break; case B_Cu: attrib = wxString::Format( wxT( "Copper,L%d" ), aBoard->GetCopperLayerCount() ); break; + case F_Cu: default: if( IsCopperLayer( aLayer ) ) { -#if 0 // was: - // LAYER_N_2 is the first inner layer counting from the bottom; this - // must be converted to a 1-based number starting from the top - attrib = wxString::Format( wxT( "Copper,L%d" ), - aBoard->GetCopperLayerCount() - ( aLayer - LAYER_N_2 + 1 ) ); -#else - attrib = wxString::Format( wxT( "Copper,L%d" ), aLayer ); -#endif + attrib = wxString::Format( wxT( "Copper,L%d" ), aLayer+1 ); } break; }