- This topic has 3 replies, 2 voices, and was last updated 6 years, 1 month ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › How to make a 6DOF simulation act like a 4DOF (make 3d act like 2d simulation)?
Hi,
I have written quite a complicated simulation with vec3 mechanical objects that uses the flexible and the image plugins.
How could I make this simulation behave as though it were vec2 and clamp the third dimension?
I have tried starting from scratch with vec2, but it seems the image plugin prevents the 2d simulation from working at all.
I’m open to any python suggestions or other dirty tricks because it took me about 5 months to get to where I am so starting again is not practical.
Hi mjbarrow,
Without image plugin, you could use Vec2d templates to model only the x and y DOFs.
In a more direct way from you 3d simulation, to “clamp” one of the DOFs, you can use the PartialFixedConstraint with the data fixAll=”1″.
Best
Hugo
Hi Hugo, I wanted to hold of responding before some thorough testing of this suggestion.
Thank you, it seems to work in most cases. If anyone reads this and has a choice, Vec2d would be a much more robust solution. I also struggled to find any information on the constraint bit mask parameters. Could you please confirm which degrees of freedom the 12 bits correspond to?
here is an example where I have only allowed motion along a single axis for all indices in my mechanical object. I also seem to have prevented torquing (and the subsequent failure of the constraint if torquing occurs)
`<PartialFixedConstraint fixAll=”true” fixedDirections=”1 0 1 0 0 1 0 0 1 0 0 0″ />
Thanks again
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.