Select object less than x size

Does anyone know of a script that will select objects smaller than x volume or size?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
M0nkey's picture

Thank you Anubis! Love your

Thank you Anubis!

Love your work

Anubis's picture

-- modified version of the

-- modified version of the example function from the MxsHelp:
fn CalculateVolume obj = 
( 
	local Volume= 0.0
	local Center= [0.0, 0.0, 0.0]
	local theMesh = snapshotasmesh obj
	local numFaces = theMesh.numfaces
	for i = 1 to numFaces do
	(
		local Face= getFace theMesh i
		local vert2 = getVert theMesh Face.z
		local vert1 = getVert theMesh Face.y
		local vert0 = getVert theMesh Face.x
		local dV = Dot (Cross (vert1 - vert0) (vert2 - vert0)) vert0
		Volume+= dV
		Center+= (vert0 + vert1 + vert2) * dV
	)
	delete theMesh
	Volume /= 6
	Volume
)

volLimit = 33.0 -- set desired volume limit
-- end select...
select (for obj in geometry where CalculateVolume obj <= volLimit collect obj)

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.