mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0031673: Draw Harness, ViewerTest - command vlocation applies transformation in opposite order
gp_Trsf::SetRotationPart() - added method replacing rotation matrix without reseting other components, similar to existing SetTraslationPart() and SetScaleFactor(). Transformation multiplication order has been fixed for vlocation arguments -rotate, -translate, -mirror and -scale. Added -prerotate, -pretranslate, -premirror and -prescale options following previous behavior. vlocation -setRotation now uses new method gp_Trsf::SetRotationPart() for consistency with methods -setLocation and -setScale.
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
puts "============"
|
||||
puts "OCC25276"
|
||||
puts "0025276: Visualization - Lighting is broken if some kinds of transformation applied to a shape"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# Visualization - Lighting is broken if some kinds of transformation applied to a shape
|
||||
#######################################################################
|
||||
|
||||
pload ALL
|
||||
pload MODELING VISUALIZATION
|
||||
vinit
|
||||
box b1 1 6 1
|
||||
vsetdispmode 1
|
||||
@@ -21,10 +18,10 @@ vconnect z1 0 0 0 z
|
||||
vlocation z1 -translate 10 0 0
|
||||
|
||||
vconnect z2 0 10 0 z
|
||||
vlocation z2 -rotate 0 0 0 1 0 0 90
|
||||
vlocation z2 -prerotate 0 0 0 1 0 0 90
|
||||
|
||||
vconnect z3 -10 0 0 z
|
||||
vlocation z3 -scale 0 0 0 0.5
|
||||
vlocation z3 -prescale 0 0 0 0.5
|
||||
|
||||
vconnect z4 0 0 0 z
|
||||
vlocation z4 -copyFrom z3
|
||||
|
22
tests/bugs/vis/bug31673
Normal file
22
tests/bugs/vis/bug31673
Normal file
@@ -0,0 +1,22 @@
|
||||
puts "============"
|
||||
puts "0031673: Draw Harness, ViewerTest - vlocation -rotate is applied in opposite order"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
box b -1 -1 -1 2 2 2
|
||||
explode b F
|
||||
vclear
|
||||
vinit View1
|
||||
vdisplay -dispMode 0 b_1 b_3 b_4 b_6
|
||||
vdisplay -dispMode 1 b_2 b_5
|
||||
vfit
|
||||
vzoom 0.4
|
||||
vlocation b_2 -reset
|
||||
vlocation b_5 -reset
|
||||
vlocation b_2 -rotate 1 -1 -1 0 1 0 90
|
||||
vlocation b_2 -rotate -1 -1 -1 0 1 0 90
|
||||
vlocation b_5 -rotate -1 -1 -1 0 1 0 90
|
||||
if { [vreadpixel 170 380 -rgb -name] == "BLACK" } { puts "Error: wrong rotation" }
|
||||
|
||||
vdump ${imagedir}/${casename}.png
|
@@ -10,7 +10,7 @@ vaxo
|
||||
psphere s0 1
|
||||
psphere s1 1
|
||||
vdisplay -dispMode 1 s0 s1
|
||||
vlocation s1 -reset -translate 2 1 0 -rotate 0 0 0 1 0 0 20
|
||||
vlocation s1 -reset -rotate 0 0 0 1 0 0 20 -translate 2 1 0
|
||||
vfit
|
||||
vbounding
|
||||
|
||||
|
@@ -43,8 +43,7 @@ vmoveto 200 200
|
||||
vdump $imagedir/${casename}_faces_closeup.png
|
||||
|
||||
# apply transformation
|
||||
vlocation s -rotate 0 0 0 0 0 1 10
|
||||
vlocation s -translate -30 0 0
|
||||
vlocation s -reset -translate -30 0 0 -rotate 0 0 0 0 0 1 10
|
||||
vmoveto 0 0
|
||||
vmoveto 200 200
|
||||
|
||||
|
Reference in New Issue
Block a user