1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00
Files
occt/tests/bugs/vis/bug25532
vpa 8e5fb5eabc 0027818: Visualization - provide an interface to define highlight presentation properties
- introduces a wrapper for setting up highlight properties: Graphic3d_HighlightStyle;
- API of all methods that use highlight or selection color is changed to deal with Graphic3d_HighlightStyle;
- highlight in shading mode now supports transparency, implemented via blending;
- transparency for selection can also be set, but implementing custom entity owners with additional presentation on application level;
- methods PrsMgr_PresentationManager::Highlight, PrsMgr_PresentationManager::BoundBox that highlight object with hard-coded color are removed;
- deprecated methods of SelectMgr_EntityOwner, that use presentation manager's highlight method, were removed;
- methods of IsHilighted AIS context with selection color checks were replaced;
- added API to store dynamic and selection highlight to Prs3d_Drawer class;
- customization of dynamic and selection highlight for particular objects is now available through SelectMgr_SelectableObject::HilightAttributes();
- AIS_InteractiveContext highlight methods were updated to support individual highlight styles of interactive objects;
- introduced new command - vselprops, that allows to customize global selection and highlight properties like autoactivation, pixel tolerance and colors;
- Draw Harness commands vautoactivatesel and vselprecision were removed, use vselprops instead;
- fixed bug in command's parser;
- test case for issue #27818
2016-09-30 11:17:11 +03:00

56 lines
1.5 KiB
Plaintext

puts "============"
puts "OCC25532"
puts "============"
puts ""
#######################################################################
# Visualization - fix cross-references between AIS_ConnectedInteractive
# and connected presentation
#######################################################################
pload MODELING VISUALIZATION
psphere s 0.5
tclean s
incmesh s 0.001
trinfo s
vinit View1
vclear
vaxo
vcaps -vbo 0
vsetdispmode 1
vdefaults absDefl=1.0
vselprops -autoactivate 0
set aMemInit [meminfo h]
set aNb 1000
# display as copies
eval compound [lrepeat $aNb s] ss
explode ss
for {set i 1} {$i <= $aNb} {incr i} { vdisplay -noupdate ss_${i}; vsetlocation -noupdate ss_${i} 0 0 s }
vfit
set aMemDisp1 [meminfo h]
vclear
set aMemClear1 [meminfo h]
# display as connected instances of single presentation
vconnectto i_1 0 0 0 s
for {set i 2} {$i < $aNb} {incr i} { vconnectto i_${i} ${i} 0 0 i_1 }
set aMemDisp2 [meminfo h]
vclear
set aMemClear2 [meminfo h]
puts "Initial memory: [expr $aMemInit / (1024 * 1024)] MiB"
puts "Displaying (simple): [expr $aMemDisp1 / (1024 * 1024)] MiB"
puts "Clearing (simple): [expr $aMemClear1 / (1024 * 1024)] MiB"
puts "Displaying (connected): [expr $aMemDisp2 / (1024 * 1024)] MiB"
puts "Clearing (connected): [expr $aMemClear2 / (1024 * 1024)] MiB"
set aRatio [expr $aMemClear2 / double($aMemClear1)]
# check if the memory difference is greater than 20%
if [expr $aRatio > 1.2] {
puts "Error : TEST FAILED"
}