Another FreeCAD Gadget: Physical macro pad

Show off your FreeCAD projects here!
User avatar
mnesarco
Posts: 288
Joined: Thu Mar 26, 2020 8:52 pm

Another FreeCAD Gadget: Physical macro pad

Postby mnesarco » Tue Feb 09, 2021 4:43 am

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
Posts: 33511
Joined: Tue Mar 17, 2015 9:14 am

Re: Another FreeCAD Gadget: Physical macro pad

Postby chrisb » 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?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
rockn
Posts: 1736
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Another FreeCAD Gadget: Physical macro pad

Postby rockn » Tue Feb 09, 2021 10:55 am

Awesome ! It's like a streamdeck but for FreeCAD :mrgreen: !
Formations et tutoriels FreeCAD en Français, soutenez moi : https://www.tipeee.com/formations-freecad
User avatar
mnesarco
Posts: 288
Joined: Thu Mar 26, 2020 8:52 pm

Re: Another FreeCAD Gadget: Physical macro pad

Postby mnesarco » Tue Feb 09, 2021 12:03 pm

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: 288
Joined: Thu Mar 26, 2020 8:52 pm

Re: Another FreeCAD Gadget: Physical macro pad

Postby mnesarco » Tue Feb 09, 2021 12:05 pm

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: 288
Joined: Thu Mar 26, 2020 8:52 pm

Re: Another FreeCAD Gadget: Physical macro pad

Postby mnesarco » Wed Feb 10, 2021 3:48 am

Small demo of current progress:

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

Re: Another FreeCAD Gadget: Physical macro pad

Postby HakanSeven12 » Wed Feb 10, 2021 12:45 pm

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

Re: Another FreeCAD Gadget: Physical macro pad

Postby Kunda1 » Wed Feb 10, 2021 1:03 pm

That's friggin awesome!
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
mnesarco
Posts: 288
Joined: Thu Mar 26, 2020 8:52 pm

Re: Another FreeCAD Gadget: Physical macro pad

Postby mnesarco » Wed Feb 10, 2021 3:35 pm

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 1263 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
Posts: 10233
Joined: Thu Jan 05, 2017 9:03 pm

Re: Another FreeCAD Gadget: Physical macro pad

Postby Kunda1 » Wed Feb 10, 2021 6:36 pm

Not a bad solution
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