← Back to team overview

yade-users team mailing list archive

Re: [Question #634452]: A question about the function

 

Question #634452 on Yade changed:
https://answers.launchpad.net/yade/+question/634452

Jan Stránský proposed the following answer:
Hi,

e.g.:

czmax = max(b.state.pos[2] for b in O.bodies if
isinstance(b.shape,Spheres))

or similarly on more lines:
czmax = -1e20
for b in O.bodies:
   if not insinstance(b.shape,Sphere): # process only spheres
      continue
   cz = b.state.pos[2]
   czmax = max(cz,czmax)

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.