Rename {Set,Get}GerberExtensions() to {Set,Get}GerberProtelExtensions() (better name) in public API.

This commit is contained in:
unknown 2015-10-21 08:55:30 +02:00 committed by jean-pierre charras
parent 4dc2ece011
commit ad10218a58
5 changed files with 46 additions and 46 deletions

View File

@ -43,6 +43,7 @@ popt.SetAutoScale(False)
popt.SetScale(1)
popt.SetMirror(False)
popt.SetUseGerberAttributes(True)
popt.SetUseGerberProtelExtensions(False)
popt.SetExcludeEdgeLayer(False);
popt.SetScale(1)
popt.SetUseAuxOrigin(True)

View File

@ -162,7 +162,7 @@ void DIALOG_PLOT::Init_Dialog()
}
// Option for using proper Gerber extensions
m_useGerberExtensions->SetValue( m_plotOpts.GetUseGerberExtensions() );
m_useGerberExtensions->SetValue( m_plotOpts.GetUseGerberProtelExtensions() );
// Option for including Gerber attributes (from Gerber X2 format) in the output
m_useGerberAttributes->SetValue( m_plotOpts.GetUseGerberAttributes() );
@ -673,7 +673,7 @@ void DIALOG_PLOT::applyPlotSettings()
tempOptions.SetFormat( getPlotFormat() );
tempOptions.SetUseGerberExtensions( m_useGerberExtensions->GetValue() );
tempOptions.SetUseGerberProtelExtensions( m_useGerberExtensions->GetValue() );
tempOptions.SetUseGerberAttributes( m_useGerberAttributes->GetValue() );
tempOptions.SetGerberPrecision( m_rbGerberFormat->GetSelection() == 0 ? 5 : 6 );
@ -827,4 +827,3 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
if( !m_plotOpts.GetLayerSelection().any() )
DisplayError( this, _( "No layer selected" ) );
}

View File

@ -82,44 +82,44 @@ static bool setInt( int* aInt, int aValue, int aMin, int aMax )
PCB_PLOT_PARAMS::PCB_PLOT_PARAMS() :
m_layerSelection( 4, B_Cu, F_Cu, F_SilkS, B_SilkS )
{
m_useGerberExtensions = false;
m_useGerberAttributes = false;
m_gerberPrecision = gbrDefaultPrecision;
m_excludeEdgeLayer = true;
m_lineWidth = g_DrawDefaultLineThickness;
m_plotFrameRef = false;
m_plotViaOnMaskLayer = false;
m_plotMode = FILLED;
m_useAuxOrigin = false;
m_HPGLPenNum = 1;
m_HPGLPenSpeed = 20; // this param is always in cm/s
m_HPGLPenDiam = 15; // in mils
m_HPGLPenOvr = 2; // in mils
m_negative = false;
m_A4Output = false;
m_plotReference = true;
m_plotValue = true;
m_plotInvisibleText = false;
m_plotPadsOnSilkLayer = false;
m_subtractMaskFromSilk = false;
m_format = PLOT_FORMAT_GERBER;
m_mirror = false;
m_drillMarks = SMALL_DRILL_SHAPE;
m_autoScale = false;
m_scale = 1.0;
m_scaleSelection = 1;
m_fineScaleAdjustX = 1.0;
m_fineScaleAdjustY = 1.0;
m_widthAdjust = 0.;
m_useGerberProtelExtensions = false;
m_useGerberAttributes = false;
m_gerberPrecision = gbrDefaultPrecision;
m_excludeEdgeLayer = true;
m_lineWidth = g_DrawDefaultLineThickness;
m_plotFrameRef = false;
m_plotViaOnMaskLayer = false;
m_plotMode = FILLED;
m_useAuxOrigin = false;
m_HPGLPenNum = 1;
m_HPGLPenSpeed = 20; // this param is always in cm/s
m_HPGLPenDiam = 15; // in mils
m_HPGLPenOvr = 2; // in mils
m_negative = false;
m_A4Output = false;
m_plotReference = true;
m_plotValue = true;
m_plotInvisibleText = false;
m_plotPadsOnSilkLayer = false;
m_subtractMaskFromSilk = false;
m_format = PLOT_FORMAT_GERBER;
m_mirror = false;
m_drillMarks = SMALL_DRILL_SHAPE;
m_autoScale = false;
m_scale = 1.0;
m_scaleSelection = 1;
m_fineScaleAdjustX = 1.0;
m_fineScaleAdjustY = 1.0;
m_widthAdjust = 0.;
m_outputDirectory.clear();
m_color = BLACK;
m_referenceColor = BLACK;
m_valueColor = BLACK;
m_textMode = PLOTTEXTMODE_DEFAULT;
m_color = BLACK;
m_referenceColor = BLACK;
m_valueColor = BLACK;
m_textMode = PLOTTEXTMODE_DEFAULT;
// This parameter controls if the NPTH pads will be plotted or not
// it is a "local" parameter
m_skipNPTH_Pads = false;
m_skipNPTH_Pads = false;
}
void PCB_PLOT_PARAMS::SetGerberPrecision( int aPrecision )
@ -147,7 +147,7 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
m_layerSelection.FmtHex().c_str() );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ),
m_useGerberExtensions ? trueStr : falseStr );
m_useGerberProtelExtensions ? trueStr : falseStr );
if( m_useGerberAttributes ) // save this option only if active,
// to avoid incompatibility with older Pcbnew version
@ -223,7 +223,7 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
{
if( m_layerSelection != aPcbPlotParams.m_layerSelection )
return false;
if( m_useGerberExtensions != aPcbPlotParams.m_useGerberExtensions )
if( m_useGerberProtelExtensions != aPcbPlotParams.m_useGerberProtelExtensions )
return false;
if( m_useGerberAttributes != aPcbPlotParams.m_useGerberAttributes )
return false;
@ -390,7 +390,7 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams )
break;
case T_usegerberextensions:
aPcbPlotParams->m_useGerberExtensions = parseBool();
aPcbPlotParams->m_useGerberProtelExtensions = parseBool();
break;
case T_usegerberattributes:

View File

@ -90,9 +90,9 @@ private:
/// Set of layers to plot
LSET m_layerSelection;
/** When plotting gerbers use a conventional set of extensions instead of
* appending a suffix to the board name */
bool m_useGerberExtensions;
/** When plotting gerbers use a conventional set of Protel extensions
* instead of appending a suffix to the board name */
bool m_useGerberProtelExtensions;
/// Include attributes from the Gerber X2 format (chapter 5 in revision J2)
bool m_useGerberAttributes;
@ -232,8 +232,8 @@ public:
void SetUseGerberAttributes( bool aUse ) { m_useGerberAttributes = aUse; }
bool GetUseGerberAttributes() const { return m_useGerberAttributes; }
void SetUseGerberExtensions( bool aUse ) { m_useGerberExtensions = aUse; }
bool GetUseGerberExtensions() const { return m_useGerberExtensions; }
void SetUseGerberProtelExtensions( bool aUse ) { m_useGerberProtelExtensions = aUse; }
bool GetUseGerberProtelExtensions() const { return m_useGerberProtelExtensions; }
void SetGerberPrecision( int aPrecision );
int GetGerberPrecision() const { return m_gerberPrecision; }

View File

@ -377,7 +377,7 @@ bool PLOT_CONTROLLER::OpenPlotfile( const wxString &aSuffix,
// Gerber format can use specific file ext, depending on layers
// (now not a good practice, because the official file ext is .gbr)
if( GetPlotOptions().GetFormat() == PLOT_FORMAT_GERBER &&
GetPlotOptions().GetUseGerberExtensions() )
GetPlotOptions().GetUseGerberProtelExtensions() )
fileExt = GetGerberProtelExtension( GetLayer() );
BuildPlotFileName( &fn, outputDirName, aSuffix, fileExt );