KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_gendrill.h
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) 1992-2019 Jean_Pierre Charras <[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
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#ifndef DIALOG_GENDRILL_H_
26#define DIALOG_GENDRILL_H_
27
28#include <gendrill_file_writer_base.h> // for DRILL_PRECISION definition
30
32
34{
35public:
40 DIALOG_GENDRILL( PCB_EDIT_FRAME* aPcbEditFrame, wxWindow* aParent );
41 DIALOG_GENDRILL( PCB_EDIT_FRAME* aPcbEditFrame, JOB_EXPORT_PCB_DRILL* aJob, wxWindow* aParent );
43
47 void UpdateDrillParams();
48
49 bool TransferDataFromWindow() override;
50 bool TransferDataToWindow() override;
51
52private:
53 void initDialog();
54
55 // event functions
56 void onSelDrillUnitsSelected( wxCommandEvent& event ) override;
57 void onSelZerosFmtSelected( wxCommandEvent& event ) override;
58 void onFileFormatSelection( wxCommandEvent& event ) override;
59
60 // Called when closing the dialog: Update config.
61 // This is not done in Dtor, because the dtor call is often delayed and the update
62 // could happen too late for the caller.
63 void onCloseDlg( wxCloseEvent& event ) override
64 {
66 event.Skip();
67 }
68
69 /*
70 * Create a plain text report file giving a list of drill values and drill count
71 * for through holes, oblong holes, and for buried vias,
72 * drill values and drill count per layer pair
73 */
74 void onGenReportFile( wxCommandEvent& event ) override;
75
76 void onOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
77
78 // Specific functions:
87 void genDrillAndMapFiles( bool aGenDrill, bool aGenMap );
88
90 void updateConfig();
91
92private:
94 static int g_zerosFormat;
95 static bool g_minimalHeader;
96 static bool g_mirror;
97 static bool g_merge_PTH_NPTH;
98 static bool g_generateMap;
99 static DRILL_PRECISION g_precision; // Precision for drill files in non-decimal
100 // format
101 static VECTOR2I g_drillFileOffset; // Drill offset: 0,0 for absolute
102 // coordinates, or aux origin
103 static bool g_useRouteModeForOvalHoles; // True to use a G00 route command for
104 // oval holes; false to use a G85 canned
105 // mode for oval holes
106
107private:
112
113 bool m_drillOriginIsAuxAxis; // Axis selection (main / auxiliary)
114 // for drill origin coordinates
115 static int g_mapFileType; // format of map file: HPGL, PS ...
116 static int g_drillFileType; // for Excellon, Gerber
117};
118
119#endif // DIALOG_GENDRILL_H_
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:295
Class DIALOG_GENDRILL_BASE.
PCB_PLOT_PARAMS m_plotOpts
static bool g_mirror
void onOutputDirectoryBrowseClicked(wxCommandEvent &event) override
void onFileFormatSelection(wxCommandEvent &event) override
bool TransferDataFromWindow() override
PCB_EDIT_FRAME * m_pcbEditFrame
void genDrillAndMapFiles(bool aGenDrill, bool aGenMap)
Call the functions to create EXCELLON drill files and/or drill map files.
static int g_mapFileType
bool TransferDataToWindow() override
static bool g_useRouteModeForOvalHoles
void onCloseDlg(wxCloseEvent &event) override
void onSelZerosFmtSelected(wxCommandEvent &event) override
static int g_drillFileType
static VECTOR2I g_drillFileOffset
void UpdateDrillParams()
Update board drill/plot parameters.
static bool g_merge_PTH_NPTH
static int g_unitDrillIsInch
static bool g_minimalHeader
void onGenReportFile(wxCommandEvent &event) override
JOB_EXPORT_PCB_DRILL * m_job
void onSelDrillUnitsSelected(wxCommandEvent &event) override
static int g_zerosFormat
static DRILL_PRECISION g_precision
static bool g_generateMap
Helper to handle drill precision format in excellon files.
The main frame for Pcbnew.
Parameters and options when plotting/printing a board.
helper classes to handle hole info for drill files generators.