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)") };
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 );
52 wxStaticBoxSizer* sbGeneralOptions;
53 sbGeneralOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"General Options") ), wxVERTICAL );
55 m_cbExportCompound_hidden =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export as Compound shape"), wxDefaultPosition, wxDefaultSize, 0 );
57 m_cbExportCompound_hidden->SetToolTip(
_(
"Merges all shapes into a single Compound shape. Useful for external software that does de-duplication based on shape names.") );
61 m_cbExportBody =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export board body"), wxDefaultPosition, wxDefaultSize, 0 );
64 m_cbExportComponents =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export components"), wxDefaultPosition, wxDefaultSize, 0 );
68 bSizer51 =
new wxBoxSizer( wxVERTICAL );
70 m_rbAllComponents =
new wxRadioButton( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"All components"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
74 m_rbOnlySelected =
new wxRadioButton( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Only selected"), wxDefaultPosition, wxDefaultSize, 0 );
75 m_rbOnlySelected->SetToolTip(
_(
"Export only the component models that are selected in the PCB editor") );
79 m_rbFilteredComponents =
new wxRadioButton( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Components matching filter:"), wxDefaultPosition, wxDefaultSize, 0 );
82 m_txtComponentFilter =
new wxTextCtrl( sbGeneralOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
84 m_txtComponentFilter->SetToolTip(
_(
"A list of comma-selected reference designators to export (wildcards are supported)") );
89 sbGeneralOptions->Add( bSizer51, 1, wxEXPAND|wxLEFT, 20 );
91 m_cbExportTracks =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export tracks and vias"), wxDefaultPosition, wxDefaultSize, 0 );
92 m_cbExportTracks->SetToolTip(
_(
"Export tracks and vias on external copper layers.") );
96 m_cbExportPads =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export pads"), wxDefaultPosition, wxDefaultSize, 0 );
97 sbGeneralOptions->Add(
m_cbExportPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
99 m_cbExportZones =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export zones"), wxDefaultPosition, wxDefaultSize, 0 );
100 m_cbExportZones->SetToolTip(
_(
"Export zones on external copper layers.") );
102 sbGeneralOptions->Add(
m_cbExportZones, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
104 m_cbExportInnerCopper =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export inner copper layers"), wxDefaultPosition, wxDefaultSize, 0 );
107 m_cbExportSilkscreen =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
112 m_cbExportSoldermask =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
117 m_cbFuseShapes =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Fuse shapes (time consuming)"), wxDefaultPosition, wxDefaultSize, 0 );
118 m_cbFuseShapes->SetToolTip(
_(
"Combine intersecting geometry into one shape.") );
120 sbGeneralOptions->Add(
m_cbFuseShapes, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
122 m_cbExportSolderpaste_hidden =
new wxCheckBox( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Export solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
128 m_staticTextNetFilter =
new wxStaticText( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Net filter (supports wildcards):"), wxDefaultPosition, wxDefaultSize, 0 );
132 m_txtNetFilter =
new wxTextCtrl( sbGeneralOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
133 m_txtNetFilter->SetToolTip(
_(
"Only copper items belonging to nets matching this filter will be exported.") );
137 m_staticTextTolerance =
new wxStaticText( sbGeneralOptions->GetStaticBox(), wxID_ANY,
_(
"Board outline chaining tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
141 wxString m_choiceToleranceChoices[] = {
_(
"Tight (0.001 mm)"),
_(
"Standard (0.01 mm)"),
_(
"Loose (0.1 mm)") };
142 int m_choiceToleranceNChoices =
sizeof( m_choiceToleranceChoices ) /
sizeof( wxString );
143 m_choiceTolerance =
new wxChoice( sbGeneralOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceToleranceNChoices, m_choiceToleranceChoices, 0 );
145 m_choiceTolerance->SetToolTip(
_(
"Tolerance sets the distance between two points that are considered joined when building the board outlines.") );
150 bSizerMain->Add( sbGeneralOptions, 1, wxEXPAND|wxALL, 5 );
153 bSizer5 =
new wxBoxSizer( wxVERTICAL );
155 wxStaticBoxSizer* sbCoordinates;
156 sbCoordinates =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Coordinates") ), wxVERTICAL );
158 m_rbDrillAndPlotOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Drill/place file origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
161 m_rbGridOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
164 m_rbUserDefinedOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
167 m_rbBoardCenterOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
171 bSizer5->Add( sbCoordinates, 0, wxEXPAND|wxALL, 5 );
173 wxStaticBoxSizer* sbUserDefinedOrigin;
174 sbUserDefinedOrigin =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"User Defined Origin") ), wxVERTICAL );
176 wxFlexGridSizer* fgSizer1;
177 fgSizer1 =
new wxFlexGridSizer( 0, 2, 5, 0 );
178 fgSizer1->SetFlexibleDirection( wxBOTH );
179 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
181 m_staticTextUnits =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"Units:"), wxDefaultPosition, wxDefaultSize, 0 );
185 wxString m_STEP_OrgUnitChoiceChoices[] = {
_(
"mm"),
_(
"inch") };
186 int m_STEP_OrgUnitChoiceNChoices =
sizeof( m_STEP_OrgUnitChoiceChoices ) /
sizeof( wxString );
187 m_STEP_OrgUnitChoice =
new wxChoice( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_STEP_OrgUnitChoiceNChoices, m_STEP_OrgUnitChoiceChoices, 0 );
191 m_staticTextXpos =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"X position:"), wxDefaultPosition, wxDefaultSize, 0 );
195 m_STEP_Xorg =
new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
204 fgSizer1->Add(
m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
206 m_staticTextYpos =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
210 m_STEP_Yorg =
new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
219 fgSizer1->Add(
m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
222 sbUserDefinedOrigin->Add( fgSizer1, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
225 bSizer5->Add( sbUserDefinedOrigin, 0, wxEXPAND|wxALL, 5 );
227 wxStaticBoxSizer* sbOtherOptions;
228 sbOtherOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Other Options") ), wxVERTICAL );
230 m_cbRemoveDNP =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Ignore 'Do not populate' components"), wxDefaultPosition, wxDefaultSize, 0 );
231 m_cbRemoveDNP->SetToolTip(
_(
"Do not show components marked 'Do not populate'") );
235 m_cbRemoveUnspecified =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Ignore 'Unspecified' components"), wxDefaultPosition, wxDefaultSize, 0 );
240 m_cbSubstModels =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Substitute similarly named models"), wxDefaultPosition, wxDefaultSize, 0 );
241 m_cbSubstModels->SetToolTip(
_(
"Replace VRML models with STEP models of the same name") );
245 m_cbOverwriteFile =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Overwrite old file"), wxDefaultPosition, wxDefaultSize, 0 );
248 m_cbOptimizeStep =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Optimize STEP file"), wxDefaultPosition, wxDefaultSize, 0 );
249 m_cbOptimizeStep->SetToolTip(
_(
"Disables writing parametric curves. Optimizes file size and write/read times, but may reduce compatibility with other software.") );
254 bSizer5->Add( sbOtherOptions, 1, wxEXPAND|wxALL, 5 );
257 bSizerMain->Add( bSizer5, 1, wxEXPAND, 5 );
276 this->Centre( wxBOTH );
wxStdDialogButtonSizer * m_sdbSizer
virtual void onUpdateUnits(wxUpdateUIEvent &event)
wxCheckBox * m_cbExportTracks
wxCheckBox * m_cbSubstModels
TEXT_CTRL_EVAL * m_STEP_Xorg
wxCheckBox * m_cbExportCompound_hidden
TEXT_CTRL_EVAL * m_STEP_Yorg
wxRadioButton * m_rbOnlySelected
wxRadioButton * m_rbGridOrigin
wxStaticText * m_txtBrdFile
wxCheckBox * m_cbExportBody
wxCheckBox * m_cbRemoveUnspecified
wxCheckBox * m_cbOverwriteFile
wxStaticText * m_staticTextYpos
wxStaticText * m_staticTextUnits
wxStaticText * m_staticTextNetFilter
wxCheckBox * m_cbRemoveDNP
virtual void onBrowseClicked(wxCommandEvent &event)
wxBoxSizer * bSizerSTEPFile
wxCheckBox * m_cbExportComponents
wxStaticText * m_staticTextTolerance
wxCheckBox * m_cbOptimizeStep
wxStaticText * m_staticTextXpos
wxCheckBox * m_cbFuseShapes
wxRadioButton * m_rbBoardCenterOrigin
wxTextCtrl * m_outputFileName
wxCheckBox * m_cbExportInnerCopper
virtual void onCbExportComponents(wxCommandEvent &event)
wxStaticText * m_txtFormat
wxChoice * m_choiceTolerance
wxChoice * m_STEP_OrgUnitChoice
virtual void onFormatChoice(wxCommandEvent &event)
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()
wxRadioButton * m_rbDrillAndPlotOrigin
wxTextCtrl * m_txtComponentFilter
STD_BITMAP_BUTTON * m_browseButton
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
wxTextCtrl wrapper to handle math expression evaluation.