← Back to team overview

yade-users team mailing list archive

Re: [Question #246284]: stopAtTime, how does it work?

 

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

Jan Stránský proposed the following answer:
Hello,

@Jerome: you are right that Omega and Scene are different objects, but FYI
most of Scene attributes can be accessed in python through O.something
syntax. So in Python, O (instance of Omega) most of the time represents its
current Scene (O.bodies, O.interactions etc.). For more information, have a
look at yade/py/wrapper/yadeWrapper.cpp, line 862 ("_sceneObj" function) or
the file in general.

@Laura: should be now available in git latest version. If you do not want
to do the update, use this temporary workoround:
O._sceneObj().stopAtTime = whatever

For others, using _sceneObj really should be considered as workaround, not
as standard approach (at least according to current documentation).

cheers
Jan




2014-03-31 13:26 GMT+02:00 jduriez <question246284@xxxxxxxxxxxxxxxxxxxxx>:

> Question #246284 on Yade changed:
> https://answers.launchpad.net/yade/+question/246284
>
>     Status: Open => Answered
>
> jduriez proposed the following answer:
> Hi,
>
> Even if we sometimes do not understand them, computers are always
> right... And indeed this stop function belongs to "Scene" class, and not
> to "Omega" class (and the python/yade object "O" is an instance of
> Omega..) (see https://www.yade-dem.org/doc/yade.wrapper.html). Omega and
> Scene are different since Omega object can include different Scene
> objects.
>
> So now, I hope you understand where does your problem come from. To
> solve it, you should wait for another answer : I could not find how to
> access with Python the current Scene of "O"...
>
> Jérôme
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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