Adding testing cases from chl group
[occt.git] / tests / bugs / modalg / bug829_1
CommitLineData
f1aa2b62 1puts "TODO OCC12345 ALL: An exception was caught"
2puts "TODO OCC12345 ALL: Exception"
f1aa2b62 3
4puts "========"
5puts "OCC829"
6puts "========"
7puts ""
8###################################
9## BRepOffsetAPI_MakeOffset fails on given wires
10###################################
11puts " This part - LIMITATION for existed algorithms"
12###################################
13
14restore [locate_data_file OCC829_w1.brep] a
352ffd73 15checkshape a
f1aa2b62 16explode a w
17
18if { [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}