Page 1 of 1

python API : double const [3] in python

Posted: Fri May 27, 2016 2:28 am
by fabienleboeuf
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