FreeCAD icon indicating copy to clipboard operation
FreeCAD copied to clipboard

Sketcher: Angle Equality Constraint

Open leoheck opened this issue 5 months ago • 1 comments

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

leoheck avatar Jun 14 '25 04:06 leoheck

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.

maxwxyz avatar Jun 14 '25 06:06 maxwxyz

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

PaddleStroke avatar Jul 10 '25 12:07 PaddleStroke

Good, it looks like this is possible now.

leoheck avatar Nov 16 '25 16:11 leoheck

yes indeed.

PaddleStroke avatar Nov 17 '25 09:11 PaddleStroke

It's kind of a big feature I'm hesitant in putting my foot into this trap 😄

PaddleStroke avatar Nov 17 '25 17:11 PaddleStroke

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.

FlachyJoe avatar Nov 17 '25 17:11 FlachyJoe

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.

PaddleStroke avatar Nov 17 '25 17:11 PaddleStroke

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.

leoheck avatar Nov 17 '25 18:11 leoheck

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. =)

leoheck avatar Nov 17 '25 18:11 leoheck