Closed cpresser closed 3 years ago
Two questions:
ad1. To check if lines are on a grid, their coordinates are converted to micrometer nanometer. That should return an integer so a modulo division can be used to determine if they are on the grid.
I agree that 1E3 and 1E6 seems wrong. But it is wrong at two places, so the code works :smile:
GRID = int(KLC_CRTYD_GRID * 1E6)
Proposed fix, rename the function to mmToNanometer()
ad2. I was not aware, I will change that.
I did a force-push to keep all changes in one commit. This is so small, adding a 2nd commit seemed wrong.
I'm fine to do it. Anybody object to merging now as is?
This fixes a regression from #334.
My testing when making #334 was not good enough. For some cases the weird
+0.00005
math breaks the rounding really bad. I remove that block completely, the rounding is simpler and better. At least my current testing shows that it now works again as intended.@evanshultz can you please take a look. This breaks travis (false positives). So I would like to address that right away.
See https://github.com/KiCad/kicad-footprints/pull/2438#issuecomment-694928293