33#define ARG_EXCLUDE_DRAWING_SHEET "--exclude-drawing-sheet"
34#define ARG_PAGE_SIZE "--page-size-mode"
35#define ARG_FIT_PAGE_TO_BOARD "--fit-page-to-board"
36#define ARG_MODE_SINGLE "--mode-single"
37#define ARG_MODE_MULTI "--mode-multi"
49 .help(
UTF8STDSTR(
_(
"Subtract soldermask from silkscreen" ) ) )
53 .help(
UTF8STDSTR(
_(
"Mirror the board (useful for trying to show bottom layers)" ) ) )
57 .default_value( std::string() )
58 .help(
UTF8STDSTR(
_(
"Color theme to use (will default to PCB editor settings)" ) ) )
59 .metavar(
"THEME_NAME" );
86 .help(
UTF8STDSTR(
_(
"Set page sizing mode (0 = page with frame and title block, 1 = "
87 "current page size, 2 = board area only)" ) ) )
93 .help(
UTF8STDSTR(
_(
"Fit the page to the board" ) ) )
104 .metavar(
"SHAPE_OPTION" );
107 .default_value( std::string() )
109 _(
"Layers to include on each plot, comma separated list of untranslated "
110 "layer names to include such as "
112 .metavar(
"COMMON_LAYER_LIST" );
117 _(
"Generates a single file with the output arg path acting as the complete "
118 "directory and filename path. COMMON_LAYER_LIST does not function in this "
119 "mode. Instead LAYER_LIST controls all layers plotted." ) ) )
123 .help(
UTF8STDSTR(
_(
"Generates one or more files with behavior similar to the KiCad "
124 "GUI plotting. The given output path specifies a directory in "
125 "which files may be output." ) ) )
142 svgJob->m_mirror = m_argParser.get<
bool>(
ARG_MIRROR );
144 svgJob->m_negative = m_argParser.get<
bool>(
ARG_NEGATIVE );
151 svgJob->m_drawingSheet = m_argDrawingSheet;
160 int legacyPageSizeMode = m_argParser.get<
int>(
ARG_PAGE_SIZE );
162 if( legacyPageSizeMode == 0 )
164 svgJob->m_plotDrawingSheet =
true;
166 else if( legacyPageSizeMode == 1 )
168 svgJob->m_plotDrawingSheet =
false;
170 else if( legacyPageSizeMode == 2 )
172 svgJob->m_fitPageToBoard =
true;
173 svgJob->m_plotDrawingSheet =
false;
176 svgJob->m_filename = m_argInput;
177 svgJob->SetConfiguredOutputPath( m_argOutput );
178 svgJob->m_colorTheme =
From_UTF8( m_argParser.get<std::string>(
ARG_THEME ).c_str() );
180 svgJob->SetVarOverrides( m_argDefineVars );
183 svgJob->m_plotOnAllLayersSequence = convertLayerStringList( layers );
185 if( !wxFile::Exists( svgJob->m_filename ) )
187 wxFprintf( stderr,
_(
"Board file does not exist or is not accessible\n" ) );
191 svgJob->m_plotLayerSequence = m_selectedLayers;
200 wxFprintf( stdout, wxT(
"\033[33;1m%s\033[0m\n" ),
201 _(
"This command has deprecated behavior as of KiCad 9.0, the default behavior "
202 "of this command will change in a future release." ) );
204 wxFprintf( stdout, wxT(
"\033[33;1m%s\033[0m\n" ),
205 _(
"The new behavior will match --mode-multi" ) );
argparse::ArgumentParser m_argParser
void addDefineArg()
Set up the drawing sheet arg used by many of the export commands.
void addDrawingSheetArg()
Set up the drawing sheet arg used by many of the export commands.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
int ProcessJob(KIWAY::FACE_T aFace, JOB *aJob, REPORTER *aReporter=nullptr)
#define ARG_SKETCH_PADS_ON_FAB_LAYERS_DESC
#define ARG_CROSSOUT_DNP_FPS_ON_FAB_LAYERS_DESC
#define ARG_SKETCH_PADS_ON_FAB_LAYERS
#define ARG_COMMON_LAYERS
#define ARG_SKETCH_DNP_FPS_ON_FAB_LAYERS_DESC
#define ARG_BLACKANDWHITE_DESC
#define ARG_NEGATIVE_SHORT
#define ARG_BLACKANDWHITE
#define ARG_CROSSOUT_DNP_FPS_ON_FAB_LAYERS
#define DEPRECATED_ARG_PLOT_INVISIBLE_TEXT
#define ARG_HIDE_DNP_FPS_ON_FAB_LAYERS
#define DEPRECATED_ARD_PLOT_INVISIBLE_TEXT_WARNING
#define ARG_SUBTRACT_SOLDERMASK
#define ARG_DRILL_SHAPE_OPTION_DESC
#define DEPRECATED_ARG_PLOT_INVISIBLE_TEXT_DESC
#define ARG_HIDE_DNP_FPS_ON_FAB_LAYERS_DESC
#define ARG_SKETCH_DNP_FPS_ON_FAB_LAYERS
#define ARG_DRILL_SHAPE_OPTION
#define ARG_NEGATIVE_DESC
#define ARG_FIT_PAGE_TO_BOARD
#define ARG_EXCLUDE_DRAWING_SHEET
static const int ERR_INVALID_INPUT_FILE
wxString From_UTF8(const char *cstring)
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.
void addLayerArg(bool aRequire)
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.