On Wed, Sep 10, 2014 at 01:41:33PM -0400, Wayne Stambaugh wrote: > Perhaps we should define the layer behavior for footprint text and > non-footprint text first and then make the code match the behavior. It > seems to me once you have the behavior defined, the code should be > fairly straight forward. I guess the real question is do we want to > keep the current text layer behavior or do we want to design something > that is more flexible?
I think that the reason behind having reference/values independant from the silk layer is that often a thick silk hide the trackage so it would be disabled during routing. However the reference is still useful in orientating around the board so it's possible to have silk hidden and references shown. Value behaviour is probably the same for uniformity. Charras could probably shed more light on that quirk. Anyway I find that behaviour useful. The behaviour which we are discussing however is contained in the collector and in the draw routine, so it's not too difficult to change. I have this assumption that user module text contains nothing too important for the normal routing i.e. is documentation and drawing stuff. Feel free to give a counterexample of course; I have none. Polarity is usually obvious from the pin name. Also my workflow has all the 'needed' layers on during placement (silk, courtyard, comments for keepout and so on) and most stuff disabled during route (I usually keep assembly or silk on for orientation). As a working case let's say I have some kind of backward mount potentiometer (the ones you screw on the board and then solder) which has maybe some important 'take care' area (maybe for the shaft nut or something like that). Well, I would actually put a huge supporting copper pad for the nut, but imagine I simply want to draw a comment (to some pair of layers F_Comment and B_Comment) to remember that is a bad place to route stuff for ESD or whatever. That's would be quite complex component to draw, place and route around. It would contain: - Pads and the big hole for screwing the thing on - On the 'front' side (where the body will be): silk for the body, courtyard, assembly outline, comment outline; there will be the mandatory reference/value fields on F_SilkS (value always hidden with the flag), the assembly label on F_Fab (with the to-be-implemented %R token) and some text saying "Be Careful Here" inside the comment area. Also some other text on F_SilkS to remember which wire goes where. - On the 'back' side (where the shaft would stick out): courtyard for the nut, comment outline for the corresponding area; some text on B_Comment saying "Careful Here, too" To keep things simple let's say it's placed on the top side (so I'm seeing the bottom of the pot can and the shaft sticks under the board). The behaviour which I am implementing is as follows (as usual all condition are and-ed; if one fails text isn't shown): - The root of everything is the module, of course; if the modules front/back visible is disabled nothing is show for a module placed on that side (even if the text would come up on the other side); I sometimes would have found useful to selectively hide some module but that's another enhancement:P - Then comes the text front/back visibles: they operate on all the texts on that side: so the "text back" would operate on the "Careful Here, too" text, while the "text front" on the reference, value, assembly label, wire silks and "Be Careful Here" - At this point the rule is different for reference/value/user text: - Reference is controlled by the "References" visible, and takes color from the "Text Front" visible (since the module is on the front side) - Value is the same but controlled by the "Values" visible - User text is controlled by the corresponding layer control, both in visibility and color - The last thing is the 'hidden' flag in the text itself; if set the text is only visible if the "Hidden Text" visible is set (and takes that color); For example the value would be visible (in Hidden Text color) only when "Hidden Text", "Text Front" and "Module Front" are enabled. That's *exactly* how pcbnew works today. In the same way the "Careful Here, too" text would be shown (in B_Comment color) only when "Module Front","Text Back" and the B_Comment layer are enabled. Philosophical experiment of me routing that component: Now, let's say I've already placed the thing (with all the layers and stuff enabled) and I go routing. The silk screen isn't really useful for orientation since it's only a partial outline, so I turn it off. And the wire labels disappear; no panic, I have the netlist anyway, that's meant for the people assembling the board. Even disabling silk the reference is still shown since it's a special field. So I can still see the name of what I'm looking at. For orientation it's more useful the assembly layer (which now has its own label). That's controlled by the assembly layer control. Turn it on, assembly outline and label appears; turn it off, both disappears. Also there is still probably the reference on the screen, probably conflicting with it (they often start overlapped since you don't know in the librarian where/if there is place for the refdes on the board). Hate when that happens, can't read any of them! I can turn off all the references without problem however. Since I can see the assembly labels I don't lose my way on the board. So, first consideration: the 'real' reference attached to the component is the one on the assembly, the one inside it. Our reference (that goes on the silk) has to be placed outside or even hidden (if there is no place for it) so it's not so useful during routing. However we can't change that because it would break older files... the mandatory reference has to be the one on silk (accepting genial ideas, however). Let's go on... I read the comments saying 'be careful' on both front and back. OK, now are in the way... the area outline is enough for working around it. Sadly I can't turn off the comment layer since the outline would disappear too. Also turning off the front text would be hide the assembly refdes. That's a problem. I could hide the single text entity; that would work but it's a little inconvenient *especially* if I wanted to see them later again. So, concluding: - The master reference (the one on silk) has privileged treatment (for historical reasons) but it's not too useful once it's in its final place (i.e. outside the part). The one on assembly (which is a user text) is more useful but doesn't have that treatment. Too bad we can't swap them and make the one on assembly the master one :P - Hiding text selectively when it's in the way *can* be done but is not extremely convenient; a script or some mass command (like the 'reset sizes') could help, however. Also setting the text display to 'lines' greatly reduces the impact of text (when zooming in enough for tracking); - Initially I've had tought of adding a "User Texts" visible checkbox for completeness with values and references... it's useless as you can see, since it's more or less like using the "Text Front"/"Text Back" ones; too coarse; - The 'final solution' would be to have a text enable on a by-layer basis; smell like bloat to me however... So, unless there are good ideas, I think I'll leave the interface as it is. Hiding the text with the whole layer content at the moment seems enough good to work; selective hiding and lines text mode seems to be good mitigation measures. As a convenience a 'show/hide all text on layer' command/script could be useful, however that would act on the data model, *not* on the display. That would, of course, be my own workflow. Probably someone else has other ways to do things. A good compromise needs to be found. Back to coding -- Lorenzo Marcantonio Logos Srl _______________________________________________ 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