15DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
21 bSizerTop =
new wxBoxSizer( wxHORIZONTAL );
23 m_txtFormat =
new wxStaticText(
this, wxID_ANY,
_(
"Format:"), wxDefaultPosition, wxDefaultSize, 0 );
27 wxString m_choiceFormatChoices[] = {
_(
"STEP"),
_(
"GLB (Binary glTF)"),
_(
"XAO"),
_(
"BREP (OCCT)"),
_(
"PLY (ASCII)"),
_(
"STL"),
_(
"STPZ") };
28 int m_choiceFormatNChoices =
sizeof( m_choiceFormatChoices ) /
sizeof( wxString );
29 m_choiceFormat =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceFormatNChoices, m_choiceFormatChoices, 0 );
33 m_txtBrdFile =
new wxStaticText(
this, wxID_ANY,
_(
"File:"), wxDefaultPosition, wxDefaultSize, 0 );
37 m_outputFileName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
38 m_outputFileName->SetToolTip(
_(
"Enter a filename if you do not want to use default file names\nCan be used only when printing the current sheet") );
49 wxBoxSizer* bSizerMain;
50 bSizerMain =
new wxBoxSizer( wxHORIZONTAL );
53 bSizer8 =
new wxBoxSizer( wxVERTICAL );
55 wxStaticBoxSizer* sbBoardOptions;
56 sbBoardOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Board Options") ), wxVERTICAL );
58 m_cbExportCompound_hidden =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export as Compound shape"), wxDefaultPosition, wxDefaultSize, 0 );
60 m_cbExportCompound_hidden->SetToolTip(
_(
"Merges all shapes into a single Compound shape. Useful for external software that does de-duplication based on shape names.") );
64 m_cbExportBody =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export board body"), wxDefaultPosition, wxDefaultSize, 0 );
68 m_cbCutViasInBody =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Cut vias in board body"), wxDefaultPosition, wxDefaultSize, 0 );
69 m_cbCutViasInBody->SetToolTip(
_(
"Cut via holes in board body even if conductor layers are not exported.") );
73 m_cbExportSilkscreen =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
78 m_cbExportSoldermask =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
83 m_cbExportSolderpaste_hidden =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
89 m_cbExportComponents =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export components"), wxDefaultPosition, wxDefaultSize, 0 );
94 bSizer51 =
new wxBoxSizer( wxVERTICAL );
96 m_rbAllComponents =
new wxRadioButton( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"All components"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
100 m_rbOnlySelected =
new wxRadioButton( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Only selected"), wxDefaultPosition, wxDefaultSize, 0 );
101 m_rbOnlySelected->SetToolTip(
_(
"Export only the component models that are selected in the PCB editor") );
105 m_rbFilteredComponents =
new wxRadioButton( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Components matching filter:"), wxDefaultPosition, wxDefaultSize, 0 );
108 m_txtComponentFilter =
new wxTextCtrl( sbBoardOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
110 m_txtComponentFilter->SetToolTip(
_(
"A list of comma-selected reference designators to export (wildcards are supported)") );
115 sbBoardOptions->Add( bSizer51, 1, wxEXPAND|wxLEFT, 20 );
118 bSizer8->Add( sbBoardOptions, 0, wxEXPAND|wxALL, 5 );
120 wxStaticBoxSizer* sbConductorOptions;
121 sbConductorOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Conductor Options") ), wxVERTICAL );
123 m_cbExportTracks =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Export tracks and vias"), wxDefaultPosition, wxDefaultSize, 0 );
124 m_cbExportTracks->SetToolTip(
_(
"Export tracks and vias on external conductor layers.") );
128 m_cbExportPads =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Export pads"), wxDefaultPosition, wxDefaultSize, 0 );
129 sbConductorOptions->Add(
m_cbExportPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
131 m_cbExportZones =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Export zones"), wxDefaultPosition, wxDefaultSize, 0 );
132 m_cbExportZones->SetToolTip(
_(
"Export zones on external conductor layers.") );
134 sbConductorOptions->Add(
m_cbExportZones, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
136 m_cbExportInnerCopper =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Export inner conductor layers"), wxDefaultPosition, wxDefaultSize, 0 );
139 m_cbFuseShapes =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Fuse shapes (time consuming)"), wxDefaultPosition, wxDefaultSize, 0 );
140 m_cbFuseShapes->SetToolTip(
_(
"Combine intersecting geometry into one shape.") );
142 sbConductorOptions->Add(
m_cbFuseShapes, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
144 m_cbFillAllVias =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Fill all vias"), wxDefaultPosition, wxDefaultSize, 0 );
145 m_cbFillAllVias->SetToolTip(
_(
"Don't cut via holes in conductor layers.") );
147 sbConductorOptions->Add(
m_cbFillAllVias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
149 m_staticTextNetFilter =
new wxStaticText( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Net filter (supports wildcards):"), wxDefaultPosition, wxDefaultSize, 0 );
153 m_txtNetFilter =
new wxTextCtrl( sbConductorOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
154 m_txtNetFilter->SetToolTip(
_(
"Only copper items belonging to nets matching this filter will be exported.") );
159 bSizer8->Add( sbConductorOptions, 0, wxEXPAND|wxALL, 5 );
162 bSizerMain->Add( bSizer8, 1, wxEXPAND, 5 );
165 bSizer5 =
new wxBoxSizer( wxVERTICAL );
167 wxStaticBoxSizer* sbCoordinates;
168 sbCoordinates =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Coordinates") ), wxVERTICAL );
170 m_rbDrillAndPlotOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Drill/place file origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
174 m_rbGridOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
177 m_rbUserDefinedOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
180 m_rbBoardCenterOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
184 bSizer5->Add( sbCoordinates, 0, wxEXPAND|wxALL, 5 );
186 wxStaticBoxSizer* sbUserDefinedOrigin;
187 sbUserDefinedOrigin =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"User Defined Origin") ), wxVERTICAL );
189 wxFlexGridSizer* fgSizer1;
190 fgSizer1 =
new wxFlexGridSizer( 0, 3, 5, 0 );
191 fgSizer1->SetFlexibleDirection( wxBOTH );
192 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
194 m_originXLabel =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"X position:"), wxDefaultPosition, wxDefaultSize, 0 );
196 fgSizer1->Add(
m_originXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
207 fgSizer1->Add(
m_originXCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
209 m_originXUnits =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
213 m_originYLabel =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
215 fgSizer1->Add(
m_originYLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
226 fgSizer1->Add(
m_originYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
228 m_originYUnits =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
233 sbUserDefinedOrigin->Add( fgSizer1, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
236 bSizer5->Add( sbUserDefinedOrigin, 0, wxEXPAND|wxALL, 5 );
238 wxStaticBoxSizer* sbOtherOptions;
239 sbOtherOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Other Options") ), wxVERTICAL );
241 m_cbRemoveDNP =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Ignore 'Do not populate' components"), wxDefaultPosition, wxDefaultSize, 0 );
242 m_cbRemoveDNP->SetToolTip(
_(
"Do not show components marked 'Do not populate'") );
246 m_cbRemoveUnspecified =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Ignore 'Unspecified' components"), wxDefaultPosition, wxDefaultSize, 0 );
251 m_cbSubstModels =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Substitute similarly named models"), wxDefaultPosition, wxDefaultSize, 0 );
253 m_cbSubstModels->SetToolTip(
_(
"Replace VRML models with STEP models of the same name") );
257 m_cbOverwriteFile =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Overwrite old file"), wxDefaultPosition, wxDefaultSize, 0 );
261 m_cbOptimizeStep =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Don't write P-curves to STEP file"), wxDefaultPosition, wxDefaultSize, 0 );
263 m_cbOptimizeStep->SetToolTip(
_(
"Disables writing parametric curves. Optimizes file size and write/read times, but may reduce compatibility with other software.") );
267 m_staticTextTolerance =
new wxStaticText( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Board outline chaining tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
271 wxString m_choiceToleranceChoices[] = {
_(
"Tight (0.001 mm)"),
_(
"Standard (0.01 mm)"),
_(
"Loose (0.1 mm)") };
272 int m_choiceToleranceNChoices =
sizeof( m_choiceToleranceChoices ) /
sizeof( wxString );
273 m_choiceTolerance =
new wxChoice( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceToleranceNChoices, m_choiceToleranceChoices, 0 );
275 m_choiceTolerance->SetToolTip(
_(
"Tolerance sets the distance between two points that are considered joined when building the board outlines.") );
280 bSizer5->Add( sbOtherOptions, 1, wxEXPAND|wxALL, 5 );
283 bSizerMain->Add( bSizer5, 1, wxEXPAND, 5 );
302 this->Centre( wxBOTH );
wxStdDialogButtonSizer * m_sdbSizer
wxCheckBox * m_cbExportTracks
wxCheckBox * m_cbSubstModels
wxCheckBox * m_cbExportCompound_hidden
wxRadioButton * m_rbOnlySelected
wxRadioButton * m_rbGridOrigin
wxStaticText * m_txtBrdFile
TEXT_CTRL_EVAL * m_originXCtrl
wxStaticText * m_originXUnits
wxStaticText * m_originYUnits
wxCheckBox * m_cbExportBody
wxCheckBox * m_cbRemoveUnspecified
wxCheckBox * m_cbOverwriteFile
wxStaticText * m_originXLabel
wxStaticText * m_staticTextNetFilter
wxCheckBox * m_cbRemoveDNP
virtual void onBrowseClicked(wxCommandEvent &event)
wxBoxSizer * bSizerSTEPFile
wxCheckBox * m_cbExportComponents
wxStaticText * m_staticTextTolerance
wxCheckBox * m_cbOptimizeStep
wxCheckBox * m_cbFuseShapes
wxRadioButton * m_rbBoardCenterOrigin
wxTextCtrl * m_outputFileName
wxCheckBox * m_cbExportInnerCopper
virtual void onCbExportComponents(wxCommandEvent &event)
wxStaticText * m_txtFormat
wxChoice * m_choiceTolerance
virtual void onFormatChoice(wxCommandEvent &event)
wxStaticText * m_originYLabel
virtual void onExportButton(wxCommandEvent &event)
wxTextCtrl * m_txtNetFilter
wxCheckBox * m_cbExportSoldermask
wxCheckBox * m_cbExportPads
wxChoice * m_choiceFormat
wxCheckBox * m_cbExportZones
wxButton * m_sdbSizerCancel
DIALOG_EXPORT_STEP_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export 3D Model"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onUpdateXPos(wxUpdateUIEvent &event)
virtual void onUpdateYPos(wxUpdateUIEvent &event)
wxRadioButton * m_rbAllComponents
virtual void OnComponentModeChange(wxCommandEvent &event)
wxRadioButton * m_rbUserDefinedOrigin
wxCheckBox * m_cbExportSilkscreen
wxRadioButton * m_rbFilteredComponents
wxCheckBox * m_cbExportSolderpaste_hidden
~DIALOG_EXPORT_STEP_BASE()
TEXT_CTRL_EVAL * m_originYCtrl
wxCheckBox * m_cbCutViasInBody
wxRadioButton * m_rbDrillAndPlotOrigin
wxTextCtrl * m_txtComponentFilter
STD_BITMAP_BUTTON * m_browseButton
wxCheckBox * m_cbFillAllVias
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
wxTextCtrl wrapper to handle math expression evaluation.