pcb

Polygon-line intersection error

Bug #699253 reported by dkogan55
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Undecided
Unassigned

Bug Description

Hi. I found a bug in the code that clears a buffer around lines that are routed through polygons. In an edge case where two lines meet at exactly the same point, the algorithms can fail and compute the polygon improperly.

The attached pcb demonstrates the problem. There are two lines and a rectangle. If either of the two lines is moved over even by a mil, or if the order of the lines is reversed, the problem goes away.

I've traced the issue down to the
M_POLYAREA_Collect() call in poly_Boolean_free(). I suspect that the calls to M_POLYAREA_label() directly above that are creating incorrect labels that, in turn, cause M_POLYAREA_Collect() to produce erroneous polygons, but I'm not sure.

Revision history for this message
dkogan55 (dkogan55) wrote :
Revision history for this message
DJ Delorie (djdelorie) wrote :

Seems to work now. We've done some work on the polygon code, could you check it again and see if it works for you too?

Revision history for this message
dkogan55 (dkogan55) wrote :

I confirm that it works with the newest builds, but was broken in 20091103. A bisection tells me that the fix happened in one of

7fb579af50cd41e1bb50a12af4d59003f90f0bbb
dc9052b1b4976c3dee3e39290b03ed8da94a7a63
1099c473dc24b8c1567261235ae3f4916b47cfc7
64c875b0662e285dc101e7b2a0392a4c743c8700
d5d894d977e610308d6ec36a3670cf3c94a8b015

which are all Peter Clifton's polygon patches from 11 Nov 2009. Thanks to Peter for fixing this. Closing bug.

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Marking as "closed" as per reporters request.

Changed in geda-project:
importance: Undecided → Medium
status: New → Fix Released
tags: added: polygons
Revision history for this message
Chad Parker (parker-charles) wrote :

Fixed long ago...

Changed in pcb:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.