[Merged] Sketcher: display dimension constraint name option
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Merged] Sketcher: display dimension constraint name option
I made a thing. Adding the option to display the name of a dimension constraint (if set) within the sketcher view.
Here is a short video showing the functionality (gif file was too large to upload) https://www.dropbox.com/s/e4weciqrjdw6h ... 0.mov?dl=0
The initial idea was discussed in https://forum.freecadweb.org/viewtopic.php?f=3&t=59498.
See the PR for the code https://github.com/FreeCAD/FreeCAD/pull/4966. This PR closes issue #0004686.
I'm open for discussion to improve the PR. Some things I'm not sure for the final implementation:
- position of settings checkbox is currently located under Preferences -> Sketcher -> General, maybe would be better under Sketcher -> Display?
- display of name parameter with or without colon? Or any other character?
- setting is set to false by default to not change anything on existing apps -> maybe setting to true as default for easier discoverability?
Here is a short video showing the functionality (gif file was too large to upload) https://www.dropbox.com/s/e4weciqrjdw6h ... 0.mov?dl=0
The initial idea was discussed in https://forum.freecadweb.org/viewtopic.php?f=3&t=59498.
See the PR for the code https://github.com/FreeCAD/FreeCAD/pull/4966. This PR closes issue #0004686.
I'm open for discussion to improve the PR. Some things I'm not sure for the final implementation:
- position of settings checkbox is currently located under Preferences -> Sketcher -> General, maybe would be better under Sketcher -> Display?
- display of name parameter with or without colon? Or any other character?
- setting is set to false by default to not change anything on existing apps -> maybe setting to true as default for easier discoverability?
Last edited by doia on Wed Sep 01, 2021 2:55 pm, edited 1 time in total.
Re: [PR #4966] Sketcher: display dimension constraint name option
Interesting, I wonder if it you be useful to have the option of the
name after the dimension?
Also wonder if it would be useful to give the option to set the
name text to another colour
1) Different to the dimension
2) 2nd colour if
it is being used in an equation
Best Wishes
name after the dimension?
Also wonder if it would be useful to give the option to set the
name text to another colour
1) Different to the dimension
2) 2nd colour if
it is being used in an equation
Best Wishes
Re: [PR #4966] Sketcher: display dimension constraint name option
Hey, thanks for your feedback.
Coming from Revit, my learned UX is that the parameter name is in front of the actual value. That’s also the way we handle most dimension lines in construction documents within our office.
Here are some possible solutions:
Parameter: 100mm <- current implementation, divided by colon
Parameter = 100mm <- Revit style with an equal character
Parameter 100mm <- no divider (used in construction documents)
100mm Parameter <- parameter name at the end
For me it’s either 1 or 2, probably leaning more to example 2. There could be an additional option setting to place the name either in front or after the value. A single checkbox reading „Parameter name after Value“ with setting to default false (my preference).
As for the color, I would advise against two different colors within the same dimensional constraint. This would add just too much visual noise.
Making it somehow visible, that the distance parameter is used by a calculation is a good idea though. I’m just not quite sure, if doing this with a color is the right way. Currently (vanilla FC) a dimensional constraint gets a different color (orange?) if it is the result of a calculation. But what color should it be, if the constraint is the result of AND used within a calculation. This would need to add two new colors to the sketcher UI. I think this would add too much visual noise again and it would be hard to make a distinction between so much different colors.
Maybe a way by adding extra characters to the dimension string is a solution:
[f] Parameter = 100mm
Anyway, this could be the next development step for this feature, as this would make it necessary to query all calculations of the current sketch. Lot’s of stuff to code.
Coming from Revit, my learned UX is that the parameter name is in front of the actual value. That’s also the way we handle most dimension lines in construction documents within our office.
Here are some possible solutions:
Parameter: 100mm <- current implementation, divided by colon
Parameter = 100mm <- Revit style with an equal character
Parameter 100mm <- no divider (used in construction documents)
100mm Parameter <- parameter name at the end
For me it’s either 1 or 2, probably leaning more to example 2. There could be an additional option setting to place the name either in front or after the value. A single checkbox reading „Parameter name after Value“ with setting to default false (my preference).
As for the color, I would advise against two different colors within the same dimensional constraint. This would add just too much visual noise.
Making it somehow visible, that the distance parameter is used by a calculation is a good idea though. I’m just not quite sure, if doing this with a color is the right way. Currently (vanilla FC) a dimensional constraint gets a different color (orange?) if it is the result of a calculation. But what color should it be, if the constraint is the result of AND used within a calculation. This would need to add two new colors to the sketcher UI. I think this would add too much visual noise again and it would be hard to make a distinction between so much different colors.
Maybe a way by adding extra characters to the dimension string is a solution:
[f] Parameter = 100mm
Anyway, this could be the next development step for this feature, as this would make it necessary to query all calculations of the current sketch. Lot’s of stuff to code.
Re: [PR #4966] Sketcher: display dimension constraint name option
I think that's an interesting idea! Especially when comming back to older designs, I find myself from time to time opening a sketch, double clicking a constraint, just to see how I named it. (And yes, I'm waiting/hoping for this one)
Regarding the "parameter before or after value" topic, my personal preference is "name: value", just like in your screen shot. I don't know if a preference checkbox for "Constraint name after value" is a good idea though. In my eyes, such a detail is more suited for fine tuning. There you could offer some format string, though, making "n: v", "n = v", "v n" etc. possible. In Sketcher's preference pane, I consider a checkbox wether to show named constraints or not, enough.
Regarding the "parameter before or after value" topic, my personal preference is "name: value", just like in your screen shot. I don't know if a preference checkbox for "Constraint name after value" is a good idea though. In my eyes, such a detail is more suited for fine tuning. There you could offer some format string, though, making "n: v", "n = v", "v n" etc. possible. In Sketcher's preference pane, I consider a checkbox wether to show named constraints or not, enough.
- adrianinsaval
- Veteran
- Posts: 5534
- Joined: Thu Apr 05, 2018 5:15 pm
Re: [PR #4966] Sketcher: display dimension constraint name option
yeah that makes more sense to me
I say yes, anyone that doesn't like it can disable it quickly.maybe setting to true as default for easier discoverability?
I vote for this
Re: [PR #4966] Sketcher: display dimension constraint name option
As space is precious I would like to have an option where only the parameter is shown too. This could also be handled with a format string.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: [PR #4966] Sketcher: display dimension constraint name option
Some interesting thought
I would vote for the option of the user being able to choose the
format. Some thoughts about my reasons for the
1) Layout XX(units) [expression icon]: Name
I probably read the sketch to pick-up incorrect dimensions and
tend not to display units to minimise the real estate taken. If I use
names I tend to use reasonably descriptive to enable easy
understanding when I/someone else comes back back to the model.
Thus it could easily end up with the dimension quite a way from
the arrows if the format is name : dimension.
[Personally would prefer to have a system where every dimension to be
automatically linked to a short form name, e.g. d:0 -> d:nn, which can be
aliased to an extended name if required, or nn can be used as a variable in
python]
2) Different colour. I can see the difficulty of multiple colours on
an already colour rich sketcher display. But having a large amount of
'red' text (with long names) on not very red/green colour blind friendly
display is likely to be difficult to read. Thus the thought of having
a gentle colour contrast for the name.
Like the idea of potentially useing [f] for names used, but perhaps
to maintain consistancy use the fx icon instead
Possible enable a functionality where individual or all names or dimensions
(depending on which format is being used) can be easily toggled with a hotkey.
Best Wishes
I would vote for the option of the user being able to choose the
format. Some thoughts about my reasons for the
1) Layout XX(units) [expression icon]: Name
I probably read the sketch to pick-up incorrect dimensions and
tend not to display units to minimise the real estate taken. If I use
names I tend to use reasonably descriptive to enable easy
understanding when I/someone else comes back back to the model.
Thus it could easily end up with the dimension quite a way from
the arrows if the format is name : dimension.
[Personally would prefer to have a system where every dimension to be
automatically linked to a short form name, e.g. d:0 -> d:nn, which can be
aliased to an extended name if required, or nn can be used as a variable in
python]
2) Different colour. I can see the difficulty of multiple colours on
an already colour rich sketcher display. But having a large amount of
'red' text (with long names) on not very red/green colour blind friendly
display is likely to be difficult to read. Thus the thought of having
a gentle colour contrast for the name.
Like the idea of potentially useing [f] for names used, but perhaps
to maintain consistancy use the fx icon instead
Possible enable a functionality where individual or all names or dimensions
(depending on which format is being used) can be easily toggled with a hotkey.
Best Wishes
Re: [PR #4966] Sketcher: display dimension constraint name option
Thanks all for your feedback. I will look into your suggestions and try something out. My goal is to avoid "feature creep" for the first version to get a functional version out quickly and iterate on that and the in-production feedback.
Very good idea, haven't thought of that. I will look into fine-tuning. From a first glance this would be a perfect way to satisfy the many different ways to costumize the dimension string.
Very important point indeed. I will think about how to make this feature more accessible. Could need help/advice on this as personally I'm not impaired and do not have experience on possible consequences of certain implementations.
Using the same icon could lead to misunderstanding as the user might try to click on the icon at the dimension string in anticipation to change/enter the formula directly. IMO there needs to be a visual distinction between entering a formula and showing the status of being used by a formula or being the result of a formula and combinations thereof.
Good idea, will look into that. This is like the "TL" shortcut in Revit where you switch between displaying WYSIWYG line thickness and thin hairlines. Could be very useful.
Re: [PR #4966] Sketcher: display dimension constraint name option
Colour Blindness,
I think this is potential a bigger problem for FC than just your functionality
See https://www.color-blindness.com/2008/12 ... blindness/
in particular Color Oracle , use address https://colororacle.org/
It is quite intersting to see the general effect on FC screen.
[Having the experience of teaching 300-400 students CAD in a year (upto 90+ in
a session) there is always some with colour blindness. Can really soak up support
time, eventually built a number of tweaked colour maps for the package we
were using and then set specific/student]
Indication of use in equations
See you comment about the normal icon, **Warning feature creep!**
but having a icon in the text which when pressed lists all the uses of the name
in a pull down menu it might be useful? - The equations will have been searched
when checking for use
Hot key
Hopefully will reprogrammably by the work by chennes, so user can
set their prefered keys
Many Thanks, Keep up the great work
I think this is potential a bigger problem for FC than just your functionality
See https://www.color-blindness.com/2008/12 ... blindness/
in particular Color Oracle , use address https://colororacle.org/
It is quite intersting to see the general effect on FC screen.
[Having the experience of teaching 300-400 students CAD in a year (upto 90+ in
a session) there is always some with colour blindness. Can really soak up support
time, eventually built a number of tweaked colour maps for the package we
were using and then set specific/student]
Indication of use in equations
See you comment about the normal icon, **Warning feature creep!**
but having a icon in the text which when pressed lists all the uses of the name
in a pull down menu it might be useful? - The equations will have been searched
when checking for use
Hot key
Hopefully will reprogrammably by the work by chennes, so user can
set their prefered keys
Many Thanks, Keep up the great work
- adrianinsaval
- Veteran
- Posts: 5534
- Joined: Thu Apr 05, 2018 5:15 pm
Re: [PR #4966] Sketcher: display dimension constraint name option
just an idea, would it make sense to have this option be controlled by a checkbox in the sketcher task panel?