X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FPlanarIntersector.hxx;h=273994eea580fa7a810c6291319c0d2ada0c4232;hb=b832b15337be013a56e0976170e5e235b89fcb03;hp=9676000bcb6a8e836f88975c8d0d4c57b55b0ff6;hpb=48782c06022ca2caa36f849cb5a29ea4fe2aaa83;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/PlanarIntersector.hxx b/src/INTERP_KERNEL/PlanarIntersector.hxx index 9676000bc..273994eea 100644 --- a/src/INTERP_KERNEL/PlanarIntersector.hxx +++ b/src/INTERP_KERNEL/PlanarIntersector.hxx @@ -1,25 +1,31 @@ -// Copyright (C) 2007-2008 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 -// 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 __PLANARINTERSECTOR_HXX__ #define __PLANARINTERSECTOR_HXX__ -#include "TargetIntersector.hxx" +#include "TargetIntersector.txx" +#include "NormalizedUnstructuredMesh.hxx" + +#include +#include namespace INTERP_KERNEL { @@ -33,22 +39,27 @@ namespace INTERP_KERNEL static const int MESHDIM=MyMeshType::MY_MESHDIM; typedef typename MyMeshType::MyConnType ConnType; static const NumberingPolicy numPol=MyMeshType::My_numPol; + typedef typename std::map > DuplicateFacesType; public: - //! \addtogroup InterpKerGrpIntPlan @{ - PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double medianPlane, bool doRotate, int orientation, int printLevel); - //! @} + PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); virtual ~PlanarIntersector(); void createBoundingBoxes(const MyMeshType& mesh, std::vector& bbox); - void adjustBoundingBoxes(std::vector& bbox, double Surf3DAdjustmentEps); inline void getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes); + static int Projection(double *Coords_A, double *Coords_B, + ConnType nb_NodesA, ConnType nb_NodesB, double epsilon, double md3DSurf, double minDot3DSurf, double median_plane, bool do_rotate); + virtual const DuplicateFacesType* getIntersectFaces() const + { + return NULL; + } protected : - int projectionThis(double *Coords_A, double *Coords_B, int nb_NodesA, int nb_NodesB); + int projectionThis(double *Coords_A, double *Coords_B, ConnType nb_NodesA, ConnType nb_NodesB); void getRealTargetCoordinates(ConnType icellT, std::vector& coordsT); void getRealSourceCoordinates(ConnType icellS, std::vector& coordsS); + void getRealTargetCoordinatesPermute(ConnType icellT, ConnType offset, std::vector& coordsT); + void getRealSourceCoordinatesPermute(ConnType icellS, ConnType offset, std::vector& coordsS); void getRealCoordinates(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS, std::vector& coordsT, std::vector& coordsS, int& orientation); - static int projection(double *Coords_A, double *Coords_B, - int nb_NodesA, int nb_NodesB, double epsilon, double median_plane, bool do_rotate); - static void rotate3DTriangle( double* PP1, double*PP2, double*PP3, + double getValueRegardingOption(double val) const; + static void Rotate3DTriangle( double* PP1, double*PP2, double*PP3, TranslationRotationMatrix& rotation_matrix); protected: const ConnType *_connectT; @@ -60,6 +71,8 @@ namespace INTERP_KERNEL const MyMeshType& _meshT; const MyMeshType& _meshS; double _dim_caracteristic; + double _max_distance_3Dsurf_intersect; + double _min_dot_btw_3Dsurf_intersect; double _precision; double _median_plane; bool _do_rotate;