Closed CGrassin closed 1 year ago
I'm not sure if this PR is ready for review, but I just tested it on my board. I no longer see clearance violations for non-randomly spaced vias, but I do still see them when randomization is added. Thanks for creating this PR!
Thank you so much for testing this PR! I checked, I can reproduce your issue. I wrongly assumed that the randomization was applied before checks, but it is applied after. As a result, it can generate all sorts of DRC violations (pads, board edges, tracks...). Unfortunately, I had a deeper look in the code and it is not as easy as just moving the random offset code, significant changes are required in the clearance testing functions so that it tests against the actual position of a via and not a computed position... I can probably fix it myself but it will be a more involved PR that will take more time to fully test. As a consequence, my opinion is the following:
@jsreynaud If you are fine with that, then this PR is ready for review.
This PR fixes #58 .
Before:
After:
The explanation for the clearance functions can be seen here: https://docs.kicad.org/doxygen/classPAD.html It seems that
GetLocalClearance
does not account for DRC rules.