0026855: Draw commands to debug Boolean Operations Algorithm
[occt.git] / tests / bugs / modalg_4 / bug6334
CommitLineData
61c421bf 1puts "============"
2puts "OCC6334"
3puts "============"
4puts ""
6d368502 5#####################################################################
61c421bf 6# Invalid result of MakeCylindricalHole when input solid is REVERSED
6d368502 7#####################################################################
61c421bf 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
6d368502 17checkshape t
61c421bf 18
19set bnd_t [bounding t]
20set ori [lindex [dtyp t] 2]
21puts "Orientation of thick solid is $ori"
22
23# 3. Make hole
24hole h t 110 50 50 1 0 0 10
25
26set che [checkshape h]
27if { [regexp {Faulty} $che] } {
28 puts "Faulty ${BugNumber} : checkshape is wrong for h"
29}
30
31set bnd_h [bounding h]
32
33renamevar h result
34
35set square 117509
36
a4eba920 37checknbshapes result -vertex 30 -edge 51 -wire 27 -face 24 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 135
61c421bf 38
39# 4. Check thickness of box and hole
40set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]]
41set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]]
42
43if { [expr abs($dx_h - $dx_t)] > 1e-5 } {
44 puts "Thickness of solid = $dx_t"
45 puts "Thickness of solid with hole = $dx_h"
46 puts "Invalid result of making a hole"
47 puts "Faulty ${BugNumber}"
48} else {
49 puts "OK ${BugNumber}"
50}
51
52set 2dviewer 0