Salome HOME
IPAL52444: Viscous Layers and Projection fail
[modules/smesh.git] / src / SMESH / SMESH_Algo.cxx
index 518c0d6688f29623cd9cc014ddf4a346e8fe7358..95c81e419ac658ac4ebf3d5f11bb5d51c80bf8f5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -178,8 +178,6 @@ const SMESH_Algo::Features& SMESH_Algo::GetFeatures( const std::string& algoType
 SMESH_Algo::SMESH_Algo (int hypId, int studyId, SMESH_Gen * gen)
   : SMESH_Hypothesis(hypId, studyId, gen)
 {
-  //gen->_mapAlgo[hypId] = this;
-
   _onlyUnaryInput = _requireDiscreteBoundary = _requireShape = true;
   _quadraticMesh = _supportSubmeshes = false;
   _error = COMPERR_OK;
@@ -208,28 +206,24 @@ SMESH_0D_Algo::SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen)
 {
   _shapeType = (1 << TopAbs_VERTEX);
   _type = ALGO_0D;
-  //gen->_map0D_Algo[hypId] = this;
 }
 SMESH_1D_Algo::SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen)
   : SMESH_Algo(hypId, studyId, gen)
 {
   _shapeType = (1 << TopAbs_EDGE);
   _type = ALGO_1D;
-  //gen->_map1D_Algo[hypId] = this;
 }
 SMESH_2D_Algo::SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen)
   : SMESH_Algo(hypId, studyId, gen)
 {
   _shapeType = (1 << TopAbs_FACE);
   _type = ALGO_2D;
-  //gen->_map2D_Algo[hypId] = this;
 }
 SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen)
   : SMESH_Algo(hypId, studyId, gen)
 {
   _shapeType = (1 << TopAbs_SOLID);
   _type = ALGO_3D;
-  //gen->_map3D_Algo[hypId] = this;
 }
 
 //=============================================================================
@@ -416,7 +410,7 @@ bool SMESH_Algo::GetSortedNodesOnEdge(const SMESHDS_Mesh*                   theM
     return false;
 
   SMESHDS_SubMesh * eSubMesh = theMesh->MeshElements( theEdge );
-  if ( !eSubMesh || !eSubMesh->GetElements()->more() )
+  if ( !eSubMesh || ( /*eSubMesh->NbElements()==0 && */ eSubMesh->NbNodes() == 0))
     return false; // edge is not meshed
 
   int nbNodes = 0;
@@ -535,7 +529,7 @@ GeomAbs_Shape SMESH_Algo::Continuity(TopoDS_Edge E1,
  */
 //================================================================================
 
-bool SMESH_Algo::isStraight( const TopoDS_Edge & E,
+bool SMESH_Algo::IsStraight( const TopoDS_Edge & E,
                              const bool          degenResult)
 {
   {