Visual Programming with Dynamo atop Freecad API?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Visual Programming with Dynamo atop Freecad API?

Post by saso »

Could this be a simple way to connect FreeCAD and Dynamo? At least for playing around until we get a native tool ;)

https://github.com/DynamoDS/Dynamo/wiki ... -Own-Nodes
https://github.com/DynamoDS/Dynamo/wiki ... evelopment
https://www.youtube.com/watch?v=9Iwq32JCu2g
Last edited by saso on Thu Nov 27, 2014 4:50 pm, edited 1 time in total.
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Visual Programming with Dynamo atop Freecad API?

Post by saso »

dyn01.png
dyn01.png (68.53 KiB) Viewed 4016 times
:twisted: Have no idea what can I do next :D
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Visual Programming with Dynamo atop Freecad API?

Post by looo »

very interesting. Can you show some nodes?
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Visual Programming with Dynamo atop Freecad API?

Post by saso »

So yes, I was playing a bit around yesterday with that to see if I could quickly come up with some more interesting results but I guess things cannot always go as fast as one would like to :)

So as per the above links, Dynamo has this "Zero Touch Plugin Development" where you are able to import custom nodes. It will actually load any .NET .dll file and expose its classes as nodes, so I searched for .NET OpenCascade and found this http://www.sofa.de/OCasDotNet/Index.html (yes it is old) and have simply load it in to Dynamo (warning it takes quite some time to load). The nodes are there and can be used but I don't know and did not really had the time to find out how to make it work in an useful way...

So yes, anyone that is interested to play with it can just download Dynamo and this .NET Wrapper for OpenCascade, open Dynamo, start new, go to File > Import Library... and load OpenCascade6.2.dll.

It was anyway just a quick test and is probably not really the right way to go for it, but I guess some of the developers (those that already have knowledge of OpenCascade) might have a better understanding of what can actually be do with it. However it would probably make more sense to write some custom wrapper, maybe also the better way would be a wrapper for FreeCAD or FreeCAD command line? I don't know, but I do believe it would be possible to do it, probably even not very hard for someone that knows to code in C#.

The problem with this is of course that it would be Windows only, since as far as I understand Dynamo is Windows only... Well, Microsoft has open sourced .NET recently, so I don't know... ? :)
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Visual Programming with Dynamo atop Freecad API?

Post by looo »

I would like to try this, but no windows here. The idea to make the code more visual is great and it's cool to see that a gui without much gui coding would be possible. (allthough it doesn't make that much sense for opencascade, as it is a bit low level) But doing it with c# or python is a wrong decision:). It doesen't make sense to wrap a libary to c# and then wrap it to some visual programming program when it could be done directly. Wouldn't it be great to have a nodeeditor where multiply languages are supported? I would love to see a qt-based-node-editor in c++ which supports many languages, so that nodes written in c++ can be connected to python nodes, or c# nodes or any other language with qt bindings.

Any dev has time for another project??? :lol:
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Visual Programming with Dynamo atop Freecad API?

Post by yorik »

Not me :)
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Visual Programming with Dynamo atop Freecad API?

Post by saso »

Well, one benefit from doing it in Dynamo would be that most of existing Dynamo nodes could be used (I am guessing here that we would actually just need few new nodes that would export / link Dynamo geometry to FreeCAD geometry). Another one could be that if people from other applications come to FreeCAD and they were using Dynamo with those applications, they would quickly feel at home working with Dynamo in FreeCAD... This are actually some of the very same reasons why I was at the beginning looking mostly at what could be done with Sverchok, but have later realized that there are probably just to much differences from its current implementation in Blender. With Dynamo it mostly bothers me that it is Windows only (at least at the moment).

PS: it is possible to use python in Dynamo
http://dynamobim.com/math-transit/
https://github.com/DynamoDS/Dynamo/wiki ... -Migration
Last edited by saso on Fri Nov 28, 2014 8:42 pm, edited 1 time in total.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Visual Programming with Dynamo atop Freecad API?

Post by quick61 »

That Antimony looks slick. Having something like that as a plugin workbench, at the least...

Have you built and run the program yet?

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Post Reply