gEDA-user: Rounding vs. truncating in gcode exporter

2011-05-17 Thread Andrew Poelstra

As part of my project to convert PCB's internal units
to nanometers from cmils, I am cleaning up and unifying
the unit handling code in the core and various HID's.

In the gcode HID there is an auxiliary function to
convert pcb's units to an integer number of ``dots''
(what the printer uses when you set the DPI). This
integer conversion is done by truncation right now,
which caused some inconsistencies when rearranging
code.


So, my question to all the gcode users is: does it
matter whether we use truncation or rounding in this
calculation? If so, which should be used?



-- 
Andrew Poelstra
Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net
Web:   http://www.wpsoftware.net/andrew/



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: Rounding vs. truncating in gcode exporter

2011-05-17 Thread Markus Hitter


Am 17.05.2011 um 23:36 schrieb Andrew Poelstra:


does it
matter whether we use truncation or rounding in this
calculation? If so, which should be used?


I can't think of a situation where truncating is more accurate than  
rounding, so rounding is always better, IMHO.


If you work on the gcode exporter, please consider these:

https://bugs.launchpad.net/pcb/+bug/699497


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.de/







___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user