Salome HOME
Remove obsolete OCC_VERSION_LARGE defines.
[modules/smesh.git] / src / StdMeshers / StdMeshers_RadialPrism_3D.cxx
index f6d39bd3e218246ecd513218c2f42b59724cc65f..3b36e0058a9c20103606b4f621589cabe9f2b5b4 100644 (file)
 #include <TopoDS_Solid.hxx>
 #include <gp.hxx>
 #include <gp_Pnt.hxx>
-#if OCC_VERSION_LARGE > 0x06050400
 #include <BRepClass3d.hxx>
-#else
-#include <BRepTools.hxx>
-#endif
 
 using namespace std;
 
@@ -169,11 +165,7 @@ bool StdMeshers_RadialPrism_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& a
 
   // get 2 shells
   TopoDS_Solid solid = TopoDS::Solid( aShape );
-#if OCC_VERSION_LARGE > 0x06050400
   TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
-#else
-  TopoDS_Shell outerShell = BRepTools::OuterShell( solid );
-#endif
   TopoDS_Shape innerShell;
   int nbShells = 0;
   for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
@@ -239,7 +231,7 @@ bool StdMeshers_RadialPrism_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& a
     }
 
     // Find matching nodes of in and out faces
-    TNodeNodeMap nodeIn2OutMap;
+    ProjectionUtils::TNodeNodeMap nodeIn2OutMap;
     if ( ! ProjectionUtils::FindMatchingNodesOnFaces( inFace, &aMesh, outFace, &aMesh,
                                                       shape2ShapeMap, nodeIn2OutMap ))
       return error(COMPERR_BAD_INPUT_MESH,SMESH_Comment("Mesh on faces #")
@@ -439,11 +431,7 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
 {
   // get 2 shells
   TopoDS_Solid solid = TopoDS::Solid( aShape );
-#if OCC_VERSION_LARGE > 0x06050400
   TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
-#else
-  TopoDS_Shell outerShell = BRepTools::OuterShell( solid );
-#endif
   TopoDS_Shape innerShell;
   int nbShells = 0;
   for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
@@ -604,7 +592,7 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
  * \brief Return true if the algorithm can mesh this shape
  *  \param [in] aShape - shape to check
  *  \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
- *              else, returns OK if all at least one shape is OK
+ *              else, returns OK if at least one shape is OK
  */
 //================================================================================
 
@@ -625,7 +613,10 @@ bool StdMeshers_RadialPrism_3D::IsApplicable( const TopoDS_Shape & aShape, bool
       }
       shell[ nbShells-1 ] = It.Value();
     }
-    if ( nbShells != 2 ) continue;
+    if ( nbShells != 2 ) { 
+      if ( toCheckAll ) return false;  
+      continue; 
+    }
 
     int nbFaces1 = SMESH_MesherHelper:: Count( shell[0], TopAbs_FACE, 0 );
     int nbFaces2 = SMESH_MesherHelper:: Count( shell[1], TopAbs_FACE, 0 );