yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #03156
Re: Use of StepDisplacer in python
On 3 June 2010 14:34, Jerome Duriez <jerome.duriez@xxxxxxxxxxxxxxx> wrote:
> Hello,
>
> I want to use the engine "StepDisplacer", through Python. Normally it needs
> one "se3" and one boolean as argument. I got that se3 does not exist in
> python but should be used as a tuple of elements (the components, with a
> nice trick for the ones of the quaternion...) But in fact it seems that I
> did not understand all, because I get an error at the definition of this
> Engine :
>
> Yade [6]:
> a=StepDisplacer([DPos[0],DPos[1],DPos[2],qId[3],qId[0],qId[1],qId[2]],'true')
> ---------------------------------------------------------------------------
> RuntimeError Traceback (most recent call last)
>
> /home/3S-LAB/jduriez/YADE/lib/yade-trunk-classic/py/yade/__init__.pyc in
> <module>()
> ----> 1
> 2
> 3
> 4
> 5
>
> RuntimeError: Zero or one (and not more) non-keyword string argument
> required
>
> I tried with a "real" se3 to be sure that it is not my syntax of se3 in
> python which is to blame. No more success :
> Yade [15]: s1=O.bodies[1]
> Yade [16]: se3Issu=s1.state.se3
> Yade [17]: StepDisplacer(se3Issu,'true')
> ---------------------------------------------------------------------------
> RuntimeError Traceback (most recent call last)
>
> /home/3S-LAB/jduriez/YADE/lib/yade-trunk-classic/py/yade/__init__.pyc in
> <module>()
> ----> 1
> 2
> 3
> 4
> 5
>
> RuntimeError: Zero or one (and not more) non-keyword string argument
> required
>
>
> Has someone any idea ? Thanks a lot,
>
> Jerome
>
Hi Jerome,
I was using StepDisplacer and I was using in python the following notation:
StepDisplacer(subscribedBodies=[1],delta=(Vector3(-1e-6,0,0),Quaternion().IDENTITY),setVelocities=True)
Have you tried this way? Is that what you need?
cheers, Chiara
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References