Salome HOME
Update copyright information
[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 edition functions in TUI mode
64   return true;
65 }
66
67 //=======================================================================
68 //function : StdMeshers_UseExisting_2D
69 //purpose  : 
70 //=======================================================================
71
72 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D
73                                    (int hypId, int studyId, SMESH_Gen* gen)
74   :SMESH_2D_Algo(hypId, studyId, gen)
75 {
76   _name = "UseExisting_2D";
77   _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
78   _requireShape = false;
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 }