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