KiCad PCB EDA Suite
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 (C) 1992-2021 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{
33public:
38 DIALOG_GENDRILL( PCB_EDIT_FRAME* aPcbEditFrame, wxWindow* aParent );
40
44 void UpdateDrillParams();
45
46private:
47 void initDialog();
48 void InitDisplayParams();
49
50 // event functions
51 void OnSelDrillUnitsSelected( wxCommandEvent& event ) override;
52 void OnSelZerosFmtSelected( wxCommandEvent& event ) override;
53 void OnGenDrillFile( wxCommandEvent& event ) override;
54 void OnGenMapFile( wxCommandEvent& event ) override;
55 void onFileFormatSelection( wxCommandEvent& event ) override;
56
57 // Called when closing the dialog: Update config.
58 // This is not done in Dtor, because the dtor call is often delayed and the update
59 // could happen too late for the caller.
60 void onCloseDlg( wxCloseEvent& event ) override
61 {
63 event.Skip();
64 }
65
66 void onQuitDlg( wxCommandEvent& event ) override
67 {
69 event.Skip();
70 }
71
72 /*
73 * Create a plain text report file giving a list of drill values and drill count
74 * for through holes, oblong holes, and for buried vias,
75 * drill values and drill count per layer pair
76 */
77 void OnGenReportFile( wxCommandEvent& event ) override;
78
79 void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
80
81 // Specific functions:
90 void GenDrillAndMapFiles( bool aGenDrill, bool aGenMap );
91
93 void UpdateConfig();
94
95public:
97 static int m_ZerosFormat;
98 static bool m_MinimalHeader;
99 static bool m_Mirror;
100 static bool m_Merge_PTH_NPTH;
101 DRILL_PRECISION m_Precision; // Precision for drill files, in non decimal format
102 VECTOR2I m_DrillFileOffset; // Drill offset: 0,0 for absolute coordinates,
103 // or origin of the auxiliary axis
104 static bool m_UseRouteModeForOvalHoles; // True to use a G00 route command for oval holes
105 // False to use a G85 canned mode for oval holes
106
107private:
111 bool m_drillOriginIsAuxAxis; // Axis selection (main / auxiliary)
112 // for drill origin coordinates
118
119 static int m_mapFileType; // format of map file: HPGL, PS ...
120 static int m_drillFileType; // for Excellon, Gerber
121};
122
123#endif // DIALOG_GENDRILL_H_
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:265
Class DIALOG_GENDRILL_BASE.
PCB_PLOT_PARAMS m_plotOpts
VECTOR2I m_DrillFileOffset
void onFileFormatSelection(wxCommandEvent &event) override
void OnSelDrillUnitsSelected(wxCommandEvent &event) override
static bool m_MinimalHeader
static bool m_Merge_PTH_NPTH
PCB_EDIT_FRAME * m_pcbEditFrame
static bool m_Mirror
DIALOG_GENDRILL(PCB_EDIT_FRAME *aPcbEditFrame, wxWindow *aParent)
void OnGenReportFile(wxCommandEvent &event) override
void onCloseDlg(wxCloseEvent &event) override
void GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
Call the functions to create EXCELLON drill files and/or drill map files.
void OnSelZerosFmtSelected(wxCommandEvent &event) override
void OnGenDrillFile(wxCommandEvent &event) override
static int m_UnitDrillIsInch
void UpdateDrillParams()
Update board drill/plot parameters.
static bool m_UseRouteModeForOvalHoles
static int m_ZerosFormat
void OnGenMapFile(wxCommandEvent &event) override
void OnOutputDirectoryBrowseClicked(wxCommandEvent &event) override
static int m_mapFileType
DRILL_PRECISION m_Precision
static int m_drillFileType
void onQuitDlg(wxCommandEvent &event) override
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.