Salome HOME
Update copyright
[modules/smesh.git] / src / StdMeshers / StdMeshers_UseExisting_1D2D.cxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  SMESH SMESH : implementaion of SMESH idl descriptions
21 // File      : StdMeshers_UseExisting_1D2D.cxx
22 // Module    : SMESH
23 // Created   : Fri Oct 20 11:37:07 2006
24 // Author    : Edward AGAPOV (eap)
25 //
26 #include "StdMeshers_UseExisting_1D2D.hxx"
27
28 //=======================================================================
29 //function : StdMeshers_UseExisting_1D
30 //purpose  : 
31 //=======================================================================
32
33 StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D
34                                    (int hypId, int studyId, SMESH_Gen* gen)
35   :SMESH_1D_Algo(hypId, studyId, gen)
36 {
37   _name = "UseExisting_1D";
38   _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
39   _requireShape = false;
40 }
41
42 //=======================================================================
43 //function : CheckHypothesis
44 //purpose  : 
45 //=======================================================================
46
47 bool StdMeshers_UseExisting_1D::CheckHypothesis(SMESH_Mesh& ,
48                                                 const TopoDS_Shape& ,
49                                                 Hypothesis_Status& aStatus)
50 {
51   return (aStatus = HYP_OK) == HYP_OK;
52 }
53
54 //=======================================================================
55 //function : Compute
56 //purpose  : 
57 //=======================================================================
58
59 bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
60 {
61   // This algorithm exists to allow mesh generation by mesh
62   // edition functions in TUI mode
63   return true;
64 }
65
66
67 //=======================================================================
68 //function : Evaluate
69 //purpose  : 
70 //=======================================================================
71
72 bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&,
73                                          const TopoDS_Shape&,
74                                          MapShapeNbElems&)
75 {
76   // This algorithm exists to allow mesh generation by mesh
77   // edition functions in TUI mode
78   return false;
79 }
80
81
82 //=======================================================================
83 //function : StdMeshers_UseExisting_2D
84 //purpose  : 
85 //=======================================================================
86
87 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D
88                                    (int hypId, int studyId, SMESH_Gen* gen)
89   :SMESH_2D_Algo(hypId, studyId, gen)
90 {
91   _name = "UseExisting_2D";
92   _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
93   _requireShape = false;
94 }
95
96 //=======================================================================
97 //function : CheckHypothesis
98 //purpose  : 
99 //=======================================================================
100
101 bool StdMeshers_UseExisting_2D::CheckHypothesis(SMESH_Mesh& ,
102                                                 const TopoDS_Shape& ,
103                                                 Hypothesis_Status& aStatus)
104 {
105   return (aStatus = HYP_OK) == HYP_OK;
106 }
107
108 //=======================================================================
109 //function : Compute
110 //purpose  : 
111 //=======================================================================
112
113 bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
114 {
115   // This algorithm exists to allow mesh generation by mesh edition
116   // functions in TUI mode
117   return true;
118 }
119
120
121 //=======================================================================
122 //function : Evaluate
123 //purpose  : 
124 //=======================================================================
125
126 bool StdMeshers_UseExisting_2D::Evaluate(SMESH_Mesh&,
127                                          const TopoDS_Shape&,
128                                          MapShapeNbElems&)
129 {
130   // This algorithm exists to allow mesh generation by mesh edition
131   // functions in TUI mode
132   return false;
133 }