3D new library for Mechanical CAD exporting and enclosure design

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:

I have already merged your changes to my branch. These should be created with the crease angle.
Both jst xh and eh also are created with the exporter using the crease angle.

1 Like

@Rene_Poschl very nice additions! :slight_smile: do you have any plans to include Jst GH sometime in the future?

I think the next ones i make will be jst ph because some of my pcbs use them and i will order a bunch of them maybe this weekend.

I don’t like to make models of parts that i don’t have lying around.
(Not all measurements are in the data-sheet and it is a lot easier if i can measure the original component.)

Edit: but first i will finish the xh series. (The footprints for the compact version are missing. My scripts can already generate the 3d files.)

Also i think it will take me a while to create the pull request(s) for the phoenix contact connectors.

Perhaps it should be considered by the devs to revise the whole “you need wings3d to make 3d models for kicad” when installing kicad. Some info regarding freecad, stepup and the scripts could come in handy for beginners…
Opinions?

3 Likes

I would even go further and say the use of wings3d and similar tools should be discouraged. 3d models that can not be used in an mcad tool are useless. (One can not go from a mesh to step. Only the other way round is possible. Or am i wrong here?)

2 Likes

I agree - Wings3D and other visual modeling software need to die. I don’t even encourage people to use my old VRML scripts now because although they produce pretty objects they’re 100% useless for MCAD. Parametric generation of STEP models is good though; I often find the manufacturer’s models are too complex and only slow down my MCAD software.

For a longer term integration project perhaps adding the scripts to the footprint generator wizards could make sense. This way a 3d model could be made using only a few extra parsmeters

Well not only that but in most cases they have a very restrictive license.

With the plus that script/parametric models, especially ones driven by a table are much easier to validate against manufacturer dimensions.

2 Likes

Interesting, this is a fix for another issue with v15, so how is v17 avoiding the same problem?

We should stop shipping Wings with the KiCAD installer (at least this is the case still on Windows)

2 Likes

I’m not sure if v0.17 has this problem or not. (I’m not even convinced my scripts trigger this bug.)
But better save than sorry.