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

Re: gEDA-user: Layer selective DRC



Andrew Poelstra wrote:

> Hmm, at a glance this looks okay. 


> Can you change the loop to
> dump some debug code before each continue, like, say,
> 
> if (LAYER_PTR (layer)->no_drc)
>   {
>     fprintf (stderr, "Skip layer %d, max %d, (PVL.L %d, PVL.N %d) continuing...\n",
>              layer, max_copper_layer, PVList.Location, PVList.Number);
>     continue;
>   }
(..snip..)

Thanks. I did a  bit of experimenting along these lines. 
This is what I observe if PCB:skip-drc is in effect:

* The loop is not infinite, just very long. After about 15 minutes
the DRC dialog comes up with literally thousends of violations.
This happens, even if design rules allow for distances that are 
much smaller than in the actual design.

* The more populated a layer is, the more false positives I get if 
PCPCB:skip-drc is set for this layer.

* If I set PCB:skip-drc in the first layer, the value of the layer
variable reported by the printf above is "0". That is, the value is 
one off compared to the numbers seen from the GUI. Is this ok?

The continue statement completely messes the DRC check. I get more
violations with PCB::skip-drc than without. Seems like the if-statements
have some side effect that should not be skipped. What does the r_search 
line actually do?

The comment in rtree.h says, this function returns true if something 
is found in a region given by the parameters. But in the context of 
find.c the result of the r_search() does not seem to be used:

          info.layer = layer;
          /* add touching lines */
          if (setjmp (info.env) == 0)
            r_search (LAYER_PTR (layer)->line_tree, (BoxType *) & info.pv,
                      NULL, LOCtoPVline_callback, &info);
          else
            return true;

Does r_search() change any aspect of the parameters it gets?
What is the logic behind the if statement? That is, what is it supposed
to mean if inf.env does equal zero or contains some other value?

Sorry for being such a programming noob. My hacking skills are pretty
under developed.

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Email: kmk@xxxxxxxxxxxxxxx
http://pool.sks-keyservers.net:11371/pks/lookup?search=0x6C0B9F53
not happy with moderation of geda-user



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