Sketcher does not allow usage of reference constraints
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Sketcher does not allow usage of reference constraints
The sketcher in 0.17 does not allow the usage of reference constraints anymore, if they are defined in the same sketch. In 0.16 this is possible.
I think this feature is very useful to transport measures from one end to another. In many cases this can be achieved by other means as well, e.g. with additional construction lines and equality constraints but thinking of angles things become more difficult. As 0.16 shows it is well possible. Why has it been removed? Is there any advantage outwheighing the removal?
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12183 (Git)
Build type: Release
Branch: (detached from 7d4eafb)
Hash: 7d4eafbab04f85fc07100915130d720af599f1b6
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
I think this feature is very useful to transport measures from one end to another. In many cases this can be achieved by other means as well, e.g. with additional construction lines and equality constraints but thinking of angles things become more difficult. As 0.16 shows it is well possible. Why has it been removed? Is there any advantage outwheighing the removal?
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12183 (Git)
Build type: Release
Branch: (detached from 7d4eafb)
Hash: 7d4eafbab04f85fc07100915130d720af599f1b6
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
- Attachments
-
- Bildschirmfoto 2017-09-23 um 09.26.40.png (44.11 KiB) Viewed 4693 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 602
- Joined: Tue Jan 29, 2013 10:35 pm
Re: Sketcher does not allow usage of reference constraints
Are you sure this works in the most recent version of 0.16? It's not supposed to work, as the solver is not updated with the reference constraints during the solving, but after a stable solution has been found.chrisb wrote: ↑Sat Sep 23, 2017 7:27 am The sketcher in 0.17 does not allow the usage of reference constraints anymore, if they are defined in the same sketch. In 0.16 this is possible.
I think this feature is very useful to transport measures from one end to another. In many cases this can be achieved by other means as well, e.g. with additional construction lines and equality constraints but thinking of angles things become more difficult. As 0.16 shows it is well possible. Why has it been removed? Is there any advantage outwheighing the removal?
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12183 (Git)
Build type: Release
Branch: (detached from 7d4eafb)
Hash: 7d4eafbab04f85fc07100915130d720af599f1b6
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
Eivind
Re: Sketcher does not allow usage of reference constraints
When I realized this issue in 0.17 I tried it in 0.16.6712 and I could bet it worked. Otherwise I would not have mentioned it explicitely.
When I try it now I cannot replicate, neither in 0.16.6712 nor in 0.17 as reported.
However, I found a way to implement such dependencies: Use a normal constraint in an Expression and turn it later into a reference. It works as expected.
When I try it now I cannot replicate, neither in 0.16.6712 nor in 0.17 as reported.
However, I found a way to implement such dependencies: Use a normal constraint in an Expression and turn it later into a reference. It works as expected.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 602
- Joined: Tue Jan 29, 2013 10:35 pm
Re: Sketcher does not allow usage of reference constraints
This is also not supposed to work, and I'd consider this a bug. The behaviour is undefined, and you're just lucky if it works as you expect. The closest working solution to what you want to archieve is to not refer to reference constraints, but use real constraints. This is well-defined, and works as expected.chrisb wrote: ↑Sat Sep 23, 2017 11:07 pm When I realized this issue in 0.17 I tried it in 0.16.6712 and I could bet it worked. Otherwise I would not have mentioned it explicitely.
When I try it now I cannot replicate, neither in 0.16.6712 nor in 0.17 as reported.
However, I found a way to implement such dependencies: Use a normal constraint in an Expression and turn it later into a reference. It works as expected.
Eivind
Re: Sketcher does not allow usage of reference constraints
I now faintly remember that there was an issue with these reference constraints leading to more or less converging solutions of the constraints system.
Thanks for responding.
Thanks for responding.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Sketcher does not allow usage of reference constraints
It would be nice to try to solve this problem so reference constraints can be used. To me , it seems as though the inability to use reference constraints has a significant impact on the usefulness of expressions in Sketcher. I can do what I need in Python, of course, but I almost didn't have to...
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Sketcher does not allow usage of reference constraints
I have been using reference constraints to make "calculators." It is very handy to have an angle in the reference constraint, name it, and be able to reference it in other areas.
3D Printing, CAD, Electronics and other errata at: https://www.youtube.com/channel/mathcodeprint
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Sketcher does not allow usage of reference constraints
What version are you using?
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Sketcher does not allow usage of reference constraints
At the time of the post I was using 0.17 ( The latest daily build )
Now I am using 0.18
In this version of 0.18 you can not use the Reference constraint AND you can not change it to a Reference constraint after the fact. from the Toolbar. It just fails with no message.
However, if you right click in the Contstraints tab of Combo-Tasks, you can toggle to Ref constraint and the reference remains.
the calculation is unreliable tho ... so better not use it
A change in the ref constraint from Sketch-Edit mode does not update the Expression based constraint. However if you change the value in the Properties-Data tab it will update the value of the Expression in the driven constraint.
I will do a gif of this if needed/wanted
Now I am using 0.18
Code: Select all
OS: Linux Mint 17.3 Rosa
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.13588 (Git)
Build type: None
Branch: master
Hash: 1e2b9758cc7f6872da018ee71983a82499866508
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
However, if you right click in the Contstraints tab of Combo-Tasks, you can toggle to Ref constraint and the reference remains.
the calculation is unreliable tho ... so better not use it
A change in the ref constraint from Sketch-Edit mode does not update the Expression based constraint. However if you change the value in the Properties-Data tab it will update the value of the Expression in the driven constraint.
I will do a gif of this if needed/wanted
3D Printing, CAD, Electronics and other errata at: https://www.youtube.com/channel/mathcodeprint
Re: Sketcher does not allow usage of reference constraints
I guess using construction mode geometry you can get a line of the right dimension and then use an equal constraint to do the "geometrical calculator" job.
However, as there are no equal constraints for angles, how do you do it ? Using an isosceles triangle should work but would be a pain to set up.
Is there reason why angle could not have equal constraints?
Cheers
However, as there are no equal constraints for angles, how do you do it ? Using an isosceles triangle should work but would be a pain to set up.
Is there reason why angle could not have equal constraints?
Cheers