ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
-- 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)
Comments
Thank you Anubis! Love your
Thank you Anubis!
Love your work
-- modified version of the
my recent MAXScripts RSS (archive here)