[bug] Cant add reference constraint to already defined circle/arc

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!
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

[bug] Cant add reference constraint to already defined circle/arc

Post by kisolre »

Take any fully defined arc/circle. While in defining constraints mode try to add radius/diameter constraint to it. Check the "Reference" checkbox while creating the constraint to try to create a reference one. Error is displayed on confirmation and a reference constraint is not created.
I remember experiencing this in the past but cant find forum thread about it.

Edit: I just tried and you can not add reference constraint by this method even to non defined arc/circle. It is created as a real one regardless of the checkbox state. Works for angles and length dimensions.

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.24673 (Git)
Build type: Release
Branch: master
Hash: e66ed26769ce8affe0a4ed330ff0435f4802f05e
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Bulgarian/Bulgaria (bg_BG)
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by Bance »

confirmed on:-

OS: Linux Mint 20.1 (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 2599d67c2bd41a5f051b994b6da7890a2b4ecc4c
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United Kingdom (en_GB)
28.2.21

and on:-

OS: Linux Mint 20.1 (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.19.1)
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
edwilliams16
Veteran
Posts: 3180
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by edwilliams16 »

You can RMC on the constraint (in the task box) and toggle it to reference OK. You can also create the arc in construction mode, create the reference and then toggle the arc back to normal geometry. But otherwise as described.
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by chrisb »

There is no ticket for this, so please create one.

My observations:
- It's independent from the arc's state, the issue remains if it is not or partially constrained. The checkbox in creation dialog doesn't work on radius.
- A workaround is to toggle the dimension tools: use Image while nothing is selected and then add the driven constraint.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by kisolre »

issue #4627
abdullah wrote: Ping
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by openBrain »

chrisb wrote: Fri Apr 09, 2021 6:42 am My observations:
- It's independent from the arc's state, the issue remains if it is not or partially constrained. The checkbox in creation dialog doesn't work on radius.
- A workaround is to toggle the dimension tools: use Image while nothing is selected and then add the driven constraint.
As further observations :
- At dimension creation time, the 'Reference' checkbox seems to fail soon as clicking on it neither vary the DoFs nor trigger a recompute (which it does for other dimensions)
- The 'Reference' checkbox works correctly when the constraint is edited (double-click on existing dimension)

I'll try to have a look.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by openBrain »

OK, guys. After some investigations, the problem may be a bit weird.
Actually, radius/diameter constraint is processed a bit differently from other dimensional ones as it is allowed to select several arcs/circles before applying the constraint. It makes the code different from other constraints. For those who like history, it was introduced following issue #1633
BTW I wasn't aware of this (quite unique) behavior.
ATM, I see 3 possibilities that I'd like community's opinion :
1 - Make angle constraint as others : 'Reference' checkbox will work, but multi-selection before applying will be lost
2 - Remove 'Reference' checkbox when talking about radius/diameter
3 - Improve dimension dialog so it supports setting multiple constraints at a time : that will probably take quite a long time
---
Personal vote : 1
Rational :
- Multiselection makes radius/diameter inconsistent in behavior with other constraints
- This isn't so much time won when you're used to sketcher
- This encouraged bad sketch constraining (one of the offered option when multiselecting is to add a dimensional constraint on each arc/circle)
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by Bance »

I like the multi-selection feature, but I could live without it :D
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by openBrain »

Bance wrote: Mon Apr 12, 2021 3:01 pm I like the multi-selection feature, but I could live without it :D
Actually there could be a 1bis option. In case of multiselection, an equal constraint is added between all selected arcs/circles (no other option) and the dimensional is applied on the first (last TBD) selected one. Would that be OK?
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: [bug] Cant add reference constraint to already defined circle/arc

Post by Bance »

Yes that would do nicely.

Thank you.
Post Reply