Giter Club home page Giter Club logo

dynfreecad's Introduction

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

dynfreecad's People

Contributors

infeeeee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynfreecad's Issues

Cannot load the Part Module in Python

Hello,
Everything is installed (Dynamo 2.8, FC 0.19 with python 3.8 etc) and seems running well except the example "UseTheApi.dyn" is reporting that the Part module could not be loaded. I have specified the correct FreeCADBinPath (on my computer it is C:\Program Files\FreeCAD 0.19\bin).
Also, as you see in the second image below, if I simply short-circuit the python script and simply save the newly created document, it does so correctly (obviously with no geometry in it).
What am I missing to enable Dynamo Python to find the 'Part' module?
ErrorScreenShot
image

FreeCAD Forum Topic

Please open a new topic to FreeCAD Forum and share your works with other people.

Dynamo package manager

The README mentions this. I added it as an issue so people know the status/progress of it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.