[New feature] Sketcher Constrain Contextually

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
fortress_bravo
Posts: 7
Joined: Thu Feb 03, 2022 10:28 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by fortress_bravo »

paddle wrote: Fri Feb 04, 2022 7:59 pm As GeneFC pointed out in PR topic, it's a big feature so it may take a while to merge.
...
In the meantime I'm improving some small things and looking for the eventual bug.
Awesome, thanks. I'm brand new to development on FreeCAD and it will likely take me a while to figure things out in this project and get my dev environment set up (thanks for your Getting Started video, btw), but I'll start by just testing this out from the Linux side. If there are things in particular you'd like testing to be focused on, please shout them out.

Also, I can imagine how much time you've spent on this, but I think I can confidently say your changes on this and the sketcher tools will probably save me hours. Across all users, I'd imagine you'll collectively save people months, if not years, of time. Many thanks for your efforts!
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by paddle »

fortress_bravo wrote: Fri Feb 04, 2022 10:38 pm
paddle wrote: Fri Feb 04, 2022 7:59 pm As GeneFC pointed out in PR topic, it's a big feature so it may take a while to merge.
...
In the meantime I'm improving some small things and looking for the eventual bug.
Awesome, thanks. I'm brand new to development on FreeCAD and it will likely take me a while to figure things out in this project and get my dev environment set up (thanks for your Getting Started video, btw), but I'll start by just testing this out from the Linux side. If there are things in particular you'd like testing to be focused on, please shout them out.

Also, I can imagine how much time you've spent on this, but I think I can confidently say your changes on this and the sketcher tools will probably save me hours. Across all users, I'd imagine you'll collectively save people months, if not years, of time. Many thanks for your efforts!
Linux is the way to go I think too. I'm using w10 now but that's mostly because I changed of laptop and wasn't sure I could get all of its functionality working on linux (and I got lazy).

If you are looking for ideas and/or want to cooperate on development I'd be glad for company :D! If you want to test things first you can try my constrain contextually branch and try this tool and check for bugs. Also try the tool widget when creating geometries.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by abdullah »

I do like this feature.

I think that function-wise is a good start. I do not know if it would make sense to allow constraints to be pickable, an enabling to edit the dimension if clicked (given that it is a contextual dimensioning tool, enabling to modify dimensions without exiting the tool might be convenient, but I did not give it too much thought).

I am torn about the "Tool settings" widget. I know other software use tool properties widget (gimp for example). I am unsure if the taskbar is the right place for this, but I do not have a clear picture of where it could be better (or worse). It has crossed my mind floating near the click position (but it may clutter the view), or floating on the right bottom corner as an overlay and only while a tool making use of it is actually active. I would like to hear user feedback about this (we are trying to make it right).

While one modifier (such as "shift") is ok, I am not sure we should have more than one, and even then, it is the loss of intuitiveness with one (we have the same case in other parts, so it is a global issue), with more is worse. With this in mind, I wonder if it would make sense to have a small floating dialog (I was forced under duress to use Word lately, I still have nightmares, but they overlay a bar with bold, italics,... over a text selection and that part was not that bad), for switches or modifier kind of action, it might make sense to have this close to the clicking point (being small, we might even move it to avoid the mouse).

I am still to look to the code, but I wanted to give some feedback and trigger other views. It will take me some time, because I will be in very low availability during February.
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by paddle »

I like it here personally. Because it reminds me of when you use partdesign tools, you have to enter dimensions there.
Also having it here means that it is not hiding a part of the 3d model window.

Regarding the alternative with shift I think it depends on the case.
For some it's not very intuitive it's true. Though I got used to them easily.
But for some it is fairly intuitive.
For instance for 1 point it alternate between lock and autodistance
Or for one line it's good too. It alternates between autodistance vertical and horizontal and block.
Though for 3 points or 3 lines and such it might be too complex.

However, having those more complex alternate modes do not remove anything, they are not doing anything unless user is trying to alternate in the first place. So even if they are not very intuitive it might be interesting to keep them for users who get more familiar with the tool.

On the other hand the currently available alternate constraints might not be the most intuitive but it's the best we came up with with Haavard.
Last edited by paddle on Sat Feb 05, 2022 1:20 pm, edited 1 time in total.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by NewJoker »

abdullah wrote: Sat Feb 05, 2022 7:31 am I am unsure if the taskbar is the right place for this, but I do not have a clear picture of where it could be better (or worse). It has crossed my mind floating near the click position (but it may clutter the view), or floating on the right bottom corner as an overlay and only while a tool making use of it is actually active. I would like to hear user feedback about this (we are trying to make it right).
Commercial software uses dimension value fields directly for that:

SolidWorks:
sw widget.png
sw widget.png (36.4 KiB) Viewed 1833 times

Fusion360:
fusion widget.png
fusion widget.png (12.3 KiB) Viewed 1833 times

I like this approach but I will be also happy with the current design proposed by paddle. Both these features (contextual dimension constraint and tool settings widget) are game-changers for me and I hope that they will be implemented soon.
drmacro
Veteran
Posts: 8867
Joined: Sun Mar 02, 2014 4:35 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by drmacro »

NewJoker wrote: Sat Feb 05, 2022 12:54 pm ...
I like this approach but I will be also happy with the current design proposed by paddle. Both these features (contextual dimension constraint and tool settings widget) are game-changers for me and I hope that they will be implemented soon.
Let state upfront, I'm asking out of legitimate interest, not being snarky or anything. ;)

I'm curious what makes this feature a game changer?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by NewJoker »

drmacro wrote: Sat Feb 05, 2022 1:04 pm Let state upfront, I'm asking out of legitimate interest, not being snarky or anything. ;)

I'm curious what makes this feature a game changer?
It's very convenient for me in commercial software and I'd love to finally see it in FreeCAD as well. Of course, the same sketch can be created without it but there's much more tedious clicking. For example, to draw a dimensioned rectangle you have to:

1) commercial software with these tools:
- select rectangle tool
- pick starting point
- type first dimension
- press Tab
- type second dimension
- press Enter

2) FreeCAD without these tools:
- select rectangle tool
- pick starting point
- pick end point
- select horizontal dimension
- choose horizontal line
- type dimension
- press Ok
- select vertical dimension
- choose vertical line
- type dimension
- press Ok

So almost two times more steps to draw a simple rectangle.

That's just for the tool settings widget. The other feature (contextual dimension) is also very handy since you don't have to switch back and forth between the 5 dimension constraint types.
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by paddle »

drmacro wrote: Sat Feb 05, 2022 1:04 pm I'm curious what makes this feature a game changer?
For Constrain Contextually you don't have to think about which constrain tool to select and where it is. It relieves the mind to focus on the design itself. Which makes it feel easier to use. And I'm pretty sure it speeds up work, though I have not made any time measurements.

For ToolSettings I measured time necessary to make a fully constrained rectangle. 25 seconds without it, 5 seconds with it.

We could make a speed test to see how fast one can reproduce a sketch with and without those two features. I wouldn't be surprised that there's at least a factor 2 or 3.
User avatar
paddle
Veteran
Posts: 1392
Joined: Mon Feb 03, 2020 4:47 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by paddle »

NewJoker wrote: Sat Feb 05, 2022 12:54 pm Commercial software uses dimension value fields directly for that:

SolidWorks:
sw widget.png

Fusion360:
fusion widget.png
This looks really good! I actually never used SW and Fusion so I didn't knew.
It could be great for Constrain Contextually, though it would require some Coin/Qt magic that is far beyond my current skills.
For ToolSettings though it wouldn't be adapted.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: NEW FEATURE ! Sketcher Constrain Contextually

Post by NewJoker »

paddle wrote: Sat Feb 05, 2022 1:28 pm For Constrain Contextually you don't have to think about which constrain tool to select and where it is. It relieves the mind to focus on the design itself. Which makes it feel easier to use. And I'm pretty sure it speeds up work, though I have not made any time measurements.

For ToolSettings I measured time necessary to make a fully constrained rectangle. 25 seconds without it, 5 seconds with it.

We could make a speed test to see how fast one can reproduce a sketch with and without those two features. I wouldn't be surprised that there's at least a factor 2 or 3.
Exactly, some people (mostly FreeCAD traditionalists) will prefer to work without these features but for many users (especially those coming from commercial software like Fusion, and there's a lot of them) they will be crucial. They can make sketching much faster and much more convenient.
Post Reply