Element widget for Sketcher WB

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Element widget for Sketcher WB

Post by wmayer »

A further minor bug: if you select some lines or arcs in the sketcher (or the element widget) and then click the right mouse button in an empty place of the element widget the selection is lost. This should not happen with a right-click, only with a left-click. Only if you press the right mouse over a selected item the selection is kept.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Post by jmaustpc »

some more promised icons :-)

firstly I came up with these for Sketcher_ConnectLines and a Sketcher_CloseShape

Sketcher_ConnectLines
at 16px
Sketcher_ConnectLines_1_16px.png
Sketcher_ConnectLines_1_16px.png (617 Bytes) Viewed 2473 times
at 32px
Sketcher_ConnectLines_1_32px.png
Sketcher_ConnectLines_1_32px.png (1.3 KiB) Viewed 2473 times
and the svg
Sketcher_ConnectLines_1.svg
(13.55 KiB) Downloaded 133 times

Sketcher_CloseShape
at 16px
Sketcher_CloseShape_1_16px.png
Sketcher_CloseShape_1_16px.png (675 Bytes) Viewed 2473 times
at 32px
Sketcher_CloseShape_1_32px.png
Sketcher_CloseShape_1_32px.png (1.43 KiB) Viewed 2473 times
and the svg
Sketcher_CloseShape_1.svg
(13.24 KiB) Downloaded 54 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Post by jmaustpc »

then these modifications
Sketcher_ConnectLines_2_16px.png
Sketcher_ConnectLines_2_16px.png (684 Bytes) Viewed 2472 times
Sketcher_ConnectLines_2_32px.png
Sketcher_ConnectLines_2_32px.png (1.38 KiB) Viewed 2472 times
and the svg
Sketcher_ConnectLines_2.svg
(12.47 KiB) Downloaded 113 times

and the matching Sketcher_CloseShape
Sketcher_CloseShape_2_16px.png
Sketcher_CloseShape_2_16px.png (734 Bytes) Viewed 2472 times
Sketcher_CloseShape_2_32px.png
Sketcher_CloseShape_2_32px.png (1.52 KiB) Viewed 2472 times
and the svg
Sketcher_CloseShape_2.svg
(12.82 KiB) Downloaded 134 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Post by jmaustpc »

finally I thought this might differentiate Sketcher_CloseShape a little better while still matching the previous Sketcher_ConnectLines


at 16 px
Sketcher_ConnectLines_3_16px.png
Sketcher_ConnectLines_3_16px.png (658 Bytes) Viewed 2472 times
at 32px
Sketcher_ConnectLines_3_32px.png
Sketcher_ConnectLines_3_32px.png (1.34 KiB) Viewed 2472 times
and the svg
Sketcher_ConnectLines_3.svg
(12.21 KiB) Downloaded 125 times

the 2nd Sketcher_CloseShape in the previous post and this 3rd Sketcher_ConnectLines above are my preferences but you guys like this theme then you choose which you prefer. :)


Jim
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Post by jmaustpc »

Back again

if you wanted another icon for Sketcher_SelectConstraints perhaps you guys might like one of these?

Firstly I came up with this one

at 16px
Sketcher_SelectConstraints_1_16px.png
Sketcher_SelectConstraints_1_16px.png (638 Bytes) Viewed 2467 times

at 32px
Sketcher_SelectConstraints_1_32px.png
Sketcher_SelectConstraints_1_32px.png (1.28 KiB) Viewed 2467 times

svg
Sketcher_SelectConstraints_1.svg
(13.69 KiB) Downloaded 127 times
but you prefer a simplified version, then perhaps this one?

at 16px
Sketcher_SelectConstraints_2_16px.png
Sketcher_SelectConstraints_2_16px.png (364 Bytes) Viewed 2467 times
at 32px
Sketcher_SelectConstraints_2_32px.png
Sketcher_SelectConstraints_2_32px.png (644 Bytes) Viewed 2467 times
and the svg
Sketcher_SelectConstraints_2.svg
(9.23 KiB) Downloaded 130 times
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

The thread is growing as I fix things up...

Ok... I go one by one:
Then I discovered a further bug. In the context-menu of the element widget the commands "Select origin", "Select vertical axis" and "Select horizontal axis" become only active if you select something in the widget while the same commands in the Sketcher menu become active.
This is fixed now (branch not yet pushed). Thanks for pointing it out.
Regarding the drop down list, I think it was a good idea and I am sorry to see it go.

In terms of GUI usability in general, I think the following.
2) a GUI tool does two things, firstly it obviously exists to allow the user to perform a function but very importantly it also exists to advertise a functions existence i.e. it educates the user. For example your drop down list educates the user by showing them that there are 4 (or however many it is) options available, some of which may or may not be valid.
I agree with what you say. However, in this case the "user education" value is taken away by the annoyance of not achieving what you expect. I could (and this I really let you take the decision), enable the droplist for the "Jim-Abdullah" mode and disable it for the "Sponsi" mode. In your decisions you have to take into account that, if I would not have disable the droplist, you would "never" have realise the usefulness of using "z".

Of course, if you can think of a better way to have the "preselection on hoover" live happily together with the droplist, I am all ears (I will not remove preselection on hoover ;-)).
Yorik's Draft Dimensions tool is a typical example of this
Could you please elaborate a little bit what exactly this is?. I am very ignorant about FreeCAD. I do not see how I could add a checkbox to solve the aforementioned problem.
Since this is now in master, I will base my testing and comments on the version that is in master.
FYI, I will enable a branch for the fixes (see pull request thread). Not yet available.
"z" and Ctrl-z. Not really a bug, can be worked around, but I would expect it will catch out a few new users.
Yep. I did not though of this. I am really open to change the key "z" if you can find a better option (must be a letter close to "ctrl" and "shift" for ergonomics). But it eventually will collapse with another functionality (if I put "a" with "Ctrl-a" "Shift-a"...).
Now I see how "close shape" and "connect" work on a line and arc...works great.

"Close shape" only has an icon on the tool bar in sketcher, perhaps "connect", and select constraints could too?

Also perhaps that tool bar should be in PartDesign as well?
Definitely. As decent icons appear I can add them to the toolbar. I doubt about the "select origin,vertical, horizontal" ones, because I really do not see the added value over clicking directly on the Inventor view, but the others can be added. Of course!

Thanks for the screenshots!!
A further minor bug: if you select some lines or arcs in the sketcher (or the element widget) and then click the right mouse button in an empty place of the element widget the selection is lost. This should not happen with a right-click, only with a left-click. Only if you press the right mouse over a selected item the selection is kept.
I must have had fixed that when fixing the other context menu bug you described. I have created two lines, selected them, right-clicked on an empty part of the element widget and the selection is maintained...

The fixed version is currently published in branch: element_widget_fixes

I will now back to the other thread... you guys are fast...
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Element widget for Sketcher WB

Post by jmaustpc »

Hi Abdullah
you posted while I was typing, you have possibly addressed this below in your fix branch, but I'll still post this in case it helps in some way.... :-)
wmayer wrote: Then I discovered a further bug. In the context-menu of the element widget the commands "Select origin", "Select vertical axis" and "Select horizontal axis" become only active if you select something in the widget while the same commands in the Sketcher menu become active.
related to this..... if you right click on something in the widget to get to the context menu, it selects the item you right click on, rather than just giving you the context menu. E.G. This means that if if you right click on a Line to get the context menu and then click on "select horizontal axis", you get a selection of the horizontal axis and the line.

similarly if you did the above so that you have a selection of the horizontal axis and the line, if you right click again on the same line you can select the vertical axis (or deselect the horizontal axis), in other words the second context menu operation is in multi-selection mode ....however if you right click on a different item in the widget list (e.g. Arc) to further select/deselect an axis, then it clears the previous selection i.e. does not work in multi selection mode.

Jim
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

related to this..... if you right click on something in the widget to get to the context menu, it selects the item you right click on, rather than just giving you the context menu. E.G. This means that if if you right click on a Line to get the context menu and then click on "select horizontal axis", you get a selection of the horizontal axis and the line.
Right-click on an element consistently selects the element and deselects any previously selected thing (unles Ctrl pressed). This is the default behaviour in any list in my OS (ubuntu). I just checked in the Firefox preferences.

If you want the context menu without selecting any item, you have to right-click in an empty spot of the widget.

Would you mind to test on the branch "element_widget_fixes" ?

Let me know if you thing anything weird...

Not to be greedy... but do you have handy another of those beautiful icons for the Select Constraints of Elements command? :)
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

Sorry Jim. Your post got in the way. I like the first one of your proposals. But I should be banned to have an opinion about anything related to aesthetics.

People reading this thread: Do I push the first one or the second one??
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Element widget for Sketcher WB

Post by abdullah »

I have momentarily pushed icon 1, so that you can see how it looks like...
Post Reply