yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #24389
Re: [Question #693993]: Change Mask and Color of a ClumpCloud
Question #693993 on Yade changed:
https://answers.launchpad.net/yade/+question/693993
Jan Stránský posted a new comment:
> I've tried in some ways but I couldn't get the result. Do you mind
explicitly tell me what I need to code?
please, firstly do not mind explicitly tell us what code you have tried.
for future reference, a MWE:
###
sphs = [s1,s2,s3,s4,s5] = [sphere((x,0,0),.5) for x in range(5)]
clump1id,ids = O.bodies.appendClumped((s1,s2))
clump2id,ids = O.bodies.appendClumped((s3,s4,s5))
clumpIds = (clump1id,clump2id)
colors = ((1,0,0),(0,0,1))
for color,i in zip(colors,clumpIds):
b = O.bodies[i]
ids = b.shape.members.keys()
for j in ids:
O.bodies[j].sha
###
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.