KiCad PCB EDA Suite
dialog_gendrill.h
Go to the documentation of this file.
1 
5 /*
6  * This program source code file is part of KiCad, a free EDA CAD application.
7  *
8  * Copyright (C) 1992-2010 Jean_Pierre Charras <jp.charras@ujf-grenoble.fr>
9  * Copyright (C) 1992-2010 KiCad Developers, see change_log.txt for contributors.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, you may find one here:
23  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
24  * or you may search the http://www.gnu.org website for the version 2 license,
25  * or you may write to the Free Software Foundation, Inc.,
26  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27  */
28 
29 #ifndef DIALOG_GENDRILL_H_
30 #define DIALOG_GENDRILL_H_
31 
32 #include <dialog_gendrill_base.h>
33 
35 {
36 public:
39 
40  static int m_UnitDrillIsInch;
41  static int m_ZerosFormat;
42  static bool m_MinimalHeader;
43  static bool m_Mirror;
44  static bool m_Merge_PTH_NPTH;
45  DRILL_PRECISION m_Precision; // Selected precision for drill files
46  wxPoint m_FileDrillOffset; // Drill offset: 0,0 for absolute coordinates,
47  // or origin of the auxiliary axis
48 
49 
50 private:
52  wxConfigBase* m_config;
55  bool m_drillOriginIsAuxAxis; // Axis selection (main / auxiliary)
56  // for drill origin coordinates
62 
63  static int m_mapFileType; // HPGL, PS ...
64  static int m_drillFileType; // Excellon, Gerber
65 
66 
67  void initDialog();
68  void InitDisplayParams( void );
69 
70  // event functions
71  void OnSelDrillUnitsSelected( wxCommandEvent& event ) override;
72  void OnSelZerosFmtSelected( wxCommandEvent& event ) override;
73  void OnGenDrillFile( wxCommandEvent& event ) override;
74  void OnGenMapFile( wxCommandEvent& event ) override;
75  void onFileFormatSelection( wxCommandEvent& event ) override;
76 
77  /*
78  * Create a plain text report file giving a list of drill values and drill count
79  * for through holes, oblong holes, and for buried vias,
80  * drill values and drill count per layer pair
81  */
82  void OnGenReportFile( wxCommandEvent& event ) override;
83 
84  void OnCancelClick( wxCommandEvent& event ) override;
85  void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
86 
87  // Specific functions:
88  void SetParams( void );
89 
100  void GenDrillAndMapFiles( bool aGenDrill, bool aGenMap );
101 
102  void UpdatePrecisionOptions();
103  void UpdateConfig();
104  int Create_Drill_File_EXCELLON( FILE* aFile, wxPoint aOffset );
105  int Gen_Liste_Tools( std::vector<DRILL_TOOL>& buffer,
106  bool print_header );
107 
112 };
113 
114 #endif // DIALOG_GENDRILL_H_
static int m_UnitDrillIsInch
void OnGenDrillFile(wxCommandEvent &event) override
wxConfigBase * m_config
void OnSelZerosFmtSelected(wxCommandEvent &event) override
void OnSelDrillUnitsSelected(wxCommandEvent &event) override
Class DIALOG_GENDRILL_BASE.
static bool m_Merge_PTH_NPTH
static int m_ZerosFormat
wxPoint m_FileDrillOffset
static int m_mapFileType
int Gen_Liste_Tools(std::vector< DRILL_TOOL > &buffer, bool print_header)
static bool m_MinimalHeader
void OnCancelClick(wxCommandEvent &event) override
DRILL_PRECISION GetPrecison()
Return the selected format for coordinates, if not decimal.
PCB_PLOT_PARAMS m_plotOpts
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board...
int Create_Drill_File_EXCELLON(FILE *aFile, wxPoint aOffset)
static bool m_Mirror
DRILL_PRECISION m_Precision
void onFileFormatSelection(wxCommandEvent &event) override
static int m_drillFileType
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:169
void InitDisplayParams(void)
void OnGenReportFile(wxCommandEvent &event) override
DIALOG_GENDRILL(PCB_EDIT_FRAME *parent)
void OnOutputDirectoryBrowseClicked(wxCommandEvent &event) override
void OnGenMapFile(wxCommandEvent &event) override
void GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
Function GenDrillAndMapFiles Calls the functions to create EXCELLON drill files and/or drill map file...
PCB_EDIT_FRAME * m_parent