Home › Forum › SOFA › Using SOFA › [SOLVED] Deformable object not colliding
Tagged: collision, Deformable object
- This topic has 1 reply, 2 voices, and was last updated 9 years, 4 months ago by
Hugo.
-
AuthorPosts
-
12 May 2015 at 15:35 #3299
Mujika
BlockedI have a scene with two elements. A not-moving floor and a deformable object.
– The floor has a triangle model for collision.
– The deformable object has a standardtetrahedralfemforcefield and a meshmatrixmass.
– An obj with the surface of the deformable mesh is loaded and mapped with subsetmapping.
– The .scn is similar to the one I write below:
<Node name=”root” dt=”0.03333″ >
<DefaultPipeline name=”defaultPipeline1″ verbose=”0″ draw=”0″ depth=”10″ />
<BruteForceDetection name=”N2″ />
<MinProximityIntersection name=”Proximity” alarmDistance=”0.75″ contactDistance=”0.5″ />
<DefaultContactManager name=”Response” response=”default” />
<DefaultCollisionGroupManager name=”Group” />
<Node name=”deformable” gravity=”0 -9.81 0″ >
<NewmarkImplicitSolver name=”newmarkImplicitSolver1″ rayleighStiffness=”0.1″ rayleighMass=”0.1″ gamma=”0.5″ />
<CGLinearSolver template=”GraphScattered” name=”linear solver” iterations=”25″ tolerance=”1e-009″ threshold=”1e-009″ />
<MeshTopology name=”mesh” fileTopology=”mymesh.msh” />
<MechanicalObject template=”Vec3d” name=”MO” />
<TetrahedronSetGeometryAlgorithms template=”Vec3d” name=”setGem” />
<StandardTetrahedralFEMForceField template=”Vec3d” name=”standardFEM” materialName=”StVenantKirchhoff” ParameterSet=”4.82759e+007 4.34483e+008″ />
<MeshMatrixMass template=”Vec3d” name=”MMM” massDensity=”1000″ />
<Node name=”Surf2″ >
<MeshObjLoader name=”loader” filename=”surface.obj” />
<MeshTopology name=”meshTopology1″ position=”@loader.position” edges=”@loader.edges” triangles=”@loader.triangles” quads=”@loader.quads” tetrahedra=”@loader.tetras” hexahedra=”@loader.hexas” />
<MechanicalObject template=”Vec3d” name=”mObject1″ position=”@loader.position” velocity=”0 0 0″ force=”0 0 0″ externalForce=”0 0 0″ derivX=”0 0 0″ restScale=”1″ />
<TTriangleModel template=”Vec3d” name=”tTriangleModel” />
<TLineModel template=”Vec3d” name=”tLineModel” />
<TPointModel template=”Vec3d” name=”tPointModel” />
<SubsetMapping template=”Vec3d,Vec3d” name=”subsetMap1″ first=”2880″ last=”3029″ input=”@../” output=”@./” />
</Node>
</Node>
<Node name=”floor” >
<MeshTopology name=”Topology Floor” fileTopology=”myfloor.obj” />
<MechanicalObject template=”Vec3d” name=”Floor” position=”0 0 0″ velocity=”0 0 0″ force=”0 0 0″ externalForce=”0 0 0″ restScale=”1″ />
<TTriangleModel template=”Vec3d” name=”Floor Triangle For Collision” moving=”0″ simulated=”0″ />
</Node>I want the deformable object to behave like a deformable object and stop falling down when colliding with the floor. But it keeps falling. What am I doing wrong?
Thank you in advance.
Andoni
13 May 2015 at 10:04 #3304Hugo
KeymasterDear Andoni,
It seems that what you intend to simulate is very close to the example : sofa/examples/Component/collision/TriangleModel.scn
You should compare to this scene to make it work.It seems that :
–is not used but a DefaultAnimationLoop is used instead,
– for the floor, a Line and Point model are also defined.But, as written above, compare carefully both scenes, and it should work.
Best,
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.