SketchUcation Plugin Store

 

 

[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.
Please, register (free) to access all the attachments on the forums.
Last edited by daiku on Fri Sep 10, 2010 8:51 pm, edited 4 times in total.
daiku
 
Posts: 213
Joined: Mon Nov 12, 2007 2:54 pm
Location: Minneapolis
Name: Clark Bremer

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:
Real life is just another website, albeit a rather boring one.
Teezer
 
Posts: 151
Joined: Wed Nov 14, 2007 8:15 pm
Location: Pagosa Springs, Colorado
Name: 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?
Just do it, it might be fun.
philem
 
Posts: 69
Joined: Wed Nov 21, 2007 9:41 am
Location: South Australia
Name: Philip
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Beginner

Re: [Plugin] Rotate 90 around Z axis

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

You missed the contextmenu there. :roflmao:
User avatar
Burkhard
Premium Member
Premium Member
 
Posts: 883
Joined: Sat Nov 17, 2007 12:45 pm
Location: Germany
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Advanced

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
Stu
 
Posts: 457
Joined: Fri Nov 16, 2007 8:51 pm
Location: Melbourne

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:
HFM
 
Posts: 337
Joined: Mon Apr 14, 2008 5:57 pm
Location: The Netherlands
Name: 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?
Just do it, it might be fun.
philem
 
Posts: 69
Joined: Wed Nov 21, 2007 9:41 am
Location: South Australia
Name: Philip
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Beginner

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.
daiku
 
Posts: 213
Joined: Mon Nov 12, 2007 2:54 pm
Location: Minneapolis
Name: Clark Bremer

Re: [Plugin] Rotate 90 around Z axis

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

Nice, thanks.
User avatar
boofredlay
Global Moderator
 
Posts: 9020
Joined: Mon Oct 22, 2007 1:50 pm
Location: Huntsville/Madison Alabama
Name: Eric Lay
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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.
Hank
rhankc
 
Posts: 362
Joined: Mon Nov 12, 2007 3:24 pm
Location: Rocky Mountains USA
Name: Hank

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 :)
Just do it, it might be fun.
philem
 
Posts: 69
Joined: Wed Nov 21, 2007 9:41 am
Location: South Australia
Name: Philip
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Beginner

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
watkins
 
Posts: 1367
Joined: Wed Nov 14, 2007 5:47 pm

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. ;)
User avatar
Burkhard
Premium Member
Premium Member
 
Posts: 883
Joined: Sat Nov 17, 2007 12:45 pm
Location: Germany
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Advanced

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 ]
HFM
 
Posts: 337
Joined: Mon Apr 14, 2008 5:57 pm
Location: The Netherlands
Name: 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?
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

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.. :(

Just do it, it might be fun.
philem
 
Posts: 69
Joined: Wed Nov 21, 2007 9:41 am
Location: South Australia
Name: Philip
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Beginner

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.
HFM
 
Posts: 337
Joined: Mon Apr 14, 2008 5:57 pm
Location: The Netherlands
Name: 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.
Just do it, it might be fun.
philem
 
Posts: 69
Joined: Wed Nov 21, 2007 9:41 am
Location: South Australia
Name: Philip
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Beginner

Re: [Plugin] Rotate 90 around Z axis

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

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



Keeping things organised is not a sin. ;)
juju
 
Posts: 1127
Joined: Mon Oct 22, 2007 1:45 pm
Location: Durbanville, Cape Town, South Africa.
Name: 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.
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur
 
Posts: 1239
Joined: Wed Nov 14, 2007 10:07 pm
Location: Nancy, France
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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.
daiku
 
Posts: 213
Joined: Mon Nov 12, 2007 2:54 pm
Location: Minneapolis
Name: Clark Bremer

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.
daiku
 
Posts: 213
Joined: Mon Nov 12, 2007 2:54 pm
Location: Minneapolis
Name: Clark Bremer

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.
Please, register (free) to access all the attachments on the forums.
daiku
 
Posts: 213
Joined: Mon Nov 12, 2007 2:54 pm
Location: Minneapolis
Name: Clark Bremer

Re: [Plugin] Rotate 90 around Z axis

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

Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

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: ]
Last edited by HFM on Sun May 18, 2008 1:23 am, edited 1 time in total.
HFM
 
Posts: 337
Joined: Mon Apr 14, 2008 5:57 pm
Location: The Netherlands
Name: 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:
HFM
 
Posts: 337
Joined: Mon Apr 14, 2008 5:57 pm
Location: The Netherlands
Name: 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
Please, register (free) to access all the attachments on the forums.
SketchUp Ruby Consultant | Podium 1.x developer
http://plugins.ro
User avatar
tbd
 
Posts: 1018
Joined: Wed Nov 14, 2007 10:47 am
Location: Romania
Name: 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..
Just do it, it might be fun.
philem
 
Posts: 69
Joined: Wed Nov 21, 2007 9:41 am
Location: South Australia
Name: Philip
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Beginner

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.
daiku
 
Posts: 213
Joined: Mon Nov 12, 2007 2:54 pm
Location: Minneapolis
Name: Clark Bremer

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
tor
 
Posts: 5
Joined: Fri Jun 04, 2010 5:30 am
Name: Tor Gilbertson

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Need Authorised SketchUp Training by experts in various disciplines? Check out our Training details.

Ad Machine
Robot
 
Posts: 2012

Next

Return to Plugins

Who is online

Users browsing this forum: Bing [Bot], hermanheron, panixia and 6 guests