File: bug25265

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (74 lines) | stat: -rw-r--r-- 1,583 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
puts "============"
puts "OCC25265"
puts "============"
puts ""
####################################################################################
# Perspective projection - selecting front point of two.
# When trying to select front point of two (lying on Z-coordinate) in a perspective
# view, the back one is snapped and selected.
####################################################################################

set select_x 204
set select_y 204

vinit View1
vsetdispmode 1
vcamera -persp

# Draw grid of points 7x7.
set j 0
for {set x 0} {$x<7} {incr x} {
  for {set y 0} {$y<7} {incr y} {
    vpoint $j $x $y 10
    incr j
  }
}
  for {set x 0} {$x<7} {incr x} {
  for {set y 0} {$y<7} {incr y} {
    vpoint $j $x $y 0
    incr j
  }
}

# Prepare view.
vtop
vfit

vselect $select_x $select_y

set stat 0
set result [vstate]
set newlist {}
set ref_selected {24}
set asplit [split $result "\n"]
for {set i 0} {$i < [llength $ref_selected]} {incr i} {
  lappend newlist [lindex [lindex $asplit $i] 0]
}
set newsorted [lsort $newlist]
set refsorted [lsort $ref_selected]
for {set i 0} {$i < [llength $refsorted]} {incr i} {
  if {[lindex $refsorted $i] != [lindex $newsorted $i]} {
    set stat 1
    break
  }
}

if {$stat == 1} {
    puts "Error : Perspective selection is broken."
}

# Dump view.
set scale 48.20
set up_x  -0.09
set up_y   0.94
set up_z  -0.33
set at_x   3.03
set at_y   2.70
set at_z   5.10
set eye_x 16.40
set eye_y 10.98
set eye_z 24.59

vviewparams -scale $scale -up $up_x $up_y $up_z -at $at_x $at_y $at_z -eye $eye_x $eye_y $eye_z

set only_screen 1