From 6dad552af79e47ffde1cccdb695db0d40539ad86 Mon Sep 17 00:00:00 2001 From: epernod Date: Mon, 15 Jul 2024 16:58:41 +0200 Subject: [PATCH 1/2] [scenes] Remove warnings --- examples/3instruments.scn | 24 +++++++++++----------- examples/3instruments_collis.scn | 4 ++-- examples/AdaptiveBeamController.scn | 12 ++++++----- examples/AdaptiveBeamMapping.scn | 4 ++-- examples/SingleBeam.scn | 4 ++-- examples/SingleBeamDeployment.scn | 10 ++++----- examples/SingleBeamDeploymentCollision.scn | 10 ++++----- examples/Tool_from_loader.scn | 12 +++++------ 8 files changed, 41 insertions(+), 39 deletions(-) diff --git a/examples/3instruments.scn b/examples/3instruments.scn index e9e438d18..812f6a904 100644 --- a/examples/3instruments.scn +++ b/examples/3instruments.scn @@ -2,7 +2,7 @@ - + @@ -22,8 +22,8 @@ - - + + @@ -33,8 +33,8 @@ - - + + @@ -44,8 +44,8 @@ - - + + @@ -67,13 +67,13 @@ /> - + - - + + - + - + diff --git a/examples/3instruments_collis.scn b/examples/3instruments_collis.scn index 41955bdd3..4c95329b0 100644 --- a/examples/3instruments_collis.scn +++ b/examples/3instruments_collis.scn @@ -9,7 +9,7 @@ - + @@ -101,7 +101,7 @@ - + diff --git a/examples/AdaptiveBeamController.scn b/examples/AdaptiveBeamController.scn index b76cb9fe8..d838fe8cb 100644 --- a/examples/AdaptiveBeamController.scn +++ b/examples/AdaptiveBeamController.scn @@ -1,20 +1,22 @@ - - + + + - + + - + - + @@ -17,7 +17,7 @@ - + diff --git a/examples/SingleBeam.scn b/examples/SingleBeam.scn index 8899cf388..545cd60f8 100644 --- a/examples/SingleBeam.scn +++ b/examples/SingleBeam.scn @@ -1,7 +1,7 @@ - + @@ -17,7 +17,7 @@ - + diff --git a/examples/SingleBeamDeployment.scn b/examples/SingleBeamDeployment.scn index f29e61142..41072df62 100644 --- a/examples/SingleBeamDeployment.scn +++ b/examples/SingleBeamDeployment.scn @@ -1,7 +1,7 @@ - + @@ -15,8 +15,8 @@ - - + + @@ -33,13 +33,13 @@ p0="0 0 0" drawEdges="1"/> - + - + diff --git a/examples/SingleBeamDeploymentCollision.scn b/examples/SingleBeamDeploymentCollision.scn index ed3a1b887..4f0e20124 100644 --- a/examples/SingleBeamDeploymentCollision.scn +++ b/examples/SingleBeamDeploymentCollision.scn @@ -8,7 +8,7 @@ - + @@ -32,8 +32,8 @@ - - + + @@ -51,14 +51,14 @@ p0="0 0 0" drawEdges="1"/> - + - + diff --git a/examples/Tool_from_loader.scn b/examples/Tool_from_loader.scn index e76e8fd76..1b09e0984 100644 --- a/examples/Tool_from_loader.scn +++ b/examples/Tool_from_loader.scn @@ -13,7 +13,7 @@ - + @@ -25,8 +25,8 @@ - - + + @@ -39,13 +39,13 @@ - - + - + From c2cf70166816ecb0d83d76fe9ddf2cf9e8bc2443 Mon Sep 17 00:00:00 2001 From: epernod Date: Mon, 15 Jul 2024 17:28:06 +0200 Subject: [PATCH 2/2] [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,