Skip to content

Commit 9843409

Browse files
Lucas-TJLucas Burel
andauthored
[Examples] Clean xml examples from folder combo/miccai2013 (#11)
* [examples] Update scene * clean example from folder xml/combo * fix paths 200shellComputationAnevrism * remove comments + move LCPConstraintSolver * clean examples 30/04 * fix last commit * Delete doc/Vrst2013/vrst2013.pdf * Delete doc/VRIPHYS2012/vriphys2012.pdf --------- Co-authored-by: Lucas Burel <lucas.burel@inria.fr>
1 parent e13c01d commit 9843409

45 files changed

Lines changed: 2282 additions & 1148 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/xml/200shellComputationAnevrism.scn

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
<?xml version="1.0" ?>
2+
23
<Node name="root" dt="0.04" gravity="0 -10 0">
4+
<!-- List of plugins needed to load all components used by this scene -->
5+
<Node name="plugins">
6+
<RequiredPlugin name="Sofa.Component.AnimationLoop"/> <!-- Needed to use components [FreeMotionAnimationLoop] -->
7+
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint,FixedRotationProjectiveConstraint] -->
8+
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Solver"/> <!-- Needed to use components [LCPConstraintSolver] -->
9+
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
10+
<RequiredPlugin name="Sofa.Component.Engine.Transform"/> <!-- Needed to use components [Vertex2Frame] -->
11+
<RequiredPlugin name="Sofa.Component.LinearSolver.Direct"/> <!-- Needed to use components [SparseLDLSolver] -->
12+
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [PCGLinearSolver] -->
13+
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
14+
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] -->
15+
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
16+
<RequiredPlugin name="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
17+
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
18+
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TriangleSetTopologyContainer] -->
19+
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
20+
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] -->
21+
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
22+
<RequiredPlugin name="Shell"/>
23+
</Node>
24+
25+
326

427
<VisualStyle displayFlags="showForceFields showVisualModels" />
528

@@ -9,15 +32,21 @@
932
<!-- <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" />-->
1033
<!-- <CollisionGroup />-->
1134

35+
36+
<!--<DefaultAnimationLoop/>-->
37+
38+
<FreeMotionAnimationLoop computeBoundingBox="true"/>
39+
<LCPConstraintSolver/>
40+
1241
<Node name="CoarseMesh">
13-
<MeshObjLoader name="coarseMesh" filename="../mesh/aneurysm200.obj"/>
14-
<Vertex2Frame name="coarseMeshVertex2Frame" template="Rigid" position="@coarseMesh.position" normals="@coarseMesh.normals" invertNormals="false"/>
42+
<MeshOBJLoader name="coarseMesh" filename="../../../Shell/mesh/aneurysm200.obj"/>
43+
<Vertex2Frame name="coarseMeshVertex2Frame" template="Rigid3" position="@coarseMesh.position" normals="@coarseMesh.normals" invertNormals="false"/>
1544

1645
</Node>
1746

1847

1948
<Node name="TargetMesh">
20-
<MeshObjLoader name="targetMesh" filename="../mesh/aneurysmHighRes.obj"/>
49+
<MeshOBJLoader name="targetMesh" filename="../../../Shell/mesh/aneurysmHighRes.obj"/>
2150
<TriangleSetTopologyContainer name="targetTopo" src="@targetMesh" />
2251
<!-- <MechanicalObject name="targetMesh_MO" template="Vec3d"/> -->
2352
</Node>
@@ -27,22 +56,21 @@
2756
<Node name="Shell">
2857
<EulerImplicitSolver />
2958
<!--<CGLinearSolver iterations="20" tolerance="0.05" threshold="1e-20"/>-->
30-
31-
<PCGLinearSolver iterations="5" tolerance="0.05" preconditioners="Precond"/>
32-
<SparseLDLSolver name="Precond"/>
59+
<PCGLinearSolver iterations="5" tolerance="0.05" preconditioner="@Precond"/>
60+
<SparseLDLSolver name="Precond" template="CompressedRowSparseMatrixMat3x3"/>
3361

3462

3563
<TriangleSetTopologyContainer name="coarseTopo"
3664
position="@/CoarseMesh/coarseMesh.position"
3765
edges="@/CoarseMesh/coarseMesh.edges"
3866
triangles="@/CoarseMesh/coarseMesh.triangles" />
39-
<MechanicalObject name="coarseMesh_MO" template="Rigid" rest_position="@/CoarseMesh/coarseMeshVertex2Frame.frames" position="@/CoarseMesh/coarseMeshVertex2Frame.frames"/>
67+
<MechanicalObject name="coarseMesh_MO" template="Rigid3d" rest_position="@/CoarseMesh/coarseMeshVertex2Frame.frames" position="@/CoarseMesh/coarseMeshVertex2Frame.frames"/>
4068

41-
<UniformMass mass="0.3 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.03" compute_mapping_inertia="0" />
69+
<UniformMass vertexMass="0.3 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.03" compute_mapping_inertia="0" totalMass="1.0" />
4270

4371
<BoxConstraint box="-0.2 -1 -0.2 0.2 -0.8 0.2 0.4 0.3 -0.8 0.8 0.7 -0.7" />
4472

45-
<FixedRotationConstraint FixedZRotation="true" />
73+
<FixedRotationProjectiveConstraint template ="Rigid3" FixedZRotation="true" />
4674
<TriangularBendingFEMForceField name="FEM" bending="true"
4775
youngModulus="5000000" poissonRatio="0.45" thickness="0.05" />
4876

@@ -53,11 +81,11 @@
5381
<TriangleSetTopologyContainer name="subTrianglesTopo"
5482
position="@/TargetMesh/targetTopo.position" triangles="@/TargetMesh/targetTopo.triangles" />
5583
<MechanicalObject name="subCoarse_MO" rest_position="@/TargetMesh/targetTopo.position" />
56-
<BendingPlateMechanicalMapping printLog="1" object1="coarseMesh_MO" object2="subCoarse_MO" name="MappingShells" isMechanical="false"/>
84+
<BendingPlateMechanicalMapping printLog="1" input="@../coarseMesh_MO" output="@subCoarse_MO" name="MappingShells" isMechanical="false"/>
5785

58-
<Node>
86+
<Node name="Visu">
5987
<OglModel name="Visual" color="red"/>
60-
<IdentityMapping object1="subCoarse_MO" object2="Visual"/>
88+
<IdentityMapping input="@../subCoarse_MO" output="@Visual"/>
6189
</Node>
6290
</Node>
6391

examples/xml/400shellComputationAnevrism.scn

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,48 @@
11
<?xml version="1.0" ?>
2-
<Node name="root" dt="0.04" showBehaviorModels="0" showCollisionModels="0" showMappings="0" showForceFields="1" showBoundingTree="0" showVisualModels="1" gravity="0 -10 0">
3-
<!-- <CollisionPipeline verbose="0" />-->
2+
<Node name="root" dt="0.04" gravity="0 -10 0">
3+
<!--Node name="root" dt="0.04" showBehaviorModels="0" showCollisionModels="0" showMappings="0" showForceFields="1" showBoundingTree="0" showVisualModels="1" gravity="0 -10 0"-->
4+
5+
6+
<Node name="plugins">
7+
<RequiredPlugin name="Sofa.Component.AnimationLoop"/> <!-- Needed to use components [FreeMotionAnimationLoop] -->
8+
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint,FixedRotationProjectiveConstraint] -->
9+
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Solver"/> <!-- Needed to use components [LCPConstraintSolver] -->
10+
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
11+
<RequiredPlugin name="Sofa.Component.Engine.Transform"/> <!-- Needed to use components [Vertex2Frame] -->
12+
<RequiredPlugin name="Sofa.Component.LinearSolver.Direct"/> <!-- Needed to use components [SparseLDLSolver] -->
13+
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [PCGLinearSolver] -->
14+
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
15+
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] -->
16+
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
17+
<RequiredPlugin name="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
18+
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
19+
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TriangleSetTopologyContainer] -->
20+
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
21+
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] -->
22+
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
23+
<RequiredPlugin name="Shell"/>
24+
</Node>
25+
26+
27+
28+
29+
30+
31+
<!-- <CollisionPipeline verbose="0" />-->
432
<!-- <BruteForceDetection name="N2" />-->
533
<!-- <CollisionResponse response="default" />-->
634
<!-- <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" />-->
735
<!-- <CollisionGroup />-->
8-
36+
<FreeMotionAnimationLoop computeBoundingBox="true"/>
37+
<LCPConstraintSolver/>
938
<Node name="CoarseMesh">
10-
<MeshObjLoader name="coarseMesh" filename="../mesh/aneurysm400.obj"/>
11-
<Vertex2Frame name="coarseMeshVertex2Frame" template="Rigid" position="@coarseMesh.position" normals="@coarseMesh.normals" invertNormals="false"/>
39+
<MeshOBJLoader name="coarseMesh" filename="../../../Shell/mesh/aneurysm400.obj"/>
40+
<Vertex2Frame name="coarseMeshVertex2Frame" template="Rigid3" position="@coarseMesh.position" normals="@coarseMesh.normals" invertNormals="false"/>
1241
</Node>
1342

1443

1544
<Node name="TargetMesh">
16-
<MeshObjLoader name="targetMesh" filename="../mesh/aneurysmHighRes.obj"/>
45+
<MeshOBJLoader name="targetMesh" filename="../../../Shell/mesh/aneurysmHighRes.obj"/>
1746
<TriangleSetTopologyContainer name="targetTopo" src="@targetMesh"/>
1847
</Node>
1948

@@ -23,21 +52,21 @@
2352
<EulerImplicitSolver />
2453
<!--<CGLinearSolver iterations="20" tolerance="0.05" threshold="1e-20"/>-->
2554

26-
<PCGLinearSolver iterations="5" tolerance="0.05" preconditioners="Precond"/>
27-
<SparseLDLSolver name="Precond"/>
55+
<PCGLinearSolver iterations="5" tolerance="0.05" preconditioner="@Precond"/>
56+
<SparseLDLSolver name="Precond" template="CompressedRowSparseMatrixMat3x3"/>
2857

2958

3059
<TriangleSetTopologyContainer name="coarseTopo"
3160
position="@/CoarseMesh/coarseMesh.position"
3261
edges="@/CoarseMesh/coarseMesh.edges"
3362
triangles="@/CoarseMesh/coarseMesh.triangles" />
34-
<MechanicalObject name="coarseMesh_MO" template="Rigid" rest_position="@/CoarseMesh/coarseMeshVertex2Frame.frames" position="@/CoarseMesh/coarseMeshVertex2Frame.frames"/>
63+
<MechanicalObject name="coarseMesh_MO" template="Rigid3" rest_position="@/CoarseMesh/coarseMeshVertex2Frame.frames" position="@/CoarseMesh/coarseMeshVertex2Frame.frames"/>
3564

36-
<UniformMass mass="0.3 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.03" compute_mapping_inertia="0" />
65+
<UniformMass vertexMass="0.3 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.03" compute_mapping_inertia="0" />
3766

3867
<BoxConstraint box="-0.2 -1 -0.2 0.2 -0.8 0.2 0.4 0.3 -0.8 0.8 0.7 -0.7" />
3968

40-
<FixedRotationConstraint FixedZRotation="true" />
69+
<FixedRotationProjectiveConstraint FixedZRotation="true" />
4170
<TriangularBendingFEMForceField name="FEM" bending="true"
4271
youngModulus="5000000" poissonRatio="0.45" thickness="0.05" />
4372

@@ -48,11 +77,11 @@
4877
<TriangleSetTopologyContainer name="subTrianglesTopo"
4978
position="@/TargetMesh/targetTopo.position" triangles="@/TargetMesh/targetTopo.triangles" />
5079
<MechanicalObject name="subCoarse_MO" rest_position="@/TargetMesh/targetTopo.position" />
51-
<BendingPlateMechanicalMapping printLog="1" object1="coarseMesh_MO" object2="subCoarse_MO" name="MappingShells" isMechanical="false"/>
80+
<BendingPlateMechanicalMapping printLog="1" input="@../coarseMesh_MO" output="@subCoarse_MO" name="MappingShells" isMechanical="false"/>
5281

53-
<Node>
82+
<Node name="Visu">
5483
<OglModel name="Visual" color="red"/>
55-
<IdentityMapping object1="subCoarse_MO" object2="Visual"/>
84+
<IdentityMapping input="@../subCoarse_MO" output="@Visual"/>
5685
</Node>
5786
</Node>
5887

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,48 @@
11
<?xml version="1.0" ?>
22
<Node name="root" dt="0.04" gravity="0 -10 0">
33

4-
<VisualStyle displayFlags="showForceFields showVisualModels" />
4+
<Node name="plugins">
5+
<RequiredPlugin name="Sofa.Component.AnimationLoop"/> <!-- Needed to use components [FreeMotionAnimationLoop] -->
6+
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint,FixedRotationProjectiveConstraint] -->
7+
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Solver"/> <!-- Needed to use components [LCPConstraintSolver] -->
8+
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
9+
<RequiredPlugin name="Sofa.Component.Engine.Transform"/> <!-- Needed to use components [Vertex2Frame] -->
10+
<RequiredPlugin name="Sofa.Component.LinearSolver.Direct"/> <!-- Needed to use components [SparseLDLSolver] -->
11+
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [PCGLinearSolver] -->
12+
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
13+
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] -->
14+
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
15+
<RequiredPlugin name="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
16+
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
17+
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TriangleSetTopologyContainer] -->
18+
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
19+
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] -->
20+
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
21+
<RequiredPlugin name="Shell"/>
22+
</Node>
23+
24+
25+
26+
527

6-
<!-- <CollisionPipeline verbose="0" />-->
28+
29+
<!-- <CollisionPipeline verbose="0" />-->
730
<!-- <BruteForceDetection name="N2" />-->
831
<!-- <CollisionResponse response="default" />-->
932
<!-- <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" />-->
1033
<!-- <CollisionGroup />-->
11-
34+
<FreeMotionAnimationLoop computeBoundingBox="true"/>
35+
<LCPConstraintSolver/>
36+
1237
<Node name="CoarseMesh">
13-
<MeshObjLoader name="coarseMesh" filename="../mesh/aneurysm600.obj"/>
14-
<Vertex2Frame name="coarseMeshVertex2Frame" template="Rigid" position="@coarseMesh.position" normals="@coarseMesh.normals" invertNormals="false"/>
15-
38+
<MeshOBJLoader name="coarseMesh" filename="../../../Shell/mesh/aneurysm600.obj"/>
39+
<Vertex2Frame name="coarseMeshVertex2Frame" template="Rigid3" position="@coarseMesh.position" normals="@coarseMesh.normals" invertNormals="false"/>
1640
</Node>
1741

18-
42+
1943
<Node name="TargetMesh">
20-
<MeshObjLoader name="targetMesh" filename="../mesh/aneurysmHighRes.obj"/>
21-
<TriangleSetTopologyContainer name="targetTopo" src="@targetMesh" />
22-
<!-- <MechanicalObject name="targetMesh_MO" template="Vec3d"/> -->
44+
<MeshOBJLoader name="targetMesh" filename="../../../Shell/mesh/aneurysmHighRes.obj"/>
45+
<TriangleSetTopologyContainer name="targetTopo" src="@targetMesh"/>
2346
</Node>
2447

2548

@@ -28,21 +51,21 @@
2851
<EulerImplicitSolver />
2952
<!--<CGLinearSolver iterations="20" tolerance="0.05" threshold="1e-20"/>-->
3053

31-
<PCGLinearSolver iterations="5" tolerance="0.05" preconditioners="Precond"/>
32-
<SparseLDLSolver name="Precond"/>
54+
<PCGLinearSolver iterations="5" tolerance="0.05" preconditioner="@Precond"/>
55+
<SparseLDLSolver name="Precond" template="CompressedRowSparseMatrixMat3x3"/>
3356

3457

3558
<TriangleSetTopologyContainer name="coarseTopo"
3659
position="@/CoarseMesh/coarseMesh.position"
3760
edges="@/CoarseMesh/coarseMesh.edges"
3861
triangles="@/CoarseMesh/coarseMesh.triangles" />
39-
<MechanicalObject name="coarseMesh_MO" template="Rigid" rest_position="@/CoarseMesh/coarseMeshVertex2Frame.frames" position="@/CoarseMesh/coarseMeshVertex2Frame.frames"/>
62+
<MechanicalObject name="coarseMesh_MO" template="Rigid3" rest_position="@/CoarseMesh/coarseMeshVertex2Frame.frames" position="@/CoarseMesh/coarseMeshVertex2Frame.frames"/>
4063

41-
<UniformMass mass="0.3 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.03" compute_mapping_inertia="0" />
64+
<UniformMass vertexMass="0.3 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.03" compute_mapping_inertia="0" />
4265

4366
<BoxConstraint box="-0.2 -1 -0.2 0.2 -0.8 0.2 0.4 0.3 -0.8 0.8 0.7 -0.7" />
4467

45-
<FixedRotationConstraint FixedZRotation="true" />
68+
<FixedRotationProjectiveConstraint FixedZRotation="true" />
4669
<TriangularBendingFEMForceField name="FEM" bending="true"
4770
youngModulus="5000000" poissonRatio="0.45" thickness="0.05" />
4871

@@ -53,13 +76,13 @@
5376
<TriangleSetTopologyContainer name="subTrianglesTopo"
5477
position="@/TargetMesh/targetTopo.position" triangles="@/TargetMesh/targetTopo.triangles" />
5578
<MechanicalObject name="subCoarse_MO" rest_position="@/TargetMesh/targetTopo.position" />
56-
<BendingPlateMechanicalMapping printLog="1" object1="coarseMesh_MO" object2="subCoarse_MO" name="MappingShells" isMechanical="false"/>
79+
<BendingPlateMechanicalMapping printLog="1" input="@../coarseMesh_MO" output="@subCoarse_MO" name="MappingShells" isMechanical="false"/>
5780

58-
<Node>
81+
<Node name="Visu">
5982
<OglModel name="Visual" color="red"/>
60-
<IdentityMapping object1="subCoarse_MO" object2="Visual"/>
83+
<IdentityMapping input="@../subCoarse_MO" output="@Visual"/>
6184
</Node>
6285
</Node>
6386

6487
</Node>
65-
</Node>
88+
</Node>

0 commit comments

Comments
 (0)