yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14738
Re: [Question #628595]: Problem creating clumps from existing spheres
Question #628595 on Yade changed:
https://answers.launchpad.net/yade/+question/628595
Status: Open => Answered
Christian Jakob proposed the following answer:
Hi,
>for g in agglomerates:
> O.bodies.appendClumped(g)
This will not work as you expect, because appendClumped() function needs
a list of body objects as input [1]. In the loop above you try to
deliver integer values to the function, which is not working.
You can create a list of bodies, which you want to clump together and
use this list for appendClumped() function.
#example:
listOfClumpMembers = []
for b in O.bodies:
if <condition>:
listOfClumpMembers.append(b)
O.bodies.appendClumped(listOfClumpMembers)
Regards,
Christian
--
You received this question notification because your team yade-users is
an answer contact for Yade.