-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathliver2-cut-CUDA.scn
68 lines (57 loc) · 4.75 KB
/
liver2-cut-CUDA.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" ?>
<Node name="root" dt="0.03" showBoundingTree="0" gravity="0 -9.8 0">
<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline] -->
<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] -->
<RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [TriangleCollisionModel] -->
<RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [DefaultContactManager] -->
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedConstraint] -->
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshGmshLoader] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass] -->
<RequiredPlugin name="Sofa.Component.MechanicalLoad"/> <!-- Needed to use components [PlaneForceField] -->
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin name="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
<RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedronFEMForceField] -->
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TetrahedronSetGeometryAlgorithms, TetrahedronSetTopologyContainer, TetrahedronSetTopologyModifier, TriangleSetGeometryAlgorithms, TriangleSetTopologyContainer, TriangleSetTopologyModifier] -->
<RequiredPlugin name="Sofa.Component.Topology.Mapping"/> <!-- Needed to use components [Tetra2TriangleTopologicalMapping] -->
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
<RequiredPlugin name="MeshRefinement"/>
<RequiredPlugin name="SofaCUDA"/>
<DefaultPipeline />
<DefaultVisualManagerLoop />
<DefaultAnimationLoop />
<BruteForceBroadPhase/>
<BVHNarrowPhase/>
<DefaultContactManager response="PenalityContactForceField" />
<MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" />
<Node name="LiverVolume">
<EulerImplicitSolver name="cg_odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="1.0" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<MeshGmshLoader name="loader" filename="./mesh/liver2.msh" scale3d="5 5 5" rotation="150 0 0" translation="3.2 7 0"/>
<MechanicalObject src="@loader" name="Volume" template="CudaVec3f" />
<TetrahedronSetTopologyContainer name="TetraContainer" position="@Volume.position" src="@loader" tags=" "/>
<TetrahedronSetTopologyModifier name="Modifier" />
<TetrahedronSetGeometryAlgorithms name="GeomAlgo" template="CudaVec3f" drawTetrahedra="0" drawScaleTetrahedra="0.7"/>
<DiagonalMass massDensity="4.0" />
<BoxROI template="Vec3d" box="-1 6 -0.5 1 7 1.5" drawBoxes="1" position="@Volume.rest_position" name="FixedROI"/>
<FixedConstraint indices="@FixedROI.indices" />
<TetrahedronFEMForceField name="FEM" template="CudaVec3f" youngModulus="3000" poissonRatio="0.3" method="large" />
<TetrahedronCuttingController name="ACutting" template="CudaVec3f" listening="1" printLog="0" methodToTest="1"
cutPointA="3.1 6 -2" cutPointB="3.1 6 2" cutDir="0 1 0" cutDepth="3" drawDebugCut="0" />
<PlaneForceField normal="0 1 0" d="-5 " stiffness="100000" showPlane="1" showPlaneSize="20"/>
<Node name="LiverSurface">
<TriangleSetTopologyContainer name="TriContainer" fileTopology="" tags=" " />
<TriangleSetTopologyModifier name="Modifier" />
<TriangleSetGeometryAlgorithms name="GeomAlgo" template="CudaVec3f" />
<Tetra2TriangleTopologicalMapping input="@../TetraContainer" output="@TriContainer" />
<TriangleCollisionModel />
<Node name="LiverVisu">
<OglModel name="Visual" color="red" />
<IdentityMapping input="@../../Volume" output="@Visual" />
</Node>
</Node>
</Node>
</Node>