[Solved] Sketch Angle Constraints Wrong Reference Reading?

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!
paullee
Posts: 2624
Joined: Wed May 04, 2016 3:58 pm

[Solved] Sketch Angle Constraints Wrong Reference Reading?

Postby paullee » Sun Dec 24, 2017 3:37 am

Hi, puzzling for a while. There are a few angle Constraints in the sketch below as reference.

A point move around and the angles update as reference.

At some particular cases, see screencapture for the one captured, a reading return 11.76 deg though it is apparently 2 lines bigger than 90 degrees. The reference provide wrong reading frustrate subsequent calculation / expression.

Interestingly, when the file is untouched and re-opened, it reads (I am not sure if re-opening the sketch w/o closing the file do the same thing) -168.xx degree which is the correct reading. Anything missing or could be done? Thanks.
.
Screenshot from 2017-12-24 10-57-58.png
Screenshot from 2017-12-24 10-57-58.png (177 KiB) Viewed 1360 times
.
Screenshot from 2017-12-24 11-00-42.png
Screenshot from 2017-12-24 11-00-42.png (174.61 KiB) Viewed 1360 times

[EDIT]
OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12852 (Git)
Build type: None
Branch: master
Hash: 8e3b2d7e84924444bc219133a7e0bbd07413cf4f
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Attachments
Test _ Sketch _ Angle Constraint Puzzle.fcstd
(5.25 KiB) Downloaded 11 times
Last edited by paullee on Tue Jan 02, 2018 6:13 pm, edited 2 times in total.
chrisb
Posts: 26941
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby chrisb » Sun Dec 24, 2017 6:41 am

Which version do you use? Did you try a Force_Recompute (0.16) or the built-in recompute for the whole document (0.17)?
chrisb
Posts: 26941
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby chrisb » Sun Dec 24, 2017 6:56 am

Here everything seems to be ok. Which point are you actually dragging?
Have you checked the "Improve solving while dragging"-box in the preferences?

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12851 (Git)
Build type: Release
Branch: (HEAD detached at 394ae19)
Hash: 394ae197fbe082ee32321b60bcae579262fa6df0
Python version: 2.7.14
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6712 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: da2d364457257a7a8c6fb2137cea12c45becd71a
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
paullee
Posts: 2624
Joined: Wed May 04, 2016 3:58 pm

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby paullee » Sun Dec 24, 2017 10:14 am

chrisb wrote:
Sun Dec 24, 2017 6:56 am
Here everything seems to be ok. Which point are you actually dragging?
Have you checked the "Improve solving while dragging"-box in the preferences?

Oops, forgot the version
on mobile now, lateest Appimage git 12852

it is random, just drag the central point with a bunch of construction lines attached to it.

lot of time constraint a4 has problem

Note when it is Wong,. It report the complementary angle i.e.,-ve (180 - correct angle)
chrisb
Posts: 26941
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby chrisb » Sun Dec 24, 2017 10:43 am

I can reproduce it when moving the center - before I tried only the two points. The wrong angle is corrected as soon as I hit the recompute button.
chrisb
Posts: 26941
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby chrisb » Sun Dec 24, 2017 10:45 am

Saving triggers the recompute as well. After closing and reopening the sketch it shows the correct angle. Is this the same at yours?
paullee
Posts: 2624
Joined: Wed May 04, 2016 3:58 pm

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby paullee » Sun Dec 24, 2017 10:54 am

chrisb wrote:
Sun Dec 24, 2017 10:43 am
I can reproduce it when moving the center - before I tried only the two points. The wrong angle is corrected as soon as I hit the recompute button.
not always corrected upon recompute in my version / test.

Afterall, should be bug, no good need recompute especially as those reference datum is refered in other
expression, giving wrong result unknown to user.
chrisb
Posts: 26941
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby chrisb » Sun Dec 24, 2017 11:12 am

If it's not corrected at the closing recompute it's a bug.
paullee
Posts: 2624
Joined: Wed May 04, 2016 3:58 pm

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby paullee » Sun Dec 24, 2017 5:11 pm

wmayer
Site Admin
Posts: 16272
Joined: Thu Feb 19, 2009 10:32 am

Re: Sketch Angle Constraints Wrong Reference Reading?

Postby wmayer » Fri Dec 29, 2017 2:35 pm

There a few more oddities:
  • when deleting the angle constraint (Constraint23) then an error message comes up:
    Duplicate constraint not allowed
  • when selecting the two edges of the deleted angle constrained and trying to add a new constraint results into a heap corruption