Integration part of tests of grid chl
[occt.git] / tests / bugs / moddata / bug165_2
CommitLineData
0e94a94e 1puts "TODO OCC12345 ALL: An exception was caught"
2puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
3puts "TODO OCC12345 ALL: OCC165 Faulty"
4puts "========"
5puts "OCC165"
6puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
7puts "========"
8
9restore [locate_data_file offset_wire_019.brep] a
10puts [checkshape a]
11
12mkplane f a
13puts [checkshape f]
14
15set IsGood 1
16if [catch {mkoffset res1 f 1 4.8 } result] {
17 set IsGood 0
18} else {
19 puts "OCC165 OK (case 1): function MKOFFSET works properly"
20 puts [checkshape res1_1]
21 mkplane pl1 res1_1
22 puts [checkshape pl1]
23}
24
25if [catch {mkoffset res2 f 1 -2.9 } result] {
26 set IsGood 0
27} else {
28 puts "OCC165 OK (case 2): function MKOFFSET works properly"
29 puts [checkshape res2_1]
30 mkplane pl2 res2_1
31 puts [checkshape pl2]
32}
33
34if {$IsGood == 1} {
35 compound a res1_1 res2_1 res
36
37 regexp {Mass +: +([-0-9.+eE]+)} [lprops res1_1] full len
38
39 set good_len 1112.29
40 set percent_max 0.1
41 set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
42
43 puts "good_len = ${good_len}"
44 puts "length = ${len}"
45 puts "percent = ${percent}"
46
47 if {${percent} > ${percent_max}} {
48 set IsGood 0
49 }
50
51 regexp {Mass +: +([-0-9.+eE]+)} [lprops res2_1] full len
52
53 set good_len 1063.91
54 set percent_max 0.1
55 set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
56
57 puts "good_len = ${good_len}"
58 puts "length = ${len}"
59 puts "percent = ${percent}"
60
61 if {${percent} > ${percent_max}} {
62 set IsGood 0
63 }
64
65 if {$IsGood == 1} {
66 puts "OCC165 OK"
67 } else {
68 puts "OCC165 Faulty"
69 }
70
71} else {
72 puts "OCC165 Faulty"
73}