1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SMESH SMESH : implementaion of SMESH idl descriptions
23 // File : StdMeshers_UseExisting_1D2D.cxx
25 // Created : Fri Oct 20 11:37:07 2006
26 // Author : Edward AGAPOV (eap)
28 #include "StdMeshers_UseExisting_1D2D.hxx"
30 //=======================================================================
31 //function : StdMeshers_UseExisting_1D
33 //=======================================================================
35 StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D
36 (int hypId, int studyId, SMESH_Gen* gen)
37 :SMESH_1D_Algo(hypId, studyId, gen)
39 _name = "UseExisting_1D";
40 _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type
41 _requireShape = false;
44 //=======================================================================
45 //function : CheckHypothesis
47 //=======================================================================
49 bool StdMeshers_UseExisting_1D::CheckHypothesis(SMESH_Mesh& ,
51 Hypothesis_Status& aStatus)
53 return (aStatus = HYP_OK) == HYP_OK;
56 //=======================================================================
59 //=======================================================================
61 bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
63 // This algorithm exists to allow mesh generation by mesh
64 // edition functions in TUI mode
69 //=======================================================================
72 //=======================================================================
74 bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&,
78 // This algorithm exists to allow mesh generation by mesh
79 // edition functions in TUI mode
84 //=======================================================================
85 //function : StdMeshers_UseExisting_2D
87 //=======================================================================
89 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D
90 (int hypId, int studyId, SMESH_Gen* gen)
91 :SMESH_2D_Algo(hypId, studyId, gen)
93 _name = "UseExisting_2D";
94 _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type
95 _requireShape = false;
98 //=======================================================================
99 //function : CheckHypothesis
101 //=======================================================================
103 bool StdMeshers_UseExisting_2D::CheckHypothesis(SMESH_Mesh& ,
104 const TopoDS_Shape& ,
105 Hypothesis_Status& aStatus)
107 return (aStatus = HYP_OK) == HYP_OK;
110 //=======================================================================
113 //=======================================================================
115 bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
117 // This algorithm exists to allow mesh generation by mesh edition
118 // functions in TUI mode
123 //=======================================================================
124 //function : Evaluate
126 //=======================================================================
128 bool StdMeshers_UseExisting_2D::Evaluate(SMESH_Mesh&,
132 // This algorithm exists to allow mesh generation by mesh edition
133 // functions in TUI mode