Another FreeCAD Gadget: Physical macro pad

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
mnesarco
Posts: 472
Joined: Thu Mar 26, 2020 8:52 pm

Another FreeCAD Gadget: Physical macro pad

Post by mnesarco »

Hi Friends,
I revived some old code to convert any wifi connected Phone or tablet into a physical macro pad for FreeCAD. The basic idea and protocol is working, i need to add customization options before publishing it on Github.

phpBB [video]



The idea is that users can create its own screens with custom buttons. Activate workbenches, execute macros or any FreeCAD command from one or more external touch screens.

it will be included in Mnesarco Utils Extension Pack.
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Another FreeCAD Gadget: Physical macro pad

Post by chrisb »

Nice addition. Can you elaborate how you did it? What has to be done on the App side, and even more interesting, how is the connection to FreeCAD established?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
rockn
Veteran
Posts: 1791
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Another FreeCAD Gadget: Physical macro pad

Post by rockn »

Awesome ! It's like a streamdeck but for FreeCAD :mrgreen: !
Formations - Assistance - Développement : https://freecad-france.com
User avatar
mnesarco
Posts: 472
Joined: Thu Mar 26, 2020 8:52 pm

Re: Another FreeCAD Gadget: Physical macro pad

Post by mnesarco »

chrisb wrote: Tue Feb 09, 2021 10:49 am Nice addition. Can you elaborate how you did it? What has to be done on the App side, and even more interesting, how is the connection to FreeCAD established?
Hi @chrisb, It is a webapp, it runs from freecad (python http server) so you don't need to install anything else on the device, just open the browser and put your local IP address and a configurable port number. The app gets everything by rest calls, including icons, and call FreeCAD commands and macros posting back (ajax). There are some levels of cache to avoid constant generation of icons and macro parsing, but everything is dynamic, so it reflects the current state of FreeCAD. Unfortunatelly I have not found a way to enable/disable buttons based on context yet. So if you activate a workbench for example, you get a grid with all buttons from its toolbars, but no clue of which one are enabled/disabled. I am considering sending updates with a timer but checking actions status all the time can be a performace problem, so I am open to ideas here.
User avatar
mnesarco
Posts: 472
Joined: Thu Mar 26, 2020 8:52 pm

Re: Another FreeCAD Gadget: Physical macro pad

Post by mnesarco »

rockn wrote: Tue Feb 09, 2021 10:55 am Awesome ! It's like a streamdeck but for FreeCAD :mrgreen: !
Yes it is highly inspired by stream deck, but using any device and specific for FreeCAD.
User avatar
mnesarco
Posts: 472
Joined: Thu Mar 26, 2020 8:52 pm

Re: Another FreeCAD Gadget: Physical macro pad

Post by mnesarco »

Small demo of current progress:

phpBB [video]
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Another FreeCAD Gadget: Physical macro pad

Post by HakanSeven12 »

İnteresting +1
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Another FreeCAD Gadget: Physical macro pad

Post by Kunda1 »

That's friggin awesome!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
mnesarco
Posts: 472
Joined: Thu Mar 26, 2020 8:52 pm

Re: Another FreeCAD Gadget: Physical macro pad

Post by mnesarco »

As nearly all macros have no icon, what do you think about autoassign generic dice icons to macros?

screenshot_13.png
screenshot_13.png (57.84 KiB) Viewed 3374 times

A combination of dice number and color will provide a lot of generic unique icons.
The idea is to look for an icon in this order:

1. Use a custom icon configured by the user if any
2. Use the icon provided by the macro if any
3. use a generic dice icon from the pool

What do you think?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Another FreeCAD Gadget: Physical macro pad

Post by Kunda1 »

Not a bad solution
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply