[fixed] Ticket #3978 - reference sketch dimensions lose their reference mode

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!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

[fixed] Ticket #3978 - reference sketch dimensions lose their reference mode

Post by uwestoehr »

The sketcher has the nice feature to just measure dimensions by setting them in reference mode. But whenever I want to use the feature I loose the reference mode:

- take e.g. the attached simple sketch. There are several reference-mode dimensions in it
- double click on a reference-mode dimension and then do nothing, just press cancel

result: the dimension is no longer in reference mode but a normal mandatory dimension (turns from blue to red)

- now double click on a reference-mode dimension and then highlight in the appearing dialog the number and copy it to the clipboard
- finally press cancel (so that you did not actually change the dimension)

result: the dimension is also no longer in reference mode

The problem is that in real life documents the suddenly new real dimensions make sketches over-constrained. Moreover the change from reference-mode for the dimensions cannot simply be undone. Therefore it is really hard to work with the reference mode.

I am not sure it is a bug or I miss just a setting. Astonishingly I cannot find anything related to this issue in the forum so any hint is highly appreciated.


Mod edit: added ticket number to title + typo fix loose->lose
Attachments
Sketcher-problem.FCStd
file to reproduce
(5.91 KiB) Downloaded 141 times
Last edited by uwestoehr on Tue Mar 24, 2020 8:24 pm, edited 1 time in total.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: reference sketch dimensions loose their reference mode

Post by openBrain »

I can confirm this was already discussed here some months ago. ;)
I probably can manage to find a link on tomorrow.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: reference sketch dimensions loose their reference mode

Post by chrisb »

Abdullah has participated in the discussion mentioned by openBrain and favours the current behaviour. As there are use cases where the current behaviour is sensible, it probably will not be changed.
Both use cases are rare anyway.
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: reference sketch dimensions loose their reference mode

Post by bejant »

openBrain wrote: Thu May 16, 2019 10:38 pm I probably can manage to find a link on tomorrow.
This one?
https://forum.freecadweb.org/viewtopic. ... 14#p282314

And there's already a ticket mentioned in that thread...
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

Re: reference sketch dimensions loose their reference mode

Post by kisolre »

I recently also stumbled upon this. In the past i used reference dimensions to check bounds of their values and lastni convert them to driving in that range. But "cancel" not canceling an action is not right.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: reference sketch dimensions loose their reference mode

Post by uwestoehr »

bejant wrote: Fri May 17, 2019 2:01 am This one?
https://forum.freecadweb.org/viewtopic. ... 14#p282314
And there's already a ticket mentioned in that thread...
Thanks bejant!
I think the issue here is different, the other topic and ticket is about naming.

kisolre wrote: Fri May 17, 2019 5:59 am But "cancel" not canceling an action is not right.
You are right, it is a cancel action and thus must simply cancel, nothing more. I opened issue #3978 to address this.

abdullah wrote: Fri Jan 25, 2019 3:09 pm a blue Constraint should only become red if the Length / Angle field is edited.
Yes.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: reference sketch dimensions loose their reference mode

Post by abdullah »

uwestoehr wrote: Fri May 17, 2019 9:43 am
abdullah wrote: Fri Jan 25, 2019 3:09 pm a blue Constraint should only become red if the Length / Angle field is edited.
Yes.
Sometimes you might (rightly) want to (mis)use this feature to make a constraint driving with the same value.

In my mind I was having something like:

Click "cancel" => remains blue.

Click "ok":
=> name was added?
+if yes,
remain blue;
else
change to red.

Because I do not like that clicking ok has differing behaviour (red/blue), I was thinking of disabling the value editor if the string of the reference is changed (or a new one is added). This way the user is pointed out that "ok" has nothing to do with the value when changing the string of the name.

Any issue with this implementation?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: reference sketch dimensions loose their reference mode

Post by uwestoehr »

abdullah wrote: Fri May 17, 2019 12:19 pm Sometimes you might (rightly) want to (mis)use this feature to make a constraint driving with the same value.
But then you can select the dimension and use the corresponding toolbar button to turn it into driving.

abdullah wrote: Fri May 17, 2019 12:19 pm Click "cancel" => remains blue.
Yes, but currently this is not the case. Even when cancelling it turns red.

abdullah wrote: Fri May 17, 2019 12:19 pm Click "ok":
=> name was added?
+if yes,
remain blue;
else
change to red.
So you want this is or should this already be the case?

I am opposed to "magic". If I open a reference dimension and then press OK without changing it, I did not change it so why should it automatically be changed? A good UI should only do what the user tells it should do.

So if possible please only remove the reference mode if the user changes the value because then the dimension is no longer a reference but driving. In all other cases keep the mode. If a reference should become driving we have the toolbar button to do this. If you need a second dimension with the same value, you can just add such a second one.

(Personally I use reference dimensions for construction works and therefore I open reference dimensions to copy its value to the clipboard (in order to paste them to a math program etc.).)
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: reference sketch dimensions loose their reference mode

Post by openBrain »

Correct. Magics of timezone. :) You find it during my sleep time. ;)
abdullah wrote: Fri May 17, 2019 12:19 pm Click "cancel" => remains blue.

Click "ok":
=> name was added?
+if yes,
remain blue;
else
change to red.

Any issue with this implementation?
Better if "=> (name was changed) and (value was unchanged)". ;)
But there is a corner case where the user manually enters the same exact value and expect the constraint to become driving.

IMHO, the best solution would be that there is a toggle button in the constraint editing box that both indicates current state (driven or driving) and allows the user to switch mode.

EDIT : another acceptable solution would be that a driven(reference) dimension always displays an editing value of something like "#ref". If the user change it for a number, then it become driving.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: reference sketch dimensions loose their reference mode

Post by chrisb »

uwestoehr wrote: Fri May 17, 2019 9:43 am You are right, it is a cancel action and thus must simply cancel, nothing more. I opened issue #3978 to address this.
You should cross link these very similar issues. The source of the issues is exactly the same. In such cases it may even be better to add to a ticket than to create a new one.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply