FreeCAD
FreeCAD copied to clipboard
Sketcher: Angle Equality Constraint
Is there an existing issue for this?
- [x] I have searched the existing issues
Problem description
Can we have a constraint to make angles equal? Alternatively, options for complementary and supplementary would make it complete.
Full version info
NA
Subproject(s) affected?
None
Anything else?
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
I thought we already have an issue in the tracker for such an equal constraint but I couldn't find it. Workaround is possible with expressions today.
It wasn't possible due to https://github.com/FreeCAD/FreeCAD/issues/22034 But when that is solved then we can have constraint that have more than 3 references. So that should be possible
Good, it looks like this is possible now.
yes indeed.
It's kind of a big feature I'm hesitant in putting my foot into this trap 😄
At solver side, it exists a constraintEqual to link two parameters so it could be think as a constraint on constraints: select two dimensional constraint, click equal and they link together with an internal constraintEqual.
It certainly needs a huge work to allow sketcher constraint to deal also with constraints but it will open amazing possibilities.
So we have two ways of doing this I guess.
1 - The constraint needs 2 angle constraints. The 'angle equality' constraint takes both constraints as input. This sounds difficult, because as you said sketcher constraints currently reference only geometries. Besides one might want to add equality between 2 angles without specifying a value. 2 - The constraints takes as input 2 * the same input as an angle constraint. It then add an angle equality constraint between both. I think this is the correct way to do this feature. On the UI side, the tool can be made to recognize the selection of 2 angle constraint to smartly handles it.
I was thinking this way from the user perspective (which it looks like it aligns with your suggestion 2)
Select 2 lines (same as when applying an angle), and then if you have a 3rd parameter that is an angle, it will use the congruency. Otherwise, it will apply the regular angle constraint.
A quick and nasty implementation could be to add a name to the 3rd parameter (angle) if it does not have it already, and then create the new angle constraint using that name. =)