Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kicad Nightly build plugin not working #14

Open
robouden opened this issue Aug 8, 2023 · 12 comments
Open

Kicad Nightly build plugin not working #14

robouden opened this issue Aug 8, 2023 · 12 comments

Comments

@robouden
Copy link

robouden commented Aug 8, 2023

Trying to export of the Gerber files for the latest KiCad build and the PCB way plugin keep crashing. System is Linux Mint 21.1
I tried to modify the code as suggested by others in older issues, but no luck.

Regards
Rob Oudendijk

@a-allard
Copy link

Looking at this more in detail as Kicad 8 is close to release. Here is the specific version info for what I am using:

Application: KiCad x86_64 on x86_64

Version: 8.0.0rc1-4e3d2a148d176~ubuntu22.04.1, release build

Libraries:
wxWidgets 3.2.1
FreeType 2.11.1
HarfBuzz 2.7.4
FontConfig 2.13.1
libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16

Platform: Ubuntu 22.04.3 LTS, 64 bit, Little endian, wxGTK, X11, ubuntu, x11

Build Info:
Date: Jan 13 2024 14:38:18
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.2
Curl: 7.81.0
ngspice: 40
Compiler: GCC 11.4.0 with C++ ABI 1016

Build settings:

Kicad either completely crashes or puts a dialog up reading: "FOOTPRINT has no attribute HasProperty."

No other details at the moment.

@a-allard
Copy link

Got this working.....

To modify this to work with Kicad 8.0 open process.py and find the function get_mpn_from_footprint

replace with this modified version:

    def get_mpn_from_footprint(self, f):
        keys = ['mpn', 'MPN', 'Mpn', 'PCBWay_MPN' ,'part number', 'Part Number', 'Part No.', 'Mfr. Part No.', 'Mfg Part']
        for key in keys:
            if f.HasField(key):
                return f.GetFieldByName(key).GetText()

@pcbway
Copy link
Owner

pcbway commented Jan 15, 2024

Thanks for the feedback,I will ask our engineer double check it

@a-allard
Copy link

a-allard commented Feb 9, 2024

@pcbway Any update on when this might get fixed?

@a-allard
Copy link

a-allard commented Feb 9, 2024

If it helps I can do a fork and pull request....

@pcbway
Copy link
Owner

pcbway commented Feb 23, 2024

Hi
There are some test issues in kicad8 night version that have not been solved yet. You can use kicad7 version first.
Sorry about that

@aldwinhermanudin
Copy link

Got this working.....

To modify this to work with Kicad 8.0 open process.py and find the function get_mpn_from_footprint

replace with this modified version:

    def get_mpn_from_footprint(self, f):
        keys = ['mpn', 'MPN', 'Mpn', 'PCBWay_MPN' ,'part number', 'Part Number', 'Part No.', 'Mfr. Part No.', 'Mfg Part']
        for key in keys:
            if f.HasField(key):
                return f.GetFieldByName(key).GetText()

I'm using the latest KiCAD version 8.0.0. This changes work for me and the output files looks good too.

@pcbway
Copy link
Owner

pcbway commented Feb 28, 2024

If by this method, the kicad7 version will not be able to use the plug-in. We are communicating with the kicad manager about this.

@a-allard
Copy link

@pcbway That is a fair point....

Here is a fix that should work for either 7 or 8. (I have not tested yet)

def get_mpn_from_footprint(self, f):
        keys = ['mpn', 'MPN', 'Mpn', 'PCBWay_MPN' ,'part number', 'Part Number', 'Part No.', 'Mfr. Part No.', 'Mfg Part']
        v = int(pcbnew.Version()[0])
        if v == 7:
            for key in keys:
                if f.HasProperty(key):
                    return f.GetProperty(key)
        else:
            for key in keys:
                if f.HasField(key):
                    return f.GetFieldByName(key).GetText()

@a-allard
Copy link

Tested on 8.0.0 and 7.0.11 on Windows 11. Works like a charm on both.

@pcbway
Copy link
Owner

pcbway commented Feb 28, 2024

We have submitted the code update, and when it is passed,the kicad 8 and kicad 7 will both work well.

@pcbway
Copy link
Owner

pcbway commented Feb 29, 2024

Hi,Everyone,The plug-in has been updated and can now adapt to kicad8 and kicad7 versions. You can update and use it directly.
Thanks very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants