diff --git a/common/jobs/job_export_pcb_gerber.h b/common/jobs/job_export_pcb_gerber.h index 3edf5346ac..67b5fc2547 100644 --- a/common/jobs/job_export_pcb_gerber.h +++ b/common/jobs/job_export_pcb_gerber.h @@ -39,6 +39,7 @@ public: m_includeNetlistAttributes( true ), m_useX2Format( true ), m_disableApertureMacros( false ), + m_useAuxOrigin( false ), m_precision( 5 ), m_printMaskLayer() { @@ -59,6 +60,7 @@ public: bool m_includeNetlistAttributes; bool m_useX2Format; bool m_disableApertureMacros; + bool m_useAuxOrigin; int m_precision; @@ -66,4 +68,4 @@ public: LSET m_printMaskLayer; }; -#endif \ No newline at end of file +#endif diff --git a/kicad/cli/command_export_pcb_gerber.cpp b/kicad/cli/command_export_pcb_gerber.cpp index 9cf755f910..23b9e9b84e 100644 --- a/kicad/cli/command_export_pcb_gerber.cpp +++ b/kicad/cli/command_export_pcb_gerber.cpp @@ -71,6 +71,11 @@ CLI::EXPORT_PCB_GERBER_COMMAND::EXPORT_PCB_GERBER_COMMAND( const std::string& aN .implicit_value( true ) .default_value( false ); + m_argParser.add_argument( ARG_AUX_ORIGIN ) + .help( UTF8STDSTR( _( "Use drill/place file origin" ) ) ) + .implicit_value( true ) + .default_value( false ); + m_argParser.add_argument( ARG_PRECISION ) .help( UTF8STDSTR( _( "Precision of gerber coordinates, valid options: 5 or 6" ) ) ) .scan<'i', int>() @@ -95,6 +100,7 @@ int CLI::EXPORT_PCB_GERBER_COMMAND::populateJob( JOB_EXPORT_PCB_GERBER* aJob ) aJob->m_subtractSolderMaskFromSilk = m_argParser.get( ARG_SUBTRACT_SOLDERMASK ); aJob->m_includeNetlistAttributes = !m_argParser.get( ARG_NO_NETLIST ); aJob->m_useX2Format = !m_argParser.get( ARG_NO_X2 ); + aJob->m_useAuxOrigin = !m_argParser.get( ARG_AUX_ORIGIN ); aJob->m_precision = m_argParser.get( ARG_PRECISION ); aJob->m_printMaskLayer = m_selectedLayers; diff --git a/kicad/cli/command_export_pcb_gerber.h b/kicad/cli/command_export_pcb_gerber.h index 0b241fb215..1c579cc2b3 100644 --- a/kicad/cli/command_export_pcb_gerber.h +++ b/kicad/cli/command_export_pcb_gerber.h @@ -31,6 +31,7 @@ namespace CLI #define ARG_NO_NETLIST "--no-netlist" #define ARG_SUBTRACT_SOLDERMASK "--subtract-soldermask" #define ARG_DISABLE_APERTURE_MACROS "--disable-aperture-macros" +#define ARG_AUX_ORIGIN "--aux-origin" #define ARG_PRECISION "--precision" class EXPORT_PCB_GERBER_COMMAND : public EXPORT_PCB_BASE_COMMAND @@ -45,4 +46,4 @@ protected: }; } // namespace CLI -#endif \ No newline at end of file +#endif diff --git a/pcbnew/pcbnew_jobs_handler.cpp b/pcbnew/pcbnew_jobs_handler.cpp index 8e0c39390e..e612d00295 100644 --- a/pcbnew/pcbnew_jobs_handler.cpp +++ b/pcbnew/pcbnew_jobs_handler.cpp @@ -367,6 +367,7 @@ void PCBNEW_JOBS_HANDLER::populateGerberPlotOptionsFromJob( PCB_PLOT_PARAMS& aPlotOpts.SetDisableGerberMacros( aJob->m_disableApertureMacros ); aPlotOpts.SetUseGerberX2format( aJob->m_useX2Format ); aPlotOpts.SetIncludeGerberNetlistInfo( aJob->m_includeNetlistAttributes ); + aPlotOpts.SetUseAuxOrigin( aJob->m_useAuxOrigin ); aPlotOpts.SetGerberPrecision( aJob->m_precision ); }