Salome HOME
22419: EDF SMESH Regression: 3D Extrusion fails
[modules/smesh.git] / src / StdMeshers / StdMeshers_Import_1D.cxx
index c24c20aac3bd377ae835e24978b6010285d9e9ef..a75c2f5cc472c9e62287e0df4252e94c5b2d1c29 100644 (file)
@@ -227,6 +227,8 @@ namespace // INTERNAL STUFF
         switch ( sm->GetSubShape().ShapeType() )
         {
         case TopAbs_EDGE:
+          if ( SMESH_Algo::isDegenerated( TopoDS::Edge( sm->GetSubShape() )))
+            continue;
         case TopAbs_FACE:
           _subM.insert( sm );
           if ( !sm->IsEmpty() )
@@ -567,7 +569,8 @@ namespace // INTERNAL STUFF
       aBuilder.MakeCompound( comp );
       shapeForSrcMesh = comp;
       for ( int iSub = 0; iSub < nbSubShapes; ++iSub )
-        aBuilder.Add( comp, pseudoSubShapes( subIndex+iSub ));
+        if ( subIndex+iSub <= pseudoSubShapes.Extent() )
+          aBuilder.Add( comp, pseudoSubShapes( subIndex+iSub ));
       TopExp_Explorer vExp( tgtMeshDS->ShapeToMesh(), TopAbs_VERTEX );
       aBuilder.Add( comp, vExp.Current() );
     }