From: ageay Date: Thu, 31 Jan 2013 14:35:16 +0000 (+0000) Subject: distance from point to mesh implementation X-Git-Tag: V6_main_FINAL~404 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3020c55e063a95340a5449d874ab6520ded89eb9;p=tools%2Fmedcoupling.git distance from point to mesh implementation --- diff --git a/src/INTERP_KERNEL/CMakeLists.txt b/src/INTERP_KERNEL/CMakeLists.txt index 02d8637bd..ae70ca322 100644 --- a/src/INTERP_KERNEL/CMakeLists.txt +++ b/src/INTERP_KERNEL/CMakeLists.txt @@ -37,6 +37,7 @@ SET(interpkernel_SOURCES InterpKernelMeshQuality.cxx InterpKernelCellSimplify.cxx InterpKernelMatrixTools.cxx + VolSurfUser.cxx Bases/InterpKernelException.cxx Geometric2D/InterpKernelGeo2DAbstractEdge.cxx Geometric2D/InterpKernelGeo2DBounds.cxx diff --git a/src/INTERP_KERNEL/Makefile.am b/src/INTERP_KERNEL/Makefile.am index 25258d67c..a21327824 100644 --- a/src/INTERP_KERNEL/Makefile.am +++ b/src/INTERP_KERNEL/Makefile.am @@ -218,6 +218,7 @@ dist_libinterpkernel_la_SOURCES = \ TranslationRotationMatrix.cxx \ TetraAffineTransform.cxx \ CellModel.cxx \ + VolSurfUser.cxx \ UnitTetraIntersectionBary.cxx \ InterpolationOptions.cxx \ DirectedBoundingBox.cxx \ diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py index e72abcdf7..7457b05b6 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py @@ -10872,6 +10872,23 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertEqual(155.,d.accumulate(2)) pass + def testSwigUMeshDistanceToMesh1(self): + m=MEDCouplingUMesh("toto",2) + coords=DataArrayDouble([2.3,3.4,5.6,6.5,-4.3,3.2,-9.8,7.6,-5.4],3,3) + m.setCoords(coords) + m.allocateCells(0) + m.insertNextCell(NORM_TRI3,[0,1,2]) + a,b,c=m.distanceToPoint([-0.335,2.27,1.21]) + self.assertEqual(0,b) ; self.assertEqual(0,c) + self.assertAlmostEqual(0.022360988100374124,a,14); + a,b,c=m.distanceToPoint(DataArrayDouble([-0.335,2.27,1.21],1,3)) + self.assertEqual(0,b) ; self.assertEqual(0,c) + self.assertAlmostEqual(0.022360988100374124,a,14); + a,b=coords.distanceToTuple([-0.335,2.27,1.21]) + self.assertAlmostEqual(5.243302871282566,a,14) + self.assertEqual(0,b) + pass + def setUp(self): pass pass