[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,
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

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?
0

todd burch 
 

Re: [Plugin] Component Spray update

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

Yep, great idea !
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Component Spray update

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

Awesome Didier, thanks so much!

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

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
0
La Connaissance n'a de valeur que partagée
User avatar
MALAISE 
 

Re: [Plugin] Component Spray update

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

Very reactive! :enlight:
Toujours sur la brèche :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

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
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

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.
0

Fletch 
Twilight Render
 

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?
0
“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 
 

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? :?
0
Jackson

Jackson 
 

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
0
User avatar
plot-paris 
 

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.
0
Developer of LightUp Click for website
User avatar
AdamB 
LightUp Support
LightUp Support
 

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.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

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.
0
Jackson

Jackson 
 

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; :(
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

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!
0
Jackson

Jackson 
 

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? ;-)
0
Developer of LightUp Click for website
User avatar
AdamB 
LightUp Support
LightUp Support
 

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:
0
Jackson

Jackson 
 

Re: [Plugin] Component Spray update

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

fascinating indeed. now everything makes sense. :roll:
0
User avatar
plot-paris 
 

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.
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

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.
0
IOviz.com
SU Pro 2017 PC
Thea: latest
vray4SU latest
User avatar
troyhome 
 

Re: [Plugin] Component Spray update

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

this looks like an amazingly useful plugin. thanks!
0

Sir 
 

Re: [Plugin] Component Spray update

Postby derei » 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.
0
DESIGNER AND ARTIST DEREI.UK
User avatar
derei 
 

Re: [Plugin] Component Spray update

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

0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Component Spray update

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


thank you very much ! :enlight:
0
DESIGNER AND ARTIST DEREI.UK
User avatar
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.
0
~ Brooke
User avatar
brookefox 
 

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.
0
~ Brooke
User avatar
brookefox 
 

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.
0
~ Brooke
User avatar
brookefox 
 

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?
0
~ Brooke
User avatar
brookefox 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: Clue, Kamangom, or35bo and 5 guests

Visit our sponsors: