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