mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Removed testgrids 'bugs/vis' and '3rdparty'; tests have been redistributed across other grids. Moved testgrid 'v3d/ivtk' into dedicated 'vtk/ivtk'. Added testgrid 'vselect' dedicated to 3D viewer picking/selection functionality and filled with tests from 'v3d/vertex', 'v3d/face' and similar groups. Added testgrid 'opengl' dedicated to OpenGL driver low-level functionality (GLSL programs and similar) and filled with tests from 'v3d/glsl', 'v3d/raytrace', '3rdparty/fonts', 'bugs/vis' (portion) and similar. Added testgrid 'opengles3' dedicated to OpenGL ES 3.0 driver low-level functionality and reusing tests from 'opengl' testgrid. Subgroup 'opengles3/raytrace' is disabled on Windows, as Ray-Tracing currently requires OpenGL ES 3.2. while ANGLE library implements only OpenGL ES 3.0. Added testgrid 'opengles2' dedicated to OpenGL ES 2.0 driver low-level functionality and reusing a limited subset of passing tests from 'opengl' testgrid. Currently testgrid is activated only on Windows platform when using ANGLE library (properietary OpenGL ES drivers do not allow creation of restricted 2.0 context). Test cases have been cleaned out to put bug description into log, to properly load necessary plugins and to explicitly dump viewer.
119 lines
4.3 KiB
Plaintext
119 lines
4.3 KiB
Plaintext
puts "============"
|
|
puts "CR25760: Visualization - precision factor added to ZNear, ZFar in method ZFitAll() of Graphic3d_Camera is not enough"
|
|
puts "============"
|
|
puts ""
|
|
|
|
pload MODELING VISUALIZATION
|
|
vinit View1 w=409 h=409
|
|
vclear
|
|
|
|
vclear
|
|
vautozfit 0
|
|
|
|
proc test3d {dstart} {
|
|
|
|
set proj1 { 0.47243081629544409 -0.39335870920278265 -0.78871924644244684}
|
|
set proj2 {-0.31828216872577886 0.17649241059446089 -0.93142197208020105}
|
|
|
|
for {set i 1} {$i <= 3} {incr i} {
|
|
for {set r 1} {$r <= 3} {incr r} {
|
|
|
|
set x [expr pow(100, $i)]
|
|
set y [expr pow( 70, $i)]
|
|
set z [expr pow( 50, $i)]
|
|
set dist [expr pow(100, $r)]
|
|
|
|
vclear
|
|
vertex v0 $x $y $z
|
|
vertex v1 [expr "$x + ($dist * [lindex $proj1 0])"] [expr "$y + ($dist * [lindex $proj1 1])"] [expr "$z + ($dist * [lindex $proj1 2])"]
|
|
vertex v2 [expr "$x + ($dist * [lindex $proj2 0])"] [expr "$y + ($dist * [lindex $proj2 1])"] [expr "$z + ($dist * [lindex $proj2 2])"]
|
|
|
|
for {set d [expr $dstart * {max ($x,$y,$z,$dist)}]} {$d <= 1e7} {set d [expr "abs ($d) * 1.2E5"]} {
|
|
for {set p 1} {$p <= 2} {incr p} {
|
|
set proj [set proj$p]
|
|
|
|
vremove -all
|
|
vdisplay v0
|
|
vdisplay v$p
|
|
vviewparams -eye [expr "$x - ($d * [lindex $proj 0])"] [expr "$y - ($d * [lindex $proj 1])"] [expr "$z - ($d * [lindex $proj 2])"] -at $x $y $z
|
|
vzfit
|
|
|
|
vremove -all
|
|
vdisplay v0
|
|
if { [checkcolor 204 204 1 1 0] != 1 } {
|
|
puts "Error: 3D projection test failed with the following parameters:"
|
|
vviewparams
|
|
vzrange
|
|
puts ""
|
|
puts "v1 x: $x"
|
|
puts "v1 y: $y"
|
|
puts "v1 z: $z"
|
|
puts "v2 x: [expr $x + ($dist * [lindex $proj 0])]"
|
|
puts "v2 y: [expr $y + ($dist * [lindex $proj 1])]"
|
|
puts "v2 z: [expr $z + ($dist * [lindex $proj 2])]"
|
|
puts ""
|
|
return 0
|
|
}
|
|
|
|
vremove -all
|
|
vdisplay v$p
|
|
if { [checkcolor 204 204 1 1 0] != 1 } {
|
|
puts "Error: 3D projection test failed with the following parameters:"
|
|
vviewparams
|
|
vzrange
|
|
puts ""
|
|
puts "v1 x: $x"
|
|
puts "v1 y: $y"
|
|
puts "v1 z: $z"
|
|
puts "v2 x: [expr $x + ($dist * [lindex $proj 0])]"
|
|
puts "v2 y: [expr $y + ($dist * [lindex $proj 1])]"
|
|
puts "v2 z: [expr $z + ($dist * [lindex $proj 2])]"
|
|
puts ""
|
|
return 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return 1
|
|
}
|
|
|
|
set tcl_precision 16
|
|
|
|
####################################################################
|
|
# Test orthographic camera without frustum culling. #
|
|
# Test camera with scale 1E-8 to avoid jittering. #
|
|
####################################################################
|
|
vcamera -ortho
|
|
vviewparams -scale 1e-8
|
|
vrenderparams -frustumculling off
|
|
if { [test3d 1e-7] != 1 } { puts "Error: 3D projection test failed: camera is orthographic, view frustum culling is OFF" }
|
|
|
|
####################################################################
|
|
# Test orthographic camera with frustum culling. #
|
|
# Test camera with scale 1E-8 to avoid jittering. #
|
|
####################################################################
|
|
vcamera -ortho
|
|
vviewparams -scale 1e-8
|
|
vrenderparams -frustumculling on
|
|
|
|
if { [test3d 1e-7] != 1 } {
|
|
puts "Error: 3D projection test failed: camera is orthographic, view frustum culling is ON"
|
|
}
|
|
|
|
####################################################################
|
|
# Test perspective camera without frustum culling. #
|
|
# Test camera with less starting distance 1.0 to avoid jittering. #
|
|
####################################################################
|
|
vcamera -persp
|
|
vrenderparams -frustumculling off
|
|
if { [test3d 1.0] != 1 } { puts "Error: 3D projection test failed: camera is perspective, view frustum culling is OFF" }
|
|
|
|
####################################################################
|
|
# Test perspective camera with frustum culling. #
|
|
# Test camera with less starting distance 1.0 to avoid jittering. #
|
|
####################################################################
|
|
vcamera -persp
|
|
vrenderparams -frustumculling on
|
|
if { [test3d 1.0] != 1 } { puts "Error: 3D projection test failed: camera is perspective, view frustum culling is ON" }
|