[Plugin] Scaling to_cm (UPDATED 15/02/2016)

[Plugin] Scaling to_cm (UPDATED 15/02/2016)

Postby sahi » Thu Jul 31, 2008 3:13 pm

Changes in the size of the selection or groups or components

Dom_12.jpg

mashtab_7.rbz
0
Last edited by sahi on Tue Feb 16, 2016 6:07 pm, edited 35 times in total.

sahi 
PluginStore Author
PluginStore Author
 

Re: Scaling to_cm

Postby pav_3j » Thu Jul 31, 2008 3:30 pm

sorry i'm confused, is this a scaling ruby?

pav
0
Just won the 'Who is Least Competitive Championships' where trying to win will make you lose. Trying to lose makes you win which makes you lose. Not trying at all makes you lose which makes you win which makes you lose.

pav_3j 
 

Re: Scaling to_cm

Postby sahi » Thu Jul 31, 2008 3:38 pm

changes a model size.
0

sahi 
PluginStore Author
PluginStore Author
 

Re: Scaling to_cm

Postby pav_3j » Thu Jul 31, 2008 3:41 pm

ah i see! i shall have a tinkle and see how i get on.

pav
0
Just won the 'Who is Least Competitive Championships' where trying to win will make you lose. Trying to lose makes you win which makes you lose. Not trying at all makes you lose which makes you win which makes you lose.

pav_3j 
 

Re: Scaling to_cm

Postby urgen » Thu Jul 31, 2008 3:53 pm

...it is "resize tool" more.. by axis... Useful idea,SAHI! :D
0
--pupil forever...------
User avatar
urgen 
 

Re: Scaling to_cm

Postby stanmarsh » Thu Jul 31, 2008 4:34 pm

hi sahi thanks for this ruby! :ecstatic:

is there anyway to change it to meters?
0

stanmarsh 
 

Re: Scaling to_cm

Postby sahi » Thu Jul 31, 2008 6:28 pm

stanmarsh wrote:is there anyway to change it to meters?

meters
mashtab.zip
0

sahi 
PluginStore Author
PluginStore Author
 

Re: Scaling to_cm

Postby Didier Bur » Thu Jul 31, 2008 10:15 pm

Hi,
This doesn't work here: it gives weird results, out of range, entities are moved elsewhere. If entities are not grouped at start, there are grouped at the end.
Am I missing something ???

Before/After a scale of 2:
scale.jpg
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: Scaling to_cm

Postby sahi » Fri Aug 01, 2008 7:50 am

changed the names in a script
Menu > Plugins > Resizer

Dom_15.jpg
0
Last edited by sahi on Fri Aug 01, 2008 12:24 pm, edited 2 times in total.

sahi 
PluginStore Author
PluginStore Author
 

Re: Scaling to_cm

Postby N Lindenthal » Fri Aug 01, 2008 12:08 pm

On Mac I did not see the scaling tool palette. Is it Menu > Plugins > Scale?
0

N Lindenthal 
 

Re: Scaling to_cm

Postby Didier Bur » Fri Aug 01, 2008 12:35 pm

Hi,
Dialog is ambiguous: "on all of axes" is not a target size but adds entered size to actual size. The final size would be better IMHO ?
Why choosing the bounds center as the center of transformation ?
I suggest not to use "to_cm" or "to_m" in the code, but to use only Length type variables. Thus you will suit everyone's unit, no matter what it is.
Useful script, though.
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: Scaling to_cm

Postby sahi » Fri Aug 01, 2008 1:27 pm

Didier Bur wrote:Hi,
Dialog is ambiguous: "on all of axes" is not a target size but adds entered size to actual size. The final size would be better IMHO ?
Why choosing the bounds center as the center of transformation ?
I suggest not to use "to_cm" or "to_m" in the code, but to use only Length type variables. Thus you will suit everyone's unit, no matter what it is.

"on all of axes" ---How to name???
corrected all of other as you specified
0

sahi 
PluginStore Author
PluginStore Author
 

Re: Scaling to_cm

Postby Didier Bur » Fri Aug 01, 2008 3:37 pm

Correct me if I'm wrong, but the resize operation works only for faces in XY,XZ and YZ planes (red,green,blue) ?
"On all of axes" -> "In every direction" ? English speaking people please help !
Another enhancement is to encapsulate in an operation for one step undo:

Code: Select all
def mashtabirovanie_create
Sketchup.active_model.start_operation "Resize"
ss=Sketchup.active_model.selection
...
...
Sketchup.active_model.select_tool(nil)
Sketchup.active_model.commit_operation
end
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: Scaling to_cm

Postby sahi » Fri Aug 01, 2008 3:52 pm

Didier Bur wrote:
Code: Select all
def mashtabirovanie_create
Sketchup.active_model.start_operation "Resize"
ss=Sketchup.active_model.selection
...
...
Sketchup.active_model.select_tool(nil)
Sketchup.active_model.commit_operation
end

Thank you! Corrected a code.
Added an icon.
mashtab_3.zip
0

sahi 
PluginStore Author
PluginStore Author
 

Re: Scaling to_cm

Postby CadFather » Fri Aug 01, 2008 5:24 pm

..growing into a nice little ruby.
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: Scaling to_cm

Postby ilay7k » Fri Aug 01, 2008 7:11 pm

Correct me if I'm wrong, but the resize operation works only for faces in XY,XZ and YZ planes (red,green,blue) ?
"On all of axes" -> "In every direction" ? English speaking people please help !

Equal "In every direction" is global settings for object of selection(world scaling system in most graphic packages...in attached pic, like cinema4d)
or about directions of red,green,blue, Didier, you are right/something like object system/
0
Last edited by ilay7k on Fri Aug 01, 2008 7:15 pm, edited 2 times in total.

ilay7k 
 

Re: Scaling to_cm

Postby marcosrodrigues » Fri Aug 01, 2008 7:14 pm

Simple and very useful. Thank you!
0
| menos é mais

marcosrodrigues 
 

Re: Scaling to_cm

Postby Fletch » Sat Aug 02, 2008 6:49 am

I would replace the "on all of axes" line with a checkbox called 'lock aspect ratio' as shown in attached. or just change the name to 'uniform scale'.
0

Fletch 
Twilight Render
 

Re: Scaling to_cm

Postby sahi » Wed Aug 06, 2008 6:36 pm

Fletch wrote:I would replace the "on all of axes" line with a checkbox called 'lock aspect ratio' as shown in attached. or just change the name to 'uniform scale'.

dom_3.jpg

mashtab_4.zip
0

sahi 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Scaling to_cm

Postby unclebim » Thu Jun 07, 2012 9:17 pm

I don't get what should I input in the Lock aspect ratio box in order to get the selection scaled proportionally to exact dimension input in one axis?
0
User avatar
unclebim 
 

Re: [Plugin] Scaling to_cm

Postby Zacchia » Tue Jun 11, 2013 7:38 pm

I like it. Thanks!
0

Zacchia 
 

Re: [Plugin] Scaling to_cm

Postby chialiang168 » Tue May 19, 2015 5:51 pm

尺寸不正確
Size is not correct
0
User avatar
chialiang168 
 

Re: [Plugin] Scaling to_cm

Postby cotty » Tue May 19, 2015 5:56 pm

Perhaps your bounding box has a different orientation than the box itself?
0
User avatar
cotty 
Top SketchUcator
 

Re: [Plugin] Scaling to_cm

Postby juju » Wed May 20, 2015 12:31 pm

cotty wrote:Perhaps your bounding box has a different orientation than the box itself?

that would no sense if the plugin measures the bounding box instead of the geometry
0
Save the Earth, it's the only planet with chocolate.
User avatar
juju 
Premium Member
Premium Member
 

Re: [Plugin] Scaling to_cm (UPDATED)

Postby sahi » Mon Feb 15, 2016 11:04 am

Updated the plug-in in the first message
0

sahi 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: 4ndrius , linkph, raju7411, sreten, waci123pl and 8 guests

Visit our sponsors: