X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPrimitivesPlugin%2FPrimitivesPlugin_Sphere.cpp;h=c01d2b2fb73ba92e9b3c44427525b244a4dea460;hb=f60dc9dd94d5d4b0ea07e3e3cbfd5b3028f0942d;hp=9e63047df90e31419cf531780fdb03c349950da2;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/PrimitivesPlugin/PrimitivesPlugin_Sphere.cpp b/src/PrimitivesPlugin/PrimitivesPlugin_Sphere.cpp index 9e63047df..c01d2b2fb 100644 --- a/src/PrimitivesPlugin/PrimitivesPlugin_Sphere.cpp +++ b/src/PrimitivesPlugin/PrimitivesPlugin_Sphere.cpp @@ -6,6 +6,8 @@ #include +#include + #include #include @@ -14,6 +16,8 @@ #include #include +#include + //================================================================================================= PrimitivesPlugin_Sphere::PrimitivesPlugin_Sphere() { @@ -101,6 +105,7 @@ void PrimitivesPlugin_Sphere::loadNamingDS(std::shared_ptr t theSphereAlgo->prepareNamingFaces(); // Insert to faces + // Naming for faces and edges int num = 1; std::map< std::string, std::shared_ptr > listOfFaces = theSphereAlgo->getCreatedFaces(); @@ -109,4 +114,16 @@ void PrimitivesPlugin_Sphere::loadNamingDS(std::shared_ptr t std::shared_ptr aFace = (*it).second; theResultSphere->generated(aFace, (*it).first, num++); } + + // Naming vertices + GeomAPI_DataMapOfShapeShape aVertices; + GeomAPI_ShapeExplorer aVertExp(theSphereAlgo->shape(), GeomAPI_Shape::VERTEX); + for(int anIndex = 1; aVertExp.more(); aVertExp.next()) { + if (!aVertices.isBound(aVertExp.current())) { + std::ostringstream aStream; + aStream<<"Vertex_"<generated(aVertExp.current(), aStream.str(), num++); + aVertices.bind(aVertExp.current(), aVertExp.current()); + } + } }