From ad10218a582442bca5de41bf43fe5ee415b885da Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Oct 2015 08:55:30 +0200 Subject: [PATCH] Rename {Set,Get}GerberExtensions() to {Set,Get}GerberProtelExtensions() (better name) in public API. --- .../gen_gerber_and_drill_files_board.py | 1 + pcbnew/dialogs/dialog_plot.cpp | 5 +- pcbnew/pcb_plot_params.cpp | 74 +++++++++---------- pcbnew/pcb_plot_params.h | 10 +-- pcbnew/pcbplot.cpp | 2 +- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py b/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py index 551c0ba9ce..8a9b2c4a04 100644 --- a/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py +++ b/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py @@ -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) diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index a488562944..7585dcac40 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -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" ) ); } - diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index ae8d638144..9f40fbcdc0 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -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: diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index 308f2404c2..ea46b620e6 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -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; } diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 2938910afe..77b5d61df2 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -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 );