X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=tests%2Fbugs%2Fvis%2Fbug30695;h=d8ce2bfca4fed885ac3e97ba05d4066b1a163685;hb=8996b4490a69f1a96ca9b689dc239d1f8acf5fc5;hpb=87bda9d805e1ace654dabc24640791492cfd2c08 diff --git a/tests/bugs/vis/bug30695 b/tests/bugs/vis/bug30695 new file mode 100644 index 0000000000..d8ce2bfca4 --- /dev/null +++ b/tests/bugs/vis/bug30695 @@ -0,0 +1,47 @@ +puts "=============" +puts "0030695: Visualization - selection by box should use clipping planes set for viewer" +puts "=============" + +pload ALL +vinit View1 + +box b 10 10 10 +vdisplay b + +box b1 -5 0 0 2 2 2 +vdisplay b1 + +box b2 13 0 0 2 2 2 +vdisplay b2 + +box b3 16 0 0 2 2 2 +vdisplay b3 + +vsetdispmode 1 + +vtop +vfit +vzoom 0.5 + +# apply selection with rectangle covering all visualized objects +vselect 40 100 370 300 +if {[vnbselected] != 4} { + puts "ERROR: Initial objects are not selected!" +} + +vclipplane create pln +vclipplane set pln view Driver1/Viewer1/View1 +# use clippling plane to have two objects visible (the second object is partially visible) +vclipplane change pln equation -1 0 0 5 + +# apply inital selection rectangle, expecting selection of only fully visible object +vselect 40 100 370 300 +if {[vnbselected] != 1} { + puts "ERROR: Bad numer of selected objects after clippling plane set on view!" +} + +# apply inital selection rectangle, expecting selection of partially included object also +vselect 40 100 370 300 -allowoverlap 1 +if {[vnbselected] != 2} { + puts "ERROR: Bad numer of selected objects after clippling plane set on view with allow overlap selection!" +}