[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: DRC rule structure
On Sun, Aug 15, 2010 at 04:46:55PM -0500, John Griessen wrote:
> Andrew Poelstra wrote:
>
> >Suppose I have a trace whose clearance is set to 2.5mm - if I lay any component
> >too close while the real-time DRC is running, how can it know that it's breaking
> >a rule without re-checking the clearance for every object on the PCB?
>
> Hmm... well, I have not written DRC checkers, but I am imagining
> you have a worst case rule distance and can solve everything that
> touches a rectangle with the worse case distances to it's sides
> from the object you are editing/checking against. Distance is the common
> thread in all DRCs to use to simplify the problem.
>
I haven't written a DRC before either, but I think I've figured out
a way to do it:
My current filter/rule structure doesn't quite work for clearance - because
it validates /attributes/, and clearance isn't an attribute. So, in PCB, we
will create clearance as a "virtual" attribute that exists in PCB's memory
but isn't saved out.
There may be other virtual attributes we need to create as well.
Clearance would be set for each component created or moved, as well as the
components nearby it (still working on the details ;).
Whenever any attribute is set, virtual or otherwise, its respective rules
are also checked. This is a straightforward O(1) operation and only has
to be run when attributes are being set.
Andrew
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user