← Back to team overview

kicad-developers team mailing list archive

Re: Re: Metric and English grids sizes.


Wayne Stambaugh wrote:
viking632 wrote:

--- In kicad-devel@xxxxxxxxxxxxxxx, Isaac Marino Bavaresco <isaacbavaresco@...> wrote:

Indeed, you don't need even to go that deep, 100 nanometers is a common
denominator for both mils and micrometers:
1 mil = 25.4 um, so 1mil would be 254 * 100 nm and 1um = 10 * 100nm.

We could even use 200nm, but then it would be needed a 2x scaling.

It's all fault of that dreaded prime number: 127

One thing that annoys me is when I set a track width in mm and it
appears in mm but rounded up to the next mil. I would prefer that the
internal native units be metric and the imperial units be rounded.

Best regards,


Faça ligações para outros computadores com o novo Yahoo! Messenger http://br.beta.messenger.yahoo.com/

Well, I didn't think about _why_ pcbnew uses decimil units, but it's probably only to provide adequate precision in the imperial <-> metric conversions, so I guess, that you're right :-)

With a 100nm (or smaller) internal unit, true imperial units (mils) will still be represented (and presented) correctly, and conversions are, as shown, handled much better from "the other" (i.e. metric) side.

What a mess, and all of this is caused solely by the Shakespearian prime number: 0xFF (== 0x2B | ^0x2B ;-)

Metric units will of course (still) be rounded if presented as mils or dmils, and imperial units will also be rounded if presented as mm, except if enough decimals are shown (four decimals is enough :-).
This is no different from the present situation.

So, decimicrometers (dum or du) or hectonanometers (hnm) is the best choice, but I guess a better name should be invented :-)

In case any Americans should complain about these "strange and alien metric units", it's about time they went metric anyway:

The "Metric Act of 1866" made it illegal for the US to refuse metric units, they signed the meter convention in 1875, and the "Mendenhall Order" of 1893 redefined the US imperial units by using the SI standard meter and kilogram:
More recent dates in the cronological list shows they're getting closer, albeit slowly ...

Depending on how you look at it, the US has thus had 116, 134 or 143 years (more than a _century_, or almost one and a half) to get used to the SI system and the meter ...

Does anyone disagree about the idea of changing the internal unit to 100nm (and if so, why) ?

I dunno how difficult it would be to change the pcbnew internal unit, but as I have virtually zero knowledge of the code, it's probably better left to someone else :-)

... and what about eeschema, does it share any common code with pcbnew, and would eeschema also benefit from the same unit conversion ?

There is an "InternalUnit 0.000100 INCH" line in the .brd files, but I can't find anything similar in .mod, .sch or .lib files, so I guess that the version numbers in module/library/... files must be bumped up, at least if the numbers stored in these files are also converted to another unit.

The units for .pcb and .mod files are 0.0001". The units for .sch and
.lib files are 0.001". This will break every Kicad file format except
the project file although it make break some of settings in it. You
will not likely make many friends unless you provide complete backwards
compatibility with the current file formats. You would have to rewrite
the file parsers to handle the new units and modify the current file
parsers to convert the current file format to the new units internally.
You will also have to modify all the code in Kicad that manipulates the
current units. It will be one hell of a patch:)


Not yours Wayne, but the ones you are responding to are "drive by postings", each with successively more topic creep.


March 2008:


These are probably far more meaningful postings on the subject of the *.brd file format.

I'm just planning on tucking in the grid size and offset into the board file, with help from Lorenzo's patch. Not changing the dimensions of our universe, at least not yet, and not without looking over those old postings carefully, and blocking out about a month's time. I only plan on spending about 2 hours in what I have volunteered for.