Salome HOME
PAL17694 (New Tool About Hexahedral Meshing)
[modules/smesh.git] / src / StdMeshers / StdMeshers_UseExisting_1D2D.cxx
1 //  SMESH SMESH : implementaion of SMESH idl descriptions
2 //
3 //  Copyright (C) 2003  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. 
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 //
23 //
24 // File      : StdMeshers_UseExisting_1D2D.cxx
25 // Module    : SMESH
26 // Created   : Fri Oct 20 11:37:07 2006
27 // Author    : Edward AGAPOV (eap)
28
29
30 #include "StdMeshers_UseExisting_1D2D.hxx"
31
32 //=======================================================================
33 //function : StdMeshers_UseExisting_1D
34 //purpose  : 
35 //=======================================================================
36
37 StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D
38                                    (int hypId, int studyId, SMESH_Gen* gen)
39   :SMESH_1D_Algo(hypId, studyId, gen)
40 {
41   _name = "UseExisting_1D";
42   _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
43 }
44
45 //=======================================================================
46 //function : CheckHypothesis
47 //purpose  : 
48 //=======================================================================
49
50 bool StdMeshers_UseExisting_1D::CheckHypothesis(SMESH_Mesh& ,
51                                                 const TopoDS_Shape& ,
52                                                 Hypothesis_Status& aStatus)
53 {
54   return (aStatus = HYP_OK) == HYP_OK;
55 }
56
57 //=======================================================================
58 //function : Compute
59 //purpose  : 
60 //=======================================================================
61
62 bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
63 {
64   // This algorithm exists to allow mesh generation by mesh edition functions in TUI mode
65   return true;
66 }
67
68 //=======================================================================
69 //function : StdMeshers_UseExisting_2D
70 //purpose  : 
71 //=======================================================================
72
73 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D
74                                    (int hypId, int studyId, SMESH_Gen* gen)
75   :SMESH_2D_Algo(hypId, studyId, gen)
76 {
77   _name = "UseExisting_2D";
78   _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
79 }
80
81 //=======================================================================
82 //function : CheckHypothesis
83 //purpose  : 
84 //=======================================================================
85
86 bool StdMeshers_UseExisting_2D::CheckHypothesis(SMESH_Mesh& ,
87                                                 const TopoDS_Shape& ,
88                                                 Hypothesis_Status& aStatus)
89 {
90   return (aStatus = HYP_OK) == HYP_OK;
91 }
92
93 //=======================================================================
94 //function : Compute
95 //purpose  : 
96 //=======================================================================
97
98 bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
99 {
100   // This algorithm exists to allow mesh generation by mesh edition functions in TUI mode
101   return true;
102 }