From 0b7be7c334d83000dea937acbc34fa4ff4e79acd Mon Sep 17 00:00:00 2001 From: gdd Date: Tue, 26 Jul 2011 17:56:29 +0000 Subject: [PATCH] Fix vertex index to not have existing value --- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index b15b2c5..9d888ae 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -1173,7 +1173,7 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) // Specific size map = Attractor std::map >::iterator attractor_iter = FaceId2AttractorCoords.begin(); - int iatt=0; + for (; attractor_iter != FaceId2AttractorCoords.end(); ++attractor_iter) { if (attractor_iter->first == faceKey) { MESSAGE("Face indice: " << iface); @@ -1202,10 +1202,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); } -- 2.39.2