1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // SMESH SMESH : implementaion of SMESH idl descriptions
21 // File : StdMeshers_UseExisting_1D2D.cxx
23 // Created : Fri Oct 20 11:37:07 2006
24 // Author : Edward AGAPOV (eap)
26 #include "StdMeshers_UseExisting_1D2D.hxx"
28 //=======================================================================
29 //function : StdMeshers_UseExisting_1D
31 //=======================================================================
33 StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D
34 (int hypId, int studyId, SMESH_Gen* gen)
35 :SMESH_1D_Algo(hypId, studyId, gen)
37 _name = "UseExisting_1D";
38 _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
39 _requireShape = false;
42 //=======================================================================
43 //function : CheckHypothesis
45 //=======================================================================
47 bool StdMeshers_UseExisting_1D::CheckHypothesis(SMESH_Mesh& ,
49 Hypothesis_Status& aStatus)
51 return (aStatus = HYP_OK) == HYP_OK;
54 //=======================================================================
57 //=======================================================================
59 bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
61 // This algorithm exists to allow mesh generation by mesh
62 // edition functions in TUI mode
67 //=======================================================================
70 //=======================================================================
72 bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&,
76 // This algorithm exists to allow mesh generation by mesh
77 // edition functions in TUI mode
82 //=======================================================================
83 //function : StdMeshers_UseExisting_2D
85 //=======================================================================
87 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D
88 (int hypId, int studyId, SMESH_Gen* gen)
89 :SMESH_2D_Algo(hypId, studyId, gen)
91 _name = "UseExisting_2D";
92 _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
93 _requireShape = false;
96 //=======================================================================
97 //function : CheckHypothesis
99 //=======================================================================
101 bool StdMeshers_UseExisting_2D::CheckHypothesis(SMESH_Mesh& ,
102 const TopoDS_Shape& ,
103 Hypothesis_Status& aStatus)
105 return (aStatus = HYP_OK) == HYP_OK;
108 //=======================================================================
111 //=======================================================================
113 bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
115 // This algorithm exists to allow mesh generation by mesh edition
116 // functions in TUI mode
121 //=======================================================================
122 //function : Evaluate
124 //=======================================================================
126 bool StdMeshers_UseExisting_2D::Evaluate(SMESH_Mesh&,
130 // This algorithm exists to allow mesh generation by mesh edition
131 // functions in TUI mode