0023457: Slow text rendering
[occt.git] / tests / bugs / modalg / bug745_1
1
2 puts "========"
3 puts "OCC745"
4 puts "========"
5 puts ""
6 #######################################################
7 ## There are several cases where the offset algo works wrong for various reasons
8 ## for wires containing only linear segments and arcs of circle.
9 #######################################################
10
11 restore [locate_data_file OCC745_1.brep] a 
12 checkshape a
13
14 if { [catch { mkoffset result a 1 -10 } status] } {
15   puts "Faulty : an exception was caught"
16 } else {
17     renamevar result_1 result
18     set nb_info [nbshapes result]
19     regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
20     puts [format "Result shape result contains %s vertexes" $ve]
21     if { $ve == 0 } {
22         puts [format "Faulty : Result shape is NULL shape"]
23     } else {
24         regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
25         if {$wi > 1 } {
26             set ll [explode result w]
27             set num [llength $ll]
28             puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
29             foreach {k} $ll {
30                 checkshape $k
31                 regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
32                 if { $cs != 0 } {
33                     puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
34                 } else {
35                     puts [format "OK: Result shape is CLOSED wire !!! "]
36                 }
37             }
38         }
39     }
40 }
41
42 set length 932.825
43 set 2dviewer 0  
44