|
| 1 | +<?xml version="1.0"?> |
| 2 | +<Node name="Root" gravity="0 0 0" > |
| 3 | + |
| 4 | + <Node name="plugins"> |
| 5 | + <RequiredPlugin name="Shell"/> |
| 6 | + <RequiredPlugin name="Sofa.Component.AnimationLoop"/> <!-- Needed to use components [FreeMotionAnimationLoop] --> |
| 7 | + <RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase,BruteForceBroadPhase,BruteForceDetection,CollisionPipeline] --> |
| 8 | + <RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] --> |
| 9 | + <RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] --> |
| 10 | + <RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Solver"/> <!-- Needed to use components [LCPConstraintSolver] --> |
| 11 | + <RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] --> |
| 12 | + <RequiredPlugin name="Sofa.Component.Engine.Transform"/> <!-- Needed to use components [TransformEngine] --> |
| 13 | + <RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] --> |
| 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.GL.Component.Rendering2D"/> <!-- Needed to use components [OglColorMap] --> |
| 18 | + <RequiredPlugin name="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] --> |
| 19 | + <RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TriangularFEMForceField] --> |
| 20 | + <RequiredPlugin name="Sofa.Component.SolidMechanics.Spring"/> <!-- Needed to use components [RestShapeSpringsForceField] --> |
| 21 | + <RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] --> |
| 22 | + <RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TriangleSetGeometryAlgorithms,TriangleSetTopologyContainer,TriangleSetTopologyModifier] --> |
| 23 | + <RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [TriangleCollisionModel] --> |
| 24 | + <RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] --> |
| 25 | + <RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [DataDisplay,OglModel] --> |
| 26 | + <RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] --> |
| 27 | + </Node> |
| 28 | + |
| 29 | + <DefaultAnimationLoop/> |
| 30 | + <!--FreeMotionAnimationLoop/--> <!-- Je ne sais pas pourquoi mais lorsque j'utilise FreeMotionAnimationLoop, l'animation ne fonction plus... |
| 31 | + Alors que je souhaite utiliser FreeMotionAnimationLoop pour que ça soit plus réaliste que DefaultAnimationLoop--> |
| 32 | + <!--LCPConstraintSolver tolerance="1e-3" maxIt="1000"/--> |
| 33 | + <VisualStyle displayFlags="showBehavior" /> |
| 34 | + <!--<AdaptiveCuttingSetting button="Left" /--> |
| 35 | + |
| 36 | + <CollisionPipeline verbose="0"/> |
| 37 | + <BruteForceBroadPhase name="N2" /> |
| 38 | + <BVHNarrowPhase/> |
| 39 | + <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" /> |
| 40 | + <CollisionResponse name="Response" response="PenaltyContactForceField" /> |
| 41 | + |
| 42 | + <Node name="points"> |
| 43 | + <MechanicalObject template="Vec3d" name="fixedPoints" |
| 44 | + position="-1.2 -1 0 -1.2 1 0" |
| 45 | + showObject="true" /> |
| 46 | + <FixedProjectiveConstraint indices="0 1" /> |
| 47 | + </Node> |
| 48 | + |
| 49 | + <Node name="Mesh"> |
| 50 | + |
| 51 | + <EulerImplicitSolver rayleighMass="1" rayleighStiffness="1" /> |
| 52 | + <CGLinearSolver iterations="100" tolerance="1e-15" threshold="1e-15"/> |
| 53 | + |
| 54 | + <MeshOBJLoader name="mesh" filename="../../mesh/plane128.obj"/> |
| 55 | + <TriangleSetTopologyContainer name="topo" src="@mesh" /> |
| 56 | + |
| 57 | + <MechanicalObject template="Vec3d" name="MO" /> |
| 58 | + <UniformMass totalMass="0.1" /> |
| 59 | + |
| 60 | + <AdaptiveCuttingController template="Vec3d" /> |
| 61 | + <Test2DAdapter template="Vec3d" name="adapter" sigma="1e-5" /> |
| 62 | + |
| 63 | + <TriangleSetTopologyModifier /> |
| 64 | + <!--<TriangleSetTopologyContainer />--> |
| 65 | + <TriangleSetGeometryAlgorithms /> |
| 66 | + |
| 67 | + <FixedProjectiveConstraint indices="0 1" /> |
| 68 | + |
| 69 | + <RestShapeSpringsForceField name="Springs" external_rest_shape="@../points/fixedPoints" |
| 70 | + points="2 3" |
| 71 | + external_points="1 0" |
| 72 | + stiffness="50000" |
| 73 | + angularStiffness="50000" /> |
| 74 | + |
| 75 | + |
| 76 | + <TriangularFEMForceField name="FEM" youngModulus="5000" poissonRatio="0.3" method="large" /> |
| 77 | + |
| 78 | + <!-- |
| 79 | + <Point /> |
| 80 | + <Line /> |
| 81 | + --> |
| 82 | + <TriangleCollisionModel /> |
| 83 | + |
| 84 | + <Node name="Render"> |
| 85 | + <OglModel name="Visual" color="#90EE90"/> |
| 86 | + <IdentityMapping input="@.." output="@Visual"/> |
| 87 | + </Node> |
| 88 | + |
| 89 | + <Node name="Render wire"> |
| 90 | + <VisualStyle displayFlags="showWireframe" /> |
| 91 | + <OglModel name="Visual" color="#BC8F8F" depthTest="false" /> |
| 92 | + <IdentityMapping input="@.." output="@Visual"/> |
| 93 | + </Node> |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + <Node name="Rest state"> |
| 98 | + <TriangleSetTopologyContainer name="topo" points="@../topo.points" edges="@../topo.edges" triangles="@../topo.triangles" /> |
| 99 | + <TransformEngine name="transform" template="Vec3d" translation="2.5 0 0" input_position="@../MO.rest_position" /> |
| 100 | + <MechanicalObject template="Vec3d" rest_position="@transform.output_position" position="@transform.output_position" /> |
| 101 | + |
| 102 | + <Node name="Data"> |
| 103 | + <DataDisplay cellData="@../../adapter.functionals" /> |
| 104 | + <OglColorMap colorScheme="Green" /> |
| 105 | + <IdentityMapping input="@.." output="@."/> |
| 106 | + </Node> |
| 107 | + |
| 108 | + <!-- |
| 109 | + <Node name="Render wire"> |
| 110 | + <VisualStyle displayFlags="showWireframe" /> |
| 111 | + <OglModel name="Visual" color="white" depthTest="false" /> |
| 112 | + <IdentityMapping input="@.." output="@Visual"/> |
| 113 | + </Node> |
| 114 | + --> |
| 115 | + </Node> |
| 116 | + <!-- |
| 117 | + --> |
| 118 | + |
| 119 | + |
| 120 | + </Node> |
| 121 | +</Node> |
0 commit comments