WIP -- 'Protrude' ruby from Jim Foltz

WIP -- 'Protrude' ruby from Jim Foltz

Postby TaffGoch » Thu Oct 02, 2008 4:50 am

Jim has been working on his generator for greebles/nurnies (look it up), the "Protrude" ruby plugin.

Plugin: Protrude

This tool so easily produces geometry, that I'm sure I can only underestimate its potential uses.

The attached sample only took a couple of minutes, starting with a regular pentagon. Great fun!

Regards,
Taff
0
"Information is not knowledge." -- Albert Einstein
User avatar
TaffGoch 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Gaieus » Thu Oct 02, 2008 7:51 am

Ha! It does indeed look fun!
0
User avatar
Gaieus 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby watkins » Thu Oct 02, 2008 9:42 am

Dear Taff,

I should put some cream on that if I were you. It looks nasty.

Regards,
Bob
0

watkins 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby kwistenbiebel » Thu Oct 02, 2008 9:49 am

I installed it but get this error message when trying to open the 'Protrude Dialog' from the Plugins menu:

Error: #<NameError: uninitialized constant ProtrudeDialog>
C:/Program Files/Google/Google SketchUp 6/Plugins/protrude.rb:6
C:/Program Files/Google/Google SketchUp 6/Plugins/protrude.rb:4:in `call'


Anyone else experiences this?
0

kwistenbiebel 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Jim » Thu Oct 02, 2008 10:27 am

kwistenbiebel wrote:I installed it but get this error message when trying to open the 'Protrude Dialog' from the Plugins menu:

Error: #<NameError: uninitialized constant ProtrudeDialog>
C:/Program Files/Google/Google SketchUp 6/Plugins/protrude.rb:6
C:/Program Files/Google/Google SketchUp 6/Plugins/protrude.rb:4:in `call'


Anyone else experiences this?


At least one other person is having the same issue. I've uploaded a new version just now, so maybe give that a try.
0
Hi

Jim 
Global Moderator
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby kwistenbiebel » Thu Oct 02, 2008 10:58 am

wow, that's fast Jim. :thumb:
Thanks, I will try it.

[EDIT]: Works like a charm !
(An extra ruby needs to be downloaded from smustard to make it work: progressbar.rb)
0

kwistenbiebel 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby kwistenbiebel » Thu Oct 02, 2008 12:28 pm

I love the plugin :D .

A quick play:
0

kwistenbiebel 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Gaieus » Thu Oct 02, 2008 12:32 pm

Fantastic scene, kwist! :thumb:
0
User avatar
Gaieus 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby chango70 » Thu Oct 02, 2008 2:19 pm

WOW! Fantastic plugin! This is where plugins are no longer just tools, they are becoming creative works of art! Thanks!
0

chango70 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby plot-paris » Fri Oct 03, 2008 9:41 am

phantastic plugin, Jim. real fun to use it. its almost addictive :)
one minor thing: when I open the prodrude dialog window, it is allways to small. I have to rescale it first to see all the buttons. is there anything that can be done about it from within ruby?

@kwistenbiebel:
beautyful render! you immediately managed to think of a practical way to make use of this tool in architecture. the image has a great, artistic feeling to it, really looks like an exhibition room in an art gallery.
which render engine did you use for that and how long did it take?

[Edit] oh, and Dave: thanks for making us aware of this great new plugin :thumb:
0
User avatar
plot-paris 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby remus » Fri Oct 03, 2008 12:37 pm

I can imagine playing with this for a few hours at least :thumb:
0

remus 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Petruscaleus » Wed Nov 26, 2008 5:52 pm

Really a nice bit of ruby to toy around with...! :thumb:

But there's a little problem using it on a localized (german) OS - as some of you may know we're using a comma to separate the decimal places (and a point for the thousands); but the protrude plugin can't handle that, every floating point value is truncated to the integer value.
Ruby Console wrote:{"dmax"=>["65"], "7"=>[nil], "omin"=>["0"], "dmin"=>["35"], "hmax"=>["1"], "1"=>[nil], "tmin"=>["0"], "hmin"=>["1"]}
rcvd callback: "protrude()"
(values were 1,1 for hmin & and 1,7 for hmax)

If I call the 'Set Reasonable Values' function, the calculated values also use the decimal comma format - and protrude won't work, too.
Console wrote:rcvd callback: "setReasonableValues()"
setResonableValues:
{"dmax"=>["65"], "00m"=>[nil], "omin"=>["0"], "dmin"=>["35"], "tmin"=>["0"], "60m"=>[nil], "hmin"=>["6"]}
rcvd callback: "protrude()"
(hmin=6,00m & omin=0,60m)

When trying values with a decimal point an error occurs:
Console wrote:{"dmax"=>["65"], "omin"=>["0"], "dmin"=>["35"], "hmax"=>["1.7"], "tmin"=>["0"], "hmin"=>["1.1"]}
rcvd callback: "protrude()"
Error: #<ArgumentError: (eval):269:in `to_l': Cannot convert "1.1" to Length>
(eval):66:in `initialize'
(eval):63:in `eval'
(eval):66:in `initialize'
(eval):63:in `call'


The only workaround that will work is to adjust the numbers format (decimal point and comma separating the thousands) in windows itself, so SU will use the same number format as the plugin; the disadvantage is, every other program uses it as well.
Is there a (known) way to adjust the script to accept the comma values as well, or do I have to dig into ruby scripting myself...?

Regards,
Stefan
0

Petruscaleus 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Jim » Wed Nov 26, 2008 10:02 pm

Thanks for the report, Stefan. I had no idea the plugin was not working with a comma.

I am relying on the SketchUp API to process the string into lengths, and I am not directly manipulating the values. I assumed the API would handle the conversion. I will need to learn how to write the plugin to work in all circumstances.
0
Hi

Jim 
Global Moderator
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby tomot » Thu Nov 27, 2008 5:16 pm

Great stuff! makes it easy to build sculptures.
After which one could add some "catmull clark or doo sabin" meshing.

It might nice to add negative stepping as well. Perhaps by adding another button. Hence one can toggle between either negative or positive stepping.
0

tomot 
PluginStore Author
PluginStore Author
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Jim » Fri Nov 28, 2008 2:24 pm

Petruscaleus wrote:But there's a little problem using it on a localized (german) OS - as some of you may know we're using a comma to separate the decimal places (and a point for the thousands); but the protrude plugin can't handle that, every floating point value is truncated to the integer value.


Stefan, I have sent you a revised version that I hope will solve this issue. Please let me know if I was successful, and I will release it to everyone.

tomot wrote:Great stuff! makes it easy to build sculptures.
After which one could add some "catmull clark or doo sabin" meshing.

It might nice to add negative stepping as well. Perhaps by adding another button. Hence one can toggle between either negative or positive stepping.


Thanks tomot. I think it should be no problem to have negative values for the protrusion.
0
Hi

Jim 
Global Moderator
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby CadFather » Fri Nov 28, 2008 5:11 pm

fantastic plugin Jim, thanks

just reporting on some issues:

doesn't like curves, domes etc
no cutting on some faces in this shape

prot.png
0
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Petruscaleus » Sat Nov 29, 2008 3:51 pm

CadFather, as the name of the function "Divide Rectangles" implies, it only works with rectangles ^^
In your simple case case it would be only one line for each L-shaped polygon to divide them in two rectangles on which Divison can be applied.
As for arcs, domes and spheres - it works fine for me *scratches his head*
What exactly did you try?

Jim, you already have a reply to your PM; works fine now!
A new bug report/feature request: Right now you can only taper the extrusion up to 99%, if you enter 100 no tapering is done at all. Would it be possible to allow a taper of 100%, resulting in a single endpoint (top of the pyramid) instead of a small face at 99%? Optically this is no big matter, but it would save 3 vertices, 4 lines and one face which could matter in a big model including a few hundred extrusions.
0

Petruscaleus 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby sepo » Sat Nov 29, 2008 5:32 pm

Really nice plugin Jim. Thanks....
0

sepo 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby PRSS » Sat Nov 29, 2008 5:34 pm

Hello everybody!

I just installed this Protrude ruby. I do get the dialog. But when I select a face and aplly
"divide" nothing happens. When I press "protrude" also nothing happens. I am using SU 6 Free.

I downloaded the older version of ruby without the option of this "divide" from Crai Library.
This works fine. But not the new one from SketchUP Plugins download. I did delete the previous
ruby and the previous folder before copying the new ruby. Nothing works.

Help will be greatly appreciated.

Thanks in advance
With best regards
PRSS
0

PRSS 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby PRSS » Sat Nov 29, 2008 5:47 pm

Sorry!!

The 'progressbar.rb" was not there in my plugins folder.
It is working fine now after I copied it.

With best regards
PRSS
0

PRSS 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Jim » Sat Nov 29, 2008 6:07 pm

PRSS, would you open the Ruby Console and try running the plugin? Then copy and paste the output, and PM or email it to me. Also, Mac or PC?

Thank you.

sepo wrote:Really nice plugin Jim. Thanks....


I'm glad you like it. It's sort of fun to play with.

CadFather wrote:doesn't like curves, domes etc. no cutting on some faces in this shape


Yes, faces need to be rectangles. I plan on making it divide almost any face in the future. And since domes and curves are made of polygons that are not rectangles, they can be offset and protruded but not divided.

Petruscaleus wrote:Right now you can only taper the extrusion up to 99%,


This was a design decision - designed to make things easy on me! I use the scale function to scale the new protruded face, and so I don't think it can eliminate the top face altogether. I would need to rewrite that part of the plugin, so maybe in the future.

PRSS wrote:The 'progressbar.rb" was not there in my plugins folder.


And you need ProgressBar.rb from smustard.com.

I have a number of ideas for the plugin. If you open the ui.html file, you can see some of them (commented out.)

Anyone on a Mac able to use this?
0
Hi

Jim 
Global Moderator
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Jim » Sat Nov 29, 2008 6:15 pm

0
Hi

Jim 
Global Moderator
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby CadFather » Sat Nov 29, 2008 7:08 pm

Petruscaleus wrote:CadFather, as the name of the function "Divide Rectangles" implies, it only works with rectangles ^^


:knockout: :lol:


got it now Jim - an update to divide any face would make it into a supertool
not that it isn't already! :)
0
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby PRSS » Sun Nov 30, 2008 9:02 am

Thank you Jim, it is now working fine. Thanks again for the wonderful things you give
to SU lovers.

With best regards
PRSS
0

PRSS 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby kwistenbiebel » Thu Jan 01, 2009 6:01 pm

I needed to reinstall the Protrude ruby from Jims blog site.
Unfortunately the 'divide rectangle' function is not present anymore.
Don't know why that is, but would someone be so kind to upload the version of this plugin that includes the divide function here?
0

kwistenbiebel 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby Jim » Thu Jan 01, 2009 6:28 pm

kwistenbiebel wrote:I needed to reinstall the Protrude ruby from Jims blog site.
Unfortunately the 'divide rectangle' function is not present anymore.
Don't know why that is, but would someone be so kind to upload the version of this plugin that includes the divide function here?


Huh? It's still there, or at least is on my version which is the same as the most recent release. Have a screenshot?
0
Hi

Jim 
Global Moderator
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby kwistenbiebel » Thu Jan 01, 2009 7:02 pm

Funny :)

Here is the screenshot. As you can see, no divide rectangles option there:
0

kwistenbiebel 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby kwistenbiebel » Thu Jan 01, 2009 7:12 pm

Problem solved: There was a problem with overwriting a former protrude version.
Sorry for the confusion, the plugin now works just as it should.

Thanks again,Jim, for this plugin. It is a gem!
0

kwistenbiebel 
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby olishea » Mon Jan 12, 2009 12:52 pm

Hi there.

I installed both the protrude.rb and progressbar.rb but when i select a face and then divide, nothing happens.

no warnings or errors, the model just stays the same.

I have attached a picture of where I placed the rb file. I also copied the protrude folder into my plugins (not sure if this is where it should be!!)
0
oli
User avatar
olishea 
Premium Member
Premium Member
 

Re: WIP -- 'Protrude' ruby from Jim Foltz

Postby pilou » Mon Jan 12, 2009 2:18 pm

Zorro + Protrude = super fun result in a second! :fro: :thumb: :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Developers' Forum

Who is online

Users browsing this forum: DirkSander, morasul, van_der_goes and 10 guests

Visit our sponsors: