by thomthom » Tue May 19, 2009 9:39 pm
By request: http://www.sketchucation.com/forums/scf ... 80&t=19130This is just a rough version to get it out there. I got some other projects I need to attend to before I polish this one off. Usage:- Select everything you want to rotate-scale
- Tools->RotaScale
- Pick point of origin
- Pick a second reference point
- Pick a third reference point that will determine the rotation and scaling
RotaScale.png Currently I performs a 3D uniform scaling. I'll look into 2D and 1D scaling later. (If anyone cares to give me pointers to how to do this I'd be happy.) Changelog- Code: Select all
# CHANGELOG # 0.1.0b - 19.05.2009 # * Rotate and Scale. # # 0.1.1b - 20.05.2009 # * Fixed a bug that occured when there's no rotation. # # 0.2.0b - 20.05.2009 # * Added CTRL modifier to disable scaling. # # 0.3.0b - 20.05.2009 # * Added cursors. # * Minor bugfix. # # 0.3.1b - 21.05.2009 # * Added some extra methods to the Float class which the script rely on. # # 0.3.2b - 11.06.2009 # * Normalized the Scale transformation - VfSU has problems if this isn't done it appears. # # 0.3.3b - 11.06.2009 # * Corrected a potential bug.
Todo:- 2D & 1D Scaling
- Cleaner UI
- Toolbar button
- VCB input
Download
Last edited by thomthom on Thu Nov 28, 2013 11:55 pm, edited 8 times in total.
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Chris Fullmer » Wed May 20, 2009 2:16 am
Great Thom! I'll check it out,
Chris
-

Chris Fullmer
- SketchUp Team

-
- Posts: 6929
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Boulder, CO
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by AcesHigh » Wed May 20, 2009 4:11 am
is this something I cant do by using first the rotation tool and then the scale tool?
-
AcesHigh
-
- Posts: 553
- Joined: Wed Mar 05, 2008 1:58 pm
by utiler » Wed May 20, 2009 5:21 am
Following with great interest!!!!!! 
purpose/expression/purpose/....
-

utiler
- Top SketchUcator
-
- Posts: 2466
- Joined: Wed Nov 14, 2007 11:35 am
- Location: Queensland, Australia
- Name: Andrew
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by thomthom » Wed May 20, 2009 7:22 am
AcesHigh wrote:is this something I cant do by using first the rotation tool and then the scale tool?
You can, but the request was a tool to do it in one operation.
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by free agent » Wed May 20, 2009 9:02 am
wow thom thanks for working on this i really appreciate it!! AcesHigh wrote:is this something I cant do by using first the rotation tool and then the scale tool?
its way more than that, the point is also to control the point a group will scale from, rather than just the centre or the corners, it makes lining/scaling reference material up to a model (or vise versa) really quick, so it squashes rotate scale and move into one. thom just looked at the ruby, i works perfect, better than what i had asked for actually, i frikken love it  i cant tell you how long ive wanted this, thank you. oops first problem  ... it seems you HAVE to rotate, if the first line is on an axis then it wont let u place the second point along the same axis
Last edited by free agent on Wed May 20, 2009 9:52 am, edited 1 time in total.
-

free agent
-
- Posts: 282
- Joined: Thu Jun 05, 2008 10:00 am
- Location: Cape Town, South Africa
- Name: Free Agent
by silver_shadow » Wed May 20, 2009 9:40 am
Great work!!! Now we dont have to work out a scale factor if we want to re size an object or model.
it does work in some cases, don't know why
-
silver_shadow
-
- Posts: 277
- Joined: Fri Jun 06, 2008 8:11 am
- Location: Cape Town, South Africa
- Name: Jacques
by thomthom » Wed May 20, 2009 10:11 am
Free Agent wrote:oops first problem  ... it seems you HAVE to rotate, if the first line is on an axis then it wont let u place the second point along the same axis
Yea, I expected there to be issues. I didn't test it much. I uploaded a quick update. Think it should take care of that problem. silver_shadow wrote:it does work in some cases, don't know why
Can you explain further to what you're doing? I can't reproduce any problems.
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by free agent » Wed May 20, 2009 10:16 am
beautiful, thank you, now it works great, i dont see a need for improvement 
Last edited by free agent on Wed May 20, 2009 10:34 am, edited 1 time in total.
-

free agent
-
- Posts: 282
- Joined: Thu Jun 05, 2008 10:00 am
- Location: Cape Town, South Africa
- Name: Free Agent
by pilou » Wed May 20, 2009 10:30 am
Damned good!  (works in V6 
-

pilou
- Top SketchUcator
-
- Posts: 21104
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by thomthom » Wed May 20, 2009 10:41 am
Pilou wrote:works in V6
Thanks for checking that. 
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by pilou » Wed May 20, 2009 12:01 pm
Maybe a suggestion  Scale is XYZ, maybe useful to have also choice X,Y only!  written in the todo list  Seems there are Splat bug when Undo v6 ! (but not repetitive)
Last edited by pilou on Wed May 20, 2009 12:16 pm, edited 4 times in total.
-

pilou
- Top SketchUcator
-
- Posts: 21104
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by rv1974 » Wed May 20, 2009 12:09 pm
Hi Thom When I point the 3rd point with (let's say) cntrl key pressed the script should't change original scale. Could you add this feature? It would be nice imo. Thanks
-
rv1974
-
- Posts: 1448
- Joined: Tue Nov 13, 2007 11:38 am
- Name: rv1974
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by thomthom » Wed May 20, 2009 12:21 pm
rv1974 wrote:Hi Thom When I point the 3rd point with (let's say) cntrl key pressed the script should't change original scale. Could you add this feature? It would be nice imo. Thanks
Yup. That can be done.
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by pilou » Wed May 20, 2009 3:46 pm
You can yet make this after the rotate scale with the same tool  3 click more and have a resize as you want  here half size wanted  bug splat don't come back in the v6...curious 
-

pilou
- Top SketchUcator
-
- Posts: 21104
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by thomthom » Wed May 20, 2009 4:12 pm
Pilou wrote:bug splat don't come back in the v6...curious 
Let me know if it comes back.
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by thomthom » Wed May 20, 2009 5:44 pm
rv1974 wrote:Hi Thom When I point the 3rd point with (let's say) cntrl key pressed the script should't change original scale. Could you add this feature? It would be nice imo. Thanks
It is done. 
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by kjc » Thu May 21, 2009 9:26 am
Hi, im sure this plugin will make things much easier, thanks! I think it would be even more if pressing "ctrl" button would cause "RotaScaleCopy", the way it works in typical rotation and move tools.
-
kjc
-
- Posts: 7
- Joined: Thu Dec 04, 2008 10:42 pm
by TIG » Thu May 21, 2009 11:12 am
Thanks for a great idea and an already very polished tool... A minor problem - there are error messages in my Ruby console relating to the - Code: Select all
float.round_to()
method. This is not built in to Ruby - the nearest is - Code: Select all
float.round
, I assume you have a round_to.rb auto-loading... perhaps you should include the method code inside your script, I'm sure others will be getting the error ? Here's the code I used to fix it on my PC... Float-round_toEtc.rb - it also includes some other methods like float.floor_to etc...
TIG
-

TIG
- Global Moderator
-
- Posts: 20265
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by thomthom » Thu May 21, 2009 12:13 pm
I thought it was a ruby method. I googled ruby and rounding and I found some references to float_to which I just tried, and it worked. I guess it's a plugin I have installed which added that method.
Thanks for bringing that to my attention TIG. Though, if I implement this method, might I not risk causing conflict with other script that also implements this method? I suppose if they act identical it might not be a problem.. ...this is why I don't like extending base classes...
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by TIG » Thu May 21, 2009 12:34 pm
I expect it'd be an identical function anyway - I'd change the base class in this case, as it's a pretty safe bet. You could always call your own version float.round_to_TT [or another weird name] that no one else will use AND then find+replace .round_up with .round_to_TT ? OR you can invent a safe and simple internal def something like: - Code: Select all
def round_to(float,x) return((float*10**x).round.to_f/10**x) end
typical usage would then be... - Code: Select all
view.draw_text(screen_xy, "Angle: #{round_to(angle.radians,1)° - Scale: #{round_to(scale,3)}")
...
TIG
-

TIG
- Global Moderator
-
- Posts: 20265
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by thomthom » Thu May 21, 2009 12:48 pm
Updated the plugin in regard to TIG report. Thanks TIG.
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by pilou » Mon May 25, 2009 1:55 am
The no Scale on the Z axis will be released?
-

pilou
- Top SketchUcator
-
- Posts: 21104
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by thomthom » Mon May 25, 2009 7:19 am
Not sure. I don't fully understand the API on transformations. Need to figure out how first. I'm currently working on a couple of other plugin projects, this was just a quick distraction. 
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Chris Fullmer » Mon May 25, 2009 7:56 am
t = Geom::Transformation.scaling point, xscale, yscale, zscale
just use 1.0 as the zscale value and it will be good to go!
Chris
-

Chris Fullmer
- SketchUp Team

-
- Posts: 6929
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Boulder, CO
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by thomthom » Mon May 25, 2009 8:31 am
Chris Fullmer wrote:t = Geom::Transformation.scaling point, xscale, yscale, zscale
just use 1.0 as the zscale value and it will be good to go!
Chris
If I do that, it works for points that are picked planar to the model X and Y. But if I pick a point in the model Z axis, things are still being scaled only in the X and Y. Maybe that's what people expect? IMO that not what I'd expect from this plugin. I expect that if I pick two reference lines in the Z axis, things will get scaled in that direction. ...I suppose that the scaling transformation would have to be transformed to be local to the reference lines? That's what I'm not sure how to do. Getting the plane of the two reference lines (what happens when they are co-linear) and crossing it with the scaling transformation?
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by thomthom » Thu Jun 11, 2009 8:22 pm
Minor update to address a problem where V-Ray for Sketchup would not render RotaScaled groups/components correctly.
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by thomthom » Thu Jun 11, 2009 8:25 pm
Spotted a potential bug. Corrected.
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by free agent » Fri Jun 12, 2009 12:40 am
hi 5
-

free agent
-
- Posts: 282
- Joined: Thu Jun 05, 2008 10:00 am
- Location: Cape Town, South Africa
- Name: Free Agent
by thomthom » Fri Jun 12, 2009 7:16 am
5!
-

thomthom
- PluginStore Author

-
- Posts: 19478
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|