Salome HOME
Fix regressions
[modules/smesh.git] / src / StdMeshers / StdMeshers_Prism_3D.cxx
index 75219db95b4374617c7a473e00266b303a097d4b..a7dae02832c902abde6f7a23301d04c86bc7c1a8 100644 (file)
@@ -872,7 +872,7 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
 
 
     // TODO. there are other ways to find out the source FACE:
-    // propagation, topological similarity, ect.
+    // propagation, topological similarity, etc...
 
     // simply try to mesh all not meshed SOLIDs
     if ( meshedFaces.empty() )
@@ -1603,7 +1603,7 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism)
       if ( ! fSM->IsMeshComputed() )
       {
         // Top EDGEs must be projections from the bottom ones
-        // to compute stuctured quad mesh on wall FACEs
+        // to compute structured quad mesh on wall FACEs
         // ---------------------------------------------------
         const TopoDS_Edge& botE = (*quad)->side[ QUAD_BOTTOM_SIDE ].grid->Edge(0);
         const TopoDS_Edge& topE = (*quad)->side[ QUAD_TOP_SIDE    ].grid->Edge(0);
@@ -3258,9 +3258,11 @@ bool StdMeshers_Prism_3D::initPrism(Prism_3D::TPrismTopo& thePrism,
                     "Non-quadrilateral faces are not opposite"));
 
     // check that the found top and bottom FACEs are opposite
+    TopTools_IndexedMapOfShape topEdgesMap( thePrism.myBottomEdges.size() );
+    TopExp::MapShapes( thePrism.myTop, topEdgesMap );
     list< TopoDS_Edge >::iterator edge = thePrism.myBottomEdges.begin();
     for ( ; edge != thePrism.myBottomEdges.end(); ++edge )
-      if ( myHelper->IsSubShape( *edge, thePrism.myTop ))
+      if ( topEdgesMap.Contains( *edge ))
         return toSM( error
                      (notQuadGeomSubMesh.empty() ? COMPERR_BAD_INPUT_MESH : COMPERR_BAD_SHAPE,
                       "Non-quadrilateral faces are not opposite"));
@@ -4892,8 +4894,8 @@ bool StdMeshers_Sweeper::ComputeNodes( SMESH_MesherHelper& helper,
     }
   }
 
-  //centerIntErrorIsSmall = true;
-  //bndErrorIsSmall = true;
+  centerIntErrorIsSmall = true; // 3D_mesh_Extrusion_00/A3
+  bndErrorIsSmall = true;
   if ( !centerIntErrorIsSmall )
   {
     // Compensate the central error; continue adding projection