← Back to team overview

yade-users team mailing list archive

Re: [Question #696648]: Image and erase

 

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

    Status: Open => Answered

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

you have 2 problems in one question. Next time, please create separate
question for separate problem [1]

> How can I erase "walls" and the "plate" once my simulation is done
(after o.pause).

Depends on what "walls" and "plate" are and how to indentify them w.r.t. other bodies. In general O.bodies.erase [2] is probably what you want. You can use it in different ways:
O.bodies.erase(id) # if you know the ID
O.bodies.erase(body.id) # if you have the body instance
for b in O.bodies:
   if isinstance(b.shape,Wall): O.bodies.erase(b.id) # erase all walls

> I also would like take a image of my simulation after o.pause.

Several options, too, depending on actual needs 
- create screenshot manually
- use SnapshotEngine to create the screenshot
- export data and create image externally (e.g. using Paraview)

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.BodyContainer.erase

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