yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #03339
Re: Adding engines from python after scene is created
ChiaWeng Boon píše v Čt 01. 07. 2010 v 21:14 +0100:
> Thanks Vaclav, but I have not understood it. How do I access the
> Contact Law in python, if the simulation is created from C?
>
> For example, O.engine[3] gives InteractionDispatchers. From
> InteractionDispatchers, how do I access the contact law?
https://yade-dem.org/sphinx/yade.wrapper.html#yade.wrapper.InteractionDispatchers
gives you lawDispatcher, which is a
https://yade-dem.org/sphinx/yade.wrapper.html#yade.wrapper.LawDispatcher
and then you can use the
https://yade-dem.org/sphinx/yade.wrapper.html#yade.wrapper.LawDispatcher.functors to get the functors.
In short, O.engines[3].lawDispatcher.functors[0] is probably your
contact law.
v
Follow ups
References