Skip to content

infeeeee/DynFreeCAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynFreeCAD

Dynamo nodes for the FreeCAD API

Early, work in progress, PRs are welcomed!

Requirements

Installation

  • 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!)

FreeCAD API in Dynamo

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.

Compatibility matrix

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

Usage and tips

⚠️As DynFreeCAD is under developement, it's possible that some screenshots and documentation are outdated⚠️

Detailed documentation is in the wiki.

See Examples folder for some Dynamo documents.

Load the FreeCAD API

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 from Examples\ApiLoaders folder.

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

Using with the FreeCAD Gui visible

Soon...

Currently it's not possible. Run the graph, save the file, than open it in FreeCAD.

Open or create a new document

Always start with these nodes. Add the path to the bin folder of FreeCAD.

Initialize and open a document

Manage documents

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.

Documents

Manage properties

Properties

Python script

You can use the FreeCAD API in a Python Script this way:

Api

See UseTheApi.dyn in Examples folder.

Troubleshooting

If you have some problems, open an issue!

You can also ask questions on the related project's forums:

Alternativ graphical programing interfaces for FreeCAD

License

MIT

Releases

No releases published

Packages

No packages published

Languages