File: ConstantForceField.scn

package info (click to toggle)
sofa-framework 1.0~beta4-12
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 88,828 kB
  • ctags: 27,300
  • sloc: cpp: 151,126; ansic: 2,387; xml: 581; sh: 417; makefile: 68
file content (32 lines) | stat: -rw-r--r-- 1,788 bytes parent folder | download | duplicates (5)
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
<Node name="root"  dt="0.05" gravity="0 0 0" showBehaviorModels="1" showCollisionModels="0" showMappings="0" showForceFields="1">
	
  <!-- Constant force for a deformable -->
	<Node name="BasicDeformableObject">
		<Object type="EulerImplicit" name="cg_odesolver" printLog="false"/>
		<Object type="CGLinearSolver" iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
		<Object type="MechanicalObject" position="0 0 0  1 0 0  1 1 0  0 1 0" velocity="0 0 0  0 0 0  0 0 0  0 0 0"/>
		<Object type="UniformMass" mass="0.1" />
		<Object type="Mesh"
			triangles="0 1 2  0 2 3"
		/>
<!--		<Object type="FixedConstraint" indices="2 3"/>-->
		<Object type="TriangleFEMForceField" name="FEM0" youngModulus="100" poissonRatio="0.3" method="large"/>
                <Object type="ConstantForceField" points="0 1 2 3" forces="-1 -1 0  1 -1 0  1 1 0  -1 1 0"/>
		<Node name="Visu">
			<Object type="OglModel" name="Visual" color="red"/>
			<Object type="IdentityMapping" object1="../.." object2="Visual"/>
		</Node>
	</Node>
	<Node name="TorusRigid">
	  <Object type="EulerImplicitSolver" rayleighStiffness="0.01" />
	  <Object type="CGLinearSolver" iterations="25" threshold="0.00000001"  />
	  <Object type="MechanicalObject" template="Rigid"  dx="2" dy="0" dz="0" rx="0" ry="0" rz="0" scale="1.0"  />
	  <Object type="UniformMass" />
	  <!-- forces for a rigid is composed of two parts translation of the rigid dof [x y z] and a quaternion for the rotation [x y z w] -->
          <Object type="ConstantForceField" points="0" forces="0 0.10 0     0 1 0 0"/>
	  <Node name="Visu">
	    <Object type="OglModel" name="Visual" fileMesh="mesh/torus.obj" color="gray" scale="0.3"/>
	    <Object type="RigidMapping" object1="../.." object2="Visual" />
	  </Node>
	</Node>
</Node>