← Back to team overview

kicad-developers team mailing list archive

Re: Internal PCB Units?


Good transition plan found: http://tech.groups.yahoo.com/group/kicad-devel/message/3590

I also think:
File format transition should me made as soon as possible, so early versions my neary correctly handle "requantized" files.

Method of handling different units should be discussed. There are some approaches:
Using macros (#define) -- C-style. Code-efficient but with ugly-looking sources.

Using classes -- C++-style. This makes unit conversions mostly implicit. Fine sources, but have OOP overhead in heavy calculations. Also implicit conversions potentially buggy.

Some half-way approaches, like using macros for lengths alone, but classes for more complicated objects, like XY-positions, vias, etc.

Also using hungarian notaton may help. We may add unit prefixes to variables, so we will see where units are mixed (mmX, mmY -- millimeter, coords, qX, qY -- internal quantum coords).