When i first answered i looked at my jst scripts. This scripts are done in the way you did.
But now that i looked at my molex script i must say i like it more if the name is generated using a format string.
This way one can’t make a mistake in one of the models. If one model has the correct name, all of them have. (You then only need to check the one with the lowest pin count and the one with the highest count.)
For now i will reorganize my own scripts. This way there is no danger in destroying anything that is not under my control. edit: or better worded: I don’t like the probability of destroying the work of someone else.
(Also i’m not 100% sure everything that has been done recently has been merged into your repository. I don’t want to move files that have already changed in someones personal repo.)
perhaps we should consider moving the script talk over to
this way does ofcourse make much better sense for the connector scripts
the other more “manual” way was mainly ment for the other packages with more changing parameters and names than pin numbers
it wasn’t you and none on this thread …
Moreover sometimes the scripts are working fine with a specific release of FC and release of cadquery, but with different FC (OCC) or CQ they don’t fully build…
I noticed that nearly none of my scripts work under freecad 0.17.
There seems to be a problem with the cadquerry selectors in this version.
But freecad 0.17 is a nightly build so some bugs are to be expected.
The problem is the workbench switch. (This explains why generating one model on its own did not crash freecad.)
I wonder if it is linux that keeps freecad alive or if there is a difference in behavior between freecad 0.15 and 0.16.
To ensure that my models are usable i opted to use version 0.15 under windows.
Normally i use 0.17 under linux for designing parts. (I like what has been done with the part design workbench.)
But (some of) my scripts only run under 0.15 or 0.16 because of some error with cadquerry selectors in version 0.17.
Scripts for phoenix contact connectors look good now. For now i only generated the 2 pin versions for testing purposes.
I let my PC generate the rest of the models over night. (If everything goes to plan i will make a pull request tomorrow.)