bennymeg / Fabrication-Toolkit

An JLC PCB Fabrication Plugin for KiCad
Apache License 2.0
280 stars 49 forks source link

[Request] Use user-defined layer names in Additional Layers box #160

Open TheColorman opened 2 months ago

TheColorman commented 2 months ago

When adding layers to the Additional Layers text box, the titles have to be the standard KiCad layers names. This makes sense for most layers, but custom user-defined layers (and sometimes even normal layers) usually have custom names. E.g. in this example, the User.1 has been renamed F.glue in Board Setup, but you still need to search for User.1, and including F.glue does not work: image image

The only reason for this is because layer_info is indexed with 0 instead of 2 in these two sections of code: https://github.com/bennymeg/Fabrication-Toolkit/blob/a3081153e625f9ea46a3bdd4d4cc74139e2fb40b/plugins/utils.py#L75-L78 https://github.com/bennymeg/Fabrication-Toolkit/blob/a3081153e625f9ea46a3bdd4d4cc74139e2fb40b/plugins/process.py#L77

I kept the KiCad layer names when adding the util in #152, but I think it would be more useful to be able to use the user-specified layer name directly. In theory changing these two lines should do it without affecting gerber generation.