Coder Social home page Coder Social logo

bouni / kicad-jlcpcb-tools Goto Github PK

View Code? Open in Web Editor NEW
1.0K 24.0 96.0 20.12 MB

Plugin to generate BOM + CPL files for JLCPCB, assigning LCSC part numbers directly from the plugin, query the JLCPCB parts database, lookup datasheets and much more.

License: MIT License

Python 99.19% Shell 0.81%
kicad hacktoberfest jlc jlcpcb jlcpcb-assembly-service action-plugin eda

kicad-jlcpcb-tools's Introduction

The main window KiCAD JLCPCB tools



Update parts database


Plugin to generate all files necessary for JLCPCB board fabrication and assembly

  • Gerber files
  • Excellon files
  • BOM file
  • CPL file

Furthermore it lets you search the JLCPCB parts database and assign parts directly to the footprints which result in them being put into the BOM file.

The main window

The parts library window

The parts details dialog

Warning 🔥

I try to keep it working with 7.99 nightly builds but there are massive API changes on the horizon and I'm not sure if I can keep up with them.

This is under a lot of developments, so consider this README out of date all the time 😏

If you find any sort of problems, please create an issue so that I can hopefully fix it!

Installation 💾

KiCAD PCM

Add my custom repo to the Plugin and Content Manager, the URL is:

https://raw.githubusercontent.com/Bouni/bouni-kicad-repository/main/repository.json

image

From there you can install the plugin via the GUI.

Git

Simply clone this repo into your scripting/plugins folder.

Windows

cd C:\users\<username>\Documents\kicad\<version>\scripting\plugins\  # <username> is your username, <version> can be 6.0, 7.0, or 7.99 depending on the version you use
git clone https://github.com/Bouni/kicad-jlcpcb-tools.git

Linux

cd /home/<username>/.local/share/kicad/<version>/scripting/plugins  # <version> can be 6.0, 7.0, or 7.99 depending on the version you use
git clone https://github.com/Bouni/kicad-jlcpcb-tools.git

MacOS

cd ~/Library/Preferences/kicad/scripting/plugins
git clone https://github.com/Bouni/kicad-jlcpcb-tools.git

You may need to create the scripting/plugins folder if it does not exist.

Flatpack ⚠️

The Flatpak installation of KiCAD currently dows not ship with pip and requests installed. The later is required for the plugin to work. In order to get it working you can run the following 3 commands:

  1. flatpak run --command=sh org.kicad.KiCad
  2. python -m ensurepip --upgrade
  3. /var/data/python/bin/pip3 install requests

See issue #94 for more info.

Usage 🥳

To access the plugin choose Tools → External Plugins → JLCPCB Tools from the PCB Editor menus

Checkout this screencast, it shows quickly how to use this plugin:

KiCAD JLCPCB example

Keyboard shortcuts

Windows can be closed with ctrl-w/ctrl-q/command-w/command-w (OS dependent) and escape. Pressing enter in the keyword text box will start a search.

Toggle BOM / CPL attributes

You can easily toggle the exclude from BOM and exclude from CPL attributes of one or multiple footprints.

Select LCSC parts from the JLCPCB parts database

Select one or multiple footprints, click select part. You can select parts with equal value and footprint using the Select alike button. In the upcoming modal dialog, search for parts, select the one of your choice and click select part. The LCSC number of your selection will then be assigned to the footprints.

Footprint selection

Generate fabrication data

Generate all necessary assembly files for your board with a simple click.

A new directory called jlcpcb is created, and in there, two separate folders are created, gerber and production_files.

In the gerber folder all necessary *.gbr and *.drl files are generated and zipped into the production_files folder, ready for upload to JLCPCB. The zipfile is named GERBER-<projectname>.zip

Also in the production_files folder, two files are generated, BOM-<projectname>.csv and CPL-<projectname>.csv.

Footprints are included into the BOM and CPL files according to their exclude from BOM and exclude from POS attributes.

The fabrication files

Footprint rotation correction

JLCPCB seems to need corrected rotation information. @matthewlai implemented that in his JLCKicadTools and I adopted his work in this plugin as well. You can download Matthews file from GitHub as well als manage your own corrections in the Rotation manager.

Icons

This plugin makes use of a lot of icons from the excellent Material Design Icons

Development

  1. Fork repo
  2. Git clone forked repo
  3. Install pre-commit pip install pre-commit
  4. Setup pre-commit pre-commit run
  5. Create feature branch git switch -c my-awesome-feature
  6. Make your changes
  7. Commit your changes git commit -m "Awesome new feature"
  8. Push to GitHub git push
  9. Create PR

Make sure you make use of pre-commit hooks in order to format everything nicely with black In the near future I'll add ruff / pylint and possibly other pre-commit-hooks that enforce nice and clean code style.

How to rebuild the parts database

The parts database is rebuilt by the update_parts_database.yml GitHub workflow

You can reference the steps in the 'Update database' section for the commands to run locally.

Standalone mode

Allows the plugin UI to be started without KiCAD, enabling debugging with an IDE like pycharm / vscode.

Standalone mode is under development.

Limitations

  • All board / footprint / value data are hardcoded stubs, see standalone_impl.py

How to use

To use the plugin in standlone mode you'll need to identify three pieces of information specific to your Kicad version, plugin path, and OS.

Python

The {KiCad python} should be used, this can be found at different locations depending on your system:

OS Kicad python
Mac /Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/bin/python3
Linux TBD
Windows C:\Program Files\KiCad\8.0\bin\python.exe

Working directory

The {working directory} should be your plugins directory, ie:

|OS | Working dir| |Mac| ~/Documents/KiCad/8.0/scripting/plugins/| |Linux|TBD| |Windows| %USERPROFILE%\Documents\KiCad\8.0\scripting\plugins|

Plugin folder name

The {kicad-jlcpcb-tools folder name} should be the name of the kicad-jlcpcb-tools folder.

  • For Kicad managed plugins this may be like

com_github_bouni_kicad-jlcpcb-tools

  • If you are developing kicad-jlcpcb-tools this is the folder you cloned the kicad-jlcpcb-tools as.

Command line

  • Change to the working directory as noted above
  • Run the python interpreter with the {kicad-jlcpcb-tools folder name} folder as a module.

For example:

cd {working directory}
{kicad_python} -m {kicad-jlcpcb-tools folder name}

For example on Mac:

/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/bin/python3 -m kicad-jlcpcb-tools

For example on Windows:

& 'C:\Program Files\KiCad\8.0\bin\python.exe' -m kicad-jlcpcb-tools

IDE

  • Configure the command line to be '{kicad_python} -m {kicad-jlcpcb-tools folder name}'
  • Set the working directory to {working directory}

If using PyCharm or Jetbrains IDEs, set the interpreter to Kicad's python, {Kicad python} and under 'run configuration' select Python.

Click on 'script path' and change instead to 'module name', entering the name of the kicad-jlcpcb-tools folder, {kicad-jlcpcb-tools folder name}.

kicad-jlcpcb-tools's People

Contributors

ajf58 avatar bhusang avatar binary1230 avatar bouni avatar bvernoux avatar chmorgan avatar computergeek1507 avatar danielo avatar dzid26 avatar fredszaq avatar frightrisk avatar github-actions[bot] avatar gyohng avatar hlord2000 avatar jcb83 avatar jeppeklitgaard avatar jevonlongdell avatar markusdd avatar masuidrive avatar msalau avatar obra avatar polsaker avatar radonyl avatar rgov avatar richo avatar serpent213 avatar smittyhalibut avatar taki-d avatar tjfsteele avatar venkatrao1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kicad-jlcpcb-tools's Issues

Main window "JLCPCB Tools" could add "LCSC Package" and better "LCSC Description" from lcsc.com or digikey...

  • Main window "JLCPCB Tools" could add "LCSC Package" and "LCSC Description" from lcsc.com or digikey
    • Maybe first step will be to "parse/extract/display" correctly the "LCSC Description" from the csv as it is not displayed correctly today in "JLCPCB Library".
    • See https://github.com/yaqwsx/jlcparts/blob/master/LCSC-API.md for more details as there is clearly missing details from https://jlcpcb.com/parts and I always check manually the LCSC part on https://lcsc.com to check that the Package, Mfr.Part & Description match with what I want.
    • A must have will be to cross check the Description on LCSC part available on DigiKey as it is more accurate with more details than on LCSC so we will use DigiKey description instead of LCSC...

Sorting not quite working

Sorting by Reference doesn't work as expected, R10 is between R1 and R2, not after R9 as one would expect:
image

Same for sorting by Stock, it just sorts by the first digit, not the actual number:
image

Improved filter functions

It would be nice to have more ways to filter the JLCPCB parts database.
I think as a start I'm going to kind of clone the serach / filter functions of the JLCPCB website (at least for some fields)

image

Error occurred while using.

Even if kicad is closed, the plug-in cannot be closed. It can be completely closed only by killing the task process.
QQ20210820201955

Application: KiCad PCB (64-bit)

Version: (5.99.0-11689-g04c6b79350), release build

Libraries:
wxWidgets 3.1.5
libcurl/7.74.0-DEV Schannel zlib/1.2.11

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

Build Info:
Date: Aug 12 2021 06:25:14
wxWidgets: 3.1.5 (wchar_t,STL containers)
Boost: 1.76.0
OCC: 7.5.0
Curl: 7.74.0-DEV
ngspice: 34
Compiler: Visual C++ 1928 without C++ ABI

Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

0 Parts due to missing JLC PCB file

When loading the plugin I get the following:

2021.10.22 16:48:41 - DEBUG - Starting new HTTPS connection (1): jlcpcb.com:443
2021.10.22 16:48:41 - DEBUG - https://jlcpcb.com:443 "GET /componentSearch/uploadComponentInfo HTTP/1.1" 404 0
2021.10.22 16:48:41 - INFO - Downloaded into jlcpcb_parts.db in 0.215 seconds
2021.10.22 16:48:41 - ERROR - no such table: jlcpcb_parts
2021.10.22 16:48:41 - ERROR - no such table: info
2021.10.22 16:48:41 - INFO - Loaded jlcpcb_parts.db with 0 parts

Attempting to load https://jlcpcb.com/componentSearch/uploadComponentInfo from my browser also resulted in a 404

Any thoughts on how to resolve this?

Slow UI

As mentioned here #65 (comment) the UI (part search) feels slow and laggy, this is mostly because every time we load the search dialog we query all packages and manufacturers from the db.
That could be cached for speedup.
Also the live search for packages and manufacturers feels slow and has potential for improvement.

Exception on python action plugin code

getting the below error when trying to use this plugin

Screenshot from 2021-08-17 21-40-32

version info

Application: Pcbnew
Version: 5.1.10-88a1d61d5890ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.4.0-80-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OpenCASCADE Technology: 7.3.0
Curl: 7.68.0
Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=OFF
KICAD_USE_OCC=ON
KICAD_SPICE=ON

Not all PCB parts are showing in list

In the JLCPCB Tools main window, not all of my PCB parts are shown in the list. I have parts with references like IC1, IC2, etc, they do not show up in the list.

Remove wx.BusyInfo in favor of the progress bar

At the moment we use wx.BusyInfo when downloading the library and loading the csv into the database.

I would prefer that we use the progress bar instead which makes the UX much better in my opinion.
Especially on dual monitor setups, the BusyInfo sometimes pop up on th other screen which lets the UI seem to freeze, but actually its caused by the BusyInfo on the other screen.

Unable to launch this plugin in Kicad 5.99

Version info (built from kicad-nightly aur):

Application: KiCad

Version: (5.99.0-12936-g328d3d0d77), release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.79.1 OpenSSL/1.1.1l zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.45.0

Platform: Linux 5.10.68-1-MANJARO x86_64, 64 bit, Little endian, wxGTK, KDE, x11

Build Info:
	Date: Oct 25 2021 02:17:51
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.76.0
	OCC: 7.5.0
	Curl: 7.79.1
	ngspice: 35
	Compiler: GCC 11.1.0 with C++ ABI 1016

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

When I click the plugin icon, Kicad exits with an xcb error:

2021-10-29 14:35:28,258 [INFO] Load corrections from https://raw.githubusercontent.com/matthewlai/JLCKicadTools/master/jlc_kicad_tools/cpl_rotations_db.csv
2021.10.29 14:35:28 - INFO - Load corrections from https://raw.githubusercontent.com/matthewlai/JLCKicadTools/master/jlc_kicad_tools/cpl_rotations_db.csv
2021-10-29 14:35:28,261 [DEBUG] Starting new HTTPS connection (1): raw.githubusercontent.com:443
2021.10.29 14:35:28 - DEBUG - Starting new HTTPS connection (1): raw.githubusercontent.com:443
2021-10-29 14:36:32,898 [DEBUG] https://raw.githubusercontent.com:443 "GET /matthewlai/JLCKicadTools/master/jlc_kicad_tools/cpl_rotations_db.csv HTTP/1.1" 200 565
2021.10.29 14:36:32 - DEBUG - https://raw.githubusercontent.com:443 "GET /matthewlai/JLCKicadTools/master/jlc_kicad_tools/cpl_rotations_db.csv HTTP/1.1" 200 565
2021-10-29 14:36:32,981 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,981 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,981 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,982 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,982 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,982 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,982 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,983 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,983 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,983 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,983 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,984 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,984 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,984 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,984 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,984 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,985 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,985 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,985 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,985 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,986 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,986 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,986 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,986 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,987 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,987 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,987 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,987 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,988 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,988 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,988 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,988 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,988 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,989 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,989 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,989 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,989 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,990 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,990 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,991 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,991 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,991 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,991 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,991 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,992 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,992 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,992 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,992 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,993 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,993 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,993 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,993 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,994 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,994 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,994 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,994 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,994 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,995 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,995 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,995 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,995 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,996 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,996 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,996 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,996 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,997 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,997 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,997 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,997 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,998 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,998 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,998 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,998 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,998 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,999 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,999 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,999 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:32,999 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:32 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,000 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,000 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,001 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,001 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,001 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,001 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,001 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,002 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,002 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,002 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,002 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,003 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,003 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,003 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,003 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,004 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,004 [ERROR] no such table: jlcpcb_parts
2021.10.29 14:36:33 - ERROR - no such table: jlcpcb_parts
2021-10-29 14:36:33,025 [DEBUG] Start download
2021.10.29 14:36:33 - DEBUG - Start download
2021-10-29 14:36:33,028 [DEBUG] Starting new HTTPS connection (1): jlcpcb.com:443
2021.10.29 14:36:33 - DEBUG - Starting new HTTPS connection (1): jlcpcb.com:443
2021-10-29 14:36:34,033 [DEBUG] https://jlcpcb.com:443 "GET /componentSearch/uploadComponentInfo HTTP/1.1" 200 87497702
2021.10.29 14:36:34 - DEBUG - https://jlcpcb.com:443 "GET /componentSearch/uploadComponentInfo HTTP/1.1" 200 87497702
2021-10-29 14:36:34,035 [DEBUG] Download success
2021.10.29 14:36:34 - DEBUG - Download success
[xcb] Unknown sequence number while processing reply
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
kicad: xcb_io.c:725:_XReply: assertion ‘!xcb_xlib_threads_sequence_lost’ failed.
fish: Job 1, 'kicad-nightly' terminated by signal SIGABRT (Abort)

I wonder if some multithreading is not handled correctly in the plugin?

button 'Select Part' do not work

Installed the plugin today. Linux Mint. KiCad night with daily updates. The "Select part" button does not manifest itself in any way, nor does it open anything

Exception Traceback

Hi,

I got this error message right after pressing the J@LC button (Win10, latest 5.99 Kicad)

2021-08-28 20_58_02-_rund — Leiterplatteneditor

Very inconvenient to search for certain values like '100Ohm 0402 resistor'

When you search for '100 0402' or '100 0402 resistor', thousands of results appearing in the result box.
Screenshot_20211029_155648

However, you can get the desired result if you search with '100Ω'.

Considering the fact that most people don't have the Ω symbol on their keyboard, I think it would be nice to have some form of auto-conversion in the search box, like converting ohm to Ω.

"JLCPCB Library" shall display a better Description

In "JLCPCB Library" display add the Description from https://github.com/yaqwsx/jlcparts/blob/master/LCSC-API.md (instead of the ones from https://jlcpcb.com/parts) as the one from https://jlcpcb.com/parts is unreadable and not accurate

  • Maybe first step will be to "parse/extract/display" correctly the "LCSC Description" from the csv as it is not displayed correctly today.
  • Example screenshot with issue (°C ... not displayed correctly ...) on Description
    image
    image

Keep part details window always in foreground

I think we should keep the part details window always in the foreground because its samller than its parent windows and can be hidden under them otherwise.
According to the wx docs this should be possible by adding the wx.STAY_ON_TOP window style.

Nice to have features for future version

I will list nice to have features for future version of that amazing JLCPCB KiCad 5.99 (Nightly) plugin

  • Add JLCPCB Plugin version(+build date) information (from github tag) in the title of the Main window "JLCPCB Tools"
  • Main window "JLCPCB Tools" could add "LCSC Package" and "LCSC Description" from https://lcsc.com
  • "JLCPCB Library" shall display a better Description
  • Add a way to remove LCSC reference from the JLCPCB Tools plugin (from the part_assignments.csv file)
  • Add a way to filter on column (for main window "JLCPCB Tools" and "JLCPCB Library")
  • Add a way to resize windows (for main window "JLCPCB Tools" and "JLCPCB Library")
  • Move the JLCPCB/LCSC data parsing(csv) to SQLite database to speedup search/loading ...

CPL seems rotated by 180°

I ordered a board with all the files generated by this plugin, everything looked good in the preview.
As the board went into shipping, I've seen that there's a "DFM analysis" Link in the orders menu that shows what was sent and what and how the engeneers at JLC fixed the CPL files:

image

From the two images it seems that the entire CPL file is rotated by 180 degrees.

Not sure why thats the case ...

BOM isn´t generated and CPL is empty

unfortunately, no CPLs are generated. the BOM is also missing. I suspect that the fault lies with the solder bridges. I can not unselect these from the BOM and the CPL.
2021-08-31 11_15_09-assembly
2021-08-31 11_14_06-rund — Leiterplatteneditor

it´s not possible to switch from yes to no
grafik

Plugin not detected latest Nightly

Since the last update of Kicad Nightly, the plugin is no longer detected by the software (the icon no longer appears although the plugin is present in the corresponding folder) but the other plugins seem to work (KiBuzzard)

I downloaded the latest "main" version

Application: KiCad PCB Editor (64-bit)

Version: (5.99.0-13263-g43c85771eb), release build

Libraries:
	wxWidgets 3.1.5
	libcurl/7.78.0-DEV Schannel zlib/1.2.11

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

Build Info:
	Date: Nov 13 2021 00:01:08
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.76.0
	OCC: 7.5.0
	Curl: 7.78.0-DEV
	ngspice: 35
	Compiler: Visual C++ 1929 without C++ ABI

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

Add Stock in main "JLCPCB Tools" window with a button to refresh it

It will be great to add Add JLCPCB SMT "Stock" in main "JLCPCB Tools" window with a button to refresh it for each part selected
By default the "Stock" field could be populated to "-" or just empty as it is unknown until we click on refresh button for items selected

Library format changed

JLCPCB changed the library format without announcement from xls to csv.

That brakes the tool but openes up the possibility to show the loading progress.

Accept wider variety of LCSC property names from schematic

At the moment we only accept LCSC propertys set in the schematic if the are named LCSC, all upercase, no leading or trailing whitespaces.

Maybe we should accept lower case and/or mixed variants like Lcsc LCsc lcsc and so on as well.
The same applies for LCSC, LCSC etc.

Error installing plugin on MacOS?

I wasn't able to see the plugin (it's installed in the correct directory). Running on a mac, using nightly: kicad-unified-20210915-042000-ca6e43d1e1.dmg

  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/me/Documents/KiCad/5.99/scripting/plugins/kicad-jlcpcb-tools/__init__.py", line 4, in <module>
    from .plugin import JLCPCBPlugin
  File "/Users/me/Documents/KiCad/5.99/scripting/plugins/kicad-jlcpcb-tools/plugin.py", line 28, in <module>
    from .library import JLCPCBLibrary
  File "/Users/me/Documents/KiCad/5.99/scripting/plugins/kicad-jlcpcb-tools/library.py", line 20, in <module>
    subprocess.check_call(["python", "-m", "pip", "install", "pandas"])
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '-m', 'pip', 'install', 'pandas']' returned non-zero exit status 1.

Can't generate files in "major-refractor"

I wanted to test the "major-refractor" branch (I love the addition of the icons <3)
except that when I click to Generate the GERBER nothing happens.

Application: Editeur de PCB KiCad (64-bit)

Version: (6.0.0-rc1-1-g4df25edb3d), release build

Libraries:
	wxWidgets 3.1.5
	libcurl/7.78.0-DEV Schannel zlib/1.2.11

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

Build Info:
	Date: Nov 16 2021 00:01:03
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.76.0
	OCC: 7.5.0
	Curl: 7.78.0-DEV
	ngspice: 35
	Compiler: Visual C++ 1929 without C++ ABI

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

A question that I also ask myself. I know the French are lazy and a bit ..... well .... let's just say lazy ^^.
Do you think that if I offer an update to translate the plugin would be useful ?

Add option to include non-selected components in BOM

Currently, all components have to be selected in order to be included in BOM. However, most resistors and capacitors can be automatically matched in JLC, making it unnecessary (and painful) to select them manually. (The slow, laggy UI adds extra pain in the ass if there are 30's individual values of resistors: every select makes the UI freeze for 3 seconds)

Calculated price is not correct

At the moment we calculate the component costs by multiplying the partcount x part price and even take price graduation into account.
But if you upload the BOM / CPL you will get a completely different price.
This is caused by the JLCPCB pricing where you have to buy a minimum number of a cirtain component.

For example you have a PCB with just 1 LED on it, a 0603. We select the LCSC number C2286 which has a cost of $0.007384615 per piece for 1 up to 199 pieces according to the CSV file.

The website already shows a slightly different price:

image

You would think ok, $0.007384615 x 5 = $0.036923075 so approximately $0.04
If you uplad the Gerbers + BOM + CPL the website tells you

"For qty≤20,charges a fixed fee $0.1520"

This important piece of information however is not included in the CSV 😕

So all the calculated prices are wrong until we somehow can optain this information for the calculation.

Disable buttons if action not possible

We should disable buttons if the action is not possible, for example:

Main window:

  • if no footprint is selected, all buttons from the toolbar should be disabled

Part selection window:

  • if no part is selected, the two buttons on the right side should be disabled
  • the search button should be disabled if no keyword is in the search text field

LCSC property gets lost when updating PCB from schematic

I realized that whenever I update the PCB from the schematic, the LCSC property of all the footprints gets lost.
This means when you select JLC parts you should not update teh PCB from the schematic or you have to do everything again.
Most likely the properties in the PCB do not get updated, but rather deleted and set to whatever comes from the schematic.
Also the Update schematic from PCB Button does not solve this problem as custom properties seem to not make it into the schematic 😞

I'll file a bug in the KiCAD repo and see if there is a way to persist or sync the properties.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.