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, you may find one here:
18
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19
* or you may search the http://www.gnu.org website for the version 2 license,
20
* or you may write to the Free Software Foundation, Inc.,
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
*/
23
24
#ifndef EXPORT_FOOTPRINTS_PLACEFILE_H
25
#define EXPORT_FOOTPRINTS_PLACEFILE_H
26
27
28
#include <
board.h
>
29
#include <
footprint.h
>
30
49
50
51
class
PLACE_FILE_EXPORTER
52
{
53
public
:
54
68
PLACE_FILE_EXPORTER
(
BOARD
* aBoard,
bool
aUnitsMM,
bool
aOnlySMD,
bool
aExcludeAllTH,
69
bool
aExcludeDNP,
bool
aTopSide,
bool
aBottomSide,
bool
aFormatCSV,
70
bool
aUseAuxOrigin,
bool
aNegateBottomX );
71
75
std::string
GenPositionData
();
76
83
std::string
GenReportData
();
84
88
int
GetFootprintCount
() {
return
m_fpCount
; }
89
90
// Use standard board side name. do not translate them,
91
// they are keywords in place file
92
static
std::string
GetFrontSideName
() {
return
std::string(
"top"
); }
93
static
std::string
GetBackSideName
() {
return
std::string(
"bottom"
); }
94
95
static
wxString
DecorateFilename
(
const
wxString& aBaseName,
bool
aFront,
bool
aBack );
96
97
private
:
98
BOARD
*
m_board
;
99
bool
m_unitsMM
;
// true for mm, false for inches
100
bool
m_onlySMD
;
// Include only SMD components
101
bool
m_excludeDNP
;
// Exclude DNP components
102
bool
m_excludeAllTH
;
// Exclude any footprints with through-hole pads
103
int
m_side
;
// PCB_BACK_SIDE, PCB_FRONT_SIDE, PCB_BOTH_SIDES
104
bool
m_formatCSV
;
// true for csv format, false for ascii (utf8) format
105
bool
m_negateBottomX
;
// true to negate X coordinate on bottom side
106
int
m_fpCount
;
// Number of footprints in list, for info
107
VECTOR2I
m_place_Offset
;
// Offset for coordinates in generated data.
108
};
109
110
#endif
// #ifndef EXPORT_FOOTPRINTS_PLACEFILE_H
board.h
BOARD
Information pertinent to a Pcbnew printed circuit board.
Definition
board.h:317
PLACE_FILE_EXPORTER::m_onlySMD
bool m_onlySMD
Definition
place_file_exporter.h:100
PLACE_FILE_EXPORTER::m_board
BOARD * m_board
Definition
place_file_exporter.h:98
PLACE_FILE_EXPORTER::m_side
int m_side
Definition
place_file_exporter.h:103
PLACE_FILE_EXPORTER::GetFootprintCount
int GetFootprintCount()
Definition
place_file_exporter.h:88
PLACE_FILE_EXPORTER::GetFrontSideName
static std::string GetFrontSideName()
Definition
place_file_exporter.h:92
PLACE_FILE_EXPORTER::m_unitsMM
bool m_unitsMM
Definition
place_file_exporter.h:99
PLACE_FILE_EXPORTER::m_excludeDNP
bool m_excludeDNP
Definition
place_file_exporter.h:101
PLACE_FILE_EXPORTER::DecorateFilename
static wxString DecorateFilename(const wxString &aBaseName, bool aFront, bool aBack)
Definition
place_file_exporter.cpp:430
PLACE_FILE_EXPORTER::m_excludeAllTH
bool m_excludeAllTH
Definition
place_file_exporter.h:102
PLACE_FILE_EXPORTER::m_negateBottomX
bool m_negateBottomX
Definition
place_file_exporter.h:105
PLACE_FILE_EXPORTER::GenPositionData
std::string GenPositionData()
build a string filled with the position data
Definition
place_file_exporter.cpp:109
PLACE_FILE_EXPORTER::PLACE_FILE_EXPORTER
PLACE_FILE_EXPORTER(BOARD *aBoard, bool aUnitsMM, bool aOnlySMD, bool aExcludeAllTH, bool aExcludeDNP, bool aTopSide, bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX)
Create a PLACE_FILE_EXPORTER.
Definition
place_file_exporter.cpp:78
PLACE_FILE_EXPORTER::GetBackSideName
static std::string GetBackSideName()
Definition
place_file_exporter.h:93
PLACE_FILE_EXPORTER::m_fpCount
int m_fpCount
Definition
place_file_exporter.h:106
PLACE_FILE_EXPORTER::m_formatCSV
bool m_formatCSV
Definition
place_file_exporter.h:104
PLACE_FILE_EXPORTER::GenReportData
std::string GenReportData()
build a string filled with the pad report data This report does not used options aForceSmdItems,...
Definition
place_file_exporter.cpp:290
PLACE_FILE_EXPORTER::m_place_Offset
VECTOR2I m_place_Offset
Definition
place_file_exporter.h:107
footprint.h
VECTOR2I
VECTOR2< int32_t > VECTOR2I
Definition
vector2d.h:695
src
pcbnew
exporters
place_file_exporter.h
Generated on Sun Sep 21 2025 01:05:28 for KiCad PCB EDA Suite by
1.13.2