diff --git a/src/IntPatch/IntPatch_WLineTool.cxx b/src/IntPatch/IntPatch_WLineTool.cxx index f3200190ac..d0730fbd53 100644 --- a/src/IntPatch/IntPatch_WLineTool.cxx +++ b/src/IntPatch/IntPatch_WLineTool.cxx @@ -1643,7 +1643,7 @@ void IntPatch_WLineTool::JoinWLines(IntPatch_SequenceOfLine& theSlin, aWLine2->Point(aNbPntsWL2 - 1); if (!CheckArgumentsToJoin(theS1, theS2, aPntLWL1, aPt1.Value(), - aPntFWL1.Value(), aPt2.Value(), aMinRad)) + aPntLWL1.Value(), aPt2.Value(), aMinRad)) { continue; } diff --git a/tests/bugs/modalg_7/bug31850_1 b/tests/bugs/modalg_7/bug31850_1 new file mode 100644 index 0000000000..906267109f --- /dev/null +++ b/tests/bugs/modalg_7/bug31850_1 @@ -0,0 +1,47 @@ +puts "=======================================================" +puts "0031850: Modeling Algorithms - boolean cut and common generate unexpected result" +puts "=======================================================" +puts "" + +restore [locate_data_file bug31850.brep] s +explode s + +bclearobjects +bcleartools +baddobjects s_1 +baddtools s_2 +bfillds + +bbop r0 0 +bbop r1 1 +bbop r2 2 +bbop r3 3 +bbop r4 4 +bbuild rgf + +foreach r {r0 r1 r2 r3 r4 rgf} { + checkshape $r + if {![regexp "OK" [bopcheck $r]]} { + puts "Error: the $r is a self-interfering shape" + } +} + +checknbshapes r0 -wire 28 -face 28 -shell 1 -solid 1 -t +checkprops r0 -s 1107.94 -v 472.151 + +checknbshapes r1 -wire 50 -face 45 -shell 1 -solid 1 -t +checkprops r1 -s 14959.7 -v 37939.8 + +checknbshapes r2 -wire 33 -face 28 -shell 1 -solid 1 -t +checkprops r2 -s 5244.61 -v 2516.56 + +checknbshapes r3 -wire 45 -face 45 -shell 1 -solid 1 -t +checkprops r3 -s 10823 -v 34951.1 + +checkprops r4 -l 203.491 +checksection r4 -r 10 + +checknbshapes rgf -wire 78 -face 73 -shell 3 -solid 3 -t +checkprops rgf -s 17175.6 -v 37939.8 + +checkview -display r0 -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug31850_2 b/tests/bugs/modalg_7/bug31850_2 new file mode 100644 index 0000000000..07312180d6 --- /dev/null +++ b/tests/bugs/modalg_7/bug31850_2 @@ -0,0 +1,54 @@ +puts "=======================================================" +puts "0031850: Modeling Algorithms - boolean cut and common generate unexpected result" +puts "=======================================================" +puts "" + +restore [locate_data_file bug31850.brep] s +explode s + +bfuzzyvalue 1.e-6 +bnondestructive 1 +brunparallel 1 +setfillhistory 0 + +bclearobjects +bcleartools +baddobjects s_1 +baddtools s_2 +bfillds + +bbop r0 0 +bbop r1 1 +bbop r2 2 +bbop r3 3 +bbop r4 4 +bbuild rgf + +boptions -default + +foreach r {r0 r1 r2 r3 r4 rgf} { + checkshape $r + if {![regexp "OK" [bopcheck $r]]} { + puts "Error: the $r is a self-interfering shape" + } +} + +checknbshapes r0 -wire 28 -face 28 -shell 1 -solid 1 -t +checkprops r0 -s 1107.94 -v 472.151 + +checknbshapes r1 -wire 50 -face 45 -shell 1 -solid 1 -t +checkprops r1 -s 14959.7 -v 37939.8 + +checknbshapes r2 -wire 33 -face 28 -shell 1 -solid 1 -t +checkprops r2 -s 5244.61 -v 2516.56 + +checknbshapes r3 -wire 45 -face 45 -shell 1 -solid 1 -t +checkprops r3 -s 10823 -v 34951.1 + +checkprops r4 -l 203.491 +checksection r4 -r 10 + +checknbshapes rgf -wire 78 -face 73 -shell 3 -solid 3 -t +checkprops rgf -s 17175.6 -v 37939.8 + +checkview -display r0 -2d -path ${imagedir}/${test_image}.png