61c421bf |
1 | puts "============" |
2 | puts "OCC6334" |
3 | puts "============" |
4 | puts "" |
6d368502 |
5 | ##################################################################### |
61c421bf |
6 | # Invalid result of MakeCylindricalHole when input solid is REVERSED |
6d368502 |
7 | ##################################################################### |
61c421bf |
8 | |
9 | set BugNumber OCC6334 |
10 | |
11 | # 1. Make box |
12 | box b 100 100 100 |
13 | |
14 | subshape b f 1 |
15 | offsetshape t b 10 b_1 |
16 | |
6d368502 |
17 | checkshape t |
61c421bf |
18 | |
19 | set bnd_t [bounding t] |
20 | set ori [lindex [dtyp t] 2] |
21 | puts "Orientation of thick solid is $ori" |
22 | |
23 | # 3. Make hole |
24 | hole h t 110 50 50 1 0 0 10 |
25 | |
26 | set che [checkshape h] |
27 | if { [regexp {Faulty} $che] } { |
28 | puts "Faulty ${BugNumber} : checkshape is wrong for h" |
29 | } |
30 | |
31 | set bnd_h [bounding h] |
32 | |
33 | renamevar h result |
34 | |
35 | set square 117509 |
36 | |
a4eba920 |
37 | checknbshapes 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 |
40 | set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]] |
41 | set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]] |
42 | |
43 | if { [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 | |
52 | set 2dviewer 0 |