[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB DRC crash with due to bloat / shrink breaking gemoetry



Peter Clifton wrote:
Perhaps someone might like to take a stab at fixing this bug:

https://sourceforge.net/tracker/index.php?func=detail&aid=3064413&group_id=73743&atid=538811

I've triaged the cause of the crash, but don't really have the energy to
start digging into the DRC engine's rules.

I think the rule it is triggering on in this case is probably bogus, and
the "Shrink" parameter should not apply to a pad solid inside a polygon.

IMHO DRC should report an error if pad width is less than minimum trace
width.


Still, the test needs fixing, and there could be other legitimate cases
where the geometry is broken just enough by the shrink / bloat parameter
to cause problems.

Why not just fix RectPoly this way:

diff --git a/src/polygon.c b/src/polygon.c
index 586e8cc..72e65d5 100644
--- a/src/polygon.c
+++ b/src/polygon.c
@@ -330,8 +330,8 @@ RectPoly (LocationType x1, LocationType x2, LocationType y1, LocationType y2)
   PLINE *contour = NULL;
   Vector v;

-  assert (x2 > x1);
-  assert (y2 > y1);
+  if (x1 >= x2 || y1 >= y2)
+    return NULL;
   v[0] = x1;
   v[1] = y1;
   if ((contour = poly_NewContour (v)) == NULL)

Regards,
Ineiev


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user