0026742: Update test cases for using checknbshapes procedure instead of global variables
[occt.git] / tests / bugs / modalg_2 / bug5805_27
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 #     *
13 #     | \
14 #     |   \
15 #     |     \
16 #     |       \
17 #     |         \
18 #     |           \
19 #     |   * v3      \
20 #     |   | \         \
21 #     |   |   \         \
22 #     |   |     \         \
23 #     |   |       \        \
24 #     |   |       /* v2      *
25 #     |   |     /          /
26 #     |   |   /          /
27 #     |   | /          /
28 #     |   *          /
29 #     |     v1     /
30 #     |          /
31 #     |        /
32 #     |      /
33 #     |    /
34 #     |  /
35 #     |/
36 #     *
37 #
38
39 set z1 10
40 set z2 -10
41
42 # triangle1
43 polyline UpCover 0 0 ${z1} 5 5 ${z1} 0 10 ${z1} 0 0 ${z1}
44
45 # triangle2
46 polyline BottomCover -5 -5 ${z2} 10 10 ${z2} -5 20 ${z2} -5 -5 ${z2}
47
48 set issolid 1
49 set isruled 1
50 if [catch { thrusections s ${issolid} ${isruled} UpCover BottomCover } catch_result] {
51    puts "Faulty ${BugNumber} : thrusections is wrong"
52    
53 }
54
55 set distance -0.5
56 catch { OFFSETSHAPE $distance {s_5} $calcul $type }
57
58
59 set square 1755.54
60
61 checknbshapes result -vertex 12 -edge 18 -wire 10 -face 9 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 51
62
63 set index [lsearch [whatis s] Closed]
64 if {$index == -1} {
65   puts "Faulty ${BugNumber} : s is not Closed shape"
66   
67 }
68
69 set index [lsearch [whatis result] Closed]
70 if {$index == -1} {
71   puts "Faulty ${BugNumber} : result is not Closed shape"
72   
73 }
74
75
76 set 2dviewer 0