KiCad PCB EDA Suite
gerber_placefile_writer.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) 2019 Jean_Pierre Charras <jp.charras at wanadoo.fr>
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 modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
26 #ifndef PLACEFILE_GERBER_WRITER_H
27 #define PLACEFILE_GERBER_WRITER_H
28 
29 #include <layer_ids.h>
30 #include <wx/gdicmn.h>
31 
32 class BOARD;
33 class FOOTPRINT;
34 class PAD;
35 
40 {
41 public:
43 
45  {
46  }
47 
48 
56  void SetOptions( const wxPoint& aOffset )
57  {
58  m_offset = aOffset;
59  }
60 
69  int CreatePlaceFile( wxString& aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges );
70 
77  const wxString GetPlaceFileName( const wxString& aFullBaseFilename,
78  PCB_LAYER_ID aLayer ) const;
79 
80 private:
84  double mapRotationAngle( double aAngle );
85 
94  void findPads1( std::vector<PAD*>& aPadList, FOOTPRINT* aFootprint ) const;
95 
97  PCB_LAYER_ID m_layer; // The board layer currently used (typically F_Cu or B_Cu)
98  wxPoint m_offset; // Drill offset coordinates
99 
100  bool m_plotPad1Marker; // True to plot a flashed marker shape at pad 1 position
101  bool m_plotOtherPadsMarker; // True to plot a marker shape at other pads position
102  // This is a flashed 0 sized round pad
103 };
104 
105 #endif // #ifndef PLACEFILE_GERBER_WRITER_H
int CreatePlaceFile(wxString &aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges)
Create an pnp gerber file.
const wxString GetPlaceFileName(const wxString &aFullBaseFilename, PCB_LAYER_ID aLayer) const
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
void findPads1(std::vector< PAD * > &aPadList, FOOTPRINT *aFootprint) const
Find the pad(s) 1 (or pad "A1") of a footprint.
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:64
double mapRotationAngle(double aAngle)
Convert a KiCad footprint orientation to gerber rotation both are in degrees.
Definition: pad.h:57
Used to create Gerber drill files.
void SetOptions(const wxPoint &aOffset)
Initialize internal parameters to match drill options.