Salome HOME
Plural of vertex is not verteces ... (thx to P.R.)
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_BLSURF.cxx
index 6c7b214f2fa31ca407b74756da39d13e47ca5bce..c85b0462a8b6ca37d392ed9f3cff0c9e3727069a 100644 (file)
@@ -192,7 +192,7 @@ TopTools_IndexedMapOfShape FacesWithSizeMap;
 std::map<int,string> FaceId2SizeMap;
 TopTools_IndexedMapOfShape EdgesWithSizeMap;
 std::map<int,string> EdgeId2SizeMap;
-TopTools_IndexedMapOfShape VertecesWithSizeMap;
+TopTools_IndexedMapOfShape VerticesWithSizeMap;
 std::map<int,string> VertexId2SizeMap;
 
 std::map<int,PyObject*> FaceId2PythonSmp;
@@ -201,7 +201,7 @@ std::map<int,PyObject*> VertexId2PythonSmp;
 
 std::map<int,std::vector<double> > FaceId2AttractorCoords;
 
-TopTools_IndexedMapOfShape FacesWithEnforcedVerteces;
+TopTools_IndexedMapOfShape FacesWithEnforcedVertices;
 std::map< int, std::set< std::vector<double> > > FaceId2EnforcedVertexCoords;
 
 bool HasSizeMapOnFace=false;
@@ -256,13 +256,13 @@ BLSURFPlugin_BLSURF::BLSURFPlugin_BLSURF(int hypId, int studyId,
   FaceId2SizeMap.clear();
   EdgesWithSizeMap.Clear();
   EdgeId2SizeMap.clear();
-  VertecesWithSizeMap.Clear();
+  VerticesWithSizeMap.Clear();
   VertexId2SizeMap.clear();
   FaceId2PythonSmp.clear();
   EdgeId2PythonSmp.clear();
   VertexId2PythonSmp.clear();
   FaceId2AttractorCoords.clear();
-  FacesWithEnforcedVerteces.Clear();
+  FacesWithEnforcedVertices.Clear();
   FaceId2EnforcedVertexCoords.clear();
 
 }
@@ -438,11 +438,11 @@ void createEnforcedVertexOnFace(TopoDS_Shape GeomShape, BLSURFPlugin_Hypothesis:
     coords.push_back(z0);
   
     int key = 0;
-    if (! FacesWithEnforcedVerteces.Contains(TopoDS::Face(GeomShape))) {
-      key = FacesWithEnforcedVerteces.Add(TopoDS::Face(GeomShape));
+    if (! FacesWithEnforcedVertices.Contains(TopoDS::Face(GeomShape))) {
+      key = FacesWithEnforcedVertices.Add(TopoDS::Face(GeomShape));
     }
     else {
-      key = FacesWithEnforcedVerteces.FindIndex(TopoDS::Face(GeomShape));
+      key = FacesWithEnforcedVertices.FindIndex(TopoDS::Face(GeomShape));
     }
 
     // If a node is already created by an attractor, do not create enforced vertex
@@ -666,16 +666,16 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsu
               }
               EdgeId2SizeMap[key] = smIt->second;
             }
-            // Group of verteces
+            // Group of vertices
             if (it.Value().ShapeType() == TopAbs_VERTEX){
               HasSizeMapOnVertex = true;
               HasSizeMapOnEdge = true;
               HasSizeMapOnFace = true;
-              if (! VertecesWithSizeMap.Contains(TopoDS::Vertex(it.Value()))) {
-                key = VertecesWithSizeMap.Add(TopoDS::Vertex(it.Value()));
+              if (! VerticesWithSizeMap.Contains(TopoDS::Vertex(it.Value()))) {
+                key = VerticesWithSizeMap.Add(TopoDS::Vertex(it.Value()));
               }
               else {
-                key = VertecesWithSizeMap.FindIndex(TopoDS::Vertex(it.Value()));
+                key = VerticesWithSizeMap.FindIndex(TopoDS::Vertex(it.Value()));
 //                 MESSAGE("Vertex with key " << key << " already in map");
               }
               VertexId2SizeMap[key] = smIt->second;
@@ -712,11 +712,11 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsu
           HasSizeMapOnVertex = true;
           HasSizeMapOnEdge   = true;
           HasSizeMapOnFace   = true;
-          if (! VertecesWithSizeMap.Contains(TopoDS::Vertex(GeomShape))) {
-            key = VertecesWithSizeMap.Add(TopoDS::Vertex(GeomShape));
+          if (! VerticesWithSizeMap.Contains(TopoDS::Vertex(GeomShape))) {
+            key = VerticesWithSizeMap.Add(TopoDS::Vertex(GeomShape));
           }
           else {
-            key = VertecesWithSizeMap.FindIndex(TopoDS::Vertex(GeomShape));
+            key = VerticesWithSizeMap.FindIndex(TopoDS::Vertex(GeomShape));
 //             MESSAGE("Vertex with key " << key << " already in map");
           }
           VertexId2SizeMap[key] = smIt->second;
@@ -767,10 +767,10 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsu
 
 
     //
-    // Enforced Verteces
+    // Enforced Vertices
     //
-    MESSAGE("Setting Enforced Verteces");
-    const BLSURFPlugin_Hypothesis::TEnforcedVertexMap enforcedVertexMap = BLSURFPlugin_Hypothesis::GetAllEnforcedVerteces(hyp);
+    MESSAGE("Setting Enforced Vertices");
+    const BLSURFPlugin_Hypothesis::TEnforcedVertexMap enforcedVertexMap = BLSURFPlugin_Hypothesis::GetAllEnforcedVertices(hyp);
     BLSURFPlugin_Hypothesis::TEnforcedVertexMap::const_iterator enfIt = enforcedVertexMap.begin();
     for ( ; enfIt != enforcedVertexMap.end(); ++enfIt ) {
       if ( !enfIt->second.empty() ) {
@@ -857,7 +857,7 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
   FaceId2SizeMap.clear();
   EdgesWithSizeMap.Clear();
   EdgeId2SizeMap.clear();
-  VertecesWithSizeMap.Clear();
+  VerticesWithSizeMap.Clear();
   VertexId2SizeMap.clear();
 
   MESSAGE("BEGIN SetParameters");
@@ -969,18 +969,18 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
         }
       }
       
-      // Enforced Verteces
-      faceKey = FacesWithEnforcedVerteces.FindIndex(f);
+      // Enforced Vertices
+      faceKey = FacesWithEnforcedVertices.FindIndex(f);
       std::map<int,std::set<std::vector<double> > >::const_iterator evmIt = FaceId2EnforcedVertexCoords.find(faceKey);
       if (evmIt != FaceId2EnforcedVertexCoords.end()) {
-        std::cout << "Some enforced verteces are defined" << std::endl;
+        std::cout << "Some enforced vertices are defined" << std::endl;
         int ienf = 0;
         std::set<std::vector<double> > evl;
 //         std::vector<double> ev;
         MESSAGE("Face indice: " << iface);
-        MESSAGE("Adding enforced verteces");
+        MESSAGE("Adding enforced vertices");
         evl = evmIt->second;
-        MESSAGE("Number of verteces to add: "<< evl.size())
+        MESSAGE("Number of vertices to add: "<< evl.size())
         std::set< std::vector<double> >::const_iterator evlIt = evl.begin();
         for (; evlIt != evl.end(); ++evlIt) {
 //           ev = *evlIt;
@@ -1065,7 +1065,7 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
       
       
       /****************************************************************************************
-                                      VERTECES
+                                      VERTICES
       *****************************************************************************************/
       int vertexKey = -1;
       for (TopExp_Explorer ex_edge(e ,TopAbs_VERTEX); ex_edge.More(); ex_edge.Next()) {
@@ -1082,9 +1082,9 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
         if(*ip <= 0)
           *ip = pmap.Add(v);
         
-        vertexKey = VertecesWithSizeMap.FindIndex(v);
+        vertexKey = VerticesWithSizeMap.FindIndex(v);
         if (HasSizeMapOnVertex){
-          vertexKey = VertecesWithSizeMap.FindIndex(v);
+          vertexKey = VerticesWithSizeMap.FindIndex(v);
           if (VertexId2SizeMap.find(vertexKey)!=VertexId2SizeMap.end()){
             theSizeMapStr = VertexId2SizeMap[faceKey];
             if (theSizeMapStr.find(bad_end) == (theSizeMapStr.size()-bad_end.size()-1))
@@ -1279,10 +1279,10 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
   FacesWithSizeMap.Statistics(std::cout);
   std::cout << "EdgesWithSizeMap" << std::endl;
   EdgesWithSizeMap.Statistics(std::cout);
-  std::cout << "VertecesWithSizeMap" << std::endl;
-  VertecesWithSizeMap.Statistics(std::cout);
-  std::cout << "FacesWithEnforcedVerteces" << std::endl;
-  FacesWithEnforcedVerteces.Statistics(std::cout);
+  std::cout << "VerticesWithSizeMap" << std::endl;
+  VerticesWithSizeMap.Statistics(std::cout);
+  std::cout << "FacesWithEnforcedVertices" << std::endl;
+  FacesWithEnforcedVertices.Statistics(std::cout);
   
   return true;
 }