2 September 2021 at 7 h 39 min #20294
I am trying to inflate a shape using the SoftRobots plugin.
The inside of my model is soft and able to increase in volume in all directions, however I want to put an outer shell around it, so that it can only inflate inwards.
I tried using collisions, however that is having problems due to how close the walls are initially, so I’ve decided to use fixed constraints instead.
The shape of the shell is a sheared/slanted cylinder and is therefore hard to constrain using BoxROIs. With BoxROIs, however, it is easy to grab their indices via BoxROI.indices.
I cannot find a similar way to achieve this with the points within a MechanicalObject? Is there a way to achieve this?
BMan2 September 2021 at 8 h 42 min #20295
is your shape made of tetrahedra? You can use a Tetra2TriangleTopologicalMapping component. You’ll get a triangle surface.
If you also have a surface for the inside (a hole in your shape), you may use a MeshROI. But it requires that you design a mesh to include only the points you want.
Alex3 September 2021 at 6 h 37 min #20302
My shape is made of tetrahedra yes.
I used MeshROI by creating a new surface mesh, which is 75% working. The 25% that isn’t working seems to be due to some stray constraint indices which aren’t visible on the mesh, or in the sofa scene when I view the triangles.
Any ideas why this could be happening?
Also does MeshROI only work with 2D surfaces?
Brandon3 September 2021 at 10 h 50 min #20304
I have troubles to understand your problem…
From what I can see MeshROI job is to find all edges, triangles and tetrahedra contained in a mesh made of triangles.4 September 2021 at 1 h 43 min #20306
I tried to put links or embed images into here, however, It has marked me as a spammer.
Is there an alternative way for me to share images?
Brandon7 September 2021 at 9 h 15 min #20316HugoKeymaster
7 September 2021 at 12 h 40 min #20319
- SOFA Consortium
Apologies for the confusion, I’ll place some images to help describe the issue
(I could not put in more than one link without being labeled as spam so here is an album)
There are four chambers to be inflated with air in my design. Here are two images (Images 4 & 5) showing one of the chamber’s inner face. There are no red-square highlighted indices (Which denote fixed constraint points). This is what I intend for all four chambers.
However, in this image (Images 6 & 7) I show the only chamber that strangely does have red-square indices highlighted on its front face. This prevents the chamber from moving.
Here from the top (Image 2) you can see that 3 of the 4 chambers are inflating correctly. The 4th one cannot as the front face is being constrained for no reason.
The surface I am using to create the meshROI can be seen in Images 1 & 3.
In SOFA it wraps around the exterior of the yellow object. It should ONLY be constraining the outside of the yellow object.
I’ve tried seeing if it is a problem with the mesh, however, I cannot see any deformities or oddities within it. Gmsh shows a normal looking mesh.
Thank you so much for the help
Brandon7 September 2021 at 14 h 49 min #20323
Ok, I think I get it.
Check that the mesh you use for the MeshROI is correctly placed in the scene.
Check that the mesh you use for the MeshROI is closed.
Check that the mesh you use for the MeshROI has its triangles numbered such that the computation of the normal points toward the exterior of the mesh.
MeshROI might be buggy…
Since you have cylinder shapes, try something like this:
<Node name="root"> <VisualStyle displayFlags="showBehaviorModels showForceFields" /> <EulerImplicitSolver/> <CGLinearSolver/> <GenerateCylinder name="mechaCylinder" resCircumferential="20" resRadial="6" resHeight="10"/> <TetrahedronSetTopologyContainer tetrahedra="@mechaCylinder.tetrahedra" position="@mechaCylinder.output_TetrahedraPosition"/> <MechanicalObject/> <TetrahedronFEMForceField youngModulus="5000" poissonRatio="0.45"/> <GenerateCylinder name="constraintCylinder" radius="0.19" resCircumferential="20" resRadial="6" resHeight="10" height="2" origin="0 0 -0.5"/> <MeshROI name="roi" ROIposition="@constraintCylinder.output_TrianglesPosition" ROItriangles="@constraintCylinder.triangles"/> <FixedConstraint indices="@roi.indicesOut"/> </Node>8 September 2021 at 5 h 20 min #20332
Thank you so much for all the help, I definitely learnt new things from all of this.
Strangely, however, I just re-exported the mesh again from gmsh and its working now!
I didn’t change anything in the mesh settings, or the mesh itself, I just simply re-exported it (For the 4th time by the way) and it just happens to be working now.
Not sure if it really was just a strange glitch somewhere but for now I suppose it is solved.
Brandon8 September 2021 at 9 h 03 min #20333
Good to know that your simulation is working.
What mesh did you re-export? The FEM mesh or the one used in the MeshROI?
Please let us know if you find what caused your problem.
Cheers11 September 2021 at 13 h 45 min #20346
It was the MeshROI mesh that I re-exported.
So I just opened the original .step file in Gmsh and re-exported it as a .stl file again with the same settings as earlier.
At this point in time I still have no idea what caused it, but I will definitely update if I ever figure it out.
Thanks so much again!
- You must be logged in to reply to this topic.