0026742: Update test cases for using checknbshapes procedure instead of global variables
[occt.git] / tests / bugs / modalg_2 / bug5805_37
1 puts "============"
2 puts "OCC5805"
3 puts "============"
4
5 #######################################################################
6 # BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
7 #######################################################################
8
9 set BugNumber OCC5805
10
11 #
12 #                    v12                   v11
13 #                    *---------------------*
14 #                    |                     |
15 #                    |                     |
16 #                    |                     |
17 #                    |                     |
18 #                    |                     |
19 #                    |                     |
20 #                    |                     |
21 #                    |                     |
22 #                    |                     |
23 #                    |                     |
24 #                    *---------------------*
25 #                    v13                   v14
26 #
27
28 set z1 5
29 set z2 -5
30
31 # quadrangle1
32 polyline UpCover 0 0 ${z1} 6 0 ${z1} 6 6 ${z1} 0 6 ${z1} 0 0 ${z1}
33
34 # quadrangle2
35 polyline BottomCover 3 -2 ${z2} 8 3 ${z2} 3 8 ${z2} -2 3 ${z2} 3 -2 ${z2}
36
37 set issolid 1
38 set isruled 1
39 if [catch { thrusections s ${issolid} ${isruled} UpCover BottomCover } catch_result] {
40    puts "Faulty ${BugNumber} : thrusections is wrong"
41    
42 }
43
44 set distance -0.5
45 catch { OFFSETSHAPE $distance {} $calcul $type }
46
47
48 set square 246.821
49
50 checknbshapes result -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 34
51
52 set index [lsearch [whatis s] Closed]
53 if {$index == -1} {
54   puts "Faulty ${BugNumber} : s is not Closed shape"
55   
56 }
57
58 set index [lsearch [whatis result] Closed]
59 if {$index == -1} {
60   puts "Faulty ${BugNumber} : result is not Closed shape"
61   
62 }
63
64
65 set 2dviewer 0