]> OCCT Git - occt.git/commitdiff
0032849: Modeling Algorithms - Intersection algorithm returns incomplete result.
authorifv <ifv@opencascade.com>
Tue, 1 Feb 2022 09:17:52 +0000 (12:17 +0300)
committersmoskvin <smoskvin@opencascade.com>
Tue, 1 Mar 2022 15:57:09 +0000 (18:57 +0300)
GeomInt/GeomInt_IntSS.cxx, IntTools/IntTools_FaceFace.cxx - setting deflection 0.01
for case of two bspline surfaces
IntPolyh/IntPolyh_Intersection.cxx, IntPolyh/IntPolyh_Intersection.hxx - status IsParallel is added

BndLib/BndLib_Add3dCurve.cxx, IntTools/IntTools_TopolTool.cxx - fix small bugs

Correction of test scripts according to current behavior of algorithms

lowalgos/intss/bug32849 - test case added

42 files changed:
src/BndLib/BndLib_Add3dCurve.cxx
src/GeomInt/GeomInt_IntSS.cxx
src/IntPolyh/IntPolyh_Intersection.cxx
src/IntPolyh/IntPolyh_Intersection.hxx
src/IntTools/IntTools_FaceFace.cxx
src/IntTools/IntTools_TopolTool.cxx
src/QABugs/QABugs_20.cxx
tests/boolean/bfuse_complex/R9
tests/boolean/bfuse_complex/S1
tests/bugs/modalg_1/bug12918
tests/bugs/modalg_4/bug697_2
tests/bugs/modalg_4/bug697_4
tests/bugs/modalg_4/bug697_7
tests/bugs/modalg_4/bug697_8
tests/bugs/modalg_5/bug22829
tests/bugs/modalg_5/bug24003
tests/bugs/modalg_5/bug25625
tests/bugs/modalg_6/bug24161
tests/bugs/modalg_6/bug28283
tests/bugs/modalg_7/bug21134
tests/bugs/modalg_7/bug25082_1
tests/bugs/modalg_7/bug25082_2
tests/bugs/modalg_7/bug28150_1
tests/bugs/modalg_7/bug29900
tests/bugs/modalg_7/bug30559
tests/bugs/modalg_7/bug30760
tests/bugs/modalg_7/bug31890
tests/bugs/moddata_1/bug150_1
tests/bugs/moddata_1/bug150_2
tests/lowalgos/intss/begin
tests/lowalgos/intss/bug24472
tests/lowalgos/intss/bug25952_1
tests/lowalgos/intss/bug25952_2
tests/lowalgos/intss/bug25952_3
tests/lowalgos/intss/bug28493
tests/lowalgos/intss/bug32607
tests/lowalgos/intss/bug32849 [new file with mode: 0644]
tests/perf/modalg/bug10160_1
tests/perf/modalg/bug10160_2
tests/perf/modalg/bug10160_3
tests/perf/modalg/bug10160_4
tests/perf/modalg/bug29329

index e26d6a93f11e6f4c13a260c82fc3b481c53337c6..5a763ddc4145920499f2ed5a73cf46432dd3b271 100644 (file)
@@ -217,7 +217,7 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
          if(Bsaux->LastParameter()  < U2 ) u2  = Bsaux->LastParameter();
          //  modified by NIZHNY-EAP Fri Dec  3 14:29:18 1999 ___END___
        }
-        Standard_Real aSegmentTol = Precision::PConfusion();
+        Standard_Real aSegmentTol = 2. * Precision::PConfusion();
         if (Abs(u2 - u1) < aSegmentTol)
           aSegmentTol = Abs(u2 - u1) * 0.01;
        Bsaux->Segment(u1, u2, aSegmentTol);
index 1417ab4cf5ef8e9a4f3bae75b9da51dd7efa6732..ce061d207a3d4267659ad051dc05317770a990b7 100644 (file)
@@ -80,11 +80,16 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
   Handle(Adaptor3d_TopolTool) dom1 = new Adaptor3d_TopolTool(myHS1);
   Handle(Adaptor3d_TopolTool) dom2 = new Adaptor3d_TopolTool(myHS2);
   myLConstruct.Load(dom1,dom2,myHS1,myHS2);
-
+  
   Standard_Real TolArc = Tol;
   Standard_Real TolTang = Tol;
   Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
   Standard_Real Deflection = 0.1;
+  if (myHS1->GetType() == GeomAbs_BSplineSurface && myHS2->GetType() == GeomAbs_BSplineSurface)
+  {
+    Deflection /= 10.;
+  }
+
 
   myIntersector.SetTolerances(TolArc,TolTang,UVMaxStep,Deflection);
 
index 74ab7292c7c6ec816cf4f21cc8af423ec26701e4..0c8b2d59cde84e426373780a3fe22136092bf244 100644 (file)
 
 #include <NCollection_Map.hxx>
 
-static Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage);
-
 static Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
 
-static Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
-
 //=======================================================================
 //function : IntPolyh_Intersection
 //purpose  : 
@@ -49,6 +45,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
   myNbSU2 = 10;
   myNbSV2 = 10;
   myIsDone = Standard_False;
+  myIsParallel = Standard_False;
   mySectionLines.Init(1000);
   myTangentZones.Init(10000);
   Perform();
@@ -72,6 +69,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
   myNbSU2 = theNbSU2;
   myNbSV2 = theNbSV2;
   myIsDone = Standard_False;
+  myIsParallel = Standard_False;
   mySectionLines.Init(1000);
   myTangentZones.Init(10000);
   Perform();
@@ -95,6 +93,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
   myNbSU2 = theUPars2.Length();
   myNbSV2 = theVPars2.Length();
   myIsDone = Standard_False;
+  myIsParallel = Standard_False;
   mySectionLines.Init(1000);
   myTangentZones.Init(10000);
   Perform(theUPars1, theVPars1, theUPars2, theVPars2);
@@ -442,7 +441,7 @@ void IntPolyh_Intersection::MergeCouples(IntPolyh_ListOfCouples &anArrayFF,
 //           too small (less than 5 deg), the advanced intersection is required.
 //           Otherwise, the standard intersection is considered satisfactory.
 //=======================================================================
-Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage)
+Standard_Boolean IntPolyh_Intersection::IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage)
 {
   if (!theMaillage)
     return Standard_True;
@@ -452,7 +451,7 @@ Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage)
   // Number of interfering pairs
   Standard_Integer aNbCouples = Couples.Extent();
   // Flag to define whether advanced intersection is required or not
-  Standard_Boolean isAdvReq = (aNbCouples == 0);
+  Standard_Boolean isAdvReq = (aNbCouples == 0) && !IsParallel();
   if (isAdvReq)
     // No interfering triangles are found -> perform advanced intersection
     return isAdvReq;
@@ -507,7 +506,7 @@ Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
 //function : AnalyzeIntersection
 //purpose  : Analyzes the intersection on the number of interfering triangles
 //=======================================================================
-Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
+Standard_Boolean IntPolyh_Intersection::AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
 {
   if (!theMaillage)
     return Standard_False;
@@ -528,7 +527,9 @@ Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
     if (npara >= theMaillage->GetArrayOfTriangles(1).NbItems() ||
         npara >= theMaillage->GetArrayOfTriangles(2).NbItems())
     {
-      return Standard_False;
+      Couples.Clear();
+      myIsParallel = Standard_True;
+      return Standard_True;
     }
   }
   return Standard_True;
index 776f39e1cb04648311c3584c3e1874886fd8a084..ab37543f2493cc274357593f9507360fd241b128 100644 (file)
@@ -83,6 +83,12 @@ public: //! @name Getting the results
     return myIsDone;
   }
 
+  //! Returns state of the operation
+  Standard_Boolean IsParallel() const
+  {
+    return myIsParallel;
+  }
+
   //! Returns the number of section lines
   Standard_Integer NbSectionLines() const
   {
@@ -186,6 +192,9 @@ private: //! @name Performing the intersection
                                     IntPolyh_ListOfCouples& theArrayRF,
                                     IntPolyh_ListOfCouples& theArrayRR) const;
 
+  Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
+  Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage);
+
 
 private: //! @name Fields
 
@@ -200,6 +209,7 @@ private: //! @name Fields
   Standard_Boolean myIsDone;                   //!< State of the operation
   IntPolyh_ArrayOfSectionLines mySectionLines; //!< Section lines
   IntPolyh_ArrayOfTangentZones myTangentZones; //!< Tangent zones
+  Standard_Boolean myIsParallel;
 };
 
 #endif // _IntPolyh_Intersection_HeaderFile
index 181d9d47a572aa52abfedd9807acaa2f4a4b3d45..443783c26efd486abaf642614215f2be1a06832a 100644 (file)
@@ -504,7 +504,11 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
 
   {
     const Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
-    const Standard_Real Deflection = 0.1;
+    Standard_Real Deflection = 0.1;
+    if (aType1 == GeomAbs_BSplineSurface && aType2 == GeomAbs_BSplineSurface)
+    {
+      Deflection /= 10.;
+    }
     myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection); 
   }
   
index ca5c30a0a3a773a0963ab2a8d0efc4a648110034..7bbe6b734acaccea8e13dd2dc3b2e1a7b1657a8a 100644 (file)
@@ -448,5 +448,5 @@ void IntTools_TopolTool::SamplePnts(const Standard_Real theDefl,
   myV0 = myVPars->Value(1);
 
   myDU = (myUPars->Value(myNbSmplU) - myU0)/(myNbSmplU-1);  
-  myDV = (myVPars->Value(myNbSmplV) - myU0)/(myNbSmplV-1);
+  myDV = (myVPars->Value(myNbSmplV) - myV0)/(myNbSmplV-1);
 }
index 4248cd2b2e1b451e4b5796f9d95876e6176be509..d31af7ef8b23006715e84f7cb6958e1219c450b3 100644 (file)
@@ -4183,6 +4183,82 @@ static Standard_Integer OCC32744(Draw_Interpretor& theDi, Standard_Integer theNb
   return 0;
 }
 
+//=======================================================================
+//function : QACheckBends
+//purpose :
+//Checks whether the Curve has a loop/bend
+//Use: QACheckBends curve [CosMaxAngle [NbPoints]]
+//NbPoints sets the interval of discretization;
+//CosMaxAngle sets the maximal rotation angle between two adjacent segments.
+//This value must be equal to the cosine of this angle.
+//=======================================================================
+static Standard_Integer QACheckBends(Draw_Interpretor& theDI,
+  Standard_Integer  theNArg,
+  const char ** theArgVal)
+{
+  // Checks whether theCurve has a loop / bend
+
+  if (theNArg < 2)
+  {
+    theDI << "Use: " << theArgVal[0] << " QACheckBends curve [CosMaxAngle [theNbPoints]]" << "\n";
+    return 1;
+  }
+
+
+  Handle(Geom_Curve) aCurve = DrawTrSurf::GetCurve(theArgVal[1]);
+
+  if(aCurve.IsNull())
+  {
+    theDI << " " << theArgVal[1] << " : NULL curve" << "\n";
+    return 0;
+  }
+  
+  Standard_Real aCosMaxAngle = .8;
+  Standard_Integer aNbPoints = 1000;
+
+  if (theNArg > 2)
+  {
+    aCosMaxAngle = Draw::Atof(theArgVal[2]);
+  }
+
+  if (theNArg > 3)
+  {
+    aNbPoints = Draw::Atoi(theArgVal[3]);
+  }
+
+
+  Standard_Real U1 = aCurve->FirstParameter(), U2 = aCurve->LastParameter();
+  if (Precision::IsInfinite(U1) || Precision::IsInfinite(U2))
+  {
+    theDI << "Infinite interval  : " << U1 << "  " << U2 << "\n";
+    return 0;
+  }
+  
+
+  Standard_Real delta = (U2 - U1) / aNbPoints;
+  gp_Pnt aP;
+  gp_Vec aDC1, aDC2;
+  aCurve->D1(U1, aP, aDC1);
+  gp_Dir aD1(aDC1);
+  Standard_Real p;
+  for (p = U1; p <= U2; p += delta)
+  {
+    aCurve->D1(p, aP, aDC2);
+    gp_Dir aD2(aDC2);
+    Standard_Real aCos = aD1*aD2;
+
+    if (aCos < aCosMaxAngle)
+    {
+      theDI << "Error: The curve " << theArgVal[1] << " is possible to have a bend at parameter " << p << ". Please check carefully \n";
+    }
+
+    aD1 = aD2;
+  }
+
+  return 0;
+}
+
+
 
 void QABugs::Commands_20(Draw_Interpretor& theCommands) {
   const char *group = "QABugs";
@@ -4275,5 +4351,10 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) {
                   __FILE__,
                   OCC32744, group);
 
+  theCommands.Add("QACheckBends",
+    "QACheckBends curve [CosMaxAngle [theNbPoints]]",
+    __FILE__,
+    QACheckBends, group);
+
   return;
 }
index 930619b38b1b78061f9c51c1d4d9b975f1151b16..afa58fec049edc2b15904b8d0ca3710d66307a3b 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 #jmu
 #pro18457
 #cascade 2.1
index ea5f89f8b323aeda785060e55f815cbd750e06df..f9e33f53a10719a2e59966607ec68e4b823a0f8b 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "PRO15946"
 puts "Fuse"
 puts ""
index 79cd27df430baae9b8052710042d12029e8a7a4b..89036d6ee598e3424509061fde762a552312af5a 100755 (executable)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "============"
 puts "OCC12918"
 puts "============"
index cbe47324fbdcbc3462681e7d06366e17d912995a..f3fbf27ced0dcfbc5d679cb3f24f3428c1c43cc6 100755 (executable)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "============"
 puts "OCC697"
 puts "============"
index b1fa3326aa1f0ee3e4e473e592e15b73cae76421..ee86ee2fb43def6adbef66aea5a3537047a7b3fc 100755 (executable)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "============"
 puts "OCC697"
 puts "============"
index 5d696c848e00906af5ec743bb151897517a9a04a..4462acb5725cb03cdc74f4edca09d91a0ef9eb3c 100755 (executable)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "============"
 puts "OCC697"
 puts "============"
index d8e513d0b9641612fe6203a000bdab1737ddf4af..fc23c71d0aefe5ad0033d51bb1051f62c1f466ee 100755 (executable)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "============"
 puts "OCC697"
 puts "============"
index 53082db257d924b6db171f4a1c86634241556e0d..ff6e94fcf3a88ee1c9adb64efddab5b246128085 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "=========="
 puts "OCC22829"
 puts "=========="
index 56a68b2f3ca43200efa870e5e79a1a4b27b13f9b..824ee6eeffea1c2f313aa624bf692edde182da88 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "================"
 puts "OCC24003"
 puts "================"
index 423856aa6ae4eb95f5bcaa707c74ed47b587a4a0..5f57714343d07c4bc54727f93c6f98554f08e8ac 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "================"
 puts "OCC25625"
 puts "================"
index d815d352c82b764f491dcb8c8fc6f58019757ac6..2fb91b73c6b8c1c8be6de4b73b80132cd90f6079 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "=========="
 puts "OCC24161"
 puts "=========="
index 7acd975afc4eac0867d6c261d3dd8407aa71c098..f800db33e629355136d402c85621f037acf1130f 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "========"
 puts "OCC28283"
 puts "========"
index 11c20d5c09efa44f48bb35c6ee72fa1d9613839a..0bd45a2e87ea4c2e7ebb6495f26fe1d030cf48f3 100755 (executable)
@@ -1,4 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 puts "TODO OCC21134  ALL: Error: checkshape command does not return faulty shapes"
 
 puts "============"
index b668247366aaed06261a45aee95ca15ef34889cf..fc97644ddf7317ada047ec7c559c84c0118f34f3 100644 (file)
@@ -3,7 +3,6 @@ puts "0025082: bopcommon returns different result on Windows and Linux system"
 puts "========"
 puts ""
 
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 
 restore [locate_data_file bug25054_shape1.brep] b1
 restore [locate_data_file bug25054_shape2.brep] b2
index bd42246f828844e56fce1c6a2dca09e2519f456f..03b35ef05a89ddd55c83ab1d9d09d535cb047f6f 100644 (file)
@@ -3,7 +3,6 @@ puts "0025082: bopcommon returns different result on Windows and Linux system"
 puts "========"
 puts ""
 
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 
 restore [locate_data_file bug25054_shape1.brep] b1
 restore [locate_data_file bug25054_shape2.brep] b2
index 56b22c2e74814dc494fd5f7a3af24b0a499602bb..bee594973e5448be6f32eab10ff68eab3db9020f 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "========"
 puts "OCC28150"
 puts "========"
index 6afc847d180d4a7089e1cf993961d1b496bfceff..5a4f51c08af6e945c1924b95b4caa384c08ca209 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 All: Intersection of pair of shapes has failed"
-
 puts "========"
 puts "OCC29900: Invalid result of FUSE operation"
 puts "========"
index b09929176a3e38228e13e8aa8f9007e24134af95..e6c59600149c58f522ee2ef1a447f43db1b84436 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "============================================================================================="
 puts "0030559: BOP Fuse: result is inconsistent"
 puts "============================================================================================="
index 71f5a27170334c9da9fe8aebcac6a1d6082f07b6..647670cc7b5088228cbef31cb5505847814ca82e 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "========"
 puts "30760: Modeling Algorithms - Intersection fails in Occt 7.3.0"
 puts "========"
index f6d37c0c6ed13006aa7c1008f70394738ad123ef..02516c912cf2df5ce93a8a007bef85bfdd52a55d 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
-
 puts "=========================================="
 puts "0031890: Invalid result of common fuse BOP"
 puts "=========================================="
index 82741440205c348ecd59a203e25a004b549651e2..e36e12482b037134e0b9d0f2dd612cfcc0dfc1b9 100755 (executable)
@@ -1,4 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
 
 puts "================"
index 42588b65f77fdb6e7dd94f1c4eaff5bebca208f5..9bc333192b96cc04d4b9dbcc66f5b3354e933861 100755 (executable)
@@ -1,4 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
 
 puts "================"
index a73c682a6e574ace57eadd4b9543fd528f5d5782..8b4c1d235acbb11d66b945ca1f3c262da6a91932 100644 (file)
@@ -1,33 +1,3 @@
-# Checks whether theCurve has a loop/bend
-# Use: CheckLoops curve CosMaxAngle [theNbPoints]}
-# theNbPoints sets the interval of discretization;
-# theCosMaxAngle sets the maximal rotation angle between two adjacent segments. This value must be equal to the cosine of this angle.
-
-help CheckLoops {curve CosMaxAngle theNbPoints }
-proc CheckLoops {theCurve {theCosMaxAngle 0.8} {theNbPoints 1000.0}} {
-  upvar #0 $theCurve aCurve
-  bounds aCurve U1 U2
-    
-  set delta [dval (U2-U1)/$theNbPoints]
-  cvalue aCurve [dval U1] xp yp zp dx1 dy1 dz1
-  
-  for {set p [dval U1]} {$p <= [dval U2]} {set p [expr $p + $delta]} {
-    cvalue aCurve $p xp yp zp dx2 dy2 dz2
-    
-    #Check if the angle between the vectors {dx1 dy1 dz1} and {dx2 dy2 dz2} is less than 30deg.
-    set nv1 [ dval dx1*dx1+dy1*dy1+dz1*dz1 ] 
-    set nv2 [ dval dx2*dx2+dy2*dy2+dz2*dz2 ] 
-    set dp [ dval dx1*dx2+dy2*dy2+dz1*dz2 ] 
-    
-    if {$dp < [ expr $theCosMaxAngle * sqrt($nv1 * $nv2) ] } {
-      puts "Error: The curve $theCurve is possible to have a bend at parameter $p. Please check carefully"
-    }      
-    
-    dset dx1 dx2
-    dset dy1 dy2
-    dset dz1 dz2
-  }
-}
 
 # General check of the result of geometrical intersection
 help CheckIntersectionResult { surf1 surf2 ListOfCurves NbPoints TolerS1 TolerS2 }
index 8f0f2393b031ce9a981ae7a4f1dd5cba9eba559c..57f0002ba13329c8f077d79dbb52198b1669da67 100644 (file)
@@ -6,8 +6,11 @@ puts ""
 ## Wrong section curves
 ###############################
 
-puts "TODO OCC29501 ALL: Error in ii12_22"
-puts "TODO OCC29501 All: Error: The curve ii12_22 is possible"
+puts "TODO OCC29501 All: Error: The curve ii13_20 is possible"
+puts "TODO OCC29501 All: Error: The curve ii13_48 is possible"
+
+pload QAcommands
+
 set MaxToler 1.5e-4
 
 restore [locate_data_file bug24472_Pipe_1.brep] b1
@@ -26,6 +29,9 @@ puts "First test"
 intersect ii12 s1 s2
 
 foreach c [directory ii12*] {
+
+  puts "Curve $c" 
+
   bounds $c U1 U2
   
   if {[dval U2-U1] < 1.0e-9} {
@@ -33,7 +39,7 @@ foreach c [directory ii12*] {
   }
   
   # cos(~75.5deg)
-  CheckLoops $c 0.25
+  QACheckBends $c 0.25
   
   xdistcs $c s1 U1 U2 10 $MaxToler
   xdistcs $c s2 U1 U2 10 $MaxToler
@@ -55,6 +61,9 @@ puts "Third test"
 intersect ii13 s1 s3
 
 foreach c [directory ii13*] {
+
+  puts "Curve $c" 
+
   bounds $c U1 U2
   
   if {[dval U2-U1] < 1.0e-9} {
@@ -62,7 +71,7 @@ foreach c [directory ii13*] {
   }
   
   # cos(~75.5deg)
-  CheckLoops $c 0.25
+  QACheckBends $c 0.25
 
   xdistcs $c s1 U1 U2 10 $MaxToler
   xdistcs $c s2 U1 U2 10 $MaxToler
index 41c36f6beb67612a6eafa6b144babd983c709a6a..f9da92fbb8220815ec01a3ef5b1bccfaf92fde02 100644 (file)
@@ -3,6 +3,7 @@ puts "0025952: Wrong intersection curve"
 puts "========"
 puts ""
 
+pload QAcommands
 puts "TODO OCC25952 ALL: Error: The curve c_1 is possible to have a bend at"
 
 restore [locate_data_file bug25952_shape.brep] q
@@ -17,7 +18,7 @@ if {$NbCurv != 1} {
   puts "Error: Please check NbCurves for intersector"
 } else {
   checklength c_1 -l 0.00068663591416249451
-  CheckLoops c_1
+  QACheckBends c_1
 }
 
 smallview 
index 307a89f1d410c20bf61b087317e5091553fbab4b..7e28e594e8a5886f14d743394f67236cd54b840d 100644 (file)
@@ -2,7 +2,7 @@ puts "========"
 puts "0025952: Wrong intersection curve"
 puts "========"
 puts ""
-
+pload QAcommands
 puts "TODO OCC25952 ALL: Error: The curve res_1 is possible to have a bend at parameter"
 
 set aGoodNbCurves 1
@@ -35,7 +35,7 @@ while { $AllowRepeat != 0 } {
     set AllowRepeat 0
   } else {
     lappend CurvesList res_$ic
-    CheckLoops res_$ic
+    QACheckBends res_$ic
     incr ic
   }
 }
index 411cf51c9def86826546602a1e42666ce554ff34..7b441adf0405405012f2064dc6322936513ebcfe 100644 (file)
@@ -3,6 +3,7 @@ puts "0025952: Wrong intersection curve"
 puts "========"
 puts ""
 
+pload QAcommands
 puts "TODO OCC26510 ALL: Error: 1 curve is expected but 0 ones are found"
 
 set aGoodNbCurves 1
@@ -33,7 +34,7 @@ while { $AllowRepeat != 0 } {
     set AllowRepeat 0
   } else {
     lappend CurvesList res_$ic
-    CheckLoops res_$ic
+    QACheckBends res_$ic
     incr ic
   }
 }
index f05c911fdbc40020c5cd8b819fd8e1d8426c23fc..ce87d71f7ed4163559fc5a9e1c3388f958154042 100644 (file)
@@ -3,6 +3,8 @@ puts "0028493: Intersection algorithm produces curve with loop"
 puts "========"
 puts ""
 
+pload QAcommands
+
 foreach a [directory c*] {unset $a}
 
 restore [locate_data_file bug28491_H0.brep] h0
@@ -25,7 +27,7 @@ for { set ic 1 } { $ic <= $NbCurv } {incr ic} {
     continue
   }
   
-  CheckLoops c_$ic 0.86602540378443864676372317075294    
+  QACheckBends c_$ic 0.86602540378443864676372317075294    
 }
 
 smallview
index 746f547d7177c1a0123f96621e7daeb24055fedf..d75e78c1c47b26f3905fe0a824f927c52347f0ff 100644 (file)
@@ -3,6 +3,8 @@ puts "0032607: Modeling Algorithms - BOPAlgo_BOP returns incomplete result"
 puts "========"
 puts ""
 
+pload QAcommands
+
 restore [locate_data_file bug32607.brep] s
 explode s 
 
@@ -13,7 +15,7 @@ if {$NbCurv != 1} {
   puts "Error: Please check NbCurves for intersector"
 } else {
   checklength c_1 -l 14.469397997508448
-  CheckLoops c_1
+  QACheckBends c_1
 }
 
 smallview 
diff --git a/tests/lowalgos/intss/bug32849 b/tests/lowalgos/intss/bug32849
new file mode 100644 (file)
index 0000000..6b2c0f0
--- /dev/null
@@ -0,0 +1,30 @@
+puts "========"
+puts "0032849: Modeling Algorithms - Intersection algorithm returns incomplete result"
+puts "========"
+puts ""
+
+restore [locate_data_file bug32849_s1] s1
+restore [locate_data_file bug32849_s2] s2
+
+mkface f1 s1;
+mkface f2 s2;
+
+set log [bopcurves f1 f2 -2d]
+
+regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} $log full Toler NbCurv
+
+if {$NbCurv != 2} {
+  puts "Error: Number of curves is wrong"
+}
+
+if { $Toler > 1.0e-8} {
+  puts "Error: Big tolerance value"  
+}
+
+
+
+
+
+
+
index 56726c3c3ef01831521eca75f8ae7e59edd9b314..58d1cdc0e94a27d00d32e3cf8c3beb58f7e8e6f7 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 puts "TODO OCC11111 ALL: Error :  is WRONG because number of "
 
 puts "============"
index 9219b0c69c950b2c22371767a04a4fe6ea688e25..d0a8479441a288d21215591a7684068d81427341 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 puts "TODO OCC11111 ALL: Error :  is WRONG because number of "
 
 puts "============"
index 3f9fcba28b7fdd892b7a8a9ae142ad033d9a38ab..fccaad46e7bc617aaf15b2ce3a438bad40d52093 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 puts "TODO OCC11111 ALL: Error :  is WRONG because number of "
 
 puts "============"
index c22f43bcb17455fb09f8d888bee954577ec19dc7..198e23f6018bde44df097d3274b70720edeb9480 100644 (file)
@@ -1,4 +1,3 @@
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 puts "TODO OCC11111 ALL: Error :  is WRONG because number of "
 
 puts "============"
index 680a82304db52f53a825e65a6c4b9992769c3ae6..6d862b65b3068fbc4180b6e58b324212786ac357 100644 (file)
@@ -3,7 +3,6 @@ puts "0029329: Modeling Algorithms - Low performance of the General Fuse algorit
 puts "========"
 puts ""
 
-puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
 
 restore [locate_data_file bug29329_objects.brep] a
 restore [locate_data_file bug29329_tools.brep] b