Hi Alexander, On 11/6/19 5:39 AM, Alexander Shuklin wrote: > Hi all, > I used some Python script to renumber components in PCB and annotate > it back to schematics. I think now it's usually done by parsing .sch > file as a plain text and re-writing references inside.
This is fine for your own personal use but this would not be an acceptable solution for inclusion into KiCad. > May I implement some back annotation feature from PCB to schematic? You are welcome to contribute to KiCad. I suspect it will not be as easy as you think it will be. Complex schematic hierarchies (using the same schematic more than once in a design) always trips up new developers. > I looked a bit and probably easiest way - to add a new option in > "Import->Footprint Association File" in eeschema. Something like > "update references according timestamps". And get information about > references and timestamps from .cmp file. This also would not be an acceptable solution. We are doing away with intermediate files and using the internal message passing features present in the code base. You'll want to take a close look at KIWAY::ExpressMail() and KIWAY_PLAYER::KiwayMailIn() and where they are used in the board and schematic editors. This is the method for passing information between the board and schematic editors (actually any object derived from KIWAY_PLAYER). > I would be happy to join you and discuss that at the FOSDEM, but > unfortunately I cannot go there ;'-( This is unfortunate. Being able to work directly with on of the lead developers would have made this task a lot easier to understand. You are always free to reach out for help on this mailing list. > And second question, sorry if it's stupid: If I want some new feature > in KiCad, what do I do first? Write here and ask like "Hi, I want to > implement that."? Or should I use some other stuff like IRC? Or first > I do patch and team will look if that's useful? You got it right. This is the place to ask all development questions related to KiCad. You also get kudos for asking before you started coding. This is mistake a lot of developers make. Asking first prevents you from working on something that someone else may already be working on and writing code that would be immediately rejected (in the case of your solution using intermediate files). You've already saved yourself the time and aggravation of not having to rewrite any code. That being said, I think someone was or is working on something similar to implement a tool to reassign references base on the board geography and then back annotating the schematic. This would have a lot of overlap with what you are proposing so you may want to collaborate with that person. Off the top of my head, I cannot remember who is working on it but hopefully they will chime in. The preferred method for small changes are patches created using `git format-patch` and attaching them to an email to this list. For larger changes which might include what you are proposing, please use the merge request feature[1] on Launchpad. We have a coding[2] and a commit message format[3] policies that all developers are expected to follow. We provide a simple commit hook tool[4] for git that makes following the coding policy easier. > I'm quite new to open source and still not sure how to behave if I > want to do some improvements You are off to a good start. The most important thing apart from your coding skill is to be willing to cooperate with the development team. Good luck and thank you for your interest in contributing to KiCad. Cheers, Wayne [1]: https://code.launchpad.net/kicad/+merges [2]: http://docs.kicad-pcb.org/doxygen/md_Documentation_development_coding-style-policy.html [3]: http://docs.kicad-pcb.org/doxygen/commit_messages.html [4]: http://docs.kicad-pcb.org/doxygen/md_Documentation_development_coding-style-policy.html#tools > > Best regards, > Alex > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

