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.