KiCad PCB EDA Suite
Loading...
Searching...
No Matches
exporter_step.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) 2022 Mark Roszko <[email protected]>
5 * Copyright (C) 2016 Cirilo Bernardo <[email protected]>
6 * Copyright (C) 2016-2024 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef EXPORTER_STEP_H
27#define EXPORTER_STEP_H
28
30#include <gal/color4d.h>
31#include <jobs/job_export_pcb_3d.h> // For EXPORTER_STEP_PARAMS
32#include <layer_ids.h>
33#include <lset.h>
34
35
36class PCBMODEL;
37class BOARD;
38class BOARD_ITEM;
39class FOOTPRINT;
40class PCB_TRACK;
42class STEP_PCB_MODEL;
43
44
46{
47public:
48 EXPORTER_STEP( BOARD* aBoard, const EXPORTER_STEP_PARAMS& aParams );
50
51 bool Export();
52
53 wxString m_outputFile;
54
55 void SetError() { m_error = true; }
56 void SetFail() { m_fail = true; }
57 void SetWarn() { m_warn = true; }
58
59private:
60 bool buildBoard3DShapes();
61 bool buildFootprint3DShapes( FOOTPRINT* aFootprint, VECTOR2D aOrigin );
62 bool buildTrack3DShape( PCB_TRACK* aTrack, VECTOR2D aOrigin );
63 void buildZones3DShape( VECTOR2D aOrigin );
64 bool buildGraphic3DShape( BOARD_ITEM* aItem, VECTOR2D aOrigin );
65 void initOutputVariant();
66
68 std::unique_ptr<FILENAME_RESOLVER> m_resolver;
69
70private:
71 bool m_error;
72 bool m_fail;
73 bool m_warn;
74
76 std::unique_ptr<STEP_PCB_MODEL> m_pcbModel;
77
80 wxString m_pcbBaseName;
81
82 std::map<PCB_LAYER_ID, SHAPE_POLY_SET> m_poly_shapes;
83 std::map<PCB_LAYER_ID, SHAPE_POLY_SET> m_poly_holes;
84
86
89
90 int m_platingThickness; // plating thickness for TH pads/vias
91};
92
93#endif
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:79
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:290
int m_platingThickness
Definition: exporter_step.h:90
void buildZones3DShape(VECTOR2D aOrigin)
LSET m_layersToExport
Definition: exporter_step.h:85
void initOutputVariant()
std::map< PCB_LAYER_ID, SHAPE_POLY_SET > m_poly_holes
Definition: exporter_step.h:83
BOARD * m_board
Definition: exporter_step.h:75
wxString m_outputFile
Definition: exporter_step.h:53
bool buildGraphic3DShape(BOARD_ITEM *aItem, VECTOR2D aOrigin)
EXPORTER_STEP_PARAMS m_params
Definition: exporter_step.h:67
wxString m_pcbBaseName
the name of the project (board short filename (no path, no ext) used to identify items in step file
Definition: exporter_step.h:80
bool buildFootprint3DShapes(FOOTPRINT *aFootprint, VECTOR2D aOrigin)
std::unique_ptr< FILENAME_RESOLVER > m_resolver
Definition: exporter_step.h:68
bool buildBoard3DShapes()
std::unique_ptr< STEP_PCB_MODEL > m_pcbModel
Definition: exporter_step.h:76
std::map< PCB_LAYER_ID, SHAPE_POLY_SET > m_poly_shapes
Definition: exporter_step.h:82
bool buildTrack3DShape(PCB_TRACK *aTrack, VECTOR2D aOrigin)
KIGFX::COLOR4D m_copperColor
Definition: exporter_step.h:87
KIGFX::COLOR4D m_padColor
Definition: exporter_step.h:88
Provide an extensible class to resolve 3D model paths.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
LSET is a set of PCB_LAYER_IDs.
Definition: lset.h:36