← Back to team overview

kicad-developers team mailing list archive

Re: BOM support

 

Jean-Pierre,

First, I apologize for saying the BOM C++ code is garbage.  (I had my
special hat on,  :) you know the one that says any code I have not
written is garbage.  It's a
silly self-misleading hat, but I sleep in it.)


Does the output of netform.cpp's Write_GENERIC_NetList() have what is
needed in it to create a BOM?


If so, here is my current thinking, obviously it is evolving as I do the
research, before the development.

What we need is almost entirely present in the existing *generic netlist
exporter*. (EESCHEMA -> Netlist -> Add Plugin).

This can export the netlist to a text file and chain load a post
processor to generate a "netlist" of any kind.  Is there a reason this
cannot generate a BOM?  The only netlist plug-in in existence is in
eeschema/plugin/netlist_form_pads-pcb.cpp, and this represents the only
dependency on the existing non-XML "generic netlist format", which is an
arbitrary format that I would like to change to XML.


What about the following plan of action, for which I am volunteering:


1) Change the generic netlist exporter to export to XML, keeping all the
existing content, even pins, and *adding* all custom component
fieldnames/properties.

2) Fix netlist_form_pads-pcb.cpp to read the new generic netlist format
XML file, using the xml support within wxWidgets, see wxXmlDocument, and
create the same output it uses now.  I'm hoping what was a non-gui
program can still stay that way using this class, don't know yet.

3) Work with Brian to write one or more python scripts, which will
basically fix bug https://bugs.launchpad.net/kicad/+bug/581153

4) Commit the C++ improvements I made yesterday to the existing BOM
generator and keep them until a higher authority deletes them.

5) I bail on fixing bug https://bugs.launchpad.net/kicad/+bug/581153 in
C++, which I deem being a lost cause, because I think the BOM generator
C++ is a lost cause.  Use any one of the python scripts to overcome it.


Dick





Follow ups

References