File: bug6334

package info (click to toggle)
oce 0.15-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 302,472 kB
  • ctags: 210,903
  • sloc: cpp: 1,165,052; ansic: 75,256; sh: 11,901; tcl: 4,488; python: 2,867; makefile: 337; perl: 37; csh: 12
file content (67 lines) | stat: -rwxr-xr-x 1,359 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
puts "============"
puts "OCC6334"
puts "============"
puts ""
######################################################
# Invalid result of MakeCylindricalHole when input solid is REVERSED
######################################################

set BugNumber OCC6334

# 1. Make box
box b 100 100 100

subshape b f 1
offsetshape t b 10 b_1

decho off
set che_t [checkshape t]
decho on

if {[regexp {Faulty} $che_t]} {
    puts "Faulty ${BugNumber} : checkshape is wrong for t"
}

set bnd_t [bounding t]
set ori [lindex [dtyp t] 2]
puts "Orientation of thick solid is $ori"

# 3. Make hole
hole h t 110 50 50 1 0 0 10

set che [checkshape h]
if { [regexp {Faulty} $che] } {
    puts "Faulty ${BugNumber} : checkshape is wrong for h"
}

set bnd_h [bounding h]

renamevar h result

set square 117509

set nb_v_good 30
set nb_e_good 51
set nb_w_good 27
set nb_f_good 24
set nb_sh_good 1
set nb_sol_good 1
set nb_compsol_good 0
set nb_compound_good 1
set nb_shape_good 135


# 4. Check thickness of box and hole
set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]]
set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]]

if { [expr abs($dx_h - $dx_t)] > 1e-5 } {
  puts "Thickness of solid = $dx_t"
  puts "Thickness of solid with hole = $dx_h"
  puts "Invalid result of making a hole"
  puts "Faulty ${BugNumber}"
} else {
  puts "OK ${BugNumber}"
}

set 2dviewer 0