| 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 |