SketchUcation Premium Membership

 

 

[Plugin] Multi face offset

[Plugin] Multi face offset

Postby remus » Sun Jun 28, 2009 11:27 am

multi face offset.jpg

As per this request: viewtopic.php?f=180&t=20193

version 3 now up.

You'll need offset.rb, courtesy of RickW.

How it works:
1. select the faces you want to offset
2. Plugins->Multi face Offset
3. Put in the distance
4. ...and away you go

Stuff id like to change but probably wont:
-condense it in to one script with a choice of units. Added, sort of. See thoms post.
Please, register (free) to access all the attachments on the forums.
Last edited by thomthom on Tue Dec 08, 2009 9:46 pm, edited 1 time in total.
Reason: Just cleaning up and organizing the Plugin forum. Correcting [Plugin] tag
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [plugin] Multi face offset

Postby thomthom » Sun Jun 28, 2009 11:34 am

Why all the different versions? .to_l http://code.google.com/intl/nb/apis/ske ... .html#to_l should take care of the units for you.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17568
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby remus » Sun Jun 28, 2009 11:41 am

thats a rather handy tip, thanks.
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [plugin] Multi face offset

Postby thomthom » Sun Jun 28, 2009 11:52 am

Btw, .to_l might give different result from what you expect - depending on that object you convert.

If you have a number - 30.to_l <- that means 30 inches.
If you have a String - "30".to_l <- that means 30 model units, so if your model units are mm - then you'll get mm.

And then with a string, users can override the model units. If the model units are mm and a user type "30m" you'll still get the correct length.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17568
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby rv1974 » Sun Jun 28, 2009 1:21 pm

Isn't windowizer already make the same ?
rv1974
 
Posts: 515
Joined: Tue Nov 13, 2007 11:38 am
Name: rv1974
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby thomthom » Sun Jun 28, 2009 1:28 pm

Windowizer generates window components. This is just plain offset.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17568
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby Gaieus » Sun Jun 28, 2009 1:37 pm

Remus, please, post some image in the first post so that we can have some clue what it does (and I can rip it for TDC, too)
;)
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27610
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby rv1974 » Sun Jun 28, 2009 2:12 pm

thomthom wrote:Windowizer generates window components. This is just plain offset.

A "window component" is a pure abstraction. With glass inset =0 it makes the same plain offset+ additional options (i.e. materials assignment, edit and eraze in the future)
rv1974
 
Posts: 515
Joined: Tue Nov 13, 2007 11:38 am
Name: rv1974
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby chango70 » Sun Jun 28, 2009 2:29 pm

Does the faces have to be on the same plane?
chango70
 
Posts: 587
Joined: Tue Mar 25, 2008 3:06 pm
Location: London

Re: [plugin] Multi face offset

Postby remus » Sun Jun 28, 2009 6:06 pm

No, the faces can be on any plane. It wont work on curvy things, though.

As for windowizer doing the same thing, it probably can, and i think Fred06's offset on surface could do it as well, i just fancied writing it for a bit of practice.
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [plugin] Multi face offset

Postby DIEGO-RODRIGUEZ » Sun Jun 28, 2009 8:19 pm

Thanks, but does not work.
Using sketchup 6 and 7, windowsxp SP3 in Spanish
If you have a solution, thank you
DIEGO-RODRIGUEZ
Banned
 
Posts: 272
Joined: Sat Jan 10, 2009 6:20 pm
Location: Argentina - Mar del plata
Name: diego

Re: [plugin] Multi face offset

Postby remus » Sun Jun 28, 2009 9:11 pm

Could you open the ruby console (window->ruby console), run the script and post whatever comes up in the console?
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [plugin] Multi face offset

Postby DIEGO-RODRIGUEZ » Sun Jun 28, 2009 9:49 pm

Error: #<NoMethodError: undefined method `offset' for #<Sketchup::Face:0x5aad818>>
C:/Archivos de programa/Google/Google SketchUp 6/Plugins/multi face offset.rb:23:in `multi_face_offset'
C:/Archivos de programa/Google/Google SketchUp 6/Plugins/multi face offset.rb:21:in `each'
C:/Archivos de programa/Google/Google SketchUp 6/Plugins/multi face offset.rb:21:in `multi_face_offset'
C:/Archivos de programa/Google/Google SketchUp 6/Plugins/multi face offset.rb:34
C:/Archivos de programa/Google/Google SketchUp 6/Plugins/multi face offset.rb:33:in `call'
DIEGO-RODRIGUEZ
Banned
 
Posts: 272
Joined: Sat Jan 10, 2009 6:20 pm
Location: Argentina - Mar del plata
Name: diego

Re: [plugin] Multi face offset

Postby remus » Sun Jun 28, 2009 10:17 pm

most unusual, i'll have a look in to it and see if i can find out whats going on.
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [plugin] Multi face offset

Postby TIG » Sun Jun 28, 2009 10:22 pm

Remus - do you have RickW's [free from Smustard] 'offset.rb' and elcorto doesn't ?
TIG
User avatar
TIG
Global Moderator
 
Posts: 13950
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby DIEGO-RODRIGUEZ » Sun Jun 28, 2009 10:26 pm

Thanks Tig, I had no offset.rb.
Now works fine
DIEGO-RODRIGUEZ
Banned
 
Posts: 272
Joined: Sat Jan 10, 2009 6:20 pm
Location: Argentina - Mar del plata
Name: diego

Re: [plugin] Multi face offset

Postby remus » Sun Jun 28, 2009 10:28 pm

I havent got it, but im guessing its included in some other script. Thanks for the pointer by the way, i'll add it to the 1st post.
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [plugin] Multi face offset

Postby TIG » Sun Jun 28, 2009 10:32 pm

It's the simple things that are often the most complicated !
[¡Se trata de las cosas simples que a menudo son las más complicadas!]
TIG
User avatar
TIG
Global Moderator
 
Posts: 13950
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby Pilou » Mon Jun 29, 2009 1:39 am

And seems Protrude by Jim Foltz makes the same and more! :mrgreen:

protrude.jpg
Please, register (free) to access all the attachments on the forums.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10038
Joined: Wed Jan 23, 2008 10:33 pm
Operating system: Windows
SketchUp version: 6
License type: Free
SketchUp use: hobby
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby remus » Mon Jun 29, 2009 8:18 am

A veritable Smörgåsbord of repeated functionality :P
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [plugin] Multi face offset

Postby Pilou » Mon Jun 29, 2009 8:56 am

@Remus
Thx for this new curious name :lol:
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10038
Joined: Wed Jan 23, 2008 10:33 pm
Operating system: Windows
SketchUp version: 6
License type: Free
SketchUp use: hobby
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby Pixero » Mon Jun 29, 2009 11:09 am

Smörgåsbord is a swedish word. :thumb:
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1285
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby DIEGO-RODRIGUEZ » Mon Jun 29, 2009 2:25 pm

Be possible. After applying offset. be selected the new drawing?
then able to apply, for example, multiple Push Pull


sorry for my English. Thank you
DIEGO-RODRIGUEZ
Banned
 
Posts: 272
Joined: Sat Jan 10, 2009 6:20 pm
Location: Argentina - Mar del plata
Name: diego

Re: [plugin] Multi face offset

Postby Pilou » Mon Jun 29, 2009 3:43 pm

After applying offset. be selected the new drawing?

Protrude above can make that , just offset= 0 after use it and enable Height = that you want ;)
Only Protrude keep the selection ;) Protrude is a very funny plug! :fro:


For Push Pull multiple in general you can also use Joint Push Pull by Fredo6 or Projection2 by Didier Bur ;)
But both lost the selection! :o
Please, register (free) to access all the attachments on the forums.
Last edited by Pilou on Mon Jun 29, 2009 11:04 pm, edited 2 times in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10038
Joined: Wed Jan 23, 2008 10:33 pm
Operating system: Windows
SketchUp version: 6
License type: Free
SketchUp use: hobby
Level of SketchUp: Advanced

Re: [plugin] Multi face offset

Postby DIEGO-RODRIGUEZ » Mon Jun 29, 2009 8:07 pm

"Pilou" You're right, thank you very much
DIEGO-RODRIGUEZ
Banned
 
Posts: 272
Joined: Sat Jan 10, 2009 6:20 pm
Location: Argentina - Mar del plata
Name: diego

Re: [plugin] Multi face offset

Postby CadFather » Tue Jun 30, 2009 3:25 pm

Hi Remus, first thanks for the useful script - i found out the offset may end reversed at times

multioffset_1.png
Please, register (free) to access all the attachments on the forums.
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 802
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [plugin] Multi face offset

Postby remus » Tue Jun 30, 2009 5:46 pm

So it does. I dont suppose youve found what causes it? Whatever it is, i suspect it is a bug in offset.rb, it would be good to be able to pass it on to rickw, though.
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [plugin] Multi face offset

Postby CadFather » Tue Jun 30, 2009 9:38 pm

the hunch, says it may be something to do with the direction of the lines (start-end-front-back business..) - but i could not spot the pattern for sure yet
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 802
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [plugin] Multi face offset

Postby CadFather » Thu Jul 02, 2009 9:03 pm

Remus, couple of icons if needed..


moffset_16.png
moffset_24.png
Please, register (free) to access all the attachments on the forums.
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 802
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: Max Coppoletta

Re: [plugin] Multi face offset

Postby remus » Thu Jul 02, 2009 9:04 pm

I dont know how to do toolbars :oops:

I'll give it a go, though, those icons are too nice to waste :thumb:
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Artisan Organic Toolset - a set of powerful organic modeling tools.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012

Next

Return to Plugins

cron

Who is online

Users browsing this forum: ewarth02, rayin_dr, toysoldier and 14 guests