]> OCCT Git - occt-copy.git/commitdiff
0030786: BOP Cut: artifacts with enabled nondestructive flag
authoremv <emv@opencascade.com>
Thu, 20 Jun 2019 08:33:14 +0000 (11:33 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 18 Sep 2020 14:46:49 +0000 (17:46 +0300)
Avoid PaveBlocks initialization on vertex update.
Test case for the issue.

src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
tests/bugs/modalg_7/bug30786 [new file with mode: 0644]

index d752c73ef314733ee9aefeed7cee6c5fe6d63414..b5c9eff0a57d60c7c01feea16efdc8bde7f2f836 100644 (file)
@@ -152,8 +152,6 @@ Standard_Integer BOPAlgo_PaveFiller::UpdateVertex
   //
   // add vertex to SD map
   myDS->AddShapeSD(nV, nVNew);
-  //
-  myDS->InitPaveBlocksForVertex(nV);
 
   // Add new vertex to map of vertices to avoid further extension
   myVertsToAvoidExtension.Add(nVNew);
index 7dad175ea6ffa1410ded76f85438f5d4a9140751..e5689c50c9ac980344c9942480fc3d31113c594c 100644 (file)
@@ -3250,6 +3250,7 @@ void BOPAlgo_PaveFiller::UpdateBlocksWithSharedVertices()
         aTolV=BRep_Tool::Tolerance(aV);
         //
         UpdateVertex(nV, aTolV);
+        myDS->InitPaveBlocksForVertex (nV);
       }
     }//for (j=0; j<aNbC; ++j) {
   }//for (i=0; i<aNbFF; ++i) {
diff --git a/tests/bugs/modalg_7/bug30786 b/tests/bugs/modalg_7/bug30786
new file mode 100644 (file)
index 0000000..1461c7d
--- /dev/null
@@ -0,0 +1,31 @@
+puts "========"
+puts "0030786: BOP Cut: artifacts with enabled nondestructive flag"
+puts "========"
+puts ""
+
+restore [locate_data_file bug30786_Corner_Shapes.brep] s
+explode s
+
+bnondestructive 1
+bclearobjects
+bcleartools
+baddobjects s_1
+baddtools s_2 s_3 s_4
+bfillds
+bbop result 2
+
+bnondestructive 0
+bclearobjects
+bcleartools
+baddobjects s_1
+baddtools s_2 s_3 s_4
+bfillds
+bbop result1 2
+
+foreach r {result result1} {
+  checkshape $r
+  checknbshapes $r -wire 32 -face 32 -shell 2 -solid 2
+  checkprops $r -s 277739 -v 543086
+}
+
+checkview -display result -2d -path ${imagedir}/${test_image}.png