]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix regression in unit tests
authorazv <azv@opencascade.com>
Fri, 25 Dec 2015 12:54:00 +0000 (15:54 +0300)
committerazv <azv@opencascade.com>
Fri, 25 Dec 2015 12:54:21 +0000 (15:54 +0300)
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp

index ae5e64ed8f0e96de913db875d4468f611bd57f83..e9475bd43d064c7602dc972599346cfaf26fc529 100644 (file)
@@ -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<const TopoDS_Edge&>(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;