]> OCCT Git - occt.git/commitdiff
0032199: Modeling Algorithms - BOP Cut produces invalid shape
authoremv <emv@opencascade.com>
Tue, 9 Mar 2021 04:32:30 +0000 (07:32 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 16 Apr 2021 13:13:06 +0000 (16:13 +0300)
Use section tolerance for checking the valid range.

src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
tests/bugs/modalg_7/bug32136

index 1d22e9f9295253f6f8bd00f222ff815ae56d1040..27a79abca29a02427f19aa02882f9a40aba08bcb 100644 (file)
@@ -648,8 +648,8 @@ void BOPAlgo_PaveFiller::MakeBlocks()
         // check if the pave block has a valid range
         Standard_Real aFirst, aLast;
         if (!BRepLib::FindValidRange(GeomAdaptor_Curve(aIC.Curve()), aTolR3D,
-                                     aT1, BRep_Tool::Pnt(aV1), BRep_Tool::Tolerance(aV1),
-                                     aT2, BRep_Tool::Pnt(aV2), BRep_Tool::Tolerance(aV2),
+                                     aT1, BRep_Tool::Pnt(aV1), Max (aTolR3D, BRep_Tool::Tolerance(aV1)),
+                                     aT2, BRep_Tool::Pnt(aV2), Max (aTolR3D, BRep_Tool::Tolerance(aV2)),
                                      aFirst, aLast))
         {
           // If the pave block does not have valid range, i.e. it is completely
index 6b407fbf881817f36d4e1df854c0940f1b7b89ba..b29419d54693f308c7b90fd2d304a065e71dd66c 100644 (file)
@@ -31,4 +31,24 @@ foreach sh [explode t] {
   checkmaxtol $sh -ref 5.e-6
 }
 
-checkview -display result -2d -path ${imagedir}/${test_image}.png
+checkview -display result -2d -path ${imagedir}/${test_image}_fuse.png
+
+# subsequent cut operation
+box box 0.06335 0.06335 0.05
+bclearobjects
+bcleartools
+baddobjects box
+baddtools result
+bfillds
+bbop result_cut 2
+
+checkshape result_cut
+checknbshapes result_cut -face 756 -shell 1 -solid 1 -t
+checkprops result_cut -s 0.0545148 -v 0.000191753
+
+if {![regexp "This shape seems to be OK" [bopcheck result_cut]]} {
+  puts "Error: the result_cut shape is self-interfered"
+}
+checkmaxtol result_cut -ref 5.e-6
+
+checkview -display result_cut -2d -path ${imagedir}/${test_image}_cut.png