0023748: Bad monitoring of intermediate results in offset commands
[occt.git] / tests / bugs / modalg_4 / bug745_12
CommitLineData
ab87e6fc 1puts "TODO ?OCC12345 ALL: An exception was caught"
2puts "TODO ?OCC12345 ALL: \\*\\* Exception "
3puts "TODO ?OCC23748 ALL: Error: Offset is not done."
4puts "TODO ?OCC12345 ALL: Faulty OCC745"
f1aa2b62 5
6puts "========"
7puts "OCC745"
8puts "========"
9puts ""
10##################################################
11# Exception thrown: Standard_ConstructionError: Offset wire is not closed.
12##################################################
13
14restore [locate_data_file OCC745_nb3.brep] w
352ffd73 15checkshape w
f1aa2b62 16
17if { [catch { mkoffset result w 1 10 } status] } {
18 puts "Faulty OCC745"
19} else {
20 renamevar result_1 result
21 set nb_info [nbshapes result]
22 regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
23 puts [format "Result shape result contains %s vertexes" $ve]
24 if { $ve == 0 } {
25 puts [format "Faulty : Result shape is NULL shape"]
26 } else {
27 regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
28 if {$wi > 1 } {
29 set ll [explode result w]
30 set num [llength $ll]
31 puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
32 foreach {k} $ll {
352ffd73 33 checkshape $k
f1aa2b62 34 regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
35 if { $cs != 0 } {
36 puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
37 } else {
38 puts [format "OK: Result shape is CLOSED wire !!! "]
39 }
40 }
41 }
42 }
355c1551 43 set length 0
44 set 2dviewer 0
f1aa2b62 45}