Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/3instruments.scn
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
controlledInstrument='0' startingPos='0 0 0 0 -0.7071068 0 0.7071068' speed='2' instruments='InterpolCatheter InterpolGuide InterpolCoils' />

<FixedProjectiveConstraint name='FixedConstraint' indices='0' />
<RestShapeSpringsForceField points='@IRController.indexFirstNode' stiffness='1e8' angularStiffness='1e8' />
<FixedWeakConstraint indices='@IRController.indexFirstNode' stiffness='1e8' angularStiffness='1e8' />

<Node name='VisuCatheter' activated='true'>
<MechanicalObject name='Quads' />
Expand Down
2 changes: 1 addition & 1 deletion examples/3instruments_collis.scn
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<LinearSolverConstraintCorrection printLog="false" wire_optimization="true"/>

<FixedProjectiveConstraint name="FixedConstraint" indices="0" />
<RestShapeSpringsForceField points="@IRController.indexFirstNode" stiffness="1e8" angularStiffness="1e8" />
<FixedWeakConstraint indices="@IRController.indexFirstNode" stiffness="1e8" angularStiffness="1e8" />

<Node name="Collis" activated="true">
<EdgeSetTopologyContainer name="collisEdgeSet" />
Expand Down
2 changes: 1 addition & 1 deletion examples/SingleBeamDeployment.scn
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
rotationInstrument="0 0 0" step="0.5" speed="0.5"
listening="1" controlledInstrument="0"/>
<FixedProjectiveConstraint name="FixedConstraint" indices="0" />
<RestShapeSpringsForceField name="RestSPForceField" points="@DeployController.indexFirstNode" angularStiffness="1e8" stiffness="1e8"/>
<FixedWeakConstraint name="RestSPForceField" indices="@DeployController.indexFirstNode" angularStiffness="1e8" stiffness="1e8"/>
</Node>

</Node>
Expand Down
2 changes: 1 addition & 1 deletion examples/SingleBeamDeploymentCollision.scn
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
listening="1" controlledInstrument="0"/>
<LinearSolverConstraintCorrection wire_optimization="true" printLog="0" />
<FixedProjectiveConstraint name="FixedConstraint" indices="0" />
<RestShapeSpringsForceField name="RestSPForceField" points="@DeployController.indexFirstNode" angularStiffness="1e8" stiffness="1e8"/>
<FixedWeakConstraint name="RestSPForceField" indices="@DeployController.indexFirstNode" angularStiffness="1e8" stiffness="1e8"/>

<Node name="CollisionModel">
<EdgeSetTopologyContainer name="collisEdgeSet" />
Expand Down
2 changes: 1 addition & 1 deletion examples/Tool_from_loader.scn
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
/>

<FixedProjectiveConstraint name="FixedConstraint" indices="0" />
<RestShapeSpringsForceField points="@IRController.indexFirstNode" stiffness="1e8" angularStiffness="1e8" />
<FixedWeakConstraint indices="@IRController.indexFirstNode" stiffness="1e8" angularStiffness="1e8" />

<Node name='VisuGuideCatheter'>
<MechanicalObject name='dof_visual_GC' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion examples/python3/SingleBeamDeployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion examples/python3/SingleBeamDeploymentCollision.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions examples/python3/beamadapter/parts/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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,
Expand Down
Loading