kicad-cli: add option to control oval drill export behavior
Add an argument to "kicad-cli pcb export drill" to control the oval
holes drill mode for the excellon output format.
The Generate Drill Files GUI dialog recommends the newer "route"
behavior by default. Previously this option was not exposed in
kicad-cli. This commit does not change the default kicad-cli behavior,
but simply adds an argument to control it.
(cherry picked from commit 9b69d84688
)
This commit is contained in:
parent
2e739e743d
commit
5c5e41500a
|
@ -33,6 +33,7 @@
|
|||
#define ARG_EXCELLON_MINIMALHEAD "--excellon-min-header"
|
||||
#define ARG_EXCELLON_SEPARATE_TH "--excellon-separate-th"
|
||||
#define ARG_EXCELLON_ZEROS_FORMAT "--excellon-zeros-format"
|
||||
#define ARG_EXCELLON_OVAL_FORMAT "--excellon-oval-format"
|
||||
#define ARG_GERBER_PRECISION "--gerber-precision"
|
||||
#define ARG_EXCELLON_UNITS "--excellon-units"
|
||||
#define ARG_GENERATE_MAP "--generate-map"
|
||||
|
@ -54,6 +55,10 @@ CLI::EXPORT_PCB_DRILL_COMMAND::EXPORT_PCB_DRILL_COMMAND() : EXPORT_PCB_BASE_COMM
|
|||
.help( UTF8STDSTR(
|
||||
_( "Valid options are: decimal,suppressleading,suppresstrailing,keep." ) ) );
|
||||
|
||||
m_argParser.add_argument( ARG_EXCELLON_OVAL_FORMAT )
|
||||
.default_value( std::string( "alternate" ) )
|
||||
.help( UTF8STDSTR( _( "Valid options are: route,alternate." ) ) );
|
||||
|
||||
m_argParser.add_argument( "-u", ARG_EXCELLON_UNITS )
|
||||
.default_value( std::string( "mm" ) )
|
||||
.help( UTF8STDSTR( _( "Output units, valid options:in,mm" ) ) );
|
||||
|
@ -160,6 +165,22 @@ int CLI::EXPORT_PCB_DRILL_COMMAND::doPerform( KIWAY& aKiway )
|
|||
return EXIT_CODES::ERR_ARGS;
|
||||
}
|
||||
|
||||
wxString drillFormat =
|
||||
FROM_UTF8( m_argParser.get<std::string>( ARG_EXCELLON_OVAL_FORMAT ).c_str() );
|
||||
if( drillFormat == wxS( "route" ) )
|
||||
{
|
||||
drillJob->m_excellonOvalDrillRoute = true;
|
||||
}
|
||||
else if( drillFormat == wxS( "alternate" ) )
|
||||
{
|
||||
drillJob->m_excellonOvalDrillRoute = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFprintf( stderr, _( "Invalid oval drill format specified\n" ) );
|
||||
return EXIT_CODES::ERR_ARGS;
|
||||
}
|
||||
|
||||
wxString mapFormat = FROM_UTF8( m_argParser.get<std::string>( ARG_MAP_FORMAT ).c_str() );
|
||||
|
||||
if( mapFormat == wxS( "pdf" ) )
|
||||
|
|
Loading…
Reference in New Issue