Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
675 changes: 675 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,6 @@ sudo apt install puredata pd-list-abs pd-iemlib pd-iemguts
sudo apt install pd-pddp
```

## License

Copyright 2020-2025 @flachyjoe and other contributors

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

## Background / How it works ?

The FreeCAD workbench is codded with Python, it implements a TCP server to get FUDI message from Pure-Data.
Expand Down
119 changes: 95 additions & 24 deletions pure-data/pdhelp/FCPD-help.pd
Original file line number Diff line number Diff line change
@@ -1,24 +1,95 @@
#N canvas 779 205 551 516 12;
#X obj 11 80 helplink fc_client;
#X text 150 80 client/server connection with FreeCAD;
#X obj 10 110 helplink fc_process;
#X text 150 110 send message to FreeCAD;
#X obj 10 140 helplink fc_recompute;
#X text 150 140 ask FreeCAD to recompute ActiveDocument;
#X text 10 50 BASE;
#X text 10 190 VECTOR & PLACEMENT;
#X obj 10 250 helplink fc_vectorXYZ;
#X obj 0 0 cnv 15 550 50 empty empty FCPD 20 12 0 16 #e0e0e0 #404040
0;
#X obj 10 310 helplink fc_PlacementPosRot;
#X obj 10 340 helplink fc_setPlacementPos;
#X text 10 390 PROPERTIES & CONSTRAINTS;
#X obj 10 420 helplink fc_getObjectProperty;
#X obj 10 450 helplink fc_setObjectProperty;
#X obj 10 280 helplink fc_isVector;
#X obj 10 220 helplink fc_vector;
#X text 120 6 a framework to connect FreeCAD and PureData \; (c)2020
flachyjoe and contributors;
#X obj 300 220 helplink part;
#X obj 300 250 helplink draft;
#X text 300 190 WORKBENCHES;
#N canvas 843 43 575 930 12;
#X obj 10 1740 helplink fc_process;
#X obj 10 150 helplink fc_recompute;
#X text 150 150 ask FreeCAD to recompute ActiveDocument;
#X text 10 120 BASE;
#X obj 0 0 cnv 15 550 50 empty empty FCPD 20 12 0 16 #e0e0e0 #404040 0;
#X obj 10 1550 helplink part;
#X obj 10 1580 helplink draft;
#X text 10 1520 WORKBENCHES;
#X text 120 6 a framework to connect FreeCAD and PureData \; (c)2020-2025 @FlachyJoe and contributors;
#X obj 10 610 helplink XYZvector;
#X text 150 610 Create a vector from its X \, Y \, Z coords;
#X obj 10 640 helplink vectorXYZ;
#X text 150 640 Retrieve X \, Y \, Z coords of a vector;
#X obj 10 670 helplink isVector;
#X text 150 670 Bang left or right if input is a vector or not;
#X obj 10 990 helplink placementPosRot;
#X text 150 990 Split a placement in position (vector) and rotation;
#X obj 10 1020 helplink setPlacementPos;
#X text 150 1020 Move a placement to the specified position;
#X obj 10 1050 helplink setPlacementRot;
#X text 150 1050 Rotate a placement to the specified rotation;
#X obj 10 950 helplink isRotation;
#X obj 10 1080 helplink translatePlacement;
#X text 150 1080 Add the specified vector to the placement position;
#X obj 10 1110 helplink rotatePlacement;
#X text 150 1110 Combine the specified rotation to the placement;
#X text 150 950 Bang left or right if input is a rotation or not;
#X text 10 580 VECTOR & ROTATION & PLACEMENT;
#X obj 10 890 helplink YPRrotation;
#X text 150 890 Create a rotation from Yaw Pich Roll values;
#X obj 10 920 helplink rotationYPR;
#X text 150 920 Retrieve Yaw Pitch Roll of a rotation;
#X obj 10 700 helplink vectorAdd;
#X obj 10 730 helplink vectorMinus;
#X obj 10 760 helplink vectorMult;
#X text 150 760 Multiply a vector by a scalar;
#X text 150 730 Subtract a vector to another;
#X text 150 700 Add a vector to another;
#X obj 10 780 helplink Ox;
#X text 150 790 vector (1 \, 0 \, 0);
#X obj 10 810 helplink Oy;
#X obj 10 840 helplink Oz;
#X text 150 850 vector (0 \, 0 \, 1);
#X text 150 820 vector (0 \, 1 \, 0);
#X text 10 260 SCALAR;
#X obj 10 280 helplink pi;
#X obj 10 320 helplink -pi;
#X obj 10 350 helplink 0.5pi;
#X obj 10 380 helplink -0.5pi;
#X obj 10 410 helplink neg;
#X text 150 410 -x;
#X text 10 450 LIST;
#X obj 11 480 helplink fcList;
#X text 150 480 convert a PD list in a FC list;
#X obj 10 510 helplink castList;
#X text 150 510 convert a FC list \, vector or rotation to a PD list;
#X obj 10 540 helplink isList;
#X text 150 540 bang at left or right if input is a FC list or not;
#X text 10 1150 OBJECT;
#X obj 10 1420 helplink fc_getObjectProperty;
#X obj 10 1450 helplink fc_setObjectProperty;
#X text 160 1420 .;
#X text 160 1450 .;
#X obj 10 1180 helplink fc_addObject;
#X text 160 1180 create an object in the ActiveDocument and return it;
#X obj 10 1210 helplink fc_byLabel;
#X text 160 1210 retrieve an object in the ActiveDocument by its label;
#X obj 10 1240 helplink fc_clicknselect;
#X text 160 1240 click on a FC object and its ref is return to PD;
#X obj 10 1270 helplink fc_copy;
#X text 160 1270 duplicate the given object \, optional its dependencies;
#X obj 10 1300 helplink fc_delete;
#X text 160 1300 delete the given object;
#X obj 10 1330 helplink fc_isObject;
#X text 160 1330 bang left/right if data is object/or not;
#X obj 10 1360 helplink fc_isType;
#X text 160 1360 bang left/right if object is of the given type/or not;
#X obj 10 1390 helplink fc_link;
#X text 160 1390 create a link of the given object in the ActiveDocument;
#X obj 10 1480 helplink fc_object;
#X text 160 1480 create \, modify \, delete an object;
#X text 10 190 DATA FLOW;
#X obj 11 220 helplink fc_controler;
#X text 150 220 create a (bidirectional) data tunnel to FC;
#X text 10 1650 INTERNAL;
#X obj 10 1680 helplink fc_client;
#X obj 10 1710 helplink fc_giveme;
#X text 150 1740 send raw message to FreeCAD server;
#X text 150 1710 ask for a PD binder to a python method;
#X text 150 1680 communicate with FC python server;
#X obj 10 1770 helplink commandline;
#X text 150 1770 a place for the user to type text;
#X obj 10 1610 helplink shape;
#X text 27 53 Abstractions named "fc_*" are asynchronous. Data are sent to FC and the left-most outlet bang when the return values on other outlets are ready. The others are full PD and compute during a control tick.;
5 changes: 0 additions & 5 deletions pure-data/pdlib.light/T-F-help.pd

This file was deleted.

4 changes: 2 additions & 2 deletions pure-data/pdlib.light/fc_client.pd
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
#X text 30 411 door closed if already connected;
#X obj 525 107 route 0;
#X obj 525 77 t a b;
#X text 62 221 Change switch \; to follow connection status;
#X obj 460 522 closebang;
#X text 62 221 Change switch \; to follow connection status;
#X obj 460 522 iemguts/closebang;
#X obj 599 263 list split 1;
#X obj 599 324 list;
#X obj 599 294 t b a, f 8;
Expand Down
36 changes: 17 additions & 19 deletions pure-data/pdlib.light/fc_controler.pd
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#N canvas 191 267 1024 583 12;
#N canvas 487 236 1024 583 12;
#X obj 20 490 print FreeCAD_Error;
#X obj 20 10 inlet;
#N canvas 486 173 635 742 inlet-creator 0;
#X obj 100 120 until;
#X obj 100 150 f;
#X obj 130 150 + 1;
#X obj 100 90 - 1;
#X obj 90 520 sendcanvas 1;
#X obj 90 520 iemguts/sendcanvas 1;
#X obj 100 20 inlet;
#X text 470 220 fc_process index;
#X obj 100 50 t f b;
Expand All @@ -16,21 +16,19 @@
#X obj 100 350 + 1;
#X obj 60 240 * 200;
#X obj 60 270 + 200;
#X text 200 430 x inlet_number new_inlet_id new_list_id fc_process_index
;
#X text 200 430 x inlet_number new_inlet_id new_list_id fc_process_index;
#X obj 90 430 pack f f f f f;
#X obj 100 180 t f f f f b;
#X obj 130 350 +;
#X obj 130 240 * 2;
#X msg 90 470 obj \$1 10 inlet \, obj \$1 40 list prepend ctrlr \$2
\, connect \$3 0 \$4 0 \, connect \$4 0 \$5 0;
#X msg 90 470 obj \$1 10 inlet \, obj \$1 40 list prepend ctrlr \$2 \, connect \$3 0 \$4 0 \, connect \$4 0 \$5 0;
#X obj 190 20 inlet;
#X obj 200 300 +;
#X text 200 50 nb of outlet;
#X text 240 270 last id + 2;
#X msg 430 220 3;
#X floatatom 30 70 5 0 0 0 - - - 0;
#X msg 200 270 14;
#X msg 200 270 15;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 0 16 0;
Expand Down Expand Up @@ -67,19 +65,18 @@
#X obj 190 410 until;
#X obj 190 440 f;
#X obj 220 440 + 1;
#X obj 190 690 sendcanvas 1;
#X obj 190 690 iemguts/sendcanvas 1;
#X obj 190 10 inlet;
#X obj 150 530 * 200;
#X obj 190 470 t f f f f b;
#X obj 230 560 +;
#X obj 346 460 sendcanvas 1;
#X obj 346 460 iemguts/sendcanvas 1;
#X text 310 310 last id + 1;
#X msg 370 140 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
;
#X msg 370 140 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20;
#X obj 410 170 list split;
#X obj 346 400 pack f f;
#X obj 410 229 list trim;
#X obj 410 260 sendcanvas 1;
#X obj 410 260 iemguts/sendcanvas 1;
#X text 280 520 last id + 2;
#X obj 150 560 + 500;
#X text 300 630 x outlet_number new_outlet_id route_index;
Expand All @@ -91,9 +88,9 @@
#X obj 280 339 t f f;
#X text 440 310 [route ERROR] index;
#X msg 346 430 connect \$2 1 \$1 0;
#X msg 280 310 13;
#X msg 250 520 14;
#X msg 410 310 12;
#X msg 280 310 14;
#X msg 250 520 15;
#X msg 410 310 10;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 0 6 0;
Expand Down Expand Up @@ -158,8 +155,7 @@
#X obj 210 530 1;
#X obj 210 160 r \$0-reset;
#X obj 130 10 inlet;
#X text 200 10 This patch search for the | char and return right and
left element count;
#X text 200 10 This patch search for the | char and return right and left element count;
#X obj 210 630 outlet;
#X obj 40 550 t b b;
#X connect 0 0 5 0;
Expand Down Expand Up @@ -207,8 +203,9 @@ left element count;
#X obj 30 140 t a a;
#X obj 330 210 t f f;
#X obj 20 250 route ERROR;
#X obj 30 111 else/args;
#X obj 30 81 else/lb -init;
#X obj 30 116 pdcontrol;
#X msg 30 92 args 0;
#X obj 30 68 loadbang;
#X connect 1 0 6 0;
#X connect 3 0 10 0;
#X connect 4 0 3 0;
Expand All @@ -222,3 +219,4 @@ left element count;
#X connect 10 0 0 0;
#X connect 11 0 8 0;
#X connect 12 0 11 0;
#X connect 13 0 12 0;
2 changes: 1 addition & 1 deletion pure-data/pdlib.light/fc_giveme.pd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#X obj 10 100 route ERROR;
#X obj 10 210 symbol;
#X obj 10 11 inlet;
#X obj 10 290 sendcanvas 1;
#X obj 10 290 iemguts/sendcanvas 1;
#X obj 90 130 t a b;
#X obj 120 160 outlet;
#X text 70 210 create and select and cut the object in this patch;
Expand Down
2 changes: 1 addition & 1 deletion pure-data/pdlib.light/fc_isIncluded.pd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#N canvas 177 535 450 300 12;
#X obj 10 10 closebang;
#X obj 10 10 iemguts/closebang;
#X obj 10 100 fc_process;
#X msg 10 40 endedit;
#X obj 10 70 list append \$1;
Expand Down
2 changes: 1 addition & 1 deletion pure-data/pdlib.light/fc_objObserver.pd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#X obj 20 210 fc_process;
#X msg 290 140 remobserver;
#X obj 90 270 outlet;
#X obj 270 50 closebang;
#X obj 270 50 iemguts/closebang;
#X obj 200 50 inlet;
#X obj 80 50 loadbang;
#X obj 200 100 t a b;
Expand Down
2 changes: 1 addition & 1 deletion pure-data/pdlib.light/fc_onMove.pd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#X obj 10 200 fc_process;
#X msg 220 130 remobserver;
#X obj 70 260 outlet;
#X obj 200 40 closebang;
#X obj 200 40 iemguts/closebang;
#X obj 130 40 inlet;
#X obj 10 40 loadbang;
#X obj 130 90 t a b;
Expand Down
4 changes: 2 additions & 2 deletions pure-data/pdlib.light/fc_python.pd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#X text 490 140 last obj index;
#X obj 280 0 initbang;
#X obj 300 100 - 1;
#X obj 220 620 sendcanvas 1;
#X obj 220 620 iemguts/sendcanvas 1;
#X obj 300 370 + 250;
#X obj 380 370 + 0;
#X obj 410 370 + 1;
Expand Down Expand Up @@ -46,7 +46,7 @@
#X msg 440 580 connect \$5 0 \$4 0;
#X obj 730 190 spigot;
#X text 730 100 only one inlet;
#X obj 730 249 sendcanvas 1;
#X obj 730 249 iemguts/sendcanvas 1;
#X obj 730 130 t b f;
#X obj 280 60 t f f b f;
#X obj 90 340 spigot;
Expand Down
2 changes: 1 addition & 1 deletion pure-data/pdlib.light/fc_selObserver.pd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#X obj 100 120 fc_process;
#X msg 200 80 remobserver;
#X obj 190 230 outlet;
#X obj 200 50 closebang;
#X obj 200 50 iemguts/closebang;
#X obj 100 50 loadbang;
#X obj 100 150 route OK None;
#X obj 150 190 b;
Expand Down
21 changes: 0 additions & 21 deletions pure-data/pdlib.light/list-rev.pd

This file was deleted.

25 changes: 0 additions & 25 deletions pure-data/pdlib.light/waitFor.pd

This file was deleted.

Loading
Loading