Commit a0c80381 authored by Dick Hollenbeck's avatar Dick Hollenbeck

improve comments in specctra stuff

parent 36dac0c1
...@@ -170,7 +170,7 @@ static inline double scale( int kicadDist ) ...@@ -170,7 +170,7 @@ static inline double scale( int kicadDist )
{ {
#if defined(USE_PCBNEW_NANOMETRES) #if defined(USE_PCBNEW_NANOMETRES)
// nanometers to um // nanometers to um
return kicadDist / 1000.0; return kicadDist / 1000.0;
// nanometers to mils // nanometers to mils
...@@ -1037,12 +1037,14 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) ...@@ -1037,12 +1037,14 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR )
{ {
#if defined(USE_PCBNEW_NANOMETRES) #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->unit->units = T_um;
pcb->resolution->units = T_um; pcb->resolution->units = T_um;
pcb->resolution->value = 10; // tenths of a um
pcb->resolution->value = 10; // pcb->resolution->value = 1000; // "thousandths of a um" (i.e. "nm")
#else #else
pcb->unit->units = T_mil; pcb->unit->units = T_mil;
......
...@@ -145,11 +145,10 @@ namespace DSN { ...@@ -145,11 +145,10 @@ namespace DSN {
static int scale( double distance, UNIT_RES* aResolution ) static int scale( double distance, UNIT_RES* aResolution )
{ {
double resValue = aResolution->GetValue(); double resValue = aResolution->GetValue();
double factor;
#if defined(USE_PCBNEW_NANOMETRES) #if defined(USE_PCBNEW_NANOMETRES)
double factor;
switch( aResolution->GetEngUnits() ) switch( aResolution->GetEngUnits() )
{ {
default: default:
...@@ -173,7 +172,6 @@ static int scale( double distance, UNIT_RES* aResolution ) ...@@ -173,7 +172,6 @@ static int scale( double distance, UNIT_RES* aResolution )
int ret = wxRound( factor * distance / resValue ); int ret = wxRound( factor * distance / resValue );
#else #else
double factor; // multiply this times session value to get mils for KiCad.
switch( aResolution->GetEngUnits() ) switch( aResolution->GetEngUnits() )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment