[DISCUSSION] Constraint's Widget - Open topics

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!
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by abdullah »

drmacro wrote: Sat Oct 16, 2021 9:14 pm I noticed in today's git that I could only see one element in the element display, scrolling one at a time, and the elements box wouldn't expand any further.

Didn't have time to pursue more.
Windows/Linux? Could you post a screenshot?

I have just checked the PPA and git master of today:
OS: Ubuntu 20.04.3 LTS (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 8fceac17628778bd0b2ba4c60bafd6494348ac08
Python version: 3.8.10
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.2
commit 0926a4148bcff11249fd4f56bc30256102ffe105 (HEAD -> master, origin/master, sketcher_shortcuts)
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
I see 6 elements in the list of the "Elements" widget.
Last edited by abdullah on Sun Oct 17, 2021 5:16 am, edited 1 time in total.
Reason: Wrong PPA information corrected
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by abdullah »

chrisb wrote: Sat Oct 16, 2021 9:01 am If you want me to make a mockup, I would go for it, but it would take a while for me to learn a few steps Qt Designer.
For those who want to play with the actual UI file to see where the space is going (so not to make a functional dialog, but to play along). I think you could move/drop/rearrange widgets rather easily with qtcreator.
cd src/Mod/Sketcher/Gui/
qtcreator TaskSketcherConstrains.ui
Then, a screenshot can be taken like this (This is more or less what I understood from Chrisb's):
Screenshot_20211017_072839.png
Screenshot_20211017_072839.png (8.42 KiB) Viewed 1969 times
I also realised that is sometimes cumbersome to understand each other the actual ideas. It might make sense to use the terminology/functionality of the current master and indicate where this functionality would go or whether it is removed or provided by other elements.

For example:
1. I would remove the "Hide Listed"/"Show Listed" buttons or I would move those buttons to a separate dialog A.
2. I would remove the "Restrict Visibility" button and its functionality altogether. I would also remove the shortcut in the drop down, because I think that with a setting in a separate dialog it is enough; or I would set the shortcut as a separate checkbox. I would put it the checkbox in the first row of the widget (as in the screenshot from adrianinsaval)
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by abdullah »

Shalmeneser wrote: Sat Oct 16, 2021 7:04 pm * If you are looking for a sketch to try hide/show : https://forum.freecadweb.org/viewtopic. ... 67#p540401
:)
Shalmeneser wrote: Sat Oct 16, 2021 7:04 pm * I need an [APPLY] button in Multiple Filter Selection to modify instantly the selection.
Or better the view change automatically with the selection.
The filter (and the multifilter) acts on the list of constraints (as all filters before this functionality was merged). This is on the widget not on the 3D view.

The 3D view should follow the settings for the visibility of the 3D view (e.g. "Show only filtered constraints").

What you ask, needs some extra coding (it is not possible today), but it is well doable. It would work as follows:
1) When you change a selection in the multiple filter, the list of constraints will get updated to match this multi-filter selection.
2) If the option to "Show only filtered constraints" is checked, then the 3D view will be update. If it is not checked, then it won't.
Shalmeneser wrote: Sat Oct 16, 2021 7:04 pm * In Simple Filter Selection, would it be possible to just show existing constraints ?
I am not sure exactly what you mean.

If a constraint is not existing, then it can not be shown.

By "show", do you mean in the list or in the 3D view?
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by abdullah »

adrianinsaval wrote: Sat Oct 16, 2021 7:43 pm IMO it's easily done using multiple filters, I can't think of anything those buttons can do that the multi filter can't.
Also, IMO the tracking option should be on by default.
It is certainly not as "at hand" as with the buttons, but you may be right that everything doable with the buttons can be done with the filter.

As this is Uwe's requirement, I think he should give his point of view on this one.
uwestoehr wrote: ...
Uwe, Adrian proposes to remote the buttons "Show List" and "Hide List" from the UI, indicating that the multi-filter can be used in every usage scenario. How do you see it?
adrianinsaval wrote: Sat Oct 16, 2021 7:43 pm I don't think it's necessary to have the tracking checkbox in the settings widget if it's already in the dropdown
Here I am not so sure about it. I think the "Show only filtered constraints" option should always be in the settings as a single point for configuring the whole dialog. I think we should have this option in the widget itself not to drive users crazy (but I am not strong either if it is enabled by default).
adrianinsaval wrote: Sat Oct 16, 2021 7:43 pm
ISSUE 3 - Hide internal alignment option
what if we remove the hide internal alignment option and add a new filter All - except internal alignment that will be the default instead of All
Thanks for commenting on this one. I do like the concept a lot.

Drawbacks I see are longer filter dialog and the quite verbose "All - except internal alignment". Anybody wants to comment on this?
adrianinsaval wrote: Sat Oct 16, 2021 7:43 pm how about modifying it live while checking the box? that is, it will apply every time you check a box so you won't need a button not even an ok button.
I commented on this above. I would prefer no "apply button", automatic applying (respecting visibility settings). "Ok" and "Cancel", I think would be ok, if cancel restitutes the behaviour of all the checking and unchecking (the user that tries, sees things gone and panics). Removing the "Ok" button does not help save space, as we would still need a "Close" button instead the "Cancel".
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by chrisb »

My previous request for a one liner wasn't a good one, because it said already how to implement, instead of having a requirement saying what I need. I think that the new possibilities are very helpful, but only on certain occasions. What I need much more often is to see the following three together without scrolling all the time to and fro: The solver messages, the list of constraints, the list of elements.

I don't really care how this requirement is met. Besides a minimal set of controls on the main window another possibility is to put them in another tab, "Constraints filter" or similar, so that they can be expanded if needed like e.g. the editing controls.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by drmacro »

abdullah wrote: Sun Oct 17, 2021 5:14 am ...
Windows/Linux? Could you post a screenshot?
...
Yes, sorry, I realized there was no useful info in that post after I hit the Post button. :oops:
LimitedElements.gif
LimitedElements.gif (677.41 KiB) Viewed 1806 times
Using the ProDark style sheet.

OS: Debian GNU/Linux 10 (buster) (XFCE/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git)
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by abdullah »

drmacro wrote: Sun Oct 17, 2021 12:26 pm OS: Debian GNU/Linux 10 (buster) (XFCE/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git)
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Not in the PPA, but I have now been able to reproduce this at the same commit as you with a self compiled version.

In order to see this behaviour, I need to expand the "Edit Controls" as in your screenshot. I always have this collapsed and this is why I could not reproduce this morning.

I will look tomorrow what happened between:
Hash: 8fceac17628778bd0b2ba4c60bafd6494348ac08
and
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by Syres »

It looks to me that git commit 224ffe3 could be the offending article but it won't compile cleanly on my box so I can't say for absolute certainty, but it's definitely part of https://github.com/FreeCAD/FreeCAD/pull/5091
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by abdullah »

Syres wrote: Mon Oct 18, 2021 11:11 am It looks to me that git commit 224ffe3 could be the offending article but it won't compile cleanly on my box so I can't say for absolute certainty, but it's definitely part of https://github.com/FreeCAD/FreeCAD/pull/5091
Yes. I have finished git bisect some minutes ago and came to the same finding.

bad => 8fceac1762 [Spreadsheet] Clean up compilation warnings
bad => [67df9301842517dd4d3aa5bf2e2c5ec2b91a29a8] [Part] Fix null pointer error in sweep operation
bad => [f598873b38290fb3a8eaf0af8b7db07deb537a94] Merge pull request #5108 from Roy-043/Draft-fix-context-menu
bad => [23622c8e08283e05d77c4c3f4563698c3bb5bf57] [Gui] Refactor StatefulLabel coloring
bad => [f2a073ca5a36559ef41184ddf4da17d5a8334ac2] [Sketcher] Make status message styleable
good => [ec249a8e4dfab5237555756b134598f580071a7c] [Sketcher] Migrate constraint and solver status to StatefulLabel
does not compile => [224ffe37e254259678461ac34919d99b6bc294a2] [Gui] New widget supporting per-state styles

'git skipping' that one results in one of these two being the culprits:
224ffe37e254259678461ac34919d99b6bc294a2
f2a073ca5a36559ef41184ddf4da17d5a8334ac2

Looking at the difference introduced by this two, it is not evident to me what may causing it.

I continue looking into it.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [DISCUSSION] Constraint's Widget - Open topics

Post by abdullah »

abdullah wrote: Mon Oct 18, 2021 12:49 pm
Syres wrote: Mon Oct 18, 2021 11:11 am It looks to me that git commit 224ffe3 could be the offending article but it won't compile cleanly on my box so I can't say for absolute certainty, but it's definitely part of https://github.com/FreeCAD/FreeCAD/pull/5091
Yes. I have finished git bisect some minutes ago and came to the same finding.

bad => 8fceac1762 [Spreadsheet] Clean up compilation warnings
bad => [67df9301842517dd4d3aa5bf2e2c5ec2b91a29a8] [Part] Fix null pointer error in sweep operation
bad => [f598873b38290fb3a8eaf0af8b7db07deb537a94] Merge pull request #5108 from Roy-043/Draft-fix-context-menu
bad => [23622c8e08283e05d77c4c3f4563698c3bb5bf57] [Gui] Refactor StatefulLabel coloring
bad => [f2a073ca5a36559ef41184ddf4da17d5a8334ac2] [Sketcher] Make status message styleable
good => [ec249a8e4dfab5237555756b134598f580071a7c] [Sketcher] Migrate constraint and solver status to StatefulLabel
does not compile => [224ffe37e254259678461ac34919d99b6bc294a2] [Gui] New widget supporting per-state styles

'git skipping' that one results in one of these two being the culprits:
224ffe37e254259678461ac34919d99b6bc294a2
f2a073ca5a36559ef41184ddf4da17d5a8334ac2

Looking at the difference introduced by this two, it is not evident to me what may causing it.

I continue looking into it.
I can confirm that in commit f2a073ca5a36559ef41184ddf4da17d5a8334ac2, changing the general setting to "no theme" results in the problem solved. However, the problem reappears when selecting a theme (at least the dark-green one).
Post Reply