KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_export_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) 2016 Cirilo Bernardo
5 * Copyright (C) 2016-2024 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#pragma once
26
28
29class PCB_EDIT_FRAME;
31
33{
34public:
36 {
37 STEP_ORIGIN_0, // absolute coordinates
38 STEP_ORIGIN_PLOT_AXIS, // origin is plot/drill axis origin
39 STEP_ORIGIN_GRID_AXIS, // origin is grid origin
40 STEP_ORIGIN_BOARD_CENTER, // origin is board center
41 STEP_ORIGIN_USER, // origin is entered by user
42 };
43
44 DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aEditFrame, const wxString& aBoardPath );
45 DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aEditFrame, wxWindow* aParent, const wxString& aBoardPath,
46 JOB_EXPORT_PCB_3D* aJob = nullptr );
48
49protected:
50 void onBrowseClicked( wxCommandEvent& aEvent ) override;
51 void onUpdateUnits( wxUpdateUIEvent& aEvent ) override;
52 void onUpdateXPos( wxUpdateUIEvent& aEvent ) override;
53 void onUpdateYPos( wxUpdateUIEvent& aEvent ) override;
54 void onExportButton( wxCommandEvent& aEvent ) override;
55 void onFormatChoice( wxCommandEvent& event ) override;
56 void onCbExportComponents( wxCommandEvent& event ) override;
57 void OnComponentModeChange( wxCommandEvent& event ) override;
58
60 {
61 return m_STEP_OrgUnitChoice->GetSelection();
62 }
63
64 double GetXOrg() const;
65
66 double GetYOrg();
67
69
71 {
72 return m_cbRemoveUnspecified->GetValue();
73 }
74
76 {
77 return m_cbRemoveDNP->GetValue();
78 }
79
81 {
82 return m_cbSubstModels->GetValue();
83 }
84
86 {
87 return m_cbOverwriteFile->GetValue();
88 }
89
90 // Called to update filename extension after the output file format is changed
92
93private:
94 enum class COMPONENT_MODE
95 {
99 };
100
103 STEP_ORIGIN_OPTION m_origin; // The last preference for STEP origin option
104 double m_userOriginX; // remember last User Origin X value
105 double m_userOriginY; // remember last User Origin Y value
106 int m_originUnits; // remember last units for User Origin
107 bool m_noUnspecified; // remember last preference for No Unspecified Component
108 bool m_noDNP; // remember last preference for No DNP Component
109 static bool m_optimizeStep; // remember last preference for Optimize STEP file (stored only for the session)
110 static bool m_exportBoardBody; // remember last preference to export board body (stored only for the session)
111 static bool m_exportComponents; // remember last preference to export components (stored only for the session)
112 static bool m_exportTracks; // remember last preference to export tracks and vias (stored only for the session)
113 static bool m_exportPads; // remember last preference to export pads (stored only for the session)
114 static bool m_exportZones; // remember last preference to export zones (stored only for the session)
115 static bool m_exportInnerCopper; // remember last preference to export inner layers (stored only for the session)
116 static bool m_exportSilkscreen; // remember last preference to export silkscreen (stored only for the session)
117 static bool m_exportSoldermask; // remember last preference to export soldermask (stored only for the session)
118 static bool m_fuseShapes; // remember last preference to fuse shapes (stored only for the session)
119 wxString m_netFilter; // filter copper nets
120 static wxString m_componentFilter; // filter component reference designators
122 wxString m_boardPath; // path to the exported board file
123 static int m_toleranceLastChoice; // Store m_tolerance option during a session
124 static int m_formatLastChoice; // Store format option during a session
125};
Class DIALOG_EXPORT_STEP_BASE.
void onFormatChoice(wxCommandEvent &event) override
STEP_ORIGIN_OPTION GetOriginOption()
static bool m_exportSoldermask
int GetOrgUnitsChoice() const
void onCbExportComponents(wxCommandEvent &event) override
PCB_EDIT_FRAME * m_editFrame
void OnComponentModeChange(wxCommandEvent &event) override
static COMPONENT_MODE m_componentMode
void onUpdateXPos(wxUpdateUIEvent &aEvent) override
static bool m_exportComponents
STEP_ORIGIN_OPTION m_origin
JOB_EXPORT_PCB_3D * m_job
void onExportButton(wxCommandEvent &aEvent) override
static bool m_exportBoardBody
static bool m_exportSilkscreen
static wxString m_componentFilter
static int m_toleranceLastChoice
void onUpdateUnits(wxUpdateUIEvent &aEvent) override
static bool m_exportInnerCopper
void onUpdateYPos(wxUpdateUIEvent &aEvent) override
void onBrowseClicked(wxCommandEvent &aEvent) override
The main frame for Pcbnew.