[Plugin] Free Rotate 4.4

[Plugin] Free Rotate 4.4

Postby TIG » Thu Aug 26, 2010 8:48 am

A completely updated version of the tool...
    (c) TIG 2010-2013
    Permission to use, copy, modify, and distribute this software for
    any purpose and without fee is hereby granted, provided that the above
    copyright notice appear in all copies.
    THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    ___________________________________________________________________________

    FreeRotate.rb >>> Plugins Folder
    ___________________________________________________________________________

    Usage:

    Make a Selection.
    Pick Menu > Plugins > Free Rotate
    or type freerotate into Ruby Console
    or click on Toolbar 'Free Rotate' [activated from View > Toolbars].
    The Selection can consist of any entities - it is temporarily Grouped
    during the Rotation.

    You are then prompted to pick the 'Pivot' point.
    Pick a point ]OR to set the Pivot-Point at the center of the Selection's
    bounding-box press the Ctrl-key].
    The Pivot-Point is marked with a Black dot.

    You are next prompted to pick the 'Axis' point.
    A line is drawn from the Pivot-Point as you move the cursor.
    Normal inferencing applies.
    Pick a point [OR if the Pivot is not the Selection's bounding-box center you
    can set the Axis-Point at the center of the Selection's bounding-box by
    pressing the Ctrl-key].
    The Axis-Point is now marked with a Magenta dot.

    Now a temporary gizmo 'globe' appears, centered on the Pivot-Point
    with its North-Pole set vertically up.
    You can snap to it OR any other object in the model.
    As you move the cursor the Selection will Free-Rotate so that the Axis-Point
    always points towards the cursor position.

    The tool always starts in 'Free-Rotate' mode but you can toggle it to be in
    'Axial-Rotate' mode at any stage by pressing the 'Tab' key - it's probably
    easist to do this before picking the first two points.
    'Tab' toggles between these two modes.
    The 'Constrained' Axial-Rotate mode rotates the Selection around the Axis.
    If you haven't already set the Pivot and/or Axis points before you go into
    this mode you will be prompted to do so first.
    In this mode the gizmo becomes a 'disk', centered on the Pivot-Point,
    with its normal along the Axis.
    You can snap to it or any other object in the model.
    You are first prompted to pick a 'Handle' point.
    Then pick a 'Snap' point - as you move the cursor the Selection will Rotate
    around the Axis following the cursor.
    Alternatively once the 'disk' has appeared you can type in an Angle into
    the VCB in degrees [-/+ve note that positive angles are counterclockwise]
    at any time when in the Axial-Rotate mode.
    When you pick the Snap-Point or press <Enter> for the entered Angle the
    Selection with pause at that Rotation.
    After typing an Angle you will need to re-pick a Handle-Point if you want to
    then Axial-Rotate by picked points.
    However, you can continue typing in other Angles [which are taken as relative
    to the current postion] as desired.

    Im either mode you can the press Enter or Double-Click to Confirm.

    In either mode Esc will Exit the tool and Undo any changes.
    Also in either mode if you start to use another Tool any changes are Undone.

    The VCB-text gives you the current Mode and its Options...

    ___________________________________________________________________________
    TO RECAP...

    Make a Selection

    Start the Tool...

    Optionally use 'Tab' to toggle between 'Free-Rotate' and 'Axial-Rotate'.

    Pick-1 = Pivot-Point
    Pick-2 = Axis-Point

    Next...

    When in 'Free-Rotate' mode [globe-gizmo]:-

    Tab='Axial-Rotate'

    Left_Click/Enter/Double_Click=Confirm
    i.e. Use the current Rotation and Exit the tool.

    Esc/Exit=Cancel
    i.e. to Abort and Undo all changes at any stage...
    an 'Exit' occurs when you start to use another Tool.

    When in 'Axial-Rotate' mode [disk-gizmo]:-

    Tab='Free-Rotate'

    Pick-3=Handle-Point
    OR
    Type 'Angle' + <Enter>

    Pick-4=Snap-Point
    OR
    Type 'Angle' + <Enter>

    If desired continue repeating Pick-3 & Pick-4 OR Type new 'Angle' etc...

    Enter/Double_Click=Confirm
    i.e. Use the current Rotation and Exit the tool.

    Esc/Exit=Cancel
    i.e. to Abort and Undo all changes at any stage...
    an 'Exit' occurs when you start to use another Tool.

    When the tool 'exits' the Selection is ungrouped and remains highlighted.
    The changes will 'Undo' in one step.
    ___________________________________________________________________________

    Donations:
    by PayPal to info @ revitrev.org
    ___________________________________________________________________________
    Version:
    1.1 20100825 First release.
    1.2 20100826 Bug in empty selection trapped.
    1.3 20100826 Encompassing 'globe' added.
    2.0 20100828 New Ctrl/Alt/Tab Options for suspending & changing Pivot/Axes.
    2.1 20100828 Glitch with Cursor colors during 'Tab' Options fixed.
    Changed the Options to Down_Arrow/Ctrl/Tab: 'Alt' is plain flaky!
    2.2 20100828 Globe defaults to 150% of selections bounds.
    Tab-options rationalized.
    2.3 20100829 Guide line added from Pivot to Axis Cursor during Tab-Option.
    3.0 20109015 New 'Up-Arrow' option to rotate constrained around Axis added.
    4.0 20100922 Radical overhaul of how the tool operates - see the notes...
    FreeRotate Toolbar added, and Zip file with FreeRotate folder.
    4.1 20100922 Typo fixed with Axis on X_AXIS glitch.
    'Tab' press for MAC key code adjusted to 9, 15 and 48.
    Menu 'Windows > Instructor' help added...
    [This is not working - open ../FreeRotate/index.html in your
    web-browser till this is fixed...]
    4.2 20100923 Glitch with 'Tab' [9] on MAC etc trapped with key-up not key-down.
    4.3 20100927 Typo in code corrected in line#708: was not affecting results.
    Gizmo Guides are displayed even when Guides are 'off' in Style.
    4.4 20110307 Instructor now works.
    4.5 20131210 Future-proofed.
    ___________________________________________________________________________
6
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate

Postby Rich O Brien » Thu Aug 26, 2010 9:09 am

Thanks TIG, very useful :thumb:
0
There's a frontroom and a backroom....reverse faces
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Free Rotate

Postby olishea » Thu Aug 26, 2010 10:27 am

this is really cool. great for adding random rotations to rocks and things....instead of having to keep snapping to a plane etc.

im gonna have to donate when i get paid! :)
0
oli
User avatar
olishea 
Premium Member
Premium Member
 

Re: [Plugin] Free Rotate

Postby simon le bon » Thu Aug 26, 2010 10:28 am

Dear Tig,

A new tool from you is always like a Christmas gift and the moment we pull off the wrapping paper.

This one also promises to be very useful.. Thank you.

:thumb: simon
0
Last edited by simon le bon on Thu Aug 26, 2010 4:53 pm, edited 1 time in total.
User avatar
simon le bon 
 

Re: [Plugin] Free Rotate

Postby Mike Lucey » Thu Aug 26, 2010 11:39 am

:thumb:
0
User avatar
Mike Lucey 
Mayor
 

Re: [Plugin] Free Rotate

Postby rv1974 » Thu Aug 26, 2010 2:40 pm

A bug: with no object selected it acts like undo command
0

rv1974 
 

Re: [Plugin] Free Rotate

Postby TIG » Thu Aug 26, 2010 4:23 pm

rv1974 wrote:A bug: with no object selected it acts like undo command

Aha! The bug is easily trapped... :!:
Here's v1.2 viewtopic.php?p=266561#p266561
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate

Postby TIG » Thu Aug 26, 2010 11:24 pm

Here's v1.3 viewtopic.php?p=266561#p266561
Encompassing 'globe' added.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate

Postby Rich O Brien » Thu Aug 26, 2010 11:37 pm

Wow, now this is an essential little tool....

Free Rotate.jpg


Thanks TIG
0
There's a frontroom and a backroom....reverse faces
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Free Rotate

Postby Ken » Fri Aug 27, 2010 2:28 am

TIG

Thanks. I did notice that in version 1.3, I can no long change the rotational point.

And just a thought, would it be possible to select two points, with the first point the center of rotation and the second point defining the direction of a line across the selection, that determine how the selection will rotate and align. This way, one could chose the rotational point, and then the direction of the line, and be able to align to some point out and away from the selection. This way after accepting the results, the selection will be aligned with all three points in a straight line, the first, the rotational point, the second, defining the direction across the selection, and the third, the outside the section alignment point.

Anyway, thanks for the plugin.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Free Rotate

Postby jeff hammond » Fri Aug 27, 2010 2:52 am

rclub24 wrote:
Free Rotate.jpg


Thanks TIG


weird, that sort of the visual i get in my head when using the rotate tool as in this recent thread:
viewtopic.php?f=15&t=30344

i don't really know of any practical application of being able to tie these two functions together but it might be there.. (meaning something along the lines of pinning the first point using tig's globe then rotating again around that axis)


[just throwing this out there in case it will cause something to click in someone's head :D]
0
dotdotdot
User avatar
jeff hammond 
Global Moderator
 

Re: [Plugin] Free Rotate

Postby rv1974 » Fri Aug 27, 2010 7:52 am

IMHO To become a useful script it must have some 'snap to the bottom center of selection' ability
0

rv1974 
 

Re: [Plugin] Free Rotate

Postby TIG » Fri Aug 27, 2010 8:58 am

@Ken
The 'Pivot' is the center of the selection's bounding-box, unless there is a cpoint [aka 'guide-point'] in the selection -then that is used as the 'Pivot' point.
I am thinking about ways of adding functionality like holding down Alt so you can dictate so extra constraining points - look for updates in a week or so...

@rv1974
A suitable 'Pivot' point can be anywhere - it depends on a user's requirements - its 'Pivot' defaults to the selection's bounding-box center OR to a [pre]selected cpoint - so if you want the selection to rotate about a particular 'Pivot' then add a cpoint there and include it in the selection. If you can't readily find the bottom-center of your selection then you can trick Sketchup into making the bounding-box to suit... you add a temporary cline [aka 'guide-line'] from a bottommost extremity in the selection, drawing it vertically upwards [constrained in blue/Z with shift-key], to a topmost extremity of the selection: then you move that cline so that its top end is where its bottom end used to be... now you include that cline in the selection. Run the tool... the bounding-box is taken to include the cline - so the tool's 'Globe' will increase in size to encompass that cline as well and [as long as there are no cpoints to take precedence] to 'Pivot' should now be centered on the bounding-box and this should be located at the center of the lowest part of the original selection if you were to ignore the temporary cline you just added.

PS: There are several useful plugins to add 'raw' clines and cpoints - do a Search for them
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate

Postby Ken » Fri Aug 27, 2010 12:15 pm

TIG

Thanks for the quick reply. However, in the past versions, I was able to select a cpoint, or change to another cpoint. It seems now that I am not able to do this.

Also, would it be possible to make the globe and on/off selection. Sometime the glob make it hard to see cpoints on the selection.

And when I select Free Rotate, my curses starts off to the left of the screen where Free Rotate was showing during my selections, so the selections has already been rotated right after I selected Free Rotate. Could the Rotate action start after the next cursor selection, so one would have time to maybe pick the top of the globe, than start the rotation. Right now, after selecting Free Rotate from the menu, I already have a rotation, that is almost impossible to get back to the original start position.

Again thanks.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Free Rotate

Postby TIG » Fri Aug 27, 2010 2:38 pm

@Ken
If you have one cpoint in the Selection WILL use that as the Pivot - I just retested it.
Do you have another cpoint elsewhere ? It takes the first one it finds...
Cpoints inside a group within the Selection are not used to determine a Pivot.
To 'right' the Selection pick the globe's north-pole - and then free-rotate from there...
This is a 'work-in-progress' so feedback and advice are welcomed... ;)
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate

Postby Ken » Fri Aug 27, 2010 3:12 pm

TIG wrote:@Ken
If you have one cpoint in the Selection WILL use that as the Pivot - I just retested it.
Do you have another cpoint elsewhere ? It takes the first one it finds...
Cpoints inside a group within the Selection are not used to determine a Pivot.
To 'right' the Selection pick the globe's north-pole - and then free-rotate from there...
This is a 'work-in-progress' so feedback and advice are welcomed... ;)


Mr TIG

If I have two cpoints, it will pick one, and pivot around that cpoint. However, I can not move to the other cpoint as I could before.

I am a little bothered by my posts. It seems to me that I may be complaining about something I have no earthly means of accomplishing, to people who are taking a great deal of time an effort to construct. I try to look at each plugin as how does it help me to achieve a completed project, and try not looking at each plugin as "WOW" it would be neat if it did this or this.

In using this plugin, I am looking at using it to align rigging. A four part wire sling with shackles, does not have any flat and aligned surface. However, I need to align each sling part from the crane to the load. With this plugin, I could put a cpoint on the the bottom shackle, another on the top shackle, and align the whole sling from the load to the crane.

Again thank you. I know from a previous post you are very busy and I am thankful for the time you spend working on these plugin.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Free Rotate

Postby olishea » Fri Aug 27, 2010 3:46 pm

HOW THE HELL DO YOU DO THIS?!!! :o
0
oli
User avatar
olishea 
Premium Member
Premium Member
 

Re: [Plugin] Free Rotate

Postby TIG » Fri Aug 27, 2010 4:00 pm

@Ken
I think an option [+Alt?] where you can then select a 'pivot' point and a 'grab' point and then free-rotate using those might be useful then?
I'm thinking a bit like my 'Mirror' tool where you mirror objects using 1, 2 or 3 picked points which mirror about a point, line or plane: the Free-Rotate Tool could have options to set 1/2/3 points 1= pivot, 2= 1+grab i.e. an axis that follows the cursor; and 3= 1+2+offset i.e. another grab-handle that is offset from the 1+2 axis which allows you to rotate the object around that axis.
So you'd probably pick points 1+2 and rotate the object so 1+2s fall on a desired 'line', then you'd pick +3 to rotate the object about that 1+2 axis/line so it aligns correctly in that way too...
It is difficult to control completely 'free' rotation as you have the one cursor but need several reference points at once.
I am busy for the next week or two... but I'll think about it as I do other things....... ;)

@Oli
Arcane magic arts... :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate 2.0

Postby TIG » Sat Aug 28, 2010 11:50 am

Here is v2.0 viewtopic.php?p=266561#p266561

It includes some radical new methods using modifier-keys Ctrl/Alt/Tab as toggles to freeze/suspend Free-Rotate and let you change the Pivot/Axis dynamically... please read the notes [or at least the VCB text]...

Feedback please.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate 2.1

Postby TIG » Sat Aug 28, 2010 7:43 pm

Here is v2.1 viewtopic.php?p=266561#p266561

It now has some radical changes to the modifier-keys "Down_Arrow/Ctrl/Tab" as toggles, to freeze/suspend Free-Rotate and let you change the Pivot/Axis dynamically - using 'Alt' was proving too 'flaky'...
The Cursor colors during the 'Tab' options are now fixed too.

Please read the notes [or at least the VCB text]...

Feedback please.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate 2.1

Postby Ken » Sat Aug 28, 2010 8:58 pm

TIG

1. It may just be me, but the first thing I do is to make the globe 200% so I can more easily see the selection inside the globe.

2. And I just can't figure out what why there is 3 selections on the "TAB" key. I know it states, change the pivot point on one selection and the axis on the other selection, however, I just don't have a clear idea what each does.

3. Must time in trying out each of the tab selections, I get to a stage, that I can't start the orbiting again.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Free Rotate 2.1

Postby TIG » Sat Aug 28, 2010 10:09 pm

Ken wrote:TIG
1. It may just be me, but the first thing I do is to make the globe 200% so I can more easily see the selection inside the globe.
2. And I just can't figure out what why there is 3 selections on the "TAB" key. I know it states, change the pivot point on one selection and the axis on the other selection, however, I just don't have a clear idea what each does.
3. Must time in trying out each of the tab selections, I get to a stage, that I can't start the orbiting again.
Ken

The 'globe' is currently made 10% bigger than the selection's bounds - it could be bigger if desired... I await more feedback. I'll rest it to x1.5 for the next version to see how it goes...

The are 3 Tab steps.
Press Tab 1 - you can set the Pivot
Press Tab 2 - you can set the Axis
Press Tab 3 to finish... BUT I see what you mean... once the Axis is done you are done. :roll:

I have changed the selection keys - 'Alt' is flaky and locks up ???
See v2.1... but I am considering v2.2 to sort out the Tab anomaly...

Thanks for the feedback.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate 2.2

Postby TIG » Sat Aug 28, 2010 10:41 pm

Here's v2.2 viewtopic.php?p=266561#p266561
The Tab options are rationalized - picking the axis-point exits to the previous state.
The default 'globe' radius is 150% of the selection's bounds but the notes contain advice on changing this to suit your preferences...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate 2.2

Postby Ken » Sun Aug 29, 2010 12:30 am

TIG

Darn, TIG, I just can't get the second TAB to work consistently. There are times it works sometimes, that I get exactly what I want, other times I just can not figure out what I am doing wrong. Note, by the time it works, I have pressed so many keys, I not sure just what made it work.

1. I press the down arrow, it resets, and stops.
2. I press the TAB, and I can set the pivot point, by moving my cursor the location and clicking the left mouse button.
3. I press the TAB again, and here is where I get lost. How do I select the next point, or axis?

Ken, confused.
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Free Rotate 2.2

Postby CadFather » Sun Aug 29, 2010 12:33 am

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

Re: [Plugin] Free Rotate 2.2

Postby TIG » Sun Aug 29, 2010 1:41 am

Ken wrote:TIG

Darn, TIG, I just can't get the second TAB to work consistently. There are times it works sometimes, that I get exactly what I want, other times I just can not figure out what I am doing wrong. Note, by the time it works, I have pressed so many keys, I not sure just what made it work.

1. I press the down arrow, it resets, and stops.
2. I press the TAB, and I can set the pivot point, by moving my cursor the location and clicking the left mouse button.
3. I press the TAB again, and here is where I get lost. How do I select the next point, or axis?

Ken, confused.

3... Press TAB and then Pick a point on the axis - it should be on a line from the pivot to where you pick [I'll add a guide-line in the next update it might assist...]
4, After you pick it waits for you to press Down_Arrow or Ctrl to restart the Free-Rotate OR you can Tab again to set anew Pivot & Axis point...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate 2.3

Postby TIG » Sun Aug 29, 2010 1:55 am

Here's v2.3 viewtopic.php?p=266561#p266561
It now draws a DarkOrange guide-line from the Pivot-Point [picked at Tab-1] to the moving cursor before you pick the Axis-Point [Tab-2] - This might help clarify what the axis-line will be when you click that second point. This is 'axis' is the orientation that the object will use and 'point' to the moving cursor, as it rotates freely anchored at the pivot.... :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Free Rotate 2.3

Postby mitcorb » Sun Aug 29, 2010 2:01 am

Thank you, TIG:
I am going to download and experiment with it.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Free Rotate 2.3

Postby Ken » Sun Aug 29, 2010 3:50 pm

TIG

Well I see my problem. When I picked the pivot point, it has a sticky attribute, however, the New_Axis Point did not have this characteristic. It doesn't become sticky until you press TAB again or the down arrow. This is shown in the video, after selection the pivot point, I press TAB and now try to pick the New_Axis point. Note, I see the change to the selection point is made by the circle color, however, I am still allowed to move this point until I press the TAB or the down arrow.

And to the second anomaly. If I correctly pick a pivot point and New_Axis point, and just move the cursor around and around the globe and come back to the starting point on the globe, the selection is not at the original position. I would think that it should be at the same positioning before and after rotation, if I don't make the final selection.

Again thanks.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Free Rotate 2.3

Postby TIG » Sun Aug 29, 2010 6:29 pm

Ken

I'll watch it and absorb...
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: No registered users and 19 guests

Visit our sponsors: