61c421bf |
1 | puts "============" |
2 | puts "OCC6334" |
3 | puts "============" |
4 | puts "" |
5 | ###################################################### |
6 | # Invalid result of MakeCylindricalHole when input solid is REVERSED |
7 | ###################################################### |
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 | |
17 | decho off |
18 | set che_t [checkshape t] |
19 | decho on |
20 | |
21 | if {[regexp {Faulty} $che_t]} { |
22 | puts "Faulty ${BugNumber} : checkshape is wrong for t" |
23 | } |
24 | |
25 | set bnd_t [bounding t] |
26 | set ori [lindex [dtyp t] 2] |
27 | puts "Orientation of thick solid is $ori" |
28 | |
29 | # 3. Make hole |
30 | hole h t 110 50 50 1 0 0 10 |
31 | |
32 | set che [checkshape h] |
33 | if { [regexp {Faulty} $che] } { |
34 | puts "Faulty ${BugNumber} : checkshape is wrong for h" |
35 | } |
36 | |
37 | set bnd_h [bounding h] |
38 | |
39 | renamevar h result |
40 | |
41 | set square 117509 |
42 | |
3389667b |
43 | set nb_v_good 30 |
44 | set nb_e_good 51 |
61c421bf |
45 | set nb_w_good 27 |
46 | set nb_f_good 24 |
47 | set nb_sh_good 1 |
48 | set nb_sol_good 1 |
49 | set nb_compsol_good 0 |
50 | set nb_compound_good 1 |
3389667b |
51 | set nb_shape_good 135 |
61c421bf |
52 | |
53 | |
54 | # 4. Check thickness of box and hole |
55 | set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]] |
56 | set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]] |
57 | |
58 | if { [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 | |
67 | set 2dviewer 0 |