Salome HOME
f8f1c7dca5b2f85c71fdf1ab74225d2a2c420b25
[modules/smesh.git] / src / StdMeshers / StdMeshers_Cartesian_VL.hxx
1 // Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // File      : StdMeshers_Cartesian_VL.hxx
23 // Created   : Tue May 24 12:32:01 2022
24 // Author    : Edward AGAPOV (eap)
25
26 #ifndef __StdMeshers_Cartesian_VL_HXX__
27 #define __StdMeshers_Cartesian_VL_HXX__
28
29 #include <BRepOffset_MakeOffset.hxx>
30 #include <set>
31 #include <map>
32 #include <vector>
33
34 class StdMeshers_ViscousLayers;
35 class SMESH_Mesh;
36
37 namespace StdMeshers_Cartesian_VL
38 {
39   class ViscousBuilder
40   {
41   public:
42
43     ViscousBuilder( const StdMeshers_ViscousLayers* hypViscousLayers,
44                     const SMESH_Mesh &              theMesh,
45                     const TopoDS_Shape &            theShape);
46     ~ViscousBuilder();
47
48     TopoDS_Shape MakeOffsetShape(const TopoDS_Shape & theShape,
49                                  SMESH_Mesh &         theMesh,
50                                  std::string &        theError );
51
52     SMESH_Mesh*  MakeOffsetMesh();
53
54     bool         MakeViscousLayers( SMESH_Mesh &         theMesh,
55                                     const TopoDS_Shape & theShape );
56
57   private:
58
59     TopoDS_Shape getOffsetSubShape( const TopoDS_Shape& S );
60
61     const StdMeshers_ViscousLayers* _hyp;
62     BRepOffset_MakeOffset           _makeOffset;
63     SMESH_Mesh*                     _offsetMesh;
64     TopoDS_Shape                    _offsetShape;
65     std::set< int >                 _shapesWVL; // shapes with viscous layers
66     std::map< int, std::vector< int > > _edge2facesWOVL; // EDGE 2 FACEs w/o VL
67   };
68 }
69
70 #endif