Adding test cases from chl grid
[occt.git] / tests / bugs / modalg / bug6334
1 puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
2
3 puts "============"
4 puts "OCC6334"
5 puts "============"
6 puts ""
7 ######################################################
8 # Invalid result of MakeCylindricalHole when input solid is REVERSED
9 ######################################################
10
11 set BugNumber OCC6334
12
13 # 1. Make box
14 box b 100 100 100
15
16 subshape b f 1
17 offsetshape t b 10 b_1
18
19 decho off
20 set che_t [checkshape t]
21 decho on
22
23 if {[regexp {Faulty} $che_t]} {
24     puts "Faulty ${BugNumber} : checkshape is wrong for t"
25 }
26
27 set bnd_t [bounding t]
28 set ori [lindex [dtyp t] 2]
29 puts "Orientation of thick solid is $ori"
30
31 # 3. Make hole
32 hole h t 110 50 50 1 0 0 10
33
34 set che [checkshape h]
35 if { [regexp {Faulty} $che] } {
36     puts "Faulty ${BugNumber} : checkshape is wrong for h"
37 }
38
39 set bnd_h [bounding h]
40
41 renamevar h result
42
43 set square 117509
44
45 set nb_v_good 32
46 set nb_e_good 53
47 set nb_w_good 27
48 set nb_f_good 24
49 set nb_sh_good 1
50 set nb_sol_good 1
51 set nb_compsol_good 0
52 set nb_compound_good 1
53 set nb_shape_good 139
54
55
56 # 4. Check thickness of box and hole
57 set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]]
58 set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]]
59
60 if { [expr abs($dx_h - $dx_t)] > 1e-5 } {
61   puts "Thickness of solid = $dx_t"
62   puts "Thickness of solid with hole = $dx_h"
63   puts "Invalid result of making a hole"
64   puts "Faulty ${BugNumber}"
65 } else {
66   puts "OK ${BugNumber}"
67 }
68
69 set 2dviewer 0