32#define ARG_SIDE "--side"
33#define ARG_FORMAT "--format"
34#define ARG_UNITS "--units"
35#define ARG_NEGATE_BOTTOM_X "--bottom-negate-x"
36#define ARG_USE_DRILL_FILE_ORIGIN "--use-drill-file-origin"
37#define ARG_SMD_ONLY "--smd-only"
38#define ARG_EXCLUDE_FOOTPRINTS_TH "--exclude-fp-th"
39#define ARG_GERBER_BOARD_EDGE "--gerber-board-edge"
47 .default_value( std::string(
"both" ) )
49 "Valid options: front,back,both. Gerber format only supports \"both\"." ) ) );
52 .default_value( std::string(
"ascii" ) )
53 .help(
UTF8STDSTR(
_(
"Valid options: ascii,csv,gerber" ) ) );
56 .default_value( std::string(
"in" ) )
57 .help(
UTF8STDSTR(
_(
"Output units; ascii or csv format only; valid options: in,mm" ) ) );
60 .help(
UTF8STDSTR(
_(
"Use negative X coordinates for footprints on bottom layer "
61 "(ascii or csv formats only)" ) ) )
62 .implicit_value(
true )
63 .default_value(
false );
66 .help(
UTF8STDSTR(
_(
"Use drill/place file origin (ascii or csv only)" ) ) )
67 .implicit_value(
true )
68 .default_value(
false );
71 .help(
UTF8STDSTR(
_(
"Include only SMD footprints (ascii or csv only)" ) ) )
72 .implicit_value(
true )
73 .default_value(
false );
77 _(
"Exclude all footprints with through-hole pads (ascii or csv only)" ) ) )
78 .implicit_value(
true )
79 .default_value(
false );
82 .help(
UTF8STDSTR(
_(
"Include board edge layer (gerber only)" ) ) )
83 .implicit_value(
true )
84 .default_value(
false );
99 if( !wxFile::Exists( aPosJob->m_filename ) )
101 wxFprintf( stderr,
_(
"Board file does not exist or is not accessible\n" ) );
106 aPosJob->m_smdOnly = m_argParser.get<
bool>(
ARG_SMD_ONLY );
112 if( format == wxS(
"ascii" ) )
116 else if( format == wxS(
"csv" ) )
120 else if( format == wxS(
"gerber" ) )
126 wxFprintf( stderr,
_(
"Invalid format\n" ) );
132 if( units == wxS(
"mm" ) )
136 else if( units == wxS(
"in" ) )
142 wxFprintf( stderr,
_(
"Invalid units specified\n" ) );
148 if( side == wxS(
"both" ) )
152 wxFprintf( stderr,
_(
"\"both\" not supported for gerber format\n" ) );
158 else if( side == wxS(
"front" ) )
162 else if( side == wxS(
"back" ) )
168 wxFprintf( stderr,
_(
"Invalid side specified\n" ) );
argparse::ArgumentParser m_argParser
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
int ProcessJob(KIWAY::FACE_T aFace, JOB *job)
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
#define ARG_EXCLUDE_FOOTPRINTS_TH
#define ARG_GERBER_BOARD_EDGE
#define ARG_NEGATE_BOTTOM_X
#define ARG_USE_DRILL_FILE_ORIGIN
This file contains miscellaneous commonly used macros and functions.
static wxString FROM_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.
static const int ERR_ARGS
static const int ERR_INVALID_INPUT_FILE
std::vector< FAB_LAYER_COLOR > dummy
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.