-- wrap into a function..
FooSl = 0 -- clear selection
FooSl = #() -- Selection of bigger chunks
foo = $  as array -- temp selection
VolSize = 50 -- size of volume

for i = 1 to foo.count do
(
	vMin = foo[i].min
	vMax = foo[i].max
	if (distance vmin vmax) >= VolSize then (append FooSl foo[i])
	else
		(foo[i].wirecolor = blue)
)

fooSl.wirecolor = orange
select fooSl


/*
Select by mass v 0.5 (I will write a GUI version and add more functionality to it sometime
if it proves useful)

Written by Allan McKay
Nov 13, 2009

this is a quick script to turn all objects smaller than a certain size one color, and
all the ones bigger another.
It was a quick script I wrote in production to be able to tell the difference between
large chunks and small chunks, so later I could tell the large chunks to fracture again.

The way it works is change the VolSize variable to whatever size you want, the bigger
chunks turn yellow, the smaller ones turn blue. From here if you like you can easily
run a quickl script to select all objects that are blue, or all that are orange.
Essentially an easy way to select "big chunks" or select "small chunks" in the scene.
*/
