0027780: Face-face intersection produces 2D curve that has reversed derivative at...
[occt.git] / src / IntPatch / IntPatch_WLineTool.cxx
index 1b823b6..ca38c1c 100644 (file)
@@ -1197,7 +1197,8 @@ Handle(IntPatch_WLine) IntPatch_WLineTool::
                      const Handle(Adaptor3d_HSurface)   &theS1,
                      const Handle(Adaptor3d_HSurface)   &theS2,
                      const Handle(Adaptor3d_TopolTool)  &theDom1,
-                     const Handle(Adaptor3d_TopolTool)  &theDom2)
+                     const Handle(Adaptor3d_TopolTool)  &theDom2,
+                     const Standard_Boolean              theRestrictLine)
 {
   Standard_Integer i, k, v, nb, nbvtx;
   Handle(IntPatch_WLine) aResult;
@@ -1300,13 +1301,15 @@ Handle(IntPatch_WLine) IntPatch_WLineTool::
     return aLocalWLine;
   }
 
-  // II: Delete out of borders points.
-  Handle(IntPatch_WLine) aLocalWLineOuter = 
-    DeleteOuterPoints(aLocalWLine, theS1, theS2, theDom1, theDom2);
+  if (theRestrictLine)
+  {
+    // II: Delete out of borders points.
+    aLocalWLine = DeleteOuterPoints(aLocalWLine, theS1, theS2, theDom1, theDom2);
+  }
 
   // III: Delete points by tube criteria.
   Handle(IntPatch_WLine) aLocalWLineTube = 
-    DeleteByTube(aLocalWLineOuter, theS1, theS2);
+    DeleteByTube(aLocalWLine, theS1, theS2);
 
   if(aLocalWLineTube->NbPnts() > 1)
   {