1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/perf/vis/bug24623_2
luz paz 7b5e532f83 0031939: Coding - correction of spelling errors in comments [part 7]
Fix various typos

Fixed via codespell v2.1.dev
2021-01-20 21:27:44 +03:00

62 lines
1.5 KiB
Plaintext

puts "============"
puts "OCC24623_2"
puts "============"
puts ""
#######################################################################
puts "Visualization - improve selection mechanism"
# tests performance of selection algorithm. Creates a spiral via polyline
# and checks its selection in neutral point. For representative result,
# increase the number of points in POINTS_NUM and check time measurements
# in comparison to previous OCCT versions.
#######################################################################
set POINTS_NUM 1000
set STEP 0.3
pload ALL
set aCoef 0.2
set aZ 0
# unset aPointCoords
list aPointCoords
for {set i 0} {$i < $POINTS_NUM} {incr i} {
set aX [expr $aCoef * $aZ * cos($aZ)]
set aY [expr $aCoef * $aZ * sin($aZ)]
set aZ [expr $aZ + $STEP]
lappend aPointCoords $aX
lappend aPointCoords $aY
lappend aPointCoords $aZ
}
vinit
set aMemInit [meminfo h]
puts "Initial mem: [expr $aMemInit / (1024 * 1024)] MiB ([expr $aMemInit])"
polyline p {*}$aPointCoords
vdisplay p
vfit
vmoveto 223 236
vmoveto 0 0
vmoveto 223 236
puts ""
puts "Applying transformations..."
vtranslateview 1 0 0
vrotate 100 100 100
puts ""
puts "Selection time after the transformations:"
dchrono aTimer restart
vmoveto 115 160
dchrono aTimer stop counter vmoveto_1
vmoveto 0 0
dchrono aTimer restart
vmoveto 115 160
dchrono aTimer stop counter vmoveto_2
set aMemSel [meminfo h]
puts "Selection mem: [expr $aMemSel / (1024 * 1024)] MiB ([expr $aMemSel])"
checkcolor 131 195 0 1 1