SketchUcation Premium Membership

 

 

[Plugin] Scaling to_cm

[Plugin] Scaling to_cm

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

A bit changed the tools of Scalin
Dom_12.jpg

mashtab_4.zip
Please, register (free) to access all the attachments on the forums.
Last edited by sahi on Wed Dec 08, 2010 6:57 pm, edited 5 times in total.
sahi
 
Posts: 132
Joined: Wed Nov 14, 2007 4:55 pm
Location: Russia
Operating system: Windows
SketchUp version: pre-6
License type: Free
SketchUp use: architecture
Level of SketchUp: Beginner

Re: Scaling to_cm

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

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

pav
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
 
Posts: 654
Joined: Tue Jan 08, 2008 5:40 pm
Location: canterbury, uk
Name: Luciano

Re: Scaling to_cm

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

changes a model size.
sahi
 
Posts: 132
Joined: Wed Nov 14, 2007 4:55 pm
Location: Russia
Operating system: Windows
SketchUp version: pre-6
License type: Free
SketchUp use: architecture
Level of SketchUp: Beginner

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
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
 
Posts: 654
Joined: Tue Jan 08, 2008 5:40 pm
Location: canterbury, uk
Name: Luciano

Re: Scaling to_cm

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

...it is "resize tool" more.. by axis... Useful idea,SAHI! :D
--pupil forever...------
User avatar
urgen
 
Posts: 623
Joined: Mon Nov 12, 2007 10:06 pm

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?
stanmarsh
 
Posts: 32
Joined: Mon Jun 23, 2008 12:51 am

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
Please, register (free) to access all the attachments on the forums.
sahi
 
Posts: 132
Joined: Wed Nov 14, 2007 4:55 pm
Location: Russia
Operating system: Windows
SketchUp version: pre-6
License type: Free
SketchUp use: architecture
Level of SketchUp: Beginner

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
Please, register (free) to access all the attachments on the forums.
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur
 
Posts: 1238
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: Scaling to_cm

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

changed the names in a script
Menu > Plugins > Resizer

Dom_15.jpg
Please, register (free) to access all the attachments on the forums.
Last edited by sahi on Fri Aug 01, 2008 12:24 pm, edited 2 times in total.
sahi
 
Posts: 132
Joined: Wed Nov 14, 2007 4:55 pm
Location: Russia
Operating system: Windows
SketchUp version: pre-6
License type: Free
SketchUp use: architecture
Level of SketchUp: Beginner

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?
N Lindenthal
 
Posts: 281
Joined: Sat Jun 07, 2008 7:09 pm
Location: Bad Ems, Deutschland

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.
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur
 
Posts: 1238
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: 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
Please, register (free) to access all the attachments on the forums.
sahi
 
Posts: 132
Joined: Wed Nov 14, 2007 4:55 pm
Location: Russia
Operating system: Windows
SketchUp version: pre-6
License type: Free
SketchUp use: architecture
Level of SketchUp: Beginner

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
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur
 
Posts: 1238
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: 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
Please, register (free) to access all the attachments on the forums.
sahi
 
Posts: 132
Joined: Wed Nov 14, 2007 4:55 pm
Location: Russia
Operating system: Windows
SketchUp version: pre-6
License type: Free
SketchUp use: architecture
Level of SketchUp: Beginner

Re: Scaling to_cm

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

..growing into a nice little ruby.
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 788
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

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/
Please, register (free) to access all the attachments on the forums.
Last edited by ilay7k on Fri Aug 01, 2008 7:15 pm, edited 2 times in total.
ilay7k
 
Posts: 308
Joined: Wed Nov 14, 2007 3:49 pm
Location: Shymkent, Kazakhstan
Name: Ilya Shpilkin

Re: Scaling to_cm

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

Simple and very useful. Thank you!
| menos é mais
marcosrodrigues
 
Posts: 54
Joined: Tue Jun 10, 2008 2:14 am
Location: Salvador, Brasil
Name: Marcos

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'.
Please, register (free) to access all the attachments on the forums.
Fletch
Twilight Render
 
Posts: 760
Joined: Wed Nov 14, 2007 1:02 am
Location: Milwaukee, WI USA / Rovinj, Croatia

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
Please, register (free) to access all the attachments on the forums.
sahi
 
Posts: 132
Joined: Wed Nov 14, 2007 4:55 pm
Location: Russia
Operating system: Windows
SketchUp version: pre-6
License type: Free
SketchUp use: architecture
Level of SketchUp: Beginner

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?
unclebim
 
Posts: 40
Joined: Fri Jun 12, 2009 8:23 pm
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Intermediate

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



 

Return to Plugins

Who is online

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