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 The 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
25
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
65 void SetVariant( const wxString& aVariant ) { m_variant = aVariant; }
66
75 int CreatePlaceFile( const wxString& aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges,
76 bool aExcludeDNP, bool aExcludeBOM );
77
84 const wxString GetPlaceFileName( const wxString& aFullBaseFilename,
85 PCB_LAYER_ID aLayer ) const;
86
87private:
96 double mapRotationAngle( double aAngle, bool aIsFlipped );
97
106 void findPads1( std::vector<PAD*>& aPadList, FOOTPRINT* aFootprint ) const;
107
109 PCB_LAYER_ID m_layer; // The board layer currently used (typically F_Cu or B_Cu)
110 VECTOR2I m_offset; // Drill offset coordinates
111
112 bool m_plotPad1Marker; // True to plot a flashed marker shape at pad 1 position
113 bool m_plotOtherPadsMarker; // True to plot a marker shape at other pads position
114 // This is a flashed 0 sized round pad
115
116 wxString m_variant; // Variant name for variant-aware filtering
117};
118
119#endif // #ifndef PLACEFILE_GERBER_WRITER_H
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:322
Definition pad.h:55
const wxString GetPlaceFileName(const wxString &aFullBaseFilename, PCB_LAYER_ID aLayer) const
void SetOptions(const VECTOR2I &aOffset)
Initialize internal parameters to match drill options.
void SetVariant(const wxString &aVariant)
Set the variant name for variant-aware filtering.
double mapRotationAngle(double aAngle, bool aIsFlipped)
Convert a KiCad footprint orientation to gerber rotation both are in degrees.
int CreatePlaceFile(const wxString &aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges, bool aExcludeDNP, bool aExcludeBOM)
Create an pnp gerber file.
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
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695