tousstnicolas / jlc2kicad_lib Goto Github PK
View Code? Open in Web Editor NEWJLC2KICAD_lib is a python script that generate a component library (schematic, footprint and 3D model ) for KiCad from the JLCPCB/easyEDA library.
License: MIT License
JLC2KICAD_lib is a python script that generate a component library (schematic, footprint and 3D model ) for KiCad from the JLCPCB/easyEDA library.
License: MIT License
--model_path_relative argument not recognized even though it's in the usage in README.md.
Using the argument results in the following error:
usage: JLC2KiCadLib [-h] [-dir OUTPUT_DIR]
[-model_base_variable MODEL_BASE_VARIABLE]
[--no_footprint] [--no_schematic]
[-schematic_lib SCHEMATIC_LIB]
[-footprint_lib FOOTPRINT_LIB]
[-logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
[--log_file]
JLCPCB_part_# [JLCPCB_part_# ...]
JLC2KiCadLib: error: unrecognized arguments: --model_path_relative
Hi,
first of all, this is absolutely amazing! I totally love this project ๐
I tried to get footprint, symbol and 3D file for the USB Micro connector C132563
which should look like this:
The Symbol is correct:
But the footprint is not:
The 3D Package turned out great:
But there are two minor issues with the 3D package:
Is your feature request related to a problem? Please describe.
Command line based footprint based downloading and placing on pcb is a little cumbersome
Describe the solution you'd like
GUI kicad plugin shall support:
Additional context
I hacked up together a plugin (https://github.com/Springer-Electronics/JLC2KiCad_lib/tree/kicad-plugin) that downloads part to a hardcoded library name in the project directory, and pastes it on PCB canvas.
Currently it can be installed directly in kicad scripts directory.
Describe the bug
Wire doesn't connect to symbol pins
To Reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I tried "aligning the schematic and also the symbol drawing in the editor. Didn't help.
I made a code where I converted vias from EDA to THT pads.
I can make a pull request if you think it's a good idea.
The new symbol generation is currently on the branch master
Here is a list of known issues :
I haven't got time to fully test it, so do not hesitate to report any other issues.
Overall the symbol generation should already be far more reliable than the current one.
Symbol name containing whitespace characters and footprint name containing parentheses should be quoted by "".
Components in the .kicad_sym are not replaced but a duplicate is created each time the code runs.
Running code twice:
JLC2KiCadLib.py C1337258 C24112 -dir My_lib -schematic_lib My_Schematic_lib --no_footprint
Running the code above creates the following line in My_Schematic_lib.kicad_sym
:
(symbol "STM32L431CCU6" (in_bom yes) (on_board yes)
The regex code on line in schematic.py, line 156:
pattern = f' \(symbol "{component_title}" \(pin_names (\n|.)*?\n \)'
does not recognize the line in the kicad_sym file because pin_names have not been created for some reason.
Hi,
I would first of all thank you allot for making this library. It has truly been a game changer when working with JLCPCB!
Is your feature request related to a problem? Please describe.
Currently downloading wrl files from easyeda for the 3d models. However these does not export easily to CAD software like Fusion 360.
Describe the solution you'd like
I know EasyEDA Pro has a feature to export as STEP or OBJ. Thus I would assume EasyEDA also stores their components in this format as well. Have you considered to implement something like this before?
Dear Nicolas,
first of all thanks for sharing your tool with the world. It is really useful and well done. I also know that you hoped to not touch it again, but I found an error which seems to occur mainly with SMD capacitors. The error seems to happen in the footprint generation but the kicad_sym file gets also corrupted with the respective symbol tag not being closed. I hope you find the time to take a look into it.
Best regards,
Christian
Fresh install using git clone (yesterday). Many other parts worked flawless.
JLC2KiCadLib C312983 C96123 -dir My_lib -schematic_lib My_Schematic_lib
Here is the error output
2022-12-19 16:18:34,584 - INFO - created 'My_lib/footprint/CAP-SMD_L7.3-W4.3-R-RD.kicad_mod'
2022-12-19 16:18:35,080 - INFO - creating schematic TAJE107M025RNJ_0 in My_Schematic_lib
2022-12-19 16:18:35,081 - INFO - creating library for component C312983
2022-12-19 16:18:35,576 - INFO - creating footprint ...
.local/lib/python3.10/site-packages/KicadModTree/util/geometric_util.py:327: UserWarning: Start and end point are not an same arc.
Extended line from center to end point used to determine angle.
warnings.warn(
2022-12-19 16:18:36,072 - ERROR - footprint handler, h_ARC: failed to add ARC
Traceback (most recent call last):
File ".local/lib/python3.10/site-packages/JLC2KiCadLib/footprint/footprint_handlers.py", line 218, in h_ARC
centerX = ((start[1] - end[1]) / (start[1] - midpoint[1]) * sq1 - sq2) / (
ZeroDivisionError: float division by zero
2022-12-19 16:18:36,073 - ERROR - footprint handler, h_ARC: failed to add ARC
Traceback (most recent call last):
File ".local/lib/python3.10/site-packages/JLC2KiCadLib/footprint/footprint_handlers.py", line 218, in h_ARC
centerX = ((start[1] - end[1]) / (start[1] - midpoint[1]) * sq1 - sq2) / (
ZeroDivisionError: float division by zero
2022-12-19 16:18:36,073 - INFO - creating 3D model ...
2022-12-19 16:18:36,878 - INFO - added [..]JLC2KiCad_lib/My_lib/footprint/packages3d/C1206.wrl to footprint
2022-12-19 16:18:36,880 - INFO - created 'My_lib/footprint/C1206.kicad_mod'
2022-12-19 16:18:37,374 - INFO - creating schematic GRM31CR61A107ME05L_0 in My_Schematic_lib
2022-12-19 16:18:37,375 - INFO - creating library for component C96123
2022-12-19 16:18:37,871 - INFO - creating footprint ...
2022-12-19 16:18:38,360 - ERROR - footprint handler, h_ARC: failed to add ARC
Traceback (most recent call last):
File ".local/lib/python3.10/site-packages/JLC2KiCadLib/footprint/footprint_handlers.py", line 218, in h_ARC
centerX = ((start[1] - end[1]) / (start[1] - midpoint[1]) * sq1 - sq2) / (
ZeroDivisionError: float division by zero
2022-12-19 16:18:38,360 - ERROR - footprint handler, h_ARC: failed to add ARC
Traceback (most recent call last):
File ".local/lib/python3.10/site-packages/JLC2KiCadLib/footprint/footprint_handlers.py", line 218, in h_ARC
centerX = ((start[1] - end[1]) / (start[1] - midpoint[1]) * sq1 - sq2) / (
ZeroDivisionError: float division by zero
Describe the bug
I am getting an error the error as described below
JLC2KiCadLib C85364 -schematic_lib ESD_C85364 4389ms ๎ณ Friday 17 June 2022 10:36:12 AM
2022-06-17 10:36:44,151 - INFO - creating library for component C85364
2022-06-17 10:36:45,340 - INFO - creating footprint ...
2022-06-17 10:36:46,364 - INFO - creating 3D model ...
2022-06-17 10:36:48,048 - INFO - added JLC2KiCad_lib/footprint/packages3d/SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BR.wrl to footprint
2022-06-17 10:36:48,050 - INFO - created 'JLC2KiCad_lib/footprint/SOT-23-6_L2.9-W1.6-P0.95-LS2.8-BR.kicad_mod'
2022-06-17 10:36:49,101 - INFO - creating schematic SRV05-4-P-T7_0 in ESD_C85364
Traceback (most recent call last):
File "/usr/local/bin/JLC2KiCadLib", line 8, in <module>
sys.exit(main())
File "/home/dhanish/.local/lib/python3.8/site-packages/JLC2KiCadLib/JLC2KiCadLib.py", line 129, in main
add_component(component, args)
File "/home/dhanish/.local/lib/python3.8/site-packages/JLC2KiCadLib/JLC2KiCadLib.py", line 38, in add_component
create_schematic(
File "/home/dhanish/.local/lib/python3.8/site-packages/JLC2KiCadLib/schematic/schematic.py", line 69, in create_schematic
handlers.get(model)(args[1:], kicad_schematic)
File "/home/dhanish/.local/lib/python3.8/site-packages/JLC2KiCadLib/schematic/schematic_handlers.py", line 289, in h_A
cx, cy, theta, deltaTheta = getCenterParam(match)
File "/home/dhanish/.local/lib/python3.8/site-packages/JLC2KiCadLib/schematic/schematic_handlers.py", line 254, in getCenterParam
h = c(1, 0, n - e, a - t)
File "/home/dhanish/.local/lib/python3.8/site-packages/JLC2KiCadLib/schematic/schematic_handlers.py", line 233, in c
o = acos(i / r)
ZeroDivisionError: float division by zero
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
It would be nice to be able to use the library for converting json files exported from easyEDA to create footprints and symbols for kicad.
This would also help developing the code since its possible to create custom footprints for testing.
Something in my workflow sometimes adds a new line at the end of the symbol library file.
It might be git or modifying the library in KiCad.
Because of the following line, the new symbol will be added outside the library structure and will not be visible in KiCad.
Describe the bug
Command crash after executing on single reference.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Generation of schematic and footprint
Additional context
python --version
Python 3.8.6rc1
Describe the bug
A clear and concise description of what the bug is.
there is no courtyard for any footprint
Also all footprints are labeled as THT (not a real problem but i noticed it when i was in 3D view )
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen. some courtyard on that layer
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Describe the bug
The parts C294679 and C17408 can be converted without error if they are put into different libraries. If they are in the same library then the library gets corrupted even though the import runs without error. If you open the schematic editor and try to add a component, kicad is showing the error "invalid symbol unit name prefix" . The error is shown only the first time when the symbol library is loaded. Kicad has to be closed and started again to see the error again. The order of the insertion is irrelevant. In combination with other components such as C84259, the error occurs only if the other component is converted last. The cause of the error is a missing brace that closes the previous symbol tag.
To Reproduce
Works as intended:
JLC2KiCadLib C17408 -dir My_lib_A -schematic_lib My_Schematic_lib
JLC2KiCadLib C294679 -dir My_lib_B -schematic_lib My_Schematic_lib
Also works as intended (C84259 component first):
JLC2KiCadLib C84259 C17408 -dir My_lib_A -schematic_lib My_Schematic_lib
JLC2KiCadLib C84259 C294679 -dir My_lib_B -schematic_lib My_Schematic_lib
Corrupts .kicad_sym file:
JLC2KiCadLib C17408 C294679 -dir My_lib_A -schematic_lib My_Schematic_lib
Also corrupts .kicad_sym file:
JLC2KiCadLib C17408 -dir My_lib_A -schematic_lib My_Schematic_lib
JLC2KiCadLib C294679 -dir My_lib_A -schematic_lib My_Schematic_lib
Also corrupts .kicad_sym file (reverse insertion order):
JLC2KiCadLib C294679 -dir My_lib_A -schematic_lib My_Schematic_lib
JLC2KiCadLib C17408 -dir My_lib_A -schematic_lib My_Schematic_lib
Also corrupts .kicad_sym file (C84259 component last):
JLC2KiCadLib C17408 C84259 -dir My_lib_A -schematic_lib My_Schematic_lib
JLC2KiCadLib C294679 C84259 -dir My_lib_B -schematic_lib My_Schematic_lib
Expected behavior
Loading the symbol library without error
It looks like there's a missing dependency on numpy -- installing on a fairly clean/empty python setup, the main script complains about not being able to import numpy. Manually installing it fixes the issue.
When using the preview of the JLCPCB assembly service some footprints are not positioned correctly.
This issue appears on footprints that have a silkscreen that moves the midpoint of the footprint away from the midpoint of the pads.
Part#: C2934560
After I moved the footprint midpoint to the centre of the pads.
The same problem appears on this USB-C connector, part# C2765186
I haven't tested this on any other than these two parts. I could not find a source on where the midpoint should be.
It would be useful to know which version I'm on. Maybe I should upgrade to a newer version, maybe not - who knows? I can't tell which version I'm running.
1.0.16
How / what
The merge doesn't work correctly when first running JLC2KiCadLib with a set of components, then adding components anywhere in in the list of parameters.
Result
At the end of the file, there's a end-paren ), but instead of removing it, then adding the new symbol, you get lines looking like this:
) (symbol ...
instead of
(symbol ...
)
As a result, KiCad doesn't pick up the added symbols, since they're outside of the (kicad_symbol_lib ...)
s-exp.
Removing the ) and placing it at the end makes the lib work, w/ KiCad finding the newly added symbol.
https://www.lcsc.com/product-detail/Power-Relays_Ningbo-Songle-Relay-SRD-05VDC-SL-C_C35449.html
https://www.lcsc.com/product-detail/Fuses_Littelfuse-0466005-NRHF_C57525.html
Arc conversion error
Could you fix this bug? Thank you very much!
It looks like the fix that was merged in issue #27 was lost; it's not present in the current symbol.py (and the problem occurs).
Sometimes JLC2KiCad_lib works great for me sometimes, however often it hangs after displaying a line like:
2022-10-09 09:57:00,231 - INFO - creating library for component C2325
It looks like it is this line of code that is responsible:
It tries to download a url like "https://easyeda.com/api/products/C23255/svgs"
Does JLCPCB not like this script, are they trying to block it?
Describe the bug
A clear and concise description of what the bug is.
for some ICs the footprint is not imported properly
To Reproduce
Steps to reproduce the behavior:
es8388 is the one from who i noticed , the corner pads turned out round for some reason
Expected behavior
A clear and concise description of what you expected to happen.
NORMAL QFP footprint
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Thanks for the awesome work!:)
Any plans to add support for exporting symbols in the new library format? Otherwise one cannot edit the symbol in KiCad, except when having a separate library file for each part (as far as I know).
And being able to export 3D models as .step files would be super useful, for exporting 3D models from KiCad into other tools like Fusion360 for 3D modelling cases.
Describe the bug
PCB cutout not included when creating footprint
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the lib to also be able to include cutouts in the parts
Using the --no_footprint
argument causes error 404.
Steps to reproduce the behavior:
Run the code with the following arguments:
JLC2KiCad_lib.py C1337258 C24112 -dir My_lib -schematic_lib My_Schematic_lib --no_footprint
Causes the following error:
2022-10-25 22:01:05,540 - INFO - creating library for component C1337258 Traceback (most recent call last): File "JLC2KiCadLib\JLC2KiCad_lib\JLC2KiCadLib\JLC2KiCadLib.py", line 134, in main add_component(component, args) File "JLC2KiCadLib\JLC2KiCad_lib\JLC2KiCadLib\JLC2KiCadLib.py", line 38, in add_component _, datasheet_link, _ = get_footprint_info(component_id) ValueError: not enough values to unpack (expected 3, got 0) 2022-10-25 22:01:09,648 - ERROR - create_footprint error. Requests returned with error code 404
Since JLCPCB wants LCSC part numbers in the BOM and it's one of the command line arguments, it might be beneficial to add that information to the symbol.
Hello,
I have notice a misconversion with some components but let's focus on a single one first --> C347186
Using the command:
JLC2KiCadLib C347186 -dir My_lib -symbol_lib My_Symbol_lib -footprint_lib My_FootPrint_lib -model_base_variable JLCPCB_3D_MODEL
Results in a successful conversion to a kicad_mod but the component is not in the correct orientation. See image below where you need to apply manually a rotation of 180ยฐ to have the component in the correct way.
After enabling some debug, I found out that the issue may come from here (footprint_handlers.py l.345):
def h_SVGNODE(data, kicad_mod, footprint_info):
[...]
if "STEP" in footprint_info.models:
get_StepModel(
component_uuid=data["attrs"]["uuid"],
footprint_info=footprint_info,
kicad_mod=kicad_mod,
)
By default, the model is STEP so the get_StepModel() function is called. The rotation and translation info is not passed as argument as the difference between the WRL mode for example.
Is there any reason why or it is simply not implemented yet ?
Describe the bug
Command crash after executing on single reference.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Generation of schematic and footprint
Additional context
python --version
Python 3.8.6rc1
Describe the bug
After importing one or more parts and editing or removing parts, new parts added doesn't show.
This is probably the same issue as #45
To Reproduce
Steps to reproduce the behavior:
LCSC part # that caused the issue
Any part#
Arguments used for the execution
$ JLC2KiCadLib C599645 -dir ~/Documents/CodeWorkspace/myCAD/KiCadLibraries/JLC2KiCad -symbol_lib JLC2KiCad-symbol -footprint_lib JLC2KiCad-footprint
Then after deleting or editing a part using the Symbol Editor new parts added isn't shown either in the Symbol Editor or is selectable in 'Add a symbol'.
Expected behavior
A clear and concise description of what you expected to happen.
Parts can be added, edited or deleted as usual.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
After adding a part kicad_sym has an erroneous ')' as shown.
New part in shown case is "C0603C104J3RAC7867_0_1" and is the last part in the file.
...
)
(property "LCSC" "C599645" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
) (symbol "C0603C104J3RAC7867_0_1"
(polyline
(pts
(xy -0.5080010160020321 -2.0320040640081283)
(xy -0.5080010160020321 2.0320040640081283)
...
After removing the parentheses it works as intended. ie
...
)
(property "LCSC" "C599645" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "C0603C104J3RAC7867_0_1"
(polyline
(pts
(xy -0.5080010160020321 -2.0320040640081283)
(xy -0.5080010160020321 2.0320040640081283)
...
KiCad info:
KiCad x86_64 on x86_64
Version: 7.0.6-7.0.6~ubuntu22.04.1, release build
Libraries:
wxWidgets 3.2.1
FreeType 2.11.1
HarfBuzz 6.0.0
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.15
Platform: Linux Mint 21.2, 64 bit, Little endian, wxGTK, cinnamon, x11
Build Info:
Date: Jul 7 2023 02:32:39
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.2
Curl: 7.88.1
ngspice: 38
Compiler: GCC 11.3.0 with C++ ABI 1016
Build settings:
KICAD_SPICE=ON
Thanks
/jon
Describe the bug
I'm using a Micro USB Plug JLC#C505111
. I do have a working footprint from the Kicad Standard Library for comparison.
The Kicad Footprint is Connector_USB:USB_Micro-B_Molex-105017-0001
Now the EasyEDA-Converted footprint is missing a slot which goes through the PCB.
EasyEDA Preview shows the correct footprint:
https://jlcpcb.com/partdetail/Molex-1050171001/C505111
However the downloaded footprint is missing the mentioned slot (Pad 8 on the EasyEDA preview):
Another issue is that the round holes in the back (Pin6 and Pin7) also do not show up on the 3d Viewer so it's uncertain if those will get manufactured too.
I just started using this tool and I am very pleased you made the effort to create such a useful program.
So thanks very much and thanks for looking into this issue ;-)
The issue description is a little confusing. What's happening is:
.pretty
to contain a bunch of .kicad_mod
files for footprintsxxx.pretty
, but instead as xxx
So -- I typically use JLC2KiCadLib -symbol_lib lcsc -footprint_lib lcsc.pretty --skip_existing ....
which puts things in a lcsc.pretty
directory (good), I set up the footprint library with name lcsc
.. but the symbol footprint reference looks like lcsc.pretty:foo
when it should be lcsc:foo
.
This is all just terrible convention, and can be fixed by just naming the symbol library "lcsc.pretty" (I think?) but I just hacked this locally to strip .pretty
if it's present on the footprint library name in the symbol library.
I'm not sure if I got this right but passing -logging_level DEBUG
didn't give me debug output on the console.
I changed this line from handler.setLevel(logging.INFO)
to handler.setLevel(logging_level)
and then it worked as expected.
I just installed the latest version via pip and while its awesome to see that the symbols are stored now in the new KiCad library format, I also noticed some urgent issues, making it currently impossible to use the plugin:
2022-04-08 13:32:35,499 - INFO - created 'JLC2KiCad_lib/footprint/FS-1340.kicad_mod'
2022-04-08 13:32:35,846 - INFO - creating schematic FS-1340_0 in default_lib
2022-04-08 13:32:35,849 - INFO - creating library for component C2979183
2022-04-08 13:32:36,260 - INFO - creating footprint ...
Traceback (most recent call last):
File "/usr/local/bin/JLC2KiCadLib", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/JLC2KiCadLib/JLC2KiCadLib.py", line 128, in main
add_component(component, args)
File "/usr/local/lib/python3.9/site-packages/JLC2KiCadLib/JLC2KiCadLib.py", line 26, in add_component
footprint_name, datasheet_link = create_footprint(
File "/usr/local/lib/python3.9/site-packages/JLC2KiCadLib/footprint/footprint.py", line 27, in create_footprint
footprint_name, datasheet_link, assembly_process = get_footprint_info(component_id)
File "/usr/local/lib/python3.9/site-packages/JLC2KiCadLib/footprint/footprint.py", line 136, in get_footprint_info
response["data"]["componentPageInfo"]["list"][0]["componentModelEn"]
IndexError: list index out of range
Describe the bug
The function of pin 1 and 3 are swapped when I import component C12087.
In EasyEDA, the pin assignment is:
Pin 1 - GND
Pin 3 - In
Those two pins are swapped around in the KiCAD library
(pin unspecified line
(at -12.7 1.27 0)
(length 5.08)
(name "In" (effects (font (size 1 1))))
(number "1" (effects (font (size 1 1))))
)
(pin unspecified line
(at 0.0 -6.35 90)
(length 5.08001016002032)
(name "GND" (effects (font (size 1 1))))
(number "3" (effects (font (size 1 1))))
)
To Reproduce
Steps to reproduce the behavior:
JLC2KiCadLib C12087 --skip_existing -dir lib -symbol_lib test2 -footprint_lib test2
JLC2KiCadLib --version
JLC2KiCadLib 1.0.30
Expected behavior
That the pins aren't swapped.
Additional context
I have verified that the imported pin assignment would result in an incorrect assignment to the footprint (i.e. that the footprint pads aren't also swapped)
I have tested JLC2KiCadLib 1.0.30 and 1.0.21
python --version
Python 3.12.2
I'm running from this docker file; if you think it is useful you are very welcome to add it to the project!
https://github.com/carlsa/JLC2KiCad_docker
I tried to download a part and its 3D model
python JLC2KiCad_lib\JLC2KiCad_lib.py -dir jlcparts C475118 --model_path_relative
Which gave me this output:
2022-01-13 10:36:10,531 - INFO - creating library for component C475118
2022-01-13 10:36:10,889 - INFO - creating footprint ...
2022-01-13 10:36:11,501 - INFO - creating 3D model ...
2022-01-13 10:36:11,846 - INFO - added jlcparts/footprint/packages3d/KF141V-2.54-6P.wrl to footprint
2022-01-13 10:36:11,848 - INFO - created 'jlcparts/footprint/KF141V-2.54-6P.kicad_mod'
2022-01-13 10:36:12,200 - INFO - creating schematic KF141V-2.54-6P in default_lib
2022-01-13 10:36:12,201 - INFO - writing in jlcparts/Schematic/default_lib.lib file
If I use the .wrl file in KiCAD it is not shown and no error is given. If I open it in Windows using Print 3D I get an "VRML analysis error".
The part opened in an text editor is empty appart from some header comments:
#VRML V2.0 utf8
#created by JLC2KiCad_lib using the JLCPCB library
#for more info see https://github.com/TousstNicolas/JLC2KICAD_lib
After running JLC2KiCadLib C238131 --model_path_relative, got following exception
2022-04-09 22:02:46,085 - INFO - creating library for component C238131
2022-04-09 22:02:48,175 - INFO - creating footprint ...
Traceback (most recent call last):
File "c:\program files\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\program files\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\www\AppData\Roaming\Python\Python38\Scripts\JLC2KiCadLib.exe\__main__.py", line 7, in <module>
File "C:\Users\www\AppData\Roaming\Python\Python38\site-packages\JLC2KiCadLib\JLC2KiCadLib.py", line 128, in main
add_component(component, args)
File "C:\Users\www\AppData\Roaming\Python\Python38\site-packages\JLC2KiCadLib\JLC2KiCadLib.py", line 26, in add_component
footprint_name, datasheet_link = create_footprint(
File "C:\Users\www\AppData\Roaming\Python\Python38\site-packages\JLC2KiCadLib\footprint\footprint.py", line 27, in create_footprint
footprint_name, datasheet_link, assembly_process = get_footprint_info(component_id)
File "C:\Users\www\AppData\Roaming\Python\Python38\site-packages\JLC2KiCadLib\footprint\footprint.py", line 136, in get_footprint_info
response["data"]["componentPageInfo"]["list"][0]["componentModelEn"]
IndexError: list index out of range
Running KiCad version (6.0.5-0), release build
I'm using part number C841192
$ JLC2KiCadLib C841192
If I import the schematic library as-is, I get:
If I modify the date from 05052022
to 20211014
, it works fine.
If I modify the date to be 20220515
(as an example), KiCad complains that I need a newer version of KiCad in order to load the file.
The change was introduced here but I'm not entirely sure why.
Is your feature request related to a problem? Please describe.
Working on my PSP Consolizer project im trying to use path variables to keep my project portable. I'm using your great tool to allow me to use JLCPCB components however the paths to the 3D models appear to be absolute. This means to keep things portable i have to edit them to use variables.
Describe the solution you'd like
Some mechanism (not entirely sure how!) to allow path variables to be used for 3D models.
Describe alternatives you've considered
Manually editing paths after every component import.
Just wanted to add thanks for this brilliant tool, its been very helpful.
Describe the bug
extra drive prefix was added to the filepath of the 3d model in the footprint file. It looks that the current path is used as a prefix instead of the absolute path as specified on the command line. Maybe check if it's an absolute path or relative path and act accordingly when composing the path to be entered in the footprint file pointing to the wrl file.
Describe the bug
I am using a custom footprint library, lets call it Custom
. I would expect the Footprint property of the symbol to reflect this change. For example Footprint: Custom:. But instead its still footprint:.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect it to set footprint library correctly.
Expected, with library _jlcpcb
Additional context
This might not technically be a bug since the footprint library name is again chosen within KiCad. But it makes more sense to me to default to the name given to the library when running the script
The arcs for the schematic and footprint are rarely properly placed. It needs to be correctly handled.
I pushed some work on the Fix_ARC branch, but I cannot figure out how to draw them, there are always components for which it does not work.
For now, I tried to use the GetCenterParam function, which is reversed from https://easyeda.com/editor/6.5.5/js/editorPCB.min.js
This function seems to return the coordinates of the center (or possibly the midpoint in some occasions ? ), and two angles, but when using theses to calculate the start point, end point and center, the result is inconsistent, sometimes it works, sometimes it doesn't.
The schematic equivalent is more consistent and seems to have less issues.
The following components have an arc in their footprint and could be used to test:
C55684 C185659 C86002 C312983 C1341701 C307522 C689358 C403695 C602208 C152951 C688068 C163798 C661330
This concern the h_ARC function in the footprint :
JLC2KiCad_lib/JLC2KiCadLib/footprint/footprint_handlers.py
Lines 174 to 278 in b5c38c2
It would be really nice if the part was added onto an existing part library, rather than added to a directory of part libraries.
the Kicad library format for kicad6 is the same sexpr format that the footprints use.
Additional context
Add any other context or screenshots about the feature request here.
Is it possible to import from JLC also the assembly type tag? aka SMD or wave soldering ?
Also if it is a Basic part or not? this can really help a lot.
Also but this is more like a side topic i noticed that every part comes with its own footprint , even tho that footprint is a standard one this may make the lib grow in size very fast due to a lot of duplicates.
BTW i also found it a bit unclear how the parameters in the command line work so maybe a bit more explanations there would be nice
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.