Re: [Yade-users] [Question #291529]: Polyhedra longest edge to vtk

2016-04-20 Thread velimier
Question #291529 on Yade changed:
https://answers.launchpad.net/yade/+question/291529

Status: Answered => Solved

velimier confirmed that the question is solved:
Will buy you a beer once!
Thanks again!

-- 
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


Re: [Yade-users] [Question #291529]: Polyhedra longest edge to vtk

2016-04-20 Thread Jan Stránský
Question #291529 on Yade changed:
https://answers.launchpad.net/yade/+question/291529

Jan Stránský proposed the following answer:
>
>
> If I understood you well, this aproach can used for Sphere (or any shape)
> as well to create attribute that I need for certain simulation?
>

exactly :-)
Jan

-- 
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


Re: [Yade-users] [Question #291529]: Polyhedra longest edge to vtk

2016-04-20 Thread velimier
Question #291529 on Yade changed:
https://answers.launchpad.net/yade/+question/291529

velimier posted a new comment:
Well, thank you very much!
If I understood you well, this aproach can used for Sphere (or any shape) as 
well to create attribute that I need for certain simulation?

-- 
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


Re: [Yade-users] [Question #291529]: Polyhedra longest edge to vtk

2016-04-20 Thread Jan Stránský
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 :

> 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


Re: [Yade-users] [Question #291529]: Polyhedra longest edge to vtk

2016-04-20 Thread velimier
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


Re: [Yade-users] [Question #291529]: Polyhedra longest edge to vtk

2016-04-20 Thread Jan Stránský
Question #291529 on Yade changed:
https://answers.launchpad.net/yade/+question/291529

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,
I don't understand the question 1 at all, sorry :-) Could you specify it
bit? What do you mean by "prescribe", "parameter" and how would you use it
in simulation? Why do you want something to prescribe before creation if
you import the polyhedra? Thanks for answers.
Otherwise it should be easy.
cheers
Jan


2016-04-20 11:52 GMT+02:00 velimier :

> New question #291529 on Yade:
> https://answers.launchpad.net/yade/+question/291529
>
> Hi,
> I am creating simulation by importing voronoi cells to yade as polyhedra.
> Along with the computation of the voronoi cells I can determine the
> longest edge of each cell/polhedra.
> My goal is to export the polhedrons as .vtk and to be able to postprocess
> them using their longest edge as parameter.
> Questions are:
> 1. How to prescribe the longest edge to each polyhedron prior the creation
> of polyhedrons as "custom" parameter and use it during the simulation?
> 2.  How to export the longest edge of each polyhedron to .vtk to be able
> to postprocess it in paraview?
>
>
> --
> 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


[Yade-users] [Question #291529]: Polyhedra longest edge to vtk

2016-04-20 Thread velimier
New question #291529 on Yade:
https://answers.launchpad.net/yade/+question/291529

Hi,
I am creating simulation by importing voronoi cells to yade as polyhedra.
Along with the computation of the voronoi cells I can determine the longest 
edge of each cell/polhedra.
My goal is to export the polhedrons as .vtk and to be able to postprocess them 
using their longest edge as parameter.
Questions are: 
1. How to prescribe the longest edge to each polyhedron prior the creation of 
polyhedrons as "custom" parameter and use it during the simulation?
2.  How to export the longest edge of each polyhedron to .vtk to be able to 
postprocess it in paraview?


-- 
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