Sketcher Invalid Constraint Index 22

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
dimitar
Posts: 147
Joined: Thu Jun 13, 2019 6:10 am
Location: UK
Contact:

Sketcher Invalid Constraint Index 22

Postby dimitar » Sun Jul 14, 2019 1:05 pm

Fairly new to Freecad here. I am doing a very simple sketch where, I would like to put an angle constraint. I can initally put it, but if I try to change the value, I get an " Invalid Constraint Index 22"

The reporter says the following:

Code: Select all

Drag point: Not able to move point with the id and type: (4, 1)
FreeCAD_AZbI9CsIfR.png
FreeCAD_AZbI9CsIfR.png (33.54 KiB) Viewed 174 times
My version info:

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16117 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: dbb4cc6415bac848a294f03b80f65e888d531742
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
Attachments
edgeAngleError.FCStd
(13.56 KiB) Downloaded 8 times
User avatar
GlouGlou
Posts: 1678
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Sketcher Invalid Constraint Index 22

Postby GlouGlou » Sun Jul 14, 2019 1:24 pm

a small sketcher bug. Set the angle to blue, then set it to 10°. It must turn up to red.
User avatar
dimitar
Posts: 147
Joined: Thu Jun 13, 2019 6:10 am
Location: UK
Contact:

Re: Sketcher Invalid Constraint Index 22

Postby dimitar » Sun Jul 14, 2019 1:48 pm

GlouGlou wrote:
Sun Jul 14, 2019 1:24 pm
a small sketcher bug. Set the angle to blue, then set it to 10°. It must turn up to red.
When I change the angle constraint to blue reference mode, and double click on it to edit, I still get the same error.
kisolre
Posts: 1360
Joined: Wed Nov 21, 2018 1:13 pm

Re: Sketcher Invalid Constraint Index 22

Postby kisolre » Sun Jul 14, 2019 2:00 pm

Set it to reference mode. Try to move something that will change that angle. Observe the range it could change. Something might prevent it to go up to 10 deg.
User avatar
dimitar
Posts: 147
Joined: Thu Jun 13, 2019 6:10 am
Location: UK
Contact:

Re: Sketcher Invalid Constraint Index 22

Postby dimitar » Sun Jul 14, 2019 2:21 pm

kisolre wrote:
Sun Jul 14, 2019 2:00 pm
Set it to reference mode. Try to move something that will change that angle. Observe the range it could change. Something might prevent it to go up to 10 deg.
The issue is that i cannot be as precise as I need to be in reference mode.
User avatar
papyblaise
Posts: 651
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Sketcher Invalid Constraint Index 22

Postby papyblaise » Sun Jul 14, 2019 2:25 pm

hello
I don't know if it's a real bug but I turn around it long time to resolve 100% constraints
in this case , try to change the order of the constraints , and you resolve it
Attachments
edgesAngle.PNG
edgesAngle.PNG (19.14 KiB) Viewed 143 times
kisolre
Posts: 1360
Joined: Wed Nov 21, 2018 1:13 pm

Re: Sketcher Invalid Constraint Index 22

Postby kisolre » Sun Jul 14, 2019 2:46 pm

dimitar wrote:
Sun Jul 14, 2019 2:21 pm
The issue is that i cannot be as precise as I need to be in reference mode.
That is not the point. First your sketch must not be overconstrained. It is not visible from the screenshot and I don't have a PC here to check. Then it must be possible to actually set that value. That is why I suggested you check the range it can change by setting it in reference mode. If it can pass from 9.9 to 10.1 there should not be reason for that warning. But if it can go just to 7 of course you will not be able to set it to 10.
User avatar
bejant
Posts: 5938
Joined: Thu Jul 11, 2013 3:06 pm

Re: Sketcher Invalid Constraint Index 22

Postby bejant » Sun Jul 14, 2019 4:17 pm

If I change the problem Angle Constraint from red to blue, then drag the geometry so the angle is quite close to 10 degrees, I can change the Angle Constraint back to red and then set it to exactly 10 degrees. I think that without getting the geometry close to the intended Angle first, Sketcher reaches the maximum number of iterations limit and stops before the Sketch is Solved.

20190714-NoEdgeAngleError.FCStd
(8.37 KiB) Downloaded 1 time

OS: Ubuntu 18.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.1.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
chrisb
Posts: 18990
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher Invalid Constraint Index 22

Postby chrisb » Sun Jul 14, 2019 4:35 pm

bejant wrote:
Sun Jul 14, 2019 4:17 pm
I think that without getting the geometry close to the intended Angle first, Sketcher reaches the maximum number of iterations limit and stops before the Sketch is Solved.
That would be my guess too. You can set the angle without the "blue deviation" by setting it subsequently to 7, 8, 9, and finally to 10.
chrisb
Posts: 18990
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher Invalid Constraint Index 22

Postby chrisb » Sun Jul 14, 2019 4:41 pm

The sketch is in the meter dimensions, while FreeCAD uses mm as its internal unit. This seems to lead to some additional imprecisions.

You can enable in the sketcher preferences the chekbox "Show advanced solver controls". If you enter sketcher you can check "Sketch size multiplier" and after that I could immediately go to the desired angle of 10°.