Page 2 of 4

Re: FreeCAD/PureData connection

Posted: Fri Dec 18, 2020 2:19 pm
by Kunda1
Shall we add it to the Addon Manager ?

Re: FreeCAD/PureData connection

Posted: Fri Dec 18, 2020 4:00 pm
by flachyjoe
Kunda1 wrote: Fri Dec 18, 2020 2:19 pm Shall we add it to the Addon Manager ?
I didn't look yet how the Addon Manager works. If it's a link to the repository and not a snapshot of this certainly buggy draft, I'm ok.

Re: FreeCAD/PureData connection

Posted: Fri Dec 18, 2020 4:17 pm
by Kunda1
flachyjoe wrote: Fri Dec 18, 2020 4:00 pm
Kunda1 wrote: Fri Dec 18, 2020 2:19 pm Shall we add it to the Addon Manager ?
I didn't look yet how the Addon Manager works. If it's a link to the repository and not a snapshot of this certainly buggy draft, I'm ok.
Yes, it's a link to the repo not a snapshot. It may look like a snapshot but the underlying logic always references the most up to date version of the main branch of the addon.

Edit: You'll need to add a metadata file that references all the dependencies the workbench relies on.

Re: FreeCAD/PureData connection

Posted: Fri Dec 18, 2020 8:54 pm
by flachyjoe
Kunda1 wrote: Fri Dec 18, 2020 4:17 pm You'll need to add a metadata file that references all the dependencies the workbench relies on.
Where is the doc about this metadata file ? Does it list all dependencies or only FreeCAD workbenches ?

Re: FreeCAD/PureData connection

Posted: Sun Jan 31, 2021 12:59 pm
by flachyjoe
FreeCAD can now controls Pure-Data throw 2 objects :
  • [fc_selObserver] get real-time selection information
  • [fc_objObserver] bang when the mouse hovers the defined FC object
Lets' rock ! :lol:

Update to the last FCPDWorkbench to get them. Piano is available in FCPDWorkbench_Samples
No video yet, I only get GIF record working :(
No video yet, I only get GIF record working :(
Capture d’écran_2021-01-31_13-09-48.png (91.67 KiB) Viewed 4412 times

Re: FreeCAD/PureData connection

Posted: Wed Feb 24, 2021 9:04 pm
by flachyjoe
Hi,
I found a way to autogenerate Pure-Data patch linked to a python function (see the dev_tools directory). NB : there are no PD embedded help yet but inlets are commented when you open patches.

So all Draft.make_* are know available in FCPD, see you soon for Part.make* ones. Done !

Edit : demo for draft, part and parametric objects was added to FCPDWorkbench_Samples git

Re: Graphical scripting : FreeCAD/PureData connection

Posted: Sun Sep 12, 2021 8:17 pm
by flachyjoe
Hi !
I wrote a new object : [fc_controler] is quite similar to DynamicData_Workbench but with an external link to Pure-Data.
So you can use Pure-Data flow as input for an expression (and vice-versa set Pure-Data flow from expression).
It's an easiest way to control your models.
Capture d’écran_2021-09-12_21-58-21.png
Capture d’écran_2021-09-12_21-58-21.png (76.23 KiB) Viewed 3934 times

On Pure-Data side, [fc_controler] inlets are connected to IncommingData properties and outlets to OutgoingData ones.
Capture d’écran_2021-09-12_22-16-39.png
Capture d’écran_2021-09-12_22-16-39.png (56.69 KiB) Viewed 3934 times

Re: Graphical scripting : FreeCAD/PureData connection

Posted: Sun Sep 12, 2021 11:10 pm
by bleber
I like to test PD workbench, can give me some instructions to install/confiugre and first steps?
Thanks.

Re: Graphical scripting : FreeCAD/PureData connection

Posted: Mon Sep 13, 2021 6:41 am
by flachyjoe
bleber wrote: Sun Sep 12, 2021 11:10 pm I like to test PD workbench, can give me some instructions to install/confiugre and first steps?
Thanks.
Hi !
Install
  1. Clone the git repository in your FreeCAD Mod path
  2. Install Pure-Data and required external libraries or Purr-Data which includes them.
  3. Launch FreeCAD
  4. Load the FCPD workbench
  5. Set your Pure-Data binary path in the workbench preference page
First steps
  1. Open a FreeCAD document
  2. Load the FCPD workbench
  3. Start Pure-Data and internal FreeCAD server by clicking Launch Pure-Data in the FCPD menu or toolbar
  4. The opening client.pd window implements the connection to FC, don't close it.
  5. Create a new patch from PD File menu
  6. Add your needed [fc_…] objects, they are automatically connected to FreeCAD
Take a look in the fcpd-workbench/pdlib/ directory for available objects. Some of them are pd-documented (RMB/Help in PD) and/or listed in the FCPD-help.pd file.

Re: Graphical scripting : FreeCAD/PureData connection

Posted: Mon Sep 13, 2021 1:56 pm
by bleber
I follow the instructions and test examples not working, I have errors .
I attached screenshot.
In these example I can make the cube but error when drag to move.