c8480be29868395795cfe3b66e2ae6ad72eb6542
[occt.git] / tests / bugs / modalg_4 / bug745_12
1 puts "TODO OCC12345 ALL: An exception was caught"
2 puts "TODO OCC12345 ALL: \\*\\* Exception "
3 puts "TODO OCC12345 ALL: Faulty OCC745"
4
5 puts "========"
6 puts "OCC745"
7 puts "========"
8 puts ""
9 ##################################################
10 # Exception thrown: Standard_ConstructionError: Offset wire is not closed.
11 ##################################################
12
13 restore [locate_data_file OCC745_nb3.brep] w 
14 checkshape w
15
16 if { [catch { mkoffset result w 1 10 } status] } {
17     puts "Faulty OCC745"
18 } else {
19     renamevar result_1 result
20     set nb_info [nbshapes result]
21     regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
22     puts [format "Result shape result contains %s vertexes" $ve]
23     if { $ve == 0 } {
24         puts [format "Faulty : Result shape is NULL shape"]
25     } else {
26         regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
27         if {$wi > 1 } {
28             set ll [explode result w]
29             set num [llength $ll]
30             puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
31             foreach {k} $ll {
32                 checkshape $k
33                 regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
34                 if { $cs != 0 } {
35                     puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
36                 } else {
37                     puts [format "OK: Result shape is CLOSED wire !!! "]
38                 }
39             }
40         }
41     }
42     set length 0
43     set 2dviewer 0
44 }