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