Mnesarco Utils Extension Pack (MnesarcoUtils)

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Mnesarco Utils Extension Pack (MnesarcoUtils)

Post by mnesarco »

Hello Friends,

I am incrementally publishing some of my Old and New FreeCAD extensions into an extension pack. Currently it includes:

  • General purpose timers usable in animations, expressions, assemblies, scripts ...
  • General purpose dynamic scripting module to bind complex formulas to FreeCAD expression, usable anywhere.
  • Camera position saver (Poin of view) to easily save/activate multiple camera views.
  • A space controller to help in 3D navigation/rotation/zooming... (Hardware and Software)
  • An external keypad to control FreeCAD actions and macros (something similar to Stream Deck, but without special hardware, just use any touch+wifi device)
  • A configurator to allow you to add any path to FreeCAD's PYTHONPATH, even works with AppImages.

Some of the original threads in "Users Showcase"


Some poor demo videos:

I sumarize everything here to keep the discussion in one place.
Last edited by mnesarco on Mon Feb 22, 2021 3:07 pm, edited 1 time in total.
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Post by mnesarco »

Hi Friends,

I have tested the Remote KeyPad on Linux and macOS, but I don't have a Windows machine.
I will pareciate any feedback from Windows users :)

Cheers,

Frank.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Mnesarco Utils Extension Pack

Post by Syres »

mnesarco wrote: Sat Feb 13, 2021 1:27 pm I have tested the Remote KeyPad on Linux and macOS, but I don't have a Windows machine.
I will appreciate any feedback from Windows users :)
Well, I've just had a play with the Remote Control utility using an fully updated Android phone and my Windows 7 partition with mixed results. After a bit of faffing I managed to get the icons to load for some of the macros and the macros trigger fine once loaded but only one workbench icon loads. I even seriously slimmed my macro folder contents down to just 21 from 97 which had some subfolders to see whether one particular macro might have been causing a problem but as you can see there's 10 not being picking up, it's the same browsing locally on the PC also so it's not my phone browser in the instance.

Here's the kind of output from the Report View (there's some debug that I added to hopefully assist).

Code: Select all

18:57:23  Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\FreeCAD_Utils-main(InitGui.py not found)... ignore
18:57:23  Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Manipulator... done
18:57:24  Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Plot(InitGui.py not found)... ignore
18:57:24  Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Render... done
18:57:24  Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\sheetmetal... done
18:57:24  Init:      Initializing C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\Silk... done
18:57:24  Init: Initializing freecad.plot
18:57:24  Init: Initializing freecad.plot... done
18:57:24  Init: Initializing freecad.mnesarco
18:57:24  Init: Initializing freecad.mnesarco... done
18:57:24  Init: Initializing freecad.gears
18:57:25  Init: Initializing freecad.gears... done
18:57:25  Init: Initializing freecad.Curves
18:57:25  Init: Initializing freecad.Curves... done
18:57:25  Init: Loading FreeCAD GUI
18:57:25  [Utils] 8D Hyper Controller is disabled because the python module 'pyserial' was not found.
18:57:25  Init: Running FreeCADGuiInit.py start script... done
18:57:27  Init: Activating default workbench StartWorkbench
18:57:27  Loading GUI of Web module... done
18:57:27  Loading GUI of Start module... done
18:57:27  Loading Start module... done
18:57:27  Init: Showing main window
18:57:27  Main window restored
18:57:27  Show main window
18:57:27  Toolbars restored
18:57:27  3Dconnexion device not attached.
18:57:27  Init: Entering event loop
18:57:27  Init: Processing command line files
18:57:35  [Utils] Remote address: http://192.168.178.21:8521
18:58:00  192.168.178.22 - - [13/Feb/2021 18:58:00] "POST /workbench/A2plusWorkbench HTTP/1.1" 200 -
18:58:01  Loading Spreadsheet module... done
18:58:02  192.168.178.22 - - [13/Feb/2021 18:58:02] "GET /img/ajax-loader.gif HTTP/1.1" 200 -
18:58:02  192.168.178.22 - - [13/Feb/2021 18:58:02] "POST /workbench-actions/A2plusWorkbench HTTP/1.1" 200 -
18:58:02  192.168.178.22 - - [13/Feb/2021 18:58:02] "GET /css/compact.css HTTP/1.1" 200 -
18:58:45  192.168.178.22 - - [13/Feb/2021 18:58:45] "GET / HTTP/1.1" 200 -
18:58:45  192.168.178.22 - - [13/Feb/2021 18:58:45] "POST /workbenches HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "POST /macros HTTP/1.1" 200 -
18:58:49  E:\Data\FreeCAD\Macro\00000MakeaPyramid.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\00000TechDrawLeader.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\0aRenameItemsBasedOnGroupName.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\AddDatumCoordSys.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\AddDatumLine.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\AddDatumPlane.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\AddDatumPoint.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\aExportPDFTechDraw.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\Airfoil_Macro212.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\Align_View_to_Face.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\aSketches_to_3DObjects.FCMacro
18:58:49  E:\Data\FreeCAD\Macro\BenchmarkingNumpYCuPY.FCMacro
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /cc526dcfc67a8b8e8ee3ca9c4291c6919f2c82d69d232e55cb8e5581c8c824b3 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /849ce820c0b37cfa5ae713faa5ff9b3f03ec433866687cd31671993e5fa99251 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /4fd3db5b0500902beb27fcaf8229391f186b1f46755c3eace07c51204fb21464 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /4edca870fc779f25d594371263e3d040aee2b94734f19363fb0c74ad59518a31 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /b8e365bb4d43b5bc24098307a41c4c5cf41cbc4607562f96bc4fcfe17229ace4 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /a0add62b83b4afa756bf89719297f5aa5d24c9396724c442c9e24a88e08cb22b HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /33e0f24aa356d62d4239c2fadebb8f1c8cbe3c1346dc64d26c2217be8c906016 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /ade2e8bf7318015c906ec6df446c6827e5325e09d8090db2bad353f83342129e HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /51677930d78c3f91a69b4574eb2ee52cf9983e909a1219aea734ad3af0092939 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /a4b9194a565f5c706f1c8f854b6b5bef2b2b391def269c75f78f54a602900aa1 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /adcd18b313cc3d46a68c8e413c871e7e42738a1169b1ddfe6780a031a3f07bc2 HTTP/1.1" 200 -
18:58:49  192.168.178.22 - - [13/Feb/2021 18:58:49] "GET /23c1370a6b8dfccefc24e9cd566c80be07fd9ebd57ffd96d07ee959a8af4943f HTTP/1.1" 200 -
18:59:31  192.168.178.22 - - [13/Feb/2021 18:59:31] "POST /macro/503ad9dd6ed6e68a642f77d67fcf7f638098a806e825d0279546d627a0186698 HTTP/1.1" 200 -
Below is the actual list of macros that should be picked up:
Macros.jpg
Macros.jpg (121.45 KiB) Viewed 4519 times

If you need me to add some more debug info, let me know, ta.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24028 (Git)
Build type: Release
Branch: master
Hash: 32200b604d421c4dad527fe587a7d047cf953b4f
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Post by mnesarco »

Syres wrote: Sat Feb 13, 2021 7:16 pm ...
Thank you, I see the problem clearly: Windows filesystem is not case sensitive and your macro files have a fullcaps extensions (.FCMACRO). But I am filtering by (.FCMacro). I will fix it now.
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Post by mnesarco »

Syres wrote: Sat Feb 13, 2021 7:16 pm ...
Hi Syres, i have just commited a fix. Can you try again please?

Thanks.
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Post by mnesarco »

Syres wrote: Sat Feb 13, 2021 7:16 pm only one workbench icon loads.
Workbench icons are cached in temp folder. Maybe some permission problem? Btw windows 7? it was unexpected :mrgreen: I dont think i will try too hard to support W7 :D but if you can confirm some issue with the temp dir permissions it will probably easily solvable. Most of the portability issues between windows/linux in my previous python extensions were related with the filesystem.
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Post by mnesarco »

mnesarco wrote: Sat Feb 13, 2021 7:35 pm
Syres wrote: Sat Feb 13, 2021 7:16 pm ...
Thank you, I see the problem clearly: Windows filesystem is not case sensitive and your macro files have a fullcaps extensions (.FCMACRO). But I am filtering by (.FCMacro). I will fix it now.
I was wrong about this. That was not the problem. I did read to fast.
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Post by mnesarco »

BTW, i need to clarify that I only support FreeCAD 0.19+ and Python3
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Mnesarco Utils Extension Pack

Post by Syres »

OK, so yep there's no difference as you expected.

For feedback, the TEMP variable (as opposed to the TMP variable) on my system creates the thumbnails for the Start Wb just fine and they are stored in a newly generated folder each time FC starts. So for example C:\Users\JPS\AppData\Local\Temp\FreeCADStartThumbnailszjdoolf8 containing 37 PNG files. Your icon PNG files are created fine in C:\Users\JPS\AppData\Local\Temp such as Image_CreateImagePlane.PNG so write access is fine and they are not set to Read Only so I'll have to play tomorrow morning with debugging the loading part (when my brain is much fresher :D ).

I have access to a Windows 10 box tomorrow afternoon but I'm not expecting any different results to be honest. While I have dual boot with Linux Mint 19.3 I won't be able to give up Win 7 until I stop being pestered to test very peculiar PLC software that only have Win drivers and I hate Win 10 with a passion.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Mnesarco Utils Extension Pack

Post by Syres »

I knew in the distant back of mind we'd had something like this when the Start Page redesign was taking place (only 2 years ago) and @Yorik only could test on Linux. Please see the commit that he implemented to fix for all OS : https://github.com/FreeCAD/FreeCAD/commit/3f51e25b2

I hope this helps, you'll notice that http:// doesn't work and must be set to file:// @RogerK came up with the fix using a variable which he used along with StartPage.js which isn't in this commit.
Post Reply