Salome HOME
0020737: [CEA] Computing mesh fails
authoreap <eap@opencascade.com>
Thu, 4 Mar 2010 07:30:41 +0000 (07:30 +0000)
committereap <eap@opencascade.com>
Thu, 4 Mar 2010 07:30:41 +0000 (07:30 +0000)
* Fix constructor from regression made in frames of issue 0020676

src/StdMeshers/StdMeshers_FaceSide.cxx

index e464d0f12e215b5b950d71008f0ffee97f2675a2..56fa772945185082ba29cd34d952a289ebfba03e 100644 (file)
@@ -134,13 +134,16 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
       myNbPonits += nbN;
       myNbSegments += sm->NbElements();
     }
+    // TopExp::FirstVertex() and TopExp::LastVertex() return NULL from INTERNAL edge
     vExp.Initialize( *edge );
+    if ( vExp.Value().Orientation() == TopAbs_REVERSED ) vExp.Next();
     if ( SMESH_Algo::VertexNode( TopoDS::Vertex( vExp.Value()), meshDS ))
       myNbPonits += 1; // for the first end
     else
       myMissingVertexNodes = true;
   }
-  vExp.Next();
+  vExp.Initialize( theEdges.back() );
+  if ( vExp.Value().Orientation() != TopAbs_REVERSED ) vExp.Next();
   if ( vExp.More() )
   {
     if ( SMESH_Algo::VertexNode( TopoDS::Vertex( vExp.Value()), meshDS ))