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-2019 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 
30 
31 class BOARD;
32 class MODULE;
33 class D_PAD;
34 
39 {
40 public:
42 
44  {
45  }
46 
47 
54  void SetOptions( wxPoint aOffset )
55  {
56  m_offset = aOffset;
57  }
58 
66  int CreatePlaceFile( wxString& aFullFilename, PCB_LAYER_ID aLayer,
67  bool aIncludeBrdEdges );
68 
75  const wxString GetPlaceFileName( const wxString& aFullBaseFilename,
76  PCB_LAYER_ID aLayer ) const;
77 
78 private:
82  double m_conversionUnits; // scaling factor to convert the board unites to
83  // Excellon/Gerber units (i.e inches or mm)
84  wxPoint m_offset; // Drill offset coordinates
86  // True to plot a flashed marker shape at pad 1 position
88  // True to plot a marker shape at other pads position
89  // This is a flashed 0 sized round pad
91 
92 
96  double mapRotationAngle( double aAngle );
97 
103  void findPads1( std::vector<D_PAD*>& aPadList, MODULE* aFootprint ) const;
104 };
105 
106 #endif // #ifndef PLACEFILE_GERBER_WRITER_H
int CreatePlaceFile(wxString &aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges)
Creates an pnp gerber file.
void findPads1(std::vector< D_PAD * > &aPadList, MODULE *aFootprint) const
Find the pad(s) 1 (or pad "A1") of a footprint Usefull to plot a marker at this (these) position(s)
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID m_layer
The board layer currently used (typically F_Cu or B_Cu)
void SetOptions(wxPoint aOffset)
Function SetOptions Initialize internal parameters to match drill options note: PTH and NPTH are alwa...
const wxString GetPlaceFileName(const wxString &aFullBaseFilename, PCB_LAYER_ID aLayer) const
Board layer functions and definitions.
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:180
double mapRotationAngle(double aAngle)
convert a kicad footprint orientation to gerber rotation both are in degrees
PLACEFILE_GERBER_WRITER is a class mainly used to create Gerber drill files.