From c2cf70166816ecb0d83d76fe9ddf2cf9e8bc2443 Mon Sep 17 00:00:00 2001 From: epernod Date: Mon, 15 Jul 2024 17:28:06 +0200 Subject: [PATCH] [scenes] Fix warning in python scenes --- .../python3/Cochlear-Implant-Insertion/Scene_Cochlea.py | 2 +- examples/python3/SingleBeamDeployment.py | 7 +++---- examples/python3/SingleBeamDeploymentCollision.py | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/python3/Cochlear-Implant-Insertion/Scene_Cochlea.py b/examples/python3/Cochlear-Implant-Insertion/Scene_Cochlea.py index 146416c22..51e3c07ee 100644 --- a/examples/python3/Cochlear-Implant-Insertion/Scene_Cochlea.py +++ b/examples/python3/Cochlear-Implant-Insertion/Scene_Cochlea.py @@ -56,7 +56,7 @@ def createScene(rootNode): InstrumentCombined.addObject('MechanicalObject', template="Rigid3d", name="DOFs" ) InstrumentCombined.addObject('InterventionalRadiologyController', template="Rigid3d", name="m_ircontroller", printLog=False, xtip="0.1",speed ='4', step="0.1", rotationInstrument="0", controlledInstrument="0", startingPos="@../RefStartingPos/ReferencePos.position", instruments="InterpolCatheter") - InstrumentCombined.addObject('WireBeamInterpolation', name="InterpolCatheter", WireRestShape="@../topoLines_cath/catheterRestShape", radius="3.0", printLog=False) + InstrumentCombined.addObject('WireBeamInterpolation', name="InterpolCatheter", WireRestShape="@../topoLines_cath/catheterRestShape", printLog=False) 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") diff --git a/examples/python3/SingleBeamDeployment.py b/examples/python3/SingleBeamDeployment.py index 46e66d50e..daf321da4 100644 --- a/examples/python3/SingleBeamDeployment.py +++ b/examples/python3/SingleBeamDeployment.py @@ -11,12 +11,12 @@ def createScene(rootNode): topoLines = rootNode.addChild('EdgeTopology') topoLines.addObject('RodStraightSection', name='StraightSection', - length=980.0, radius=1, + length=980.0, radius=0.9, nbEdgesCollis=30, nbEdgesVisu=196, youngModulus=20000) topoLines.addObject('RodSpireSection', name='SpireSection', - length=20.0, radius=1, + length=20.0, radius=0.9, nbEdgesCollis=5, nbEdgesVisu=4, spireDiameter=25, spireHeight=0, youngModulus=20000) @@ -38,8 +38,7 @@ def createScene(rootNode): xmax=0.0, xmin=0.0, ymin=0, ymax=0, zmax=0, zmin=0, p0=[0,0,0]) BeamMechanics.addObject('MechanicalObject', showIndices=False, name='DOFs Container', template='Rigid3d', ry=-90) - BeamMechanics.addObject('WireBeamInterpolation', name='BeamInterpolation', WireRestShape='@../EdgeTopology/BeamRestShape', - radius=0.9, printLog=False) + BeamMechanics.addObject('WireBeamInterpolation', name='BeamInterpolation', WireRestShape='@../EdgeTopology/BeamRestShape', printLog=False) BeamMechanics.addObject('AdaptiveBeamForceFieldAndMass', name='BeamForceField', massDensity=0.00000155, interpolation='@BeamInterpolation') BeamMechanics.addObject('InterventionalRadiologyController', name='DeployController', template='Rigid3d', instruments='BeamInterpolation', startingPos=[0, 0, 0, 0, 0, 0, 1], xtip=[0, 0, 0], printLog=True, diff --git a/examples/python3/SingleBeamDeploymentCollision.py b/examples/python3/SingleBeamDeploymentCollision.py index 61e039984..79c532aea 100644 --- a/examples/python3/SingleBeamDeploymentCollision.py +++ b/examples/python3/SingleBeamDeploymentCollision.py @@ -19,12 +19,12 @@ def createScene(rootNode): topoLines = rootNode.addChild('EdgeTopology') topoLines.addObject('RodStraightSection', name='StraightSection', - length=980.0, radius=1, + length=980.0, radius=0.9, nbEdgesCollis=50, nbEdgesVisu=200, youngModulus=20000, massDensity=0.1, poissonRatio=0.3) topoLines.addObject('RodSpireSection', name='SpireSection', - length=20.0, radius=1, + length=20.0, radius=0.9, nbEdgesCollis=10, nbEdgesVisu=200, spireDiameter=25, spireHeight=0, youngModulus=20000, massDensity=0.1, poissonRatio=0.3) @@ -46,8 +46,7 @@ def createScene(rootNode): xmax=0.0, xmin=0.0, ymin=0, ymax=0, zmax=0, zmin=0, p0=[0,0,0]) BeamMechanics.addObject('MechanicalObject', showIndices=False, name='DOFs', template='Rigid3d', ry=-90) - BeamMechanics.addObject('WireBeamInterpolation', name='BeamInterpolation', WireRestShape='@../EdgeTopology/BeamRestShape', - radius=0.9, printLog=False) + BeamMechanics.addObject('WireBeamInterpolation', name='BeamInterpolation', WireRestShape='@../EdgeTopology/BeamRestShape', printLog=False) BeamMechanics.addObject('AdaptiveBeamForceFieldAndMass', name='BeamForceField', massDensity=0.00000155, interpolation='@BeamInterpolation') BeamMechanics.addObject('InterventionalRadiologyController', name='DeployController', template='Rigid3d', instruments='BeamInterpolation', startingPos=[0, 0, 0, 0, 0, 0, 1], xtip=[0, 0, 0], printLog=True,