0025138: SIGSEGV when sweeping along helix
[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
58cf74e0 35checkprops result -s 117509
36checkshape result
61c421bf 37
a4eba920 38checknbshapes result -vertex 30 -edge 51 -wire 27 -face 24 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 135
61c421bf 39
40# 4. Check thickness of box and hole
41set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]]
42set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]]
43
44if { [expr abs($dx_h - $dx_t)] > 1e-5 } {
45 puts "Thickness of solid = $dx_t"
46 puts "Thickness of solid with hole = $dx_h"
47 puts "Invalid result of making a hole"
48 puts "Faulty ${BugNumber}"
49} else {
50 puts "OK ${BugNumber}"
51}
52
5747059b 53checkview -display result -2d -path ${imagedir}/${test_image}.png