|
1 | | -<Node name="root" dt="0.01" gravity="0 -10 0" showBehaviorModels="1" showCollisionModels="1"> |
| 1 | +<?xml version="1.0"?> |
| 2 | +<Node name="root" dt="0.01" gravity="0 -10 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.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] --> |
| 8 | + <RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] --> |
| 9 | + <RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] --> |
| 10 | + <RequiredPlugin name="Sofa.Component.LinearSolver.Direct"/> <!-- Needed to use components [SparseLDLSolver] --> |
| 11 | + <RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] --> |
| 12 | + <RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] --> |
| 13 | + <RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] --> |
| 14 | + <RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] --> |
| 15 | + <RequiredPlugin name="Sofa.Component.Topology.Container.Constant"/> <!-- Needed to use components [MeshTopology] --> |
| 16 | + <RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] --> |
| 17 | + <RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] --> |
| 18 | + <RequiredPlugin name="Sofa.GUI.Component"/> <!-- Needed to use components [AttachBodyButtonSetting] --> |
| 19 | + <RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [TriangleCollisionModel] --> |
| 20 | + <RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] --> |
| 21 | + <RequiredPlugin name="Sofa.Component.MechanicalLoad"/> <!-- Needed to use components [ConstantForceField] --> |
| 22 | + <RequiredPlugin name="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] --> |
| 23 | + <RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TriangleSetTopologyContainer] --> |
| 24 | + <RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase,BruteForceBroadPhase,CollisionPipeline] --> |
| 25 | + <RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] --> |
| 26 | + <RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] --> |
| 27 | + <RequiredPlugin name="Sofa.Component.Engine.Transform"/> <!-- Needed to use components [Vertex2Frame] --> |
| 28 | + <RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [BeamFEMForceField] --> |
| 29 | + </Node> |
| 30 | + |
| 31 | + <VisualStyle displayFlags="showBehaviorModels showCollisionModels"/> |
| 32 | + <DefaultAnimationLoop/> |
2 | 33 | <!-- <MasterContactSolver name="MasterSolver" maxIt="5000" tolerance="0.00000001" displayTime="true" printLog="0" mu="0.1"/>--> |
3 | 34 | <CollisionPipeline verbose="0" /> |
4 | | - <BruteForceDetection name="N2" /> |
5 | | - <CollisionResponse /> |
| 35 | + <BruteForceBroadPhase name="N2"/> |
| 36 | + <BVHNarrowPhase/> |
| 37 | + <CollisionResponse name="response" response="PenaltyContactForceField" /> |
6 | 38 | <MinProximityIntersection name="Proximity" alarmDistance="0.005" contactDistance="0.001"/> |
7 | | - <CollisionGroup /> |
| 39 | + |
8 | 40 |
|
9 | 41 | <Node name="pointA"> |
10 | | - <MechanicalObject template="Rigid" name="fixedPoint" position="-0.03 0 0 0 0 0 1"/> |
| 42 | + <MechanicalObject template="Rigid3" name="fixedPoint" position="-0.03 0 0 0 0 0 1"/> |
11 | 43 | </Node> |
12 | 44 |
|
13 | 45 |
|
|
18 | 50 | <MechanicalObject name="ArticulatedObject" template="Vec1d"/> |
19 | 51 | <Node name="6D_DOFs1"> |
20 | 52 |
|
21 | | - <MechanicalObject name="6D_Dof" template="Rigid"/> |
22 | | - <UniformMass totalmass="1" showAxisSizeFactor="0.001"/> |
23 | | - <ArticulatedSystemMapping object1="ArticulatedObject" object2="6D_Dof"/> |
| 53 | + <MechanicalObject name="6D_Dof" template="Rigid3"/> |
| 54 | + <UniformMass totalMass="1" showAxisSizeFactor="0.001"/> |
| 55 | + <ArticulatedSystemMapping input1="@../ArticulatedObject" output="@6D_Dof"/> |
24 | 56 | </Node> |
25 | 57 | <ArticulatedHierarchyContainer filename="BeamMotionInTube.bvh"/> |
26 | 58 | <ArticulatedHierarchyBVHController /> |
27 | 59 | </Node> |
28 | 60 |
|
29 | 61 |
|
30 | | - |
31 | | - |
32 | | - |
33 | 62 | <Node name="Beam"> |
34 | | - <EulerImplicit rayleighStiffness="0" printLog="false" /> |
| 63 | + <EulerImplicitSolver rayleighStiffness="0" printLog="false" /> |
35 | 64 | <!-- <BTDLinearSolver template="NewMatBand" bandWidth="11" printLog="false" verbose="false" />--> |
36 | | - <SparseLDLSolver name="SparseLDL Solver" printLog="false" /> |
37 | | - <MechanicalObject template="Rigid" name="DOFs" position="-0.03 0 0 0 0 0 1 -0.02 0 0 0 0 0 1 -0.01 0 0 0 0 0 1 0 0 0 0 0 0 1 0.01 0 0 0 0 0 1 0.02 0 0 0 0 0 1 0.03 0 0 0 0 0 1 0.04 0 0 0 0 0 1" /> |
38 | | - <Mesh name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7" /> |
39 | | - |
40 | | - <AttachConstraint name="Constraint" object2="DOFs" object1="pointA/fixedPoint" indices1="0" indices2="0" freeRotations="false" /> |
41 | | - <UniformMass mass="0.5 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.1 ]" totalMass="0.2" showAxisSizeFactor="0.01" printLog="false" /> |
| 65 | + <SparseLDLSolver name="SparseLDL Solver" printLog="false" template="CompressedRowSparseMatrixd"/> |
| 66 | + <MechanicalObject template="Rigid3" name="DOFs" position="-0.03 0 0 0 0 0 1 -0.02 0 0 0 0 0 1 -0.01 0 0 0 0 0 1 0 0 0 0 0 0 1 0.01 0 0 0 0 0 1 0.02 0 0 0 0 0 1 0.03 0 0 0 0 0 1 0.04 0 0 0 0 0 1" /> |
| 67 | + <MeshTopology name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7" /> |
| 68 | + <!--<AttachProjectiveConstraint name="Constraint" object2="@DOFs" object1="@/pointA/fixedPoint" indices1="0" indices2="0" freeRotations="false" />--> |
| 69 | + <FixedProjectiveConstraint indices="0"/> |
| 70 | + <UniformMass vertexMass="0.5 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.1 ]" showAxisSizeFactor="0.01" printLog="false" /> |
42 | 71 | <BeamFEMForceField name="FEM" radius="0.01" youngModulus="1e6" /> |
43 | 72 |
|
44 | 73 | <!-- <RestShapeSpringsForceField points="7" stiffness="1e6" angularStiffness="1e6" external_rest_shape="../Motion/6D_DOFs1/6D_Dof" external_points="1"/>--> |
|
47 | 76 | <!-- <CubeTopology nx="2" ny="15" nz="2" min="0.001 -0.03 -0.001" max="-0.001 0.04 0.001" />--> |
48 | 77 | <!-- <MechanicalObject />--> |
49 | 78 | <!-- <BeamLinearMapping isMechanical="true" localCoord="false"/>--> |
50 | | -<!-- <Triangle />--> |
| 79 | +<!-- <TriangleCollisionModel />--> |
51 | 80 | <!-- </Node>--> |
52 | 81 | <Node name="Collision"> |
53 | 82 | <CubeTopology nx="15" ny="2" nz="2" min="0 -0.1 -0.1" max="7 0.1 0.1" /> |
54 | 83 | <MechanicalObject /> |
55 | 84 | <BeamLinearMapping isMechanical="true" localCoord="true"/> |
56 | | - <Triangle contactStiffness="1e4" bothSide="1"/> |
57 | | - <Line contactStiffness="1e4" bothSide="1"/> |
58 | | - <Point contactStiffness="1e4" bothSide="1"/> |
| 85 | + <TriangleCollisionModel contactStiffness="1e4" bothSide="1"/> |
| 86 | + <LineCollisionModel contactStiffness="1e4" bothSide="1"/> |
| 87 | + <PointCollisionModel contactStiffness="1e4" bothSide="1"/> |
59 | 88 | </Node> |
60 | 89 | </Node> |
61 | 90 |
|
62 | 91 |
|
63 | 92 |
|
64 | 93 |
|
65 | 94 | <Node name="Rest_colon"> |
66 | | - <MeshLoader name="rest_shape" filename="applications/plugins/shells/mesh/fake_colon.obj"/> |
67 | | - <Mesh/> |
68 | | - <Vertex2Frame name="RestVertex2Frame" template="Rigid" invertNormals="false" vertices="@rest_shape.vertices" normals="@rest_shape.normals" /> |
| 95 | + <MeshOBJLoader name="rest_shape" filename="../../../Shell/mesh/fake_colon.obj"/> |
| 96 | + <MeshTopology/> |
| 97 | + <Vertex2Frame name="RestVertex2Frame" template="Rigid3" invertNormals="false" position="@rest_shape.position" normals="@rest_shape.normals" /> |
69 | 98 | </Node> |
70 | 99 |
|
71 | 100 |
|
72 | 101 | <Node name="Fake_colon" activated="true"> |
73 | 102 | <EulerImplicitSolver/> |
74 | 103 | <CGLinearSolver iterations="100" tolerance="1e-15" threshold="1e-15"/> |
75 | | - <TriangleSetTopologyContainer name="trianglesTopo" filename="applications/plugins/shells/mesh/fake_colon.obj"/> |
76 | | - <MechanicalObject name="colon" template="Rigid" debugViewIndices="false" debugViewIndicesScale="0.0003" position="@../Rest_colon/RestVertex2Frame.frames" /> |
| 104 | + <MeshOBJLoader name="loader" filename="../../../Shell/mesh/fake_colon.obj" /> |
| 105 | + <TriangleSetTopologyContainer name="trianglesTopo" src="@loader"/> |
| 106 | + <MechanicalObject name="colon" template="Rigid3" showIndices="false" showIndicesScale="0.0003" position="@../Rest_colon/RestVertex2Frame.frames" topology="@trianglesTopo"/> |
77 | 107 |
|
78 | | - <UniformMass mass="0.1 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.003" totalmass="3" /> |
| 108 | + <UniformMass showAxisSizeFactor="0.003" totalMass="3" /> |
79 | 109 |
|
80 | 110 | <BoxROI name="box1" box="-0.065 -0.03 -0.03 -0.06 0.03 0.03" drawSize="0"/> |
81 | | - <FixedConstraint indices="@box1.indices" drawSize="0"/> |
| 111 | + <FixedProjectiveConstraint indices="@box1.indices" drawSize="0"/> |
82 | 112 | <BoxROI name="box2" box="0.06 -0.03 -0.03 0.065 0.03 0.03" drawSize="0"/> |
83 | | - <FixedConstraint indices="@box2.indices" drawSize="0"/> |
| 113 | + <FixedProjectiveConstraint indices="@box2.indices" drawSize="0"/> |
84 | 114 |
|
85 | | - <FixedRotationConstraint FixedZRotation="true"/> |
| 115 | + <FixedRotationProjectiveConstraint FixedZRotation="true"/> |
86 | 116 | <TriangularBendingFEMForceField name="FEM" bending="true" youngModulus="1e5" poissonRatio="0.42" thickness="0.001" /> |
87 | 117 |
|
88 | 118 | <Node name="SubTriangles"> |
89 | 119 | <TriangleSetTopologyContainer name="subTrianglesTopo"/> |
90 | | - <TriangleSubdivisionTopologicalMapping object1="trianglesTopo" object2="subTrianglesTopo" subdivisions="1"/> |
91 | | - <MechanicalObject name="subPoints" /> |
92 | | - <BendingPlateMechanicalMapping /> |
93 | | - <Triangle contactStiffness="1e4" bothSide="1"/> |
94 | | - <Line contactStiffness="1e4" bothSide="1"/> |
95 | | - <Point contactStiffness="1e4" bothSide="1"/> |
| 120 | + <!--<TriangleSubdivisionTopologicalMapping object1="trianglesTopo" object2="subTrianglesTopo" subdivisions="1"/>--> |
| 121 | + <MechanicalObject name="subPoints" topology="@subTrianglesTopo"/> |
| 122 | + <BendingPlateMechanicalMapping input="@../colon" output="@subPoints"/> |
| 123 | + <TriangleCollisionModel contactStiffness="1e4" bothSide="1"/> |
| 124 | + <LineCollisionModel contactStiffness="1e4" bothSide="1"/> |
| 125 | + <PointCollisionModel contactStiffness="1e4" bothSide="1"/> |
96 | 126 | <Node name="visual"> |
97 | 127 | <OglModel name="Visual" color="red"/> |
98 | | - <IdentityMapping object1="subPoints" object2="Visual"/> |
| 128 | + <IdentityMapping input="@../subPoints" output="@Visual"/> |
99 | 129 | </Node> |
100 | 130 | </Node> |
101 | 131 |
|
|
0 commit comments