KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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-2022 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 <math/vector2d.h>
31
32class BOARD;
33class FOOTPRINT;
34class PAD;
35
40{
41public:
43
45 {
46 }
47
48
56 void SetOptions( const VECTOR2I& 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
80private:
89 double mapRotationAngle( double aAngle, bool aIsFlipped );
90
99 void findPads1( std::vector<PAD*>& aPadList, FOOTPRINT* aFootprint ) const;
100
102 PCB_LAYER_ID m_layer; // The board layer currently used (typically F_Cu or B_Cu)
103 VECTOR2I m_offset; // Drill offset coordinates
104
105 bool m_plotPad1Marker; // True to plot a flashed marker shape at pad 1 position
106 bool m_plotOtherPadsMarker; // True to plot a marker shape at other pads position
107 // This is a flashed 0 sized round pad
108};
109
110#endif // #ifndef PLACEFILE_GERBER_WRITER_H
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:281
Definition: pad.h:59
Used to create Gerber drill files.
const wxString GetPlaceFileName(const wxString &aFullBaseFilename, PCB_LAYER_ID aLayer) const
void SetOptions(const VECTOR2I &aOffset)
Initialize internal parameters to match drill options.
int CreatePlaceFile(wxString &aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges)
Create an pnp gerber file.
double mapRotationAngle(double aAngle, bool aIsFlipped)
Convert a KiCad footprint orientation to gerber rotation both are in degrees.
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:60