X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling_Swig%2FMEDCouplingIntersectTest.py;h=a67c8be966c75262dd78fad3053ab83e8bb2bddd;hb=1b746b38f3cdeae6654a9501f37fde5e56e59288;hp=77a47b7b180b741fd72473a6c6ce1c7a119707be;hpb=214cb0a3e23e084616ebf247642bfbc43811e26d;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling_Swig/MEDCouplingIntersectTest.py b/src/MEDCoupling_Swig/MEDCouplingIntersectTest.py index 77a47b7b1..a67c8be96 100644 --- a/src/MEDCoupling_Swig/MEDCouplingIntersectTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingIntersectTest.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2023 CEA/DEN, EDF R&D +# Copyright (C) 2007-2024 CEA, EDF # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -1293,7 +1293,17 @@ class MEDCouplingIntersectTest(unittest.TestCase): self.assertEqual(resToSelf.getValues(), [0, 1, 1]) self.assertEqual(mapLeftRight.getValues(), [-1, -1, 1, 0, 1, 2, -1, -1]) - + def testSwig2Intersect2DMeshWith1DLine22(self): + """ Simple check that an execption is thrown if 1D mesh is not a single line (one point + connected to more than 2 edges. """ + m2 = MEDCouplingCMesh.New() + da = DataArrayDouble(3) + da.iota() + m2.setCoords(da, da) + m2 = m2.buildUnstructured() + m1,_,_,_,_ = m2.buildDescendingConnectivity() # m1 will have it central point connected to 4 edges + # MEDCouplingUMesh.Intersect2DMeshWith1DLine(m2, m1, 1.0e-8) + self.assertRaises(InterpKernelException, MEDCouplingUMesh.Intersect2DMeshWith1DLine, m2, m1, 1.0e-8) def testSwig2Conformize2D1(self): eps = 1.0e-8