TousstNicolas / JLC2KiCad_lib

JLC2KICAD_lib is a python script that generate a component library (schematic, footprint and 3D model ) for KiCad from the JLCPCB/easyEDA library.
MIT License
228 stars 42 forks source link

PCB cutout not included #41

Open ReinBentdal opened 1 year ago

ReinBentdal commented 1 year ago

Describe the bug PCB cutout not included when creating footprint

To Reproduce Steps to reproduce the behavior:

  1. Load part C559118 in EasyEDA, use 3D viewer to see a cutout in the part
  2. Create footprint with this lib, and load into KiCad. There is no hole

Expected behavior I would expect the lib to also be able to include cutouts in the parts

Screenshots EasyEDA:

image

KiCad:

image
Trajelectory commented 1 year ago

i'm not sure it's an issue with this script but with Kicad himself.

TousstNicolas commented 1 year ago

Hi, thanks for reporting this.

It is indeed missing as EasyEDA consider the cutout as not just a regular shape on the Edge.Cuts layer, but as a solidregion which was not handled.

I added a handler for the simple polygons cutouts, unfortunately I do not have the time to look deeper into it and try to understand the logic of how EasyEDA parse the more complex shapes.

The polygons function correctly once they are placed on a board, but the 3D preview may not display correctly in some instances. I am unsure of the reason for this issue :

footprint 3D preview : image

PCBnew 3D viewer : image

Help would be greatly appreciated to handle more complex shapes and solve the previous issue. The component C2687297 contains shapes that can be used to work on this.

If you want to help, the current handler can be found in the footprint handler file : https://github.com/TousstNicolas/JLC2KiCad_lib/blob/fd492d0f21c526d10292b3d26dc50af3f3c9b13f/JLC2KiCadLib/footprint/footprint_handlers.py#L329-L337

ReinBentdal commented 1 year ago

Thanks for you effort! I will check out the new version when I have time. Maybe if I have time in the future, and feel the need, I will investigate