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!
User avatar
mnesarco
Posts: 266
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Postby mnesarco » Sat Feb 13, 2021 11:17 pm

Syres wrote:
Sat Feb 13, 2021 9:23 pm
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.
file:// will not work in this context because the html is running in another device. I will try to get access to a windows machine too. Thanks for your help. See you tomorrow.
User avatar
mnesarco
Posts: 266
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Postby mnesarco » Sun Feb 14, 2021 12:25 am

Syres wrote:
Sat Feb 13, 2021 7:16 pm
...
I have found the bug. It is fixed now. It was as suspected, a filesystem path problem.
Syres
Posts: 865
Joined: Thu Aug 09, 2018 11:14 am

Re: Mnesarco Utils Extension Pack

Postby Syres » Sun Feb 14, 2021 10:16 am

mnesarco wrote:
Sun Feb 14, 2021 12:25 am
I have found the bug. It is fixed now. It was as suspected, a filesystem path problem.
OK thanks, all icons loading for workbenches and their commands. Macro icons load fine unless the code comes across a macro that has something it doesn't like such as CentreOfMass https://wiki.freecadweb.org/Macro_CenterOfMass it doesn't skip past but produces no icons at all. I'll see if there's any others on my system that are in the Wiki that cause this issue.
User avatar
mnesarco
Posts: 266
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Postby mnesarco » Sun Feb 14, 2021 4:06 pm

Syres wrote:
Sun Feb 14, 2021 10:16 am
Macro icons load fine unless the code comes across a macro that has something it doesn't like such as CentreOfMass https://wiki.freecadweb.org/Macro_CenterOfMass it doesn't skip past but produces no icons at all. I'll see if there's any others on my system that are in the Wiki that cause this issue.
CenterOfMass has an online icon. i am only supporting local icons.

Code: Select all

...
__Icon__ = 'https://www.freecadweb.org/wiki/images/d/d7/Centomass.png'
...
__Files__ = 'CenterOfMass/Macro_CenterOfMass_import.png,CenterOfMass/Macro_CenterOfMass_compute.png,CenterOfMass/Macro_CenterOfMass_save.png,CenterOfMass/Macro_CenterOfMass_material.png,CenterOfMass/Macro_CenterOfMass_com.png,CenterOfMass/Macro_CenterOfMass_colorify.png'
Using online icons for macros is a bad practice because:
  1. Requires internet access
  2. Online resources can disappear without notice
  3. Performance problem if there are any network problem
What I recommend is to add Centomass.png to __Files__, and reference it as __Icon__='CenterOfMass/Centomass.png' so it will be installed and accessed locally.

Code: Select all

...
__Icon__ = 'CenterOfMass/Centomass.png'
...
__Files__ = 'CenterOfMass/Centomass.png,CenterOfMass/Macro_CenterOfMass_import.png,CenterOfMass/Macro_CenterOfMass_compute.png,CenterOfMass/Macro_CenterOfMass_save.png,CenterOfMass/Macro_CenterOfMass_material.png,CenterOfMass/Macro_CenterOfMass_com.png,CenterOfMass/Macro_CenterOfMass_colorify.png'
galou_breizh
Posts: 342
Joined: Wed Sep 15, 2010 9:38 am

Re: Mnesarco Utils Extension Pack

Postby galou_breizh » Mon Feb 22, 2021 2:31 pm

I think you forgot to mention that your Add-on is called MnesarcoUtils.

A personal remark. I tend to prefer the philosophy that each tool (or add-on) should fulfill one function but I fully understand that you don't want to publish many micro add-ons.

Thanks for all the work you accomplish for FreeCAD!
Gaël
User avatar
mnesarco
Posts: 266
Joined: Thu Mar 26, 2020 8:52 pm

Re: Mnesarco Utils Extension Pack

Postby mnesarco » Mon Feb 22, 2021 2:48 pm

galou_breizh wrote:
Mon Feb 22, 2021 2:31 pm
I think you forgot to mention that your Add-on is called MnesarcoUtils.

A personal remark. I tend to prefer the philosophy that each tool (or add-on) should fulfill one function but I fully understand that you don't want to publish many micro add-ons.

Thanks for all the work you accomplish for FreeCAD!
Gaël
Yes, this is a collection of unrelated utilities, so there is no better name at the moment. I have a lot of small quick and dirty utilities that I use in my workflow, MnesarcoUtils is an attempt to curate, and share some of them and an opportunity to do some QA.