diff --git a/pcbnew/dialogs/dialog_export_step.cpp b/pcbnew/dialogs/dialog_export_step.cpp
index b5876cab4a..b330d0b348 100644
--- a/pcbnew/dialogs/dialog_export_step.cpp
+++ b/pcbnew/dialogs/dialog_export_step.cpp
@@ -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" );
diff --git a/pcbnew/dialogs/dialog_export_step_base.cpp b/pcbnew/dialogs/dialog_export_step_base.cpp
index d28c33e6b8..3bfba5dc5a 100644
--- a/pcbnew/dialogs/dialog_export_step_base.cpp
+++ b/pcbnew/dialogs/dialog_export_step_base.cpp
@@ -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 );
diff --git a/pcbnew/dialogs/dialog_export_step_base.fbp b/pcbnew/dialogs/dialog_export_step_base.fbp
index 742301f5a4..d46d219d15 100644
--- a/pcbnew/dialogs/dialog_export_step_base.fbp
+++ b/pcbnew/dialogs/dialog_export_step_base.fbp
@@ -636,7 +636,7 @@
5
wxEXPAND|wxLEFT
1
-
-
+
5
wxEXPAND
1
-
+
bSizer4
wxHORIZONTAL
@@ -1091,11 +1091,11 @@
-
+
5
wxEXPAND
1
-
+
bSizer5
wxHORIZONTAL
@@ -1278,14 +1278,103 @@
-
+
5
wxEXPAND
1
-
- 0
- protected
- 0
+
+
+ bSizer8
+ wxVERTICAL
+ none
+
+ 5
+ wxALL
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Ignore Virtual Components
+
+ 0
+
+
+ 0
+
+ 1
+ m_cbRemoveVirtual
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pcbnew/dialogs/dialog_export_step_base.h b/pcbnew/dialogs/dialog_export_step_base.h
index 21f7039f93..16f21ad830 100644
--- a/pcbnew/dialogs/dialog_export_step_base.h
+++ b/pcbnew/dialogs/dialog_export_step_base.h
@@ -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;