1 // Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : StdMeshers_Cartesian_VL.hxx
23 // Created : Tue May 24 12:32:01 2022
24 // Author : Edward AGAPOV (eap)
26 #ifndef __StdMeshers_Cartesian_VL_HXX__
27 #define __StdMeshers_Cartesian_VL_HXX__
29 #include <BOPAlgo_Builder.hxx>
30 #include <BRepOffset_MakeOffset.hxx>
31 #include <BRepOffsetAPI_MakeOffset.hxx>
38 class StdMeshers_ViscousLayers;
41 namespace StdMeshers_Cartesian_VL
47 ViscousBuilder( const StdMeshers_ViscousLayers* hypViscousLayers,
48 const SMESH_Mesh & theMesh,
49 const TopoDS_Shape & theShape);
52 TopoDS_Shape MakeOffsetShape(const TopoDS_Shape & theShape,
54 std::string & theError );
56 SMESH_Mesh* MakeOffsetMesh();
58 bool MakeViscousLayers( SMESH_Mesh & offsetMesh,
60 const TopoDS_Shape & theShape );
64 TopoDS_Shape MakeOffsetSolid(const TopoDS_Shape & theShape,
66 std::string & theError );
68 bool CheckGeometryMaps( SMESH_Mesh & offsetMesh,
69 const TopoDS_Shape & theShape );
71 void getOffsetSubShape( const TopoDS_Shape& S, std::vector<TopoDS_Shape>& listOfShapes );
73 const StdMeshers_ViscousLayers* _hyp;
74 BRepOffset_MakeOffset _makeOffset;
75 std::vector<BRepOffset_MakeOffset*> _makeOffsetCollection; // collection to
76 BRepOffsetAPI_MakeOffset _makeFaceOffset; // to define shrink of planar faces. The face is shrink in all
77 BOPAlgo_Builder _solidCompound; // to glue solids with common faces after shrinking then with BRepOffset_MakeOffset
78 SMESH_Mesh* _offsetMesh;
79 TopoDS_Shape _offsetShape;
80 std::set< int > _shapesWVL; // shapes with viscous layers
81 std::map< int, std::vector< int > > _edge2facesWOVL; // EDGE 2 FACEs w/o VL