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