Added option to remove Virtual Components from STEP assembly
This commit is contained in:
parent
33948e572d
commit
fb59a7416a
|
@ -40,6 +40,7 @@
|
|||
#define OPTKEY_STEP_UORG_UNITS wxT( "STEP_UserOriginUnits" )
|
||||
#define OPTKEY_STEP_UORG_X wxT( "STEP_UserOriginX" )
|
||||
#define OPTKEY_STEP_UORG_Y wxT( "STEP_UserOriginY" )
|
||||
#define OPTKEY_STEP_NOVIRT wxT( "STEP_NoVirtual" )
|
||||
|
||||
|
||||
class DIALOG_EXPORT_STEP: public DIALOG_EXPORT_STEP_BASE
|
||||
|
@ -50,6 +51,7 @@ private:
|
|||
bool m_useDrillOrg; // remember last preference for Use Drill Origin
|
||||
bool m_useAuxOrg; // remember last preference for Use Aux Origin
|
||||
bool m_useUserOrg; // remember last preference for Use User Origin
|
||||
bool m_noVirtual; // remember last preference for No Virtual Component
|
||||
int m_OrgUnits; // remember last units for User Origin
|
||||
double m_XOrg; // remember last User Origin X value
|
||||
double m_YOrg; // remember last User Origin Y value
|
||||
|
@ -74,6 +76,8 @@ public:
|
|||
m_config->Read( OPTKEY_STEP_UORG_UNITS, &m_OrgUnits, 0 );
|
||||
m_config->Read( OPTKEY_STEP_UORG_X, &m_XOrg, 0.0 );
|
||||
m_config->Read( OPTKEY_STEP_UORG_Y, &m_YOrg, 0.0 );
|
||||
m_config->Read( OPTKEY_STEP_NOVIRT, &m_noVirtual );
|
||||
m_cbRemoveVirtual->SetValue( m_noVirtual );
|
||||
|
||||
m_STEP_OrgUnitChoice->SetSelection( m_OrgUnits );
|
||||
wxString tmpStr;
|
||||
|
@ -109,6 +113,7 @@ public:
|
|||
m_config->Write( OPTKEY_STEP_USE_DRILL_ORG, m_cbDrillOrigin->GetValue() );
|
||||
m_config->Write( OPTKEY_STEP_USE_AUX_ORG, m_cbAuxOrigin->GetValue() );
|
||||
m_config->Write( OPTKEY_STEP_USE_USER_ORG, m_cbUserOrigin->GetValue() );
|
||||
m_config->Write( OPTKEY_STEP_NOVIRT, m_cbRemoveVirtual->GetValue() );
|
||||
|
||||
m_config->Write( OPTKEY_STEP_UORG_UNITS, m_STEP_OrgUnitChoice->GetSelection() );
|
||||
m_config->Write( OPTKEY_STEP_UORG_X, m_STEP_Xorg->GetValue() );
|
||||
|
@ -150,6 +155,11 @@ public:
|
|||
return m_cbUserOrigin->GetValue();
|
||||
}
|
||||
|
||||
bool GetNoVirtOption()
|
||||
{
|
||||
return m_cbRemoveVirtual->GetValue();
|
||||
}
|
||||
|
||||
void OnUserOriginSelect( wxCommandEvent& event )
|
||||
{
|
||||
if( GetUserOrgOption() )
|
||||
|
@ -263,6 +273,7 @@ void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event )
|
|||
bool aUseDrillOrg = dlg.GetDrillOrgOption();
|
||||
bool aUseAuxOrg = dlg.GetAuxOrgOption();
|
||||
bool aUseUserOrg = dlg.GetUserOrgOption();
|
||||
bool aNoVirtual = dlg.GetNoVirtOption();
|
||||
double aXOrg = 0.0;
|
||||
double aYOrg = 0.0;
|
||||
|
||||
|
@ -285,6 +296,9 @@ void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event )
|
|||
|
||||
wxString cmdK2S = appK2S.GetFullPath();
|
||||
|
||||
if( aNoVirtual )
|
||||
cmdK2S.Append( " --no-virtual" );
|
||||
|
||||
if( aUseDrillOrg )
|
||||
cmdK2S.Append( " --drill-origin" );
|
||||
|
||||
|
|
|
@ -113,8 +113,14 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
bSizer2->Add( bSizer3, 1, wxEXPAND|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
bSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
m_cbRemoveVirtual = new wxCheckBox( this, wxID_ANY, _("Ignore Virtual Components"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer8->Add( m_cbRemoveVirtual, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizer2->Add( bSizer8, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerSTEPFile->Add( bSizer2, 1, wxEXPAND, 5 );
|
||||
|
|
|
@ -636,7 +636,7 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
|
@ -906,11 +906,11 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer4</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
|
@ -1091,11 +1091,11 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer5</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
|
@ -1278,14 +1278,103 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="0">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer8</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Ignore Virtual Components</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_cbRemoveVirtual</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -53,6 +53,7 @@ class DIALOG_EXPORT_STEP_BASE : public DIALOG_SHIM
|
|||
wxTextCtrl* m_STEP_Xorg;
|
||||
wxStaticText* m_staticText4;
|
||||
wxTextCtrl* m_STEP_Yorg;
|
||||
wxCheckBox* m_cbRemoveVirtual;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
|
|
Loading…
Reference in New Issue