Salome HOME
Issue #1942: group - names are empty strings
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_MakeShape.cpp
index 061529b7d5923af651b4110bcab41ffaf83889a4..dad018f0cee8d427301db1e382540b5df2e37a49 100644 (file)
@@ -157,6 +157,11 @@ void GeomAlgoAPI_MakeShape::setShape(const std::shared_ptr<GeomAPI_Shape> theSha
     }
 
     const TopoDS_Shape& aTopoDSShape = myShape->impl<TopoDS_Shape>();
+    for(TopExp_Explorer anExp(aTopoDSShape,TopAbs_VERTEX); anExp.More(); anExp.Next()) {
+      std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
+      aCurrentShape->setImpl(new TopoDS_Shape(anExp.Current()));
+      myMap->bind(aCurrentShape, aCurrentShape);
+    }
     for(TopExp_Explorer anExp(aTopoDSShape,TopAbs_EDGE); anExp.More(); anExp.Next()) {
       std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
       aCurrentShape->setImpl(new TopoDS_Shape(anExp.Current()));
@@ -209,7 +214,7 @@ void GeomAlgoAPI_MakeShape::initialize() {
 //=================================================================================================
 void GeomAlgoAPI_MakeShape::prepareNamingFaces()
 {
-  long double index = 1;
+  long long index = 1;
   GeomAPI_ShapeExplorer anExp(shape(), GeomAPI_Shape::FACE);
   for(GeomAPI_ShapeExplorer anExp(shape(), GeomAPI_Shape::FACE); anExp.more(); anExp.next()) {
     std::shared_ptr<GeomAPI_Shape> aFace = anExp.current();
@@ -233,12 +238,13 @@ bool GeomAlgoAPI_MakeShape::checkValid(std::string theMessage){
   for(TopExp_Explorer anExp(aTopoDSShape,TopAbs_SOLID); anExp.More(); anExp.Next()) {
     aNbVolumes ++;
   }
-  
+
   if (aNbVolumes != 1) {
-    myError = theMessage + " :: connexity error, the resulting shape is made of several separate solids."; 
+    myError = theMessage +
+      " :: connexity error, the resulting shape is made of several separate solids.";
     return false;
   }
-  
+
   return true ;
 }
-  
+