← Back to team overview

yade-users team mailing list archive

Re: [Question #271877]: Extract 2D cross-sections from the 3D sphere pack.

 

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

    Status: Open => Answered

Jérôme Duriez proposed the following answer:
Do the provided error message and script really match ??

Your script seems to express "idx" according to "a", whereas the error message shows an "idx" expression according to "spherePos".....
Exception of the name difference, one should visibly have one index: "a[0]", whereas spherePos should have two: "spherePos[i,0]"...


As an of-topic remark "for i in range(len(O.bodies)):      b = O.bodies[i]" may be directly replaced by "for b in O.bodies:". See any example of the doc, e.g. in https://yade-dem.org/doc/tutorial-data-mining.html#local-data

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