File: rectangle_selection

package info (click to toggle)
opencascade 7.9.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 301,924 kB
  • sloc: cpp: 1,523,264; tcl: 10,159; cs: 5,173; java: 1,554; sh: 1,342; ansic: 827; xml: 699; makefile: 30; javascript: 22
file content (59 lines) | stat: -rw-r--r-- 2,655 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
51
52
53
54
55
56
57
58
59
puts "================================="
puts "0032182: Visualization - add Select3D_SensitiveSphere"
puts "Tests rectangular selection of Select3D_SenstiveSphere"
puts "================================="

pload MODELING VISUALIZATION
vinit View1 -height 400 -width 600

psphere s1 1
psphere s2 1
psphere s3 1
psphere s4 1
ttranslate s1 2 2 0
ttranslate s2 2 -2 0
ttranslate s3 -2 2 0
ttranslate s4 -2 -2 0
vdisplay -dispMode 1 s1 s2 s3 s4
vfit
vselect 15 15 585 385
if { ![string match "*Selected*" [vstate s1]] ||
     ![string match "*Selected*" [vstate s2]] ||
     ![string match "*Selected*" [vstate s3]] ||
     ![string match "*Selected*" [vstate s4]]} { puts "Error: all spheres should be selected" }
vselect 15 15 585 385 -allowoverlap 1
if { ![string match "*Selected*" [vstate s1]] ||
     ![string match "*Selected*" [vstate s2]] ||
     ![string match "*Selected*" [vstate s3]] ||
     ![string match "*Selected*" [vstate s4]]} { puts "Error: all spheres should be selected" }
vselect 50 135 300 400
if { [string match "*Selected*" [vstate s1]] ||
     [string match "*Selected*" [vstate s2]] ||
     [string match "*Selected*" [vstate s3]] ||
     ![string match "*Selected*" [vstate s4]]} { puts "Error: only sphere s4 should be selected" }
vselect 0 0 300 400 -allowoverlap 1
if { [string match "*Selected*" [vstate s1]] ||
     ![string match "*Selected*" [vstate s2]] ||
     ![string match "*Selected*" [vstate s3]] ||
     ![string match "*Selected*" [vstate s4]]} { puts "Error: spheres s2, s3 and s4 should be selected" }
vright
vselect 80 100 300 300
if { [string match "*Selected*" [vstate s1]] ||
     ![string match "*Selected*" [vstate s2]] ||
     [string match "*Selected*" [vstate s3]] ||
     ![string match "*Selected*" [vstate s4]]} { puts "Error: spheres s1 and s3 should be unselected" }
vselect 380 170 451 241 -allowoverlap 1
if { ![string match "*Selected*" [vstate s1]] ||
     [string match "*Selected*" [vstate s2]] ||
     ![string match "*Selected*" [vstate s3]] ||
     [string match "*Selected*" [vstate s4]]} { puts "Error: spheres s1 and s3 should be selected" }
vselect 0 400 600 200
if { [string match "*Selected*" [vstate s1]] ||
     [string match "*Selected*" [vstate s2]] ||
     [string match "*Selected*" [vstate s3]] ||
     [string match "*Selected*" [vstate s4]]} { puts "Error: all spheres should be unselected" }
vselect 0 400 600 200 -allowoverlap 1
if { ![string match "*Selected*" [vstate s1]] ||
     ![string match "*Selected*" [vstate s2]] ||
     ![string match "*Selected*" [vstate s3]] ||
     ![string match "*Selected*" [vstate s4]]} { puts "Error: all spheres should be selected" }