On Wed, 2008-09-10 at 21:28 -0400, DJ Delorie wrote: > Could we reduce the overhead by something like this? > > UpdateElement(refdes, libname, description, value, [X, Y, Ang]) > > If the refdes is missing, it's added. If it's present, we check description > and value against the old ones, and replace it (in place maybe?). > > We also need NetList(Clear) and NetList(Add,pin,pin[,...])
gsch2pcb already updates values in place, so we should keep that. gsch2pcb uses description as a stash for the footprint name it used - so it knows to replace elements with the wrong footprint. It would be nice if we could change this behaviour, and have PCB remember what footprint was instantiated elsewhere - perhaps in some attribute just copying the gEDA footprint="...." portion. Since PCB has no "get footprint by name" concept, we can't do much more than that. Backwards compatibility could be obtained by falling back to using the description for footprint name, if the footprint attribute isn't found. This allows use of existing schematics made with older gsch2pcb. It doesn't allow old gsch2pcb to work with newer layouts, but nevermind. We might not have to auto-upgrade old files though.. we could fall back to saving the footprint in the description field. gsch2pcb also renames pins on components, which exposes a needed optimisation in PCB. Each component is refered to by name, and PCB does a linear search for it. This gets slow with several hundred components on a board. This bottle-neck would probably become more visible if all updates are made by refering to components by refdes. Speaking of refdes... API which pass a refdes only can't deal with multiple non-unique refdes on the layout. PCB doesn't always enforce unique refdes - usually useful when copy-pasting blocks to be renamed in some deterministic way. We might end up running gsch2pcb on a board with a non-unique refdes - what should it do in that case? -- 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!) _______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user