KiCad PCB EDA Suite
Loading...
Searching...
No Matches
export_idf.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_IDF_H
21#define EXPORT_IDF_H
22
23#include <memory>
24#include <math/vector2d.h>
25#include <wx/string.h>
26
27class BOARD;
29class IDF3_BOARD;
33class REPORTER;
34
35
37{
38public:
39 explicit IDF_EXPORTER( BOARD* aBoard, FILENAME_RESOLVER* aResolver, JOB_EXPORT_PCB_IDF* aSettings,
40 REPORTER* aReporter = nullptr );
41
50 bool Export( const wxString& aFullFileName ) const;
51
52private:
53 VECTOR2D getOrigin() const;
54
56 void exportFootprint( FOOTPRINT* aFootprint, IDF3_BOARD& aIDFBoard ) const;
57
62 bool exportFootprintIdfModels( FOOTPRINT* aFootprint, IDF3_BOARD& aIDFBoard ) const;
63
66 const EXTRUDED_3D_BODY& aBody ) const;
67
69 int getMaxModelHeight( FOOTPRINT* aFootprint ) const;
70
71 BOARD* m_board = nullptr;
74 REPORTER* m_reporter = nullptr;
75
76 std::unique_ptr<JOB_EXPORT_PCB_IDF> m_defaultSettings;
77};
78
79#endif // EXPORT_IDF_H
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:410
Provide an extensible class to resolve 3D model paths.
A component's outline as stored in an IDF library file.
JOB_EXPORT_PCB_IDF * m_settings
Definition export_idf.h:73
VECTOR2D getOrigin() const
IDF3_COMP_OUTLINE * createOutlineFromExtrudedBody(const FOOTPRINT *aFootprint, IDF3_BOARD &aIDFBoard, const EXTRUDED_3D_BODY &aBody) const
Generates an IDF component outline from a footprint extruded 3D body, if possible.
FILENAME_RESOLVER * m_resolver
Definition export_idf.h:72
bool Export(const wxString &aFullFileName) const
Generate IDFv3 compliant board (*.emn) and library (*.emp) files for aPcb.
void exportFootprint(FOOTPRINT *aFootprint, IDF3_BOARD &aIDFBoard) const
Exports the given footprint to an in-progress IDF file.
BOARD * m_board
Definition export_idf.h:71
int getMaxModelHeight(FOOTPRINT *aFootprint) const
Returns the largest extent in Z of the footprint's visible 3D models, in IU.
bool exportFootprintIdfModels(FOOTPRINT *aFootprint, IDF3_BOARD &aIDFBoard) const
Exports any explicit IDF models attached to a footprint to an in-progress IDF file.
IDF_EXPORTER(BOARD *aBoard, FILENAME_RESOLVER *aResolver, JOB_EXPORT_PCB_IDF *aSettings, REPORTER *aReporter=nullptr)
REPORTER * m_reporter
Definition export_idf.h:74
std::unique_ptr< JOB_EXPORT_PCB_IDF > m_defaultSettings
Definition export_idf.h:76
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:73
VECTOR2< double > VECTOR2D
Definition vector2d.h:707