Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by triplus »

openBrain wrote: Wed Mar 18, 2020 8:29 am 'Reference' in FreeCAD stands for 'driven', not 'driving'. No need to write a book, just tell me what is FC terminology for 'driving' and I'll update. ;)
Checkbox state determines that, therefore there is no need for an additional term. You are hence currently toggling in between reference constraint and constraint. Using the term Reference or Reference constraint for a label should therefore do.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by openBrain »

triplus wrote: Wed Mar 18, 2020 9:47 am Checkbox state determines that, therefore there is no need for an additional term. You are hence currently toggling in between reference constraint and constraint. Using the term Reference or Reference constraint for a label should therefore do.
Using 'reference' means the logical is reversed, which IMO is counter-intuitive (but it can be discussed). ;)
I prefer the checkbox to be checked when the constraint is driving. And it's not very proper to label the checkbox with 'Not reference'...
So what is the FC agreed term to specifically mention a driving constraint ?
Also notice that regarding consistency, when you use the ToggleReference button, the associated command in Python console is :

Code: Select all

App.getDocument('Unnamed').getObject('Sketch').toggleDriving(0) 
Thus 'driving' term is already there. ;)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by triplus »

openBrain wrote: Wed Mar 18, 2020 10:10 am So what is the FC agreed term to specifically mention a driving constraint ?
Well, the most obvious one, constraint. ;)
I prefer the checkbox to be checked when the constraint is driving.
Could be, but usually an inserted constraint is perceived as the default mode, toggling to reference constraint mode is what takes an additional action? Said that i am fine with whatever outcome happens next.
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by chrisb »

openBrain wrote: Wed Mar 18, 2020 8:32 am Could you give some more details about what you think is cumbersome and could be improved? ;)
To me it would be surprising (this work might be better suited than cumbersome) that a driven constraint changes to driving. But that is due to my different workflow and I can very well live with it.

Concerning the wording, this should indeed be discussed separately. Care to open a new topic?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by openBrain »

chrisb wrote: Wed Mar 18, 2020 10:33 am To me it would be surprising (this work might be better suited than cumbersome) that a driven constraint changes to driving. But that is due to my different workflow and I can very well live with it.
Today it switches to driving as soon as you edit it (even if you cancel). After PR it will switch only if you modify the value. And it will be visually displayed and can be canceled. ;) So I think it's acceptable. :)
Concerning the wording, this should indeed be discussed separately. Care to open a new topic?
If you're OK, I guess we can continue on this topic as the original discussion was over. We won't hijack it.
According @triplus, it already has been discussed (at least driven constraint is called 'reference').
To me it's still a bit unclear and I see 2 possibilities :
  1. Either we oppose 'Reference constraint' to 'Driving constraint'
  2. Or we oppose 'Reference' to 'Constraint' (but in this case, term 'Reference constraint' should never be used')
PS : I set the PR in 'do not merge' state so we have time to discuss. :)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by triplus »

You have made a nice image here:

Image

In short my proposal therefore is to change the label to say Reference and to uncheck it by default. Beyond saying that i don't plan to discuss this further or to oppose any potential different outcome.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by openBrain »

openBrain wrote: Tue Mar 17, 2020 11:17 pm EDIT : saw a small issue. When editing a driven constraint, then making it driving with the checkbox, it's not possible to enter an expression (works with a value). To enter an expression it is a 2 step process, first making it driving, then entering expression. Will have a look at this on tomorrow. :)
Need some help here :
abdullah wrote: Ping
The main problem is that expression validation is embedded quite deep in the App part and I can't just remove the driving state check there. Also tweaking it isn't easy.
I could live toggling the driving state when it's changed in the edition dialog, but I don't really like it (beyond I have to check it won't clutter the undo stack transactions).
Do you see a reasonable solution ?
EDIT : I'd like something like tweaking the validation function to disallow expression if the constraint isn't driving AND the constraint isn't currently being edited...
Last edited by openBrain on Wed Mar 18, 2020 11:14 am, edited 1 time in total.
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by chrisb »

Concerning the behaviour of the new implementation you made the best of it.
openBrain wrote: Wed Mar 18, 2020 10:42 am
  1. Either we oppose 'Reference constraint' to 'Driving constraint'
  2. Or we oppose 'Reference' to 'Constraint' (but in this case, term 'Reference constraint' should never be used')
I don't like the term "reference", although it is well possible that I fancied it in the old discussion - which I could not find. The idea was a constraint like thing which can be referenced. Good idea, but if I read it now it has a completely different taste. It is more like This is the reference, and others have to follow.

"Driving" and "driven" are a bit unhappy because the words are so similar, yet they describe exactly what happens. Since a "driven constraint" is in itself contradictory I would vote for

Driven dimension

to name the blue things looking like dimensions. They are dimensions, with the difference that the values are not set by the user.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by openBrain »

chrisb wrote: Wed Mar 18, 2020 10:53 am "Driving" and "driven" are a bit unhappy because the words are so similar, yet they describe exactly what happens. Since a "driven constraint" is in itself contradictory I would vote for
Driven dimension
to name the blue things looking like dimensions. They are dimensions, with the difference that the values are not set by the user.
I like "driving" and "driven" because ... they are quite standard terms. ;)
I like your proposal too as only dimensional constraints are concerned. But regarding everything that should be changed (code, wiki, ...), I think triplus's proposal above is the best ATM.
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher Ticket #3793 - Reference Constraints toggle to driving on edit

Post by chrisb »

openBrain wrote: Wed Mar 18, 2020 11:18 amI think triplus's proposal above is the best ATM.
For the toggle - yes. And it would survive a later change of the wording. Nevertheless we should try to find clear notions, both newbie safe and power user safe. Then we can go ahead and change things step by step (or all at once).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply