Part Fuse should be renamed Part Union

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part Fuse should be renamed Part Union

Post by triplus »

Redirect solution on Wiki likely won't work in offline documentation? Therefore as for renaming Part_Fuse to Part_Union.

It needs to happen here for the tool to be listed in the menu:

https://github.com/FreeCAD/FreeCAD/blob ... ch.cpp#L68

And here to be added to the toolbar:

https://github.com/FreeCAD/FreeCAD/blob ... h.cpp#L129

It's used in OpenSCAD WB (on toolbar) therefore to continue to have the command in OpenSCAD WB:

https://github.com/FreeCAD/FreeCAD/blob ... Gui.py#L57

Renaming the icon probably does make sense:

https://github.com/FreeCAD/FreeCAD/blob ... t_Fuse.svg

And after to change that in resource file:

https://github.com/FreeCAD/FreeCAD/blob ... rt.qrc#L19

Correct name needs to be used when the icon is created:

https://github.com/FreeCAD/FreeCAD/blob ... an.cpp#L70

https://github.com/FreeCAD/FreeCAD/blob ... n.cpp#L170

Adapting the offline documentation script should be done if it is still used:

https://github.com/FreeCAD/FreeCAD/blob ... pdf.py#L66

Add back the tool to Complete WB:

https://github.com/FreeCAD/FreeCAD/blob ... h.cpp#L504

And change the name of the command itself as suggested earlier:

https://github.com/FreeCAD/FreeCAD/blob ... d.cpp#L441

Enabling the command to be found for help purposes:

https://github.com/FreeCAD/FreeCAD/blob ... d.cpp#L447

And finally icon name:

https://github.com/FreeCAD/FreeCAD/blob ... d.cpp#L449

Now this i guess would do. That is User will recognize the command as Part Union. Documentation should be correct and no redirects would be needed on the Wiki.

As for developers likely they will still have to look for "fuse" in the code. Therefore this i guess does show the importance of selecting good terminology from the beginning as once a term is used it likely won't change or the change will be hard to achieve. ;)

Anyway @sgrogan or anybody else i would suggest to go for it. I could do it but i am not sure if this weekend i will have any free time.
DeepSOIC wrote:There is one small thing. To an extent, I would like the command to be renamed too, because it's sometimes needed to find out the name of a command, and it's handy when wiki page name equals command name. If it's not the case, probably the only remaining way to find the command name is to inspect source code. Unless triplus comes to help, and asks his magic tabbar to create a table of command names, their menu strings and icons ;) .
For now i can offer you this method (GUI):

viewtopic.php?f=8&t=17442#p137505

Or this unfiltered method for command line:

viewtopic.php?f=8&t=17442#p137683

P.S. In hopefully not too distant future IconThemes module will likely have this functionality to ease the work for designers.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part Fuse should be renamed Part Union

Post by NormandC »

I'm glad that more people are getting interested about this issue.

But I'm feeling that we're rushing into things.

Not to mention that this is well outside the scope of this topic, as I already mentioned, and that it would be better to create a new topic in the Open discussion forum. Anyway, I'm finally getting into my head that I'm the only one here who gives a damn about this. :roll:

So, some things to consider:
  • What about backward compatibility? What would happen when opening a file made prior to this change?
  • What about the python command? It's also named fuse. If changed, this has the potential of causing much trouble.
  • Another Boolean operation is affected as well: Intersection is named Common internally. As for Cut, it has the same name internally as in the GUI, but I'm of the opinion it may be best to rename it as well, see at the end of my reply.
  • Any other consideration we have not thought about.
To be honest I'd prefer for wmayer to share his thoughts before we go any further.
sgrogan wrote:EDIT: I've based my whole opinion on the assumption that changing the gui was discussed and decided it was better for the user. Is reverting the gui to fusion an option?
I do not even recall when it was changed. Just looking at the commit descriptions in /src/Mod/Part/Gui/Worbench.cpp history does not show anything related.

I only noticed it recently because a newcomer said he was not finding the "Fuse" tool and I checked it out. My version of FreeCAD is always in French, I only switch to English when I prepare screen shots for the forum.

Regardless, IMO this change was very logical in a usability point of view. Booleans in constructive solid geometry are universally known as "Union", "Subtraction" (or Difference) and "Intersection". Fuse, cut and common are very rarely used, if ever. At least I've never known any other CAD program that named them that way. I'm pretty sure the BOPs are named so in the Open Cascade kernel itself.
Last edited by NormandC on Fri Sep 16, 2016 1:40 am, edited 2 times in total.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part Fuse should be renamed Part Union

Post by NormandC »

Interesting:
DeepSOIC wrote:for reference.
src/Mod/Part/Gui/Command.cpp:

Code: Select all

//===========================================================================
// Part_Fuse
//===========================================================================
DEF_STD_CMD_A(CmdPartFuse);

CmdPartFuse::CmdPartFuse()
  :Command("Part_Fuse")
{
    sAppModule    = "Part";
    sGroup        = QT_TR_NOOP("Part");
    sMenuText     = QT_TR_NOOP("Union");
    sToolTipText  = QT_TR_NOOP("Make a union of several shapes");
    sWhatsThis    = "Part_Fuse";  // <-- must equal to wiki page name, IMO
    sStatusTip    = sToolTipText;
    sPixmap       = "Part_Fuse";
}
(Direct link to Github: https://github.com/FreeCAD/FreeCAD/blob ... d.cpp#L447)

If I understand correcly, what could be done instead of renaming the BOP commands internally like we've been discussing, is the following:
  • In the code, only change the sWhatsThis string to the GUI name (Part_Union) rather than the command name (Part_Fuse)
  • Make sure the wiki page name is the same as the GUI name (Part_Union) --> already done by Renato
  • No redirect page necessary, therefore no potential breakage of the offline documentation as triplus was putting into question.
  • In the code, change the label created by the Part Union tool to "Union" rather than "Fusion", change labels accordingly for the other BOPs. Might not incur undesirable consequences (after all other labels are translatable - might be a good idea to finally make the BOP labels translatable as well).
It seems to me that it would be much easier and less prone to unexpected consequences.

There's just one thing, not sure what would have to be done with the icon names in the wiki.
Last edited by NormandC on Fri Sep 16, 2016 1:47 am, edited 1 time in total.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part Fuse should be renamed Part Union

Post by triplus »

NormandC wrote:
  • What about backward compatibility? What would happen when opening a file made prior to this change?
  • What about the python command? It's also named fuse. If changed, this has the potential of causing much trouble.
  • Another Boolean operation is affected as well: Intersection is named Common internally. As for Cut, it has the same name internally as in the GUI, but I'm of the opinion it may be best to rename it as well, see at the end of my reply.
  • Any other consideration we have not thought about.
AFAIK the changes i listed won't affect backward compatibility. At best they could brake a macro or two if there is a macro out there relying on finding the command by its name. Or maybe somebody made custom workbench and added Part Fuse in menu/toolbar and therefore after the change the command wouldn't be there anymore until new name would be used.
To be honest I'd prefer for wmayer to share his thoughts before we go any further.
Sure i have no problem with that. I did my part the rest is not up to me anymore.
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Part Fuse should be renamed Part Union

Post by renatorivo »

Hi,
NormandC wrote:Regardless, IMO this change was very logical in a usability point of view. Booleans in constructive solid geometry are universally known as "Union", "Subtraction" (or Difference) and "Intersection". Fuse, cut and common are very rarely used, if ever. At least I've never known any other CAD program that named them that way. I'm pretty sure the BOPs are named so in the Open Cascade kernel itself.
I do not want to interfere, but I found this https://dev.opencascade.org/doc/refman/ ... ation.html
opencascade-boolean.png
opencascade-boolean.png (5.42 KiB) Viewed 1818 times
and this http://docs.salome-platform.org/7/gui/G ... _page.html
salome-booleans.png
salome-booleans.png (4.67 KiB) Viewed 1818 times
About

Code: Select all

//===========================================================================
// Part_Fuse
//===========================================================================
DEF_STD_CMD_A(CmdPartFuse);

CmdPartFuse::CmdPartFuse()
  :Command("Part_Fuse")
{
    sAppModule    = "Part";
    sGroup        = QT_TR_NOOP("Part");
    sMenuText     = QT_TR_NOOP("Union");
    sToolTipText  = QT_TR_NOOP("Make a union of several shapes");
    sWhatsThis    = "Part_Fuse";
    sStatusTip    = sToolTipText;
    sPixmap       = "Part_Fuse";
}
seems to me that the only thing to change is Union: sMenuText = QT_TR_NOOP("Union"); which is what appears in the GUI, and which is what confuses users.


Renato
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Part Fuse should be renamed Part Union

Post by cox »

renatorivo wrote:seems to me that the only thing to change is Union
+1

It seams rather sane to me to keep naming consistent throughout code and GUI.
Need help? Feel free to ask, but please read the guidelines first
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Part Fuse should be renamed Part Union

Post by sgrogan »

NormandC wrote:Not to mention that this is well outside the scope of this topic, as I already mentioned, and that it would be better to create a new topic in the Open discussion forum. Anyway, I'm finally getting into my head that I'm the only one here who gives a damn about this. :roll:
I think the whole topic should be mover to the developer forum. This discussion has revealed, IMHO, that the issue extends well beyond the wiki.
NormandC wrote:To be honest I'd prefer for wmayer to share his thoughts before we go any further.
+1
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part Fuse should be renamed Part Union

Post by NormandC »

renatorivo wrote:I do not want to interfere, but I found this https://dev.opencascade.org/doc/refman/ ... ation.html
Renato, you are not interfering, just taking part in the discussion like all of us. ;)

Your screen capture proves my point about the names Fuse, Common and Cut being from the OCC kernel. Thanks for locating it!

However I do not agree with your conclusion. Just because these commands are named in some way in the source code is not a good reason for them to be called the same in the GUI. What should be paramount is usability, it's the whole point of this topic.

In a usability point of view, again:
NormandC wrote:Booleans in constructive solid geometry are universally known as "Union", "Subtraction" (or Difference) and "Intersection". Fuse, cut and common are very rarely used, if ever.
I will repeat again that this discussion has no further place here in the wiki forum. Some of the developers who should give their opinion never read the wiki forum. :roll:
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Part Fuse should be renamed Part Union

Post by sgrogan »

NormandC wrote:I will repeat again that this discussion has no further place here in the wiki forum. Some of the developers who should give their opinion never read the wiki forum. :roll:
OK viewtopic.php?f=10&p=137879#p137879
"fight the good fight"
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Part Fuse should be renamed Part Union

Post by renatorivo »

Before I forget,
I'd like to fix that, but the discussion (Developers corner) did not give a definitive answer.

Renato
Post Reply