forked from sofa-framework/sofa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSofaHAPI1.scn
More file actions
109 lines (91 loc) · 4.9 KB
/
SofaHAPI1.scn
File metadata and controls
109 lines (91 loc) · 4.9 KB
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
<?xml version="1.0"?>
<Node name="root" gravity="0 0 0" dt="0.02" >
<!--<VisualStyle displayFlags="showVisualModels showRendering" />-->
<VisualStyle displayFlags="hideVisualModels hideBehaviorModels showCollisionModels hideMappings hideForceFields hideNormals hideWireframe" />
<RequiredPlugin pluginName="SofaHAPI" />
<FreeMotionAnimationLoop />
<BlockGaussSeidelConstraintSolver />
<CollisionPipeline depth="8" />
<BruteForceBroadPhase/>
<BVHNarrowPhase/>
<LocalMinDistance name="Proximity" alarmDistance="0.6" contactDistance="0.3" />
<!-- <CollisionResponse name="Response" response="FrictionContactConstraint"/>-->
<RuleBasedContactManager name="Response" response="FrictionContactConstraint"
rules="1 * FrictionContact?mu=0.01
" />
<DefaultVisualManagerLoop />
<Node name="OmniObject">
<Node name="RigidLayer">
<MechanicalObject name="ToolRealPosition" template="Rigid3d" position="4 0 12 0.447213595 0 0 0.894427191"/>
<HAPIHapticsDevice name="omniDriver1" scale="300" drawDevice="1" permanent="1" printLog="true" handleEventTriggersUpdate="true"
positionBase="0 5 0" orientationBase="0.707107 0 0 0.707107"
positionTool="0 0 0" orientationTool="0 0 0 1" />
<Node name="Tool1">
<MechanicalObject template="Rigid3d" name="RealPosition"/>
<SubsetMapping indices="0"/>
</Node>
</Node>
</Node>
<Node name="Tool1">
<EulerImplicitSolver rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="25" tolerance="1e-5" threshold="1e-5"/>
<MechanicalObject name="ms" template="Rigid3d" position="7.13718 -5.81916 23.8066 0.807871 0.160225 -0.1368 0.550416"/>
<UniformMass totalMass="0.1" />
<LCPForceFeedback activate="true" forceCoef="0.001" />
<Node name="Collision">
<!-- <MeshTopology filename="assets/meshes/crescentBlade_CM.obj" /> -->
<MeshTopology position="0 0 0 0 0 10" lines="0 1" />
<MechanicalObject name="CM" />
<TriangleCollisionModel bothSide="true" group="1" color="0 0 1 1" />
<LineCollisionModel bothSide="true" group="1" />
<PointCollisionModel bothSide="true" group="1" />
<RigidMapping />
</Node>
<RestShapeSpringsForceField template="Rigid3d" stiffness="1000000" angularStiffness="200000000" external_rest_shape="@../OmniObject/RigidLayer/Tool1/RealPosition" />
<UncoupledConstraintCorrection compliance="0.001 0.00003 0 0 0.00003 0 0.00003" />
</Node>
<MeshOBJLoader name="InputMesh" filename="mesh/sphere_05.obj" scale="0.2" triangulate="1" />
<Node name="InitTopology">
<MeshTopology name="surface" src="@../InputMesh" />
<MeshTetraStuffing name="stuffing" snapPoints="true" splitTetras="false" draw="false" size="2.5" inputPoints="@surface.points" inputTriangles="@surface.triangles" />
</Node>
<Node name="SoftSphere" >
<EulerImplicitSolver name="odesolver" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-10" threshold="1.0e-10" />
<TetrahedronSetTopologyContainer name="volume" points="@../InitTopology/stuffing.outputPoints" tetras="@../InitTopology/stuffing.outputTetras" />
<TetrahedronSetTopologyModifier name="Modifier" />
<MechanicalObject dx2="12" />
<UniformMass totalMass="1" name="mass" />
<TetrahedralCorotationalFEMForceField name="FEM" youngModulus="200" poissonRatio="0.3" method="large" />
<BoxROI name="box_roi" box="-5 -5 -5 5 5 5" drawBoxes="true" />
<!-- <RestShapeSpringsForceField stiffness="1e10" points="@box_roi.indices" />-->
<FixedProjectiveConstraint indices="@box_roi.indices"/>
<!-- <PrecomputedConstraintCorrection recompute="1"/> -->
<UncoupledConstraintCorrection compliance="0.005"/>
<Node name="Surface">
<TriangleSetTopologyContainer src="@../../InputMesh" />
<MechanicalObject />
<TriangleCollisionModel name="CMT" />
<LineCollisionModel name="CML" />
<PointCollisionModel name="CMP" />
<BarycentricMapping useRestPosition="1" />
</Node>
</Node>
<Node name="Rigid" >
<EulerImplicitSolver name="odesolver" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-10" threshold="1.0e-10" />
<MechanicalObject template="Rigid3d" position="-12 0 0 0 0 0 1" />
<UniformMass totalMass="1" name="mass" />
<FixedProjectiveConstraint indices="0"/>
<!-- <PrecomputedConstraintCorrection recompute="1"/> -->
<!-- <UncoupledConstraintCorrection compliance="0.005"/>-->
<Node name="Surface">
<TriangleSetTopologyContainer src="@../../InputMesh" />
<MechanicalObject />
<TriangleCollisionModel name="CMT" simulated="0" moving="0" />
<LineCollisionModel name="CML" simulated="0" moving="0" />
<PointCollisionModel name="CMP" simulated="0" moving="0" />
<RigidMapping />
</Node>
</Node>
</Node>