pcb

DRC flags lines that are cleared by other objects

Bug #1782036 reported by Chad Parker on 2018-07-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
High
Luis de Arquer

Bug Description

The DRC will flag lines that don't have the clearpoly flag set if they enter a polygon, even if they only exist in space that has been cleared by other objects. The attached generates an error, but shouldn't.

Tags: drc Edit Tag help
Chad Parker (parker-charles) wrote :
Chad Parker (parker-charles) wrote :

Luis De Arquer found and report this.

There are two commits in a branch called LP1782036. The first one is Luis' fix for the bug. The second one fixes what I think are a few other bugs.

Chad Parker (parker-charles) wrote :

Luis-

Could you please test my second commit on this branch and see if it breaks anything for you?

I've made "bloat" a parameter of the functions Is<something>InPolygon. That way you we don't have to bother saving it, changing it, and restoring it. It seems like this could be a useful thing anyway. I'm wondering it I should also do it for the line and arc intersection tests.

In bug #746093, Peter says that this breaks something to do with the shrink checking, but I don't immediately see how.

I think this actually also fixes bug #699245.

Thanks,
--Chad

Chad Parker (parker-charles) wrote :
Luis de Arquer (ldearquer) wrote :

Chad,

In general, this seems a good move to me. Replacing global parameters for function local arguments makes code much clearer. However, this change may break things (I think this is what Peter was saying)

@ IsLineInPolygon (LineType *Line, PolygonType *Polygon)
- if (!(lp = LinePoly (Line, Line->Thickness + Bloat)))
+ if (!(lp = LinePoly (Line, Line->Thickness + 2*bloat)))

We should revise every use of IsLineInPolygon (and respective Arc/Polygon functions). Maybe one of the affected places would be DRCFind(), when it does:

Bloat = -PCB->Shrink;

Chad Parker (parker-charles) wrote :

That's what Peter's comment suggested. However, I'm not sure why. It seems to me that when you're trying to find things that don't have sufficient overlap, you would want to shrink an object on both sides, so, the I think the 2x still makes sense.

I thought about going through and just putting in Bloat/2 in the call signature everywhere else, but, I'd like to understand why this is necessary, and what breaks if it's not done.

Chad Parker (parker-charles) wrote :

Luis-

I'm going to push just your fix for the 4.1.3 release.

--Chad

Changed in pcb:
milestone: pcb-4.2.0 → pcb-4.1.3
assignee: nobody → Luis de Arquer (ldearquer)
Changed in pcb:
status: In Progress → Fix Committed
Changed in pcb:
status: Fix Committed → Fix Released
Bert Timmerman (bert-timmerman) wrote :

Commit f5742d458e17fba37680ebf8edcd31afd61bc8fe in topic branch LP1782036 was never cherry-picked into master, yet the bug report is marked "Fix Committed" as of release 4.1.3. Is this commit still relevant and the functionality required ?

When we reviewed it, we decided that it might break things. At the time we
didn't have the tests to check for regressions, so it was safer not to use
it.

On Sat, Jan 5, 2019, 03:00 Bert Timmerman <<email address hidden> wrote:

> Commit f5742d458e17fba37680ebf8edcd31afd61bc8fe in topic branch
> LP1782036 was never cherry-picked into master, yet the bug report is
> marked "Fix Committed" as of release 4.1.3. Is this commit still
> relevant and the functionality required ?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1782036
>
> Title:
> DRC flags lines that are cleared by other objects
>
> Status in pcb:
> Fix Released
>
> Bug description:
> The DRC will flag lines that don't have the clearpoly flag set if they
> enter a polygon, even if they only exist in space that has been
> cleared by other objects. The attached generates an error, but
> shouldn't.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pcb/+bug/1782036/+subscriptions
>

Chad Parker (parker-charles) wrote :

The idea is still relevant, but the commit will be bitrotten. I'd like to
keep it around a bit longer as a reminder.

On Sat, Jan 5, 2019, 09:38 Chad Parker <<email address hidden> wrote:

> When we reviewed it, we decided that it might break things. At the time we
> didn't have the tests to check for regressions, so it was safer not to use
> it.
>
> On Sat, Jan 5, 2019, 03:00 Bert Timmerman <<email address hidden>
> wrote:
>
>> Commit f5742d458e17fba37680ebf8edcd31afd61bc8fe in topic branch
>> LP1782036 was never cherry-picked into master, yet the bug report is
>> marked "Fix Committed" as of release 4.1.3. Is this commit still
>> relevant and the functionality required ?
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1782036
>>
>> Title:
>> DRC flags lines that are cleared by other objects
>>
>> Status in pcb:
>> Fix Released
>>
>> Bug description:
>> The DRC will flag lines that don't have the clearpoly flag set if they
>> enter a polygon, even if they only exist in space that has been
>> cleared by other objects. The attached generates an error, but
>> shouldn't.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/pcb/+bug/1782036/+subscriptions
>>
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints

Bug attachments