0029496: No intersection curve between faces if starting points are given
authornbv <nbv@opencascade.com>
Thu, 8 Feb 2018 13:57:36 +0000 (16:57 +0300)
committerapn <apn@opencascade.com>
Fri, 16 Feb 2018 12:07:01 +0000 (15:07 +0300)
Now, bounded IntPatch_Points are found in case when starting points are used in intersection algorithm. Before the fix, these points were not looked for (even).

dox/dev_guides/upgrade/upgrade.md
src/IntPatch/IntPatch_Intersection.cxx
src/IntPatch/IntPatch_Intersection.hxx
src/IntPatch/IntPatch_PrmPrmIntersection.cxx
src/IntPatch/IntPatch_PrmPrmIntersection.hxx
src/IntPatch/IntPatch_WLineTool.cxx
src/IntPatch/IntPatch_WLineTool.hxx
src/IntTools/IntTools_FaceFace.cxx
tests/bugs/modalg_7/bug25994
tests/bugs/modalg_7/bug29488_2
tests/bugs/modalg_7/bug29496 [new file with mode: 0644]

index 2029e70..2884a23 100644 (file)
@@ -1532,3 +1532,8 @@ Since new version, the method BRepAdaptor_CompCurve::IsPeriodic() will always re
 
 @subsection upgrade_730_removed Removed features
 * The methods *SetDeflection*, *SetEpsilonT*, *SetDiscretize* of the class *IntTools_EdgeFace* have been removed as excessive.
+
+@subsection upgrade_730_IntersectionAPI Changes in classes responsible for intersection algorithm
+
+Interfaces of the following methods have been changed: IntPatch_WLineTool::ComputePurgedWLine(...), IntPatch_PrmPrmIntersection::Perform(...), IntPatch_Intersection::Perform(...), IntPatch_Intersection::ParamParamPerfom(...), IntPatch_Intersection::GeomGeomPerfom(...). Please see documentation about corresponding methods.
+
index bf8c949..7a8d2e7 100644 (file)
@@ -931,21 +931,19 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)&  theS1,
   //                              3. ts1 == ts2 == 0 <Param-Param>
 
   // Geom - Geom
-  const Standard_Boolean RestrictLine = Standard_True;
   if(ts1 == ts2 && ts1 == 1)
   {
     IntSurf_ListOfPntOn2S ListOfPnts;
     ListOfPnts.Clear();
     if(isGeomInt)
     {
-      GeomGeomPerfom( theS1, theD1, theS2, theD2, TolArc, 
-                      TolTang, ListOfPnts, RestrictLine,
-                      typs1, typs2, theIsReqToKeepRLine);
+      GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, TolTang,
+                     ListOfPnts, typs1, typs2, theIsReqToKeepRLine);
     }
     else
     {
       ParamParamPerfom(theS1, theD1, theS2, theD2, 
-              TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+              TolArc, TolTang, ListOfPnts, typs1, typs2);
     }
   }
 
@@ -962,7 +960,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)&  theS1,
     ListOfPnts.Clear();
 
     ParamParamPerfom(theS1, theD1, theS2, theD2, TolArc,
-                        TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+                        TolTang, ListOfPnts, typs1, typs2);
   }
 
   if(!theIsReqToPostWLProc)
@@ -979,7 +977,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)&  theS1,
       continue;
 
     Handle(IntPatch_WLine) aRW =
-      IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2, RestrictLine);
+      IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
 
     if(aRW.IsNull())
       continue;
@@ -1000,7 +998,6 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)&  theS1,
                                     const Standard_Real TolArc,
                                     const Standard_Real TolTang,
                                     IntSurf_ListOfPntOn2S& ListOfPnts,
-                                    const Standard_Boolean RestrictLine,
                                     const Standard_Boolean isGeomInt,
                                     const Standard_Boolean theIsReqToKeepRLine,
                                     const Standard_Boolean theIsReqToPostWLProc)
@@ -1184,7 +1181,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)&  theS1,
   if(!isGeomInt)
   {
     ParamParamPerfom(theS1, theD1, theS2, theD2, 
-                TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+                TolArc, TolTang, ListOfPnts, typs1, typs2);
   }
   else if(ts1 != ts2)
   {
@@ -1193,12 +1190,12 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)&  theS1,
   else if (ts1 == 0)
   {
     ParamParamPerfom(theS1, theD1, theS2, theD2,
-                TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+                TolArc, TolTang, ListOfPnts, typs1, typs2);
   }
   else if(ts1 == 1)
   {
-    GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, 
-                    TolTang, ListOfPnts, RestrictLine, typs1, typs2, theIsReqToKeepRLine);
+    GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, TolTang,
+                   ListOfPnts, typs1, typs2, theIsReqToKeepRLine);
   }
 
   if(!theIsReqToPostWLProc)
@@ -1215,7 +1212,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)&  theS1,
       continue;
 
     Handle(IntPatch_WLine) aRW = 
-      IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2, RestrictLine);
+      IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
 
     if(aRW.IsNull())
       continue;
@@ -1236,7 +1233,6 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)&
                                              const Standard_Real TolArc,
                                              const Standard_Real TolTang,
                                              IntSurf_ListOfPntOn2S& ListOfPnts,
-                                             const Standard_Boolean RestrictLine,
                                              const GeomAbs_SurfaceType typs1,
                                              const GeomAbs_SurfaceType typs2)
 {
@@ -1246,10 +1242,10 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)&
     Standard_Boolean ClearFlag = Standard_True;
     if(!ListOfPnts.IsEmpty())
     {
-      interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep, ListOfPnts, RestrictLine);
+      interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep, ListOfPnts);
       ClearFlag = Standard_False;
     }
-    interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep,ClearFlag);   //double call!!!!!!!
+    interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep,ClearFlag);
   }
   else if((theD1->DomainIsInfinite()) ^ (theD2->DomainIsInfinite()))
   {
@@ -1346,7 +1342,6 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
                                            const Standard_Real TolArc,
                                            const Standard_Real TolTang,
                                            IntSurf_ListOfPntOn2S& ListOfPnts,
-                                           const Standard_Boolean RestrictLine,
                                            const GeomAbs_SurfaceType theTyps1,
                                            const GeomAbs_SurfaceType theTyps2,
                                            const Standard_Boolean theIsReqToKeepRLine)
@@ -1358,7 +1353,7 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
   {
     done = Standard_False;
     ParamParamPerfom(theS1, theD1, theS2, theD2, 
-                TolArc, TolTang, ListOfPnts, RestrictLine, theTyps1, theTyps2);
+                TolArc, TolTang, ListOfPnts, theTyps1, theTyps2);
     return;
   }
 
@@ -1605,7 +1600,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)&  S1,
       continue;
 
     Handle(IntPatch_WLine) aRW =
-      IntPatch_WLineTool::ComputePurgedWLine(aWL, S1, S2, D1, D2, Standard_True);
+      IntPatch_WLineTool::ComputePurgedWLine(aWL, S1, S2, D1, D2);
 
     if(aRW.IsNull())
       continue;
index 96a4dac..5c5780e 100644 (file)
@@ -70,16 +70,16 @@ public:
   //!
   //! UVMaxStep is  a  parameter   used in  the  walking
   //! algorithms  to    compute the  distance between to
-  //! points in their respective parametrtic spaces.
+  //! points in their respective parametric spaces.
   Standard_EXPORT void SetTolerances (const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real UVMaxStep, const Standard_Real Fleche);
   
-  //! Flag theIsReqToKeepRLine has been enterred only for
+  //! Flag theIsReqToKeepRLine has been entered only for
   //! compatibility with TopOpeBRep package. It shall be deleted
   //! after deleting TopOpeBRep.
   //! When intersection result returns IntPatch_RLine and another
   //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
   //! will always keep both lines even if they are coincided.
-  //! Flag theIsReqToPostWLProc has been enterred only for
+  //! Flag theIsReqToPostWLProc has been entered only for
   //! compatibility with TopOpeBRep package. It shall be deleted
   //! after deleting TopOpeBRep.
   //! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
@@ -88,18 +88,18 @@ public:
   
   //! If isGeomInt == Standard_False, then method
   //! Param-Param intersection will be used.
-  //! Flag theIsReqToKeepRLine has been enterred only for
+  //! Flag theIsReqToKeepRLine has been entered only for
   //! compatibility with TopOpeBRep package. It shall be deleted
   //! after deleting TopOpeBRep.
   //! When intersection result returns IntPatch_RLine and another
   //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
   //! will always keep both lines even if they are coincided.
-  //! Flag theIsReqToPostWLProc has been enterred only for
+  //! Flag theIsReqToPostWLProc has been entered only for
   //! compatibility with TopOpeBRep package. It shall be deleted
   //! after deleting TopOpeBRep.
   //! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
-  //! obtained after intersection algorithm directly (wothout any post-processing). 
-  Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine = Standard_True, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True);
+  //! obtained after intersection algorithm directly (without any post-processing). 
+  Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True);
   
   //! Perform with start point
   Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolArc, const Standard_Real TolTang);
@@ -107,14 +107,14 @@ public:
   //! Uses for finding self-intersected surfaces.
   Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang);
   
-  //! Returns True if the calculus was succesfull.
+  //! Returns True if the calculus was successful.
     Standard_Boolean IsDone() const;
   
   //! Returns true if the is no intersection.
     Standard_Boolean IsEmpty() const;
   
   //! Returns True if the two patches are considered as
-  //! entierly tangent, i-e every restriction arc of one
+  //! entirely tangent, i-e every restriction arc of one
   //! patch is inside the geometric base of the other patch.
     Standard_Boolean TangentFaces() const;
   
@@ -157,15 +157,15 @@ protected:
 private:
 
   
-  Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
+  Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
   
-  //! Flag theIsReqToKeepRLine has been enterred only for
+  //! Flag theIsReqToKeepRLine has been entered only for
   //! compatibility with TopOpeBRep package. It shall be deleted
   //! after deleting TopOpeBRep.
   //! When intersection result returns IntPatch_RLine and another
   //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
   //! will always keep both lines even if they are coincided.
-  Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine = Standard_False);
+  Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine);
   
   Standard_EXPORT void GeomParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Boolean isNotAnalitical, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
 
index e346878..149f379 100644 (file)
@@ -1551,8 +1551,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)&
                                            const Standard_Real   Epsilon,
                                            const Standard_Real   Deflection,
                                            const Standard_Real   Increment,
-                                           IntSurf_ListOfPntOn2S& LOfPnts,
-                                           const Standard_Boolean RestrictLine)
+                                           IntSurf_ListOfPntOn2S& LOfPnts)
 {
   if (LOfPnts.IsEmpty()){
     done = Standard_True;
@@ -1788,15 +1787,13 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)&
 
               Standard_Real TolTang = TolTangency;
               Handle(IntPatch_WLine) wline = new IntPatch_WLine(PW.Line(),Standard_False,trans1,trans2);
-              if (RestrictLine){
-                //the method PutVertexOnLine can reduce the number of points in <wline>
-                IntPatch_RstInt::PutVertexOnLine(wline,Surf1,D1,Surf2,Standard_True,TolTang);
-                if (wline->NbPnts() < 2)
-                  continue;
-                IntPatch_RstInt::PutVertexOnLine(wline,Surf2,D2,Surf1,Standard_False,TolTang);
-                if (wline->NbPnts() < 2)
-                  continue;
-              }
+              //the method PutVertexOnLine can reduce the number of points in <wline>
+              IntPatch_RstInt::PutVertexOnLine(wline, Surf1, D1, Surf2, Standard_True, TolTang);
+              if (wline->NbPnts() < 2)
+                continue;
+              IntPatch_RstInt::PutVertexOnLine(wline, Surf2, D2, Surf1, Standard_False, TolTang);
+              if (wline->NbPnts() < 2)
+                continue;
 
               if(wline->NbVertex() == 0) {
                 IntPatch_Point vtx;
index 3293792..a4522c5 100644 (file)
@@ -68,7 +68,7 @@ public:
   //! Performs the intersection between <Caro1>  and
   //! <Caro2>. The method computes the polyhedron on
   //! each surface.
-  Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts, const Standard_Boolean RestrictLine);
+  Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts);
   
   //! Performs the intersection between <Caro1>  and
   //! <Caro2>. The method computes the polyhedron on
index 968c246..abfe5b0 100644 (file)
@@ -1282,8 +1282,7 @@ 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 Standard_Boolean              theRestrictLine)
+                     const Handle(Adaptor3d_TopolTool)  &theDom2)
 {
   Standard_Integer i, k, v, nb, nbvtx;
   Handle(IntPatch_WLine) aResult;
@@ -1386,11 +1385,8 @@ Handle(IntPatch_WLine) IntPatch_WLineTool::
     return aLocalWLine;
   }
 
-  if (theRestrictLine)
-  {
-    // II: Delete out of borders points.
-    aLocalWLine = DeleteOuterPoints(aLocalWLine, theS1, theS2, theDom1, theDom2);
-  }
+  // II: Delete out of borders points.
+  aLocalWLine = DeleteOuterPoints(aLocalWLine, theS1, theS2, theDom1, theDom2);
 
   // III: Delete points by tube criteria.
   Handle(IntPatch_WLine) aLocalWLineTube = 
index 6f72a22..0049f4a 100644 (file)
@@ -34,7 +34,6 @@ public:
   //!
   //! II
   //! Removes point out of borders in case of non periodic surfaces.
-  //! This step is done only if theRestrictLine is true.
   //!
   //! III
   //! Removes exceed points using tube criteria:
@@ -48,8 +47,7 @@ public:
                                               const Handle(Adaptor3d_HSurface) &theS1,
                                               const Handle(Adaptor3d_HSurface) &theS2,
                                               const Handle(Adaptor3d_TopolTool)  &theDom1,
-                                              const Handle(Adaptor3d_TopolTool)  &theDom2,
-                                              const Standard_Boolean      theRestrictLine);
+                                              const Handle(Adaptor3d_TopolTool)  &theDom2);
 
 //! Joins all WLines from theSlin to one if it is possible and records 
 //! the result into theSlin again. Lines will be kept to be splitted if:
index 5030a3e..8726f0a 100644 (file)
@@ -358,8 +358,6 @@ static Standard_Boolean isTreatAnalityc(const BRepAdaptor_Surface& theBAS1,
 void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
                                 const TopoDS_Face& aF2)
 {
-  Standard_Boolean RestrictLine = Standard_False;
-  
   if (myContext.IsNull()) {
     myContext=new IntTools_Context;
   }
@@ -509,14 +507,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
     myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection); 
   }
   
-  if((myHS1->IsUClosed() && !myHS1->IsUPeriodic()) || 
-     (myHS1->IsVClosed() && !myHS1->IsVPeriodic()) ||
-     (myHS2->IsUClosed() && !myHS2->IsUPeriodic()) || 
-     (myHS2->IsVClosed() && !myHS2->IsVPeriodic()))
-  {
-    RestrictLine = Standard_True;
-  }
-  //
   if((aType1 != GeomAbs_BSplineSurface) &&
       (aType1 != GeomAbs_BezierSurface)  &&
      (aType1 != GeomAbs_OtherSurface)  &&
@@ -524,8 +514,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
       (aType2 != GeomAbs_BezierSurface)  &&
      (aType2 != GeomAbs_OtherSurface))
   {
-    RestrictLine = Standard_True;
-
     if ((aType1 == GeomAbs_Torus) ||
         (aType2 == GeomAbs_Torus))
     {
@@ -533,27 +521,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
     }
   }
 
-  //
-  if(!RestrictLine)
-  {
-    TopExp_Explorer aExp;
-    for(Standard_Integer i = 0; (!RestrictLine) && (i < 2); i++)
-    {
-      const TopoDS_Face& aF=(!i) ? myFace1 : myFace2;
-      aExp.Init(aF, TopAbs_EDGE);
-      for(; aExp.More(); aExp.Next())
-      {
-        const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
-
-        if(BRep_Tool::Degenerated(aE))
-        {
-          RestrictLine = Standard_True;
-          break;
-        }
-      }
-    }
-  }
-
 #ifdef INTTOOLS_FACEFACE_DEBUG
     if(!myListOfPnts.IsEmpty()) {
       char aBuff[10000];
@@ -581,7 +548,7 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
     myIntersector.Perform(myHS1, dom1, TolArc, TolTang);
   else
     myIntersector.Perform(myHS1, dom1, myHS2, dom2, TolArc, TolTang, 
-                          myListOfPnts, RestrictLine, isGeomInt);
+                          myListOfPnts, isGeomInt);
 
   myIsDone = myIntersector.IsDone();
 
@@ -592,10 +559,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
       return;
     }
     //
-    if(RestrictLine) {
-      myListOfPnts.Clear(); // to use LineConstructor
-    }
-    //
     const Standard_Integer aNbLinIntersector = myIntersector.NbLines();
     for (Standard_Integer i=1; i <= aNbLinIntersector; ++i) {
       MakeCurve(i, dom1, dom2, TolArc);
index c6af846..1c8e1f3 100644 (file)
@@ -9,10 +9,28 @@ puts ""
 restore [locate_data_file bug25994_body.brep] body
 restore [locate_data_file bug25994_wing.brep] wing
 
-bfuse result body wing
+bclearobjects
+bcleartools
+baddobjects body
+baddtools wing
+bfillds
+bbop rs 4
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full nbv
+if { $nbv != 0 } { puts "Error : Section is not closed" }
+
+regexp {Tolerance MAX=([-0-9.+eE]+)} [tolerance rs] full toler
+if { $toler > 5.0e-5 } {
+  puts "Error: Tolerance after section is too large"
+}
+
+bbop result 1
 
 checkshape result
+checknbshapes result -solid 1 -shell 1 -face 13 -wire 15
+
+checkprops result -s 1.76161e+006 -v 1.07392e+008
 
 smallview
 fit
-checkview -screenshot -2d -path ${imagedir}/${test_image}.png
+checkview -display result -2d -path ${imagedir}/${test_image}.png
index 262b7e7..ed4be6d 100644 (file)
@@ -6,6 +6,9 @@ puts ""
 # Regression: boolean operation " general fuse" creates solid containing 5 not connected shells lying on the one level
 #################################################
 
+puts "TODO OCC29494 ALL: Error :  is WRONG because number of WIRE entities"
+puts "TODO OCC29494 ALL: Error :  is WRONG because number of FACE entities"
+
 restore [locate_data_file bug29488_shapes.brep] s
 
 bclearobjects
diff --git a/tests/bugs/modalg_7/bug29496 b/tests/bugs/modalg_7/bug29496
new file mode 100644 (file)
index 0000000..2df692c
--- /dev/null
@@ -0,0 +1,57 @@
+puts "========"
+puts "OCC29496"
+puts "========"
+puts ""
+#################################################
+# No intersection curve between faces if starting points are given
+#################################################
+
+restore [locate_data_file bug29488_shapes.brep] s
+explode s shell
+set i 1
+
+explode s_2 f; copy s_2_27 f1
+explode s_6 f; copy s_6_20 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.14991
+
+incr i
+
+explode s_2 f; copy s_2_27 f1
+explode s_7 f; copy s_7_8 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.15901
+
+incr i
+
+explode s_3 f; copy s_3_27 f1
+explode s_7 f; copy s_7_8 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.15901
+
+incr i
+
+explode s_3 f; copy s_3_27 f1
+explode s_6 f; copy s_6_16 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.14991
+
+incr i
+
+explode s_2 f; copy s_2_26 f1
+explode s_7 f; copy s_7_2 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.22733
+
+incr i
+
+explode s_3 f; copy s_3_26 f1
+explode s_7 f; copy s_7_2 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.22733