-
Notifications
You must be signed in to change notification settings - Fork 176
Create some sane external behaviour of the scripts #55
Comments
Seems like a good idea. Currently i am a bit short on time to look into it in great detail. If i don't report back in the next few weeks give me another notification. (I might forget about this otherwise.) |
Hi @pointhi I'm also short of time at present, but here are some initial thoughts - probably raising more questions than giving answers 😞
|
After playing with my latest contributions i would suggest the following: One yaml file responsible for configuration stuff (KLC settings)
Another yaml file then holds the dimensions of the parts to be produced. (I wrote it such that there could be multiple of these files.) This should allow us to easily change the generator scripts to conform with newer versions of the KLC Edit: the config file (KLC) should be select-able via an optional command line option. I chose |
Keen on the idea of sharing input between footprints and 3d; a 1:1 alignment is the policy at the moment anyway. |
is there any news on this? where is the best place for this to get started? so if iam understanding this correct - currently i have to add the parameters for the 3d package also to the script at https://github.com/easyw/kicad-3d-models-in-freecad/blob/master/cadquery/FCAD_script_generator/QFN_packages/cq_parameters.py |
Yea the contribution page could use a bit of rework. (but we at least mention the scripts there so it is not nothing ;) ) If you want to add the 3d model then the place you list is the correct one. This might not be the best place to ask regarding something to do with the policy of the official lib or with the 3d models. (A better place would be one of our repos, or even the forum as i am quite easily reachable that way.) |
@poeschlr you mean the official library repos? |
I created some initial proposal: kicad-python/wiki/new-Footprint-wizard-Plugin-System very rough, many things to think about. It should incorporate things like config_KLCv3.0.yaml but in a more flexible way. For example, support name overwrites where people can specify how a resistor name should be built upon given values (IPC naming convention). Beside footprints, we also need to think about how to handle symbols and 3d-models in the future. I would like to build a system where we can generate a whole custom library using cmake in the end. And the same script can also be used in the "footprint wizard" as well. |
Is .yaml something we should use with the 3D models as well? |
A direct conversion is not always possible. (At least not easily) |
Just looked through this discussion and the proposal by @pointhi, all looks a good direction. However, it seems there is not much movement in this direction at the moment. I also wonder what the best approach is here. Right now, it seems the plan is to:
However, it seems an attempt is made to solve all four of these at the same time, which makes it quite a complex thing, which might be causing the lack of movement. Would it make sense to leave 3. and 4. for later and focus on 1. and 2. instead (keeping 3. and 4. in mind, of course)? So just keep using the current KicadModTree for output and the commandline for calling scripts, but define better helpers to reduce script boilerplate? Doing so would probably simplify the problem, but solving 1. and 2. would allow any effort spent on (new) scripts right now to be more future-proof, and a lot easier to adopt once 3. and 4. are also implemented. It would not even be needed to convert all existing scripts right away (just a few to validate the approach, probably), but having a single "blessed" style for new scripts would already greatly help new contributors. |
@jkriege2, @hackscribble, @SchrodingersGat, @poeschlr
We are a small group of people which created most of the script generated parts inside KiCad. First of, thanks for using my stuff ^^.
In contrast to the framwork itself, I'm merging contributions into scripts with almost no review. Simply because most scripts are used mostly a few times by mostly the same people.
This results in some collection of code, where it's hard to use/change existing scripts, as well as the invention of scripts which get better placed into the framework itself (like the KLC definitions).
I would like to start a discussion about how much we can unify our development of scripts, to help new contributors as well as ourself.
The main proposal could be described as separate code and data. This is a main statement when talking about secure coding, but has other reasons as well. Everyone invented his system to get the data into the system. (I invented at least 3 different ones ^^). This means people can not simply use those data for other purposes (like generating 3d-models), and people are required to decrypt the way of data storage to push their own values into the system.
I added ModArgparser.py as my proposed fix for this problem into the framwork. Although no one really uses it right now beside me. This class would allow us to unify the external behaviour of all the scripts, means everyone can push data to it using .csv or .yml files. Furthermore, every script get's the same comandline interface, for interaction.
I would ask about your opinion about those problems, as well as what are you thinking about my proposal. I'm especially thinking about the usage of ModArgparser for 3d-file generation as well. This would allow us to use the same part definitions for both tasks.
The text was updated successfully, but these errors were encountered: