20#include <magic_enum.hpp>
30#define ARG_UNITS "--units"
31#define ARG_ORIGIN "--origin"
32#define ARG_USER_ORIGIN_X "--user-origin-x"
33#define ARG_USER_ORIGIN_Y "--user-origin-y"
34#define ARG_NO_UNSPECIFIED "--no-unspecified"
35#define ARG_NO_DNP "--no-dnp"
36#define ARG_EXPLICIT_HEIGHT "--explicit-height"
37#define ARG_PART_NUMBER_FIELD "--part-number-field"
48 .default_value( std::string(
"mm" ) )
50 .choices(
"mm",
"mils" );
53 .default_value( std::string(
"center" ) )
54 .help(
UTF8STDSTR(
_(
"Coordinate system origin for the board" ) ) )
55 .choices(
"drill",
"grid",
"user",
"center" );
70 .help(
UTF8STDSTR(
_(
"Exclude components with 'Unspecified' footprint type" ) ) )
74 .help(
UTF8STDSTR(
_(
"Exclude components with 'Do not populate' attribute" ) ) )
78 .help(
UTF8STDSTR(
_(
"Only use explicitly-set footprint heights to create IDFv3 shapes" ) ) )
82 .default_value( std::string(
"Value" ) )
83 .help(
UTF8STDSTR(
_(
"Footprint field to export as the part number to the IDF library" ) ) );
95 if( !wxFile::Exists( idfJob->m_filename ) )
97 wxFprintf( stderr,
_(
"Board file does not exist or is not accessible\n" ) );
101 idfJob->m_units = magic_enum::enum_cast<IDF_SETTINGS::UNITS>(
m_argParser.get<std::string>(
ARG_UNITS ),
102 magic_enum::case_insensitive )
105 idfJob->m_originMode = magic_enum::enum_cast<IDF_SETTINGS::COORD_ORIGIN>(
std::map< wxString, wxString > m_argDefineVars
Value of the drawing sheet arg if configured.
argparse::ArgumentParser m_argParser
void addDefineArg()
Set up the drawing sheet arg used by many of the export commands.
wxString m_argOutput
Value of the output arg if configured.
wxString m_argInput
Value of the common input arg if configured.
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, PROGRESS_REPORTER *aProgressReporter=nullptr)
#define ARG_NO_UNSPECIFIED
#define ARG_USER_ORIGIN_Y
#define ARG_USER_ORIGIN_X
#define ARG_PART_NUMBER_FIELD
#define ARG_EXPLICIT_HEIGHT
static const int ERR_INVALID_INPUT_FILE
PCB_EXPORT_BASE_COMMAND(const std::string &aName, IO_TYPE aInputType=IO_TYPE::FILE, IO_TYPE aOutputType=IO_TYPE::FILE)