81a55a69 |
1 | puts "========" |
2 | puts "OCC29333" |
3 | puts "========" |
4 | puts "" |
5 | ################################################# |
6 | # Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified |
7 | ################################################# |
8 | |
9 | # create two touching faces |
10 | plane p 0 0 0 0 0 1 |
11 | mkface f1 p -10 10 -10 10 |
12 | |
13 | copy f1 f2 |
14 | ttranslate f2 20 0 0 |
15 | |
16 | # fuse these faces |
17 | bfuse s f1 f2 |
18 | |
19 | # split one of these faces |
20 | explode s f |
21 | |
22 | line l 0 0 0 1 0 0 |
23 | mkedge e l |
24 | bclearobjects |
25 | bcleartools |
26 | baddobjects s_1 |
27 | baddtools e |
28 | bfillds |
29 | bsplit s1_sp |
30 | |
31 | |
32 | # fuse again |
33 | bclearobjects |
34 | bcleartools |
35 | baddobjects s1_sp |
36 | baddtools s_2 |
37 | bfillds |
38 | bbuild result |
39 | |
40 | checkshape result |
41 | checkprops result -s 800 |
42 | checknbshapes result -vertex 8 -edge 10 -wire 3 -face 3 |
43 | |
44 | |
45 | # check that non of the shapes from s1_sp is modified |
46 | compound result s1_sp c |
47 | checknbshapes c -vertex 8 -edge 10 -wire 3 -face 3 |
48 | |
49 | |
50 | # fuse with different order |
51 | bclearobjects |
52 | bcleartools |
53 | baddobjects s_2 |
54 | baddtools s1_sp |
55 | bfillds |
56 | bbuild result |
57 | |
58 | checkshape result |
59 | checkprops result -s 800 |
60 | checknbshapes result -vertex 8 -edge 10 -wire 3 -face 3 |
61 | |
62 | |
63 | # check that non of the shapes from s1_sp is modified |
64 | compound result s1_sp c |
65 | checknbshapes c -vertex 8 -edge 10 -wire 3 -face 3 |