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

Global Lookup Table #24

Open
Electro707 opened this issue Jan 24, 2022 · 3 comments
Open

Global Lookup Table #24

Electro707 opened this issue Jan 24, 2022 · 3 comments

Comments

@Electro707
Copy link
Contributor

Kind of related to yaqwsx/PcbDraw#66, and the change will ultimately need to be done in pcbdraw, but I am creating this Issue here as it relates to this repository.

Instead of symlinking footprint names, wouldn't it be better to implement some kind of lookup table per footprint library that pcbdraw will read and link component. Symlinks eventually become quite cluttered, especially with footprint renames and supporting older versions of KiCAD's footprint library:
image

@yaqwsx
Copy link
Owner

yaqwsx commented Feb 15, 2022

What library table/format do you propose?

I think a better solution would be to preserve the symlinks but change the library structure:

libraries/
├── PcbDraw/
│   ├── Resistors
│   ├── Capacitors
│   └── ...
├── KiCADv5/
│   ├── Resistors.pretty
│   └── ...
└── KiCADv6/
     ├── Resistors.pretty
     └── ...

Where PcbDraw library is the only library containing actual images and all the other libraries are only collections of symlinks. What do you think?

@Electro707
Copy link
Contributor Author

I was originally thinking just a json file with the format

  "KICAD_NAME1": "SVG_PATH1",

The main reason I am suggesting a single lookup file over symlinks is that it allows easier changes over time and having one centralized location to know what drawing a footprint is referencing to.

The symlink structure you suggested I also like, and will hopefully clean up and separate the drawings folder so it's not cluttered.
I am personally indifferent to either method.

@n-i-x
Copy link

n-i-x commented May 20, 2023

Another argument in favor of the footprint remapping suggestion is for making this library work with EasyEDA designs.

I'm able to generate SVG from KiCad PCB converted with https://wokwi.com/tools/easyeda2kicad which uses https://github.com/wokwi/easyeda2kicad. But all of the converted footprints have library names like easyeda:R0402. I've been working around this by creating symlinks in an easyeda library to KiCad footprints, but it would be pretty nice if I could just have an eadyeda map file I can pass in and it just performs magic.

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

3 participants