From: dbv Date: Tue, 27 Dec 2016 11:06:21 +0000 (+0300) Subject: Issue #1920: Wrong naming of faces' edges after translation X-Git-Tag: V_2.7.0~351^2~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a5ad424ba37fe8bff038d78ab19bda11efd08fc9;p=modules%2Fshaper.git Issue #1920: Wrong naming of faces' edges after translation Fixed history of edges in BuildPlugin_Face. --- diff --git a/src/BuildPlugin/BuildPlugin_Face.cpp b/src/BuildPlugin/BuildPlugin_Face.cpp index 774cfdf39..c03dd6182 100644 --- a/src/BuildPlugin/BuildPlugin_Face.cpp +++ b/src/BuildPlugin/BuildPlugin_Face.cpp @@ -16,6 +16,7 @@ #include #include +#include //================================================================================================= BuildPlugin_Face::BuildPlugin_Face() @@ -103,21 +104,16 @@ void BuildPlugin_Face::execute() for(ListOfShape::const_iterator anIt = aFaces.cbegin(); anIt != aFaces.cend(); ++anIt) { ResultBodyPtr aResultBody = document()->createBody(data(), anIndex); GeomShapePtr aShape = *anIt; + GeomAlgoAPI_Copy aCopy(aShape); + aShape = aCopy.shape(); aResultBody->store(aShape); + // Store edges. int anEdgeIndex = 1; - for(GeomAPI_ShapeExplorer anExp(aShape, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) { - GeomShapePtr anEdgeInResult = anExp.current(); - for(ListOfShape::const_iterator anIt = anEdges.cbegin(); anIt != anEdges.cend(); ++anIt) { - std::shared_ptr anEdgeInList(new GeomAPI_Edge(*anIt)); - if(anEdgeInList->isEqual(anEdgeInResult)) { - aResultBody->modified(anEdgeInList, anEdgeInResult, - "Edge_" + std::to_string((long long)anEdgeIndex), anEdgeIndex); - ++anEdgeIndex; - break; - } - } + GeomShapePtr anEdge = anExp.current(); + aResultBody->generated(anEdge, "Edge_" + std::to_string((long long)anEdgeIndex), anEdgeIndex); + ++anEdgeIndex; } setResult(aResultBody, anIndex);