Improvement Suggestion for f(x) Button in Sketcher Constraints Input Window

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!
Post Reply
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Improvement Suggestion for f(x) Button in Sketcher Constraints Input Window

Post by bejant »

This idea was originally brought up in the forum by another member but I'm opening this discussion so that I don't forget about it.

As an example, create a rectangle in Sketcher, click either the Horizontal Length Constraint or Vertical Length Constraint tool:
Image Image


and select the appropriate edge. The Insert Length dialog window opens, prompting the user for input:
20180715a.png
20180715a.png (13.04 KiB) Viewed 1031 times

All ok so far, but following is what I'd like to see changed.
If the user wants to use an Expression, the user has to click the f(x) button, and then the Insert Length dialog window displays a sub-window containing an additional set of Cancel / Ok buttons (really Discard / Ok buttons):
20180715b.png
20180715b.png (14.92 KiB) Viewed 1031 times

In order to use an Expression, the user:
  • clicks the f(x) button and inputs the Expression
  • clicks the sub-window Ok button to accept the Expression,
  • clicks the Insert length window Ok button to apply the Constraint.
I think a better way to input Expressions in the Insert Length window would be to have a separate Expression or f(x) input area below the Length input area:
20180715c.png
20180715c.png (16.63 KiB) Viewed 1031 times

This way the user simply keys the input into the corresponding input area and clicks Ok. I'd like the current behavior of the Result, along with the auto-complete suggestions, to remain.

Comments?


Oops - forgot to include:

OS: Ubuntu 16.04.4 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.14078 (Git)
Build type: None
Branch: master
Hash: be5e93ddfe29d49a4b1c02e7119b1f926549ccce
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
chrisb
Veteran
Posts: 53936
Joined: Tue Mar 17, 2015 9:14 am

Re: Improvement Suggestion for f(x) Button in Sketcher Constraints Input Window

Post by chrisb »

Which one should be taken if both fields contain a value?
If the upper input field is disabled as soon as an expression is entered, then the upper field could show the calculated value while the expression field shows the formula.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
eivindkvedalen
Posts: 602
Joined: Tue Jan 29, 2013 10:35 pm

Re: Improvement Suggestion for f(x) Button in Sketcher Constraints Input Window

Post by eivindkvedalen »

chrisb wrote: Sun Jul 15, 2018 9:24 pm Which one should be taken if both fields contain a value?
If the upper input field is disabled as soon as an expression is entered, then the upper field could show the calculated value while the expression field shows the formula.
The expression, if defined, will always override the entered value. However, in this case it is much better to just use the shortcut for adding an expression; type the '=' key, and you can enter the expression immediately.

Eivind
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Improvement Suggestion for f(x) Button in Sketcher Constraints Input Window

Post by ickby »

I agree with eivindkvedalen, the current way is very streamlined:

1. use "=" to enter expression mode
2. type expression
3. hit enter to accept

With the popup freecad combines the very fast typing only way with good presentation of additional options and information via the buttons and the result text. And it is consistant with the property editor, a huge plus IMHO.

The only thing that could be improved would be that after hitting enter the focus could be on the OK button of the contraint dialog, so that one can close the dialog directly by using enter two times.
chrisb
Veteran
Posts: 53936
Joined: Tue Mar 17, 2015 9:14 am

Re: Improvement Suggestion for f(x) Button in Sketcher Constraints Input Window

Post by chrisb »

ickby wrote: Mon Jul 16, 2018 5:53 am after hitting enter the focus could be on the OK button of the contraint dialog, so that one can close the dialog directly by using enter two times.
+1
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: Improvement Suggestion for f(x) Button in Sketcher Constraints Input Window

Post by NormandC »

eivindkvedalen wrote: Sun Jul 15, 2018 11:45 pm However, in this case it is much better to just use the shortcut for adding an expression; type the '=' key, and you can enter the expression immediately.
LOL, I never thought of trying that - thanks!
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Improvement Suggestion for f(x) Button in Sketcher Constraints Input Window

Post by bejant »

eivindkvedalen wrote: Sun Jul 15, 2018 11:45 pm type the '=' key, and you can enter the expression immediately.
Thanks! I didn't know that.

ickby wrote: Mon Jul 16, 2018 5:53 am I agree with eivindkvedalen, the current way is very streamlined:
I agree as well.

ickby wrote: Mon Jul 16, 2018 5:53 am after hitting enter the focus could be on the OK button of the contraint dialog, so that one can close the dialog directly by using enter two times.
+1. I'll write up a ticket in the tracker if you'd like one.
Post Reply