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

Remapping pcb footprint <-> pcbdraw footprints instead of reference <-> pcbdraw footprint #66

Open
Salamandar opened this issue May 21, 2021 · 3 comments

Comments

@Salamandar
Copy link

Salamandar commented May 21, 2021

For now I'm forced to list every footprint on the pcb (30 resistors, 30 capacitors) with a remapping for each. That's a bit error-prone.

What I have in mind is something like :

{
    "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder": "Resistors_SMD:R_0805_2012Metric",
    "Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder": "Capacitors_SMD:C_0805_2012Metric"
}

That could be named as a "compatibility table" between PCBnew lib and PCBDraw lib. That way, a remapping can still be used.

Maybe that could support globs ?

@yaqwsx
Copy link
Owner

yaqwsx commented May 26, 2021

The original idea for remapping is to e.g., allow for different LED colors. What you are doing is rather hacking the feature - what you probably want is to create a symlink between the library to support the new naming. Or create a new library that reflects the naming changes in the KiCAD library.

When the library is fixed, I don't see much of a point in remapping footprints. Instead I am thinking about introducing more general remapping for the most complicated cases: the user supplies a Python function that receives KiCAD footprint (with all text fields and other properties) and the function remaps the footprint. In that ways, we could, e.g., change the color of LEDs automatically.

@Salamandar
Copy link
Author

What you are doing is rather hacking the feature - what you probably want is to create a symlink between the library to support the new naming.

Exactly.

Also, users may use custom components but would still want to use pcbdraw-lib without having to rename a bunch of files.

@yaqwsx
Copy link
Owner

yaqwsx commented Mar 16, 2022

For v1 I decided to preserve the symlinks, but, create a basic PcbDraw library that will be the source of the truth. All other libraries will just symlink these models. The code for that was introduced in fead173 and the library will be migrated in the near future.

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

2 participants