← Back to team overview

kicad-developers team mailing list archive

Re: Fwd: [PATCH] pcbnew: fix false DRC violations for oval pads

 

Le 23/01/2018 à 17:13, Wayne Stambaugh a écrit :
> On 1/23/2018 11:03 AM, jp charras wrote:
>> Le 23/01/2018 à 16:32, Wayne Stambaugh a écrit :
>>> JP,
>>>
>>> Would you please confirm this when you get a chance.
>>
>> Yes, I confirm and I just finished the fix.
> 
> That was quick!  Thanks.

I committed it.

> 
>>
>> (the patch in the report is broken)
> Please inform Forrest what was broken so he knows where the mistake was
> made.
>

I did not spend a lot of time on the patch.

I just tested the fix, and found it did not detect collisions with a track near the rounded ends of
the oval pad.

But it was a fast test, and therefore I can be wrong.


> Cheers,
> 
> Wayne
> 
>>
>>
>>>
>>> Thanks,
>>>
>>> Wayne
>>>
>>> On 1/22/2018 7:50 PM, Forrest Voight wrote:
>>>> I found another related problem with oval pads: tracks intersecting
>>>> with oval pads are sometimes *not* detected as DRC violations.
>>>>
>>>> Looking at the below screenshot or PCB, the narrow track should *but
>>>> does not* trigger a DRC violation in its current position, while it
>>>> does generate a violation if dragged 2mm down to intersect with the
>>>> center of the large oval pad.
>>>>
>>>> I've linked a patch that fixes the issue.
>>>>
>>>> Board: http://u.forre.st/kicad_bug2/track_x_oval_pad_failure.kicad_pcb
>>>> Board screenshot: http://u.forre.st/kicad_bug2/track_x_oval_pad_failure.png
>>>> Patch (also below):
>>>> http://u.forre.st/kicad_bug2/0001-Fix-track-rotated-oval-pad-collision-detection.patch
>>>>
>>>> As a related question, how hard is it to get committer access? I have
>>>> several more minor fixes that I'd like to bring in.
>>>>
>>>>
>>>> From ec6adcfb0d6b5583e132264cb84a3ba897a5da2b Mon Sep 17 00:00:00 2001
>>>> From: Forrest Voight <forrest@xxxxxxxx>
>>>> Date: Mon, 22 Jan 2018 13:50:33 -0500
>>>> Subject: [PATCH] Fix track/rotated oval pad collision detection
>>>>
>>>> ---
>>>>  pcbnew/drc_clearance_test_functions.cpp | 3 +++
>>>>  1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/pcbnew/drc_clearance_test_functions.cpp
>>>> b/pcbnew/drc_clearance_test_functions.cpp
>>>> index e395e7d..1ab6af0 100644
>>>> --- a/pcbnew/drc_clearance_test_functions.cpp
>>>> +++ b/pcbnew/drc_clearance_test_functions.cpp
>>>> @@ -1052,6 +1052,9 @@ bool DRC::checkClearanceSegmToPad( const D_PAD*
>>>> aPad, int aSegmentWidth, int aMi
>>>>          {
>>>>              std::swap( padHalfsize.x, padHalfsize.y );
>>>>              orient = AddAngles( orient, 900 );
>>>> +            // recompute start/endPoint since they depend on orient
>>>> +            RotatePoint( &startPoint, m_padToTestPos, -900 );
>>>> +            RotatePoint( &endPoint, m_padToTestPos, -900 );
>>>>          }
>>>>
>>>>          // here, padHalfsize.x is the radius of rounded ends.


-- 
Jean-Pierre CHARRAS


References