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-2021 KiCad Developers, see AUTHORS.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
35class BOARD;
36
41{
42public:
43 GERBER_WRITER( BOARD* aPcb );
44
46 {
47 }
48
54 void SetFormat( int aRightDigits = 6 );
55
63 void SetOptions( const VECTOR2I& aOffset )
64 {
65 m_offset = aOffset;
66 m_merge_PTH_NPTH = false;
67 }
68
78 void CreateDrillandMapFilesSet( const wxString& aPlotDirectory,
79 bool aGenDrill, bool aGenMap,
80 REPORTER * aReporter = nullptr );
81
82private:
92 int createDrillFile( wxString& aFullFilename, bool aIsNpth, DRILL_LAYER_PAIR aLayerPair );
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_
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:240
Create drill maps and drill reports and drill files.
Used to create Gerber drill files.
void CreateDrillandMapFilesSet(const wxString &aPlotDirectory, bool aGenDrill, bool aGenMap, REPORTER *aReporter=nullptr)
Create the full set of Excellon drill file for the board filenames are computed from the board name,...
virtual const wxString getDrillFileName(DRILL_LAYER_PAIR aPair, bool aNPTH, bool aMerge_PTH_NPTH) const override
int createDrillFile(wxString &aFullFilename, bool aIsNpth, DRILL_LAYER_PAIR aLayerPair)
Create an Excellon drill file.
void SetOptions(const VECTOR2I &aOffset)
Initialize internal parameters to match drill options.
void SetFormat(int aRightDigits=6)
Initialize internal parameters to match the given format.
GERBER_WRITER(BOARD *aPcb)
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
helper classes to handle hole info for drill files generators.
std::pair< PCB_LAYER_ID, PCB_LAYER_ID > DRILL_LAYER_PAIR