- This topic has 9 replies, 2 voices, and was last updated 5 years, 4 months ago by .
Viewing 10 posts - 1 through 10 (of 10 total)
Viewing 10 posts - 1 through 10 (of 10 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › [SOLVED] Setting the FixedContraint to a surface mesh
Tagged: 64_bits, Linux_ubuntu, SOFA_1812
Hello
I have created a 3d model in .msh format and succeeded in displaying it. I have added triangleSetTopology to my model in the code.
The mesh is a circular disc.
I have issues in setting the pivot point to the model to stand against gravity and not fall down .
i have added the link to video, code and mesh:
Cheers
Shiva
Hi @avihs98
I think your mesh have some issue, especially on the border. In the mechanicalObject you can activate the Visualization with showIndices=”1″ and you can see that at the border of the disk, two points are always overlapping. I gues some points are not connected to the rest of the mesh.
Look, if you use instead the indices=”3010 3050″ it works.
I would go for a remeshing or at least analyzing the mesh connectivity.
Hugo
Thanks @Hugo
I will try recreating the mesh. Can you please give me a sample code of how to activate
the Visualization with showIndices=”1″ in mechanicalObject.
Thanks
Shiva
Of course.
Here you are:
<MechanicalObject showIndices="1" showIndicesScale="0.005" />
Hugo
Hello @Hugo.
Can you please tell me How you could find those values of indices as 3010 and 3050.
Cheers
Shiva
Hi @avihs98
Just change the field “indices” in the FixedConstraint.
You will see that using these indices the Constraint works well.
<FixedConstraint indices="3010 3050" />
Again let us know when you have successfully remeshed your disk.
Hugo
No Sir,
My question was that, how could you find the indices 3010 and 3050?, Was it a trial and error method or any other specific way to find them.
Cheers
Shiva
Hi @avihs98
I just took two random points.
If you want to visual the point IDs just activate the options showIndices and showIndicesScale in the associated MechanicalObject (as mentioned above).
Hugo
thanks for the support i have successfully completed it.
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.