KiCad PCB EDA Suite
gendrill_gerber_writer.h
Go to the documentation of this file.
1 
6 /*
7  * This program source code file is part of KiCad, a free EDA CAD application.
8  *
9  * Copyright (C) 1992-2017 Jean_Pierre Charras <jp.charras at wanadoo.fr>
10  * Copyright (C) 1992-2017 KiCad Developers, see change_log.txt for contributors.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, you may find one here:
24  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
25  * or you may search the http://www.gnu.org website for the version 2 license,
26  * or you may write to the Free Software Foundation, Inc.,
27  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
28  */
29 
30 #ifndef _GENDRILL_GERBER_WRITER_
31 #define _GENDRILL_GERBER_WRITER_
32 
34 
35 class BOARD;
36 
41 {
42 public:
43  GERBER_WRITER( BOARD* aPcb );
44 
45  virtual ~GERBER_WRITER()
46  {
47  }
48 
54  void SetFormat( int aRightDigits = 6 );
55 
62  void SetOptions( wxPoint aOffset )
63  {
64  m_offset = aOffset;
65  m_merge_PTH_NPTH = false;
66  }
67 
77  void CreateDrillandMapFilesSet( const wxString& aPlotDirectory,
78  bool aGenDrill, bool aGenMap,
79  REPORTER * aReporter = NULL );
80 
81 private:
92  int createDrillFile( wxString& aFullFilename, bool aIsNpth, int aLayer1, int aLayer2 );
93 
103  virtual const wxString getDrillFileName( DRILL_LAYER_PAIR aPair, bool aNPTH,
104  bool aMerge_PTH_NPTH ) const override;
105 };
106 
107 #endif // #ifndef _GENDRILL_GERBER_WRITER_
void SetFormat(int aRightDigits=6)
Function SetFormat Initialize internal parameters to match the given format.
GERBER_WRITER is a class mainly used to create Gerber drill files.
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
helper classes to handle hole info for drill files generators.
std::pair< PCB_LAYER_ID, PCB_LAYER_ID > DRILL_LAYER_PAIR
int createDrillFile(wxString &aFullFilename, bool aIsNpth, int aLayer1, int aLayer2)
Function createDrillFile Creates an Excellon drill file.
void CreateDrillandMapFilesSet(const wxString &aPlotDirectory, bool aGenDrill, bool aGenMap, REPORTER *aReporter=NULL)
Function CreateDrillandMapFilesSet Creates the full set of Excellon drill file for the board filename...
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:170
virtual const wxString getDrillFileName(DRILL_LAYER_PAIR aPair, bool aNPTH, bool aMerge_PTH_NPTH) const override
GERBER_WRITER(BOARD *aPcb)
void SetOptions(wxPoint aOffset)
Function SetOptions Initialize internal parameters to match drill options note: PTH and NPTH are alwa...
GENDRILL_WRITER_BASE is a class to create drill maps and drill report, and a helper class to created ...