mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0029333: Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified
Prevent modification of the input shapes in destructive mode in case their sub-shapes have not been modified: 1. Prevent edge splitting for the pave blocks with old vertices if it is possible to use the existing edge (*BOPAlgo_PaveFiller::MakeSplitEdges*); 2. Prevent creation of the new containers (WIRES/SHELLS/COMPSOLIDS) if non of its parts have been modified (*BOPAlgo_Builder::FillImagesContainer*); 3. Prevent creation of the new face if non of its wires have been modified (*BOPAlgo_Builder::FillImagesFaces*); 4. If possible, use the original face to be the representative for the group of SD faces (*BOPAlgo_Builder::FillSameDomainFaces*). Cosmetic changes: 1. Documentation of the *BOPAlgo_Builder* class. 2. Making simple methods of the *BOPAlgo_Builder* class inline. 3. Getting rid of the *BOPAlgo_Builder::mySplits* field as it is excessive. *BOPAlgo_Builder::myImages* can be used instead. 3. Moving the Check Inverted option from *BOPAlgo_Options* to *BOPAlgo_Builder*. Test cases for the issue. Adjustment of the test case to their current behavior. Test case *blend/complex/H2* has been deleted as duplicate of the test case *blend/simple/Z1*.
This commit is contained in:
@@ -26,7 +26,7 @@ bop beam_1 cut_2
|
||||
bopcut result
|
||||
checkshape result
|
||||
|
||||
checknbshapes result -solid 2 -shell 2 -face 32 -wire 39
|
||||
checknbshapes result -solid 2 -shell 2 -face 33 -wire 40 -t
|
||||
checkprops result -v 5.40325e+7
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
|
@@ -42,7 +42,7 @@ bop beam_2 cut_2
|
||||
bopcut result
|
||||
checkshape result
|
||||
|
||||
checknbshapes result -solid 4 -shell 4 -face 64 -wire 73
|
||||
checknbshapes result -solid 4 -shell 4 -face 64 -wire 73 -t
|
||||
checkprops result -v 1.61677e+8
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
|
@@ -11,20 +11,15 @@ puts ""
|
||||
|
||||
smallview
|
||||
|
||||
box a -1.5 -1.5 0 3 3 3
|
||||
box b -3 -3 -3 6 6 3
|
||||
bfuse result a b
|
||||
set bug_info [string trim [checkshape result]]
|
||||
if {$bug_info != "This shape seems to be valid"} {
|
||||
puts "ERROR: Problem of test case functionality. Should be additionally investigated."
|
||||
}
|
||||
restore [locate_data_file bug27711.brep] s
|
||||
|
||||
clear
|
||||
display result
|
||||
display s
|
||||
fit
|
||||
xwd $imagedir/${casename}_step_0.png
|
||||
|
||||
explode result e
|
||||
blend result result 0.5 result_12 0.5 result_11
|
||||
explode s e
|
||||
blend result s 0.5 s_12 0.5 s_11
|
||||
set bug_info [string trim [checkshape result]]
|
||||
if {$bug_info != "This shape seems to be valid"} {
|
||||
puts "ERROR: Problem of test case functionality. Should be additionally investigated."
|
||||
|
65
tests/bugs/modalg_7/bug29333_1
Normal file
65
tests/bugs/modalg_7/bug29333_1
Normal file
@@ -0,0 +1,65 @@
|
||||
puts "========"
|
||||
puts "OCC29333"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified
|
||||
#################################################
|
||||
|
||||
# create two touching faces
|
||||
plane p 0 0 0 0 0 1
|
||||
mkface f1 p -10 10 -10 10
|
||||
|
||||
copy f1 f2
|
||||
ttranslate f2 20 0 0
|
||||
|
||||
# fuse these faces
|
||||
bfuse s f1 f2
|
||||
|
||||
# split one of these faces
|
||||
explode s f
|
||||
|
||||
line l 0 0 0 1 0 0
|
||||
mkedge e l
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s_1
|
||||
baddtools e
|
||||
bfillds
|
||||
bsplit s1_sp
|
||||
|
||||
|
||||
# fuse again
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s1_sp
|
||||
baddtools s_2
|
||||
bfillds
|
||||
bbuild result
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 800
|
||||
checknbshapes result -vertex 8 -edge 10 -wire 3 -face 3
|
||||
|
||||
|
||||
# check that non of the shapes from s1_sp is modified
|
||||
compound result s1_sp c
|
||||
checknbshapes c -vertex 8 -edge 10 -wire 3 -face 3
|
||||
|
||||
|
||||
# fuse with different order
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s_2
|
||||
baddtools s1_sp
|
||||
bfillds
|
||||
bbuild result
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 800
|
||||
checknbshapes result -vertex 8 -edge 10 -wire 3 -face 3
|
||||
|
||||
|
||||
# check that non of the shapes from s1_sp is modified
|
||||
compound result s1_sp c
|
||||
checknbshapes c -vertex 8 -edge 10 -wire 3 -face 3
|
62
tests/bugs/modalg_7/bug29333_2
Normal file
62
tests/bugs/modalg_7/bug29333_2
Normal file
@@ -0,0 +1,62 @@
|
||||
puts "========"
|
||||
puts "OCC29333"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified
|
||||
#################################################
|
||||
|
||||
# create two touching boxes
|
||||
box b1 10 10 10
|
||||
box b2 10 0 0 10 10 10
|
||||
|
||||
# make them share the common face
|
||||
mkvolume s b1 b2
|
||||
|
||||
# split one of these solids
|
||||
explode s so
|
||||
|
||||
plane p 0 0 5 0 0 1
|
||||
mkface f p
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s_1
|
||||
baddtools f
|
||||
bfillds
|
||||
bsplit s1_sp
|
||||
|
||||
|
||||
# fuse again
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s1_sp
|
||||
baddtools s_2
|
||||
bfillds
|
||||
bbuild result
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 1400 -v 2000
|
||||
checknbshapes result -vertex 16 -edge 28 -wire 16 -face 16 -shell 3 -solid 3
|
||||
|
||||
|
||||
# check that non of the shapes from s1_sp is modified
|
||||
compound result s1_sp c
|
||||
checknbshapes c -vertex 16 -edge 28 -wire 16 -face 16 -shell 3 -solid 3
|
||||
|
||||
|
||||
# fuse with different order
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s_2
|
||||
baddtools s1_sp
|
||||
bfillds
|
||||
bbuild result
|
||||
|
||||
checkshape result
|
||||
checkprops result -s 1400 -v 2000
|
||||
checknbshapes result -vertex 16 -edge 28 -wire 16 -face 16 -shell 3 -solid 3
|
||||
|
||||
|
||||
# check that non of the shapes from s1_sp is modified
|
||||
compound result s1_sp c
|
||||
checknbshapes c -vertex 16 -edge 28 -wire 16 -face 16 -shell 3 -solid 3
|
Reference in New Issue
Block a user