New bug (I guess)

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!
SirDancealot
Posts: 7
Joined: Sat Jul 04, 2020 12:36 pm

New bug (I guess)

Post by SirDancealot »

Hello everyone,
I am new at this software and I'm trying to learn it and for that I was watching this tutorial:
https://www.youtube.com/watch?v=_HEvhcl ... 26cn9idJrj
Yet I cannot follow the instructions as it is instructed, let me elaborate how:


1)Open FreeCAD
2)Open new document
3)Select part design
4)Create a new sketch
5)Select XY plane
6)Draw a rectangle (My problem starts from here now on)
7)Constraint a symmetry between top two points according to the vertical axis

(Here it can be seen that my sketch is over-constrained)
(And there is some problem with the sketch updating it is not symmetrical)
Screenshot (2).png
Screenshot (2).png (190.29 KiB) Viewed 1250 times
(Updating problem can be gone with twitching [or playing (English not the first language)] around with the sketch)
Screenshot (3).png
Screenshot (3).png (190.53 KiB) Viewed 1250 times
8)Constraint a symmetry between right two points around the horizontal axis
(Same updating problem here too)
(Another over-constrain)
Screenshot (4).png
Screenshot (4).png (191.54 KiB) Viewed 1250 times
9)Proceed to fixing a length to the top line
(Set it to 200mm)
Screenshot (5).png
Screenshot (5).png (202.73 KiB) Viewed 1250 times
(This error tab appears)
Screenshot (6).png
Screenshot (6).png (203.65 KiB) Viewed 1250 times
My FreeCAD version informations are:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Thank you for your attention!
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: New bug (I guess)

Post by openBrain »

Please attach your file.
Can you reproduce with FreeCAD 0.19?
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: New bug (I guess)

Post by jmaustpc »

Your first post, welcome.

That tutorial is about 5 years old now. The code has advanced considerably. The channel was created by a well respected member of this forum, Roland Frank, who was killed in a car accident nearly three years ago.

I tried the latest daily Ubuntu build and it produces the same over constrained error message here in the development version...

OS: Ubuntu 18.04.4 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: bc309838dc96c74261ac88cac7d9b70c9f9aa552
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)

The problem is that the symmetry forces the top line to be horizontal, but there is already a horizontal constraint automatically inserted by the rectangle tool.

I am not sure if this is intentional or not. Probably abdulla would know, if someone else doesn't know the answer I will contact him and ask.

Most of us would not have noticed this I suppose because you no longer need to apply two symmetry constraints, one to the x and another to the y axes, you just select one pair of diagonally opposed vertices and apply the symmetry constrain against the sketch origin (the dot where the X and Y axes cross).

Jim
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: New bug (I guess)

Post by openBrain »

jmaustpc wrote: Sat Jul 04, 2020 1:59 pm The problem is that the symmetry forces the top line to be horizontal, but there is already a horizontal constraint automatically inserted by the rectangle tool.

I am not sure if this is intentional or not. Probably abdulla would know, if someone else doesn't know the answer I will contact him and ask.
This is correct and perfectly on purpose. Mathematically, a symmetry against a vertical line implies the 2 points are horizontally aligned. So this is redundant and solver is correct.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: New bug (I guess)

Post by jmaustpc »

openBrain wrote: Sat Jul 04, 2020 1:54 pm Please attach your file.
Can you reproduce with FreeCAD 0.19?
this is an example file showing what he is talking about.
symmetry_constraint_against_axis.FCStd
(9.69 KiB) Downloaded 32 times

It seems to be a change in behaviour in the code over the last 5 years, I am not sure if it is intentional or not but I think it is. Logically I would have thought a line could be symmetrical to an axis without needing to be perpendicular to it, but symmetry constrain forced the line to be perpendicular, you are no doubt correct about it from a maths point of view, I think Abdulla told me that too once a while ago. Perhaps I am confusing maths terms for symmetrical and equidistant?

Jim
SirDancealot
Posts: 7
Joined: Sat Jul 04, 2020 12:36 pm

Re: New bug (I guess)

Post by SirDancealot »

@openBrain
I don't use FreeCAD 0.19 (most correctly I can't because this version I use is the one I downloaded from the website and don't know where to download version 0.19 and even if I did, I don't know if it is stable).
I attached the file.
Metin
Attachments
The_Buggy_Rectangle.FCStd
(5.47 KiB) Downloaded 29 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: New bug (I guess)

Post by GeneFC »

jmaustpc wrote: Sat Jul 04, 2020 2:09 pm It seems to be a change in behaviour in the code over the last 5 years, I am not sure if it is intentional or not but I think it is. Logically I would have thought a line could be symmetrical to an axis without needing to be perpendicular to it, but symmetry constrain forced the line to be perpendicular, you are no doubt correct about it from a maths point of view
We had this debate a couple of years ago, and I was overruled. Strictly speaking line symmetry implies a mirror placement, which further implies the line between the symmetry points needs to be perpendicular to the line of symmetry. However, it is often the case that one wants the points to be equidistant from the line, with no other constraints.

That feature is not implemented through a simple operation in the sketcher.

The difference over five years is mainly that the sketcher is much more alert to redundant constraints. In this simple case the redundancy may not be very important for the solver, but it is flagged and disallowed.

Gene
SirDancealot
Posts: 7
Joined: Sat Jul 04, 2020 12:36 pm

Re: New bug (I guess)

Post by SirDancealot »

openBrain wrote: Sat Jul 04, 2020 2:05 pm
jmaustpc wrote: Sat Jul 04, 2020 1:59 pm The problem is that the symmetry forces the top line to be horizontal, but there is already a horizontal constraint automatically inserted by the rectangle tool.

I am not sure if this is intentional or not. Probably abdulla would know, if someone else doesn't know the answer I will contact him and ask.
This is correct and perfectly on purpose. Mathematically, a symmetry against a vertical line implies the 2 points are horizontally aligned. So this is redundant and solver is correct.
If the compiler is going to give an error when I'm going to use symmetry function is there any other function I can use like equidistancy?
drmacro
Veteran
Posts: 9003
Joined: Sun Mar 02, 2014 4:35 pm

Re: New bug (I guess)

Post by drmacro »

openBrain wrote: Sat Jul 04, 2020 2:05 pm
jmaustpc wrote: Sat Jul 04, 2020 1:59 pm The problem is that the symmetry forces the top line to be horizontal, but there is already a horizontal constraint automatically inserted by the rectangle tool.

I am not sure if this is intentional or not. Probably abdulla would know, if someone else doesn't know the answer I will contact him and ask.
This is correct and perfectly on purpose. Mathematically, a symmetry against a vertical line implies the 2 points are horizontally aligned. So this is redundant and solver is correct.
I can confirm it does the same in 0.19.

Also, I agree that mathematically this is correct.

But, this harkens to the the the post about trimming a circle. https://forum.freecadweb.org/viewtopic.php?f=3&t=48289

If auto constrains, avoid auto redundant, etc. are turned it doesn't correct the issue.

Even if they are turned off and you use the rectangle tool, it adds horizontal/vertical constraints. And adding a symmetry constraint then produces the redundancy.

So, the user should be instructed or just know the horizontal constraint needs to be removed first?

In the case of the circle trim, the constraints (point on line, endpoint coincident, tangent) were basically fitting each other and messing things up.

For some reason, I never noticed either issue until the last few days. In this OP though it is noted in 0.18 and I've been running 0.19 daily exclusively for a year.

OS: Ubuntu 19.10 (XFCE/ubuntustudio)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 33841eb827045002a5fa3e82cde7ecccb9e67cdb
Python version: 3.7.5
Qt version: 5.12.4
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
drmacro
Veteran
Posts: 9003
Joined: Sun Mar 02, 2014 4:35 pm

Re: New bug (I guess)

Post by drmacro »

jmaustpc wrote: Sat Jul 04, 2020 1:59 pm ...

Most of us would not have noticed this I suppose because you no longer need to apply two symmetry constraints, one to the x and another to the y axes, you just select one pair of diagonally opposed vertices and apply the symmetry constrain against the sketch origin (the dot where the X and Y axes cross).
...
Hmm...if you make, for example, a trapezoid/rhomboid with no vertical constraints and attempt to apply the symmetry to only the top or bottom the same occurs.

My point is that the diagonal constraint is a special, not general, case.

A very useful thing indeed, but, not applicable in every case. :)

(And, another choice of tool may be the square tool, since it does not add the horizontal/vertical constraints.)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Post Reply