File: polygon_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 (55 lines) | stat: -rw-r--r-- 2,473 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
puts "================================="
puts "0032182: Visualization - add Select3D_SensitiveSphere"
puts "Tests polygon 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 200 300 15 585 200 300 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" }
vtop
vselect 170 200 300 80 430 200 300 320
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 177 78 422 78 422 322 177 322 -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" }
vright
vselect 181 323 289 196 147 85 59 206
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 131 197 177 156 219 198 179 247
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 131 197 177 156 219 198 179 247 -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 unselected" }
vselect 227 147 282 268 367 151 -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 unselected" }