← Back to team overview

kicad-developers team mailing list archive

Re: [RFC 1/2] New coordinate framework


On 11/21/2018 2:18 PM, Simon Richter wrote:
> Hi,
> On 21.11.2018 20:02, jp charras wrote:
>> what do you mean by:
>> "that the entire code uses nanometers as internal units
> That would be the goal, to use the same internal unit everywhere.
> Nanometers make the most sense, because of the metric/imperial
> conversion issues you mention.
>> In Pcbnew, one nanometer is used mainly to avoid any conversion issue
>> between inches and nanometers.
>> Without this constraint, 10 nm will be better.
> Hm, 1mil is 25400nm, so we could even go to 100nm without introducing
> conversion issues. Would that work for all apps?

This would break pcb files so nm has to stay for board and footprint
files.  I was planning on using 100nm for the new schematic and symbol
file formats since it seems to me that we really don't need any more
absolute positional accuracy than that.

>> By the way, I am pretty sure the the gtk3/Cairo overflow issue is not
>> inside Kicad.
> Indeed, that is a Cairo problem, but I tried to debug this with -ftrapv,
> and found that we have surprisingly many integer overflows within KiCad.
> They seem to be mostly harmless, but from a code quality point of view
> I'd also like to see them gone.

These absolutely should be flagged and fixed whether they are harmless
or not.  This is just a good coding policy.

>    Simon

Follow ups