Listing in Software per ‘Software’ description… ‘other curious Quirks’
Amusing myself… Recently, another User’s Post discussed DRC bulk setting changes and I spent some time fooling with Python code for it…
Except for one User, there were no additional follow-up posts and, though I did not intend to mess with it further, my new Telescope project needed to use DRC setting’s for JLCPCB (otherwise, I seldom bother with DRC if I’m milling the PCB).
True, it’s very easy to “Import Settings from Another Project” in the Board-Setup panel - I did that. But, curiosity pushed me to look at the default kicad_pro file. Although I have noticed ‘this’ before, I did not look into it further and just let Kicad do it’s thing.
But, that old ‘Curiosity’ thing nagged at me - observation of ‘this’ is as follows:
It’s not really ‘random’ but sort-of is…
Example:
Loading a new project shows default “minimum_uVia diameter as 0.2” in the panel. It shows it as 0.2 but, the kicad_pro file shows it as 0.19999999999999998". That’s dimensionally the same, for practical PCB purpose’s.
But, ‘why’ does it do it and ‘why’ for only some values, not all? It happens with some other values, I’m just using uVia for example…
If I manually change the 0.19999… to 0.2, then the kicad_pro file reflects this.
So, the question is: Why does Kicad take an initial default value of 0.2 and replay it as 0.19999… in the file but not do it if that 0.2 is entered by User? From where does that default 0.2 come from (is it really 0.019999… and rounded up for the panel)?
Side note: as seen in below video, I’m nearly finished with this fun coding effort - not shown is displaying of only the Rules section of kicad_pro file (it’s turned Off for testing purposes). When turned On, the file contents shows only the Rules section for cleaner visibility. And, Double-Clicking a value will auto-populate the Search field.
When finished, those six DRC-Set’s will contain custom rules and will fully replace/Transfer All the current Rules in the file. I’ve only built Rules-files for JLCPCB and some of my projects (as there were no posts from users, I did it for my own needs). I will also include a Tolerance-Fidelity input or slider that will tweak the panel’s values by Percentage.