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

Re: gEDA-user: Weird DRC error



Hello DJ,

Sorry, almost but not quite. If I apply the patch the DRC error in the
original file disappears, but if I move the small polygon to the larger
one keeping 6 mill distance no DRC error reappears. (DRC distance is set
to 10 mill). If I make the distance between the two 5 mill then I get a
DRC warning.

I have looked in the source code and in my opinion the following code
adjustment is also needed (in addition to your patch below):
In the function IsLineInPolygon(....)
--      if (!(lp = LinePoly (Line, Line->Thickness + Bloat )))
++      if (!(lp = LinePoly (Line, Line->Thickness + (2 * Bloat) )))

Sorry for the clumsy way of showing this.
The 2 * is needed because in LinePoly it will be divided by two.

If I do this then it almost works ;-)
If I move the two polygons 10.01 mill apart no DRC error appears and if I
move the two polygons 10.00 mill apart a DRC error does appear (?).
Looking at the log window I see "Rules are minspace 10.01" But I have set
it to 10.00 mill. Where does the 0.01 mill come from?
I will keep looking at it but if I'm barking up the wrong tree please let
me know.

Regards, Robert


On Sun, 2010-06-20 at 00:19 -0400, DJ Delorie wrote:
Try this...
>
> diff --git a/src/find.c b/src/find.c
> index 6fb62b6..30a0bc5 100644
> --- a/src/find.c
> +++ b/src/find.c
> @@ -2747,7 +2747,8 @@ IsPolygonInPolygon (PolygonTypePtr P1,
PolygonTypePtr P2)
>
>                line.Point1.X = v->point[0];
>                line.Point1.Y = v->point[1];
> -              line.Thickness = 2 * Bloat;
> +	      /* Bloat is added by IsLineInPolygon, don't add it here too.  */
> +              line.Thickness = 0;
>                line.Clearance = 0;
>                line.Flags = NoFlags ();
>                for (v = v->next; v != &c->head; v = v->next)
>
>
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user




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