Gerber file X2 attribute: Change the attribute Project Id key word from .TF.JobId to .TF.ProjectId, due to a change between the draft Gerber file format specif and a the final specifs (Revision 2015.08).

Remove a few wxCHECK_VERSION conditional compilation, now useless.
This commit is contained in:
jean-pierre charras 2015-10-14 09:20:28 +02:00
parent c5f9896dec
commit 014f0eb61f
7 changed files with 8 additions and 35 deletions

View File

@ -390,11 +390,6 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
wxString title = _( "Print" ); wxString title = _( "Print" );
BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_Parent, title ); BOARD_PRINTOUT_CONTROLLER printout( s_Parameters, m_Parent, title );
#if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
wxDC* dc = printout.GetDC();
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
#endif
if( !printer.Print( this, &printout, true ) ) if( !printer.Print( this, &printout, true ) )
{ {
if( wxPrinter::GetLastError() == wxPRINTER_ERROR ) if( wxPrinter::GetLastError() == wxPRINTER_ERROR )

View File

@ -708,13 +708,7 @@ wxBitmap DIALOG_COPPER_ZONE::makeLayerBitmap( EDA_COLOR_T aColor )
iconDC.SelectObject( bitmap ); iconDC.SelectObject( bitmap );
brush.SetColour( MakeColour( aColor ) ); brush.SetColour( MakeColour( aColor ) );
#if wxCHECK_VERSION( 3, 0, 0 )
brush.SetStyle( wxBRUSHSTYLE_SOLID ); brush.SetStyle( wxBRUSHSTYLE_SOLID );
#else
brush.SetStyle( wxSOLID );
#endif
iconDC.SetBrush( brush ); iconDC.SetBrush( brush );
iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );

View File

@ -180,12 +180,10 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( PCB_EDIT_FRAME* parent ) :
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
m_sdbSizer1OK->SetDefault(); m_sdbSizer1OK->SetDefault();
// Allow tabbing out of grid controls. Only available on wxWidgets 2.9.5 or later. // Allow tabbing out of grid controls.
#if wxCHECK_VERSION( 2, 9, 5 )
m_grid->SetTabBehaviour( wxGrid::Tab_Leave ); m_grid->SetTabBehaviour( wxGrid::Tab_Leave );
m_gridViaSizeList->SetTabBehaviour( wxGrid::Tab_Leave ); m_gridViaSizeList->SetTabBehaviour( wxGrid::Tab_Leave );
m_gridTrackWidthList->SetTabBehaviour( wxGrid::Tab_Leave ); m_gridTrackWidthList->SetTabBehaviour( wxGrid::Tab_Leave );
#endif
Center(); Center();
} }

View File

@ -270,12 +270,7 @@ wxBitmap DIALOG_KEEPOUT_AREA_PROPERTIES::makeLayerBitmap( EDA_COLOR_T aColor )
iconDC.SelectObject( bitmap ); iconDC.SelectObject( bitmap );
brush.SetColour( MakeColour( aColor ) ); brush.SetColour( MakeColour( aColor ) );
#if wxCHECK_VERSION( 3, 0, 0 )
brush.SetStyle( wxBRUSHSTYLE_SOLID ); brush.SetStyle( wxBRUSHSTYLE_SOLID );
#else
brush.SetStyle( wxSOLID );
#endif
iconDC.SetBrush( brush ); iconDC.SetBrush( brush );
iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );

View File

@ -259,12 +259,7 @@ wxBitmap DIALOG_NON_COPPER_ZONES_EDITOR::makeLayerBitmap( EDA_COLOR_T aColor )
iconDC.SelectObject( bitmap ); iconDC.SelectObject( bitmap );
brush.SetColour( MakeColour( aColor ) ); brush.SetColour( MakeColour( aColor ) );
#if wxCHECK_VERSION( 3, 0, 0 )
brush.SetStyle( wxBRUSHSTYLE_SOLID ); brush.SetStyle( wxBRUSHSTYLE_SOLID );
#else
brush.SetStyle( wxSOLID );
#endif
iconDC.SetBrush( brush ); iconDC.SetBrush( brush );
iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); iconDC.DrawRectangle( 0, 0, LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );

View File

@ -49,11 +49,7 @@ DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE( wxWindow* aParent, BOARD_DESIGN_SE
Centre(); Centre();
// Pressing ENTER when any of the text input fields is active applies changes // Pressing ENTER when any of the text input fields is active applies changes
#if wxCHECK_VERSION( 3, 0, 0 ) Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this );
Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this );
#else
Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TRACK_VIA_SIZE::onOkClick ), NULL, this );
#endif
} }

View File

@ -204,15 +204,15 @@ wxString GetGerberFileFunctionAttribute( const BOARD *aBoard,
} }
/* Add some X2 attributes to the file header, as defined in the /* Add some X2 attributes to the file header, as defined in the
* Gerber file format specification J4 and J5 * Gerber file format specification J4 and "Revision 2015.06"
*/ */
#define USE_J5_ATTR #define USE_REVISION_2015_06_ATTR
void AddGerberX2Attribute( PLOTTER * aPlotter, void AddGerberX2Attribute( PLOTTER * aPlotter,
const BOARD *aBoard, LAYER_NUM aLayer ) const BOARD *aBoard, LAYER_NUM aLayer )
{ {
wxString text; wxString text;
#ifdef USE_J5_ATTR #ifdef USE_REVISION_2015_06_ATTR
// Creates the TF,.GenerationSoftware. Format is: // Creates the TF,.GenerationSoftware. Format is:
// %TF,.GenerationSoftware,<vendor>,<application name>[,<application version>]*% // %TF,.GenerationSoftware,<vendor>,<application name>[,<application version>]*%
text.Printf( wxT( "%%TF.GenerationSoftware,KiCad,Pcbnew,%s*%%" ), GetBuildVersion() ); text.Printf( wxT( "%%TF.GenerationSoftware,KiCad,Pcbnew,%s*%%" ), GetBuildVersion() );
@ -233,8 +233,8 @@ void AddGerberX2Attribute( PLOTTER * aPlotter,
text.Printf( wxT( "%%TF.CreationDate,%s%s*%%" ), GetChars( date.FormatISOCombined() ), GetChars( msg ) ); text.Printf( wxT( "%%TF.CreationDate,%s%s*%%" ), GetChars( date.FormatISOCombined() ), GetChars( msg ) );
aPlotter->AddLineToHeader( text ); aPlotter->AddLineToHeader( text );
// Creates the TF,.JobID. Format is (from Gerber file format doc): // Creates the TF,.ProjectId. Format is (from Gerber file format doc):
// %TF.JobID,<project id>,<project GUID>,<revision id>*% // %TF.ProjectId,<project id>,<project GUID>,<revision id>*%
// <project id> is the name of the project, restricted to basic ASCII symbols only, // <project id> is the name of the project, restricted to basic ASCII symbols only,
// and comma not accepted // and comma not accepted
// All illegal chars will be replaced by underscore // All illegal chars will be replaced by underscore
@ -276,7 +276,7 @@ void AddGerberX2Attribute( PLOTTER * aPlotter,
if( rev.IsEmpty() ) if( rev.IsEmpty() )
rev = wxT( "rev?" ); rev = wxT( "rev?" );
text.Printf( wxT( "%%TF.JobID,%s,%s,%s*%%" ), msg.ToAscii(), GetChars( guid ), rev.ToAscii() ); text.Printf( wxT( "%%TF.ProjectId,%s,%s,%s*%%" ), msg.ToAscii(), GetChars( guid ), rev.ToAscii() );
aPlotter->AddLineToHeader( text ); aPlotter->AddLineToHeader( text );
#endif #endif