3D new library for Mechanical CAD exporting and enclosure design

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.)

file_name="Molex_PicoBlade_53261-"+ ('%02d' % num_pins) +"71_" + ('%02d' % num_pins) + "x" + ('%.2f' % pin_pitch) +"mm_Angled",

Also just think how much information you need to enter for my phoenix scripts. There are more than 500 connectors generated.

Hehehehehehehe… :+1:

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 :slight_smile:

1 Like

it wasn’t you and none on this thread :wink:
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…

going back to 3D models… new PR for QFP


3 Likes

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.

Pull request for Molex connectors:


4 Likes

It’s like a bee-hive in here with all that action.
Anyhow - cool work guys (& gals).
:+1:

2 Likes

All that was needed was a go for adding step files :slight_smile:

2 Likes

@Rene_Poschl these models are great (and so much better than the official Molex models!)

Can’t wait for more connector models to be added.

The work you guys have done on material modeling and step file-size reduction is really awesome :slight_smile:

Another pull request:



I finally found what crashed freecad 0.15 on my windows pc. Don’t use the following (on a slow pc.)

Gui.activateWorkbench("PartWorkbench")
Gui.SendMsgToActiveView("ViewFit")
Gui.activeDocument().activeView().viewAxometric()
2 Likes

strange …

you may try to use:

FreeCAD.activeDocument().recompute()
FreeCADGui.activateWorkbench(“PartWorkbench”)
FreeCADGui.SendMsgToActiveView(“ViewFit”)
FreeCADGui.activeDocument().activeView().viewAxometric()

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.

you can add this to close FC from inside python

sys.exit() #to create model and exit

16 is much better than v15 on all platforms. I am expecting v17 to be getting stabilised for release soon

The problem is that version 0.16 seems to have some bugs when exporting step.
https://forum.freecadweb.org/viewtopic.php?f=3&t=20455

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.

And another one done. (JST EH)



2 Likes

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.)

2 Likes

remember crease angle :wink: