Support updating text variables in .kicad_pcb file explicitly#861
Conversation
f7f1bd3 to
3188455
Compare
|
(force pushed to fix typo) I've submitted this as a draft, since I am not entirely convinced that my approach of adding a new 'update' value to the existing I'm not sure what the best approach would be, maybe also add an Even with the above caveats, I wanted to submit this PR to demonstrate that the approach itself works as expected (tested locally by copying the updated files into a kibot docker container). |
|
What about a new, and independent, global option |
3188455 to
0e516f9
Compare
|
That sounds like a good approach, I've just implemented this, including the 'auto' option. I'm marking this PR as non-draft, AFAICS it would be ready to review and merge. There is one (existing) caveat that I ran into: There is a |
I think people that wants to avoid changes should disable the |
|
Can you rebase this PR to the Also: you don't need to include changes to |
0e516f9 to
8e51de2
Compare
Normally, the text variables in the .kicad_pcb file are cleared when requested, or when changing them with the set_text_variables preflight. This causes KiCad to load the variables from the project file when opening the PCB, but this does not work when the .kicad_pcb file is used in isolation (e.g. when submitting to a PCB manufacturer). This commit adds support for a new update_pcb_text_cache option, which causes kibot to explicitly write the (updated / current) variables to the .kicad_pcb file, making it self-contained. This fixes INTI-CMNB#860
8e51de2 to
508d773
Compare
Done, though I did not do any additional testing with the rebased version (no time right now).
Ah, I dropped those changes. When are they autogenerated? When building the docs with the Makefile, it seems? If so, why is the file present in git at all? Might be cleaner to not have it than carry an outdated version around? |
Yes,
Mainly because you need a working KiBot to generate them, which isn't always true. The requirements to generate the HTML files are relaxed in this way
They are synced very often, the |
This makes sure the exported PCB file is self-contained and can be submitted to a PCB manufacturer directly, without needing the project file. This requires support in kibot, as introduced by INTI-CMNB/KiBot#861
Normally, the text variables in the .kicad_pcb file are cleared when requested, or when changing them with the set_text_variables preflight. This causes KiCad to load the variables from the project file when opening the PCB, but this does not work when the .kicad_pcb file is used in isolation (e.g. when submitting to a PCB manufacturer).
This commit adds support for invalidate_pcb_text_cache=update, which causes kibot to explicitly write the (updated / current) variables to the .kicad_pcb file, making it self-contained.
This fixes #860