From 3205d0f18200948632155bbe7b640bc1e482243d Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 25 Dec 2015 15:54:00 +0300 Subject: [PATCH] Fix regression in unit tests --- src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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; -- 2.39.2