0031939: Coding - correction of spelling errors in comments [part 7]
[occt.git] / tests / perf / vis / bug24623_2
CommitLineData
f751596e 1puts "============"
2puts "OCC24623_2"
3puts "============"
4puts ""
5#######################################################################
6puts "Visualization - improve selection mechanism"
7# tests performance of selection algorithm. Creates a spiral via polyline
8# and checks its selection in neutral point. For representative result,
7b5e532f 9# increase the number of points in POINTS_NUM and check time measurements
10# in comparison to previous OCCT versions.
f751596e 11#######################################################################
12
13set POINTS_NUM 1000
14set STEP 0.3
15
16pload ALL
17
18set aCoef 0.2
19set aZ 0
20# unset aPointCoords
21list aPointCoords
22for {set i 0} {$i < $POINTS_NUM} {incr i} {
23 set aX [expr $aCoef * $aZ * cos($aZ)]
24 set aY [expr $aCoef * $aZ * sin($aZ)]
25 set aZ [expr $aZ + $STEP]
26 lappend aPointCoords $aX
27 lappend aPointCoords $aY
28 lappend aPointCoords $aZ
29}
30
31vinit
32set aMemInit [meminfo h]
33puts "Initial mem: [expr $aMemInit / (1024 * 1024)] MiB ([expr $aMemInit])"
34polyline p {*}$aPointCoords
35vdisplay p
36
37vfit
38
f751596e 39vmoveto 223 236
f751596e 40vmoveto 0 0
f751596e 41vmoveto 223 236
f751596e 42
43puts ""
44puts "Applying transformations..."
45vtranslateview 1 0 0
46vrotate 100 100 100
47
48puts ""
49puts "Selection time after the transformations:"
44fae8b1 50dchrono aTimer restart
f751596e 51vmoveto 115 160
44fae8b1 52dchrono aTimer stop counter vmoveto_1
f751596e 53vmoveto 0 0
44fae8b1 54dchrono aTimer restart
f751596e 55vmoveto 115 160
44fae8b1 56dchrono aTimer stop counter vmoveto_2
f751596e 57
58set aMemSel [meminfo h]
59puts "Selection mem: [expr $aMemSel / (1024 * 1024)] MiB ([expr $aMemSel])"
60
61checkcolor 131 195 0 1 1