Salome HOME
correct previous integration (Porting to Python 2.6)
[modules/smesh.git] / src / StdMeshers / StdMeshers_UseExisting_1D2D.cxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, 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.
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 //  SMESH SMESH : implementaion of SMESH idl descriptions
23 // File      : StdMeshers_UseExisting_1D2D.cxx
24 // Module    : SMESH
25 // Created   : Fri Oct 20 11:37:07 2006
26 // Author    : Edward AGAPOV (eap)
27 //
28 #include "StdMeshers_UseExisting_1D2D.hxx"
29
30 //=======================================================================
31 //function : StdMeshers_UseExisting_1D
32 //purpose  : 
33 //=======================================================================
34
35 StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D
36                                    (int hypId, int studyId, SMESH_Gen* gen)
37   :SMESH_1D_Algo(hypId, studyId, gen)
38 {
39   _name = "UseExisting_1D";
40   _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
41   _requireShape = false;
42 }
43
44 //=======================================================================
45 //function : CheckHypothesis
46 //purpose  : 
47 //=======================================================================
48
49 bool StdMeshers_UseExisting_1D::CheckHypothesis(SMESH_Mesh& ,
50                                                 const TopoDS_Shape& ,
51                                                 Hypothesis_Status& aStatus)
52 {
53   return (aStatus = HYP_OK) == HYP_OK;
54 }
55
56 //=======================================================================
57 //function : Compute
58 //purpose  : 
59 //=======================================================================
60
61 bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
62 {
63   // This algorithm exists to allow mesh generation by mesh
64   // edition functions in TUI mode
65   return true;
66 }
67
68
69 //=======================================================================
70 //function : Evaluate
71 //purpose  : 
72 //=======================================================================
73
74 bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&,
75                                          const TopoDS_Shape&,
76                                          MapShapeNbElems&)
77 {
78   // This algorithm exists to allow mesh generation by mesh
79   // edition functions in TUI mode
80   return false;
81 }
82
83
84 //=======================================================================
85 //function : StdMeshers_UseExisting_2D
86 //purpose  : 
87 //=======================================================================
88
89 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D
90                                    (int hypId, int studyId, SMESH_Gen* gen)
91   :SMESH_2D_Algo(hypId, studyId, gen)
92 {
93   _name = "UseExisting_2D";
94   _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
95   _requireShape = false;
96 }
97
98 //=======================================================================
99 //function : CheckHypothesis
100 //purpose  : 
101 //=======================================================================
102
103 bool StdMeshers_UseExisting_2D::CheckHypothesis(SMESH_Mesh& ,
104                                                 const TopoDS_Shape& ,
105                                                 Hypothesis_Status& aStatus)
106 {
107   return (aStatus = HYP_OK) == HYP_OK;
108 }
109
110 //=======================================================================
111 //function : Compute
112 //purpose  : 
113 //=======================================================================
114
115 bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
116 {
117   // This algorithm exists to allow mesh generation by mesh edition
118   // functions in TUI mode
119   return true;
120 }
121
122
123 //=======================================================================
124 //function : Evaluate
125 //purpose  : 
126 //=======================================================================
127
128 bool StdMeshers_UseExisting_2D::Evaluate(SMESH_Mesh&,
129                                          const TopoDS_Shape&,
130                                          MapShapeNbElems&)
131 {
132   // This algorithm exists to allow mesh generation by mesh edition
133   // functions in TUI mode
134   return false;
135 }