On 09/05/2013 10:55 PM, Lorenzo Marcantonio wrote:
On Thu, Sep 05, 2013 at 02:14:03PM -0500, Dick Hollenbeck wrote:
You are correct about the model being somewhat exposed. But the model is
working nicely
everywhere else, and it is fast.
I could argue about the 'fast' thing. The indexed by layer structure IMHO is
very promising (the bounding box rtree would be the next logical step).
Of course some kind of global enumeration (call it dlist, or thru the
collectors) need to be maintained anyway.
BTW: This is the way how it is done in the VIEW class in the GAL - items
are held using R-trees, which are created for every layer. It was also
necessary to know which layers are occupied by a single item, so there
is ViewGetLayers() function that returns an int[] containing layer
numbers for the given item. The layer numbers are computed during the
function call (ie. ViewGetLayers() is overridden in derived classes, so
eg. TRACK may return a different set of layers than SEGVIA), but I lean
toward using std::bitset.
Regards,
Orson
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp