KiCad PCB EDA Suite
Loading...
Searching...
No Matches
job_export_pcb_drill.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2023 Mark Roszko <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
22#include <jobs/job_registry.h>
23#include <i18n_utility.h>
24
36
50
52 {
58 } )
59
61 JOB( "drill", true ),
62 m_filename(),
63 m_excellonMirrorY( false ),
64 m_excellonMinimalHeader( false ),
65 m_excellonCombinePTHNPTH( true ),
66 m_excellonOvalDrillRoute( false ),
67 m_format( DRILL_FORMAT::EXCELLON ),
68 m_drillOrigin( DRILL_ORIGIN::ABS ),
69 m_drillUnits( DRILL_UNITS::INCH ),
70 m_zeroFormat( ZEROS_FORMAT::DECIMAL ),
71 m_mapFormat( MAP_FORMAT::PDF ),
72 m_gerberPrecision( 5 ),
73 m_generateMap( false ),
74 m_generateTenting( false ),
75 m_generateReport( false )
76{
77 m_params.emplace_back( new JOB_PARAM<bool>( "excellon.mirror_y",
78 &m_excellonMirrorY,
79 m_excellonMirrorY ) );
80
81 m_params.emplace_back( new JOB_PARAM<bool>( "excellon.minimal_header",
82 &m_excellonMinimalHeader,
83 m_excellonMinimalHeader ) );
84
85 m_params.emplace_back( new JOB_PARAM<bool>( "excellon.combine_pth_npth",
86 &m_excellonCombinePTHNPTH,
87 m_excellonCombinePTHNPTH ) );
88
89 m_params.emplace_back( new JOB_PARAM<bool>( "excellon.oval_drill_route",
90 &m_excellonOvalDrillRoute,
91 m_excellonOvalDrillRoute ) );
92
93 m_params.emplace_back( new JOB_PARAM<DRILL_FORMAT>( "format",
94 &m_format,
95 m_format ) );
96
97 m_params.emplace_back( new JOB_PARAM<DRILL_ORIGIN>( "drill_origin",
98 &m_drillOrigin,
99 m_drillOrigin ) );
100
101 m_params.emplace_back( new JOB_PARAM<DRILL_UNITS>( "units",
102 &m_drillUnits,
103 m_drillUnits ) );
104
105 m_params.emplace_back( new JOB_PARAM<ZEROS_FORMAT>( "zero_format",
106 &m_zeroFormat,
107 m_zeroFormat ) );
108
109 m_params.emplace_back( new JOB_PARAM<bool>( "generate_map",
110 &m_generateMap,
111 m_generateMap ) );
112
113 m_params.emplace_back( new JOB_PARAM<bool>( "generate_tenting",
114 &m_generateTenting,
115 m_generateTenting ) );
116
117 m_params.emplace_back( new JOB_PARAM<MAP_FORMAT>( "map_format",
118 &m_mapFormat,
119 m_mapFormat ) );
120
121 m_params.emplace_back( new JOB_PARAM<int>( "gerber_precision",
122 &m_gerberPrecision,
123 m_gerberPrecision ) );
124
125 m_params.emplace_back( new JOB_PARAM<bool>( "generate_report",
126 &m_generateReport,
127 m_generateReport ) );
128
129 m_params.emplace_back( new JOB_PARAM<wxString>( "report_filename",
130 &m_reportPath,
131 m_reportPath ) );
132}
133
134
136{
137 return _( "Export drill data" );
138}
139
140
142{
143 return _( "Export Drill Data Job Settings" );
144}
145
146REGISTER_JOB( pcb_export_drill, _HKI( "PCB: Export Drill Data" ), KIWAY::FACE_PCB,
wxString GetDefaultDescription() const override
wxString GetSettingsDialogTitle() const override
An simple container class that lets us dispatch output jobs to kifaces.
Definition job.h:183
@ FACE_PCB
pcbnew DSO
Definition kiway.h:300
#define _(s)
Some functions to handle hotkeys in KiCad.
NLOHMANN_JSON_SERIALIZE_ENUM(JOB_EXPORT_PCB_DRILL::DRILL_FORMAT, { { JOB_EXPORT_PCB_DRILL::DRILL_FORMAT::EXCELLON, "excellon" }, { JOB_EXPORT_PCB_DRILL::DRILL_FORMAT::GERBER, "gerber" }, }) NLOHMANN_JSON_SERIALIZE_ENUM(JOB_EXPORT_PCB_DRILL
#define REGISTER_JOB(job_name, title, face, T)
#define _HKI(x)
Definition page_info.cpp:44