mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
48 lines
1.8 KiB
Plaintext
48 lines
1.8 KiB
Plaintext
puts "============"
|
|
puts "CR26435"
|
|
puts "============"
|
|
puts ""
|
|
#######################################################################
|
|
# Visualization - V3d_View::ConvertToGrid returns wrong coordinates for non-orthogonal projection
|
|
#######################################################################
|
|
|
|
vinit View1 w=400 h=400
|
|
vgrid -type rectangular -mode lines -origin 0 0 -step 5 5
|
|
|
|
# 1. Check convert to grid for axonometric projection. Grid is at origin.
|
|
vaxo
|
|
set output [vconvert 200 200 grid]
|
|
|
|
checkreal "vconvert axo - grid origin" [lindex $output 2] 5.0 1e-7 0.0
|
|
checkreal "vconvert axo - grid origin" [lindex $output 3] -5.0 1e-7 0.0
|
|
checkreal "vconvert axo - grid origin" [lindex $output 4] 0.0 1e-7 0.0
|
|
|
|
# 2. Check convert to grid for top projection. Grid is at origin.
|
|
vtop
|
|
set output [vconvert 200 200 grid]
|
|
|
|
checkreal "vconvert top - grid origin" [lindex $output 2] 0.0 1e-7 0.0
|
|
checkreal "vconvert top - grid origin" [lindex $output 3] -5.0 1e-7 0.0
|
|
checkreal "vconvert top - grid origin" [lindex $output 4] 0.0 1e-7 0.0
|
|
|
|
# 3. Check convert to grid for axonometric projection. Grid is not at origin.
|
|
vpriviledgedplane 0.0 0.0 10.0 0 0 1 1 0 0
|
|
|
|
vaxo
|
|
set output [vconvert 200 200 grid]
|
|
|
|
checkreal "vconvert axo - grid lifted" [lindex $output 2] 15.0 1e-7 0.0
|
|
checkreal "vconvert axo - grid lifted" [lindex $output 3] -15.0 1e-7 0.0
|
|
checkreal "vconvert axo - grid lifted" [lindex $output 4] 10.0 1e-7 0.0
|
|
|
|
# 4. Check convert to grid for top projection. Grid is not at origin.
|
|
vtop
|
|
set output [vconvert 200 200 grid]
|
|
|
|
checkreal "vconvert top - grid lifted" [lindex $output 2] 0.0 1e-7 0.0
|
|
checkreal "vconvert top - grid lifted" [lindex $output 3] -5.0 1e-7 0.0
|
|
checkreal "vconvert top - grid lifted" [lindex $output 4] 10.0 1e-7 0.0
|
|
|
|
# do not save any image
|
|
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|