Any KiCad internals experts? - Page 1
Forum section: electronics / general

author: ataradov
author_rank: Super Contributor
timestamp: December 15, 2017, 07:06:31 pm
content: I'm trying to parse KiCad PCB files (new format) and generally it is pretty well done, but there are some things that are not clear.For now, I don't understand the difference between "gr_line" and "fp_line" and other drawing commands with corresponding prefixes.It looks like fp_xxx are used in libraries (meaning "footprint"?) and gr_xxx are used for board-level elements ("graphic"?). gr_xxx seem to have an angle parameter, for which I can't figure out a setting in the KiCad, so I don't know what it means or how it is supposed to be used.I'm sure I'll have more questions.

author: hermit
author_rank: Frequent Contributor
timestamp: December 15, 2017, 07:15:52 pm
content: The Kicad forum is pretty good for stuff like this. There are several people that write scripts that would probably know the answers to your questions and you'd get good answers in pretty short order. I'm not a coder and I mainly stay out of the files.

author: ataradov
author_rank: Super Contributor
timestamp: December 15, 2017, 07:17:19 pm
content: Quote from: hermit on December 15, 2017, 07:15:52 pmCan you give a link to a specific forum for developers? The search returns a lot of results, and it is not trivial to differentiate them.

author: chicken
author_rank: Frequent Contributor
timestamp: December 15, 2017, 07:23:22 pm
content: This is IMO the best forum for KiCad, with several developers active on it:https://forum.kicad.info/The other venue is the developer mailing list, though it is mostly focused on developing Kicad itself:https://lists.launchpad.net/kicad-developers/

author: ElektroQuark
author_rank: Unknown
timestamp: December 15, 2017, 09:42:45 pm
content: Take a look here:https://en.wikibooks.org/wiki/Kicad/file_formats

author: ataradov
author_rank: Super Contributor
timestamp: December 15, 2017, 09:51:19 pm
content: Quote from: ElektroQuark on December 15, 2017, 09:42:45 pmThose are only old format descriptions. There is a PDF that includes new formats, but it does not go into details of what individual fields in the commands mean, just lists them.Based on quick scan of the code, it looks like my assumption is correct. I still don't understand the need for this distinction, but for now, I'm ok. I may see it as I go along.

author: hermit
author_rank: Frequent Contributor
timestamp: December 15, 2017, 11:08:23 pm
content: Quote from: chicken on December 15, 2017, 07:23:22 pmThis is the forum I was thinking of. People doing add on scripts frequent it and know the ins and outs of manipulating and understanding the data format.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: December 16, 2017, 02:44:06 am
content: The new file formats are barely documented. I did consider writing something, but it would not be definitive, and KiCad devs have a loose approach to versioning which makes documenting a nightmare. I usually end up looking at the source and building small test cases.FWIW, there ishttp://bazaar.launchpad.net/~stambaughw/kicad/doc-read-only/files/head:/doc/help/file_formats/docs_src/