@@ -65,27 +65,27 @@ def createScene(root):
6565
6666 needleBaseMaster = root .addChild ("NeedleBaseMaster" )
6767 needleBaseMaster .addObject ("MechanicalObject" , name = "mstate_baseMaster" , template = "Rigid3d" , showObjectScale = 0.002 , showObject = True , drawMode = 1
68- #, position=[0.04, 0.04, 0, 0, 0, 0, 1])
6968 , position = "@reader.position" )
69+ # , position=[0.04, 0.04, 0, 0, 0, 0, 1])
7070 #needleBaseMaster.addObject("LinearMovementProjectiveConstraint",indices=[0],
7171 # keyTimes=[
72- # 0, 1, 4, 4.5, 5, 8
73- # ,8.5,9,12,12.5,13,16
72+ # 0, 0.04, 0.25, 0.3, 0.35, 0.55
73+ # ,0.6, 0.65, 0.85, 0.95, 1.05, 1.15
7474 # ],
7575 # movements=[
76- # [0.04, 0.04,0,0,0, 0],
77- # [0.04, 0.04,0.05,0, 3.14/2,0],
78- # [0.04, 0.04,-0.07,0, 3.14/2,0],
79- # [0.05, 0.04,-0.07,0, 3.14/2 + 3.14/16,0],
80- # [0.04, 0.04,-0.07,0, 3.14/2,0],
81- # [0.04, 0.04,0.005,0,3.14/2,0],
76+ # [0.04, 0.04, 0, 0, 0, 0],
77+ # [0.04, 0.04, 0.02, 0, 3.14/2, 0],
78+ # [0.04, 0.04, -0.07, 0, 3.14/2, 0],
79+ # [0.05, 0.04, -0.07, 0, 3.14/2 + 3.14/16, 0],
80+ # [0.04, 0.04, -0.07, 0, 3.14/2, 0],
81+ # [0.04, 0.04, 0.005,0, 3.14/2, 0],
8282 # # Change to insertion at an angle
83- # [0.06, 0.04,0.005,0, 3.14/2,0],
84- # [0.06, 0.04,0.005,0, 3.14/2 + 3.14/8,0],
85- # [0.030866, 0.04,-0.04119,0, 3.14/2 + 3.14/8,0],
86- # [0.030866, 0.04,-0.04119,0, 3.14/2,0],
87- # [0.030866, 0.04,-0.04119,0, 3.14/2 + 3.14/8,0],
88- # [0.06, 0.04,0.005,0, 3.14/2 + 3.14/8,0]
83+ # [0.06, 0.04, 0.005, 0, 3.14/2, 0],
84+ # [0.06, 0.04, 0.005, 0, 3.14/2 + 3.14/8, 0],
85+ # [0.030866, 0.04, -0.04119, 0, 3.14/2 + 3.14/8, 0],
86+ # [0.030866, 0.04, -0.04119, 0, 3.14/2, 0],
87+ # [0.030866, 0.04, -0.04119, 0, 3.14/2 + 3.14/8, 0],
88+ # [0.06, 0.04, 0.005, 0, 3.14/2 + 3.14/8, 0]
8989 # ]
9090 # ,relativeMovements=False
9191 #)
@@ -165,8 +165,7 @@ def createScene(root):
165165 volume .addObject ("MechanicalObject" , name = "mstate_gel" , template = "Vec3d" )
166166 volume .addObject ("TetrahedronGeometry" , name = "geom_tetra" , mstate = "@mstate_gel" , topology = "@TetraContainer" , draw = False )
167167 volume .addObject ("PhongTriangleNormalHandler" , name = "InternalTriangles" , geometry = "@geom_tetra" )
168- volume .addObject ("AABBBroadPhase" ,name = "AABBTetra" ,geometry = "@geom_tetra" ,nbox = [3 ,3 ,3 ],thread = 1 )
169- volume .addObject ("TetrahedronFEMForceField" , name = "FF" ,** g_gelMechanicalParameters )
168+ volume .addObject ("FastTetrahedralCorotationalForceField" , name = "FF" ,** g_gelMechanicalParameters )
170169 volume .addObject ("MeshMatrixMass" , name = "Mass" ,totalMass = g_gelTotalMass )
171170
172171 volume .addObject ("BoxROI" ,name = "BoxROI" ,box = g_gelFixedBoxROI )
@@ -181,7 +180,7 @@ def createScene(root):
181180 volumeCollision .addObject ("MechanicalObject" , name = "mstate_gelColi" ,position = "@../TetraContainer.position" )
182181 volumeCollision .addObject ("TriangleGeometry" , name = "geom_tri" , mstate = "@mstate_gelColi" , topology = "@TriContainer" ,draw = False )
183182 volumeCollision .addObject ("PhongTriangleNormalHandler" , name = "SurfaceTriangles" , geometry = "@geom_tri" )
184- volumeCollision .addObject ("AABBBroadPhase" ,name = "AABBTriangles" ,thread = 1 ,nbox = [2 ,2 ,3 ])
183+ volumeCollision .addObject ("AABBBroadPhase" , name = "AABBTriangles" , thread = 1 , nbox = [2 ,2 ,3 ], method = 2 )
185184
186185 volumeCollision .addObject ("IdentityMapping" , name = "identityMappingToCollision" , input = "@../mstate_gel" , output = "@mstate_gelColi" , isMechanical = True )
187186
@@ -215,4 +214,4 @@ def createScene(root):
215214 root .addObject ("ConstraintUnilateral" ,input = "@InsertionAlgo.collisionOutput" ,directions = "@punctureDirection" ,draw_scale = 0.001 , mu = 0.001 )
216215
217216 root .addObject ("FirstDirection" ,name = "bindDirection" , handler = "@Needle/bodyCollision/NeedleBeams" )
218- root .addObject ("ConstraintInsertion" ,input = "@InsertionAlgo.insertionOutput" , directions = "@bindDirection" ,draw_scale = 0.002 , frictionCoeff = 0.0023 )
217+ root .addObject ("ConstraintInsertion" ,input = "@InsertionAlgo.insertionOutput" , directions = "@bindDirection" ,draw_scale = 0.002 , frictionCoeff = 0.00 ) #23 )
0 commit comments