0026855: Draw commands to debug Boolean Operations Algorithm
[occt.git] / tests / bugs / modalg_4 / bug743
1
2 puts "========"
3 puts "OCC743"
4 puts "========"
5 puts ""
6 #######################################
7 ## The result of offset operation on a planar wire is wrong
8 #######################################
9
10 restore [locate_data_file OCC743_corr2.brep] a 
11 checkshape a
12
13 if { [catch { mkoffset result a 1 -15 } status] } {
14     puts "Faulty OCC743"
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 3533.52
42 set 2dviewer 0