Add option to use drill/place file origin for kicad-cli gerber export
This commit is contained in:
parent
0c26014eaa
commit
79fbde0894
|
@ -39,6 +39,7 @@ public:
|
||||||
m_includeNetlistAttributes( true ),
|
m_includeNetlistAttributes( true ),
|
||||||
m_useX2Format( true ),
|
m_useX2Format( true ),
|
||||||
m_disableApertureMacros( false ),
|
m_disableApertureMacros( false ),
|
||||||
|
m_useAuxOrigin( false ),
|
||||||
m_precision( 5 ),
|
m_precision( 5 ),
|
||||||
m_printMaskLayer()
|
m_printMaskLayer()
|
||||||
{
|
{
|
||||||
|
@ -59,6 +60,7 @@ public:
|
||||||
bool m_includeNetlistAttributes;
|
bool m_includeNetlistAttributes;
|
||||||
bool m_useX2Format;
|
bool m_useX2Format;
|
||||||
bool m_disableApertureMacros;
|
bool m_disableApertureMacros;
|
||||||
|
bool m_useAuxOrigin;
|
||||||
|
|
||||||
int m_precision;
|
int m_precision;
|
||||||
|
|
||||||
|
@ -66,4 +68,4 @@ public:
|
||||||
LSET m_printMaskLayer;
|
LSET m_printMaskLayer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -71,6 +71,11 @@ CLI::EXPORT_PCB_GERBER_COMMAND::EXPORT_PCB_GERBER_COMMAND( const std::string& aN
|
||||||
.implicit_value( true )
|
.implicit_value( true )
|
||||||
.default_value( false );
|
.default_value( false );
|
||||||
|
|
||||||
|
m_argParser.add_argument( ARG_USE_DRILL_FILE_ORIGIN )
|
||||||
|
.help( UTF8STDSTR( _( "Use drill/place file origin" ) ) )
|
||||||
|
.implicit_value( true )
|
||||||
|
.default_value( false );
|
||||||
|
|
||||||
m_argParser.add_argument( ARG_PRECISION )
|
m_argParser.add_argument( ARG_PRECISION )
|
||||||
.help( UTF8STDSTR( _( "Precision of gerber coordinates, valid options: 5 or 6" ) ) )
|
.help( UTF8STDSTR( _( "Precision of gerber coordinates, valid options: 5 or 6" ) ) )
|
||||||
.scan<'i', int>()
|
.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<bool>( ARG_SUBTRACT_SOLDERMASK );
|
aJob->m_subtractSolderMaskFromSilk = m_argParser.get<bool>( ARG_SUBTRACT_SOLDERMASK );
|
||||||
aJob->m_includeNetlistAttributes = !m_argParser.get<bool>( ARG_NO_NETLIST );
|
aJob->m_includeNetlistAttributes = !m_argParser.get<bool>( ARG_NO_NETLIST );
|
||||||
aJob->m_useX2Format = !m_argParser.get<bool>( ARG_NO_X2 );
|
aJob->m_useX2Format = !m_argParser.get<bool>( ARG_NO_X2 );
|
||||||
|
aJob->m_useAuxOrigin = m_argParser.get<bool>( ARG_USE_DRILL_FILE_ORIGIN );
|
||||||
aJob->m_precision = m_argParser.get<int>( ARG_PRECISION );
|
aJob->m_precision = m_argParser.get<int>( ARG_PRECISION );
|
||||||
aJob->m_printMaskLayer = m_selectedLayers;
|
aJob->m_printMaskLayer = m_selectedLayers;
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace CLI
|
||||||
#define ARG_NO_NETLIST "--no-netlist"
|
#define ARG_NO_NETLIST "--no-netlist"
|
||||||
#define ARG_SUBTRACT_SOLDERMASK "--subtract-soldermask"
|
#define ARG_SUBTRACT_SOLDERMASK "--subtract-soldermask"
|
||||||
#define ARG_DISABLE_APERTURE_MACROS "--disable-aperture-macros"
|
#define ARG_DISABLE_APERTURE_MACROS "--disable-aperture-macros"
|
||||||
|
#define ARG_USE_DRILL_FILE_ORIGIN "--use-drill-file-origin"
|
||||||
#define ARG_PRECISION "--precision"
|
#define ARG_PRECISION "--precision"
|
||||||
|
|
||||||
class EXPORT_PCB_GERBER_COMMAND : public EXPORT_PCB_BASE_COMMAND
|
class EXPORT_PCB_GERBER_COMMAND : public EXPORT_PCB_BASE_COMMAND
|
||||||
|
@ -45,4 +46,4 @@ protected:
|
||||||
};
|
};
|
||||||
} // namespace CLI
|
} // namespace CLI
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -362,6 +362,7 @@ void PCBNEW_JOBS_HANDLER::populateGerberPlotOptionsFromJob( PCB_PLOT_PARAMS&
|
||||||
aPlotOpts.SetDisableGerberMacros( aJob->m_disableApertureMacros );
|
aPlotOpts.SetDisableGerberMacros( aJob->m_disableApertureMacros );
|
||||||
aPlotOpts.SetUseGerberX2format( aJob->m_useX2Format );
|
aPlotOpts.SetUseGerberX2format( aJob->m_useX2Format );
|
||||||
aPlotOpts.SetIncludeGerberNetlistInfo( aJob->m_includeNetlistAttributes );
|
aPlotOpts.SetIncludeGerberNetlistInfo( aJob->m_includeNetlistAttributes );
|
||||||
|
aPlotOpts.SetUseAuxOrigin( aJob->m_useAuxOrigin );
|
||||||
|
|
||||||
aPlotOpts.SetGerberPrecision( aJob->m_precision );
|
aPlotOpts.SetGerberPrecision( aJob->m_precision );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue