[Merged] Missing Icons for Points Workbench

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

[Merged] Missing Icons for Points Workbench

Post by Kunda1 »

Anyone interested in creating icons for these missing functions in the Points Workbench ?
Last edited by Kunda1 on Tue Dec 01, 2020 1:10 pm, edited 1 time in total.
Reason: Added [Merged]
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Missing Icons for Points Workbench

Post by bitacovir »

Kunda1 wrote: Sat Nov 21, 2020 6:25 pm Anyone interested in creating icons for these missing functions in the Points Workbench ?
I just finished with Std Tool icons. Do you want me to take this?
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Missing Icons for Points Workbench

Post by Kunda1 »

bitacovir wrote: Sat Nov 21, 2020 9:38 pm I just finished with Std Tool icons. Do you want me to take this?
Nice! Thank you for your work!
If you have some time, that would be fantastic! But no rush and please pace yourself. ;)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Missing Icons for Points Workbench

Post by bitacovir »

Proposal of icon for Convert to points command http://www.freecadweb.org/wiki/Points%20Convert
inkscape_Y67cPnQ0uc.png
inkscape_Y67cPnQ0uc.png (19.36 KiB) Viewed 1570 times
.
.
Proposal of icon for Structured point cloud command http://www.freecadweb.org/wiki/Points%20Structure
inkscape_4ppvWQ35At.png
inkscape_4ppvWQ35At.png (12.77 KiB) Viewed 1570 times
.
.
Proposal of icon for Merge point clouds command http://www.freecadweb.org/wiki/Points%20Merge
inkscape_9NHJr6bk8b.png
inkscape_9NHJr6bk8b.png (13.15 KiB) Viewed 1570 times
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Missing Icons for Points Workbench

Post by Kunda1 »

Nice work! They all look great to me.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Missing Icons for Points Workbench

Post by bitacovir »

Kunda1 wrote: Sun Nov 22, 2020 1:11 pm Nice work! They all look great to me.
Good. I'll do a PR next week.
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Missing Icons for Points Workbench

Post by HakanSeven12 »

Hi nice work but if I remember correctly, this commands not added to toolbar. They could be added to a new toolbar.
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Missing Icons for Points Workbench

Post by bitacovir »

HakanSeven12 wrote: Sun Nov 22, 2020 8:50 pm Hi nice work but if I remember correctly, this commands not added to toolbar. They could be added to a new toolbar.
I don't know how to do that. Only I know how to link the command with the svg icon in the menus.
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Missing Icons for Points Workbench

Post by HakanSeven12 »

Me too I don't have any experience on c++ workbenches.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Missing Icons for Points Workbench

Post by Kunda1 »

I don't have experience either but if we extrapolate from previous commits we can see that:
  • each c++ workbench has a src/Mod/Points/<Workbenchname>/Gui/ directory
  • SVG Icons are put in Gui/Resources/Icons
  • Icon names are also registered in the src/Mod/<WBname>Gui/Resources/<WBname>.qrc
  • Each command function has a sPixmap variable that needs to match the name of the svg icon in the Icons/ directory
  • The commands are then registered in src/Mod/<WBname>/Gui/Workbench.cpp in order to display then in the GUI.
    Note: We can see from src/Mod/<WBname>/Gui/Workbench.h that there are functions to add commands and their icons to

    Code: Select all

      Gui::ToolBarItem* setupToolBars() const;
      Gui::ToolBarItem* setupCommandBars() const;
      Gui::MenuItem* setupMenuBar() const;
    
    This probably means we can choose to add the commands to different parts of the GUI. ToolBar, the CommandBar(not sure what this means) and MenuBar(Drop down menu associated with the WBname)
    In more complex workbenches that have elaborate toolbars (like sketcher) it's possible to create multiple toolbars. Looks like they need to be registered in Workbench.h and then built in Workbench.cpp

    Source: https://github.com/FreeCAD/FreeCAD/comm ... 3cc94d9bfb
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply