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!
erics
Posts: 1
Joined: Fri Aug 22, 2014 8:06 pm

Visual Programming with Dynamo atop Freecad API?

Post by erics »

Has anyone here see Dynamo? It's a open source implementation of a Graph Based Visual Programming Interface that's being advanced by Autodesk. It's very similar to Grasshopper (which is pretty tightly integrated with Rhino).

http://dynamobim.org/

It's pretty clear this is becoming the new paradigm for "power design". Industrial designers are increasing getting/losing jobs based on how well they know grasshopper, but it's a closed/proprietary model. The geometric control and the sheer level of complexity in design one can achieve with remarkably simple graphs is remarkable.

Dynamo is principally implemented atop Autodesks Shape Manager, but is well abstracted and could be implemented atop other Geometry Kernels.

So in this model Dynamo is Open source, but DesignScript (which has been rolled into dynamo) is dependent on the commerical Autodesk Shape Manager, but the core interface (written in c#) can be adapted to an engine like openCascade.

I'm very interested in Freecad, but find the Python APIs useful but painfully and syntactically tedious (not very python-like) and extremely error prone and very slow to develop with. It would strike me that exposing a much better paradigm for exercising the APIs would be of significant benefit and provide amazing capabilities that currently aren't available (as a solution) in FOSS-land.

Also... what would be the *right* approach be if an effort to create the abstraction for dyanmo to an "open" geometry kernel be? would you skip freecad and just wire it directly to openCascade? or leave freecad in the middle to that a design could leverage obects created in the freecad interface.

Interested in this groups thoughts.

-Eric
mrlukeparry
Posts: 655
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: Visual Programming with Dynamo atop Freecad API?

Post by mrlukeparry »

Actually, thanks for the link. I didn't realise an open source version of grass-hopper exists or atleast the front-end (not that I have ever used it). In our research group we deal alot with lattice type structures which breakdown in CAD and even the preprocessor because of their complexity.

There a problems in general dealing with implicit surfaces and other complex geometry with arbitrary shapes in general Mechanical CAD because of its use of BRep - I also don't know how well it would scale performance wise. In theory i'd expect it to be possible to replicate in FreeCAD depending on the algorithms present.

In general I doubt any opensource project that uses c# will ever attract developers.
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 »

Yes, I have suggested to have a look at dynamo before, and there is also https://github.com/nortikin/sverchok :)

Ps: luke, no pressure but how about that drawing update for christmas ;)
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 »

one note about dynamo. there has been some debate about the need in FC for an improved macro manager. in dynamo there is this "package manager" and "online package search" that i believe is quite a great example of how the macro manager in FC could be. it also allows users to upload their "packages" (in FC it would be macros, well at least for now :) ) and manages updates / versions of them. essentially it works a bit like an online store eg. google play

and while dynamo is for windows, it is free and can be installed and used as stand alone (no need to have revit)
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Visual Programming with Dynamo atop Freecad API?

Post by NormandC »

saso wrote:and wile dynamo is for windows
IMO this is inexcusable for an open source project. It should be available on all platforms.
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 »

normandc wrote:
saso wrote:and wile dynamo is for windows
IMO this is inexcusable for an open source project. It should be available on all platforms.
I would agree but you have to understand that this is coming from Autodesk, so the fact that it is opensource is in itself close to a miracle :) Well, going back it actually started as opensource and was later adopted by Autodesk and it is and always was closely related to Revit which is also Windows only, so... It is actually not even that important, what I wanted to say is simple that if someone has Windows and would like to see and try it is actually not hard to do it.

Maybe another small note to those that see this as something not to much related to FC, don't care about Revit... It is expected that Autodesk will extend dynamo also to AutoCAD, Inventor and maybe even other products that they have. And as Eric said above, there is grasshopper for rhino, sverchok for blender,... seems to be something important for the future.
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 »

Wow indeed I wouldn't have believed if it wasn't there to see: opensource stuff from autodesk!!! That tells you something about how opensource apps are becoming a problem to them... Indeed it will be very hard to integrate that with anything else (C# and windows-only)... But I doubt their idea is to be integrable. Rather to attract potential developers (for free) I would think.

An dindeed svertchok is becoming more and more interesting...
mrlukeparry
Posts: 655
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: Visual Programming with Dynamo atop Freecad API?

Post by mrlukeparry »

saso wrote:Yes, I have suggested to have a look at dynamo before, and there is also https://github.com/nortikin/sverchok :)

Ps: luke, no pressure but how about that drawing update for christmas ;)
Haha, it still exists. I've just been working on my own little experiment projects this summer and to have a bit of fresh air to help me sharpen up some programming skills and come back with some more energy.

Even though the project is just c# / (custom scripting language) is the underlying higher-level algorithms scripted in the kernel or in this opensource project? If they were then it should be fairly straightforward to port over to python or c++.

Yorik, how useful do you think would it to be have some visual scripting like this in FreeCAD based on your experience in Blender? I found it difficult to use with material shaders as a newbie, but I thought it could become very powerful for declarative/parametric design. This isn't even just for architecture but potentially for Mechanical CAD with 3D printing now more widespread.
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 »

saso wrote:Ps: luke, no pressure but how about that drawing update for christmas ;)
+1 !!
mrlukeparry wrote:Yorik, how useful do you think would it to be have some visual scripting like this in FreeCAD based on your experience in Blender? I found it difficult to use with material shaders as a newbie, but I thought it could become very powerful for declarative/parametric design. This isn't even just for architecture but potentially for Mechanical CAD with 3D printing now more widespread.
It would of course be excellent, but I also an extensive work, and, as you saw in Blender, the nodes system is something that was primarily made for materials & shaders. They are maturing the system since a long time, and it is only very recently that the guys behind svertchok have had a system powerful and stable enough to develop their addon.

But, I also remember an old document Jürgen wrote at the beginning of FreeCAD (I didn't keep a copy unfortunately) where there was an image illustrating how FreeCAD document object had "slots" (the properties) that could receive data from other slots (like, the output of an union becomes the input of a higher-level feature). That image now strikes me as being an exact illustration of such a nodes system... In fact, FreeCAD almost seems to have been designed for this...

About being useful and powerful, I certainly think it is, probably even more for newcomers than for experienced users... I always play a bit with these systems (grasshopper, svertchok or structuresynth) but until now I never used them more than for playing and generating ideas... A bit like http://al.chemy.org/ but for 3D shapes...
mrlukeparry
Posts: 655
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: Visual Programming with Dynamo atop Freecad API?

Post by mrlukeparry »

Thanks for your thoughts Yorik. I agree with what you say, since it does seem like the property system built into the document objects is built for this. I generally don't think it makes much sense for most cases modelling simple shapes that could be done just as easily using the traditional sketch tools.

I think as the modelling complexity and design detail increases along with the number of design freedoms it would help to be useful breaking the problem down into tunable parameters.

It probably wouldn't be a very difficult task to expose the document object system to this but I don't think it would be useful in its current state verse Python... Something for me to think about :)
Post Reply