0029692: Add functionality to make the group of touching same-dimensional shapes...
[occt.git] / tests / boolean / mkconnected / A1
1 polyline p 0 0 0 10 0 0 10 0 10 5 0 10 5 0 5 0 0 5 0 0 0
2 mkplane f p
3 prism b1 f 0 5 0
4 box b2 0 0 5 5 5 5
5 box b3 0 5 0 10 5 10
6
7 # make the shapes connected
8 makeconnected c b3 b1 b2
9
10 checkshape c
11 checknbshapes c -vertex 18 -edge 31 -wire 17 -face 17 -shell 3 -solid 3 -t
12 checkprops c -s 900 -v 1000
13
14 savehistory h
15
16 modified m3 h b3
17 checknbshapes m3 -face 7 -t
18
19 # make the shape periodic
20 cmakeperiodic cp -x 10 -y 10 -z 10
21 checknbshapes cp -vertex 26 -edge 42 -wire 20 -face 20 -shell 3 -solid 3 -t
22
23 savehistory h
24
25 modified m1 h b1
26 checknbshapes m1 -face 10 -t
27
28 modified m2 h b2
29 checknbshapes m2 -ref [nbshapes b2] -t
30
31 modified m3 h b3
32 checknbshapes m3 -face 8 -t
33
34
35 # check material associations
36 explode b3 f
37
38 # the face b3_3 is REVERSED
39 # materials on negative side should be only b3
40 # materials on positive side should be b1 and b2
41
42 modified mf h b3_3
43
44 compound pos 
45 compound neg
46
47 foreach f [explode mf f] {
48   if {![regexp "No materials on this side" [cmaterialson p + $f]]} {
49     add p pos
50   }
51   if {![regexp "No materials on this side" [cmaterialson n - $f]]} {
52     add n neg
53   }
54 }
55
56 # check that neg contains b3 only
57 checkprops neg -equal b3 -skip
58
59 # check that pos contains both 
60 compound b1 b2 comp
61 checkprops pos -equal comp -skip