[Plugin] Rotate 90 around [X, Y, Z] axis

[Plugin] Rotate 90 around [X, Y, Z] axis

Postby daiku » Thu May 15, 2008 2:28 pm

This is a simple plugin I wrote, but I use it every day, so I thought I'd share. It simply rotates the selected component instance or group 90 degrees around the Z axis. Most useful when mapped to a shortcut key. It's just a lot quicker than using the built-in rotate tool, and for me, this is the most frequent rotate task. Maybe someone else has already done this, but I didn't see it. CB.

Updated 9/10/2010. Rotates multiple groups and/or comps. Also includes previous update to rotate around any cardinal axis.
0
Last edited by daiku on Fri Sep 10, 2010 8:51 pm, edited 4 times in total.
User avatar
daiku 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Rotate 90 around Z axis

Postby Teezer » Thu May 15, 2008 6:13 pm

Clark,

Thanks for this! Sometimes the simplest things are the handiest. :mrgreen:

I'm also used to having a 15-degree rotation in other graphics programs, so I cloned your 90 to a 15, and it works a treat. :thumb:
0
Real life is just another website, albeit a rather boring one.

Teezer 
 

Re: [Plugin] Rotate 90 around Z axis

Postby philem » Fri May 16, 2008 9:41 am

Teezer wrote:Clark,

Thanks for this! Sometimes the simplest things are the handiest. :mrgreen:

I'm also used to having a 15-degree rotation in other graphics programs, so I cloned your 90 to a 15, and it works a treat. :thumb:


Please excuse me for being a bit thick. I like the look of this plugin and the option to make other rotation angles.
I downloaded it, put it in the Plugins folder, but, when I open Sketchup , draw a simple item, when I look in the Plugins menu I can't find it.( I also checked the other menu's)
What have I missed?
0
Just do it, it might be fun.
User avatar
philem 
 

Re: [Plugin] Rotate 90 around Z axis

Postby Burkhard » Fri May 16, 2008 10:02 am

You missed the contextmenu there. :roflmao:
0
User avatar
Burkhard 
Premium Member
Premium Member
 

Re: [Plugin] Rotate 90 around Z axis

Postby Stu » Fri May 16, 2008 10:04 am

select your component, context click and you will see the command.

Clark, thanks a lot for this!!

There is actually a rotate command in Jim's fantastic Mover.rb, trouble is I cant get it to work with Vista.

Stu
0

Stu 
 

Re: [Plugin] Rotate 90 around Z axis

Postby HFM » Fri May 16, 2008 10:10 am

Haha, this is fantastic... I was just going to post a question asking for someone to make such a thing! This is gonna be most helpful for placing windows

Thanx! :thumb:
0

HFM 
 

Re: [Plugin] Rotate 90 around Z axis

Postby philem » Fri May 16, 2008 12:16 pm

Stu wrote:select your component, context click and you will see the command.

Clark, thanks a lot for this!!

There is actually a rotate command in Jim's fantastic Mover.rb, trouble is I cant get it to work with Vista.

Stu


Hi Stu,
I made the entity I drew a component, R clicked and the command was there, but it didn't work, that is assuming that the Z axis is the blue one and basically goes "up". I then imported a component from the Components folder same thing: The command is there but doesn't work. What have I done wrong?
0
Just do it, it might be fun.
User avatar
philem 
 

Re: [Plugin] Rotate 90 around Z axis

Postby daiku » Fri May 16, 2008 1:32 pm

Do you have one and only one component or group selected? Does the ruby console spit out any messages? Yes, the blue axis is "up". It should spin around that axis (spins parallel to the ground plane). CB.
0
User avatar
daiku 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Rotate 90 around Z axis

Postby boofredlay » Fri May 16, 2008 1:52 pm

Nice, thanks.
0
User avatar
boofredlay 
Global Moderator
 

Re: [Plugin] Rotate 90 around Z axis

Postby rhankc » Fri May 16, 2008 2:06 pm

Carl,
Good work! I really appreciate this tool. Thanks and Have a great day.
0
Hank

rhankc 
 

Re: [Plugin] Rotate 90 around Z axis

Postby philem » Sat May 17, 2008 5:33 am

daiku wrote:Do you have one and only one component or group selected? Does the ruby console spit out any messages? Yes, the blue axis is "up". It should spin around that axis (spins parallel to the ground plane). CB.


Yes I had only 1 component selected.
I just reopened Sketchup
Selected Bryce
R Clicked and selected "Rotate 90 around Z" nothing happened.
I then deleted Bryce, drew a rectacngle, pulled it into a shape, turned it into a component,
R Clicked and selected "Rotate 90 around Z" still nothing happened.

any and all help is very much appreciated always :)
0
Just do it, it might be fun.
User avatar
philem 
 

Re: [Plugin] Rotate 90 around Z axis

Postby watkins » Sat May 17, 2008 8:25 am

Dear Philip,

I noticed something similar when I first tried the script. I created a cube and used the script, and nothing "apparently" happened. The cube is a nice, 4-fold axially symmetric object and looks the same when rotated 90 degrees. Try something with a feature, like a notch, to make your object asymmetric about its Z-axis.

Kind regards,
Bob
0

watkins 
 

Re: [Plugin] Rotate 90 around Z axis

Postby Burkhard » Sat May 17, 2008 8:48 am

Bryce is by default " always face camera" So it is not the best choice. ;)
0
User avatar
Burkhard 
Premium Member
Premium Member
 

Re: [Plugin] Rotate 90 around Z axis

Postby HFM » Sat May 17, 2008 9:45 am

okay, very nice script... but could you please also make it work on X and Y axis? And make it so that you can select a shortcut for the tools?

Tried to edit it myself but my knowledge of ruby is lacking :roflmao:
[did get the 15 degrees to work though :D ]
0

HFM 
 

Re: [Plugin] Rotate 90 around Z axis

Postby Jim » Sat May 17, 2008 10:21 am

HFM wrote:okay, very nice script... but could you please also make it work on X and Y axis? And make it so that you can select a shortcut for the tools?

Tried to edit it myself but my knowledge of ruby is lacking :roflmao:
[did get the 15 degrees to work though :D ]


I always wanted to make a rotator that is sensitive to the view. For example, it would rotate the selection around the axis that is closest to the axis from the camera to the target. If you wanted ro rotate around the Z, you could select the entities, go to Top view and press the shortcut. If you wanted to rotate around the Y axis, select the entities, go to the Front view and use the same shortcut.

What do you think?
0

Jim 
Global Moderator
 

Re: [Plugin] Rotate 90 around Z axis

Postby philem » Sat May 17, 2008 10:50 am

watkins wrote:Dear Philip,

I noticed something similar when I first tried the script. I created a cube and used the script, and nothing "apparently" happened. The cube is a nice, 4-fold axially symmetric object and looks the same when rotated 90 degrees. Try something with a feature, like a notch, to make your object asymmetric about its Z-axis.

Kind regards,
Bob


I didn't realise that fact about Bryce..but still no joy,

I still can't get it to work, I have drawn an object with a notch and a cut out etc. just to be sure,(attached) I even made sure the Z axis went though the part but still can't get it to work. I have even removed the plugin, restarted Sketchup, closed it down, copied the plugin back in again still no luck.. :(

0
Just do it, it might be fun.
User avatar
philem 
 

Re: [Plugin] Rotate 90 around Z axis

Postby HFM » Sat May 17, 2008 12:28 pm

Jim wrote:
HFM wrote:okay, very nice script... but could you please also make it work on X and Y axis? And make it so that you can select a shortcut for the tools?

Tried to edit it myself but my knowledge of ruby is lacking :roflmao:
[did get the 15 degrees to work though :D ]


I always wanted to make a rotator that is sensitive to the view. For example, it would rotate the selection around the axis that is closest to the axis from the camera to the target. If you wanted ro rotate around the Z, you could select the entities, go to Top view and press the shortcut. If you wanted to rotate around the Y axis, select the entities, go to the Front view and use the same shortcut.

What do you think?


Cool, but I thought of an easier version [at least I think it's easier]

Rotation 15 degrees on X axis under NUM1 shortcut
Rotation 15 degrees on Y axis under NUM2 shortcut
Rotation 15 degrees on Z axis under NUM3 shortcut

off course all rotations are from center of the component or group

now, tell me what do you think ;)

[maybe a modification of you fantastic mover? :D :?: ]


PS. Philem don't forget to create a component of your model or group it, or it won't work.
0

HFM 
 

Re: [Plugin] Rotate 90 around Z axis

Postby philem » Sat May 17, 2008 1:17 pm

HFM wrote:
Jim wrote:
HFM wrote:okay, very nice script... but could you please also make it work on X and Y axis? And make it so that you can select a shortcut for the tools?

Tried to edit it myself but my knowledge of ruby is lacking :roflmao:
[did get the 15 degrees to work though :D ]


I always wanted to make a rotator that is sensitive to the view. For example, it would rotate the selection around the axis that is closest to the axis from the camera to the target. If you wanted ro rotate around the Z, you could select the entities, go to Top view and press the shortcut. If you wanted to rotate around the Y axis, select the entities, go to the Front view and use the same shortcut.

What do you think?


Cool, but I thought of an easier version [at least I think it's easier]

Hi H

I did find that early in the piece. If its not a component it doesn't show up in the context menu..
I even used a componen from the Component library, and it didn't work..

Not giving up :)

Rotation 15 degrees on X axis under NUM1 shortcut
Rotation 15 degrees on Y axis under NUM2 shortcut
Rotation 15 degrees on Z axis under NUM3 shortcut

off course all rotations are from center of the component or group

now, tell me what do you think ;)

[maybe a modification of you fantastic mover? :D :?: ]


PS. Philem don't forget to create a component of your model or group it, or it won't work.
0
Just do it, it might be fun.
User avatar
philem 
 

Re: [Plugin] Rotate 90 around Z axis

Postby juju » Sat May 17, 2008 1:28 pm

^^ huh?! o_O
0
Save the Earth, it's the only planet with chocolate.

juju 
 

Re: [Plugin] Rotate 90 around Z axis

Postby Didier Bur » Sat May 17, 2008 2:13 pm

Mmmmm, this reminds me oldies but goldies "rotix.rb" "rotator.rb", the're working with arrow keys also.
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Rotate 90 around Z axis

Postby daiku » Sat May 17, 2008 5:21 pm

HFM wrote:okay, very nice script... but could you please also make it work on X and Y axis? And make it so that you can select a shortcut for the tools?

Tried to edit it myself but my knowledge of ruby is lacking :roflmao:
[did get the 15 degrees to work though :D ]



To map a context menu item to a shortcut key, you must have an appropriate item selected before you bring up the preferences window. The context menu commands will show up under "edit item". CB.
0
User avatar
daiku 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Rotate 90 around Z axis

Postby daiku » Sat May 17, 2008 5:25 pm

philem wrote:
watkins wrote:Dear Philip,

I noticed something similar when I first tried the script. I created a cube and used the script, and nothing "apparently" happened. The cube is a nice, 4-fold axially symmetric object and looks the same when rotated 90 degrees. Try something with a feature, like a notch, to make your object asymmetric about its Z-axis.

Kind regards,
Bob


I didn't realise that fact about Bryce..but still no joy,

I still can't get it to work, I have drawn an object with a notch and a cut out etc. just to be sure,(attached) I even made sure the Z axis went though the part but still can't get it to work. I have even removed the plugin, restarted Sketchup, closed it down, copied the plugin back in again still no luck.. :(



But the command does show up on the context menu? That's odd.
0
User avatar
daiku 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Rotate 90 around Z axis

Postby daiku » Sat May 17, 2008 5:30 pm

I have a new version ready that rotates around any of the three axes. I tried to edit my original posts to replace the ruby file, but I only succeeded in deleting the old. What's the protocol here? CB.
0
User avatar
daiku 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Rotate 90 around Z axis

Postby CadFather » Sat May 17, 2008 6:37 pm

0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Rotate 90 around Z axis

Postby HFM » Sun May 18, 2008 1:21 am

whoops double post, sorry for that [as mentioned below it is late :roflmao: ]
0
Last edited by HFM on Sun May 18, 2008 1:23 am, edited 1 time in total.

HFM 
 

Re: [Plugin] Rotate 90 around Z axis

Postby HFM » Sun May 18, 2008 1:22 am

daiku wrote:I have a new version ready that rotates around any of the three axes. I tried to edit my original posts to replace the ruby file, but I only succeeded in deleting the old. What's the protocol here? CB.


Thanx! will try the shortcut thing tomorrow ^^ [too late now :shock: :thumb:
0

HFM 
 

Re: [Plugin] Rotate 90 around Z axis

Postby tbd » Sun May 18, 2008 8:58 am

daiku: dont reinvent the wheel, extend it :)
here is my old 2004 script for start
0
SketchUp Ruby Consultant | Podium 1.x developer
http://plugins.ro
User avatar
tbd 
 

Re: [Plugin] Rotate 90 around Z axis

Postby philem » Tue May 20, 2008 11:26 am

I downloaded the latest version of this ruby and it worked.
thanks mate..
0
Just do it, it might be fun.
User avatar
philem 
 

Re: [Plugin] Rotate 90 around Z axis

Postby daiku » Tue May 20, 2008 1:50 pm

TBD wrote:daiku: dont reinvent the wheel, extend it :)
here is my old 2004 script for start


Yes, that would have been better. I was not aware of this script. This seems to be a recurring theme. What we really need is a central repository that includes detailed descriptions of what each script does, along with detailed usage instructions. There are several collections around, including on this forum, but nothing that does a complete job. I realize this would be a huge undertaking for someone, but whoever steps up would certainly earn "hero" status in our community.
0
User avatar
daiku 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Rotate 90 around Z axis

Postby tor » Tue Sep 07, 2010 4:09 am

Many thanks for this simple, yet very useful plugin... exactly what I was looking for when creating some configurations of modular components.

What I think would be really keen is to be able to call this script as one is placing a component from the component browser. Any ideas on how to make that work?

Tor
0

tor 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: Bing [Bot], figueredonatalia, fredposh, Imran Hussain, NicoDemo, samnorth, solar888, weider382 and 6 guests

Visit our sponsors: