kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #18293
Re: [PATCH] pcbnew: fix false DRC violations for oval pads
Le 15/05/2015 23:12, Forrest Voight a écrit :
> (This is also at https://bugs.launchpad.net/kicad/+bug/1455345)
>
> Minimal example screenshot: http://u.forre.st/u/fiyaqxjg/drc.png
> Minimal example board file: http://u.forre.st/u/kjzegyao/drc.kicad_pcb
>
> Two pads (one a circle and one an oval) cause a false DRC violation in
> certain arrangements.
>
> I am reasonably certain that this is due to the rectangle part of the
> segment-oval test in DRC::checkClearanceSegmToPad. This function is
> called by DRC::checkClearancePadToPad with the circle pad having been
> transformed to a zero-length segment and the oval pad remaining as is.
> Then, DRC::checkClearanceSegmToPad looks at the oval pad as two
> circles and a rectangle, testing the segment against each, grown
> according to the segment's width and the clearance. The rectangle is
> grown at each end of its short axis by half the width of the segment
> (the radius of the circular pad in this case) plus the clearance
> (which makes sense) and grown at each end of its long axis by half the
> width of the segment (!!!).
>
> Growing the rectangular part of the pad along its long axis by
> anything is wrong because the dilation of a rectangle is a rounded
> rectangle, but by growing it along both axes, we form a shape that is
> bigger than what it should be (it has corners that shouldn't be
> there). We don't need to grow it along its long axis at all, because
> intersections near the ends of the pad are taken care of by the circle
> tests.
>
> A patch that fixes this issue, as I see it, is here:
Good catch!
I fixed that (using your patch) with a minor code cleaning in rev 5656.
Thanks.
--
Jean-Pierre CHARRAS
References