0e94a94e |
1 | puts "========" |
2 | puts "OCC165" |
3 | puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" |
4 | puts "========" |
5 | |
6 | restore [locate_data_file offset_wire_019.brep] a |
352ffd73 |
7 | checkshape a |
0e94a94e |
8 | |
9 | mkplane f a |
352ffd73 |
10 | checkshape f |
0e94a94e |
11 | |
12 | set IsGood 1 |
13 | if [catch {mkoffset res1 f 1 1 } result] { |
14 | puts "Faulty OCC165 (case 1) : function MKOFFSET works wrongly" |
15 | set IsGood 0 |
16 | } else { |
17 | puts "OCC165 OK (case 1): function MKOFFSET works properly" |
18 | checkshape res1_1 |
19 | mkplane pl1 res1_1 |
20 | checkshape pl1 |
21 | } |
22 | |
23 | if [catch {mkoffset res2 f 1 -1 } result] { |
24 | puts "Faulty OCC165 (case 2) : function MKOFFSET works wrongly" |
25 | set IsGood 0 |
26 | } else { |
27 | puts "OCC165 OK (case 2): function MKOFFSET works properly" |
28 | checkshape res2_1 |
29 | mkplane pl2 res2_1 |
30 | checkshape pl2 |
31 | } |
32 | |
33 | if {$IsGood == 1} { |
34 | compound a res1_1 res2_1 res |
35 | |
36 | regexp {Mass +: +([-0-9.+eE]+)} [lprops res1_1] full len |
37 | |
38 | set good_len 1088.43 |
39 | set percent_max 0.1 |
40 | set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.] |
41 | |
42 | puts "good_len = ${good_len}" |
43 | puts "length = ${len}" |
44 | puts "percent = ${percent}" |
45 | |
46 | if {${percent} > ${percent_max}} { |
47 | puts "Faulty OCC165 (case 3) : function MKOFFSET works wrongly" |
48 | set IsGood 0 |
49 | } |
50 | |
51 | regexp {Mass +: +([-0-9.+eE]+)} [lprops res2_1] full len |
52 | |
53 | set good_len 1075.87 |
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 | puts "Faulty OCC165 (case 4) : function MKOFFSET works wrongly" |
63 | set IsGood 0 |
64 | } |
65 | |
66 | if {$IsGood == 1} { |
67 | puts "OCC165 OK" |
68 | } else { |
69 | puts "OCC165 FAULTY" |
70 | } |
71 | |
72 | } else { |
73 | puts "OCC165 FAULTY" |
74 | } |
75 | |