[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



On Mon, 2010-09-13 at 06:00 +0000, Ineiev wrote:

> Or ensure that the results of RectPoly are checked. I find single
> place to modify:

Shouldn't be a problem in the dicer. From recollection, poly_* boollean
routines check for NULL one one of the two input polygons, and will
return the appropriate result for the requested boolean operation.

In addition, I'm fairly sure the dicer won't generate bad rect polygons.


> diff --git a/src/polygon.c b/src/polygon.c
> index 586e8cc..108b585 100644
> --- a/src/polygon.c
> +++ b/src/polygon.c
> @@ -1644,12 +1644,13 @@ r_NoHolesPolygonDicer (POLYAREA * pa,
>      }
>    else
>      {
> -      POLYAREA *poly2, *left, *right;
> +      POLYAREA *poly2, *left = pa, *right = NULL;
> 
>        /* make a rectangle of the left region slicing through the
> middle of the first hole */
>        poly2 = RectPoly (p->xmin, (p->next->xmin + p->next->xmax) / 2,
>                          p->ymin, p->ymax);
> -      poly_AndSubtract_free (pa, poly2, &left, &right);
> +      if (poly2)
> +	poly_AndSubtract_free (pa, poly2, &left, &right);
>        if (left)
>          {
>            POLYAREA *cur, *next;
> 
> Kind regards,
> Ineiev
> 
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



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