|
13 | 13 |
|
14 | 14 | g_gelRegularGridParameters = [ |
15 | 15 | { |
16 | | - "n":[12, 4, 6], |
| 16 | + "n":[6, 4, 4], |
17 | 17 | "min":[-0.350, -0.050, -0.350], |
18 | | - "max":[0.350, 0.049, -0.100] |
| 18 | + "max":[0.350, 0.0499, -0.100] |
19 | 19 | }, |
20 | 20 | { |
21 | | - "n":[12, 4, 6], |
22 | | - "min":[-0.350, 0.051, -0.350], |
| 21 | + "n":[6, 4, 4], |
| 22 | + "min":[-0.350, 0.0501, -0.350], |
23 | 23 | "max":[0.350, 0.150, -0.100] |
24 | 24 | } |
25 | 25 | ] #Again all in mm |
26 | 26 | g_gelMechanicalParameters = { |
27 | | - "youngModulus":8e5, |
| 27 | + "youngModulus":8e7, |
28 | 28 | "poissonRatio":0.45, |
29 | 29 | "method":"large" |
30 | 30 | } |
@@ -163,7 +163,8 @@ def createScene(root): |
163 | 163 | volume.addObject("MeshMatrixMass", name="Mass",totalMass=g_gelTotalMass) |
164 | 164 |
|
165 | 165 | volume.addObject("BoxROI",name="BoxROI",box=g_gelFixedBoxROI) |
166 | | - volume.addObject("RestShapeSpringsForceField", stiffness=1e6,points="@BoxROI.indices" ) |
| 166 | + volume.addObject("RestShapeSpringsForceField", stiffness=1e6, points="@BoxROI.indices" ) |
| 167 | + volume.addObject("FixedLagrangianConstraint", indices="@BoxROI.indices" ) |
167 | 168 |
|
168 | 169 | volume.addObject("LinearSolverConstraintCorrection", printLog=False, linearSolver="@LinearSolver") |
169 | 170 |
|
@@ -197,6 +198,12 @@ def createScene(root): |
197 | 198 | color=g_wireColor[i],name="volume_visu",template="Vec3d") |
198 | 199 | volumeVisuWire.addObject("IdentityMapping") |
199 | 200 |
|
| 201 | + root.addObject("NearestPointROI", template="Vec3d", name="attachROI", radius=0.0025, |
| 202 | + object1="@Layer0/mstate_gel", object2="@Layer1/mstate_gel") |
| 203 | + root.addObject("BilateralLagrangianConstraint", name="layerAttachment", |
| 204 | + first_point="@attachROI.indices1", second_point="@attachROI.indices2", |
| 205 | + object1="@Layer0/mstate_gel", object2="@Layer1/mstate_gel") |
| 206 | + |
200 | 207 |
|
201 | 208 | #root.addObject("InsertionAlgorithm", name="InsertionAlgo", |
202 | 209 | # tipGeom="@Needle/tipCollision/geom_tip", |
|
0 commit comments