pcb-rnd devlog

subcircuit roadmap: element names

by Igor2

> So that brings up another question: how is the displayed element name
> going to change behavior in future versions of pcb-rnd?
Good question. I've been thinking about this a lot lately.

The current situation in full details

there are exactly 3 pcb text objects attached to each pcb element object. A text object has size, coordinate, font ID, rotation and string (plus the usual background info like rtree entry). Although you see only one of these at any given time, the code maintains all three.

And although the coordinate and rotation and size and font, or in other words, everything but the string, need to be the same, we still store all these data 3 times... Every code that needs to touch an element text also needs to repeat all these ugly hacks; like the code that can move an element text really needs to move 3 to keep all coords in sync.

On one hand I like to be able to globally change whether we show refdes or value, but on the other hand I often want to see both. And even more: it's a different use case to see data on the screen or see the artwork on silk.

So my plan for subcircuits

Most of this wouldn't happen in the first implementation of subcircuits but would be added gradually.