mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029843: Modeling Algorithms - Boolean FUSE produces incorrect result
When splitting the shell/face with internal faces/edges use the 'internal' criteria of the face to choose the way to create loops. Side effect changes: - When performing Boolean operation - move the objects located far from Origin to the Origin to increase the accuracy of intersections.
This commit is contained in:
40
tests/bugs/modalg_7/bug26876
Normal file
40
tests/bugs/modalg_7/bug26876
Normal file
@@ -0,0 +1,40 @@
|
||||
puts "============================================================================"
|
||||
puts "0026876: Modeling Algorithms - Boolean algorithm fails or produce faulty shape"
|
||||
puts "============================================================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug26883_object.brep] o
|
||||
restore [locate_data_file bug26883_fuse_tool1.brep] ft1
|
||||
restore [locate_data_file bug26883_fuse_tool2.brep] ft2
|
||||
restore [locate_data_file bug26876_cut_tool1.brep] ct1
|
||||
restore [locate_data_file bug26876_cut_tool2.brep] ct2
|
||||
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects o
|
||||
baddtools ft1 ft2
|
||||
bfillds
|
||||
bbop result_fuse 1
|
||||
|
||||
checkshape result_fuse
|
||||
if {![regexp "OK" [bopcheck result_fuse]]} {
|
||||
puts "Error: the result of FUSE operation is a self-interfering shape"
|
||||
}
|
||||
checkprops result_fuse -s 2117 -v 607.602
|
||||
checknbshapes result_fuse -wire 52 -face 44 -shell 3 -solid 1 -t
|
||||
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects result_fuse
|
||||
baddtools ct1 ct2
|
||||
bfillds
|
||||
bbop result 2
|
||||
|
||||
checkshape result
|
||||
if {![regexp "OK" [bopcheck result]]} {
|
||||
puts "Error: the result of CUT operation is a self-interfering shape"
|
||||
}
|
||||
checkprops result -s 2112.67 -v 607.132
|
||||
checknbshapes result -wire 50 -face 42 -shell 2 -solid 1 -t
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
@@ -1,6 +1,3 @@
|
||||
puts "TODO OCC26882 ALL: Error : is WRONG because number of VERTEX entities in shape"
|
||||
puts "TODO OCC26882 ALL: Error : is WRONG because number of EDGE entities in shape"
|
||||
|
||||
puts "========"
|
||||
puts "OCC26882"
|
||||
puts "========"
|
||||
|
@@ -15,10 +15,37 @@ baddobjects b1
|
||||
baddtools b2
|
||||
bfillds
|
||||
|
||||
bbop result 1
|
||||
bbop r_0 0
|
||||
bbop r_1 1
|
||||
bbop r_2 2
|
||||
bbop r_3 3
|
||||
bbop r_4 4
|
||||
bbuild r_5
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 2116.44 -v 607.276
|
||||
checknbshapes result -wire 39 -face 32 -shell 3 -solid 1
|
||||
foreach i { 0 1 2 3 4 5} {
|
||||
checkshape r_$i
|
||||
if {![regexp "OK" [bopcheck r_$i]]} {
|
||||
puts "Error: r_$i is self-intersecting shape"
|
||||
}
|
||||
}
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
checkprops r_0 -s 9.84822 -v 0.639566
|
||||
checknbshapes r_0 -wire 7 -face 5 -shell 1 -solid 1 -t
|
||||
|
||||
checkprops r_1 -s 2116.61 -v 607.386
|
||||
checknbshapes r_1 -wire 40 -face 34 -shell 3 -solid 1 -t
|
||||
|
||||
checkprops r_2 -s 2110.46 -v 606.532
|
||||
checknbshapes r_2 -wire 36 -face 30 -shell 3 -solid 2 -t
|
||||
|
||||
checkprops r_3 -s 15.9958 -v 0.215358
|
||||
checknbshapes r_3 -wire 11 -face 9 -shell 2 -solid 2 -t
|
||||
|
||||
checkprops r_4 -l 24.818
|
||||
checksection r_4 -r 0
|
||||
|
||||
checkprops r_5 -s 2146.15 -v 608.026
|
||||
checknbshapes r_5 -wire 47 -face 39 -shell 6 -solid 5 -t
|
||||
|
||||
|
||||
checkview -display r_1 -2d -path ${imagedir}/${test_image}.png
|
||||
|
48
tests/bugs/modalg_7/bug29843_1
Normal file
48
tests/bugs/modalg_7/bug29843_1
Normal file
@@ -0,0 +1,48 @@
|
||||
puts "========"
|
||||
puts "0029843: Modeling Algorithms - Boolean FUSE produces incorrect result"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug29843.brep] s
|
||||
|
||||
explode s
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s_1
|
||||
baddtools s_2
|
||||
bfillds
|
||||
|
||||
bbop r_0 0
|
||||
bbop r_1 1
|
||||
bbop r_2 2
|
||||
bbop r_3 3
|
||||
bbop r_4 4
|
||||
bbuild r_5
|
||||
|
||||
foreach i { 0 1 2 3 4 5} {
|
||||
checkshape r_$i
|
||||
if {![regexp "OK" [bopcheck r_$i]]} {
|
||||
puts "Error: r_$i is self-intersecting shape"
|
||||
}
|
||||
}
|
||||
|
||||
checkprops r_0 -s 9.84429 -v 0.639311
|
||||
checknbshapes r_0 -wire 7 -face 5 -shell 1 -solid 1 -t
|
||||
|
||||
checkprops r_1 -s 2121.39 -v 612.41
|
||||
checknbshapes r_1 -wire 38 -face 32 -shell 2 -solid 1 -t
|
||||
|
||||
checkprops r_2 -s 2113.85 -v 611.569
|
||||
checknbshapes r_2 -wire 32 -face 26 -shell 2 -solid 1 -t
|
||||
|
||||
checkprops r_3 -s 15.9893 -v 0.215264
|
||||
checknbshapes r_3 -wire 11 -face 9 -shell 2 -solid 2 -t
|
||||
|
||||
checkprops r_4 -l 24.9725
|
||||
checksection r_4 -r 2
|
||||
|
||||
checkprops r_5 -s 2139.68 -v 612.402
|
||||
checknbshapes r_5 -wire 44 -face 36 -shell 5 -solid 4 -t
|
||||
|
||||
checkview -display r_0 -2d -path ${imagedir}/${test_image}.png
|
||||
|
51
tests/bugs/modalg_7/bug29843_2
Normal file
51
tests/bugs/modalg_7/bug29843_2
Normal file
@@ -0,0 +1,51 @@
|
||||
puts "========"
|
||||
puts "0029843: Modeling Algorithms - Boolean FUSE produces incorrect result"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
puts "Boolean operation fails on the objects located far from origin (1.e+8)"
|
||||
|
||||
restore [locate_data_file bug29843_loc.brep] s
|
||||
|
||||
explode s
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s_1
|
||||
baddtools s_2
|
||||
bfillds
|
||||
|
||||
bbop r_0 0
|
||||
bbop r_1 1
|
||||
bbop r_2 2
|
||||
bbop r_3 3
|
||||
bbop r_4 4
|
||||
bbuild r_5
|
||||
|
||||
foreach i { 0 1 2 3 4 5} {
|
||||
checkshape r_$i
|
||||
if {![regexp "OK" [bopcheck r_$i]]} {
|
||||
puts "Error: r_$i is self-intersecting shape"
|
||||
}
|
||||
}
|
||||
|
||||
checkprops r_0 -s 62185.2 -v 1.1761e+06
|
||||
checknbshapes r_0 -vertex 6 -edge 9 -wire 5 -face 5 -shell 1 -solid 1 -t
|
||||
|
||||
checkprops r_1 -s 1.85327e+06 -v 5.92874e+07
|
||||
checknbshapes r_1 -vertex 15 -edge 24 -wire 11 -face 11 -shell 1 -solid 1 -t
|
||||
|
||||
checkprops r_2 -s 1.85376e+06 -v 5.78639e+07
|
||||
checknbshapes r_2 -vertex 14 -edge 21 -wire 9 -face 9 -shell 1 -solid 1 -t
|
||||
|
||||
checkprops r_3 -s 37189.7 -v 247431
|
||||
checknbshapes r_3 -vertex 6 -edge 9 -wire 5 -face 5 -shell 1 -solid 1 -t
|
||||
|
||||
checkprops r_4 -l 952.189
|
||||
checksection r_4 -r 2
|
||||
checknbshapes r_4 -vertex 6 -edge 7 -t
|
||||
|
||||
checkprops r_5 -s 2.01533e+06 -v 6.04635e+07
|
||||
checknbshapes r_5 -vertex 15 -edge 26 -wire 15 -face 15 -shell 3 -solid 3 -t
|
||||
|
||||
checkview -display r_2 -2d -path ${imagedir}/${test_image}.png
|
||||
|
Reference in New Issue
Block a user