1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

0024288: Provide flipping text for AIS_Dimensions

- OpenGl_Flipper class added to provide text flipping.
  - Added Graphic3d_Mat4, OpenGl_Mat4 definitions for use with TKOpenGl matrix types.
  - Added flipping parameters for dimensions with 3D text labels at AIS_Dimension class.
  - Test cases.
This commit is contained in:
aba
2013-11-21 17:24:09 +04:00
committed by bugmaster
parent 62b6361a46
commit 938d454409
22 changed files with 480 additions and 24 deletions

46
tests/bugs/vis/bug24288_1 Normal file
View File

@@ -0,0 +1,46 @@
puts "============"
puts "CR24288"
puts "============"
puts ""
#######################################################################
# Provide a text flipping
# Test for text flipping after X rotation
#######################################################################
pload VISUALIZATION
set m_pi 3,14
set m_pi2 1,57
vinit
vpoint radP1 0 0 0
vpoint radP2 50 50 0
vpoint radP3 100 0 0
vcircle circle radP1 radP2 radP3 0
vrotate 0 -$m_pi2 0
verase radP1 radP2 radP3
vdim -radius -name=dim -text=3d circle
vdisplay dim
vfit
vmoveto 102 144
set x_coord 153
set y_coord 153
checkcolor $x_coord $y_coord 0 1 1
if { $stat != 1 } {
puts "Error : Highlighting of radius dimension with 3d text before flipping is wrong."
}
# X axis rotation
vrotate $m_pi 0 0
vfit
vmoveto 201 206
set x_coord 269
set y_coord 123
checkcolor $x_coord $y_coord 0 1 1
if { $stat != 1 } {
puts "Error : Highlighting of radius dimension with 3d text with flipping after x rotation is wrong."
}
set only_screen 1

46
tests/bugs/vis/bug24288_2 Normal file
View File

@@ -0,0 +1,46 @@
puts "============"
puts "CR24288"
puts "============"
puts ""
#######################################################################
# Provide a text flipping
# Test for text flipping after Y rotation
#######################################################################
pload VISUALIZATION
set m_pi 3,14
set m_pi2 1,57
vinit
vpoint radP1 0 0 0
vpoint radP2 50 50 0
vpoint radP3 100 0 0
vcircle circle radP1 radP2 radP3 0
vrotate 0 -$m_pi2 0
verase radP1 radP2 radP3
vdim -radius -name=dim -text=3d circle
vdisplay dim
vfit
vmoveto 102 144
set x_coord 153
set y_coord 153
checkcolor $x_coord $y_coord 0 1 1
if { $stat != 1 } {
puts "Error : Highlighting of radius dimension with 3d text before flipping is wrong."
}
# Y axis rotation
vrotate 0 $m_pi 0
vfit
vmoveto 205 205
set x_coord 96
set y_coord 296
checkcolor $x_coord $y_coord 0 1 1
if { $stat != 1 } {
puts "Error : Highlighting of radius dimension with 3d text with flipping after y rotation is wrong."
}
set only_screen 1

46
tests/bugs/vis/bug24288_3 Normal file
View File

@@ -0,0 +1,46 @@
puts "============"
puts "CR24288"
puts "============"
puts ""
#######################################################################
# Provide a text flipping
# Test for text flipping after Z rotation
#######################################################################
pload VISUALIZATION
set m_pi 3,14
set m_pi2 1,57
vinit
vpoint radP1 0 0 0
vpoint radP2 50 50 0
vpoint radP3 100 0 0
vcircle circle radP1 radP2 radP3 0
vrotate 0 -$m_pi2 0
verase radP1 radP2 radP3
vdim -radius -name=dim -text=3d circle
vdisplay dim
vfit
vmoveto 102 144
set x_coord 153
set y_coord 153
checkcolor $x_coord $y_coord 0 1 1
if { $stat != 1 } {
puts "Error : Highlighting of radius dimension with 3d text before flipping is wrong."
}
# Z axis rotation
vrotate 0 0 $m_pi
vfit
vmoveto 176 184
set x_coord 294
set y_coord 257
checkcolor $x_coord $y_coord 0 1 1
if { $stat != 1 } {
puts "Error : Highlighting of radius dimension with 3d text with flipping after z rotation is wrong."
}
set only_screen 1