Skip to content

Commit d42981c

Browse files
fredroyhugtalbot
andauthored
[IRC] Reset the restPositions while fixed - make consistent StartPosition (#205)
* reset also the fixed rest positions * Update src/BeamAdapter/component/controller/InterventionalRadiologyController.inl Co-authored-by: Hugo <hugo.talbot@sofa-framework.org> * fix scenes, where the tool starting rotation is set ONLY in startingPos * apply at init too * regenerate references --------- Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
1 parent dfe093b commit d42981c

18 files changed

Lines changed: 21 additions & 11 deletions

examples/3instruments.scn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
ymin='0' ymax='0'
6666
zmin='1' zmax='1'
6767
/>
68-
<MechanicalObject template='Rigid3d' name='DOFs' showIndices='0' ry='-90'/>
68+
<MechanicalObject template='Rigid3d' name='DOFs' showIndices='0' />
6969

7070
<WireBeamInterpolation name='InterpolCatheter' WireRestShape='@../topoLines_cath/catheterRestShape'/>
7171
<AdaptiveBeamForceFieldAndMass name='CatheterForceField' interpolation='@InterpolCatheter'/>

examples/SingleBeamDeployment.scn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
<RegularGridTopology name="MeshLines" nx="36" ny="1" nz="1"
3232
xmax="0.0" xmin="0.0" ymin="0" ymax="0" zmax="0" zmin="0"
3333
p0="0 0 0" drawEdges="1"/>
34-
<MechanicalObject template="Rigid3d" name="DOFs Container" ry="-90" />
34+
<MechanicalObject template="Rigid3d" name="DOFs Container" />
3535

3636
<WireBeamInterpolation name="BeamInterpolation" WireRestShape="@../EdgeTopology/BeamRestShape" />
3737
<AdaptiveBeamForceFieldAndMass name="BeamForceField" interpolation="@BeamInterpolation"/>
3838
<InterventionalRadiologyController name="DeployController" template="Rigid3d" instruments="BeamInterpolation"
39-
topology="@MeshLines" startingPos="0 0 0 0 0 0 1" xtip="0" printLog="1"
39+
topology="@MeshLines" startingPos="0 0 0 0 -0.7071068 0 0.7071068" xtip="0" printLog="1"
4040
rotationInstrument="0" step="0.5" speed="0.5"
4141
listening="1" controlledInstrument="0"/>
4242
<FixedProjectiveConstraint name="FixedConstraint" indices="0" />

examples/SingleBeamDeploymentCollision.scn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
<RegularGridTopology name="MeshLines" nx="61" ny="1" nz="1"
5050
xmax="0.0" xmin="0.0" ymin="0" ymax="0" zmax="0" zmin="0"
5151
p0="0 0 0" drawEdges="1"/>
52-
<MechanicalObject template="Rigid3d" name="DOFs Container" ry="-90" />
52+
<MechanicalObject template="Rigid3d" name="DOFs Container" ry="-90"/>
5353

5454
<WireBeamInterpolation name="BeamInterpolation" WireRestShape="@../EdgeTopology/BeamRestShape"/>
5555
<AdaptiveBeamForceFieldAndMass name="BeamForceField" interpolation="@BeamInterpolation"/>
5656
<InterventionalRadiologyController name="DeployController" template="Rigid3d" instruments="BeamInterpolation"
57-
topology="@MeshLines" startingPos="0 0 0 0 0 0 1" xtip="0" printLog="1"
57+
topology="@MeshLines" startingPos="0 0 0 0 -0.7071068 0 0.7071068" xtip="0" printLog="1"
5858
rotationInstrument="0" step="5" speed="5"
5959
listening="1" controlledInstrument="0"/>
6060
<LinearSolverConstraintCorrection wire_optimization="true" printLog="0" />

examples/python3/SingleBeamDeployment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ def createScene(rootNode):
3737
nx=61, ny=1, nz=1,
3838
xmax=0.0, xmin=0.0, ymin=0, ymax=0, zmax=0, zmin=0,
3939
p0=[0,0,0])
40-
BeamMechanics.addObject('MechanicalObject', showIndices=False, name='DOFs Container', template='Rigid3d', ry=-90)
40+
BeamMechanics.addObject('MechanicalObject', showIndices=False, name='DOFs Container', template='Rigid3d')
4141
BeamMechanics.addObject('WireBeamInterpolation', name='BeamInterpolation', WireRestShape='@../EdgeTopology/BeamRestShape', printLog=False)
4242
BeamMechanics.addObject('AdaptiveBeamForceFieldAndMass', name='BeamForceField', massDensity=0.00000155, interpolation='@BeamInterpolation')
4343
BeamMechanics.addObject('InterventionalRadiologyController', name='DeployController', template='Rigid3d', instruments='BeamInterpolation',
44-
topology="@MeshLines", startingPos=[0, 0, 0, 0, 0, 0, 1], xtip=[0], printLog=True,
44+
topology="@MeshLines", startingPos=[0, 0, 0, 0, -0.7071068, 0, 0.7071068], xtip=[0], printLog=True,
4545
rotationInstrument=[0], step=0.5, speed=0.5,
4646
listening=True, controlledInstrument=0)
4747
BeamMechanics.addObject('FixedProjectiveConstraint', indices=0, name='FixedConstraint')

examples/python3/SingleBeamDeploymentCollision.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ def createScene(rootNode):
4545
nx=61, ny=1, nz=1,
4646
xmax=0.0, xmin=0.0, ymin=0, ymax=0, zmax=0, zmin=0,
4747
p0=[0,0,0])
48-
BeamMechanics.addObject('MechanicalObject', showIndices=False, name='DOFs', template='Rigid3d', ry=-90)
48+
BeamMechanics.addObject('MechanicalObject', showIndices=False, name='DOFs', template='Rigid3d')
4949
BeamMechanics.addObject('WireBeamInterpolation', name='BeamInterpolation', WireRestShape='@../EdgeTopology/BeamRestShape', printLog=False)
5050
BeamMechanics.addObject('AdaptiveBeamForceFieldAndMass', name='BeamForceField', massDensity=0.00000155, interpolation='@BeamInterpolation')
5151
BeamMechanics.addObject('InterventionalRadiologyController', name='DeployController', template='Rigid3d', instruments='BeamInterpolation',
52-
topology="@MeshLines", startingPos=[0, 0, 0, 0, 0, 0, 1], xtip=[0], printLog=True,
52+
topology="@MeshLines", startingPos=[0, 0, 0, 0, -0.7071068, 0, 0.7071068], xtip=[0], printLog=True,
5353
rotationInstrument=[0], step=5., speed=5.,
5454
listening=True, controlledInstrument=0)
5555
BeamMechanics.addObject('LinearSolverConstraintCorrection', wire_optimization='true', printLog=False)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)