f1aa2b62 |
1 | |
2 | puts "========" |
3 | puts "OCC745" |
4 | puts "========" |
5 | puts "" |
6 | ####################################################### |
7 | ## There are several cases where the offset algo works wrong for various reasons |
8 | ## for wires containing only linear segments and arcs of circle. |
9 | ####################################################### |
10 | |
11 | restore [locate_data_file OCC745_1.brep] a |
352ffd73 |
12 | checkshape a |
f1aa2b62 |
13 | |
14 | if { [catch { mkoffset result a 1 -10 } status] } { |
15 | puts "Faulty : an exception was caught" |
16 | } else { |
17 | renamevar result_1 result |
18 | set nb_info [nbshapes result] |
19 | regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve |
20 | puts [format "Result shape result contains %s vertexes" $ve] |
21 | if { $ve == 0 } { |
22 | puts [format "Faulty : Result shape is NULL shape"] |
23 | } else { |
24 | regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi |
25 | if {$wi > 1 } { |
26 | set ll [explode result w] |
27 | set num [llength $ll] |
28 | puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num] |
29 | foreach {k} $ll { |
352ffd73 |
30 | checkshape $k |
f1aa2b62 |
31 | regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs |
32 | if { $cs != 0 } { |
33 | puts [format "Faulty : Result shape is UNclosed wire !!! " $k] |
34 | } else { |
35 | puts [format "OK: Result shape is CLOSED wire !!! "] |
36 | } |
37 | } |
38 | } |
39 | } |
40 | } |
41 | |
58cf74e0 |
42 | checkprops result -l 932.825 |
43 | checkshape result |
44 | checksection result |
5747059b |
45 | checkview -display result -2d -path ${imagedir}/${test_image}.png |
f1aa2b62 |
46 | |