← Back to team overview

yade-users team mailing list archive

Re: [Question #691026]: Loading the stored the position of plank, but it wrong

 

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

Jan Stránský proposed the following answer:
Sorry, but this is still too far from MWE. If you want help from us, you
have to do some work on your side first.

If your problem is saving/loading a facet, then the MWE should be about
saving and loading one facet:

### 1st script
f = facet(((0,0,0),(1,0,0),(0,1,0)))
O.bodies.append(f)
f.state.vel = (.1,0,0)
f.state.angVel = (0,0,.1)
O.run(10,True)
numpy.save("f",[[f.id,f.state.pos]])
###

### 2nd script
f = facet(((0,0,0),(1,0,0),(0,1,0)))
O.bodies.append(f)
[[i,pos]] = numpy.load("f.npy",allow_pickle=True)
f.state.pos = pos
###

is this the same problem you are facing?

cheers
Jan

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