Pcbnew: minor exporter fixes.

* Remove unused 1 inch units choice from VRML export dialog.
* Fix model offset calculation in IDF exporter.
This commit is contained in:
Cirilo Bernardo 2015-08-06 19:13:02 -04:00 committed by Wayne Stambaugh
parent acb2c54594
commit 64760cc952
4 changed files with 7 additions and 7 deletions

View File

@ -151,8 +151,8 @@ void PCB_EDIT_FRAME::OnExportVRML( wxCommandEvent& event )
// The general VRML scale factor
// Assuming the VRML default unit is the mm
// this is the mm to VRML scaling factor for inch, mm and meter
double scaleList[3] = { 1.0/25.4, 1, 0.001 };
// this is the mm to VRML scaling factor for mm, 0.1 inch, and inch
double scaleList[3] = { 1.0, 10.0/25.4, 1.0/25.4 };
// Build default file name
fn = GetBoard()->GetFileName();

View File

@ -58,7 +58,7 @@ DIALOG_EXPORT_3DFILE_BASE::DIALOG_EXPORT_3DFILE_BASE( wxWindow* parent, wxWindow
bLowerSizer->Add( bSizer4, 3, wxEXPAND, 5 );
wxString m_rbSelectUnitsChoices[] = { _("Inch"), _("mm"), _("Meter") };
wxString m_rbSelectUnitsChoices[] = { _("mm"), _("0.1 Inch"), _("Inch") };
int m_rbSelectUnitsNChoices = sizeof( m_rbSelectUnitsChoices ) / sizeof( wxString );
m_rbSelectUnits = new wxRadioBox( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, m_rbSelectUnitsNChoices, m_rbSelectUnitsChoices, 1, wxRA_SPECIFY_COLS );
m_rbSelectUnits->SetSelection( 0 );

View File

@ -752,7 +752,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Inch&quot; &quot;mm&quot; &quot;Meter&quot;</property>
<property name="choices">&quot;mm&quot; &quot;0.1 Inch&quot; &quot;Inch&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>

View File

@ -398,9 +398,9 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
throw( std::runtime_error( aIDFBoard.GetError() ) );
double rotz = aModule->GetOrientation()/10.0;
double locx = modfile->m_MatPosition.x;
double locy = modfile->m_MatPosition.y;
double locz = modfile->m_MatPosition.z;
double locx = modfile->m_MatPosition.x * 25.4; // part offsets are in inches
double locy = modfile->m_MatPosition.y * 25.4;
double locz = modfile->m_MatPosition.z * 25.4;
double lrot = modfile->m_MatRotation.z;
bool top = ( aModule->GetLayer() == B_Cu ) ? false : true;