Advertisement
Guest User

sofa_fixed_constraints

a guest
Jun 6th, 2016
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.31 KB | None | 0 0
  1. <?xml version="1.0" ?>
  2. <Node name="lroot" gravity="0 -9.81 0" dt="0.02">
  3.  
  4.     <VisualStyle displayFlags="hideVisualModels hideBehaviorModels showCollisionModels hideMappings hideForceFields hideNormals hideWireframe" />
  5.  
  6.     <FreeMotionAnimationLoop />
  7.     <GenericConstraintSolver />
  8.  
  9.     <CollisionPipeline depth="8" />
  10.     <BruteForceDetection name="N2" />
  11.     <LocalMinDistance name="Proximity" alarmDistance="0.6" contactDistance="0.3" />
  12.  
  13.     <RuleBasedContactManager name="Response" response="FrictionContact"
  14.                             rules="1 * FrictionContact?mu=0.01
  15.                                    " />
  16.  
  17.     <DefaultVisualManagerLoop />
  18.  
  19.     <MeshObjLoader name="InputMesh" filename="/home/jnbrunet/Documents/lirv-ossim/sofa_scenes/sphere_10.obj" scale="0.2" triangulate="1" />
  20.  
  21.     <Node name="InitTopology">
  22.         <Mesh name="surface" src="@../InputMesh" />
  23.         <MeshTetraStuffing name="stuffing" snapPoints="true" splitTetras="false" draw="false" size="2.5" inputPoints="@surface.points" inputTriangles="@surface.triangles" />
  24.     </Node>
  25.  
  26.     <Node name="Sphere">
  27.         <EulerImplicit name="odesolver" />
  28.         <CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-10" threshold="1.0e-10" />
  29.  
  30.         <TetrahedronSetTopologyContainer name="volume" points="@../InitTopology/stuffing.outputPoints" tetras="@../InitTopology/stuffing.outputTetras" />
  31.         <TetrahedronSetTopologyModifier  name="Modifier" />
  32.  
  33.  
  34.         <MechanicalObject name="" dx2="12" />
  35.  
  36.         <UniformMass totalMass="1" name="mass" />
  37.  
  38.         <TetrahedralCorotationalFEMForceField name="FEM" youngModulus="2000" poissonRatio="0.3" method="large" computeGlobalMatrix="0" />
  39.  
  40.         <BoxROI name="box_roi" box="-5 -5 -5  5 5 5" drawBoxes="true" />
  41.         <FixedConstraint indices="@box_roi.indices"/>
  42.  
  43.         <UncoupledConstraintCorrection compliance="0.005"/>
  44.  
  45.         <Node name="Surface">
  46.             <TriangleSetTopologyContainer src="@../../InputMesh" />
  47.             <MechanicalObject />
  48.             <TriangleModel name="CMT" />
  49.             <LineModel name="CML" />
  50.             <PointModel name="CMP" />
  51.             <BarycentricMapping useRestPosition="1" />
  52.         </Node>
  53.     </Node>
  54.  
  55.     <Node   name="Instrument"  >
  56.         <EulerImplicit />
  57.         <CGLinearSolver />
  58.  
  59.         <MechanicalObject template="Rigid" name="instrumentState" tags="Omni"  />
  60.         <UniformMass template="Rigid" name="mass"  totalmass="1" />
  61.         <LCPForceFeedback activate="true" forceCoef="0.005" tags="Omni" />
  62.  
  63.  
  64.         <Node name="Collision">
  65.             <Mesh position="0 0 0   0 0 10" lines="0 1"  />
  66.             <MechanicalObject name="CM" />
  67.             <Triangle bothSide="false" group="1" color="0 0 1 1" />
  68.             <Line  bothSide="false" group="1" />
  69.             <Sphere group="1" />
  70.             <RigidMapping />
  71.         </Node>
  72.         <Node name="visual">
  73.             <MeshObjLoader name="InputMesh" filename="/home/jnbrunet/sources/sofa/share/mesh/sphere_05.obj" scale="0.02" />
  74.             <Mesh src="@InputMesh"/>
  75.             <OglModel  name="VisualModel"/>
  76.             <RigidMapping />
  77.         </Node>
  78.  
  79.     </Node>
  80.  
  81.     <NewOmniDriver name="Omni Driver"  listening="true" tags="Omni" forceScale="1" scale="100"  permanent="true" alignOmniWithCamera="true" />
  82.  
  83. </Node>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement