32#define ARG_EXCLUDE_DRAWING_SHEET "--exclude-drawing-sheet"
33#define ARG_PAGE_SIZE "--page-size-mode"
34#define ARG_FIT_PAGE_TO_BOARD "--fit-page-to-board"
35#define ARG_MODE_SINGLE "--mode-single"
36#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" );
108 _(
"Generates a single file with the output arg path acting as the complete "
109 "directory and filename path. COMMON_LAYER_LIST does not function in this "
110 "mode. Instead LAYER_LIST controls all layers plotted." ) ) )
114 .help(
UTF8STDSTR(
_(
"Generates one or more files with behavior similar to the KiCad "
115 "GUI plotting. The given output path specifies a directory in "
116 "which files may be output." ) ) )
126 .default_value( 1.0 )
135 svgJob->m_mirror = m_argParser.get<
bool>(
ARG_MIRROR );
137 svgJob->m_negative = m_argParser.get<
bool>(
ARG_NEGATIVE );
143 svgJob->m_drillShapeOption =
static_cast<DRILL_MARKS>( drillShape );
144 svgJob->m_drawingSheet = m_argDrawingSheet;
146 svgJob->m_scale = m_argParser.get<
double>(
ARG_SCALE );
154 int legacyPageSizeMode = m_argParser.get<
int>(
ARG_PAGE_SIZE );
156 if( legacyPageSizeMode == 0 )
158 svgJob->m_plotDrawingSheet =
true;
160 else if( legacyPageSizeMode == 1 )
162 svgJob->m_plotDrawingSheet =
false;
164 else if( legacyPageSizeMode == 2 )
166 svgJob->m_fitPageToBoard =
true;
167 svgJob->m_plotDrawingSheet =
false;
170 svgJob->m_filename = m_argInput;
171 svgJob->SetConfiguredOutputPath( m_argOutput );
172 svgJob->m_colorTheme =
From_UTF8( m_argParser.get<std::string>(
ARG_THEME ).c_str() );
174 svgJob->SetVarOverrides( m_argDefineVars );
179 if( !wxFile::Exists( svgJob->m_filename ) )
181 wxFprintf( stderr,
_(
"Board file does not exist or is not accessible\n" ) );
192 wxFprintf( stdout, wxT(
"\033[33;1m%s\033[0m\n" ),
193 _(
"This command has deprecated behavior as of KiCad 9.0, the default behavior "
194 "of this command will change in a future release." ) );
196 wxFprintf( stdout, wxT(
"\033[33;1m%s\033[0m\n" ),
197 _(
"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
DRILL_MARKS
Plots and prints can show holes in pads and vias 3 options are available:
wxString From_UTF8(const char *cstring)
void addCommonLayersArg()
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.