mvnmgrx / kiutils

Simple and SCM-friendly KiCad file parser based on Python dataclasses for KiCad 6.0 and up.
GNU General Public License v3.0
84 stars 27 forks source link

Broken as of KiCAD 8? #113

Open evantandersen opened 9 months ago

evantandersen commented 9 months ago

It seems KiCAD 8 changed the file format enough that KiUtils opening, parsing, and saving a PCB will corrupt it and prevent it from being opened.

To replicate:

  1. Open a KiCAD 7 PCB in KiCAD 8, you will get a notice about upgrading the file format upon save.
  2. Save the PCB to change to new format
  3. Board().from_file("foo.kicad_pcb").to_file()
  4. Try to open it in KiCAD 8, no dice!
evantandersen commented 9 months ago

An interesting note is that there's been rumblings on the discord about revamping the scripting interface for KiCAD 9, perhaps that will replace KiUtils? Not sure if there is a use case for externally-parsing the files vs. doing it live in the editor.

I used KiUtils for my project originally because it was much better documented / much simpler than the crazy pcbnew python system that currently comes with KiCAD. However, having to save, close, run a python script, then re-open my board everytime I want to update something that's scripted is a bit of a pain. Perhaps in the future we can have the best of both worlds?

mvnmgrx commented 8 months ago

Hello, KiCad 8 is not yet supported and its possible that there are breaking changes from 7 to 8 which kiutils does not yet account for. I haven't yet had time to look into the changes KiCad 8 brought, but its on my agenda to do so.

For the use-cases you described, the pcbnew internal scripting interface is of course more suited. However, i wrote kiutils initially to be able to process KiCad-related files outside of the KiCad environment. A few other use-cases for kiutils might include:

so, regardless of what happens to the pcbnew scripting interface, kiutils will still deliver value in being independent from KICad and lightweight to integrate.

chfriedrich commented 6 months ago

Hi, do you have any idea when kiutils will be usable for KiCad 8 files?