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!
hatari
Posts: 114
Joined: Fri Jul 22, 2016 10:56 am

Re: Sketcher - Reference Constraints toggle to driving on edit

Post by hatari »

If it really is a feature, I would be very curious about its benefit..
chrisb wrote: Thu Jan 24, 2019 6:32 pm This behaviour is indeed a bit confusing. You can label the blue reference constraints with the right click menu in the constraints list in the panel.
Thanks a lot, Chris, this workaround is very helpful!
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Sketcher - Reference Constraints toggle to driving on edit

Post by bejant »

I think this behavior came about because at first it wasn't possible to edit a blue Constraint at all; the user first had to change it to a regular (driving, red) Constraint and then change the numerical value. After blue Constraints were introduced there was a discussion to the effect that when someone wanted to edit the numerical value of a blue Constraint, the user therefore wanted that Constraint to be a driving (red) Constraint. So, as a time-saver, editing the number value of a blue Constraint caused that Constraint to become a driving (red) Constraint.

I think the bug is that editing the Name of a blue Constraint, so that it can be used in a Spreadsheet / Expression, also changes the Constraint to red. Instead, a blue Constraint should only become red if the Length / Angle field is edited.

This recollection is all from memory; I think Abdullah or maybe Normand will be able to provide more input.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Sketcher - Reference Constraints toggle to driving on edit

Post by abdullah »

bejant wrote: Fri Jan 25, 2019 2:59 pm I think the bug is that editing the Name of a blue Constraint, so that it can be used in a Spreadsheet / Expression, also changes the Constraint to red. Instead, a blue Constraint should only become red if the Length / Angle field is edited.

This recollection is all from memory; I think Abdullah or maybe Normand will be able to provide more input.
Your memory is perfect.

There is a very stubborn user that never names reference constraints and wants this behaviour of changing to driving. That user is me :D .

It should be possible to implement something as you describe. I see that there is from time to time a user complaining about this behaviour. So I think we should do something for v0.19. Do we have a ticket?
chrisb
Veteran
Posts: 54207
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher - Reference Constraints toggle to driving on edit

Post by chrisb »

abdullah wrote: Fri Jan 25, 2019 3:09 pm Do we have a ticket?
Yes: issue #3793.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Sketcher - Reference Constraints toggle to driving on edit

Post by bejant »

abdullah wrote: Fri Jan 25, 2019 3:09 pm Your memory is perfect.
Maybe that time, but not always! :lol:
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 »

Just submitted PR 3201 to solve this.

Basically it adds a checkbox in the dimension edition dialog that shows/determines if the created/edited constraint is driving or driven (aka reference) one :
driving.png
driving.png (11.39 KiB) Viewed 1487 times
The new behavior is :
  • If the value is changed, the constraint is automatically switched to driving
  • If the constraint is set as driven, the value is reset to current one
  • Constraint name can be freely edited without tampering the constraint driving/driven state (that was the main point)
  • No live update, everything is updated when dialog is accepted (same as currently)
  • When a driven (reference) constraint is created, the dialog isn't opened (same as currently). I had a doubt on that because probably someone that set a driven constraint want to name it so it can be reused. However this isn't a big deal to double-click on it to edit its name
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. :)
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 »

We had a long discussion in the past and the term Reference was selected, user facing, not driving. Please update the term in PR. Using more terms in the GUI and in the documentation only adds to the confusion.

P.S. As for the term constrain vs. dimension. This one is a bit tricky one. Notably not all are happy with the terminology Reference constraints, but the solution is not easy. For that to make sense, using the term constraint and dimension separately, we would basically need to split them apart, have double the amount of commands, dialogs, two toolbars, and move away from the toggle approach. As in toggle mode, people perceive them too much as constraints. But then again if in general people would like to move away from using terminology Reference (constraint), to using something like the Dimension. Therefore for such checkbox to have a label Dimension. I am OK with that. But then the term needs to be used consistently elsewhere too.
chrisb
Veteran
Posts: 54207
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

openBrain wrote: Tue Mar 17, 2020 11:17 pm Just submitted PR 3201 to solve this.
Thanks for the PR, I think it's still a bit cumbersome, but its the best we can do. Easy to handle, and rather easy to explain.

(Now I have to check my tutorial again.)
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 »

triplus wrote: Wed Mar 18, 2020 5:25 am We had a long discussion in the past and the term Reference was selected, user facing, not driving. Please update the term in PR. Using more terms in the GUI and in the documentation only adds to the confusion.
'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. ;)
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 6:06 am Thanks for the PR, I think it's still a bit cumbersome, but its the best we can do. Easy to handle, and rather easy to explain.
Could you give some more details about what you think is cumbersome and could be improved? ;)
Post Reply