0027715: Visualization - turn off deprecated OpenGL fixed-function pipeline by default
[occt.git] / tests / bugs / vis / bug25363
1 puts "================"
2 puts "OCC25335"
3 puts "================"
4 puts ""
5 #######################################################################################
6 # Visualization - add test command for V3d_View::FitAll by view area
7 #######################################################################################
8
9 set check1_x 2
10 set check1_y 2
11
12 set check2_x 407
13 set check2_y 2
14
15 set check3_x 2
16 set check3_y 407
17
18 set check4_x 407
19 set check4_y 407
20
21 set check5_x 204
22 set check5_y 204
23
24 vinit View1
25 vtop
26
27 # 2D view area
28 vpoint p1  5.0   5.0  0.0
29 vpoint p2 15.0   5.0  0.0
30 vpoint p3 15.0  15.0  0.0
31 vpoint p4  5.0  15.0  0.0
32 vpoint p5 10.0  10.0  0.0
33
34 vfitarea 4.999 4.999 15.001 15.001
35
36 # Check area by 1st point
37 vmoveto ${check1_x} ${check1_y}
38 checkcolor ${check1_x} ${check1_y} 0 1 1
39
40 if {$stat != 1} {
41     puts "Error : Fit all by view area is broken."
42 }
43
44 # Check area by 2nd point
45 vmoveto ${check2_x} ${check2_y}
46 checkcolor ${check2_x} ${check2_y} 0 1 1
47
48 if {$stat != 1} {
49     puts "Error : Fit all by view area is broken."
50 }
51
52 # Check area by 3rd point
53 vmoveto ${check3_x} ${check3_y}
54 checkcolor ${check3_x} ${check3_y} 0 1 1
55
56 if {$stat != 1} {
57     puts "Error : Fit all by view area is broken."
58 }
59
60 # Check area by 4th point
61 vmoveto ${check4_x} ${check4_y}
62 checkcolor ${check4_x} ${check4_y} 0 1 1
63
64 if {$stat != 1} {
65     puts "Error : Fit all by view area is broken."
66 }
67
68 # Check area by 5th point
69 vmoveto ${check5_x} ${check5_y}
70 checkcolor ${check5_x} ${check5_y} 0 1 1
71
72 if {$stat != 1} {
73     puts "Error : Fit all by view area is broken."
74 }
75
76 checkview -screenshot -3d -path ${imagedir}/${test_image}.png