negative values in lock constraint

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!
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: negative values in lock constraint

Post by chrisb »

I assume it would be possible to use internally some kind of "directed equality".
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
brjhaverkamp
Posts: 126
Joined: Thu Sep 24, 2015 3:14 pm

Re: negative values in lock constraint

Post by brjhaverkamp »

Thanks for the good discussion on my initial request! I'm learning a lot
I understand that the sign of the value indicates the direction of the constraint. It would be beneficial to give the user power over this. Sometimes I don't care about the direction (most of the times I guess) Sometimes it is crucial for the stability of a sketch

I could imagine a simple checkbox for a (horizontal/vertical) distance constraint, where the user can set if it is directional or not.
In case it is not, the solver is free to flip it
In case it is, the sign should be preserved. ie. if the distance is positive at creation, it should stay positive, if it is negative, it should stay negative.

For equality contraint, also a checkbox could be added to to indicate whether the equality is including direction, or only on absolute value.

Still it would be a matter of taste to show the sign to the user, or always give the distance as a positive value. In theory you can keep the sign hidden and only use it under the hood. If the user specifies a negative value, the direction flips, but the value shown is positive again. If the user specifies a negative value again, the direction flips back, but the value is still shown positive, etc.

Regards,

Bert
Post Reply