0031939: Coding - correction of spelling errors in comments [part 7]
[occt.git] / tests / lowalgos / bvh / bug30655_1
CommitLineData
7c1a8210 1puts "======="
2puts "0030655: Modeling Data - Provide interfaces for selection of the elements from BVH tree"
3puts "======="
4puts ""
5
6pload QAcommands
7
8box b 10 10 10
9
10# select elements interfering with each vertex (must be one vertex (itself), three edges and three faces - 7 in total)
11foreach v [explode b v] {
12 QABVH_ShapeSelect r_$v b $v
13 QABVH_ShapeSelect rv_$v b $v -void
14
15 if { [llength [explode r_$v]] != 7} {
16 puts "Error: incorrect selection"
17 }
18
19 checknbshapes rv_$v -ref [nbshapes r_$v]
20 checkprops rv_$v -equal r_$v
21}
22
7b5e532f 23# select elements interfering with each edge (must be two vertices, five edges and four faces - 11 in total)
7c1a8210 24foreach e [explode b e] {
25 QABVH_ShapeSelect r_$e b $e
26 QABVH_ShapeSelect rv_$e b $e -void
27
28 if { [llength [explode r_$e]] != 11} {
29 puts "Error: incorrect selection"
30 }
31
32 checknbshapes rv_$e -ref [nbshapes r_$e]
33 checkprops rv_$e -equal r_$e
34}
35
7b5e532f 36# select elements interfering with each face (must be ffour vertices, eight edges and five faces - 17 in total)
7c1a8210 37foreach f [explode b f] {
38 QABVH_ShapeSelect r_$f b $f
39 QABVH_ShapeSelect rv_$f b $f -void
40
41 if { [llength [explode r_$f]] != 17} {
42 puts "Error: incorrect selection"
43 }
44
45 checknbshapes rv_$f -ref [nbshapes r_$f]
46 checkprops rv_$f -equal r_$f
47}
48
49# intersect the box with itself - select all interfering pairs (8 * 7 + 12 * 11 + 6 * 17 = 290)
50QABVH_PairSelect r b b
51QABVH_PairSelect rv b b -void
52
53if { [llength [explode r]] != 290} {
54 puts "Error: incorrect selection"
55}
56
57checknbshapes rv -ref [nbshapes r]
58checkprops rv -equal r