python API : double const [3] in python

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Fabien Leboeuf
Posts: 17
Joined: Thu Sep 20, 2007 5:26 am

python API : double const [3] in python

Post by Fabien Leboeuf » Fri May 27, 2016 2:28 am

Hi

i want to add a marker to my markerset in python.
Thus, i use the command :

Code: Select all

ms = m_model.getMarkerSet()
cstDouble=opensim.ArrayDouble_getValuesFromVec3(opensim.Vec3(100/1000.0,100/1000.0,100/1000.0))  
ms.addMarker("LASI",cstDouble,m_model.getBodySet().get("pelvis"))
you can see i define my offset with the second line and a doubleArray composed of 3 double.
unfortunatly, i got an error with this parameter :

Code: Select all

 return _opensim.MarkerSet_addMarker(self, *args)
TypeError: in method 'MarkerSet_addMarker', argument 3 of type 'double const [3]'
it need a const double array.
how can i do that with the python API

POST REPLY