0028579: Get rid of the obsolete QANewModTopOpe_* and QANewBRepNaming_* algorithms
[occt.git] / tests / bugs / step / buc60906
1 # by apn master-master 03.12.2012
2 #puts "TODO OCC12345 ALL: An exception was caught"
3 #puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
4 puts "TODO OCC12345 ALL: Faulty OCC294"
5 puts "TODO OCC12345 ALL: Error : OCC294"
6 #puts "TODO OCC12345 ALL: TEST INCOMPLETE"
7
8 puts "========================"
9 puts " BUC60906 "
10 puts "========================"
11
12 cpulimit 3000
13 pload QAcommands
14
15 stepread [locate_data_file carcasse_gauche_simpl3.stp] a *
16
17 tpcompound com
18
19 set AllEdgesList [explode com e]
20 set list [split ${AllEdgesList}]
21 set NumbEdges [llength ${list}]
22 set delta 0.03
23 set IsSmallEdges 0
24
25 set IsOK 1
26
27 for {set i 1} {${i} <= ${NumbEdges}} {incr i} {
28    set i_tolerance [maxtolerance com_${i}]
29    set i_list [split ${i_tolerance} "\n\t"]
30    set i_listLength [llength ${i_list}]
31    if { ${i_listLength} < 7 } then {
32       puts "BUC60906 - Error : i = ${i}"
33       puts "BUC60906 - Error : i_listLength = ${i_listLength}"
34    }
35    set i_EdgeList [lindex ${i_list} 3]
36    set i_MaxEdgeTolerance [lindex [split ${i_EdgeList}] [expr [llength [split ${i_EdgeList}] ] - 2] ]
37    #puts "i_MaxEdgeTolerance = ${i_MaxEdgeTolerance}"
38    if { ${i_MaxEdgeTolerance} > ${delta} } then {
39        set IsSmallEdges 1
40        puts "Remove ${i}-th small edge with a tolerance of ${delta} mm"
41
42        if [catch { OCC294 shape_result com com_${i} } result] {
43           puts "Error : OCC294"
44           set IsOK 0
45           break
46        }
47
48        renamevar shape_result com
49    }
50 }
51 if { ${IsOK} == 1 } {
52    if { ${IsSmallEdges} == 0 } {
53       puts "Error : here are not small edges"
54       set IsOK 0
55    }
56 }
57
58 if { ${IsOK} == 1 } {
59    set fullness [nbshapes com]
60    regexp {VERTEX +: +([-0-9.+eE]+)} $fullness full vert
61    regexp {EDGE +: +([-0-9.+eE]+)} $fullness full edg
62    if { $edg == 0 || $vert == 0 } { 
63       puts "Error : it is Faulty result" 
64       set IsOK 0
65    }
66
67
68 if { ${IsOK} == 1 } {
69    fixshape result com ${delta}
70     checkshape result
71    checkshape result r
72 }
73
74 checkview -display result -2d -path ${imagedir}/${test_image}.png