Workbench Icon Creation - Suggested Software and Best Practice?

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
paullee
Veteran
Posts: 5136
Joined: Wed May 04, 2016 3:58 pm

Workbench Icon Creation - Suggested Software and Best Practice?

Post by paullee »

Hi, reading workbench creation and want to do some exercise on creating icon.
https://www.freecadweb.org/wiki/Workben ... orkbenches

Any suggested software? (Linux Fedora) Anywhere with more information on this subject?

I have almost not used any graphic software at all.


Thanks for any suggestion.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Workbench Icon Creation - Suggested Software and Best Practice?

Post by NormandC »

paullee, this has nothing to do with getting help on FreeCAD. So why did you post this in the Help forum?

Seriously.
paullee
Veteran
Posts: 5136
Joined: Wed May 04, 2016 3:58 pm

Re: Workbench Icon Creation - Suggested Software and Best Practice?

Post by paullee »

NormandC wrote: Mon Jun 18, 2018 12:43 am paullee, this has nothing to do with getting help on FreeCAD. So why did you post this in the Help forum?

Seriously.
:oops: My apology if there is nothing more about it in FreeCAD docs...

There is a hint in Workbench Creation doc: Icon = """paste here the contents of a 16x16 xpm icon"""...

Having no much idea about graphics, (I saw some 'strange characters' here in other WB), I am searching FreeCAD and via google e.g. and find some ArtWorks... Workbench Key (no idea what it is about)... hoping there may be something more here.

https://www.freecadweb.org/wiki/Artwork
https://www.freecadweb.org/wiki/Workbench_KEY

Will look other websites about it.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Workbench Icon Creation - Suggested Software and Best Practice?

Post by triplus »

SVG icons are the preferred choice but a bit harder to implement compared to using embedded XPM workbench icon approach. One option on how to implement SVG workbench icon support in a workbench that is not a part of default FreeCAD workbenches:

https://forum.freecadweb.org/viewtopic. ... 40#p119068

P.S. Basically you use a function in importable python module. To determine the location of your FreeCAD module and use that info to construct the path for your SVG workbench icon after.
paullee
Veteran
Posts: 5136
Joined: Wed May 04, 2016 3:58 pm

Re: Workbench Icon Creation - Suggested Software and Best Practice?

Post by paullee »

Thanks for pointing to the discussion and the module creation wiki that I am not aware of!

I am checking some tutorials on Gimp and Inkscape, both software I have not managed to learn to use it before.

It seem the better choice is Inkscape, hope it can change into the 'XPM' format - seem easier in setting than the more advanced setting for SVG.

http://write.flossmanuals.net/inkscape/creating-icons/
https://www.gimp.org/tutorials/Creating_Icons/
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Workbench Icon Creation - Suggested Software and Best Practice?

Post by triplus »

I would consider using XPM workbench icons as a legacy option. We actually had to invest effort in the past to port them to SVG:

https://forum.freecadweb.org/viewtopic.php?f=27&t=14426

XPM workbench icon will work but SVG workbench icon is what is desired/expected now. In addition FreeCAD modules not included in FreeCAD by default usually don't use the resource file approach to provide (icon) artwork. And therefore more or less use the same approach to determine the location of SVG artwork suitable for FreeCAD commands (and things like that).
Post Reply