-
Notifications
You must be signed in to change notification settings - Fork 299
/
TutorialForceFieldLiverTriangleFEM.scn
48 lines (47 loc) · 3.74 KB
/
TutorialForceFieldLiverTriangleFEM.scn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" ?>
<!-- See http://wiki.sofa-framework.org/mediawiki/index.php/TutorialForceFieldLiverTriangleFEM -->
<Node name="root" gravity="0 -9.81 0" dt="0.02">
<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase BruteForceBroadPhase CollisionPipeline] -->
<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [DiscreteIntersection] -->
<RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [SphereCollisionModel] -->
<RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] -->
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader SphereLoader] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [BarycentricMapping] -->
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] -->
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TriangleFEMForceField] -->
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Constant"/> <!-- Needed to use components [MeshTopology] -->
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
<VisualStyle displayFlags="showForceFields" />
<CollisionPipeline name="CollisionPipeline" verbose="0" />
<BruteForceBroadPhase/>
<BVHNarrowPhase/>
<CollisionResponse name="collision response" response="PenalityContactForceField" />
<DiscreteIntersection />
<DefaultAnimationLoop/>
<Node name="LiverTriangles" gravity="0 -9.81 0" depend="topo dofs">
<EulerImplicitSolver name="cg_odesolver" printLog="0" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver template="GraphScattered" name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" />
<MeshOBJLoader name="meshLoader0" filename="mesh/liver-smooth.obj" />
<MeshTopology name="mesh" src="@meshLoader0" />
<MechanicalObject template="Vec3" name="dofs" />
<TriangleFEMForceField template="Vec3" youngModulus="1000" poissonRatio="0.3"/>
<UniformMass template="Vec3" name="mass" totalMass="0.5" />
<FixedProjectiveConstraint template="Vec3" name="FixedProjectiveConstraint" indices="3 39 64" />
<Node name="Visu" gravity="0 -9.81 0">
<MeshOBJLoader name="meshLoader_0" filename="mesh/liver-smooth.obj" handleSeams="1" />
<OglModel name="VisualModel" src="@meshLoader_0" material="Default Diffuse 1 1 0 0 1 Ambient 1 0.2 0 0 1 Specular 0 1 0 0 1 Emissive 0 1 0 0 1 Shininess 0 45" />
<BarycentricMapping template="Vec3,Vec3" name="visual mapping" input="@.." output="@VisualModel" />
</Node>
<Node name="Surf" gravity="0 -9.81 0">
<SphereLoader filename="mesh/liver.sph" />
<MechanicalObject position="@[-1].position" />
<SphereCollisionModel name="CollisionModel" listRadius="@[-2].listRadius" />
<BarycentricMapping name="sphere mapping" />
</Node>
</Node>
</Node>