Homogeneize general selection and picking all across Freecad.

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
RatonLaveur
Posts: 786
Joined: Wed Mar 27, 2019 10:45 am

Homogeneize general selection and picking all across Freecad.

Postby RatonLaveur » Sat May 02, 2020 7:40 pm

Hi all, selection and picking of objects, vertices, edges and faces is a task that is found all across freecad. It is universal in a 3D GUI based CAD environment.

Unfortunately not all tools work the same way.

For some you would have to click Add geometry then select the face and repeat this everytime. For others you have to preselect the objects and click Add. Some allow you to pick from a list.

Then once the list is populated, some tools have a remove geometry button, but some don't. Some allow you to right click in the list and select to clear the selection and some don't.

Then if you want to check, some allow you to highlight the geometry from the list. Some don't.

This is obviously the result of the wonderfully balkanized effort over decades in FreeCAD. But is definitely a hurdle for newcomers or even simple experienced end users.

Is there do you think a valid reason to suggest a homogenization of picking methods and behaviors in FreeCAD? ( Note that i do not pretend to know the right answer).
vocx
Posts: 5029
Joined: Thu Oct 18, 2018 9:18 pm

Re: Homogeneize general selection and picking all across Freecad.

Postby vocx » Sat May 02, 2020 9:12 pm

RatonLaveur wrote:
Sat May 02, 2020 7:40 pm
...

Is there do you think a valid reason to suggest a homogenization of picking methods and behaviors in FreeCAD?
It is a good idea to standardize interfaces. However, you should provide clear examples of the behaviors that you see so that everybody is aware of the issue. Many users only focus on a few workbenches so sometimes they don't see the big picture of how other workbenches behave.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Chris_G
Posts: 1428
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Homogeneize general selection and picking all across Freecad.

Postby Chris_G » Sat May 02, 2020 9:29 pm

I agree. This is definitely an area where I would have loved to have a more "guided" path to follow.
RatonLaveur
Posts: 786
Joined: Wed Mar 27, 2019 10:45 am

Re: Homogeneize general selection and picking all across Freecad.

Postby RatonLaveur » Sat May 02, 2020 10:08 pm

Hi, glad to have some positive feedback here. I'll try to describe a little the different behaviors I mean.

Example1: Part Design - Chamfer

Overall, Part Design picking is a "Selection oriented" action. Which means the underlying idea is to pick what you need in the viewport, and a list is populated.
2020-05-02 23_46_41-Presentation1 - PowerPoint.png
2020-05-02 23_46_41-Presentation1 - PowerPoint.png (71.08 KiB) Viewed 439 times
1. If no edge or face is selected when pressing chamfer, an error is returned as a popup.
2. Once an edge or face is selected and the Chamfer function is called, the list is populated
3. It is possible to press the Add button, and the system stays in "Add" mode, which means I can click on as many faces or edges in a row as a i like, the list get populated. Note that in that case if I click on one of the items, it is highlighted in the Viewport (nice!)
Also the active faces/edges are highlighted purple, which really helps keeping track.
4. In the list, i can right click to clear items, but for dialog says Remove and Del as if there were two options.
5. The last face cannot be removed or deleted (most likely due to behavior described in 1.

Example2: Part - Chamfer

Overall, Part picking is a "Selector oriented" action. Here a "list of options" is offered to the user for them to pick and choose.
2020-05-02 23_54_17-Presentation1 - PowerPoint.png
2020-05-02 23_54_17-Presentation1 - PowerPoint.png (96.79 KiB) Viewed 439 times
1. I can enter the chamfer tool without any prior requirement.
2. As soon as I have selected the target object, the list is populated with all accessible edges. However, even if I select the "faces" tick box, the list remains populated with edges. Note that in that case if I click on one of the items, it is highlighted in the Viewport (nice!) But the ticked edges are not highlighted purple, which makes it harder to keep track of what is active and what isn't.
3. I have access to variable length here. Which I don't in part design... :(

Example3: FEM - Meshing

Overall FEM picking is ...well it's the strangest of them (I think also the oldest, has not been touched in a while) and it shows clearly that the FEM crowd has been working hard at pushing the FEM core more than the GUI. And when you see their results no one can complain :)
2020-05-02 23_50_08-Presentation1 - PowerPoint.png
2020-05-02 23_50_08-Presentation1 - PowerPoint.png (157.94 KiB) Viewed 439 times
1. Once I have selected a shape I can select Gmesh and create my base mesh (not exactly a selection tool, but a necessary preparatory step).
2. After selecting the mesh object in the model tree, I can select Refinement Regions, here a selection dialog occurs, we're back on topic!
3. We have only an Add button here...and I must press Add then select the object. And repeat the operation every time (no toggle mode).
4. To clean up the list, a right-click is necessary. Here the options are different than in the Example1 above, I can either remove the selected item or clear the whole list. Note that in that case if I click on one of the items, it is highlighted in the Viewport (nice!)

Example4: CfdOF - Meshing

Overall CfdOF picking has received some love in the recent versions. It is very functional, but yet still very different from all other examples in both presentation and functionality.
2020-05-03 00_30_07-Presentation1 - PowerPoint.png
2020-05-03 00_30_07-Presentation1 - PowerPoint.png (157.11 KiB) Viewed 427 times
0. Same step as Example3 above. Create the base mesh.
1. Select the mesh object in the CfdOF analysis tree, and press Mesh Refinement, the dialog appears.
2. Here the Add button is a toggle allowing rapid and painless selection of items in Viewport. The list gets populated.
3. There is an option "Select from list" that opens the choice of object (similar to Part, but hidden initially).
4. Once the object is selected, the list is automatically populated with available items.

Note that there is no tracking of the selection here either. The purple highlights seen in Part Design are specific to that workbench, but its so nice I believe it should be added to a homogenization effort.
Also note that in this example, right clicking in the list does nothing (no contextual menu/removal options).

There are many other examples I'm sure, especially since I have not explored the whole set of FreeCAD workbenches.

I understand that this discussion is not easy, as each of these tools belongs to a module or workbench that is maintained by a different group of people with a different vision and sometimes different requirements (obviously chamfering and mesh refinement are not exactly the same thing).

However consistency in the toggles, in the contextual menus (right-click) and in the general behavior would go a long way towards user friendliness. If I had to choose I would say that the tools in Part are the most functional, especially with minor modifications such as purple highlighting of all active features, but that's only my individual opinion.

What do you think of my examples?
adrianinsaval
Posts: 344
Joined: Thu Apr 05, 2018 5:15 pm

Re: Homogeneize general selection and picking all across Freecad.

Postby adrianinsaval » Sun May 10, 2020 10:39 pm

I like how cfdof allows both methods, maybe there is a way to make a generalized shape selection widget, that accepts filters or some constraints when called. And then the different task panels just call that generalized widget, give the filters and constraints it has and retrieves the data it needs. Can this be done? Or is it necessary to change the widgets one by one for each tool?
User avatar
mfasano
Posts: 88
Joined: Wed Apr 11, 2018 12:31 pm

Re: Homogeneize general selection and picking all across Freecad.

Postby mfasano » Wed May 13, 2020 12:43 pm

Would making a start for this be a good GSoC project? It may be too ambitious. That would give us almost a year to come up with some consensus of what the interface should be.
RatonLaveur
Posts: 786
Joined: Wed Mar 27, 2019 10:45 am

Re: Homogeneize general selection and picking all across Freecad.

Postby RatonLaveur » Wed May 13, 2020 1:44 pm

I don't really know how ambitious that would be. Afterall, all the functions are all here but mismatched in different areas of FreeCAD.
Step 1 would to identify all areas in which selection and picking is called for (i know of only a few that I described above).
Step 2 would to identify what works/is intuitive and what does not work, for example:
---------Picking one by one with a press of Add everytime does not work.
--------------------Toggling Add works.
---------Right clicking in the list and being able to select/delete/clear list seems to be intuitive.
---------------------Right clicking in the list and nothing happening is counter-intuitive.
---------Since Add is a function, Remove should also be a function.
---------Visualizing the selection as it goes is quite useful (purple highlighting) to immediately, before computation, if my selection looks right.
---------Showing all available items...I don't know honestly...
---------Being able to pre-select, then apply the tool works
---------------------Not being able to do so either creates a dead-end popup or even worse, makes you lose your carefully selected list.
---------Being able to call all available features in the list seems to work (But I'm not sure it's necessary since Edge 1, isn't very clear what it is anyway, and Edge 2 is not necessarily right next to it...)

etc.
Step 3 would be to reformat the UI and functions in each area in which picking is done.
Step 4 would be to document the UI and functional template so that any WB or core contributor would have access to the backbone of the function.

I think the homogeneization itself would be tedious but not particularly challenging work. Then again, I may be stuck low in the Dunning-Kruger curve.
adrianinsaval
Posts: 344
Joined: Thu Apr 05, 2018 5:15 pm

Re: Homogeneize general selection and picking all across Freecad.

Postby adrianinsaval » Wed May 13, 2020 4:19 pm

This homogenization would be a great UX improvement! About showing all available items... I would like that as an option but not have it always on, maybe a "List all" toggle with filtering options that can be set first by the command itself and then the user, for example a command that only accepts faces will filter out edges and solids, one that accepts more than one type would offer the user the option to filter out the types he wants.
vocx
Posts: 5029
Joined: Thu Oct 18, 2018 9:18 pm

Re: Homogeneize general selection and picking all across Freecad.

Postby vocx » Wed May 13, 2020 8:01 pm

Related Multi-Geometry Modal Selection and Deselection.

Related [implemented] select several entities at once for fillets.

Realthunder mentions that the Link dialog that he developed for the LinkMerge can also be used for general selections; it could be embedded into a task panel and used by other workbenches, PR#2995: add PropertyXLinkList, refactor DlgPropertyLink.
realthunder wrote:
Mon Feb 17, 2020 2:08 am
Maybe it's too late, but I'd still like to mention about my recent improvement of the general link property editor here. When I develop it, I actually intended it to be reused by other workbenches. The editor dialog is designed to work modeless, so it is possible to embed it inside a task panel.

I don't know why I didn't mention this when you bring out the fillet edge selection problem. It must have slipped my mind, because too many stuffs are going on at the same time.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.