Editing pad properties introduces rounding errors when units are set to mils.
Description
While editing pad properties in the PCB Editor, I noticed rounding errors appearing. After a bit more testing, these rounding errors apparently only appear when the units are set to "mils".
Here is a screenshot of Meld Merge that compares two versions of the PCB:
Steps to reproduce
- Make a copy a PCB file.
- Start Meld Merge (or other diff program). The copy is of course the same as the original).
- Open the PCB in KiCad, Make sure units to Mils in the PCB Editor.
- Select a single pad and press e to edit it.
- Change one of the pad properties, SMT/THT, "Copper layers", pad nr, etc, It does not matter which parameter, and click on [OK].
- Save the PCB.
- My diff program (Meld) detects the file change and asks to reload it.
- After reloading it, rounding errors have appeared in the pad for which the properties have changed.
KiCad Version
Application: KiCad PCB Editor
Version: 6.0.6-3a73a75311~116~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
Platform: Linux 5.15.0-33-generic x86_64, 64 bit, Little endian, wxGTK, xfce, x11
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OCC: 7.5.2
Curl: 7.83.1
ngspice: 36
Compiler: GCC 9.4.0 with C++ ABI 1013
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON