Closed ScottHilton closed 4 years ago
Hi, Scott. My apologies for the difficulties with kinet2pcb
. As I always say: "it can never be easy."
To examine the problem, I created a small design with a resistor, capacitor, and LED from the device.lib
symbol library. Inside EESCHEMA, I ran the cvpcb
tool to assign footprints to the symbols, and then I exported a .net
file.
Inside the .net
file, I had three components that all looked similar to this:
(components
(comp (ref C1)
(value C)
(footprint Capacitor_SMD:CP_Elec_5x3)
(datasheet ~)
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
(sheetpath (names /) (tstamps /))
(tstamp 5DBC3998))
(comp (ref D1)
(value LED)
(footprint LED_SMD:LED_0201_0603Metric)
(datasheet ~)
(libsource (lib Device) (part LED) (description "Light emitting diode"))
(sheetpath (names /) (tstamps /))
(tstamp 5DBC3E23))
(comp (ref R1)
(value R)
(footprint Resistor_SMD:R_0603_1608Metric)
(datasheet ~)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5DBC51E3)))
As you can see, all the components have a footprint field that consists of the footprint library nickname and the footprint name separated by a colon.
You also need a fp-lib-table
file that associates the footprint library nicknames with the locations of their footprint directories. This file should be created when you installed KiCad and should be in the \Users\<your name>\AppData\Roaming\KiCad
directory. A typical entry in that file looks like this:
(lib (name LED_SMD)(type KiCad)(uri ${KISYSMOD}/LED_SMD.pretty)(options "")(descr "Light emitting diodes (LED), surface mount"))
So my questions are:
.net
file with just the footprint name and no library nickname or colon?fp-lib-table
and is it in the right place?I haven't gotten any reply on this. Should I close this issue?
Sorry, I got pulled away to another project. I will eventually get back to this project. I think I should be able to fix it with the help you already gave. Thanks for the help.
Description
I want to run the script from python
The netlist file generated from kicad has parts that aren't parsed correctly by the footprint loading logic.
What I Did
This .net file complained about splitting "LED_0201_0603Metric" because there is no colon to mark the library
This .net file complained about splitting and empty string because there is no colon to mark the library however it has an area in the netlist called libraries.
This netlist didn't like the .pretty part. After removing it I still got a null object for fb.