Rotate objects 90º relative to view
All  1  2-16

Previous
Next
 From:  Michael Gibson
11898.2 In reply to 11898.1 
Hi Marc, that's a helpful illustration!

So I think I understand that left/right will rotate the object in 90 degree steps using a revolve axis that is vertical relative to the current view, and up/down will rotate the object in 90 degree steps using a revolve axis horizontal in the current view.

In the 2D Top/Front/Right views the revolve axis should be in a world x/y/z axis direction, right?

What do you want to happen in a 3D view, should it select a world axis direction that is closest to the current view's up/down or left/right directions?

Or should it rotate around the 3D view's actual local left/right or up/down axis directions which will kind of tilt objects without keeping them aligned to other objects... ?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Marc (TELLIER)
11898.3 In reply to 11898.2 
Hi,

""""""""""""So I think I understand that left/right will rotate the object in 90 degree steps using a revolve axis that is vertical relative to the current view, and up/down will rotate the object in 90 degree steps using a revolve axis horizontal in the current view.w""""""""""""""

Yes, the axis being centered in the bounding box of the object or selection.

""""""""""""In the 2D Top/Front/Right views the revolve axis should be in a world x/y/z axis direction, right?""""""""""

I'm not 100% certain I understand what the difference would be between, for example, local front xyz and world xyz.

Concerning the 3D viewport it could be the same as the top view, but your idea about the closest to an orthographic view direction is quite good

Marc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11898.4 In reply to 11898.3 
Hi Marc, so local horizontal relative to the 3D view would be like this:




Or do you want the rotations to only be in the world x, y, z axis directions which would be one of these 3 directions:



- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Marc (TELLIER)
11898.5 In reply to 11898.4 
Hi Michael,

World x,y,z axis in 3d view.

Marc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Marc (TELLIER)
11898.6 In reply to 11898.4 
Hi Michael,

Thinking about it, 3D view-based rotation as you described could also be interesting to quickly adjust object rotation.

But this would be for a different usage than for making plan details.
Adjusting profiles along a sweep object of organic shapes could be a usage example.

Maybe this manner could work without the rotation angle 90º constraint or have a modifier to snap to.
The command could trigger rotate, center, and mouse "up or down" or "left and right" could approximate the rotation angle.

Thanks,

Marc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11898.7 In reply to 11898.5 
Hi Marc, ok try the attached script.

Instructions for installing a plug-in script command here.

Set one of these for the command on each arrow key shortcut, note there should be a space after "Rotate90RelativeToView" :

Rotate90RelativeToView Left
Rotate90RelativeToView Right
Rotate90RelativeToView Up
Rotate90RelativeToView Down

- Michael

EDIT: applied bug fix from Mik

EDITED: 15 Jan by MICHAEL GIBSON


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Marc (TELLIER)
11898.8 In reply to 11898.7 
Hi Michael,

Works like a charm, you are a magician !

Thanks for taking the time to look at this.

Here's a project I'm working on, a Morris chair design with assorted table and leg rests in cherry wood .
The command will help in the laying out of individual parts.

Marc





  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Matadem
11898.9 
The spacebar script to switch view is fast also...especially on a laptop.
cannot live without it.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Marc (TELLIER)
11898.10 In reply to 11898.9 
Indeed !

Is it the script that toggles the active viewport to fullscreen, and goes back to split view if pressed again ?

Marc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Matadem
11898.11 
Yes..thats the one. ctrl+spacebar will flip left to right, front to back etc.

EDITED: 11 Jan by MATADEM

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Marc (TELLIER)
11898.12 
Hi Matadem,

I didn't know about flipping the view 180º, quite interesting.

Thanks !

Marc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Matadem
11898.13 In reply to 11898.12 
Ctrl+space script:moi.ui.mainWindow.viewpanel.reverseView( moi.ui.getActiveViewport().name );

This is the way I have it setup.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Marc (TELLIER)
11898.14 In reply to 11898.13 
Thanks !

Marc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Mik (MIKULAS)
11898.15 In reply to 11898.7 
Hello Michael,

I've noticed that if I set arrow key Up with command Rotate90RelativeToView Up, so the model turn Down and vice versa, if I set arrow key Down with command Rotate90RelativeToView Down, so the model turn Up,

therefore I changed the order of code from:

case 'left': view_dir = frame.yaxis; view_dir.scale( -1.0 ); break;
case 'right': view_dir = frame.yaxis; break;
case 'up': view_dir = frame.xaxis; break;
case 'down': view_dir = frame.xaxis; view_dir.scale( -1.0 ); break;

to

case 'left': view_dir = frame.yaxis; view_dir.scale( -1.0 ); break;
case 'right': view_dir = frame.yaxis; break;
case 'up': view_dir = frame.xaxis; view_dir.scale( -1.0 ); break;
case 'down': view_dir = frame.xaxis; break;

now the model rotation correspond to arrow key dirrection.

Is that right?

Thanks

Mik
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
11898.16 In reply to 11898.15 
Hi Mik, yes you're correct, thanks for the bug fix. I have updated the script above.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-16