From 39cc4548d2525192a38152f2b60e153948e2f342 Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Wed, 25 Sep 2024 18:05:03 +0900 Subject: [PATCH] Fix missing plugins (#458) * fix missing plugins * fix missing plugin again --- bindings/Sofa/tests/Core/BaseData.py | 2 ++ bindings/Sofa/tests/Core/BaseMeshTopology.py | 2 ++ bindings/Sofa/tests/Core/BaseObject.py | 1 + bindings/Sofa/tests/Core/Mass.py | 1 + 4 files changed, 6 insertions(+) diff --git a/bindings/Sofa/tests/Core/BaseData.py b/bindings/Sofa/tests/Core/BaseData.py index 8a6b5ff8..e4b1e418 100644 --- a/bindings/Sofa/tests/Core/BaseData.py +++ b/bindings/Sofa/tests/Core/BaseData.py @@ -248,6 +248,8 @@ def t(c): self.assertRaises(ValueError, (lambda c: t(c)), color) def test_DataAsContainerNumpyArray_testIsDirtyOnDoubleAccess_(self): + SofaRuntime.importPlugin("Sofa.Component.Topology.Container.Dynamic") + root = create_scene("rootNode") root.addObject("PointSetTopologyContainer", points=[[0, 0, 0], [1, 0, 0]]) diff --git a/bindings/Sofa/tests/Core/BaseMeshTopology.py b/bindings/Sofa/tests/Core/BaseMeshTopology.py index b6a7b41b..d0b0b405 100644 --- a/bindings/Sofa/tests/Core/BaseMeshTopology.py +++ b/bindings/Sofa/tests/Core/BaseMeshTopology.py @@ -57,6 +57,8 @@ def test_regular_grid_hexas(self): def test_regular_grid_tetra(self): SofaRuntime.importPlugin("Sofa.Component.Topology.Container.Grid") + SofaRuntime.importPlugin("Sofa.Component.Topology.Container.Constant") + SofaRuntime.importPlugin("Sofa.Component.Topology.Container.Dynamic") SofaRuntime.importPlugin("Sofa.Component.Topology.Mapping") root = Sofa.Core.Node("rootNode") diff --git a/bindings/Sofa/tests/Core/BaseObject.py b/bindings/Sofa/tests/Core/BaseObject.py index dad7191f..d4edb4b5 100644 --- a/bindings/Sofa/tests/Core/BaseObject.py +++ b/bindings/Sofa/tests/Core/BaseObject.py @@ -6,6 +6,7 @@ def create_scene(rootName="root"): root = Sofa.Core.Node(rootName) root.addObject("RequiredPlugin", name="Sofa.Component.StateContainer") + root.addObject("RequiredPlugin", name="Sofa.Component.Topology.Container.Constant") return root class Test(unittest.TestCase): diff --git a/bindings/Sofa/tests/Core/Mass.py b/bindings/Sofa/tests/Core/Mass.py index 5f5cc83b..f0f93b3a 100644 --- a/bindings/Sofa/tests/Core/Mass.py +++ b/bindings/Sofa/tests/Core/Mass.py @@ -22,6 +22,7 @@ def simulate_beam(linear_solver_template): root.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Projective') root.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.FEM.Elastic') root.addObject('RequiredPlugin', name='Sofa.Component.Mass') + root.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Grid') root.addObject('EulerImplicitSolver', rayleighStiffness="0.1", rayleighMass="0.1") root.addObject('SparseLDLSolver', applyPermutation="false", template=linear_solver_template)