Suggestion for Symmetry Constrant Symbol Enhancement

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
User avatar
bejant
Posts: 6043
Joined: Thu Jul 11, 2013 3:06 pm

Suggestion for Symmetry Constrant Symbol Enhancement

Postby bejant » Tue Jun 24, 2014 9:44 pm

The symbol for the Symmetry Constraint looks like two arrowheads that are always oriented horizontally. In the following screen grab the endpoints of the vertical line on the right has the Symmetry Constraint applied to the endpoints with respect to the construction line but the Symmetry Constraint symbol is not aligned correctly:
20140624a.png
20140624a.png (4.3 KiB) Viewed 4338 times
I think it would be more meaningful for the user if the arrowheads were positioned so that they always are aligned with (point to / from) the outer points to which the Symmetry Constraint is applied. In the example above they'd be perpendicular to the construction line. Additionally, as the Sketch is rotated the Symmetry Constraint should maintain the correct alignment, in a manner similar to the Horizontal and Vertical Distance Constraints, for example.

Comments?

OS: Ubuntu 12.04.4 LTS
Word size: 32-bit
Version: 0.14.3677 (Git)
Branch: master
Hash: 07c64e206d05ae662ba40ae125ba991cced7cc9e
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
Last edited by bejant on Sun Jul 20, 2014 5:49 pm, edited 1 time in total.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby abdullah » Wed Jun 25, 2014 7:27 pm

I think it makes a lot of sense what you propose. It would be much more clear which points the contraint is applied to.
nahshon
Posts: 192
Joined: Wed Jul 24, 2013 8:06 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby nahshon » Fri Jul 11, 2014 9:36 pm

It can take any angle, not just horizontal or vertical.
It is not practical to add symmetry icons for every possible angle or to replace them while redrawing the sketch.

My suggestion: either leave that unchanged, or paint the symmetry constraints as lines (recalculate on each redraw).
User avatar
bejant
Posts: 6043
Joined: Thu Jul 11, 2013 3:06 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby bejant » Sun Jul 20, 2014 5:55 pm

The Horizontal and Vertical Distance Constraint symbols are oriented correctly when the view is rotated but the Symmetry Constraint symbol is always displayed so the arrowheads point horizontally. So somehow they're different and display in a more meaningful manner.

I thought it was worth reporting this as issue #1623.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby abdullah » Sat Aug 23, 2014 6:05 am

Dear bejant,

This should fix the problem you reported:

:To https://github.com/abdullahtahiriyo/Fre ... master.git
* [new branch] sketcher_symmetry_constraint -> sketcher_symmetry_constraint

Could you check if that exactly works as you intend? (I mean could you test it before I file a pull request?).

Thanks,
Abdullah
User avatar
bejant
Posts: 6043
Joined: Thu Jul 11, 2013 3:06 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby bejant » Sat Aug 23, 2014 4:13 pm

Hi Abdullah, thanks for looking into that. I'd be happy to test and will try to do so today; compiling is something I haven't done yet so it may take a little time for me to get it right.
User avatar
bejant
Posts: 6043
Joined: Thu Jul 11, 2013 3:06 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby bejant » Sat Aug 23, 2014 11:22 pm

Sorry for the delay, we had some bad weather roll through this area earlier so the computer was off, and later while using cmake I ran into some problems which I posted here. I'll wait for some help and will try after that, but if anybody else would like to build and test while I'm trying to sort things out that's OK too.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby abdullah » Sun Aug 24, 2014 2:46 am

Hi!

No problem. First, when I asked you to test it, I did not realise that not everybody in the forum has a system ready for compiling. Second, we are not in a hurry!! When it is done, it is done! ;)

If you can compile it great, because you will be able to provide me with more feedback. However, if for whatever reason you can not. No problem, I can share with you screenshots... ;)
constraints.png
constraints.png (28.19 KiB) Viewed 3959 times
Sketch in XY plane:
1 - Symmetric with respect to X axis [OK]
2 - Symmetric with respect to the Y axis (several constraint so displaced) [Better]
3 - Symmetric with respect of the other line [Which one? I do not see anything, not even the symbol]
4 - Symmetric with respect ( most right point, and second most bottom point are symmetric with respect to origin )

A) for 1 and 2 I like. It might be a good idea to try to apply some offset to see the constraint symbol (like Ian did when grouping, see case 2), even in the case of a single constraint. What do you think? If we decide to apply some offset, we might also decide to modify the symbol so that it is something like >|<,... or not, what do you think?

B) Cases 3 and 4. At angles other than 0, 90º, it seems that the icon is chopped (because of the up to sqrt(2) factor when rotating 45º), I will look into this. Anyway, A little bit of offset, like when grouping, would help visualization of the symmetric constraint.

C) It is me, or those icons are tiny?

Let me know your ideas... :)






I still do not like much how constraint symbols appear in the sketcher.
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby abdullah » Sun Aug 24, 2014 4:00 am

Ok, I fixed a couple of things and now it goes like this:
constraints_2.png
constraints_2.png (19.42 KiB) Viewed 3955 times
Actually, with the fixes (the icon was being cropped after rotating), now the single constraints are much nicer...

Now I am rather satisfied with the result. Let me know your impressions.
User avatar
bejant
Posts: 6043
Joined: Thu Jul 11, 2013 3:06 pm

Re: Suggestion for Symmetry Constrant Symbol Enhancement

Postby bejant » Sun Aug 24, 2014 5:04 am

Hi Abdullah, in your second screen grab it looks like you've solved it!
abdullah wrote:What do you think? If we decide to apply some offset
After looking at your screen grabs I think it is more helpful to the user if the Symmetry Constraint is not offset. With no offset the Symmetry Constraint symbol is directly aligned with the two outer points and lies on the line, and this direct orientation is another visual indication to the FreeCAD user of where these outer points are located. This visual cue can be very helpful in more complicated sketches having multiple symmetry constraints.

In your most recent screen grab, the two outer line segments both have their endpoints constrained symmetrically about the construction line, and the Symmetry Constraint symbol lies directly on the other lines. I think that is a better visual representation than the longer segment towards the middle of the construction line (where the constraint symbol is offset).
abdullah wrote:modify the symbol so that it is something like >|<,... or not, what do you think?
The Symmetry Constraint can also be used to constrain two outer points symmetrical to a middle point, so my initial thought is to keep the Symmetry Constraint symbol as it is now and not change it. Screen grabs are in this thread if you'd like to have a look.

If you look at the rectangles in that posting, the endpoints of the construction line are constrained coincident to the two corners of the larger rectangle, and these points are constrained symmetrically to the middle point on the construction line. Two corners of the smaller rectangle are constrained the same way. When two sets of endpoints are constrained symmetrically to another point in the middle (kind of a unique situation) I think the symmetry constraint symbol only needs to appear to be a single symbol because clicking on either Constraint 21 or 22 in the constraints list causes the symbol to display in the 3D view as green.
abdullah wrote:It is me, or those icons are tiny?

I don't think it's just you, sometimes for me the constraint icons look small too.
abdullah wrote:Now I am rather satisfied with the result. Let me know your impressions.
Other than the offset I think they look great - it's much more helpful for the user if the constraint symbol isn't always displayed horizontally.

I'd still like to compile your branch and try your changes but that won't be for another 8 hours or so because I'm getting sleepy.