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