Rotate about selection

A forum for research and development of the user interface of FreeCAD

Moderator: agryson

User avatar
Joel_graff
Posts: 1109
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Rotate about selection

Postby Joel_graff » Wed Sep 26, 2018 3:12 pm

I was wondering, could we implement rotation about selection in the UI? Blender's rotate-about-selection feature is really intuitive and useful to me - I'd love to see it in FreeCAD.
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
chrisb
Posts: 14524
Joined: Tue Mar 17, 2015 9:14 am

Re: Rotate about selection

Postby chrisb » Wed Sep 26, 2018 6:51 pm

Joel_graff wrote:
Wed Sep 26, 2018 3:12 pm
I was wondering, could we implement rotation about selection in the UI? Blender's rotate-about-selection feature is really intuitive and useful to me - I'd love to see it in FreeCAD.
I'm not familiar with Blender. Can you please elaborate how it works?
User avatar
Joel_graff
Posts: 1109
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Rotate about selection

Postby Joel_graff » Wed Sep 26, 2018 7:43 pm

Imagine selecting an edge on a shape. Then, clicking the mouse wheel to rotate. A Rotate-about-selection feature would put the camera's center of rotation at the midpoint of the edge, so that the edge remains centered on the screen.

The intuition is, if I'm working on something, and need a better angle on it, I should be able to pick it and rotate about it directly. It may not be everyone's favorite way of doing things, but I find it's a very intuitive feature, at least when working on mesh components (edges, faces, vertices) in Blender.

I suppose the algorithm for it would have to calculate the position of the selections' aggregate center of mass to do it...
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
triplus
Posts: 8278
Joined: Mon Dec 12, 2011 4:45 pm

Re: Rotate about selection

Postby triplus » Wed Sep 26, 2018 7:53 pm

There could already be something like that implemented in FreeCAD. Hover over the navigation indicator with a mouse (located at the bottom right corner in the status bar). Some clues should emerge. Blender navigation style for example mentions on how to set the rotation focus. Select one vertex of a cube and set the rotation focus. Too see if this is what you are after (or at least close enough).
User avatar
Joel_graff
Posts: 1109
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Rotate about selection

Postby Joel_graff » Wed Sep 26, 2018 9:18 pm

triplus wrote:
Wed Sep 26, 2018 7:53 pm
Blender navigation style for example mentions on how to set the rotation focus. Select one vertex of a cube and set the rotation focus. Too see if this is what you are after (or at least close enough).
Ok, I didn't realize that by clicking the mouse button you set the rotation focus - that does exactly what I had hoped.

In Blender, it's a selected preference, so it's either on or it's off, which has a couple of advantages, IMO. Still the FC implementation certainly works well enough.
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
wmayer
Site Admin
Posts: 13916
Joined: Thu Feb 19, 2009 10:32 am

Re: Rotate about selection

Postby wmayer » Thu Sep 27, 2018 6:10 am

If you use a recent 0.18 development version you will find the option "Drag at cursor" in the preferences. The rotation point then doesn't need to be the center of the 3d view but can be everywhere.
User avatar
Joel_graff
Posts: 1109
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: Rotate about selection

Postby Joel_graff » Thu Sep 27, 2018 2:00 pm

wmayer wrote:
Thu Sep 27, 2018 6:10 am
If you use a recent 0.18 development version you will find the option "Drag at cursor" in the preferences. The rotation point then doesn't need to be the center of the 3d view but can be everywhere.
Perfect! Thanks!
You can find the FreeCAD Trails workbench for transportation engineering on my github at:
https://www.github.com/joelgraff/freecad.trails
triplus
Posts: 8278
Joined: Mon Dec 12, 2011 4:45 pm

Re: Rotate about selection

Postby triplus » Mon Oct 01, 2018 6:48 pm

Joel_graff wrote:
Wed Sep 26, 2018 9:18 pm
Ok, I didn't realize that by clicking the mouse button you set the rotation focus - that does exactly what I had hoped.
Good to hear that.