[mechanics_io] Fix relative transform for static contators.
@@ -1082,14 +1082,16 @@ class Hdf5():
body = None
if use_proposed and mass == 0:
# a static object
+
+ cset = SiconosContactorSet()
+ csetpos = (translation + orientation)
for c in contactors:
- pos = (translation + orientation)
- shp = self._shape.get(c.data)
- conset = SiconosContactorSet()
# TODO: segfault if we pass None for SiconosVector!
- conset.append(SiconosContactor(shp, [0,0,0,1,0,0,0], c.group))
+ shp = self._shape.get(c.data)
+ pos = list(c.translation) + list(c.orientation)
+ cset.append(SiconosContactor(shp, pos, c.group))
print('Adding shape %s to static contactor'%c.data, pos)
- self._broadphase.insertStaticContactorSet(conset, pos)
+ self._broadphase.insertStaticContactorSet(cset, csetpos)
self._static[name] = {
'number': number,
