]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
Fix enforced vertives badly created with BLSurf V3 V6_3_1p1
authorgdd <gdd>
Fri, 29 Jul 2011 10:14:08 +0000 (10:14 +0000)
committergdd <gdd>
Fri, 29 Jul 2011 10:14:08 +0000 (10:14 +0000)
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx

index 0c971a45ef04040f369c83fabb27a901d8d09dcd..f019081f7ed02af68a000647f961d68404a76b2e 100644 (file)
@@ -1071,7 +1071,9 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
   int iface = 0;
   string bad_end = "return";
   int faceKey = -1;
-  int ienf = 0;
+  TopTools_IndexedMapOfShape _map;
+  TopExp::MapShapes(aShape,TopAbs_VERTEX,_map);
+  int ienf = _map.Extent();
   BLSURFPlugin_Attractor myAttractor;
   for (TopExp_Explorer face_iter(aShape,TopAbs_FACE);face_iter.More();face_iter.Next()) {
     TopoDS_Face f=TopoDS::Face(face_iter.Current());
@@ -1130,7 +1132,6 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
       
       // Specific size map = Attractor
       std::map<int,std::vector<double> >::iterator attractor_iter = FaceId2AttractorCoords.begin();
-      int iatt=0;
       for (; attractor_iter != FaceId2AttractorCoords.end(); ++attractor_iter) {
         if (attractor_iter->first == faceKey) {
           MESSAGE("Face indice: " << iface);
@@ -1159,10 +1160,10 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
             // Point is inside face and not on border
             MESSAGE("Point is in face: node is created");
             double uvCoords[2]   = {attractor_iter->second[0],attractor_iter->second[1]};
-            iatt++;
-            MESSAGE("Add cad point on (u,v)=(" << uvCoords[0] << "," << uvCoords[1] << ") with id = " << iatt);
-            cad_point_t* point_p = cad_point_new(fce, iatt, uvCoords);
-            cad_point_set_tag(point_p, iatt);
+            ienf++;
+            MESSAGE("Add cad point on (u,v)=(" << uvCoords[0] << "," << uvCoords[1] << ") with id = " << ienf);
+            cad_point_t* point_p = cad_point_new(fce, ienf, uvCoords);
+            cad_point_set_tag(point_p, ienf);
           }
           FaceId2AttractorCoords.erase(faceKey);
         }