Update gerber job file format and job file extension.
Gerber job file extension is now .gbrjob, according to latest changes in Gerber job file spec.
This commit is contained in:
parent
8d1d37beb0
commit
4e8ad8516a
|
@ -43,7 +43,7 @@ const wxString SchematicFileExtension( wxT( "sch" ) );
|
||||||
const wxString NetlistFileExtension( wxT( "net" ) );
|
const wxString NetlistFileExtension( wxT( "net" ) );
|
||||||
const wxString ComponentFileExtension( wxT( "cmp" ) );
|
const wxString ComponentFileExtension( wxT( "cmp" ) );
|
||||||
const wxString GerberFileExtension( "gbr" );
|
const wxString GerberFileExtension( "gbr" );
|
||||||
const wxString GerberJobFileExtension( "gbj" );
|
const wxString GerberJobFileExtension( "gbrjob" );
|
||||||
const wxString HtmlFileExtension( wxT( "html" ) );
|
const wxString HtmlFileExtension( wxT( "html" ) );
|
||||||
|
|
||||||
const wxString LegacyPcbFileExtension( wxT( "brd" ) );
|
const wxString LegacyPcbFileExtension( wxT( "brd" ) );
|
||||||
|
|
|
@ -75,7 +75,7 @@ static const wxChar* s_allowedExtensionsToList[] =
|
||||||
wxT( "^.*\\.txt$" ),
|
wxT( "^.*\\.txt$" ),
|
||||||
wxT( "^.*\\.pho$" ), // Gerber file (Old Kicad extension)
|
wxT( "^.*\\.pho$" ), // Gerber file (Old Kicad extension)
|
||||||
wxT( "^.*\\.gbr$" ), // Gerber file
|
wxT( "^.*\\.gbr$" ), // Gerber file
|
||||||
wxT( "^.*\\.gbj$" ), // Gerber job file
|
wxT( "^.*\\.gbrjob$" ), // Gerber job file
|
||||||
wxT( "^.*\\.gb[alops]$" ), // Gerber back (or bottom) layer file (deprecated Protel ext)
|
wxT( "^.*\\.gb[alops]$" ), // Gerber back (or bottom) layer file (deprecated Protel ext)
|
||||||
wxT( "^.*\\.gt[alops]$" ), // Gerber front (or top) layer file (deprecated Protel ext)
|
wxT( "^.*\\.gt[alops]$" ), // Gerber front (or top) layer file (deprecated Protel ext)
|
||||||
wxT( "^.*\\.g[0-9]{1,2}$" ), // Gerber inner layer file (deprecated Protel ext)
|
wxT( "^.*\\.g[0-9]{1,2}$" ), // Gerber inner layer file (deprecated Protel ext)
|
||||||
|
@ -104,7 +104,7 @@ const wxChar TextFileExtension[] = wxT( "txt" );
|
||||||
const wxChar TextFileWildcard[] = wxT( "Text files (*.txt)|*.txt" );
|
const wxChar TextFileWildcard[] = wxT( "Text files (*.txt)|*.txt" );
|
||||||
|
|
||||||
// Gerber file extension wildcard.
|
// Gerber file extension wildcard.
|
||||||
const wxString GerberFileExtensionWildCard( ".((gbr|gbj|(gb|gt)[alops])|pho)" );
|
const wxString GerberFileExtensionWildCard( ".((gbr|gbrjob|(gb|gt)[alops])|pho)" );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -211,23 +211,23 @@ bool GERBER_JOBFILE_WRITER::CreateJobFile( const wxString& aFullFilename )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fprintf( jobFile, "%%TJ.D.PadToPad.Outer,%.3f*%%\n", minPadClearanceOuter*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.PadToPad.Out,%.3f*%%\n", minPadClearanceOuter*m_conversionUnits );
|
||||||
|
|
||||||
if( hasInnerLayers )
|
if( hasInnerLayers )
|
||||||
fprintf( jobFile, "%%TJ.D.PadToPad.Inner,%.3f*%%\n", minPadClearanceInner*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.PadToPad.Inr,%.3f*%%\n", minPadClearanceInner*m_conversionUnits );
|
||||||
|
|
||||||
fprintf( jobFile, "%%TJ.D.PadToTrack.Outer,%.3f*%%\n", minPadClearanceOuter*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.PadToTrack.Out,%.3f*%%\n", minPadClearanceOuter*m_conversionUnits );
|
||||||
|
|
||||||
if( hasInnerLayers )
|
if( hasInnerLayers )
|
||||||
fprintf( jobFile, "%%TJ.D.PadToTrack.Inner,%.3f*%%\n", minPadClearanceInner*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.PadToTrack.Inr,%.3f*%%\n", minPadClearanceInner*m_conversionUnits );
|
||||||
|
|
||||||
// Until this is changed in Kicad, use the same value for internal tracks
|
// Until this is changed in Kicad, use the same value for internal tracks
|
||||||
int minclearanceInner = minclearanceOuter;
|
int minclearanceInner = minclearanceOuter;
|
||||||
|
|
||||||
fprintf( jobFile, "%%TJ.D.TrackToTrack.Outer,%.3f*%%\n", minclearanceOuter*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.TrackToTrack.Out,%.3f*%%\n", minclearanceOuter*m_conversionUnits );
|
||||||
|
|
||||||
if( hasInnerLayers )
|
if( hasInnerLayers )
|
||||||
fprintf( jobFile, "%%TJ.D.TrackToTrack.Inner,%.3f*%%\n", minclearanceInner*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.TrackToTrack.Inr,%.3f*%%\n", minclearanceInner*m_conversionUnits );
|
||||||
|
|
||||||
// Output the minimal track width
|
// Output the minimal track width
|
||||||
int mintrackWidthOuter = INT_MAX;
|
int mintrackWidthOuter = INT_MAX;
|
||||||
|
@ -245,10 +245,10 @@ bool GERBER_JOBFILE_WRITER::CreateJobFile( const wxString& aFullFilename )
|
||||||
}
|
}
|
||||||
|
|
||||||
if( mintrackWidthOuter != INT_MAX )
|
if( mintrackWidthOuter != INT_MAX )
|
||||||
fprintf( jobFile, "%%TJ.D.MinLineWidth.Outer,%.3f*%%\n", mintrackWidthOuter*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.MinLineWidth.Out,%.3f*%%\n", mintrackWidthOuter*m_conversionUnits );
|
||||||
|
|
||||||
if( mintrackWidthInner != INT_MAX )
|
if( mintrackWidthInner != INT_MAX )
|
||||||
fprintf( jobFile, "%%TJ.D.MinLineWidth.Inner,%.3f*%%\n", mintrackWidthInner*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.MinLineWidth.Inr,%.3f*%%\n", mintrackWidthInner*m_conversionUnits );
|
||||||
|
|
||||||
// Output the minimal zone to xx clearance
|
// Output the minimal zone to xx clearance
|
||||||
// Note: zones can have a zone clearance set to 0
|
// Note: zones can have a zone clearance set to 0
|
||||||
|
@ -272,16 +272,16 @@ bool GERBER_JOBFILE_WRITER::CreateJobFile( const wxString& aFullFilename )
|
||||||
}
|
}
|
||||||
|
|
||||||
if( minclearanceOuter != INT_MAX )
|
if( minclearanceOuter != INT_MAX )
|
||||||
fprintf( jobFile, "%%TJ.D.TrackToRegion.Outer,%.3f*%%\n", minclearanceOuter*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.TrackToRegion.Out,%.3f*%%\n", minclearanceOuter*m_conversionUnits );
|
||||||
|
|
||||||
if( hasInnerLayers && minclearanceInner != INT_MAX )
|
if( hasInnerLayers && minclearanceInner != INT_MAX )
|
||||||
fprintf( jobFile, "%%TJ.D.TrackToRegion.Inner,%.3f*%%\n", minclearanceInner*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.TrackToRegion.Inr,%.3f*%%\n", minclearanceInner*m_conversionUnits );
|
||||||
|
|
||||||
if( minclearanceOuter != INT_MAX )
|
if( minclearanceOuter != INT_MAX )
|
||||||
fprintf( jobFile, "%%TJ.D.RegionToRegion.Outer,%.3f*%%\n", minclearanceOuter*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.RegionToRegion.Out,%.3f*%%\n", minclearanceOuter*m_conversionUnits );
|
||||||
|
|
||||||
if( hasInnerLayers && minclearanceInner != INT_MAX )
|
if( hasInnerLayers && minclearanceInner != INT_MAX )
|
||||||
fprintf( jobFile, "%%TJ.D.RegionToRegion.Inner,%.3f*%%\n", minclearanceInner*m_conversionUnits );
|
fprintf( jobFile, "%%TJ.D.RegionToRegion.Inr,%.3f*%%\n", minclearanceInner*m_conversionUnits );
|
||||||
|
|
||||||
// output the gerber file list:
|
// output the gerber file list:
|
||||||
fputs( "G04 Layer Structure*\n", jobFile );
|
fputs( "G04 Layer Structure*\n", jobFile );
|
||||||
|
|
Loading…
Reference in New Issue