SketchUcation Plugin Store

 

 

[Plugin] Component Spray update

[Plugin] Component Spray update

Postby Didier Bur » Fri Feb 06, 2009 7:15 pm

Hi all,
Here is a bug fix of my spray tool, interfering with other scripts that use Todd's progressbar.
Just replace old rb with this one.
Regards,
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: [Plugin] Component Spray update

Postby Todd Burch » Fri Feb 06, 2009 7:34 pm

Thanks Didier!!

Did you see my suggestion in the Greeble thread?
Todd Burch
 
Posts: 909
Joined: Mon Nov 12, 2007 2:43 pm
Location: Katy, Texas

Re: [Plugin] Component Spray update

Postby Didier Bur » Fri Feb 06, 2009 10:50 pm

Yep, great idea !
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: [Plugin] Component Spray update

Postby Chris Fullmer » Sat Feb 07, 2009 2:38 am

Awesome Didier, thanks so much!

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6691
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Component Spray update

Postby MALAISE » Sat Feb 07, 2009 8:02 am

Thank you Didier, for the ruby's release :thumb: :thumb:
MALAISE
La Connaissance n'a de valeur que partagée
MALAISE
 
Posts: 620
Joined: Sun Apr 20, 2008 1:23 pm
Location: Cergy Pontoise FRANCE
Name: Pierre

Re: [Plugin] Component Spray update

Postby Pilou » Sat Feb 07, 2009 3:56 pm

Very reactive! :enlight:
Toujours sur la brèche :enlight:
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10055
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] Component Spray update

Postby Didier Bur » Sat Feb 07, 2009 5:52 pm

Toujours sur la brèche

Façon de parler, ça faisait 6 mois que ça traînait :D
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: [Plugin] Component Spray update

Postby Fletch » Wed Feb 11, 2009 7:39 am

thanks Didier- that fixed a bug where I couldn't get it to do anything on my SU vs. 6 or 7. ;)
worked great now.
Fletch
Twilight Render
 
Posts: 760
Joined: Wed Nov 14, 2007 1:02 am
Location: Milwaukee, WI USA / Rovinj, Croatia

Re: [Plugin] Component Spray update

Postby xrok1 » Sat Mar 07, 2009 12:12 am

thanks for the great ruby!
i was wondering, would there be a way to get an exact number of copies, say 1 per face, at the center of each face?
Please, register (free) to access all the attachments on the forums.
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!
xrok1
 
Posts: 1966
Joined: Sat Feb 16, 2008 1:53 am
Location: Canada
Name: Rocky

Re: [Plugin] Component Spray update

Postby Jackson » Mon Mar 23, 2009 10:25 am

Strangest thing, Component Spray (fantastic ruby BTW Didier!) stopped working for me a few minutes ago- I clicked to set the centre point of the spray shape, but when I clicked to set the radius it wouldn't "stick", the spray shape just moved with the cursor. I quickly searched SCF and found this update, overwrote it into my Plugins folder, but saw the same behaviour. So I went and made a cup of coffee, came back and now it works!

One thing I have always wished for in Component Spray would be the ability to scatter comps randomly within the spray area rather than weighting them towards the middle- or am I missing something really obvious? :?
Jackson
Jackson
 
Posts: 1350
Joined: Mon Oct 22, 2007 1:43 pm

Re: [Plugin] Component Spray update

Postby plot-paris » Mon Mar 23, 2009 6:35 pm

Thanks a lot for the update, Didier :thumb:

Jackson wrote:One thing I have always wished for in Component Spray would be the ability to scatter comps randomly within the spray area rather than weighting them towards the middle- or am I missing something really obvious? :?

good idea, Jackson. there should be either a check box to enable/disable the behaviour or a field to type in a percentage of distribution
User avatar
plot-paris
 
Posts: 1553
Joined: Tue Apr 01, 2008 10:15 am
Location: London
Name: plot-paris
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Component Spray update

Postby AdamB » Tue Mar 24, 2009 5:50 pm

Cool plugin, Didier. I really believe these kind of 'smart' tools are the way forward.

Jackson: The "bunching" in the middle is caused by the way the random positions are calculated.

Just as an experiment I added some 'clash detection' to the plugin. The idea being before it adds the instance it checks there is space for it. It really reduces the overlap of Component instances (obviously) but also helps the "bunching" in the middle because it avoids adding too many near the middle.

[I didn't want to make big changes to Didier's baby, so it only catches most clashes - with more work it could be made to never add overlapping Components]

Adam

PS Didier, I'll send you my changes. Ignore / use / abuse or whatever as you see fit.
Developer of LightUp http://www.light-up.co.uk
User avatar
AdamB
LightUp
 
Posts: 752
Joined: Wed Dec 12, 2007 10:49 am
Location: Brighton, UK
Name: AdamB

Re: [Plugin] Component Spray update

Postby thomthom » Tue Mar 24, 2009 5:55 pm

That's interesting. I thought it was some code in there that deliberately clustered the components, simulating the effect of a forest. There are times when I want that effect and there are times when I don't. Having an extra option for this would be really nice.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17630
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] Component Spray update

Postby Jackson » Tue Mar 24, 2009 7:14 pm

AdamB wrote:Jackson: The "bunching" in the middle is caused by the way the random positions are calculated.


So what factor affects the otherwise random positioning? It would seem to me the only factors which could cause this obviously non-random influence on random scattering must be either
a) proximity to the centre point
b) proximity from the boundary

Another great addition to this script would be that rather than the density parameter being input as a percentage it could be input as a "x number of components per square metre/foot/etc. As a percentage is only representative of a fraction of a whole it can't really be used to describe density in this sense as there's no way for the script to know how big each component is, and therefore how much of the total area they will actually cover. It'd be great to be able to scatter trees randomly, but at an average of say 1 instance per 10m². Just some ideas.
Jackson
Jackson
 
Posts: 1350
Joined: Mon Oct 22, 2007 1:43 pm

Re: [Plugin] Component Spray update

Postby Didier Bur » Tue Mar 24, 2009 7:35 pm

PS Didier, I'll send you my changes. Ignore / use / abuse or whatever as you see fit.


Cool :thumb: Thanks Adam.
But I have no time now to work on my freebies, or update the depot, etc; :(
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: [Plugin] Component Spray update

Postby Jackson » Tue Mar 24, 2009 7:50 pm

Didier Bur wrote:But I have no time now to work on my freebies, or update the depot, etc;


Your generosity with this amazing script and the ruby depot is already greatly appreciated!

Component Spray already has an excellent, intuitive UI and is among a small group of ruby scripts which really should be implemented as proper SU tools IMO. Great job!
Jackson
Jackson
 
Posts: 1350
Joined: Mon Oct 22, 2007 1:43 pm

Re: [Plugin] Component Spray update

Postby AdamB » Tue Mar 24, 2009 8:44 pm

Jackson wrote:So what factor affects the otherwise random positioning? It would seem to me the only factors which could cause this obviously non-random influence on random scattering must be either
a) proximity to the centre point
b) proximity from the boundary


Its a bit involved but since you ask...

If you use a random number generator that is normally distributed and use it in an orthogonal linear space you're all set. So compo_spray along a Line works great with no bunching. But for the Spray mode, the script calculates a random radius and a random angle around the center. However, the circumference of a circle close to the center is smaller than at the outside edge of the spray so using a normally distributed random number for the radius effectively biases position generation to the center point of the spray.

Adding "clash-detection" means you can set a "N per unit area" threshold so although it tries to add more near the center of the spray, they get rejected hence you don't get that bunching.

Phew....Fascinating, huh? ;-)
Developer of LightUp http://www.light-up.co.uk
User avatar
AdamB
LightUp
 
Posts: 752
Joined: Wed Dec 12, 2007 10:49 am
Location: Brighton, UK
Name: AdamB

Re: [Plugin] Component Spray update

Postby Jackson » Tue Mar 24, 2009 9:10 pm

Adam,

Thanks for that detailed, but very clear explanation, it hadn't occurred to me that the random scattering was calculated along the circumferences of concentric circles. That actually is fascinating!

Sounds like your tweak is a useful addition. :thumb:
Jackson
Jackson
 
Posts: 1350
Joined: Mon Oct 22, 2007 1:43 pm

Re: [Plugin] Component Spray update

Postby plot-paris » Mon Mar 30, 2009 5:26 pm

fascinating indeed. now everything makes sense. :roll:
User avatar
plot-paris
 
Posts: 1553
Joined: Tue Apr 01, 2008 10:15 am
Location: London
Name: plot-paris
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Component Spray update

Postby Bob James » Sat Apr 11, 2009 7:58 am

Jackson wrote:
It'd be great to be able to scatter trees randomly, but at an average of say 1 instance per 10m². [/quote]

I'm looking for a way to randomly place people in a room: Jackson's suggestion would really do that job.

Didier: Looking forward to your having enough time to re-address this Ruby.
"If you don't plan ahead you'll be at the mercy of those that do" - Ashleigh Brilliant

"Bad is not good until worse happens" - Bob James
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 608
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] Component Spray update

Postby troyhome » Sat Apr 25, 2009 1:06 am

I really appreciate the generosity with which you supply this community so many innovative tools. the dialogue that comes with your scripts is essential to improving SketchUp and how people interact with it.
Thank you.
Etch-A-Render
SU Pro 8.0.4810 Mac/ SU Pro 8.0.4811 PC
Thea: (MacOSX 32bit) RV481_v1.0.7 (SU2TH .86)/ (PC 64bit) RV481_v1.0.7 (SU2TH .86)
Vray: VfSU 1.49.01
troyhome
 
Posts: 283
Joined: Sun Mar 09, 2008 1:21 am
Location: Michigan
Name: Troy
Operating system: Mac
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Component Spray update

Postby Sir » Tue Apr 28, 2009 12:24 pm

this looks like an amazingly useful plugin. thanks!
Sir
 
Posts: 178
Joined: Mon Jan 12, 2009 3:42 pm
Name: Mat B

Re: [Plugin] Component Spray update

Postby dereeei » Thu Nov 25, 2010 8:51 pm

What means this update? If I want the latest version of the Component Spray, is it This One, or This one?
Thank you.
dereeei
 
Posts: 565
Joined: Tue Nov 16, 2010 1:48 pm
Name: derei

Re: [Plugin] Component Spray update

Postby Didier Bur » Thu Nov 25, 2010 9:22 pm

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: [Plugin] Component Spray update

Postby dereeei » Thu Nov 25, 2010 10:05 pm


thank you very much ! :enlight:
dereeei
 
Posts: 565
Joined: Tue Nov 16, 2010 1:48 pm
Name: derei

Re: [Plugin] Component Spray update

Postby brookefox » Thu Mar 22, 2012 10:58 pm

Dear Farmer,

Finally I have an occasion, and finally I straighten my install and finally I harvest a moment of your efforts.

Thank you, Farmer. You help make living in this valley a pleasure.
~ Brooke
User avatar
brookefox
 
Posts: 832
Joined: Thu Jun 26, 2008 4:17 pm
Location: Pacific northwest, USA
Name: Brooke
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Component Spray update

Postby brookefox » Fri Mar 23, 2012 12:53 am

EDIT: This error may just be mine: perhaps having enabled 'hide everything else while editing group'.

There may be a limit on how far the routine likes to be 'buried'? That is, when I run it on a simple group, no sweat, but when I try to run it in group within a component, it seems to fail. Please see image. Top success within the group copied out of the component. Lower failure on the same group residing in the component. Perhaps I missed some advice in the use instructions. (Not an issue of overshadowing entities.)

I tried the same test in the naked group in the same location as the failing component and it worked fine, so it does appear to be that the routine wants to breathe a bit.
Please, register (free) to access all the attachments on the forums.
~ Brooke
User avatar
brookefox
 
Posts: 832
Joined: Thu Jun 26, 2008 4:17 pm
Location: Pacific northwest, USA
Name: Brooke
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Component Spray update

Postby brookefox » Sat Mar 31, 2012 12:03 am

When spraying grass components onto a large area and I want to keep the numbers down the lowest available setting of 1% is still very much too high, so I make a request for percentages below 1.

My work-round for this is to include within the component a large triangle so the spray density is thus limited and then edit this out of the component later. This works fine.
~ Brooke
User avatar
brookefox
 
Posts: 832
Joined: Thu Jun 26, 2008 4:17 pm
Location: Pacific northwest, USA
Name: Brooke
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] Component Spray update

Postby brookefox » Fri Apr 27, 2012 12:09 am

Having a hard time now. Rarely is anything being sprayed, no matter the setting. No groups or components on the receiving end.

FloatDomainError?
Please, register (free) to access all the attachments on the forums.
~ Brooke
User avatar
brookefox
 
Posts: 832
Joined: Thu Jun 26, 2008 4:17 pm
Location: Pacific northwest, USA
Name: Brooke
Operating system: Windows
SketchUp version: 8
License type: Free
SketchUp use: architecture
Level of SketchUp: Intermediate

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Not a Premium Member yet? Check out the great time-limited deal we are offering.

Ad Machine
Robot
 
Posts: 2012


Return to Plugins

Who is online

Users browsing this forum: carlocki, davids90gt, jpvikholm, mhackee, miskoza, Nnnastya, onzki, rksalinas, tin22 and 10 guests