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 (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
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 void InitDisplayParams();
55
56 // event functions
57 void OnSelDrillUnitsSelected( wxCommandEvent& event ) override;
58 void OnSelZerosFmtSelected( wxCommandEvent& event ) override;
59 void OnGenDrillFile( wxCommandEvent& event ) override;
60 void OnGenMapFile( wxCommandEvent& event ) override;
61 void onFileFormatSelection( wxCommandEvent& event ) override;
62
63 // Called when closing the dialog: Update config.
64 // This is not done in Dtor, because the dtor call is often delayed and the update
65 // could happen too late for the caller.
66 void onCloseDlg( wxCloseEvent& event ) override
67 {
69 event.Skip();
70 }
71
72 void onQuitDlg( wxCommandEvent& event ) override
73 {
75 event.Skip();
76 }
77
78 /*
79 * Create a plain text report file giving a list of drill values and drill count
80 * for through holes, oblong holes, and for buried vias,
81 * drill values and drill count per layer pair
82 */
83 void OnGenReportFile( wxCommandEvent& event ) override;
84
85 void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
86
87 // Specific functions:
96 void GenDrillAndMapFiles( bool aGenDrill, bool aGenMap );
97
99 void UpdateConfig();
100
101public:
103 static int m_ZerosFormat;
104 static bool m_MinimalHeader;
105 static bool m_Mirror;
106 static bool m_Merge_PTH_NPTH;
107 DRILL_PRECISION m_Precision; // Precision for drill files, in non decimal format
108 VECTOR2I m_DrillFileOffset; // Drill offset: 0,0 for absolute coordinates,
109 // or origin of the auxiliary axis
110 static bool m_UseRouteModeForOvalHoles; // True to use a G00 route command for oval holes
111 // False to use a G85 canned mode for oval holes
112
113private:
118
119 bool m_drillOriginIsAuxAxis; // Axis selection (main / auxiliary)
120 // for drill origin coordinates
126
127 static int m_mapFileType; // format of map file: HPGL, PS ...
128 static int m_drillFileType; // for Excellon, Gerber
129};
130
131#endif // DIALOG_GENDRILL_H_
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
Class DIALOG_GENDRILL_BASE.
PCB_PLOT_PARAMS m_plotOpts
VECTOR2I m_DrillFileOffset
void onFileFormatSelection(wxCommandEvent &event) override
void OnSelDrillUnitsSelected(wxCommandEvent &event) override
bool TransferDataFromWindow() override
static bool m_MinimalHeader
static bool m_Merge_PTH_NPTH
PCB_EDIT_FRAME * m_pcbEditFrame
static bool m_Mirror
bool TransferDataToWindow() override
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
JOB_EXPORT_PCB_DRILL * m_job
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.