yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #24538
Re: [Question #694148]: why my particles don`t show in paraview?
Question #694148 on Yade changed:
https://answers.launchpad.net/yade/+question/694148
Status: Open => Answered
Jan Stránský proposed the following answer:
> But in the Object inspector there is not any icon for setting “Radius”
to 1
when you choose "GlyhpType" to "Sphere", just two lines below there is "Radius". Set it to 1 and then
somewhat below there is "Scaling" section, set "Scale Mode" to "scalar" and "Scale Factor" to 1
> but they do not show in real radius as be in my main code.
how do you know?
> shall I set Glyph mode to All points (in Masking) for seeing spheres
in Paraview exactly with true radius in Yade?
"All points" just displays all points (paraview has some default limit on amount on shown particles).
It has NO influence on radius
> In Yade, my sphere particles are in two colour which I can distinguish
them, so in Paraview for having two colour for them: should I set
coloring to Glyphvector (in Display (Geom))?
if you use color just to distinguish two (or a few) "types" of particles, I suggest not to export color itself, but rather some "id", something like:
###
def color2scalar(color):
if color == (1,0,0): return 1 # red
if color == (0,0,1): return 2 # blue
return 0 # or raise error
...exportSpheres(..., what={('color','color2scalar(b.shape.color)')})
###
then in paraview you can easily color it by the color scalar
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.