Version: 6.3.1

src/INTERP_KERNEL/PlanarIntersector.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __PLANARINTERSECTOR_HXX__
00021 #define __PLANARINTERSECTOR_HXX__
00022 
00023 #include "TargetIntersector.hxx"
00024 #include "NormalizedUnstructuredMesh.hxx"
00025 
00026 namespace INTERP_KERNEL
00027 {
00028   class TranslationRotationMatrix;
00029   
00030   template<class MyMeshType, class MyMatrix>
00031   class PlanarIntersector : public TargetIntersector<MyMeshType,MyMatrix>
00032   {
00033   public:
00034     static const int SPACEDIM=MyMeshType::MY_SPACEDIM;
00035     static const int MESHDIM=MyMeshType::MY_MESHDIM;
00036     typedef typename MyMeshType::MyConnType ConnType;
00037     static const NumberingPolicy numPol=MyMeshType::My_numPol;
00038   public:
00040     PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
00042     virtual ~PlanarIntersector();
00043     void createBoundingBoxes(const MyMeshType& mesh, std::vector<double>& bbox);
00044     void adjustBoundingBoxes(std::vector<double>& bbox, double surf3DAdjustmentEps, double surf3DAdjustmentEpsAbs);
00045     inline void getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes);
00046     static int projection(double *Coords_A, double *Coords_B,
00047                           int nb_NodesA, int nb_NodesB, double epsilon, double md3DSurf, double median_plane, bool do_rotate);
00048   protected :
00049     int projectionThis(double *Coords_A, double *Coords_B, int nb_NodesA, int nb_NodesB);
00050     void getRealTargetCoordinates(ConnType icellT, std::vector<double>& coordsT);
00051     void getRealSourceCoordinates(ConnType icellS, std::vector<double>& coordsS);
00052     void getRealTargetCoordinatesPermute(ConnType icellT, int offset, std::vector<double>& coordsT);
00053     void getRealSourceCoordinatesPermute(ConnType icellS, int offset, std::vector<double>& coordsS);
00054     void getRealCoordinates(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS, std::vector<double>& coordsT, std::vector<double>& coordsS, int& orientation);
00055     double getValueRegardingOption(double val) const;
00056     static void rotate3DTriangle( double* PP1, double*PP2, double*PP3,
00057                                   TranslationRotationMatrix& rotation_matrix);
00058   protected:
00059     const ConnType *_connectT;
00060     const ConnType *_connectS;
00061     const double *_coordsT;
00062     const double *_coordsS;
00063     const ConnType *_connIndexT;
00064     const ConnType *_connIndexS;
00065     const MyMeshType& _meshT;
00066     const MyMeshType& _meshS;
00067     double _dim_caracteristic;
00068     double _max_distance_3Dsurf_intersect;
00069     double _precision;
00070     double _median_plane;
00071     bool _do_rotate;
00072     int _orientation;
00073     int _print_level;
00074   };
00075 }
00076 
00077 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS