
A new video tutorial by Joe Gunn that start enticing but finish incomplete.
I learn nothing from Joe this time :/
I learn nothing from Joe this time :/
Autodesk 3ds Max Tech Blog


Next, will made another function that to select the objects...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
)
delete theMesh
Volume /= 6
Volume
)
... and here is the example usage:fn selectObjByVolume volLimit =
(
select (
for obj in geometry where \
CalculateVolume obj <= volLimit collect obj
)
)
selectObjByVolume 337



c = Circle()
convertToSplineShape c
theKnots = for k = 1 to 4 collect (getKnotPoint c 1 k)
dn = Donut()
convertToSplineShape dn
theKnots = #()
for Sp = 1 to (numSplines dn) do
for k = 1 to (NumKnots dn Sp) do
append theKnots (getKnotPoint dn Sp k)
on ChannelsUsed pCont do
(
pCont.useposition = true
pCont.useTime = true
)
on Init pCont do
(
global pflowguide = $guide
)
on Proceed pCont do
(
if pflowguide != undefined do
(
t = pCont.getTimeStart() as float
theKnots = #()
if t <= 0 do
(
for Sp = 1 to (numSplines pflowguide) do
for k = 1 to (NumKnots pflowguide Sp) do
append theKnots (getKnotPoint pflowguide Sp k)
for i = 1 to theKnots.count do
(
pCont.AddParticle()
pCont.particleIndex = pCont.NumParticles()
pCont.particleposition = theKnots[i]
)
)
)
)
global pflowguide = $guide