gauravmm / HierarchicalPcb

MIT License
32 stars 6 forks source link

Fix vias and arcs not getting created and traces not cleared due to Python class id mismatch #5

Closed debreczeni closed 6 months ago

debreczeni commented 10 months ago

Hello, Here is a fix for an issue I am having on windows 10 with kicad 7.0.10. I noticed that the vias are not getting copied over, so after a little debugging it turned out that the class id for pcbnew.PCB_TRACK is not the same as for the track instance's class id itself. I have no experience with python, so I don't know what is an elegant solution for this. If I understand well, the same module/class might refer to different modules/classes in Python, or it might be due to the SWIG binding, so I made a fallback on the track class' name. What system is this being developed on? Anyway, here is the patch.

KiCad Version

Application: KiCad PCB Editor x64 on x64

Version: 7.0.10, release build

Libraries:
    wxWidgets 3.2.4
    FreeType 2.12.1
    HarfBuzz 8.2.1
    FontConfig 2.14.2

Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW

    wxWidgets: 3.2.4 (wchar_t,wx containers)
    Boost: 1.83.0
    OCC: 7.7.1
    Curl: 8.4.0-DEV
    ngspice: 41
    Compiler: Visual C++ 1936 without C++ ABI

Build settings:
    KICAD_SPICE=ON
gauravmm commented 9 months ago

Thanks for the pull request! I'll take a look and merge it shortly.

gauravmm commented 8 months ago

It looks good, but the underlying problem appears to be completely fixed in KiCAD 8. I'll figure out if we can support KiCAD 8 with the next release, if not I'll merge this and release it as an update.

gauravmm commented 6 months ago

Its now compatible with KiCAD 8, so I'm closing this as wontfix. Thanks for the report!