pcb

Polygon DRC wrong

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

Bug Description

The attached PCB file causes an invalid DRC warning. The upper six sided polygon is more than 4mil from any other objects, but DRC with a minimum separation down to 3.2 mil complains it is too close.

Tags: drc polygons
Revision history for this message
Stephen Ecob (silicon-on-inspiration) wrote :
Revision history for this message
Peter Clifton (pcjc2) wrote :

Ok - I see why this is likely happening.

in src/find.c, the one polygon is tested against a series of bloated lines following the outline of the second polygon.

In IsPolygonInPolygon()
We have:
              line.Thickness = 2 * Bloat;

But the test which is called, IsLineInPolygon()

Also adds bloat to the line..

(Although it looks like it adds a bloat which is half the size it should be doing!)

Revision history for this message
Peter Clifton (pcjc2) wrote :

iff --git a/src/find.c b/src/find.c
index 5d2e92c..e2517a1 100644
--- a/src/find.c
+++ b/src/find.c
@@ -2743,7 +2743,12 @@ IsPolygonInPolygon (PolygonTypePtr P1, PolygonTypePtr P2)

               line.Point1.X = v->point[0];
               line.Point1.Y = v->point[1];
- line.Thickness = 2 * Bloat;
+ line.Thickness = Bloat;
+ /* Another Bloat is added by IsLineInPolygon, making the correct
+ * 2x Bloat. Ideally we would change it there, but doing so
+ * breaks some other DRC checks which rely on the broken behaviour
+ * in IsLineInPolygon.
+ */
               line.Clearance = 0;
               line.Flags = NoFlags ();
               for (v = v->next; v != &c->head; v = v->next)

Revision history for this message
Peter Clifton (pcjc2) wrote :

Fixing IsLineInPolygon (and various other places where we add only half the bloat ammount we should be doing) causes lots of breakage with other DRC checks - particularly those which compute shrink / insufficient overlap.

Revision history for this message
Stephen Ecob (silicon-on-inspiration) wrote :

Thank you Peter, that patch fixes the problem!
Unfortunately I seem to have another DRC bug with my current board. I'll upload a separate bug for it.

Traumflug (mah-jump-ing)
Changed in geda-project:
importance: Undecided → Medium
tags: added: drc polygons
Revision history for this message
Chad Parker (parker-charles) wrote :

Fix committed a long time ago.

Changed in pcb:
status: New → Fix Committed
Revision history for this message
Chad Parker (parker-charles) wrote :

Fix committed to pcb repository in 2011.

Changed in geda-project:
status: New → Fix Committed
Changed in pcb:
status: Fix Committed → Fix Released
Changed in geda-project:
status: Fix Committed → 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.