- This topic has 1 reply, 2 voices, and was last updated 3 years, 10 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › Save visual model deformation as obj
Hello,
I have a scene with multiple mechanical objects and their mapped visual models.
Through out the simulation I successfully deform my mechanical objects and via the mapping my visual models appear bent like they probably should be.
The problem appears when I try to export each visual model with :
visual_node.addObject('OBJExporter', name='exporter1', printLog='true', filename='visual',exportEveryNumberOfSteps=1)
The visual model is always in its rest shape.
I then tried to use the ‘O’ key but it exports the whole scene as one single obj file which does not suits my needs.
I’m using SP3 and sofa v20.12 to run the scene.
Is there a way to access the deformed state of the visual object or catch the rest shape + the transformations matrices ?
hey @albanodot
Are you interacting (applying translation or rotation for instance) on your VisualModel with your Python script?
Did you make sure the Exporter has a flag listening = true
to listening to events?
Best
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.