Home › Forum › SOFA › Programming with SOFA › [SOLVED] Setting the FixedContraint to a surface mesh
Tagged: 64_bits, Linux_ubuntu, SOFA_1812
- This topic has 9 replies, 2 voices, and was last updated 7 years ago by
shiva.
-
AuthorPosts
-
26 July 2019 at 11:55 #13993
shiva
BlockedHello
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
26 July 2019 at 12:17 #13994Hugo
KeymasterHi @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
26 July 2019 at 12:51 #13995shiva
BlockedThanks @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
26 July 2019 at 13:04 #13996Hugo
KeymasterOf course.
Here you are:<MechanicalObject showIndices="1" showIndicesScale="0.005" />Hugo
26 July 2019 at 13:19 #1399726 July 2019 at 19:50 #14008shiva
BlockedHello @Hugo.
Can you please tell me How you could find those values of indices as 3010 and 3050.
Cheers
Shiva
26 July 2019 at 20:32 #14009Hugo
KeymasterHi @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
29 July 2019 at 12:09 #14018shiva
BlockedNo 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
29 July 2019 at 15:52 #14024Hugo
KeymasterHi @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
30 July 2019 at 15:56 #14050shiva
Blockedthanks for the support i have successfully completed it.
-
AuthorPosts
- You must be logged in to reply to this topic.
