← Back to team overview

yade-users team mailing list archive

Re: [Question #270604]: how to specify certain bodies(spheres) to display?

 

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

    Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hi Behzad,

You have first to obtain the OpenGLRenderer [1] object that takes care
of displaying things in Yade GUI, then make use of its attribute
function hideBody() [2], passing as attribute the id of the bodies you
do not want do display (one at once, I think)

Namely:

rend = yade.qt._GLViewer.Renderer() # see https://yade-dem.org/doc/yade.qt.html#yade.qt._GLViewer.Renderer
for b in yourListOfBodyWithSomeSpatialPositionsYouDoNotWantToDisplay:
    rend.hideBody(b.id)

I just learned it thanks to your question, so I hope it works !

Jerome

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.OpenGLRenderer
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.OpenGLRenderer.hideBody

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.