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") };
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 );
67 m_cbCutViasInBody =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Cut vias in board body"), wxDefaultPosition, wxDefaultSize, 0 );
68 m_cbCutViasInBody->SetToolTip(
_(
"Cut via holes in board body even if conductor layers are not exported.") );
72 m_cbExportSilkscreen =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
77 m_cbExportSoldermask =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
82 m_cbExportSolderpaste_hidden =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
88 m_cbExportComponents =
new wxCheckBox( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Export components"), wxDefaultPosition, wxDefaultSize, 0 );
92 bSizer51 =
new wxBoxSizer( wxVERTICAL );
94 m_rbAllComponents =
new wxRadioButton( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"All components"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
98 m_rbOnlySelected =
new wxRadioButton( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Only selected"), wxDefaultPosition, wxDefaultSize, 0 );
99 m_rbOnlySelected->SetToolTip(
_(
"Export only the component models that are selected in the PCB editor") );
103 m_rbFilteredComponents =
new wxRadioButton( sbBoardOptions->GetStaticBox(), wxID_ANY,
_(
"Components matching filter:"), wxDefaultPosition, wxDefaultSize, 0 );
106 m_txtComponentFilter =
new wxTextCtrl( sbBoardOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
108 m_txtComponentFilter->SetToolTip(
_(
"A list of comma-selected reference designators to export (wildcards are supported)") );
113 sbBoardOptions->Add( bSizer51, 1, wxEXPAND|wxLEFT, 20 );
116 bSizer8->Add( sbBoardOptions, 0, wxEXPAND|wxALL, 5 );
118 wxStaticBoxSizer* sbConductorOptions;
119 sbConductorOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Conductor Options") ), wxVERTICAL );
121 m_cbExportTracks =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Export tracks and vias"), wxDefaultPosition, wxDefaultSize, 0 );
122 m_cbExportTracks->SetToolTip(
_(
"Export tracks and vias on external conductor layers.") );
126 m_cbExportPads =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Export pads"), wxDefaultPosition, wxDefaultSize, 0 );
127 sbConductorOptions->Add(
m_cbExportPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
129 m_cbExportZones =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Export zones"), wxDefaultPosition, wxDefaultSize, 0 );
130 m_cbExportZones->SetToolTip(
_(
"Export zones on external conductor layers.") );
132 sbConductorOptions->Add(
m_cbExportZones, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
134 m_cbExportInnerCopper =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Export inner conductor layers"), wxDefaultPosition, wxDefaultSize, 0 );
137 m_cbFuseShapes =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Fuse shapes (time consuming)"), wxDefaultPosition, wxDefaultSize, 0 );
138 m_cbFuseShapes->SetToolTip(
_(
"Combine intersecting geometry into one shape.") );
140 sbConductorOptions->Add(
m_cbFuseShapes, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
142 m_cbFillAllVias =
new wxCheckBox( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Fill all vias"), wxDefaultPosition, wxDefaultSize, 0 );
145 sbConductorOptions->Add(
m_cbFillAllVias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
147 m_staticTextNetFilter =
new wxStaticText( sbConductorOptions->GetStaticBox(), wxID_ANY,
_(
"Net filter (supports wildcards):"), wxDefaultPosition, wxDefaultSize, 0 );
151 m_txtNetFilter =
new wxTextCtrl( sbConductorOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
152 m_txtNetFilter->SetToolTip(
_(
"Only copper items belonging to nets matching this filter will be exported.") );
157 bSizer8->Add( sbConductorOptions, 0, wxEXPAND|wxALL, 5 );
160 bSizerMain->Add( bSizer8, 1, wxEXPAND, 5 );
163 bSizer5 =
new wxBoxSizer( wxVERTICAL );
165 wxStaticBoxSizer* sbCoordinates;
166 sbCoordinates =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Coordinates") ), wxVERTICAL );
168 m_rbDrillAndPlotOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Drill/place file origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
171 m_rbGridOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
174 m_rbUserDefinedOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
177 m_rbBoardCenterOrigin =
new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY,
_(
"Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
181 bSizer5->Add( sbCoordinates, 0, wxEXPAND|wxALL, 5 );
183 wxStaticBoxSizer* sbUserDefinedOrigin;
184 sbUserDefinedOrigin =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"User Defined Origin") ), wxVERTICAL );
186 wxFlexGridSizer* fgSizer1;
187 fgSizer1 =
new wxFlexGridSizer( 0, 2, 5, 0 );
188 fgSizer1->SetFlexibleDirection( wxBOTH );
189 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
191 m_staticTextUnits =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"Units:"), wxDefaultPosition, wxDefaultSize, 0 );
195 wxString m_STEP_OrgUnitChoiceChoices[] = {
_(
"mm"),
_(
"inch") };
196 int m_STEP_OrgUnitChoiceNChoices =
sizeof( m_STEP_OrgUnitChoiceChoices ) /
sizeof( wxString );
197 m_STEP_OrgUnitChoice =
new wxChoice( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_STEP_OrgUnitChoiceNChoices, m_STEP_OrgUnitChoiceChoices, 0 );
201 m_staticTextXpos =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"X position:"), wxDefaultPosition, wxDefaultSize, 0 );
205 m_STEP_Xorg =
new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
214 fgSizer1->Add(
m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
216 m_staticTextYpos =
new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
220 m_STEP_Yorg =
new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
229 fgSizer1->Add(
m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
232 sbUserDefinedOrigin->Add( fgSizer1, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
235 bSizer5->Add( sbUserDefinedOrigin, 0, wxEXPAND|wxALL, 5 );
237 wxStaticBoxSizer* sbOtherOptions;
238 sbOtherOptions =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Other Options") ), wxVERTICAL );
240 m_cbRemoveDNP =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Ignore 'Do not populate' components"), wxDefaultPosition, wxDefaultSize, 0 );
241 m_cbRemoveDNP->SetToolTip(
_(
"Do not show components marked 'Do not populate'") );
245 m_cbRemoveUnspecified =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Ignore 'Unspecified' components"), wxDefaultPosition, wxDefaultSize, 0 );
250 m_cbSubstModels =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Substitute similarly named models"), wxDefaultPosition, wxDefaultSize, 0 );
251 m_cbSubstModels->SetToolTip(
_(
"Replace VRML models with STEP models of the same name") );
255 m_cbOverwriteFile =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Overwrite old file"), wxDefaultPosition, wxDefaultSize, 0 );
258 m_cbOptimizeStep =
new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Don't write P-curves to STEP file"), wxDefaultPosition, wxDefaultSize, 0 );
259 m_cbOptimizeStep->SetToolTip(
_(
"Disables writing parametric curves. Optimizes file size and write/read times, but may reduce compatibility with other software.") );
263 m_staticTextTolerance =
new wxStaticText( sbOtherOptions->GetStaticBox(), wxID_ANY,
_(
"Board outline chaining tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
267 wxString m_choiceToleranceChoices[] = {
_(
"Tight (0.001 mm)"),
_(
"Standard (0.01 mm)"),
_(
"Loose (0.1 mm)") };
268 int m_choiceToleranceNChoices =
sizeof( m_choiceToleranceChoices ) /
sizeof( wxString );
269 m_choiceTolerance =
new wxChoice( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceToleranceNChoices, m_choiceToleranceChoices, 0 );
271 m_choiceTolerance->SetToolTip(
_(
"Tolerance sets the distance between two points that are considered joined when building the board outlines.") );
276 bSizer5->Add( sbOtherOptions, 1, wxEXPAND|wxALL, 5 );
279 bSizerMain->Add( bSizer5, 1, wxEXPAND, 5 );
298 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()
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.