File: bug25723

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 (50 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download | duplicates (3)
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
puts "============"
puts "OCC25723"
puts "Calculate the center of rotation taking into account structure visibility"
puts "============"
puts ""

set x_start_sel_coord 100
set y_start_sel_coord 104

set x_end_sel_coord 400
set y_end_sel_coord 400

set x_mouse_start_coord 100
set y_mouse_start_coord 100

set x_mouse_move_coord 300
set y_mouse_move_coord 300

set x_check_coord 220
set y_check_coord 50

box b1 0 0   0 10 10 10
box b2 0 0  20 10 10 10
box b3 0 0 -20 10 10 10
box b4 0 0  40 10 10 10

vinit View1
vclear
vaxo
vsetdispmode 1

# turn on solid selection
vselmode 6 1
vdisplay b1 b2 b3 b4
vfit

# select solid
vselect ${x_start_sel_coord} ${y_start_sel_coord} ${x_end_sel_coord} ${y_end_sel_coord}

# hide selected solids
verase

# rotation
vrotate -mouseStart ${x_mouse_start_coord} ${y_mouse_start_coord} -mouseMove ${x_mouse_move_coord} ${y_mouse_move_coord}

if {"[vreadpixel ${x_check_coord} ${y_check_coord} rgb name]" != "GOLDENROD2"} {
  puts "Error: Rotation is not correct"
}

set only_screen 1