From aa6c9e7f2170d8daafac4e84c248ca25faa70b70 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 11 Apr 2012 09:49:11 -0500 Subject: [PATCH] improve comments in specctra stuff --- pcbnew/specctra_export.cpp | 10 ++++++---- pcbnew/specctra_import.cpp | 4 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 6f57d4c1a5..59efb6ee7a 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -170,7 +170,7 @@ static inline double scale( int kicadDist ) { #if defined(USE_PCBNEW_NANOMETRES) -// nanometers to um + // nanometers to um return kicadDist / 1000.0; // nanometers to mils @@ -1037,12 +1037,14 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) { #if defined(USE_PCBNEW_NANOMETRES) - // tell freerouter about centi-mil + // tell freerouter to use "tenths of micrometers", + // which is 100 nm resolution. Possibly more resolution is possible + // in freerouter, but it would need testing. pcb->unit->units = T_um; pcb->resolution->units = T_um; - - pcb->resolution->value = 10; + pcb->resolution->value = 10; // tenths of a um + // pcb->resolution->value = 1000; // "thousandths of a um" (i.e. "nm") #else pcb->unit->units = T_mil; diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index b395d66ad2..dcb02f2b21 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -145,11 +145,10 @@ namespace DSN { static int scale( double distance, UNIT_RES* aResolution ) { double resValue = aResolution->GetValue(); + double factor; #if defined(USE_PCBNEW_NANOMETRES) - double factor; - switch( aResolution->GetEngUnits() ) { default: @@ -173,7 +172,6 @@ static int scale( double distance, UNIT_RES* aResolution ) int ret = wxRound( factor * distance / resValue ); #else - double factor; // multiply this times session value to get mils for KiCad. switch( aResolution->GetEngUnits() ) {