|
1 | 1 | <?xml version="1.0"?> |
2 | | -<Node name="root" dt="0.02" showBehaviorModels="1" showCollisionModels="0" showMappings="0" showForceFields="1" showBoundingTree="0" showVisualModels="1" gravity="0 0 0"> |
| 2 | +<Node name="root" dt="0.02" gravity="0 0 0"> |
| 3 | + <Node name="plugins"> |
| 4 | + <RequiredPlugin name="Shell"/> |
| 5 | + <RequiredPlugin name="Sofa.Component.AnimationLoop"/> <!-- Needed to use components [FreeMotionAnimationLoop] --> |
| 6 | + <RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase,BruteForceBroadPhase,CollisionPipeline] --> |
| 7 | + <RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] --> |
| 8 | + <RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] --> |
| 9 | + <RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint,FixedRotationProjectiveConstraint] --> |
| 10 | + <RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] --> |
| 11 | + <RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] --> |
| 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.SolidMechanics.Spring"/> <!-- Needed to use components [RestShapeSpringsForceField] --> |
| 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.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] --> |
| 21 | + <RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [TriangleCollisionModel] --> |
| 22 | + <RequiredPlugin name="Sofa.Component.Engine.Generate"/> <!-- Needed to use components [NormalsFromPoints] --> |
| 23 | + |
| 24 | + </Node> |
| 25 | + <VisualStyle displayFlags="showBehaviorModels showForceFields showVisualsModels"/> |
| 26 | + <DefaultAnimationLoop/> |
3 | 27 | <CollisionPipeline verbose="0"/> |
4 | | - <BruteForceDetection name="N2"/> |
5 | | - <CollisionResponse response="default"/> |
| 28 | + <BruteForceBroadPhase name="N2"/> |
| 29 | + <BVHNarrowPhase/> |
| 30 | + <CollisionResponse name="Response" response="PenaltyContactForceField"/> |
6 | 31 | <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5"/> |
7 | | - <CollisionGroup/> |
| 32 | + |
8 | 33 |
|
9 | 34 | <Node name="points"> |
10 | | - <MechanicalObject template="Rigid" name="fixedPoints" |
| 35 | + <MechanicalObject template="Rigid3" name="fixedPoints" |
11 | 36 | position="0.5 0.9 1 0.3856834 0 0 0.9238795" |
12 | 37 | showObject="true" /> |
13 | | - <FixedConstraint indices="0" /> |
| 38 | + <FixedProjectiveConstraint indices="0" /> |
14 | 39 | </Node> |
15 | 40 |
|
16 | 41 | <Node name="shell"> |
17 | 42 | <EulerImplicitSolver/> |
18 | 43 | <CGLinearSolver iterations="100" tolerance="1e-15" threshold="1e-15"/> |
19 | 44 | <!-- <SparseLDLSolver name="SparseLDL Solver" printLog="false" />--> |
20 | | - <TriangleSetTopologyContainer name="trianglesTopo" filename="applications/plugins/shells/mesh/oneTriangle.obj"/> |
| 45 | + <MeshOBJLoader name="loader" filename="../../../Shell/mesh/oneTriangle.obj"/> |
| 46 | + <TriangleSetTopologyContainer name="trianglesTopo" src="@loader"/> |
21 | 47 |
|
22 | 48 | <!-- No rotation - flat rest position --> |
23 | | -<!-- <MechanicalObject name="tri" template="Rigid" />--> |
| 49 | +<!-- <MechanicalObject name="tri" template="Rigid3" />--> |
24 | 50 |
|
25 | 51 | <!-- No rotation - deformed rest position --> |
26 | | -<!-- <MechanicalObject name="tri" template="Rigid" rest_position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0.107456 0 0 0.99421" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0.107456 0 0 0.99421"/>--> |
| 52 | +<!-- <MechanicalObject name="tri" template="Rigid3" rest_position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0.107456 0 0 0.99421" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0.107456 0 0 0.99421"/>--> |
27 | 53 |
|
28 | 54 | <!-- Rotation of Pi/2 around z --> |
29 | | -<!-- <MechanicalObject name="tri" template="Rigid" rest_position="0 0 0 0 0 0.707107 0.707107 1 0 0 0 0 0.707107 0.707107 0.5 0.9 0 0 0 0.707107 0.707107" position="0 0 0 0 0 0.707107 0.707107 1 0 0 0 0 0.707107 0.707107 0.5 0.9 0 0 0 0.707107 0.707107"/>--> |
| 55 | +<!-- <MechanicalObject name="tri" template="Rigid3" rest_position="0 0 0 0 0 0.707107 0.707107 1 0 0 0 0 0.707107 0.707107 0.5 0.9 0 0 0 0.707107 0.707107" position="0 0 0 0 0 0.707107 0.707107 1 0 0 0 0 0.707107 0.707107 0.5 0.9 0 0 0 0.707107 0.707107"/>--> |
30 | 56 |
|
31 | 57 | <!-- Rotation of Pi/2 around z + torque on vertex 2 around local x --> |
32 | | -<!-- <MechanicalObject name="tri" template="Rigid" rest_position="0 0 0 0 0 0.707629 0.706586 1 0 0 0 0 0.707629 0.706586 0.5 0.9 0 0.0783006 -0.0735901 0.680883 0.724466" position="0 0 0 0 0 0.707629 0.706586 1 0 0 0 0 0.707629 0.706586 0.5 0.9 0 0.0783006 -0.0735901 0.680883 0.724466"/>--> |
| 58 | +<!-- <MechanicalObject name="tri" template="Rigid3" rest_position="0 0 0 0 0 0.707629 0.706586 1 0 0 0 0 0.707629 0.706586 0.5 0.9 0 0.0783006 -0.0735901 0.680883 0.724466" position="0 0 0 0 0 0.707629 0.706586 1 0 0 0 0 0.707629 0.706586 0.5 0.9 0 0.0783006 -0.0735901 0.680883 0.724466"/>--> |
33 | 59 |
|
34 | 60 | <!-- Rotation of Pi/2 around z + displacement on vertex 2 along z --> |
35 | | - <MechanicalObject name="tri" template="Rigid" rest_position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0 0 0 1" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0 0 0 1"/> |
| 61 | + <MechanicalObject name="tri" template="Rigid3" topology="@trianglesTopo" rest_position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0 0 0 1" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0 0 0 1"/> |
36 | 62 |
|
37 | 63 |
|
38 | | - <UniformMass mass="0.1 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.2" totalmass="1"/> |
39 | | - <FixedConstraint indices="0 1" drawSize="0"/> |
| 64 | + <UniformMass vertexMass="0.1 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.2" /> |
| 65 | + <FixedProjectiveConstraint indices="0 1" drawSize="0"/> |
40 | 66 |
|
41 | | - <RestShapeSpringsForceField template="Rigid" name="Springs" external_rest_shape="../points/fixedPoints" |
| 67 | + <RestShapeSpringsForceField template="Rigid3" name="Springs" external_rest_shape="@../points/fixedPoints" |
42 | 68 | points="2" |
43 | 69 | external_points="0" |
44 | 70 | stiffness="50000" |
45 | 71 | angularStiffness="50000" /> |
46 | 72 |
|
47 | 73 |
|
48 | | - <FixedRotationConstraint FixedZRotation="true"/> |
| 74 | + <FixedRotationProjectiveConstraint FixedZRotation="true"/> |
49 | 75 | <TriangularBendingFEMForceField name="FEM" bending="true" youngModulus="20000" poissonRatio="0.45" thickness="0.1"/> |
50 | 76 |
|
51 | 77 | <Node name="SubTriangles"> |
52 | | - <TriangleSetTopologyContainer name="subTrianglesTopo"/> |
53 | | - <TriangleSubdivisionTopologicalMapping object1="trianglesTopo" object2="subTrianglesTopo" subdivisions="3"/> |
54 | | - <MechanicalObject name="subPoints"/> |
| 78 | + <MeshOBJLoader name="loader" filename="../../../Shell/mesh/oneTriangle.obj"/> |
| 79 | + <TriangleSetTopologyContainer name="subTrianglesTopo" src="@loader"/> |
| 80 | +<!-- <TriangleSubdivisionTopologicalMapping object1="trianglesTopo" object2="subTrianglesTopo" subdivisions="3"/> |
| 81 | +--> <MechanicalObject name="subPoints" topology="@subTrianglesTopo"/> |
55 | 82 | <BendingPlateMechanicalMapping input="@../tri" output="@subPoints"/> |
56 | | - <Triangle contactStiffness="0.001"/> |
57 | | - <Node> |
| 83 | + <TriangleCollisionModel contactStiffness="0.001"/> |
| 84 | + <Node name="visual"> |
58 | 85 | <OglModel name="Visual" color="red"/> |
59 | 86 | <IdentityMapping input="@../subPoints" output="@Visual"/> |
60 | 87 | </Node> |
|
66 | 93 | <EulerImplicitSolver/> |
67 | 94 | <CGLinearSolver iterations="100" tolerance="1e-15" threshold="1e-15"/> |
68 | 95 | <!-- <SparseLDLSolver name="SparseLDL Solver" printLog="false" />--> |
69 | | - <TriangleSetTopologyContainer name="trianglesTopo" filename="applications/plugins/shells/mesh/oneTriangle.obj"/> |
| 96 | + <MeshOBJLoader name="loader" filename="../../../Shell/mesh/oneTriangle.obj"/> |
| 97 | + <TriangleSetTopologyContainer name="trianglesTopo" src="@loader"/> |
70 | 98 |
|
71 | 99 | <!-- No rotation - flat rest position --> |
72 | | -<!-- <MechanicalObject name="tri" template="Rigid" />--> |
| 100 | +<!-- <MechanicalObject name="tri" template="Rigid3" />--> |
73 | 101 |
|
74 | 102 | <!-- No rotation - deformed rest position --> |
75 | | -<!-- <MechanicalObject name="tri" template="Rigid" rest_position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0.107456 0 0 0.99421" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0.107456 0 0 0.99421"/>--> |
| 103 | +<!-- <MechanicalObject name="tri" template="Rigid3" rest_position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0.107456 0 0 0.99421" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0.107456 0 0 0.99421"/>--> |
76 | 104 |
|
77 | 105 | <!-- Rotation of Pi/2 around z --> |
78 | | -<!-- <MechanicalObject name="tri" template="Rigid" rest_position="0 0 0 0 0 0.707107 0.707107 1 0 0 0 0 0.707107 0.707107 0.5 0.9 0 0 0 0.707107 0.707107" position="0 0 0 0 0 0.707107 0.707107 1 0 0 0 0 0.707107 0.707107 0.5 0.9 0 0 0 0.707107 0.707107"/>--> |
| 106 | +<!-- <MechanicalObject name="tri" template="Rigid3" rest_position="0 0 0 0 0 0.707107 0.707107 1 0 0 0 0 0.707107 0.707107 0.5 0.9 0 0 0 0.707107 0.707107" position="0 0 0 0 0 0.707107 0.707107 1 0 0 0 0 0.707107 0.707107 0.5 0.9 0 0 0 0.707107 0.707107"/>--> |
79 | 107 |
|
80 | 108 | <!-- Rotation of Pi/2 around z + torque on vertex 2 around local x --> |
81 | | -<!-- <MechanicalObject name="tri" template="Rigid" rest_position="0 0 0 0 0 0.707629 0.706586 1 0 0 0 0 0.707629 0.706586 0.5 0.9 0 0.0783006 -0.0735901 0.680883 0.724466" position="0 0 0 0 0 0.707629 0.706586 1 0 0 0 0 0.707629 0.706586 0.5 0.9 0 0.0783006 -0.0735901 0.680883 0.724466"/>--> |
| 109 | +<!-- <MechanicalObject name="tri" template="Rigid3" rest_position="0 0 0 0 0 0.707629 0.706586 1 0 0 0 0 0.707629 0.706586 0.5 0.9 0 0.0783006 -0.0735901 0.680883 0.724466" position="0 0 0 0 0 0.707629 0.706586 1 0 0 0 0 0.707629 0.706586 0.5 0.9 0 0.0783006 -0.0735901 0.680883 0.724466"/>--> |
82 | 110 |
|
83 | 111 | <!-- Rotation of Pi/2 around z + displacement on vertex 2 along z --> |
84 | | - <MechanicalObject name="tri" template="Rigid" rest_position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0 0 0 1" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 0.5 0.9 0 0 0 0 1"/> |
85 | | - |
| 112 | + <MechanicalObject name="tri" template="Rigid3" topology="@trianglesTopo" /> |
| 113 | + <NormalsFromPoints name="NormalsFrom" position="@tri.position"/> |
86 | 114 |
|
87 | | - <UniformMass mass="0.1 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.2" totalmass="1"/> |
88 | | - <FixedConstraint indices="0 1" drawSize="0"/> |
| 115 | + <UniformMass vertexMass="0.1 0.1 [ 0.1 0 0 , 0 0.1 0 , 0 0 0.05 ]" showAxisSizeFactor="0.2" /> |
| 116 | + <FixedProjectiveConstraint indices="0 1" drawSize="0"/> |
89 | 117 |
|
90 | | - <RestShapeSpringsForceField template="Rigid" name="Springs" external_rest_shape="../points/fixedPoints" |
| 118 | + <RestShapeSpringsForceField template="Rigid3" name="Springs" external_rest_shape="@../points/fixedPoints" |
91 | 119 | points="2" |
92 | 120 | external_points="0" |
93 | 121 | stiffness="50000" |
94 | 122 | angularStiffness="50000" /> |
95 | 123 |
|
96 | 124 |
|
97 | | - <BezierTriangularBendingFEMForceField name="FEM" youngModulus="20000" poissonRatio="0.45" thickness="0.1"/> |
| 125 | + <BezierTriangularBendingFEMForceField name="FEM" youngModulus="20000" poissonRatio="0.45" thickness="0.1" normals="@NormalsFrom.normals"/> |
| 126 | + <!--<TriangularBendingFEMForceField name="FEM" youngModulus="20000" poissonRatio="0.45" thickness="0.1" />--> |
98 | 127 |
|
99 | 128 | <Node name="SubTriangles"> |
100 | | - <TriangleSetTopologyContainer name="subTrianglesTopo"/> |
101 | | - <TriangleSubdivisionTopologicalMapping object1="trianglesTopo" object2="subTrianglesTopo" subdivisions="3"/> |
102 | | - <MechanicalObject name="subPoints"/> |
| 129 | + <MeshOBJLoader name="loader" filename="../../../Shell/mesh/oneTriangle.obj"/> |
| 130 | + <TriangleSetTopologyContainer name="subTrianglesTopo" src="@loader"/> |
| 131 | +<!-- <TriangleSubdivisionTopologicalMapping object1="trianglesTopo" object2="subTrianglesTopo" subdivisions="3"/> |
| 132 | +--> <MechanicalObject name="subPoints" topology="@subTrianglesTopo"/> |
103 | 133 | <BezierTriangleMechanicalMapping input="@../tri" output="@subPoints"/> |
104 | | - <Triangle contactStiffness="0.001"/> |
105 | | - <Node> |
| 134 | + <TriangleCollisionModel contactStiffness="0.001"/> |
| 135 | + <Node name="visual"> |
106 | 136 | <OglModel name="Visual" color="green"/> |
107 | 137 | <IdentityMapping input="@../subPoints" output="@Visual"/> |
108 | 138 | </Node> |
109 | 139 | </Node> |
110 | 140 |
|
111 | 141 | </Node> |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
112 | 146 | </Node> |
0 commit comments