[Plugin] Free Rotate 4.4
-
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:
[flash=600,338:3ot8vskb]http://www.youtube.com/v/K_vzqtkRdBo[/flash:3ot8vskb]
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-PointNext...
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.
-
Thanks TIG, very useful
-
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!
-
-
A bug: with no object selected it acts like undo command
-
@rv1974 said:
A bug: with no object selected it acts like undo command
Aha! The bug is easily trapped...
Here's v1.2 http://forums.sketchucation.com/viewtopic.php?p=266561#p266561 -
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.
simon
-
Here's v1.3 http://forums.sketchucation.com/viewtopic.php?p=266561#p266561
Encompassing 'globe' added. -
Wow, now this is an essential little tool....
Thanks TIG
-
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
-
@unknownuser said:
[attachment=0:2hw65bgx]<!-- ia0 -->Free Rotate.jpg<!-- ia0 -->[/attachment:2hw65bgx]
Thanks TIG
weird, that sort of the visual i get in my head when using the rotate tool as in this recent thread:
http://forums.sketchucation.com/viewtopic.php?f=15&t=30344i 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 ]
-
IMHO To become a useful script it must have some 'snap to the bottom center of selection' ability
-
@Ken
The 'Pivot' is the center of the selection's bounding-box, unlessthere 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 andcpoints - do a Search for them
-
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
-
@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... -
@tig said:
@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
-
HOW THE HELL DO YOU DO THIS?!!!
-
@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... -
Here is v2.0 http://forums.sketchucation.com/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.
-
Here is v2.1 http://forums.sketchucation.com/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.
Advertisement