diff --git a/examples/3instruments.scn b/examples/3instruments.scn
index 755c085ec..940cbb71c 100644
--- a/examples/3instruments.scn
+++ b/examples/3instruments.scn
@@ -85,7 +85,7 @@
controlledInstrument='0' startingPos='0 0 0 0 -0.7071068 0 0.7071068' speed='2' instruments='InterpolCatheter InterpolGuide InterpolCoils' />
-
+
diff --git a/examples/3instruments_collis.scn b/examples/3instruments_collis.scn
index e01fcb9da..bc570f5bd 100644
--- a/examples/3instruments_collis.scn
+++ b/examples/3instruments_collis.scn
@@ -102,7 +102,7 @@
-
+
diff --git a/examples/SingleBeamDeployment.scn b/examples/SingleBeamDeployment.scn
index d84ea4732..052ffdb4b 100644
--- a/examples/SingleBeamDeployment.scn
+++ b/examples/SingleBeamDeployment.scn
@@ -40,7 +40,7 @@
rotationInstrument="0 0 0" step="0.5" speed="0.5"
listening="1" controlledInstrument="0"/>
-
+
diff --git a/examples/SingleBeamDeploymentCollision.scn b/examples/SingleBeamDeploymentCollision.scn
index f8afde1da..feab76032 100644
--- a/examples/SingleBeamDeploymentCollision.scn
+++ b/examples/SingleBeamDeploymentCollision.scn
@@ -59,7 +59,7 @@
listening="1" controlledInstrument="0"/>
-
+
diff --git a/examples/Tool_from_loader.scn b/examples/Tool_from_loader.scn
index 1b09e0984..86325848c 100644
--- a/examples/Tool_from_loader.scn
+++ b/examples/Tool_from_loader.scn
@@ -56,7 +56,7 @@
/>
-
+
diff --git a/examples/python3/Cochlear-Implant-Insertion/Scene_Cochlea.py b/examples/python3/Cochlear-Implant-Insertion/Scene_Cochlea.py
index 51e3c07ee..b0332dc12 100644
--- a/examples/python3/Cochlear-Implant-Insertion/Scene_Cochlea.py
+++ b/examples/python3/Cochlear-Implant-Insertion/Scene_Cochlea.py
@@ -60,7 +60,7 @@ def createScene(rootNode):
InstrumentCombined.addObject('AdaptiveBeamForceFieldAndMass', name="CatheterForceField", massDensity="0.000005", interpolation="@InterpolCatheter", printLog=False)
InstrumentCombined.addObject('LinearSolverConstraintCorrection', printLog=False, wire_optimization="true")
InstrumentCombined.addObject("FixedProjectiveConstraint", indices="0")
- InstrumentCombined.addObject('RestShapeSpringsForceField', name="MeasurementFF", points="@m_ircontroller.indexFirstNode", stiffness="1e10", recompute_indices="1", angularStiffness="1e10", external_rest_shape="@../RefStartingPos/ReferencePos", external_points="0", drawSpring="1", springColor="1 0 0 1")
+ InstrumentCombined.addObject('RestShapeSpringsForceField', name="MeasurementFF", indices="@m_ircontroller.indexFirstNode", stiffness="1e10", angularStiffness="1e10", external_rest_shape="@../RefStartingPos/ReferencePos", externalIndices="0", drawSpring="1", springColor="1 0 0 1")
CollisInstrumentCombined = InstrumentCombined.addChild('CollisInstrumentCombined')
CollisInstrumentCombined.addObject('EdgeSetTopologyContainer', name="collisEdgeSet")
diff --git a/examples/python3/SingleBeamDeployment.py b/examples/python3/SingleBeamDeployment.py
index daf321da4..76772fdd7 100644
--- a/examples/python3/SingleBeamDeployment.py
+++ b/examples/python3/SingleBeamDeployment.py
@@ -45,7 +45,7 @@ def createScene(rootNode):
rotationInstrument=[0, 0, 0], step=0.5, speed=0.5,
listening=True, controlledInstrument=0)
BeamMechanics.addObject('FixedProjectiveConstraint', indices=0, name='FixedConstraint')
- BeamMechanics.addObject('RestShapeSpringsForceField', name="RestSPForceField", points='@DeployController.indexFirstNode', angularStiffness=1e8, stiffness=1e8)
+ BeamMechanics.addObject('FixedWeakConstraint', name="RestSPForceField", indices='@DeployController.indexFirstNode', angularStiffness=1e8, stiffness=1e8)
def main():
diff --git a/examples/python3/SingleBeamDeploymentCollision.py b/examples/python3/SingleBeamDeploymentCollision.py
index 79c532aea..e404baf5a 100644
--- a/examples/python3/SingleBeamDeploymentCollision.py
+++ b/examples/python3/SingleBeamDeploymentCollision.py
@@ -54,7 +54,7 @@ def createScene(rootNode):
listening=True, controlledInstrument=0)
BeamMechanics.addObject('LinearSolverConstraintCorrection', wire_optimization='true', printLog=False)
BeamMechanics.addObject('FixedProjectiveConstraint', indices=0, name='FixedConstraint')
- BeamMechanics.addObject('RestShapeSpringsForceField', points='@DeployController.indexFirstNode', angularStiffness=1e8, stiffness=1e8)
+ BeamMechanics.addObject('FixedWeakConstraint', indices='@DeployController.indexFirstNode', angularStiffness=1e8, stiffness=1e8)
BeamCollis = BeamMechanics.addChild('CollisionModel')
diff --git a/examples/python3/beamadapter/parts/instrument.py b/examples/python3/beamadapter/parts/instrument.py
index 2fab3fed0..4663df117 100644
--- a/examples/python3/beamadapter/parts/instrument.py
+++ b/examples/python3/beamadapter/parts/instrument.py
@@ -53,7 +53,7 @@ def combineInstruments(node, xtip=[1, 0, 0], instruments=['guide'],
controlledInstrument=controlledInstrument)
InstrumentCombined.addObject('LinearSolverConstraintCorrection', wire_optimization='true', printLog=False)
InstrumentCombined.addObject('FixedConstraint', indices=0, name='FixedConstraint')
- InstrumentCombined.addObject('RestShapeSpringsForceField', points='@m_ircontroller.indexFirstNode',
+ InstrumentCombined.addObject('FixedWeakConstraint', indices='@m_ircontroller.indexFirstNode',
angularStiffness=1e8, stiffness=1e8)
return (InstrumentCombined)
@@ -90,7 +90,7 @@ def createInstrumentsCombined(node, xtip=[1, 0, 0], instruments=['guide'],
controlledInstrument=controlledInstrument)
InstrumentCombined.addObject('LinearSolverConstraintCorrection', wire_optimization='true', printLog=False)
InstrumentCombined.addObject('FixedConstraint', indices=0, name='FixedConstraint')
- InstrumentCombined.addObject('RestShapeSpringsForceField', points='@m_ircontroller.indexFirstNode',
+ InstrumentCombined.addObject('FixedWeakConstraint', indices='@m_ircontroller.indexFirstNode',
angularStiffness=1e8, stiffness=1e8)
# Collision model
diff --git a/examples/python3/component/BeamProjectionDifferenceMultiMapping.py b/examples/python3/component/BeamProjectionDifferenceMultiMapping.py
index e6ae96504..5eff1eb20 100644
--- a/examples/python3/component/BeamProjectionDifferenceMultiMapping.py
+++ b/examples/python3/component/BeamProjectionDifferenceMultiMapping.py
@@ -49,7 +49,7 @@ def createScene(rootnode):
fixing = particles.addChild('FixingConstraintParticle1')
beam.addChild(fixing)
fixing.addObject('MechanicalObject', template='Rigid3', position=[0, 0, 0, 0, 0, 0, 0])
- fixing.addObject('RestShapeSpringsForceField', stiffness=1e6, angularStiffness=1e6)
+ fixing.addObject('FixedWeakConstraint', stiffness=1e6, angularStiffness=1e6)
fixing.addObject('BeamProjectionDifferenceMultiMapping',
directions=[1, 1, 1, 1, 1, 1, 1], # The three positions and rotations
input1=particles.getMechanicalState().linkpath,
@@ -63,7 +63,7 @@ def createScene(rootnode):
sliding = particles.addChild('SlidingConstraintParticle2')
beam.addChild(sliding)
sliding.addObject('MechanicalObject', template='Rigid3', position=[0, 0, 0, 0, 0, 0, 0])
- sliding.addObject('RestShapeSpringsForceField', stiffness=1e6, angularStiffness=0)
+ sliding.addObject('FixedWeakConstraint', stiffness=1e6, angularStiffness=0, fixAll=True)
sliding.addObject('BeamProjectionDifferenceMultiMapping',
directions=[0, 1, 1, 1, 1, 1, 1], # Only y, z positions to allow the particle to slide on the beam
# but this time we add the three rotations
@@ -77,7 +77,7 @@ def createScene(rootnode):
sliding = particles.addChild('SlidingConstraintParticle3')
beam.addChild(sliding)
sliding.addObject('MechanicalObject', template='Rigid3', position=[0, 0, 0, 0, 0, 0, 0])
- sliding.addObject('RestShapeSpringsForceField', stiffness=1e6, angularStiffness=1e6)
+ sliding.addObject('FixedWeakConstraint', stiffness=1e6, angularStiffness=1e6, fixAll=True)
sliding.addObject('BeamProjectionDifferenceMultiMapping',
directions=[0, 1, 1, 0, 0, 0, 0], # Only y, z positions to allow the particle to slide on the beam
input1=particles.getMechanicalState().linkpath,