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