mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-06-30 12:14:08 +03:00
AIS_TextLabel - new public class to display simple text labels (based on MyTextClass private class from Draw Harness). ViewerTest::Display() - add more reliable replacement for VDisplayAISObject() with no viewer update flag. vdrawtext command redesign: - Use new AIS_TextLabel class instead of private MyTextClass. - Take object name and allow to clear labels from the Viewer. - Use parameter name + parameter value syntax instead of strict list of mandatory arguments. - Use [0; 1] range for colors and accept names. - Drop redundant argument "isMultiByte". - Support argument -noupdate to skip Viewer update. Update test cases to new syntax of vdrawtext.
39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
puts "============"
|
|
puts "CR24837_2"
|
|
puts "============"
|
|
puts ""
|
|
#######################################################################
|
|
# Visualization - revise design and implementation of connected Interactive Objects
|
|
#######################################################################
|
|
|
|
pload MODELING VISUALIZATION
|
|
box o1 -10 -10 -5 1 1 10
|
|
box o2 10 10 -5 1 1 10
|
|
box b1 0 0 0 1 2 3
|
|
box b2 3 0 0 3 2 1
|
|
vinit View1
|
|
vclear
|
|
vtop
|
|
vsetdispmode 0
|
|
vdisplay o1 o2
|
|
vdisplay b1 b2
|
|
vfit
|
|
vdrawtext tb1 "b1" -pos 0 -3 3 -color 1.0 0.098 0.098 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font Arial
|
|
vdrawtext tb2 "b2" -pos 3 0 3 -color 0.098 1.0 0.098 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font Arial
|
|
vdrawtext bc_1 "bc_1" -pos 0 -9 3 -color 1.0 0.8823 0.8823 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font Arial
|
|
vdrawtext bc_2 "bc_2" -pos 3 -6 3 -color 1.0 0.8823 0.8823 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font Arial
|
|
vsetdispmode 1
|
|
set anImage ${imagedir}/${casename}_2_1.png
|
|
vdump ${anImage}
|
|
|
|
vsetmaterial b1 b2 tb1 tb2 plastic
|
|
vsetcolor b1 tb1 RED
|
|
vsetcolor b2 tb2 GREEN
|
|
set anImage ${imagedir}/${casename}_2_2.png
|
|
vdump ${anImage}
|
|
|
|
vsetlocation b1 0 -3 0
|
|
vconnect bc 0 -6 0 b1 b2 tb1 tb2
|
|
set anImage ${imagedir}/${casename}_2_3.png
|
|
vdump ${anImage}
|