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 (C) 2023 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
26 {
29 } )
30
32 {
35 } )
36
38 {
41 } )
42
44 {
49 } )
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::INCHES ),
70 m_zeroFormat( ZEROS_FORMAT::DECIMAL ),
71 m_mapFormat( MAP_FORMAT::PDF ),
72 m_gerberPrecision( 5 ),
73 m_generateMap( false )
74{
75 m_params.emplace_back( new JOB_PARAM<bool>( "excellon.mirror_y",
76 &m_excellonMirrorY,
77 m_excellonMirrorY ) );
78
79 m_params.emplace_back( new JOB_PARAM<bool>( "excellon.minimal_header",
80 &m_excellonMinimalHeader,
81 m_excellonMinimalHeader ) );
82
83 m_params.emplace_back( new JOB_PARAM<bool>( "excellon.combine_pth_npth",
84 &m_excellonCombinePTHNPTH,
85 m_excellonCombinePTHNPTH ) );
86
87 m_params.emplace_back( new JOB_PARAM<bool>( "excellon.oval_drill_route",
88 &m_excellonOvalDrillRoute,
89 m_excellonOvalDrillRoute ) );
90
91 m_params.emplace_back( new JOB_PARAM<DRILL_FORMAT>( "format",
92 &m_format,
93 m_format ) );
94
95 m_params.emplace_back( new JOB_PARAM<DRILL_ORIGIN>( "drill_origin",
96 &m_drillOrigin,
97 m_drillOrigin ) );
98
99 m_params.emplace_back( new JOB_PARAM<DRILL_UNITS>( "units",
100 &m_drillUnits,
101 m_drillUnits ) );
102
103 m_params.emplace_back( new JOB_PARAM<ZEROS_FORMAT>( "zero_format",
104 &m_zeroFormat,
105 m_zeroFormat ) );
106
107 m_params.emplace_back( new JOB_PARAM<bool>( "generate_map",
108 &m_generateMap,
109 m_generateMap ) );
110
111 m_params.emplace_back( new JOB_PARAM<MAP_FORMAT>( "map_format",
112 &m_mapFormat,
113 m_mapFormat ) );
114
115 m_params.emplace_back( new JOB_PARAM<int>( "gerber_precision",
116 &m_gerberPrecision,
117 m_gerberPrecision ) );
118}
119
120
122{
123 return wxString::Format( _( "Drill data export" ), m_format );
124}
125
126REGISTER_JOB( pcb_export_drill, _HKI( "PCB: Export drill data" ), KIWAY::FACE_PCB,
wxString GetDescription() override
Definition: job.h:45
An simple container class that lets us dispatch output jobs to kifaces.
Definition: job.h:79
@ FACE_PCB
pcbnew DSO
Definition: kiway.h:292
#define _HKI(x)
#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)
Definition: job_registry.h:64