Salome HOME
22568: [CEA 1151] ConvertToQuadratic does not work if a face was not assigned with...
authoreap <eap@opencascade.com>
Wed, 23 Apr 2014 11:23:50 +0000 (15:23 +0400)
committereap <eap@opencascade.com>
Wed, 23 Apr 2014 11:23:50 +0000 (15:23 +0400)
      protect from MG-CADSurf BUG (but an edge is not added at all)

src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx

index 4e3e8bf97f4bf2df16ae13ff3c1f2d9146ea9c18..a2c44e77019f201dfb9368f5812a31a7d603e522 100644 (file)
@@ -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;