0027986: Visualization - AIS_InteractiveContext::SetLocation() does not update dynami...
[occt.git] / tests / bugs / vis / bug24389
index 1e2b568..91979de 100644 (file)
@@ -6,6 +6,8 @@ puts ""
 #  Invalid hilight of AIS dimension line in local selection
 #######################################################################
 
+vfont add [locate_data_file DejaVuSans.ttf] SansFont
+
 # ----------------------------------------------#
 #  Check highlight of length dimension elements #
 # ----------------------------------------------#
@@ -23,15 +25,14 @@ vpoint len_p1  0 0 0
 vpoint len_p2 40 0 0
 verase len_p1 len_p2
 
-vdimension length name=len1 text=3d plane=xoy flyout=20 arrows=external label=left len_p1 len_p2
-vdimension length name=len2 text=3d plane=xoy flyout=-20 arrows=external label=right len_p1 len_p2
+vdimension len1 -length -text 3d -plane xoy -flyout 20 -arrow external -label left -shapes len_p1 len_p2 -font SansFont
+vdimension len2 -length -text 3d -plane xoy -flyout -20 -arrow external -label right -shapes len_p1 len_p2 -font SansFont
 
 vpoint len_p3  0 20 0
 vpoint len_p4 40 20 0
 verase len_p3 len_p4
 
-vdimension length name=len3 text=3d plane=xoy flyout=20 arrows=internal label=hcenter len_p3 len_p4
-vdisplay len1 len2 len3
+vdimension len3 -length -text 3d -plane xoy -flyout 20 -arrow internal -label hcenter -shapes len_p3 len_p4 -font SansFont
 
 # diameter
 
@@ -40,22 +41,21 @@ vpoint diam_p2 120 0   0
 vpoint diam_p3 105 -15 0
 verase diam_p1 diam_p2 diam_p3
 vcircle diam_c1 diam_p1 diam_p2 diam_p3 0
-vdimension diameter name=diam1 text=3d plane=xoy arrows=external label=left diam_c1
+vdimension diam1 -diameter -text 3d -plane xoy -arrow external -label left -shapes diam_c1 -font SansFont
 
 vpoint diam_p4  90 40 0
 vpoint diam_p5 120 40 0
 vpoint diam_p6 105 25 0
 verase diam_p4 diam_p5 diam_p6
 vcircle diam_c2 diam_p4 diam_p5 diam_p6 0
-vdimension diameter name=diam2 text=3d plane=xoy arrows=external label=right diam_c2
+vdimension diam2 -diameter -text 3d -plane xoy -arrow external -label right -shapes diam_c2 -font SansFont
 
 vpoint diam_p7  80 -40 0
 vpoint diam_p8 120 -40 0
 vpoint diam_p9 100 -60 0
 verase diam_p7 diam_p8 diam_p9
 vcircle diam_c3 diam_p7 diam_p8 diam_p9 0
-vdimension diameter name=diam3 text=3d plane=xoy arrows=external label=hcenter flyout=30 diam_c3
-vdisplay diam1 diam2 diam3
+vdimension diam3 -diameter -text 3d -plane xoy -arrow external -label hcenter -flyout 30 -shapes diam_c3 -font SansFont
 
 # radius
 
@@ -64,15 +64,14 @@ vpoint rad_p2 180 -45 0
 vpoint rad_p3 220  -5 0
 verase rad_p1 rad_p2 rad_p3
 vcircle rad_c1 rad_p1 rad_p2 rad_p3 0
-vdimension radius name=rad1 text=3d plane=xoy arrows=internal label=hcenter flyout=0 rad_c1
+vdimension rad1 -radius -text 3d -plane xoy -arrow internal -label hcenter -flyout 0 -shapes rad_c1 -font SansFont
 
 vpoint rad_p4 180 -70 0
 vpoint rad_p5 160 -90 0
 vpoint rad_p6 140 -70 0
 verase rad_p4 rad_p5 rad_p6
 vcircle rad_c2 rad_p4 rad_p5 rad_p6 0
-vdimension radius name=rad2 text=3d plane=xoy arrows=external label=left rad_c2
-vdisplay rad1 rad2
+vdimension rad2 -radius -text 3d -plane xoy -arrow external -label left -shapes rad_c2 -font SansFont
 
 # angles
 
@@ -80,21 +79,20 @@ vpoint ang_p1 0  -50 0
 vpoint ang_p2 25 -75 0
 vpoint ang_p3 0  -100 0
 verase ang_p1 ang_p2 ang_p3
-vdimension angle name=ang1 text=3d plane=xoy arrows=internal label=hcenter flyout=35 ang_p1 ang_p2 ang_p3
+vdimension ang1 -angle -text 3d -plane xoy -arrow internal -label hcenter -flyout 35 -shapes ang_p1 ang_p2 ang_p3 -font SansFont
 
 vpoint ang_p4   0 -120 0
 vpoint ang_p5  30 -80  0
 vpoint ang_p6  30 -120 0
 verase ang_p4 ang_p5 ang_p6
-vdimension angle name=ang2 text=3d plane=xoy arrows=external label=left flyout=55 ang_p4 ang_p5 ang_p6
+vdimension ang2 -angle -text 3d -plane xoy -arrow external -label left -flyout 55 -shapes ang_p4 ang_p5 ang_p6 -font SansFont
 
 vpoint ang_p8  55 -120 0
 vpoint ang_p9  55 -80  0
 vpoint ang_p10 95 -120 0
 verase ang_p8 ang_p9 ang_p10
-vdimension angle name=ang3 text=3d plane=xoy arrows=external label=right flyout=55 ang_p8 ang_p9 ang_p10
+vdimension ang3 -angle -text 3d -plane xoy -arrow external -label right -flyout 55 -shapes ang_p8 ang_p9 ang_p10 -font SansFont
 
-vdisplay ang1 ang2 ang3
 vpoint fit1 -75 0 0
 vpoint fit2 235 0 0
 vfit
@@ -122,7 +120,7 @@ proc check_picking { pick check name } {
 
 proc check_cross_picking { pick object name } {
 
-  vselmode 0 0
+  vselmode 0 1
 
   for {set i 1} {$i < 3} {incr i} {
     
@@ -154,74 +152,74 @@ proc check_cross_picking { pick object name } {
     }
     vselmode $object $i 0
   }
-  vselmode 0 0
+  vselmode 0 1
 }
 
 # pick coord { [flyout], dimension line, text }
 
 # check sensitives "len1"
-set pick_coord { { 99 133 } { 106 124 } { 76 131 } }
-set check_coord { 125 124 }
+set pick_coord { {100 133 } { 106 124 } { 76 130 } }
+set check_coord { 123 125 }
 check_picking $pick_coord $check_coord "length dimension (len1)"
 check_cross_picking $pick_coord len1 "length dimension (len1)"
 
 # check sensitives "len2"
-set pick_coord { { 99 167 } { 127 176 } { 185 183 } }
-set check_coord { 112 176 }
+set pick_coord { { 100 167 } { 126 177 } { 187 180 } }
+set check_coord { 106 177 }
 check_picking $pick_coord $check_coord "length dimension (len2)"
 check_cross_picking $pick_coord len2 "length dimension (len2)"
 
 # check sensitives "len3"
-set pick_coord { { 99 114 } { 110 98 } { 131 105 } }
-set check_coord { 152 109 }
+set pick_coord { { 100 114 } { 106 99 } { 120 97 } }
+set check_coord { 153 109 }
 check_picking $pick_coord $check_coord "length dimension (len3)"
 check_cross_picking $pick_coord len3 "length dimension (len3)"
 
 # check sensitives "diam1"
-set pick_coord { { 247 150 } { 194 157 } }
-set check_coord { 236 150 }
+set pick_coord { { 247 151 } { 184 150 } }
+set check_coord { 236 151 }
 check_picking $pick_coord $check_coord "diameter dimension (diam1)"
 check_cross_picking $pick_coord diam1 "diameter dimension (diam1)"
 
 # check sensitives "diam2"
-set pick_coord { { 221 98 } { 305 105 } }
-set check_coord { 238 98 }
+set pick_coord { { 221 99 } { 285 99 } }
+set check_coord { 239 99 }
 check_picking $pick_coord $check_coord "diameter dimension (diam2)"
 check_cross_picking $pick_coord diam2 "diameter dimension (diam2)"
 
 # check sensitives "diam3"
-set pick_coord { { 204 225 } { 268 242 } { 243 249 } }
-set check_coord { 204 233 }
+set pick_coord { { 205 225 } { 263 242 } { 224 242 } }
+set check_coord { 205 233 }
 check_picking $pick_coord $check_coord "diameter dimension (diam3)"
 check_cross_picking $pick_coord diam3 "diameter dimension (diam3)"
 
 # check sensitives "rad1"
-set pick_coord { { 287 157 } { 326 165 } }
-set check_coord { 287 157 }
+set pick_coord { { 288 158 } { 310 157 } }
+set check_coord { 288 158 }
 check_picking $pick_coord $check_coord "radius dimension (rad1)"
 check_cross_picking $pick_coord rad1 "radius dimension (rad1)"
 
 # check sensitives "rad2"
-set pick_coord { { 320 242 } { 383 249 } }
-set check_coord { 340 242 }
+set pick_coord { { 320 242 } { 362 241 } }
+set check_coord { 320 242 }
 check_picking $pick_coord $check_coord "radius dimension (rad2)"
 check_cross_picking $pick_coord rad2 "radius dimension (rad2)"
 
 # check sensitives "ang1"
-set pick_coord { { 112 268 } { 96 220 } { 80 250 } }
-set check_coord { 96 220 }
+set pick_coord { { 113 229 } { 96 221 } { 85 256 } }
+set check_coord { 86 250 }
 check_picking $pick_coord $check_coord "angle dimension (ang1)"
 check_cross_picking $pick_coord ang1 "angle dimension (ang1)"
 
 # check sensitives "ang2"
-set pick_coord { { 139 301 } { 152 327 } { 65 297 } }
-set check_coord { 108 320 }
+set pick_coord { { 140 311 } { 91 310 } { 50 278 } }
+set check_coord { 105 318 }
 check_picking $pick_coord $check_coord "angle dimension (ang2)"
 check_cross_picking $pick_coord ang2 "angle dimension (ang2)"
 
 # check sensitives "ang3"
-set pick_coord { { 171 304 } { 199 321 } { 252 285 } }
-set check_coord { 191 324 }
+set pick_coord { { 172 303 } { 163 327 } { 243 287 } }
+set check_coord { 183 326 }
 check_picking $pick_coord $check_coord "angle dimension (ang3)"
 check_cross_picking $pick_coord ang3 "angle dimension (ang3)"
 
@@ -235,7 +233,7 @@ set ymin -500
 set ymax  500
 set shift 0
 
-vselmode 0 0
+vselmode 0 1
 vselect $xmin $ymin $xmax $ymax $shift
 vdump $anImage1
 
@@ -245,7 +243,7 @@ vselect $xmin $ymin $xmax $ymax $shift
 vdump $anImage2
 
 vselect 0 0 0 0 0
-vselmode 0 0
+vselmode 0 1
 vselmode 2 1
 vselect $xmin $ymin $xmax $ymax $shift
 vdump $anImage3