X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FPlanarIntersectorP0P1.txx;h=bbab21e1c94764d0dba9550394dd3a4252df8bac;hb=659f8c67d0348350e12fde38fe8c4de1ff95dffe;hp=ac1969fce0f44815d7d8e21f1a12e96e073507a6;hpb=48782c06022ca2caa36f849cb5a29ea4fe2aaa83;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx b/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx index ac1969fce..bbab21e1c 100644 --- a/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx +++ b/src/INTERP_KERNEL/PlanarIntersectorP0P1.txx @@ -1,20 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email :webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// Author : Anthony Geay (CEA/DEN) #ifndef __PLANARINTERSECTORP0P1_TXX__ #define __PLANARINTERSECTORP0P1_TXX__ @@ -26,9 +28,9 @@ namespace INTERP_KERNEL { template PlanarIntersectorP0P1::PlanarIntersectorP0P1(const MyMeshType& meshT, const MyMeshType& meshS, - double dimCaracteristic, double precision, double medianPlane, - bool doRotate, int orientation, int printLevel): - PlanarIntersector(meshT,meshS,dimCaracteristic,precision,medianPlane,doRotate,orientation,printLevel) + double dimCaracteristic, double precision, double md3DSurf, double medianPlane, + bool doRotate, int orientation, int printLevel): + PlanarIntersector(meshT,meshS,dimCaracteristic,precision,md3DSurf,medianPlane,doRotate,orientation,printLevel) { } @@ -78,14 +80,10 @@ namespace INTERP_KERNEL std::vector sourceCellCoordsTmp(sourceCellCoords); if(SPACEDIM==3) orientation=PlanarIntersector::projectionThis(&sourceCellCoordsTmp[0],quadrangle,sourceCellCoords.size()/SPACEDIM,4); - NormalizedCellType tS=PlanarIntersector::_meshS.getTypeOfElement(iS); - double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,sourceCellCoordsTmp,CellModel::getCellModel(tS).isQuadratic()); - //filtering out zero surfaces and badly oriented surfaces - // _orientation = -1,0,1 - // -1 : the intersection is taken into account if target and cells have different orientation - // 0 : the intersection is always taken into account - // 1 : the intersection is taken into account if target and cells have the same orientation - if (( surf > 0.0 && PlanarIntersector::_orientation >=0 ) || ( surf < 0.0 && PlanarIntersector::_orientation <=0 )) + NormalizedCellType tS=PlanarIntersector::_meshS.getTypeOfElement(OTT::indFC(iS)); + double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,sourceCellCoordsTmp,CellModel::GetCellModel(tS).isQuadratic()); + surf=PlanarIntersector::getValueRegardingOption(surf); + if(surf!=0.) { typename MyMatrix::value_type::const_iterator iterRes=resRow.find(OTT::indFC(iS)); if(iterRes==resRow.end())