/usr/share/sofa/examples/Demos/Dentistry/dentalSurgeryDistanceGrid_teeth.scn is in sofa-data 1.0~beta4-11.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | <!--
+ Added a driver for the Omni phantom device
+ Added a mechanical state controller that gathers data from the phantom and updates the position of a representation of the device in the simulation
+ Added a computation of the haptic forces
-->
<Node name="root" dt="0.001" gravity="10 0 0" showBehaviorModels="0" showCollisionModels="0" showMappings="0" showForceFields="0" >
<Object type="OmniDriver" scale="0.1" orientation="-90 0 90" position="0 -4 0"/>
<Object type="CollisionPipeline" name="pipeline" depth="6" verbose="0"/>
<Object type="BruteForceDetection" name="detection" />
<Object type="CollisionResponse" name="response" response="default" />
<Object type="MinProximityIntersection" name="proximity" alarmDistance="0.03" contactDistance="0.03" />
<Node name="Tooth" >
<Node name="VisualModel" >
<Object type="OglModel" name="TeethVisualModel" fileMesh="data/mesh/teeth.obj" color="white" />
<Object type="OglModel" name="ToothVisualModel" fileMesh="data/mesh/tooth-closed.obj" color="red" />
<Object type="OglModel" name="ToothVisualModel" fileMesh="data/mesh/tooth-closed.obj" color="red" dy="-0.3" dz="-2"/>
<Object type="OglModel" name="ToothVisualModel" fileMesh="data/mesh/tooth-closed.obj" color="red" dy="-8" dz="0.5"/>
<Object type="OglModel" name="ToothVisualModel" fileMesh="data/mesh/tooth-closed.obj" color="red" dy="-8" dz="-1.5"/>
</Node>
<Node name="CollisionModel" >
<Node>
<Object type="MechanicalObject" template="Rigid"/>
<Object type="DistanceGrid" fileRigidDistanceGrid="data/mesh/tooth-128.fmesh" scale="1.0" usePoints="0" proximity="0.0" contactStiffness="50.0" contactFriction="0.0"/>
</Node>
<Node>
<Object type="MechanicalObject" template="Rigid" dy="-0.3" dz="-2"/>
<Object type="DistanceGrid" fileRigidDistanceGrid="data/mesh/tooth-128.fmesh" scale="1.0" usePoints="0" proximity="0.0" contactStiffness="50.0" contactFriction="0.0"/>
</Node>
<Node>
<Object type="MechanicalObject" template="Rigid" dy="-8" dz="0.5"/>
<Object type="DistanceGrid" fileRigidDistanceGrid="data/mesh/tooth-128.fmesh" scale="1.0" usePoints="0" proximity="0.0" contactStiffness="50.0" contactFriction="0.0"/>
</Node>
<Node>
<Object type="MechanicalObject" template="Rigid" dy="-8" dz="-1.5"/>
<Object type="DistanceGrid" fileRigidDistanceGrid="data/mesh/tooth-128.fmesh" scale="1.0" usePoints="0" proximity="0.0" contactStiffness="50.0" contactFriction="0.0"/>
</Node>
</Node>
</Node>
<!-- ADDED: the Mechanical state Controller gathers events from the Omni driver and populates the Mechanical state -->
<Node name="Omni">
<Object type="MechanicalObject" template="Rigid" name="DOFs" position="0 -4 0 0 0 0 1"/>
<Object type="MechanicalStateController" template="Rigid" listening="true" mainDirection="-1.0 0.0 0.0" handleEventTriggersUpdate="true"/>
<Node name="VisuAvatar">
<Object type="OglModel" name="Visual" fileMesh="mesh/sphere.obj" color="gray" scale="0.1" />
<Object type="RigidMapping" object1="../.." object2="Visual" index="0"/>
</Node>
<Node name="RefModel">
<Object type="MeshLoader" filename="data/mesh/dental_instrument_centerline.obj" />
<Object type="Mesh" />
<Object type="MechanicalObject" name="instrumentCollisionState" dz="-3.5" dx="0.3" />
<Object type="RigidMapping" />
</Node>
<Node name="RefModelRight" >
<Object type="MeshLoader" filename="data/mesh/dental_instrument_centerline.obj" />
<Object type="Mesh" name="InstrumentCollisionModel" />
<Object type="MechanicalObject" name="instrumentCollisionState" dz="-3.5" dx="0.3" dy="0.5"/>
<Object type="RigidMapping" />
</Node>
<Node name="RefModelLeft" >
<Object type="MeshLoader" filename="data/mesh/dental_instrument_centerline.obj" />
<Object type="Mesh" name="InstrumentCollisionModel" />
<Object type="MechanicalObject" name="instrumentCollisionState" dz="-3.5" dx="0.3" dy="-0.5"/>
<Object type="RigidMapping" />
</Node>
</Node>
<Node name="Instrument" >
<Object type="EulerImplicitSolver" name="ODE solver" rayleighStiffness="0.01" rayleighMass="1.0" />
<Object type="CGLinearSolver" name="linear solver" iterations="25" tolerance="1e-10" threshold="10e-10" />
<Object type="MechanicalObject" name="instrumentState" template="Rigid" position="0 -4 0 0 0 0 1"/>
<Object type="UniformMass" name="mass" totalmass="0.05" />
<Object type="EnslavementForceFeedback" activate="true" stiffness="3.0"/> <!-- ADDED : Compute a force-feedback for the device -->
<Node name="VisualModel" >
<Object type="OglModel" name="InstrumentVisualModel" fileMesh="data/mesh/dental_instrument.obj" color="1.0 0.2 0.2 1.0" dz="-3.5" dx="0.3" />
<Object type="RigidMapping" name="MM->VM mapping" object1="instrumentState" object2="InstrumentVisualModel" />
</Node>
<Node name="CollisionModel" >
<Object type="MeshLoader" filename="data/mesh/dental_instrument_centerline.obj" />
<Object type="Mesh" name="InstrumentCollisionModel" />
<Object type="MechanicalObject" name="instrumentCollisionState" dz="-3.5" dx="0.3"/>
<Object type="Line" name="instrument" contactStiffness="10" />
<Object type="Point" name="instrument" contactStiffness="10" />
<Object type="RigidMapping" name="MM->CM mapping" object1="instrumentState" object2="instrumentCollisionState" />
</Node>
<Node name="RefModelRight" >
<Object type="MeshLoader" filename="data/mesh/dental_instrument_centerline.obj" />
<Object type="Mesh" name="InstrumentCollisionModel" />
<Object type="MechanicalObject" name="instrumentCollisionState" dz="-3.5" dx="0.3" dy="0.5"/>
<Object type="RigidMapping" name="MM->CM mapping" object1="instrumentState" object2="instrumentCollisionState" />
</Node>
<Node name="RefModelLeft" >
<Object type="MeshLoader" filename="data/mesh/dental_instrument_centerline.obj" />
<Object type="Mesh" name="InstrumentCollisionModel" />
<Object type="MechanicalObject" name="instrumentCollisionState" dz="-3.5" dx="0.3" dy="-0.5" />
<Object type="RigidMapping" name="MM->CM mapping" object1="instrumentState" object2="instrumentCollisionState" />
</Node>
<Object type="VectorSpringForceField" object1="Omni/RefModel/instrumentCollisionState" object2="Instrument/CollisionModel/instrumentCollisionState" stiffness="30" viscosity="0" />
<Object type="VectorSpringForceField" object1="Omni/RefModelRight/instrumentCollisionState" object2="Instrument/RefModelRight/instrumentCollisionState" stiffness="30" viscosity="0" />
<Object type="VectorSpringForceField" object1="Omni/RefModelLeft/instrumentCollisionState" object2="Instrument/RefModelLeft/instrumentCollisionState" stiffness="30" viscosity="0" />
</Node>
</Node>
|