← Back to team overview

yade-users team mailing list archive

Re: [Question #678583]: after loading simulation


Question #678583 on Yade changed:

    Status: Open => Answered

Jan Stránský proposed the following answer:
For saving the packing (both O.save and saving just the packing), you
have to use O.run(...,True) or O.run(...); O.wait(), otherwise Yade
saves the state right away (i.e. saving initial makeCloud).

To solve your problem, there are several options:

- just correct the ids of HarmonicMotionEngine (as Cylinder is not defined in the second script), e.g.
HarmonicMotionEngine(...,ids=[b.id for b inO.bodies if isinstance(b.shape,Facet)],...) # just extract ids of facets

- define HarmonicMotionEngine in the first script, set dead=True and in
the second script set dead=False

- use one script (anyway preferable solution) with a condition for creating the packing:
some content of script 1
if os.path.exists(packingFile):
   content of script 1 concerning creating the packing
content of script 2


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