FreeCAD Simulator
github.com
github.com
> I’ve made this horrible hack to make it easier to debug my Python macros that run inside FreeCAD and design little boxes. It means that I can use all the lovely debugging features of Visual Studio Code to find out why my code don’t work. The hack takes the form of a few simple Python objects that fake part of the FreeCAD ones and allows your macros to run in any Python environment you fancy.
> If you like the idea of writing Python code that produces physical artefacts you might want to take a look at it.
FTR, There are amany interesting articles covering FreeCAD use for 3D Printing on Rob Miles' blog.[2,3]
[0] https://twitter.com/robmiles/status/1327700851499147265
[1] https://www.robmiles.com/journal/2020/11/5/freecad-simulator...
If you want an OpenSCAD-like workflow, but in Python and producing CAD (Brep) files, then cadquery 2 is progressing very quickly. They now have assembly support, so constructing a multi-solid part (as a STEP file) that can be dragged and dropped into FreeCAD is quite easy.
OpenSCAD's DSL is a rather feeble attempt at a functional programming language, brings in almost no added value compared to - say - python and worst of all is very limited and has no library ecosystem.
Do yourself a favor and learn one of the python-based solutions that end up calling the same computational geometry engine (namely CGAL).
SolidPython has downsides though:
- it is a giant PITA to install: you have to deploy that monstrous wart called "conda" which will gobble up 6G of your drive and fricking patch you .bashrc, all of this just so you can install solid
- it lacks the following feature that native openscad has: "edit model source code with <insert fave editor here> and openscad will recompute the model automatically every time you save.
There's a way to implement that feature with an additional package (solidpython-reloader), but at that point, you've lost 80% of your target audience.