symmetry constraint not performing as indicated

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
freman
Posts: 538
Joined: Tue Nov 27, 2018 10:30 pm

symmetry constraint not performing as indicated

Postby freman » Tue Dec 25, 2018 6:27 am

Hi,

I have been trying to apply a symmetry constraint and it is not behaving as indicated in the hover hint. This is not helpful.

"Create a symmetry constraint between two points with respect to a line or a third point (S)"

In the uploaded file I want to centre the arc between the two vertical lines. So, according to the hint, I select the two points then select the third point about which I want the symmetry: the centre of the arc. This does not work since it puts the arc to the right of the two points. So the "with respect to a line or a third point" is incorrect it is not the THIRD point which is used.

Now, I try a different order. LH vertex; arc centre; RH vertex. Now it does get the symmetry order as I intended by using the SECOND point as the point of reference , however, it drops the centre of the arc to be on the line between the two points. This is not what was marked on the box. The two points could be symmetrically placed either side of the arc without moving the arc centre. So why is it doing more that says it will do?

To apply symmetry as claimed it needs to draw a line between the two points find the perpendicular to the reference point and constrain the intersection to bisect the line between the two points. If the aim of this tool is to make all three points co-linear, then this should be clearly stated in the hint.

Should I open a bug for this?

BTW if some one can suggest a way to get the symmetry without moving the arc centre, it may be helpful.

thanks.
Attachments
U-bearing-bug.fcstd
(6.96 KiB) Downloaded 10 times
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: symmetry constraint not performing as indicated

Postby NormandC » Tue Dec 25, 2018 7:01 am

When reporting potential issues, you should always post your FreeCAD info, as explained in the "Bug reporting guidelines" topic.

For me it works exactly as the tooltip says.
FC018_Sketcher_Symmetry_works_01.gif
FC018_Sketcher_Symmetry_works_01.gif (96.47 KiB) Viewed 360 times
Checked with:
OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15481 (Git)
Build type: Release
Branch: master
Hash: 763b5c362fe4b98dca858f86f5d1353075224651
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: symmetry constraint not performing as indicated

Postby NormandC » Tue Dec 25, 2018 7:04 am

freman wrote:
Tue Dec 25, 2018 6:27 am
BTW if some one can suggest a way to get the symmetry without moving the arc centre, it may be helpful.
Since your two vertical lines have an equal length constraint, you don't even need to add a symmetry constraint. Add coincident constraints between the arc's endpoints and the vertical lines. The arc centre will automatically be centred between the two lines.
User avatar
freman
Posts: 538
Joined: Tue Nov 27, 2018 10:30 pm

Re: symmetry constraint not performing as indicated

Postby freman » Tue Dec 25, 2018 7:19 am

Sorry , I went back to get the version info and got distracted by the sketch and forgot to come back. It's v18 build 15303, though this hint does not seem to have changed in a while.
For me it works exactly as the tooltip says.
I said exactly why I thought it was not fitting the description, if you wish to disagree, please be more specific than basically saying "yes it is".

I got around the problem by making the two link lines equal, this centred the arc without referring to it directly. I also needed the height of the centre to close the sketch.
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: symmetry constraint not performing as indicated

Postby NormandC » Tue Dec 25, 2018 7:44 am

Okay, I admit I didn't pay attention to this specific paragraph:

freman wrote:
Tue Dec 25, 2018 6:27 am
To apply symmetry as claimed it needs to draw a line between the two points find the perpendicular to the reference point and constrain the intersection to bisect the line between the two points. If the aim of this tool is to make all three points co-linear, then this should be clearly stated in the hint.
What you're saying does not make sense. If choosing a point as symmetry axis, how exactly is it supposed to infer your intent? Here's one very handy use of the symmetry constraint: centre a rectangle on the sketch origin point. You select two diagonally opposed points on the rectangle, then select the sketch origin point, then apply the symmetry. With what you are proposing, I would need to add yet another constraint because it would lock the symmetry in only one axis.

Setting the three points to be co-linear is the only logical choice, otherwise you need to use a line as symmetry axis.
User avatar
freman
Posts: 538
Joined: Tue Nov 27, 2018 10:30 pm

Re: symmetry constraint not performing as indicated

Postby freman » Tue Dec 25, 2018 8:33 am

What I'm suggesting is that it either does what it says, or it says what is does. Sorry, engineering is supposed to work that way. ;)

You are saying that it does neither but it's useful the way it is. That seems to mean you agree that it does not ( accurately ) say what it does in the hint because it is doing more that what it says it will do.

That would imply that you favour improving the hover hint.

I have two gripes with the current hint:

1. it does not say it will also be doing co-linear constraint. If that is desirable, keep it but say what it does.
2. the thing about which object is to be used, where it says "w.r.t. a third point " and it is not the third point selected which is used.
2a either change it so it is the third point ( in the case of a point ) , or reword in a way which is not misleading.

I probably do not have a thorough enough understanding of exactly what it does in all cases yet to suggest a better text for the hint.

PS as a corollary to 2a , there is a problem with point coincidence too, it seems rather arbitrary which point gets constrained to which. This matters since half the time it does it the wrong way and need undoing and redoing. Most annoying. Maybe there is a logic but it does not seem at all predictable to me so far. Again it should say exactly what it does.
chrisb
Posts: 17513
Joined: Tue Mar 17, 2015 9:14 am

Re: symmetry constraint not performing as indicated

Postby chrisb » Tue Dec 25, 2018 9:43 am

freman wrote:
Tue Dec 25, 2018 6:27 am
"Create a symmetry constraint between two points with respect to a line or a third point (S)"
Perhaps the word "or" is the cause of the troubles. As you probably know there are several notions of symmetry. FreeCAD symmetry implements two of them. I am not a native english speaker and since this topic is much about words I follow the wikipedia notions from https://en.wikipedia.org/wiki/Symmetry#In_mathematics.
FreeCAD implements reflectional symmetry if you select a line and two points and rotational symmetry of order 2 if you select three points. the last point will be the fixed point with respect to symmetry. The meaning of this rotational symmetry is, that the fixed point is the center of a circle on which both other points lie and the angle between both points is 180°.

I follow Normand that it all works as described.

So rotational symmetry of orde 2 is in fact reflectional symmetry as well with respect to the perpendicular bisector of the connection line of the two outer points with the third point lying on the bisector as well as on the connection line.
User avatar
freman
Posts: 538
Joined: Tue Nov 27, 2018 10:30 pm

Re: symmetry constraint not performing as indicated

Postby freman » Tue Dec 25, 2018 11:15 am

sym-bug.FCMacro
(345 Bytes) Downloaded 11 times
sym-bug.FCMacro
(345 Bytes) Downloaded 11 times
Thanks Chris, defining things in a more technical manner is helpful. Once you get into 3D and chrystalography there are even more symmetries defined.

However, I have found out what is going on here. Having seen NormandC's macro I was starting to doubt my own recollection as detailed in top post. Then I went back and found that there is a different result depending on whether you select the points, then click the sym tool, or whether you already have the sym tool and select the points. I suspect this may also be the case for the point conincident case I mentioned above, that seemed inconsistent in its behaviour. ( I'll check that out later ).

This relates to my gripe #2. So if the thing works inconsistently this must be a bug.

In view of your explanation of what FreeCAD is doing in the pt vs line cases, I think that requires a clearer hint. I was inferring from the fact it would have to be a reflectional symmetry about a line to that it would be doing the same thing wrt a point. If the rules are going to change that should be made explicitly clear.

"Create a symmetry constraint between two points with respect to a line or a third point (S)"

I think I now know enough to suggest a better hover hint text:

"Create a symmetry constraint between two points: a reflectional symmetry with respect to a line or a rotational symmetry about a third point. "

If it was not a case of breaking backwards compatibility , I would say it would be better design to have this tool as a reflection in both cases (line and point ) and have rotational as a separate tool. A bit like diameter and radius constraints.

That would be more logically and mathematically consistent and give a more precise control over what symmetries can be applied.

/my2c

PS how do I make that macro visible in line? I clicked "place inline" and I just got two links :?
chrisb
Posts: 17513
Joined: Tue Mar 17, 2015 9:14 am

Re: symmetry constraint not performing as indicated

Postby chrisb » Tue Dec 25, 2018 2:19 pm

freman wrote:
Tue Dec 25, 2018 11:15 am
"Create a symmetry constraint between two points with respect to a line or a third point (S)"

I think I now know enough to suggest a better hover hint text:

"Create a symmetry constraint between two points: a reflectional symmetry with respect to a line or a rotational symmetry about a third point. "
Your text is in fact more precise, but for me the hover text is only a short reminder, it does not hold the whole documentation. So I would rather suggest "Create a symmetry constraint".

Talking about two different symmetry operations and icons we should consider usability as well. It is easy and unique to distinguish between the symmetry variants so that most users don't even realize that these are two different mathematical things.
PS how do I make that macro visible in line? I clicked "place inline" and I just got two links :?
If you want to show the macro text: put the text in code tags </>.
User avatar
freman
Posts: 538
Joined: Tue Nov 27, 2018 10:30 pm

Re: symmetry constraint not performing as indicated

Postby freman » Tue Dec 25, 2018 2:45 pm

I wanted to a visual like NormandS did, but I see now that's a gif anim. How is that created?

Is that macro meaningful to others along with the fcstd?
Talking about two different symmetry operations and icons we should consider usability as well. It is easy and unique to distinguish between the symmetry variants so that most users don't even realize that these are two different mathematical things.
Indeed, one needs to avoid cluttering the UI. However, I don't go with dumbing down the user. The hint I suggested is enough to make him aware that there is a difference and if that is not meaningful he needs to look into it. Leaving him blind will head to confusion.

In my case I know enough about symmetry to know it could do the same with a point as it does with a line. That would seem to be the most logical expectation from the same tool, without contrary information.

I would have thought that the point of the hint is to enable a reasonably able and intelligent user to be able to use the tool without having to dig out the user manual. Making it even less descriptive seems perverse.

So should I open a bug about the fact it gets order wrong and behaves differently depending on whether the tool is already in use or not?