Open nikitalita opened 1 year ago
Hi nikitalita, thanks for taking interest in this tool.
The result of the nl2sch.py script is a singe page schematic that provides schematic symbols, with pins connected to global labels specified by the netlist.
As it can be seen here, the tool doesn't create an actual schematic. Its intention was to remove the grunt work with labeling components. It also sets up nets so that one can search / cross-reference connections within KiCad.
As for its operation, a quick summary from the top of my head:
The general idea of this tool is to take the Protel netlist description (which describes the nets, component designators, values), example
...
(
DATA3-11_0
R2499-2
U31-P20
)
(
DATA3-13_0
R2500-2
U31-R18
)
(
DATA3-14_0
R1492-2
U31-R19
)
...
and an Open Document / Excel spreadsheet file, where the sheets describe the "sections" of the schematic, and the sheet contents describe the netlist components that should be put in that section
The tool checks that all of the mentioned components also have an entry in the spreadsheet (can be ignored via --allow-missing-component
) + that there are no duplicates.
It then loads the kicad schematic files, specified with the kicad_sch_path
.
Each component has its own schematic that contains
--allow-missing-pins
is specifiedThe placer tries to match (via D F V regexes) netlist components to any of the schematics, and when finding a match, extracts the placed component + its labels, places it according to its bounding box, with --spacing
between components, and changes its labels to nets specified in the netlist.
Components are placed per spreadsheet section, top-down, left to right, up to --width
The
https://github.com/tpecar/nl2sch/tree/main/ebaz4205
folder contains all of the input files (netlist, spreadsheet, component schematics) + the generated output file. Try out that first, the command line is provided in the project README.md
Note that since all of the Kicad schematic manipulation is done via regexes, it's quite brittle, and during the time I was developing the script, the new v6 eeschema format was not yet finalized.
So the scripts would probably need some adjustments before they will work with v6. Use the ebaz4205 for reference.
I have no idea what I'm supposed to do here, even with the guidance that I should look at the ebaz folder.