00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 // SMESH SMESH : implementaion of SMESH idl descriptions 00021 // File : StdMeshers_UseExisting_1D2D.cxx 00022 // Module : SMESH 00023 // Created : Fri Oct 20 11:37:07 2006 00024 // Author : Edward AGAPOV (eap) 00025 // 00026 #include "StdMeshers_UseExisting_1D2D.hxx" 00027 00028 //======================================================================= 00029 //function : StdMeshers_UseExisting_1D 00030 //purpose : 00031 //======================================================================= 00032 00033 StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D 00034 (int hypId, int studyId, SMESH_Gen* gen) 00035 :SMESH_1D_Algo(hypId, studyId, gen) 00036 { 00037 _name = "UseExisting_1D"; 00038 _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type 00039 _requireShape = false; 00040 } 00041 00042 //======================================================================= 00043 //function : CheckHypothesis 00044 //purpose : 00045 //======================================================================= 00046 00047 bool StdMeshers_UseExisting_1D::CheckHypothesis(SMESH_Mesh& , 00048 const TopoDS_Shape& , 00049 Hypothesis_Status& aStatus) 00050 { 00051 return (aStatus = HYP_OK) == HYP_OK; 00052 } 00053 00054 //======================================================================= 00055 //function : Compute 00056 //purpose : 00057 //======================================================================= 00058 00059 bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&) 00060 { 00061 // This algorithm exists to allow mesh generation by mesh 00062 // edition functions in TUI mode 00063 return true; 00064 } 00065 00066 00067 //======================================================================= 00068 //function : Evaluate 00069 //purpose : 00070 //======================================================================= 00071 00072 bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&, 00073 const TopoDS_Shape&, 00074 MapShapeNbElems&) 00075 { 00076 // This algorithm exists to allow mesh generation by mesh 00077 // edition functions in TUI mode 00078 return false; 00079 } 00080 00081 00082 //======================================================================= 00083 //function : StdMeshers_UseExisting_2D 00084 //purpose : 00085 //======================================================================= 00086 00087 StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D 00088 (int hypId, int studyId, SMESH_Gen* gen) 00089 :SMESH_2D_Algo(hypId, studyId, gen) 00090 { 00091 _name = "UseExisting_2D"; 00092 _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type 00093 _requireShape = false; 00094 } 00095 00096 //======================================================================= 00097 //function : CheckHypothesis 00098 //purpose : 00099 //======================================================================= 00100 00101 bool StdMeshers_UseExisting_2D::CheckHypothesis(SMESH_Mesh& , 00102 const TopoDS_Shape& , 00103 Hypothesis_Status& aStatus) 00104 { 00105 return (aStatus = HYP_OK) == HYP_OK; 00106 } 00107 00108 //======================================================================= 00109 //function : Compute 00110 //purpose : 00111 //======================================================================= 00112 00113 bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&) 00114 { 00115 // This algorithm exists to allow mesh generation by mesh edition 00116 // functions in TUI mode 00117 return true; 00118 } 00119 00120 00121 //======================================================================= 00122 //function : Evaluate 00123 //purpose : 00124 //======================================================================= 00125 00126 bool StdMeshers_UseExisting_2D::Evaluate(SMESH_Mesh&, 00127 const TopoDS_Shape&, 00128 MapShapeNbElems&) 00129 { 00130 // This algorithm exists to allow mesh generation by mesh edition 00131 // functions in TUI mode 00132 return false; 00133 }