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

Jan Stránský proposed the following answer:
Hello,
thanks for explanation, now it makes more sense :-) just another
terminology point, in this case you would probably assign attribute or
member, parameter is what you give to a function as input.

to your question:
############################
from yade import export,polyhedra_utils
polyhedrons = [polyhedra_utils.polyhedra(defaultMaterial(),size=(.5,.5,.5))
for i in xrange(3)]
for i,b in enumerate(polyhedrons): b.state.pos = (i,0,0)
O.bodies.append(polyhedrons)
maxEdgeLengths = (1,2,3)
# polyhedrons and maxEdgeLengths would be obtained differently in your case

for poly,maxLen in zip(polyhedrons,maxEdgeLengths):
poly.maxEdgeLength = maxLen # you can assign whatever like this, you only
need not to conflict existing names. E.g. poly.state=1 would give error

vtk = export.VTKExporter('/tmp/p.vtk')
vtk.exportPolyhedra(what=[('maxLen','b.maxEdgeLength')]) # maxLen is
paraview name, b.maxEdgeLength is ours assigned value
############################

cheers
Jan


2016-04-20 12:58 GMT+02:00 velimier <question291...@answers.launchpad.net>:

> Question #291529 on Yade changed:
> https://answers.launchpad.net/yade/+question/291529
>
> velimier posted a new comment:
> Hi Jan,
> maybe "assign" is the better term. I meant to create each polyhedron and
> to asign parameter to it so I can access the parameter during the
> simulation. Or is there  option to get max edge length of each polyhedron
> in yade?
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to