From 52a6696881d2621bdd9d3f94462f70c213c9e54c Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 23 Apr 2014 15:23:50 +0400 Subject: [PATCH] 22568: [CEA 1151] ConvertToQuadratic does not work if a face was not assigned with elements protect from MG-CADSurf BUG (but an edge is not added at all) --- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 4e3e8bf..a2c44e7 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -2887,8 +2887,13 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, // the last of the two initial tags (else the output tag is out of emap and hasn't any meaning) mesh_get_composite_tag_definition(msh, tag, &nb_tag, tags_buff); if(nb_tag > 1) - tag=tags_buff[nb_tag-1]; - + tag=tags_buff[nb_tag-1]; + if ( tag > emap.Extent() ) + { + std::cerr << "MG-CADSurf BUG:::: Edge tag " << tag + << " more than nb CAD egdes (" << emap.Extent() << ")" << std::endl; + continue; + } if (tags[vtx[0]]) { Set_NodeOnEdge(meshDS, nodes[vtx[0]], emap(tag)); tags[vtx[0]] = false; -- 2.39.2