Salome HOME
22340: EDF 2748 SMESH : 2D viscous layer crash with BLSURF
authoreap <eap@opencascade.com>
Thu, 10 Oct 2013 12:34:50 +0000 (12:34 +0000)
committereap <eap@opencascade.com>
Thu, 10 Oct 2013 12:34:50 +0000 (12:34 +0000)
fix makeProxyFace() for a FACE with holes

src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx

index f2157fbc4626d96c5bc2d3f09c584dfb0f93af28..f3a7daea682809d876238450ed27f6b3fe6adfb5 100644 (file)
@@ -1736,13 +1736,14 @@ namespace
           continue;
 
         BRepBuilderAPI_MakePolygon wire;
+        const size_t i0 = tmpVertex.size();
         for ( size_t iN = 1; iN < wirePoints.size(); ++iN )
         {
           wire.Add( SMESH_TNodeXYZ( wirePoints[ iN ].node ));
           origNodes.push_back( wirePoints[ iN ].node );
           tmpVertex.push_back( wire.LastVertex() );
         }
-        tmpVertex[0] = wire.FirstVertex();
+        tmpVertex[ i0 ] = wire.FirstVertex(); // wire.LastVertex()==NULL for 1 vertex in wire
         wire.Close();
         if ( !wire.IsDone() )
           throw SALOME_Exception("BLSURFPlugin_BLSURF: BRepBuilderAPI_MakePolygon failed");