KiCad PCB EDA Suite
Loading...
Searching...
No Matches
gendrill_gerber_writer.h
Go to the documentation of this file.
1
5
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 The 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, see <https://www.gnu.org/licenses/>.
24 */
25
26#ifndef _GENDRILL_GERBER_WRITER_
27#define _GENDRILL_GERBER_WRITER_
28
30
31#include <wx/filename.h>
32
33class BOARD;
34
39{
40public:
41 GERBER_WRITER( BOARD* aPcb );
42
44 {
45 }
46
52 void SetFormat( int aRightDigits = 6 );
53
61 void SetOptions( const VECTOR2I& aOffset )
62 {
63 m_offset = aOffset;
64 m_merge_PTH_NPTH = false;
65 }
66
79 bool CreateDrillandMapFilesSet( const wxString& aPlotDirectory, bool aGenDrill, bool aGenMap,
80 bool aGenTenting, REPORTER* aReporter = nullptr );
81
82private:
92 int createDrillFile( wxString& aFullFilename, bool aIsNpth, const DRILL_SPAN& aSpan );
93
101 int createProtectionFile( const wxString& aFullFilename, IPC4761_FEATURES aFeature,
102 DRILL_LAYER_PAIR aLayerPair );
103
113 virtual const wxString getDrillFileName( const DRILL_SPAN& aSpan, bool aNPTH,
114 bool aMerge_PTH_NPTH ) const override;
115
121 bool hasViaType( IPC4761_FEATURES aFeature );
122
123 wxFileName getBackdrillLayerPairFileName( const DRILL_SPAN& aSpan ) const;
124 bool writeBackdrillLayerPairFile( const wxString& aPlotDirectory, REPORTER* aReporter,
125 const DRILL_SPAN& aSpan );
126};
127
128#endif // #ifndef _GENDRILL_GERBER_WRITER_
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
bool CreateDrillandMapFilesSet(const wxString &aPlotDirectory, bool aGenDrill, bool aGenMap, bool aGenTenting, REPORTER *aReporter=nullptr)
Create the full set of Excellon drill file for the board filenames are computed from the board name,...
bool writeBackdrillLayerPairFile(const wxString &aPlotDirectory, REPORTER *aReporter, const DRILL_SPAN &aSpan)
int createDrillFile(wxString &aFullFilename, bool aIsNpth, const DRILL_SPAN &aSpan)
Create an Excellon drill file.
virtual const wxString getDrillFileName(const DRILL_SPAN &aSpan, bool aNPTH, bool aMerge_PTH_NPTH) const override
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.
wxFileName getBackdrillLayerPairFileName(const DRILL_SPAN &aSpan) const
int createProtectionFile(const wxString &aFullFilename, IPC4761_FEATURES aFeature, DRILL_LAYER_PAIR aLayerPair)
Create a Gerber X2 file for via protection features.
bool hasViaType(IPC4761_FEATURES aFeature)
test for an existing via having the given feature IPC4761_FEATURES
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
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683