Graphical scripting : FreeCAD/PureData connection

Show off your FreeCAD projects here!
User avatar
flachyjoe
Veteran
Posts: 1315
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Graphical scripting : FreeCAD/PureData connection

Post by flachyjoe »

Hi,
PureData is a well known "visual programming language" for multimedia. It's natively able to process text message and communicates throw TCP/IP.

As Grasshopper for Rhino3D, PureData could be a procedural modeling processor for FreeCAD and an animation controller.

Here is a set of PureData "patches" and a FC macro as a first attempt to use one to control the other : https://github.com/FlachyJoe/FCPD
EDIT 11-03-21 :
FCPD is now a workbench and it no longer needs python skills to be used.

Sample/test.pd
Sample/test.pd
fcpd-0.1-test.pd.png (21.82 KiB) Viewed 7587 times
NB :
  • fc_client is puredata-documented (right-click,help)
  • I use Purr-data version of pure-data
Todo List :
  • Writing a wiki
  • Writing pd-embedded help patches *-help.pd
  • Create more samples
  • More stress-tests
  • Add linkage to Sketcher workbench (Part and Draft are done)
EDIT 09-13-21 :
Install and first steps

EDIT 02-06-22 :
As it's a legitimate question, I'd like to explain my choice for Pure-Data.
I choose Pure-Data for it's community and experience (it's a 30 years old project). Available libraries are awesome with 2500+ abstarctions (= nodes). Even if computer music is its origin Arduino, µ-controllers, computer vision, etc… are covered topics.
If you find its GUI a little creepy be aware that some projects claim to improve it. See Purr-Data Spaghettis or PlugData for example.
Last edited by flachyjoe on Sun Feb 06, 2022 8:00 pm, edited 4 times in total.
- Flachy Joe -
"celui qui sait réinventer la roue est tout sauf un potiron" Michaël sur linuxfr.org
:ugeek: Modélisations et Macros à la demande, contactez-moi en MP. :ugeek:
User avatar
Kunda1
Veteran
Posts: 13016
Joined: Thu Jan 05, 2017 9:03 pm

Re: FreeCAD/PureData connection

Post by Kunda1 »

Excellent. The GitHub read me is pretty sparse. Is there a way to record some screencasts showing some of these capabilities in realtime?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
flachyjoe
Veteran
Posts: 1315
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: FreeCAD/PureData connection

Post by flachyjoe »

Hi,
I just push a big update, no record yet but the readme is better…
- Flachy Joe -
"celui qui sait réinventer la roue est tout sauf un potiron" Michaël sur linuxfr.org
:ugeek: Modélisations et Macros à la demande, contactez-moi en MP. :ugeek:
User avatar
flachyjoe
Veteran
Posts: 1315
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: FreeCAD/PureData connection

Post by flachyjoe »

Image
- Flachy Joe -
"celui qui sait réinventer la roue est tout sauf un potiron" Michaël sur linuxfr.org
:ugeek: Modélisations et Macros à la demande, contactez-moi en MP. :ugeek:
User avatar
Kunda1
Veteran
Posts: 13016
Joined: Thu Jan 05, 2017 9:03 pm

Re: FreeCAD/PureData connection

Post by Kunda1 »

Very cool... but I was hoping to hear some sounds as well :mrgreen:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Jee-Bee
Veteran
Posts: 2536
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: FreeCAD/PureData connection

Post by Jee-Bee »

cool!!
User avatar
flachyjoe
Veteran
Posts: 1315
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: FreeCAD/PureData connection

Post by flachyjoe »

Kunda1 wrote: Tue Nov 03, 2020 8:40 pm Very cool... but I was hoping to hear some sounds as well :mrgreen:
Jee-Bee wrote: Thu Nov 05, 2020 12:24 pmcool!!
Thank you !

I'm now working on an animation recorder with keyframes and linear interpolation between them.
It's a little bit tricky to animate different objects in same time. It needs "dynamic patching" i.e. create and connect pd object in run time. I'll show you soon.

Kunda1 : give me a model of piano keyboard (single octave to start) with all keys named according to note and I'll try something... ;)
- Flachy Joe -
"celui qui sait réinventer la roue est tout sauf un potiron" Michaël sur linuxfr.org
:ugeek: Modélisations et Macros à la demande, contactez-moi en MP. :ugeek:
User avatar
flachyjoe
Veteran
Posts: 1315
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: FreeCAD/PureData connection

Post by flachyjoe »

flachyjoe wrote: Thu Nov 05, 2020 12:51 pm I'll show you soon.
Et voila ! https://github.com/FlachyJoe/fcpd-animator https://github.com/FlachyJoe/FCPDWorkbe ... n/animator
gui.png
gui.png (24 KiB) Viewed 6862 times
It's quite simple to use… and certainly needs improvements :lol:

Dynamic patching occurs in multi-player.pd, play with it gently or you'll get a big knot :? Add/remove and even move boxes and you'll need to adjust the identifiers with DEBUG help.

Have fun !
Last edited by flachyjoe on Thu Mar 11, 2021 8:10 pm, edited 1 time in total.
- Flachy Joe -
"celui qui sait réinventer la roue est tout sauf un potiron" Michaël sur linuxfr.org
:ugeek: Modélisations et Macros à la demande, contactez-moi en MP. :ugeek:
User avatar
flachyjoe
Veteran
Posts: 1315
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: FreeCAD/PureData connection

Post by flachyjoe »

Hi !
I'm proud to show you the
Ugly Vase Generator :lol:
Capture d’écran_2020-12-11_10-38-40.png
Capture d’écran_2020-12-11_10-38-40.png (145.48 KiB) Viewed 6635 times
Get it at https://github.com/FlachyJoe/FCPD/tree/main/Sample https://github.com/FlachyJoe/FCPDWorkbe ... -generator
Last edited by flachyjoe on Thu Mar 11, 2021 8:11 pm, edited 1 time in total.
- Flachy Joe -
"celui qui sait réinventer la roue est tout sauf un potiron" Michaël sur linuxfr.org
:ugeek: Modélisations et Macros à la demande, contactez-moi en MP. :ugeek:
User avatar
flachyjoe
Veteran
Posts: 1315
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: FreeCAD/PureData connection

Post by flachyjoe »

Hi,
Here is a workbench for more usability : https://github.com/FlachyJoe/FCPDWorkbench
- Flachy Joe -
"celui qui sait réinventer la roue est tout sauf un potiron" Michaël sur linuxfr.org
:ugeek: Modélisations et Macros à la demande, contactez-moi en MP. :ugeek:
Post Reply