ID: | 3571 |
From: | ge...@igor2.repo.hu |
Date: | Sat, 7 Dec 2019 13:50:31 +0100 (CET) |
Subject: | [pcb-rnd] new: unified layer/group addressing syntax |
replies: | 3572 from John Griessen <jo...@cibolo.com> |
Hi all, I've finished the new, unified layer and layer group addressing system: http://repo.hu/projects/pcb-rnd/user/09_appendix/layer_addr.html 1. Are you affected? If you write CAM rules: maybe yes but hopefully no, as the new system is backward compatible with the original CAM system. If you find any CAM script breaking, please report If you are scripting and/or using actions extensively: some actions already use fgw_layerid arguments, the new, more detailed addressing sytnax will just work there. Note: this depends on two things. One is the new address syntax. The other is our action infra that has typed arguments (old geda/pcb had only string arguments and different action tried to convert strings into layer IDs in randon ways). Actions we inherited from geda/pcb are still using their old, custom conversion, working by layer name or layer number without prefix. In some cases we can upgrade it without breaking compatibility, in other cases we'll just introduce a new action. If you are scripting and you find any action that takes layer as argument and doesn't accept the new syntax, please report and I will see how I can fix it. In any other case, you are not affected. 2. How does it work? The group addressing is the same we already used in CAM. The layer addressing is a logical, bakward compatible extension of what we had already. The main new component is that layers can be addressed not only globally (by layer ID or layer name) but as group/layer. Since group can be addressed with type and offset, this means it is possible to describe rather specific things in a generic, works-on-any-board manner. A few random examples for layer addressing: - the first layer of the top silk group: top-silk/#1 - the last positive layer of the top silk group (if your script wants to make sure it is drawing something visible): top-silk/#-1+ - the last negative layer of the top silk group (if you script wants to make sure it erases as much as possible, on silk): top-silk/#-1- - the first layer on the internal copper layer that is right above the bottom copper layer in the stack: bottom-copper:-1/#1 3. Why now? We had this planned for long. We have already tried the more complicated part of the new syntax in the CAM jobs. These days I am working on extended objects and I figured I am going to need a reliable way of addressing layers. Using layer ID is not a good idea because layer IDs may change easily. With padstacks and subcircuits we already made a good exmaple of using more robust layer group references by using recipes for layer types. The new addressing system is the logical next step for the cases where we don't want a generic "find something that more or less matches" recipe but a very specific layer group or layer, but also want it to work stackup-independently. Regards, Igor2
Reply subtree:
3571 [pcb-rnd] new: unified layer/group addressing syntax from ge...@igor2.repo.hu
3572 Re: [pcb-rnd] new: unified layer/group addressing syntax from John Griessen <jo...@cibolo.com>