← Back to team overview

kicad-developers team mailing list archive

Re: Internal PCB Units?


I am pretty sure that it has, at the very least, already been "alluded to",if not also "specifically mentioned".

I am certainly aware, and have been for a long time (as in decades), that one inch is (*exactly*) equal to 25.4mm.

For all that though, there is still nothing "stopping" any type of CAD application from using an imperial distance as its internal quantum unit -- butgiven that an inch is exactly 25.4mm, it is still *highly desirable* that the internal quantum unit of each such application always be a metric distance instead.

As I mentioned in a previous message, the Protel and Altium Designer applications use a quantum distance of (1x) 10^-7 inches.

Even though I advised Altium, as far back as March 2001 (though if I recallcorrectly, that was during an earlier era when they were known as Protel instead), that it would be preferable to use a metric distance as the internal quantum unit instead, and suggested that they change (from 10,000,000) to 12,700,000 quantum units to the inch, they have yet to do so (or at leastnot as far as I am aware).

And there *really are* problems associated with having 10,000,000 quantum units to the inch. A distance of 0.8mm (a very common diameter for holes within pads) is approximately equal to 314960.62992125984251968503937008 such units (or at least according to the calculator provided with Windows).

If such a distance was saved (within a PCB file) as 314961 such units, it could subsequently be depicted as 0.80000094mm, rather than as 0.8mm. But I have reason to believe that distances within the Protel and Altium Designerapplications are customarily rounded to the nearest multiple of ten quantum units, so when such a distance is saved as 314960 units instead, it can subsequently be depicted as 0.7999984mm (or some other distance which is *approximately* equal to 0.8mm, but still not *exactly* matching that distance).

And while the difference between those distances is really not that large, it can still be problematic. It is not just a case of the depicted diameterbeing "distressing"; global editing procedures can also be afflicted. If you add a new pad to a PCB file, then specify a hole diameter of 0.8mm, thenuse the global editing feature with the objective of subsequently selecting all pads (in the PCB file concerned) which have the same hole diameter (for instance), then many (if not all) of the pads which *should* be selectedby such a command can end up *not* being selected...

The current quantum unit within KiCad is an imperial distance. So in the event that it is changed, which I naturally think would be highly desirable, it would be a massive folly to not select a metric distance instead.


--- Werner Almesberger wrote:
> Has it already been mentioned in this context that inches are in
> fact defined as multiples of (tenths of) millimeters ?
> http://en.wikipedia.org/wiki/Inch#International_inch
> So the choice of system is not even a matter of opinion or taste.
> (Well, at least not ours ;-)
> - Werner
> gharlandau wrote:
> > I *fully* agree that the quantum distance should be metric (rather
> > than imperial),

Follow ups