Adjusting test cases for current state of OCCT
[occt.git] / tests / bugs / vis / bug319
CommitLineData
a87752f3 1puts "========"
2puts "OCC319"
3puts "========"
4puts ""
5######################################################
6# Wrong shading on a shape
7######################################################
8
9cpulimit 3500
10
11restore [locate_data_file OCC319.brep] result
12
13decho off
14set res [checkshape result]
15decho on
16set index [lsearch $res Faulty]
17if {$index > -1} {
18 puts "Warning OCC319: here is checkshape problem"
19}
20
21tclean result
22vinit
23vdisplay result
24vsetdispmode result 1
25vfit
26
27set scale 16.5593321780929
28set center_X -0.0688543427812931
29set center_Y 11.6346916159369
30set proj_X 0.207536488771439
31set proj_Y -0.233648166060448
32set proj_Z 0.949914216995239
33set up_X -0.857990384101868
34set up_Y 0.422952175140381
35set up_Z 0.291485607624054
36set at_X 8.22575855255127
37set at_Y -2.95449280738831
38set at_Z 3.08669567108154
39
4754e164 40vviewparams ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
a87752f3 41
42set info [trinfo result]
43regexp { +([-0-9.+eE]+) +triangles} $info full tri
44regexp { +([-0-9.+eE]+) +nodes} $info full nod
45
46set IsGood 1
47if { $tri == 0 || $nod == 0 } {
48 puts "Faulty OCC319: here is shading problem"
49 set IsGood 0
50}
51
355c1551 52regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full sq
a87752f3 53set good_square 8623.6
355c1551 54set square_percent [expr abs(${sq} - ${good_square}) / double(${good_square}) * 100.]
a87752f3 55
56set percent_max 0.1
57
58puts "good_square = ${good_square}"
355c1551 59puts "square = ${sq}"
a87752f3 60puts "square_percent = ${square_percent}"
61
62if {${square_percent} > ${percent_max}} {
63 puts "OCC319 Faulty : here is square problem"
64 set IsGood 0
65}
66
67if {${IsGood} != 1} {
68 puts "Errpr : OCC319"
69}
70
71set only_screen 1