Hi, I am the author of GitHub - PySpice-org/PySpice: Simulate electronic circuit using Python and the Ngspice / Xyce simulators · GitHub a Python library for running Spice Simulation.
A few years ago, I wrote a Python library to read KiCad 6 schematics. However, extracting the netlist required an insane code because a KiCad schematic is essentially just a drawing similar to SVG but stored as S-expressions.
A week ago, I tested LibrePCB, and discovered its file format is far superior ! Thus, I decided to add support for it and revamped my project to GitHub - PySpice-org/eda-rw: Python library to read/write KiCad and LibrePCB Sexpr file format · GitHub. Thanks to modern Python, the code for reading LibrePCB file is short and efficient.
Actually, it is not certain that new features need to be added to LibrePCB. I think a custom attribute might suffice for this purpose.
I also recently tried the built-in simulation in KiCad, but it was a complete failure:
- KiCad only offers raw SPICE; consequently, to simulate mains voltage, you have to enter SPICE commands manually and remember that the 230 V value is an RMS value…
- My test was a reverse engineering, thus I drew the real circuit. But for simulation, it might make sense to merge two resistors in series, for example.
- KiCad’s simulation user interface and plotting are inefficient ( I don’t want to say a toy feature ). And it is unrealistic to reimplement Matlab in KiCad…
I therefore consider KiCad’s approach to simulation to be unsuitable. Personally, I prefer designing the circuit using a graphical interface, then exporting it to PySpice and using Python code to handle the rest.