Salome HOME
[bos #35147] [EDF] (2023-T1) Decompose Viscous Layer API.
[modules/smesh.git] / src / StdMeshers / StdMeshers_Cartesian_VL.hxx
index f8f1c7dca5b2f85c71fdf1ab74225d2a2c420b25..daec1236127fc7f890ef6c32973a9bd610b80284 100644 (file)
 #ifndef __StdMeshers_Cartesian_VL_HXX__
 #define __StdMeshers_Cartesian_VL_HXX__
 
+#include <BOPAlgo_Builder.hxx>
 #include <BRepOffset_MakeOffset.hxx>
+#include <BRepOffsetAPI_MakeOffset.hxx>
+
 #include <set>
 #include <map>
 #include <vector>
 
+class TopoDS_Face;
 class StdMeshers_ViscousLayers;
 class SMESH_Mesh;
 
@@ -47,23 +51,34 @@ namespace StdMeshers_Cartesian_VL
 
     TopoDS_Shape MakeOffsetShape(const TopoDS_Shape & theShape,
                                  SMESH_Mesh &         theMesh,
-                                 std::string &        theError );
+                                 std::string &        theError );                              
 
     SMESH_Mesh*  MakeOffsetMesh();
 
-    bool         MakeViscousLayers( SMESH_Mesh &         theMesh,
-                                    const TopoDS_Shape & theShape );
-
+    bool         MakeViscousLayers( SMESH_Mesh &         offsetMesh,
+                                    SMESH_Mesh &         theMesh,
+                                    const TopoDS_Shape & theShape );                 
+    
   private:
+    
+    TopoDS_Shape MakeOffsetSolid(const TopoDS_Shape & theShape,
+                                 SMESH_Mesh &         theMesh,
+                                 std::string &        theError );   
+
+    bool         CheckGeometryMaps( SMESH_Mesh &         offsetMesh,
+                                    const TopoDS_Shape & theShape );             
 
-    TopoDS_Shape getOffsetSubShape( const TopoDS_Shape& S );
+    void getOffsetSubShape( const TopoDS_Shape& S, std::vector<TopoDS_Shape>& listOfShapes );
 
     const StdMeshers_ViscousLayers* _hyp;
     BRepOffset_MakeOffset           _makeOffset;
+    std::vector<BRepOffset_MakeOffset*> _makeOffsetCollection;  // collection to  
+    BRepOffsetAPI_MakeOffset        _makeFaceOffset;            // to define shrink of planar faces. The face is shrink in all 
+    BOPAlgo_Builder                 _solidCompound;             // to glue solids with common faces after shrinking then with BRepOffset_MakeOffset
     SMESH_Mesh*                     _offsetMesh;
     TopoDS_Shape                    _offsetShape;
-    std::set< int >                 _shapesWVL; // shapes with viscous layers
-    std::map< int, std::vector< int > > _edge2facesWOVL; // EDGE 2 FACEs w/o VL
+    std::set< int >                 _shapesWVL;                 // shapes with viscous layers
+    std::map< int, std::vector< int > > _edge2facesWOVL;        // EDGE 2 FACEs w/o VL
   };
 }