X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Import_1D.cxx;h=ee9fe4ef1032964c27bb5edec130bb6795b04a36;hb=0de979b4949cfda1ed932273abb9a92ecc71a4ec;hp=c24c20aac3bd377ae835e24978b6010285d9e9ef;hpb=4031dc980843986775a48d3f9eae8642be249887;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Import_1D.cxx b/src/StdMeshers/StdMeshers_Import_1D.cxx index c24c20aac..ee9fe4ef1 100644 --- a/src/StdMeshers/StdMeshers_Import_1D.cxx +++ b/src/StdMeshers/StdMeshers_Import_1D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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() ); }