Basic usability improvements brainstorm

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ghedger42
Posts: 5
Joined: Fri Jun 08, 2018 1:57 pm

Basic usability improvements brainstorm

Post by ghedger42 »

Hi all,

I'm new to FreeCAD and think it's a bang-up package.

As a software developer with a couple of decades of experience I wanted to test the waters on a couple of basic usability items that I think could add some polish - and I will be making these changes either in a fork, or with the dev team's permission, to the main trunk.

In the Sketcher, I was pleased to find that there is, in fact, a key equivalent for adding the common horizontal and vertical constraints (SHIFT-H and SHIFT-V). The main thing I would like to fix is the ability to pick a point (like, oh, say, the origin), where there's something on top of it (like one of the many extra planes that gets added). In similar situations in other software I've seen, parts in a cluster of parts wiil "explode" outward, when the user hovers, with lines tying them to the in situ objects in the windows; the user then picks the intended object from the exploded parts. This could be a pretty nice feature and make things much more pleasant than switching back to the model, trying to hide the right object, switching back to sketcher.

Object correlation in the main object view would be nice as well: what is this object? To what body does it belong? Any way to show it to me in the hierarchy tree on the left?

The "Navigation Mode" doesn't seem to do anything; I'm an intermediate-level Blender user and "Blender" navigation works nothing like Blender.

Keep in mind, I'm new, and it's very likely that many of my suggestions are already addressed. These are changes I myself am proposing to make, so not asking for anything, just want to solicit other ideas to improve basic productive usage of what is a fine and promising CAD engineering tool.
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Basic usability improvements brainstorm

Post by chrisb »

Hi ghedger42, welcome to the FreeCAD forum.
Good to hear you want to enforce the developer team. For an introduction and to get comfortable with the development you may want to have a look at Kunda1's list of lowhangingfruit.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Basic usability improvements brainstorm

Post by NormandC »

Hi,

ghedger42 wrote: Sat Jun 09, 2018 1:30 am In similar situations in other software I've seen, parts in a cluster of parts wiil "explode" outward, when the user hovers, with lines tying them to the in situ objects in the windows; the user then picks the intended object from the exploded parts.
I've used a few CAD packages over the years, and none of them ever provided such a thing. I'm really not sure how that would work out. Could you point us to a video that shows this?

The commercial CAD program I use at work provides a "quick pick" contextual menu that lists the objects underneath the mouse pointer; once the menu is opened (with a right-click), hovering each item in the list highlights it in the 3D view; clicking on an item selects it.

ghedger42 wrote: Sat Jun 09, 2018 1:30 am The "Navigation Mode" doesn't seem to do anything
Of course it does something. But it pertains to manipulation of the 3D view using the mouse, and nothing else. The Navigation Indicator shows the current style and what it does when you hover its button.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Basic usability improvements brainstorm

Post by abdullah »

ghedger42 wrote: Sat Jun 09, 2018 1:30 am
In the Sketcher, I was pleased to find that there is, in fact, a key equivalent for adding the common horizontal and vertical constraints (SHIFT-H and SHIFT-V). The main thing I would like to fix is the ability to pick a point (like, oh, say, the origin), where there's something on top of it (like one of the many extra planes that gets added). In similar situations in other software I've seen, parts in a cluster of parts wiil "explode" outward, when the user hovers, with lines tying them to the in situ objects in the windows; the user then picks the intended object from the exploded parts. This could be a pretty nice feature and make things much more pleasant than switching back to the model, trying to hide the right object, switching back to sketcher.
Welcome!

Either the explode and pick, or a contextual menu is a very much needed feature in the Sketcher. When there are overlapping points and lines in the sketcher, it would be great to be able to pick what you want with the mouse without resorting to the elements Widget. Such cases are for example in a bpsline selecting the endpoint pole circle center instead of the endpoint of the b-spline or the corresponding knot, which with normal multiplicity, all lie exactly on the same spot. Also selecting endpoints of different lines which have one end at the same position (for example due to a coincidence constraint). Also overlapping lines...

About the visibility of the feature, in v0.18 a clipping plane has been recently introduced so that it clips out a section and you can see exactly where you are editing the sketch (clips away the part of the feature that is between the camera and the sketch).

About general visibility management, it would be great to have some way to switch on/off the visibility of features preceding the sketch without going to the tree view, at least for common operations...

The relevant sketcher selection code is at ViewProviderSketch.cpp, where you can see the "pickray" functions. My advise would be to fork FreeCAD in github and work there in your fork. This would help that others can see what you are working on, if you have questions or suggestions you can show them easily... Github works rather well at least for the time being.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Basic usability improvements brainstorm

Post by Kunda1 »

chrisb wrote: Sat Jun 09, 2018 5:17 am Hi ghedger42, welcome to the FreeCAD forum.
Good to hear you want to enforce the developer team. For an introduction and to get comfortable with the development you may want to have a look at Kunda1's list of lowhangingfruit.
@chrisb it's actually:https://freecadweb.org/tracker/search.p ... ngingfruit
I don't think the link you posted works as intended
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
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Basic usability improvements brainstorm

Post by chrisb »

Kunda1 wrote: Sat Jun 09, 2018 2:22 pm @chrisb it's actually:https://freecadweb.org/tracker/search.p ... ngingfruit
I don't think the link you posted works as intended
I think they both lead to the same result but yours sure is better because it uses the symbolic restriction and not some internal code.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ghedger42
Posts: 5
Joined: Fri Jun 08, 2018 1:57 pm

Re: Basic usability improvements brainstorm

Post by ghedger42 »

NormandC wrote: Sat Jun 09, 2018 5:29 am
I've used a few CAD packages over the years, and none of them ever provided such a thing. I'm really not sure how that would work out. Could you point us to a video that shows this?

The commercial CAD program I use at work provides a "quick pick" contextual menu that lists the objects underneath the mouse pointer; once the menu is opened (with a right-click), hovering each item in the list highlights it in the 3D view; clicking on an item selects it.
Norman, my background is in software and electrical engineering, not mechanical, so I defer to those (like yourself) with deep CAD experience. A context menu would probably be easier to implement the way you suggest. Good idea!
ghedger42
Posts: 5
Joined: Fri Jun 08, 2018 1:57 pm

Re: Basic usability improvements brainstorm

Post by ghedger42 »

abdullah wrote: Sat Jun 09, 2018 6:42 am The relevant sketcher selection code is at ViewProviderSketch.cpp, where you can see the "pickray" functions. My advise would be to fork FreeCAD in github and work there in your fork. This would help that others can see what you are working on, if you have questions or suggestions you can show them easily... Github works rather well at least for the time being.
Thank you, Abdullah. I have it set up to build already and am using the .18 one. I will make a fork as you suggest and look at the pickray functions in ViewProviderSketch.cpp. Seems I am not alone in the belief this feature would add value.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Basic usability improvements brainstorm

Post by NormandC »

ghedger42 wrote: Sun Jun 10, 2018 4:38 am Seems I am not alone in the belief this feature would add value.
No matter how it is implemented, it would certainly do!
ghedger42
Posts: 5
Joined: Fri Jun 08, 2018 1:57 pm

Re: Basic usability improvements brainstorm

Post by ghedger42 »

Short story, it's using the last-hovered-over item to determine what will be selected in case the user hits the mouse button. It's already determined what will be chosen and does not do it at the time of the click.

Preliminary analysis: Evaluating the mouseButtonPressed event handler, it appears it is relying on what has already been picked in line 1593 (I am testing with points only for now) in onSelectionChanged()), called by an observer pattern; and in line 1749 in detectPreselect(), which is called by the mouseMove event. For a point, this data found in the EditData struct, PreselectPoint member variable.

I've only put half an hour into this, but what we want looks do-able; just going to need to rethink a few things and apply some of the selection heuristics in the mouse click itself rather than relying only on what the cursor last hovered over. I'll have to look at the cadence of how this connects to the higher-level application layers and possibly add a Qt signal/slot pair to handle the menu and selection, but will follow conventional precedent elsewhere in the codebase.

The primitive disambiguation menu should only pop up if there's ambiguity; if (as it appears designed to work presently) there's only one geometric prim at the point of the click, it should behave as at present.

More later, and again thank you for the help.
Post Reply