Adding test cases for chl grid
[occt.git] / tests / bugs / modalg / bug745_11
1
2 puts "========"
3 puts "OCC745"
4 puts "========"
5 puts ""
6 #########################
7 # Not correct creation of bisector loci.
8 #########################
9
10 restore [locate_data_file OCC745_nb2.brep] w 
11 mkplane f w
12 topoload f
13 drawcont
14
15 mat
16 result
17
18 ##################################################
19 #Exception thrown: Standard_ConstructionError: Offset wire is not closed.
20 ##################################################
21
22 if { [catch { mkoffset result w 10 -7 } status] } {
23     puts "Faulty OCC745"
24 } else {
25     renamevar result_1 result
26     set nb_info [nbshapes result]
27     regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
28     puts [format "Result shape result contains %s vertexes" $ve]
29     if { $ve == 0 } {
30         puts [format "Faulty : Result shape is NULL shape"]
31     } else {
32         regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
33         if {$wi > 1 } {
34             set ll [explode result w]
35             set num [llength $ll]
36             puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
37             foreach {k} $ll {
38                 checkshape $k
39                 regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
40                 if { $cs != 0 } {
41                     puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
42                 } else {
43                     puts [format "OK: Result shape is CLOSED wire !!! "]
44                 }
45             }
46         }
47     }
48 }
49
50 set length 1930.99
51 set 2dviewer 0  
52