f1aa2b62 |
1 | puts "TODO OCC12345 ALL: An exception was caught" |
2 | puts "TODO OCC12345 ALL: Exception" |
f1aa2b62 |
3 | |
4 | puts "========" |
5 | puts "OCC829" |
6 | puts "========" |
7 | puts "" |
8 | ################################### |
9 | ## BRepOffsetAPI_MakeOffset fails on given wires |
10 | ################################### |
11 | puts " This part - LIMITATION for existed algorithms" |
12 | ################################### |
13 | |
14 | restore [locate_data_file OCC829_w1.brep] a |
352ffd73 |
15 | checkshape a |
f1aa2b62 |
16 | explode a w |
17 | |
18 | if { [catch { mkoffset result a_1 1 5 } status] } { |
19 | puts "Faulty : An exception was caught" |
20 | } else { |
21 | renamevar result_1 result |
22 | set nb_info [nbshapes result] |
23 | regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve |
24 | puts [format "Result shape result contains %s vertexes" $ve] |
25 | if { $ve == 0 } { |
26 | puts [format "Faulty : Result shape is NULL shape"] |
27 | } else { |
28 | regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi |
29 | if {$wi > 1 } { |
30 | set ll [explode result w] |
31 | set num [llength $ll] |
32 | puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num] |
33 | foreach {k} $ll { |
352ffd73 |
34 | checkshape $k |
f1aa2b62 |
35 | regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs |
36 | if { $cs != 0 } { |
37 | puts [format "Faulty : Result shape is UNclosed wire !!! " $k] |
38 | } else { |
39 | puts [format "OK: Result shape is CLOSED wire !!! "] |
40 | } |
41 | } |
42 | } |
43 | } |
355c1551 |
44 | set length 0 |
45 | set 2dviewer 0 |
f1aa2b62 |
46 | } |