KiCad PCB EDA Suite
Loading...
Searching...
No Matches
place_file_exporter.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef EXPORT_FOOTPRINTS_PLACEFILE_H
21#define EXPORT_FOOTPRINTS_PLACEFILE_H
22
23
24#include <board.h>
25
44
45
47{
48public:
49
64 PLACE_FILE_EXPORTER( BOARD* aBoard, bool aUnitsMM, bool aOnlySMD, bool aExcludeAllTH,
65 bool aExcludeDNP, bool aExcludeBOM, bool aTopSide, bool aBottomSide,
66 bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX );
67
71 std::string GenPositionData();
72
79 std::string GenReportData();
80
84 int GetFootprintCount() { return m_fpCount; }
85
91 void SetVariant( const wxString& aVariant ) { m_variant = aVariant; }
92
93 // Use standard board side name. do not translate them,
94 // they are keywords in place file
95 static std::string GetFrontSideName() { return std::string( "top" ); }
96 static std::string GetBackSideName() { return std::string( "bottom" ); }
97
98 static wxString DecorateFilename( const wxString& aBaseName, bool aFront, bool aBack );
99
100private:
102 bool m_unitsMM; // true for mm, false for inches
103 bool m_onlySMD; // Include only SMD components
104 bool m_excludeDNP; // Exclude DNP components
105 bool m_excludeBOM; // Exclude components flagged exclude from BOM
106 bool m_excludeAllTH; // Exclude any footprints with through-hole pads
107 int m_side; // PCB_BACK_SIDE, PCB_FRONT_SIDE, PCB_BOTH_SIDES
108 bool m_formatCSV; // true for csv format, false for ascii (utf8) format
109 bool m_negateBottomX; // true to negate X coordinate on bottom side
110 int m_fpCount; // Number of footprints in list, for info
111 VECTOR2I m_place_Offset; // Offset for coordinates in generated data.
112 wxString m_variant; // Variant name for variant-aware field values and filtering
113};
114
115#endif // #ifndef EXPORT_FOOTPRINTS_PLACEFILE_H
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
PLACE_FILE_EXPORTER(BOARD *aBoard, bool aUnitsMM, bool aOnlySMD, bool aExcludeAllTH, bool aExcludeDNP, bool aExcludeBOM, bool aTopSide, bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX)
Create a PLACE_FILE_EXPORTER.
static std::string GetFrontSideName()
static wxString DecorateFilename(const wxString &aBaseName, bool aFront, bool aBack)
std::string GenPositionData()
build a string filled with the position data
void SetVariant(const wxString &aVariant)
Set the variant name for variant-aware export.
static std::string GetBackSideName()
std::string GenReportData()
build a string filled with the pad report data This report does not used options aForceSmdItems,...
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683