KiCad PCB EDA Suite
export_footprints_placefile.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) 2015-2019 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 <class_board.h>
29 #include <class_module.h>
30 
52 {
53 public:
54 
64  PLACE_FILE_EXPORTER( BOARD* aBoard, bool aUnitsMM,
65  bool aForceSmdItems, bool aTopSide, bool aBottomSide, bool aFormatCSV );
66 
70  std::string GenPositionData();
71 
78  std::string GenReportData();
79 
83  int GetFootprintCount() { return m_fpCount; }
84 
91  std::vector<MODULE*>& GetSmdFootprintsNotLabeledSMD()
92  {
94  }
95 
96  // Use standard board side name. do not translate them,
97  // they are keywords in place file
98  static std::string GetFrontSideName() { return std::string( "top" ); }
99  static std::string GetBackSideName() { return std::string( "bottom" ); }
100 
101 private:
103  bool m_unitsMM; // true for mm, false for inches
104  bool m_forceSmdItems; // If true, non virtual fp with the flag MOD_CMD not set but
105  // having only smd pads will be in list
106  // and will be added in m_smdFootprintsNotLabeledSMD
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  int m_fpCount; // Number of footprints in list, for info
110  wxPoint m_place_Offset; // Offset for coordinates in generated data.
111 
112  // A list of footprints with MOD_CMS flag not set but having only smd pads.
113  // This list can be used to force this flag.
114  std::vector<MODULE*> m_smdFootprintsNotLabeledSMD;
115 };
116 
117 #endif // #ifndef EXPORT_FOOTPRINTS_PLACEFILE_H
std::string GenPositionData()
build a string filled with the position data
PLACE_FILE_EXPORTER(BOARD *aBoard, bool aUnitsMM, bool aForceSmdItems, bool aTopSide, bool aBottomSide, bool aFormatCSV)
Create a PLACE_FILE_EXPORTER.
The ASCII format of the kicad place file is:
std::string GenReportData()
build a string filled with the pad report data This report does not used options aForceSmdItems,...
std::vector< MODULE * > & GetSmdFootprintsNotLabeledSMD()
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:180
std::vector< MODULE * > m_smdFootprintsNotLabeledSMD
static std::string GetBackSideName()
static std::string GetFrontSideName()