[solved] Range Checks in Placement Dialog

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
jffmichi
Posts: 22
Joined: Sun Feb 23, 2020 11:25 pm

[solved] Range Checks in Placement Dialog

Post by jffmichi »

Hello everyone,

I just ran into an issue originating from this commit from 3 weeks ago. I wanted to rotate an object 180° around the y-Axis which I could not do because the "pitchAngle" spin box is now limited from -90° to 90°. I see the reason for having sensible limits to inputs the user can make, however in case of angles 180° is definitely a valid angle, so is 360° and everyting above. If a user wants to rotate an object 720° just let him :)

I suggest removing the limits completely. If that is not an option for you guys I would suggest to at least change them for all axis to -360° to 360°.

(Btw. is this the correct place for this post?)
Thank you all for the amazing work!

jffmichi
Last edited by jffmichi on Thu Jan 12, 2023 11:16 am, edited 1 time in total.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Range Checks in Placement Dialog

Post by adrianinsaval »

@wmayer
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Range Checks in Placement Dialog

Post by wmayer »

I just ran into an issue originating from this commit from 3 weeks ago. I wanted to rotate an object 180° around the y-Axis which I could not do because the "pitchAngle" spin box is now limited from -90° to 90°
According to the German wikipedia yaw and roll are defined in the range ]-PI, +PI] and pitch in the range [-PI/2, +PI/2]. And this makes sense because when computing the yaw, pitch, roll angles from a given quaternion then arctan and arcsin are needed which return angles in the above mentioned ranges.

By allowing arbitrary input angles it cannot be guaranteed that the computed angles from a quaternion will be equal and this can cause weird side-effects when working with expressions. For more details see: https://forum.freecadweb.org/viewtopic.php?f=3&t=72522 (especially https://forum.freecadweb.org/viewtopic. ... 05#p648305)
I see the reason for having sensible limits to inputs the user can make, however in case of angles 180° is definitely a valid angle, so is 360° and everyting above. If a user wants to rotate an object 720° just let him
But the placement dialog isn't the only dialog where we restrict the input angles. You will see them also for the revolution/groove or primitive creation dialogs.
I suggest removing the limits completely. If that is not an option for you guys I would suggest to at least change them for all axis to -360° to 360°.
Either we leave it as it is and avoid the side-effects or remove the restrictions but then cannot handle the side-effects.
jffmichi
Posts: 22
Joined: Sun Feb 23, 2020 11:25 pm

Re: Range Checks in Placement Dialog

Post by jffmichi »

I did not know about that thread and will read through it and see if I can understand the implications.

However, I do still think that "rotate an object 180° around the y-axis" is an operation that the Placement dialog should support by entering 180° in the "around y-axis" text field. Otherwise a user needs to do the mapping to yaw-pitch-roll ranges in their head and enter yaw: 180°, pitch: 0°, roll: 180° to get the desired orientation. Even for something simple als 180° this is unpractical at least in my head.

Personally and for this use case I would be ok with the Placement dialog then showing 180°, 0°, 180° when I open it the next time
jffmichi
Posts: 22
Joined: Sun Feb 23, 2020 11:25 pm

Re: Range Checks in Placement Dialog

Post by jffmichi »

OK I read through the thread. I still stand by my statement that "rotate 180° around y-axis" should be possible without converting in your head. I noticed I can still do that by using "Rotation axis with angle" and manually entering (0,1,0) as axis... a few more keystrokes but somewhat acceptable. Maybe I'll try using the "Transform"-thingy.

In any case, I'm not perfectly happy with the range check but if that solves another problem I'll live with it happily ever after.
Thank you for the awesome work you all put into FreeCAD!

jffmichi
Post Reply