From: azv Date: Fri, 25 Dec 2015 12:54:00 +0000 (+0300) Subject: Fix regression in unit tests X-Git-Tag: V_2.1.0~38 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3205d0f18200948632155bbe7b640bc1e482243d;p=modules%2Fshaper.git Fix regression in unit tests --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index ae5e64ed8..e9475bd43 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -150,7 +150,18 @@ void GeomAlgoAPI_SketchBuilder::createFaces( TopoDS_Vertex aCurVertex = aStartVertex; gp_Dir aCurDir = aDirY.Reversed(); - gp_Dir aCurNorm = aNorm; //aNorm.Reversed(); + gp_Dir aCurNorm = aNorm.Reversed(); + + const BOPCol_ListOfShape& anEdgesList = aMapVE.FindFromKey(aStartVertex); + BOPCol_ListOfShape::Iterator aEdIter(anEdgesList); + for (; aEdIter.More(); aEdIter.Next()) { + const TopoDS_Edge& anEdge = static_cast(aEdIter.Value()); + gp_Dir aTang = getOuterEdgeDirection(anEdge, aStartVertex); + if (aTang.X() < 0.0) { + aCurNorm = aNorm; + break; + } + } // Go through the edges and find loops TopoDS_Vertex aNextVertex;