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 The 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#include <reporter.h>
35
36
37class PCBMODEL;
38class BOARD;
39class BOARD_ITEM;
40class FOOTPRINT;
41class PCB_TRACK;
43class STEP_PCB_MODEL;
44
45
47{
48public:
49 EXPORTER_STEP( BOARD* aBoard, const EXPORTER_STEP_PARAMS& aParams, REPORTER* aReporter );
51
52 bool Export();
53
54 wxString m_outputFile;
55
56private:
57 bool buildBoard3DShapes();
58 bool buildFootprint3DShapes( FOOTPRINT* aFootprint, VECTOR2D aOrigin, SHAPE_POLY_SET* aClipPolygon );
59 bool buildTrack3DShape( PCB_TRACK* aTrack, VECTOR2D aOrigin );
60 void buildZones3DShape( VECTOR2D aOrigin );
61 bool buildGraphic3DShape( BOARD_ITEM* aItem, VECTOR2D aOrigin );
62 void initOutputVariant();
63
65 std::unique_ptr<FILENAME_RESOLVER> m_resolver;
66
67private:
69
71 std::unique_ptr<STEP_PCB_MODEL> m_pcbModel;
72
75 wxString m_pcbBaseName;
76
77 // wxString key is netname
78 std::map<PCB_LAYER_ID, std::map<wxString, SHAPE_POLY_SET>> m_poly_shapes;
79 std::map<PCB_LAYER_ID, SHAPE_POLY_SET> m_poly_holes;
80
82
85
86 int m_platingThickness; // plating thickness for TH pads/vias
87};
88
89#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:317
int m_platingThickness
Definition: exporter_step.h:86
void buildZones3DShape(VECTOR2D aOrigin)
LSET m_layersToExport
Definition: exporter_step.h:81
REPORTER * m_reporter
Definition: exporter_step.h:68
void initOutputVariant()
std::map< PCB_LAYER_ID, SHAPE_POLY_SET > m_poly_holes
Definition: exporter_step.h:79
BOARD * m_board
Definition: exporter_step.h:70
wxString m_outputFile
Definition: exporter_step.h:54
bool buildGraphic3DShape(BOARD_ITEM *aItem, VECTOR2D aOrigin)
bool buildFootprint3DShapes(FOOTPRINT *aFootprint, VECTOR2D aOrigin, SHAPE_POLY_SET *aClipPolygon)
EXPORTER_STEP_PARAMS m_params
Definition: exporter_step.h:64
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:75
std::unique_ptr< FILENAME_RESOLVER > m_resolver
Definition: exporter_step.h:65
bool buildBoard3DShapes()
std::unique_ptr< STEP_PCB_MODEL > m_pcbModel
Definition: exporter_step.h:71
std::map< PCB_LAYER_ID, std::map< wxString, SHAPE_POLY_SET > > m_poly_shapes
Definition: exporter_step.h:78
bool buildTrack3DShape(PCB_TRACK *aTrack, VECTOR2D aOrigin)
KIGFX::COLOR4D m_copperColor
Definition: exporter_step.h:83
KIGFX::COLOR4D m_padColor
Definition: exporter_step.h:84
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:37
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:73
Represent a set of closed polygons.