Dynamo nodes for the FreeCAD API
Early, work in progress, PRs are welcomed!
-
Dynamo 2.8+. Download from dynamobuilds.com
- Select one of DynamoCoreRuntimes. Download, extract, you will find DynamoSandbox.exe inside
-
FreeCAD built with python 3.8:
-
Recommended: Daily 0.19 Conda build: Release 0.19_pre · FreeCAD/FreeCAD · GitHub (Python 3.8.6)
-
If daily builds are down: Release FreeCAD Win Conda PY3.8 · sgrogan/FreeCAD · GitHub The 'site_packages1' version works better. (Python 3.8.1)
-
You can build yourself a different verision, follow FreeCAD's doumentation
-
-
Clone this repo
-
Open DynamoSandbox.exe
-
Settings ➡ Manage Node and Package Paths... ➡ Add a new folder with ➕, select the
Dyf
subfolder from where you cloned ➡ Accept changes -
(Dynamo package manager soon!)
Dynamo 2.7 added support for CPython 3.7, so FreeCAD can be called inside dynamo. Everything should work inside Python nodes, I want to add more common FreeCAD commands as nodes, so graphical programming can get a boost in FreeCAD.
Unfortunately due to a bug in Dynamo 2.7, these nodes are only usable in 2.8 with Python 3.8.
Table updated: 2020-11-13
Dynamo | Stable Dynamo | cPython in Dynamo | FreeCAD API | DynFreeCAD | Revit |
---|---|---|---|---|---|
2.6 | ✔ | ❌ | ❌ | ❌ | 2021.1 |
2.7 | ✔ | 3.7.3 | ✔ | ❌ | ❌ |
2.8 | ✔ | 3.8.3 | ✔ | ✔ | ❌ |
2.9 | ✔ | 3.8.3 | ✔ | ✔ | ❌ |
2.10 | ❌ | 3.8.3 | ✔ | ✔ | ❌ |
Detailed documentation is in the wiki.
See Examples
folder for some Dynamo documents.
There is a bug in Dynamo, so you cannot load FreeCAD libs on latter nodes, unless they were loaded in a first python node. So before using DynFreeCAD, you have to load libraries:
-
Open
ApiLoader.dyn
fromExamples\ApiLoaders
folder.- If you want to use Arch and Draft nodes open
ApiLoaderArch.dyn
instead. They require other dependencies, see Arch and Draft Setup in the wiki
- If you want to use Arch and Draft nodes open
-
Click
Run
-
If no errors given, just close this graph. Do not close Dynamo, only close the graph!
-
You can now start working with the FreeCAD api, create new graphs, or open other examples.
You have to do this every time you want to use the FreeCAD api in Dynamo. I hope sometimes this will be fixed, or at least I find a better workaround.
Soon...
Currently it's not possible. Run the graph, save the file, than open it in FreeCAD.
Always start with these nodes. Add the path to the bin
folder of FreeCAD.
Use the ouput of the OpenDocument or CreateDocument nodes output if you just work on one document. The bottom nodes just showing how these nodes are connectable.
You can use the FreeCAD API in a Python Script this way:
See UseTheApi.dyn in Examples folder.
If you have some problems, open an issue!
You can also ask questions on the related project's forums:
-
GitHub - microelly2/NodeEditor: Node editor for FreeCAD with PyFLow
-
GitHub - nortikin/sverchok: Sverchok Blender addin with FreeCAD support
MIT