30#include <wx/tokenzr.h>
34#define ARG_USE_CONTOURS "--use-contours"
35#define ARG_OUTPUT_UNITS "--output-units"
36#define ARG_USE_DRILL_ORIGIN "--use-drill-origin"
37#define ARG_MODE_SINGLE "--mode-single"
38#define ARG_MODE_MULTI "--mode-multi"
50 .help(
UTF8STDSTR(
_(
"Exclude the reference designator text" ) ) )
54 .help(
UTF8STDSTR(
_(
"Exclude the value text" ) ) )
74 .help(
UTF8STDSTR(
_(
"Subtract soldermask from silkscreen" ) ) )
78 .help(
UTF8STDSTR(
_(
"Plot graphic items using their contours" ) ) )
82 .help(
UTF8STDSTR(
_(
"Plot using the drill/place file origin" ) ) )
86 .help(
UTF8STDSTR(
_(
"Include the border and title block" ) ) )
90 .default_value( std::string(
"in" ) )
91 .help(
UTF8STDSTR(
_(
"Output units, valid options: mm, in" ) ) )
100 .default_value( std::string() )
102 _(
"Layers to include on each plot, comma separated list of untranslated "
103 "layer names to include such as F.Cu,B.Cu" ) ) )
104 .metavar(
"COMMON_LAYER_LIST" );
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." ) ) )
133 dxfJob->m_filename = m_argInput;
134 dxfJob->SetConfiguredOutputPath( m_argOutput );
135 dxfJob->m_drawingSheet = m_argDrawingSheet;
140 dxfJob->SetVarOverrides( m_argDefineVars );
142 if( !wxFile::Exists( dxfJob->m_filename ) )
144 wxFprintf( stderr,
_(
"Board file does not exist or is not accessible\n" ) );
150 dxfJob->m_plotGraphicItemsUsingContours = m_argParser.get<
bool>(
ARG_USE_CONTOURS );
164 if( units == wxS(
"mm" ) )
168 else if( units == wxS(
"in" ) )
174 wxFprintf( stderr,
_(
"Invalid units specified\n" ) );
178 dxfJob->m_plotLayerSequence = m_selectedLayers;
181 dxfJob->m_plotOnAllLayersSequence = convertLayerStringList( layers );
189 wxFprintf( stdout, wxT(
"\033[33;1m%s\033[0m\n" ),
190 _(
"This command has deprecated behavior as of KiCad 9.0, the default behavior "
191 "of this command will change in a future release." ) );
193 wxFprintf( stdout, wxT(
"\033[33;1m%s\033[0m\n" ),
194 _(
"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.
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 *aJob, REPORTER *aReporter=nullptr)
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
#define ARG_SKETCH_PADS_ON_FAB_LAYERS_DESC
#define ARG_INCLUDE_BORDER_TITLE
#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_EXCLUDE_REFDES
#define ARG_EXCLUDE_VALUE
#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 ARG_USE_DRILL_ORIGIN
#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
This file contains miscellaneous commonly used macros and functions.
static const int ERR_ARGS
static const int ERR_INVALID_INPUT_FILE
std::vector< FAB_LAYER_COLOR > dummy
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)