0028107: Visualization - provide a flexible interface to set custom hatch styles
[occt.git] / tests / bugs / vis / bug26435
CommitLineData
aacbabe1 1puts "============"
2puts "CR26435"
3puts "============"
4puts ""
5#######################################################################
6# Visualization - V3d_View::ConvertToGrid returns wrong coordinates for non-orthogonal projection
7#######################################################################
8
9vinit View1 w=400 h=400
10vgrid r l 0 0 5 5 0
11
12# 1. Check convert to grid for axonometric projection. Grid is at origin.
13vaxo
14set output [vconvert 200 200 grid]
15
16checkreal "vconvert axo - grid origin" [lindex $output 2] 5.0 1e-7 0.0
17checkreal "vconvert axo - grid origin" [lindex $output 3] -5.0 1e-7 0.0
18checkreal "vconvert axo - grid origin" [lindex $output 4] 0.0 1e-7 0.0
19
20# 2. Check convert to grid for top projection. Grid is at origin.
21vtop
22set output [vconvert 200 200 grid]
23
24checkreal "vconvert top - grid origin" [lindex $output 2] 0.0 1e-7 0.0
25checkreal "vconvert top - grid origin" [lindex $output 3] -5.0 1e-7 0.0
26checkreal "vconvert top - grid origin" [lindex $output 4] 0.0 1e-7 0.0
27
28# 3. Check convert to grid for axonometric projection. Grid is not at origin.
29vpriviledgedplane 0.0 0.0 10.0 0 0 1 1 0 0
30
31vaxo
32set output [vconvert 200 200 grid]
33
34checkreal "vconvert axo - grid lifted" [lindex $output 2] 15.0 1e-7 0.0
35checkreal "vconvert axo - grid lifted" [lindex $output 3] -15.0 1e-7 0.0
36checkreal "vconvert axo - grid lifted" [lindex $output 4] 10.0 1e-7 0.0
37
38# 4. Check convert to grid for top projection. Grid is not at origin.
39vtop
40set output [vconvert 200 200 grid]
41
42checkreal "vconvert top - grid lifted" [lindex $output 2] 0.0 1e-7 0.0
43checkreal "vconvert top - grid lifted" [lindex $output 3] -5.0 1e-7 0.0
44checkreal "vconvert top - grid lifted" [lindex $output 4] 10.0 1e-7 0.0
45
46# do not save any image
5747059b 47checkview -screenshot -3d -path ${imagedir}/${test_image}.png