X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=tests%2Fbugs%2Fvis%2Fbug25723_1;h=ef12838523bb7f4178ebe610037992c42c4ccc27;hb=4af098bab9fbcaeba6311c473346ca2d6b77058a;hpb=0090ae85abe80ae4cd01e9aabd3f992e46bbfe9a diff --git a/tests/bugs/vis/bug25723_1 b/tests/bugs/vis/bug25723_1 new file mode 100644 index 0000000000..ef12838523 --- /dev/null +++ b/tests/bugs/vis/bug25723_1 @@ -0,0 +1,48 @@ +puts "============" +puts "OCC25723" +puts "Calculate the center of rotation taking into account active selection" +puts "============" +puts "" + +set x_sel_coord 220 +set y_sel_coord 50 + +set x_mouse_start_coord 100 +set y_mouse_start_coord 100 + +set x_mouse_move_coord 300 +set y_mouse_move_coord 300 + +set x_check_coord 220 +set y_check_coord 50 + +box b1 0 0 0 10 10 10 +box b2 0 0 20 10 10 10 +box b3 0 0 -20 10 10 10 +box b4 0 0 40 10 10 10 + +vinit View1 +vclear +vaxo +vsetdispmode 1 + +# turn on solid selection +vselmode 6 1 +vdisplay b1 b2 b3 b4 +vfit + +# select one (red) solid +vselect ${x_sel_coord} ${y_sel_coord} + +# start rotation +vrotate -mouseStart ${x_mouse_start_coord} ${y_mouse_start_coord} -mouseMove ${x_mouse_move_coord} ${y_mouse_move_coord} + +# unselect +vselect 0 0 + +# check color +if {"[vreadpixel ${x_check_coord} ${y_check_coord} rgb name]" != "GOLDENROD2"} { + puts "Error : Rotation is not correct" +} + +set only_screen 1