yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00486
facets, edges, vertices (questions to sega)
Hi,
I was looking at the classes you added recently, which I find
(potentially, for me at this moment) _VERY_ useful. I have a few
questions as I am not sure I understand exactly how those classes are
supposed to work.
1. Factets have normals - what is their meaning? Is it the normal from
the edge towards the center of mass of the facet?
2. What happens if vertices of facet are not in-plane?
3. Why should I want to have not only facets, but also edges and
vertices? Does it avoid some singularities at facet boundary?
4. What subclass of PhysicalParameters for facet is needed so that
spheres can bump into facets etc (I can look into the code here)?
4. Could you give some rudiementary working example of say 1 sphere
falling into cone from 4 facets (or something like that)? I tried
running your model but didn't succeed (will investigate shortly).
(Preferably you could do the whole thing in python; I added methods for
raw attribute access to make vector<Vector3r> Facet::vertices (and
similar) accessible in a way, but didn't figure out the normals. They
are calculated in postProcessAttributes, is that why in your example,
you save the simulation and load it again? (I could add wrapper for
postProcess to python in that case) This is what I wanted to add to utils:
from yade.wrapper import *
def facet(center,vertices,relative=False):
if relative: relCenter=[0,0,0]
else: relCenter=center
vStr='['
for v in vertices: vStr+=" {%g %g %g}
"%(v[0]-relCenter[0],v[1]-relCenter[1],v[2]-relCenter[2])
vStr+=']'
b=Body()
b.shape=GeometricalModel("Facet",{'wire':True,'visible':True})
b.shape.setRaw('vertices',vStr)
b.mold=InteractingGeometry("InteractingFacet")
b.mold.setRaw('vertices',vStr)
b.phys=PhysicalParameters("PhysicalParameters",{'se3':[center[0],center[1],center[2],1,0,0,0]})
b.bound=BoundingVolume('AABB',{'diffuseColor':[0,1,0]})
b['isDynamic']=False
return b
Best regards, Vaclav
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev
Follow ups