Changing the material while running
Hi all!
I want to change the material of certain spheres while running the program, and here is my script:
from yade import pack
frict=O.
con=O.materials
floor=utils.
O.bodies.
sp1=pack.
sp1.makeCloud(
m = sp1.toSimulatio
sp2=pack.
sp2.makeCloud(
n = sp2.toSimulatio
for i in m:
O.bodies[
O.engines=
),
]
O.dt=0.
def change():
for i in n:
if O.bodies[
for i in n:
return
def done():
return
The error message is:
ArgumentError Traceback (most recent call last)
/usr/bin/yadedaily in <module>()
/usr/bin/yadedaily in change()
38 def change():
39 for i in n:
---> 40 if O.bodies[
41 for i in n:
42 O.bodies[
ArgumentError: Python argument types in
BodyContain
did not match C++ signature:
__getitem_
I am wondering whether an object's material can be changed while the program is running .
Thanks!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: