SketchUcation Premium Membership

 

 

[Plugin] SurfaceGen (0.9.0b) — 28 April 2012

Re: [Plugin] SurfaceGen

Postby TIG » Sat Apr 30, 2011 2:27 pm

Cool.
The 'rand' function is also interesting...
Capture.PNG
Please, register (free) to access all the attachments on the forums.
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] SurfaceGen

Postby jim4366 » Sat Apr 30, 2011 2:53 pm

I'm sure it's simple but..
Can I re-size the user window? Can't see the generate button.
Please, register (free) to access all the attachments on the forums.
jim4366
 
Posts: 52
Joined: Sat Jul 04, 2009 1:01 pm
Location: Kitchener, ON, Canada
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Intermediate

Re: [Plugin] SurfaceGen

Postby Diggsey » Sat Apr 30, 2011 3:03 pm

Just updated again fixing a small bug with the expression parser.

Check out this graph:


Equation = min(((max(abs(y)-(2*sqrt(z+4)) ,(x+0.5*abs((abs(y)+4)/3.5)/(1+(((abs(y)+4)/3.5)^2-2)^2)/2 *2/(1+(z-2)^2)+abs(y/1.5)^3.5/7 ) )*max( max( abs(x+0.15+(y/0.7)^2)+(z-1.3)/1.4,max(z-2.3, max( abs(x+0)/2.4 -1+2*abs(1.5*y)+(z+0.1)/2 , -z ))) ,x-0.8+z/2)-0.1 )*(abs(x+y^2/3)-0.2+abs(abs(z+1.8)-(0.5-(y/2)^2) )^1.2 )-0.1 ),( (x+1.2+abs(y)/10)^2+(abs(y)-1.1)^2/2.5+(z-2.3)^2/1.8-0.64))
x: -3 to 1
y: -4 to 4
z: -4 to 5.4


@TIG
Yes you can use any built in ruby function;)

@jim
I can't make the window resizable because it is shown and hidden by resizing it to a fixed value and zero respectively, and there is no API function to get the size of the window to save it. However, you can easily change the height of the window. Open surfacegen.rb in notepad and change the line "WINDOW_HEIGHT = 320" to about "WINDOW_HEIGHT = 350". You can try different values until you get what you want.
Diggsey
 
Posts: 37
Joined: Tue Aug 11, 2009 7:46 pm
Name: Diggory James Joshua Blake

Re: [Plugin] SurfaceGen

Postby driven » Sat Apr 30, 2011 3:29 pm

yes,

working on the mac...

I don't know if I downloaded before or after your latest tweak,
is there a version number somewhere on the files?

another thing, is it possible to have a 'use last' settings option?

playing around with the box size on the head requires [re]inputting the data each time
cheers
john
driven
Top SketchUcator
 
Posts: 1455
Joined: Fri May 01, 2009 11:50 pm
Name: John
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

Re: [Plugin] SurfaceGen

Postby Diggsey » Sat Apr 30, 2011 3:32 pm

If you need to use the same settings as last time just copy and paste the graph, and then change the settings you need to. All the settings are stored as attributes of the graph so will be copied with it. If you need to change the size you can use the scale tool just as easily as creating a new graph.
Diggsey
 
Posts: 37
Joined: Tue Aug 11, 2009 7:46 pm
Name: Diggory James Joshua Blake

Re: [Plugin] SurfaceGen

Postby notareal » Sat Apr 30, 2011 3:51 pm

TIG wrote:You already have 'pi' [in lowercase] as a function?

Also now in axes... get improvement with other functions too :)
Welcome to try Thea Render, Thea support | kerkythea.net -team member
notareal
Thea Render
 
Posts: 961
Joined: Tue Nov 13, 2007 9:54 pm
Location: Oulu, Finland
Name: notareal

Re: [Plugin] SurfaceGen

Postby driven » Sat Apr 30, 2011 4:04 pm

BTW.. the varying size of content seen by jim is most likely due to your using [ font-size: 8pt; ] as although 1px=0.75pt different browsers treat pt oddly,

with safari, in SU, on my mac 8pt is reading as 8px and everything fits if a bit small.
driven
Top SketchUcator
 
Posts: 1455
Joined: Fri May 01, 2009 11:50 pm
Name: John
Operating system: Mac
SketchUp version: 2013
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

Re: [Plugin] SurfaceGen

Postby jim4366 » Sat Apr 30, 2011 4:15 pm

Open surfacegen.rb in notepad and change the line "WINDOW_HEIGHT = 320" to about "WINDOW_HEIGHT = 350".


Thanks. 380 let's me see the generate button. Hope it's not a bother, but also the width. Can that be increased?
Actually, no need. It was because I have the font size of win 7 bumped up one step.
So it's okay. Thanks again.
Last edited by jim4366 on Sat Apr 30, 2011 4:37 pm, edited 1 time in total.
jim4366
 
Posts: 52
Joined: Sat Jul 04, 2009 1:01 pm
Location: Kitchener, ON, Canada
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Intermediate

Re: [Plugin] SurfaceGen

Postby notareal » Sat Apr 30, 2011 4:19 pm

Got some inspiration from http://abdelhamid394.blogspot.com/
Please, register (free) to access all the attachments on the forums.
Welcome to try Thea Render, Thea support | kerkythea.net -team member
notareal
Thea Render
 
Posts: 961
Joined: Tue Nov 13, 2007 9:54 pm
Location: Oulu, Finland
Name: notareal

Re: [Plugin] SurfaceGen

Postby Pixero » Sun May 01, 2011 8:08 am

This is very cool.
Two questions:
Is there any noise available? If not that would be a great addition.
I've tried with rand but that isn't noise. :(

A few links to good sites with functions and equations for surfaces would also help getting up to speed.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1301
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] SurfaceGen

Postby Diggsey » Sun May 01, 2011 12:32 pm

I've updated the first post with version 0.8.

@Pixero
What exactly do you mean by noise? Surely just adding (rand-0.5) will put noise on the graph?
Diggsey
 
Posts: 37
Joined: Tue Aug 11, 2009 7:46 pm
Name: Diggory James Joshua Blake

Re: [Plugin] SurfaceGen

Postby Jim » Sun May 01, 2011 1:12 pm

Thanks, Diggsey.

Just a minor annoyance. Since the dialog steals the focsus, whenever I select a Surface, my SU shortcuts don't work. For example, select the Surface to move it - press the 'm' shortcut to Move it - can't Move it because the dialog got the keypress. :(
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] SurfaceGen

Postby Diggsey » Sun May 01, 2011 1:18 pm

Unfortunately, I don't think there's a way to give focus back to SketchUp from ruby. (Someone correct me if I'm wrong!)
Diggsey
 
Posts: 37
Joined: Tue Aug 11, 2009 7:46 pm
Name: Diggory James Joshua Blake

Re: [Plugin] SurfaceGen

Postby Jim » Sun May 01, 2011 1:20 pm

I don't think so either, and I realize a small change in workflow is all that's required - but as the saying goes "old habits die hard." No worries.
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] SurfaceGen

Postby TIG » Sun May 01, 2011 1:46 pm

If you pick a surfacegen-entity the surfacegen-dialog appears.
Minimize that surfacegen-dialog.
The focus will then return to the SKP window.
So now you can use shortcuts etc to Move the selected entity etc.
Restore the surfacegen-dialog to change the surfacegen-entity's settings... :geek:
TIG
User avatar
TIG
Global Moderator
 
Posts: 14308
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] SurfaceGen

Postby Pixero » Sun May 01, 2011 5:41 pm

Diggsey wrote:What exactly do you mean by noise? Surely just adding (rand-0.5) will put noise on the graph?


With random numbers there is no relationship between a given random and the next random.
Noise however, produces a naturally ordered smooth sequence of numbers with makes it more useful when creating surfaces or textures. (Think surface displacement to create waves and clouds.)
Here's a few links that explain it better than I can:

http://en.wikipedia.org/wiki/Simplex_noise
http://www.noisemachine.com/talk1/
http://webstaff.itn.liu.se/~stegu/simpl ... xnoise.pdf
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1301
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] SurfaceGen

Postby Pixero » Sun May 01, 2011 7:21 pm

Instant roof. :D

instant_roof.jpg
Please, register (free) to access all the attachments on the forums.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1301
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] SurfaceGen

Postby d12dozr » Wed May 04, 2011 12:44 am

Diggsey wrote:Just uploaded a fairly major update to the first post!
...
@d12dozr
Helpful error message are now shown when an expression is invalid.

Thank you...helps me take my baby steps :lol:

One thing...when I start a new SU file from File -> New, the dialog for SurfaceGen doesn't pop up. It does work if I close SU down completely and restart. I can draw the boundary box, but then cannot do anything else. I opened the Ruby Console while opening a new file, but didn't get any error messages.
"There is a man in the world who will never be turned down... he is the man who delivers the goods."
d12dozr
Top SketchUcator
 
Posts: 1935
Joined: Mon Feb 09, 2009 8:43 am
Location: Minnesota
Name: Marcus
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: product design
Level of SketchUp: Advanced

Re: [Plugin] SurfaceGen

Postby robert111 » Wed May 04, 2011 1:44 pm

nice roof Pixero

but your fonction is not visible.
robert111
 
Posts: 108
Joined: Thu Dec 04, 2008 11:25 pm

Re: [Plugin] SurfaceGen

Postby Pixero » Wed May 04, 2011 3:32 pm

-abs(x)+sin(8*y)

The rest I think you can see in the picture.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1301
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] SurfaceGen

Postby Oxer » Wed May 04, 2011 5:54 pm

Thanks Diggsey for this incredible plugin! :thumb:
I have translated the plugin to spanish language.
SurfaceGen 0.8 .zip
Please, register (free) to access all the attachments on the forums.
"The result is the end what is important is the process" by Oxer
http://www.oxervision.blogspot.com/
User avatar
Oxer
 
Posts: 174
Joined: Thu Sep 10, 2009 1:13 am
Location: Benavente, Spain
Name: Oscar
Operating system: Mac
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Advanced

Re: [Plugin] SurfaceGen

Postby noteman8.0 » Thu May 05, 2011 3:32 am

nice plugin....THX :fecstatic:
noteman8.0
 
Posts: 1
Joined: Thu May 05, 2011 3:30 am

Re: [Plugin] SurfaceGen

Postby LannorMov » Thu May 05, 2011 7:35 am

Me gusta este pluguin,se ve interesante, pero lo veo un poco complicado y de poco uso en Arquitectura, no sé si en otras carreras sea tan útil. Voy a buscarle una función. gracias Oxer.
LannorMov
 
Posts: 13
Joined: Fri Oct 01, 2010 7:25 am
Name: Essahú

Re: [Plugin] SurfaceGen

Postby 66searcher » Tue May 10, 2011 4:26 pm

@Diggsey
:thumb: great plugin ! :thumb: great job !
http://hamidtoliat.deviantart.com/
User avatar
66searcher
 
Posts: 25
Joined: Thu Jan 28, 2010 3:09 am
Location: Tehran - Iran
Name: hamid

Re: [Plugin] SurfaceGen

Postby LannorMov » Tue May 10, 2011 5:07 pm

El otro dia dije "Gracias Oxer" cuando en realidad quería decir "Gracias Diggsey"
Disculpa.
LannorMov
 
Posts: 13
Joined: Fri Oct 01, 2010 7:25 am
Name: Essahú

Re: [Plugin] SurfaceGen

Postby 66searcher » Tue May 10, 2011 8:38 pm

a test :
Please, register (free) to access all the attachments on the forums.
http://hamidtoliat.deviantart.com/
User avatar
66searcher
 
Posts: 25
Joined: Thu Jan 28, 2010 3:09 am
Location: Tehran - Iran
Name: hamid

Re: [Plugin] SurfaceGen

Postby justinplunkett » Fri May 20, 2011 10:05 am

I feel like a 5 year old. The geometric forms created are gorgeous and I haven't the faintest idea how to use this.
justinplunkett
 
Posts: 3
Joined: Sat Sep 11, 2010 8:09 am
Name: Justin

Re: [Plugin] SurfaceGen

Postby make.GQ.china » Tue May 24, 2011 4:47 am

:thumb: Thank you very much! Good plugin
make.GQ.china
 
Posts: 7
Joined: Wed Feb 10, 2010 4:56 pm
Name: guan qiang

Re: [Plugin] SurfaceGen

Postby Heven7_floor » Tue May 24, 2011 4:02 pm

Thanks you very great plugin :thumb: :thumb:
Heven7_floor
 
Posts: 42
Joined: Thu Mar 27, 2008 4:09 pm
Location: Beautiful Sea
Name: Heven7_floor

Re: [Plugin] SurfaceGen

Postby boilingsnow » Fri Dec 30, 2011 10:41 am

Very cool plugin!
But a progress bar could be very helpful. Because I 've installed it and by performing the plugin it seems to take hours to generate a surface and I don't know if it is really working!

I've waited for more than 25 minutes for a simple eqation so I have to give up finally...
In other words, I can't get it work in my sketchup 8.
boilingsnow
 
Posts: 55
Joined: Sun Jul 20, 2008 9:32 pm

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Are you a Premium Member? Get your freebies here. Are you not a Premium Member yet? Upgrade your account to grab these freebies instantly.

Ad Machine
Robot
 
Posts: 2012

PreviousNext

Return to Plugins

Who is online

Users browsing this forum: Jpac, modocker, yishow and 8 guests