andete / madparts

A functional footprint editor.
GNU General Public License v3.0
80 stars 8 forks source link

Reusing code / generating multiple footprints per file #80

Open matthijskooijman opened 9 years ago

matthijskooijman commented 9 years ago

I just stumbled upon madparts and it seems to close to what I was looking for. IIUC, now every part needs a full coffeescript program to generate. This seems a waste, since a lot of parts are really similar - a single program could just generate all DIP-xx footprints. This would mean you can just trivially generate all DIP footprints that are in use, and also easily add a new one.

I could see two ways to handle this:

Ideally, you'd have both options: Have a single DIP file that contains a loop, in which it calls to a generic_dip library function to do the actual work. This means only 1 or 2 files involved, but also easy reuse of code later.

You can also imagine multiple levels of reuse and generalization - the pins of a DIP footprint really are just a two-dimensional pin array with a particular pitch, and could reuse the same code as for a simple pin header footprint.

andete commented 9 years ago

Hey Matthijs,

I fully agree some kind of parametric footprints would be really nice. Option one has already been discussed once in another comment. I'm not so keen on having multiple parts generated by one file as I tend to more specific footprints rather then less specific ones lately. Another option is having the parametric part and having to fill in the parameters on export.