1 # Copyright (c) 1999-2012 OPEN CASCADE SAS
3 # The content of this file is subject to the Open CASCADE Technology Public
4 # License Version 6.5 (the "License"). You may not use the content of this file
5 # except in compliance with the License. Please obtain a copy of the License
6 # at http://www.opencascade.org and read it completely before using this file.
8 # The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 # main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 # The Original Code and all software distributed under the License is
12 # distributed on an "AS IS" basis, without warranty of any kind, and the
13 # Initial Developer hereby disclaims all such warranties, including without
14 # limitation, any warranties of merchantability, fitness for a particular
15 # purpose or non-infringement. Please see the License for the specific terms
16 # and conditions governing the rights and limitations under the License.
20 set name [lastrep id x y MOUSEbutton]
22 lastrep id x1 y1 z1 MOUSEbutton
23 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
26 while {[dval MOUSEbutton] == 0} {
27 pick id x2 y2 z2 MOUSEbutton nowait
28 dset dx x2-x1 dy y2-y1 dz z2-z1 x1 x2 y1 y2 z1 z2
30 2dtranslate $name dx dy
34 if {[dval MOUSEbutton] == 1} { display $name; return; }
35 dset dx x0-x2 dy y0-y2 dz z0-z2
36 2dtranslate $name dx dy
42 set name [lastrep id x y MOUSEbutton]
44 lastrep id x1 y1 z1 MOUSEbutton
45 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
48 while {[dval MOUSEbutton] == 0} {
49 pick id x2 y2 z2 MOUSEbutton nowait
50 dset dx x2-x1 dy y2-y1 dz z2-z1 x1 x2 y1 y2 z1 z2
52 translate $name dx dy dz
56 if {[dval MOUSEbutton] == 1} { display $name; return; }
57 dset dx x0-x2 dy y0-y2 dz z0-z2
58 translate $name dx dy dz
64 set name [lastrep id x y MOUSEbutton]
66 lastrep id x1 y1 z1 MOUSEbutton
67 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
70 while {[dval MOUSEbutton] == 0} {
71 pick id x2 y2 z2 MOUSEbutton nowait
74 translate $name dx 0 0
78 if {[dval MOUSEbutton] == 1} {display $name; return;}
80 translate $name dx 0 0
86 set name [lastrep id x y MOUSEbutton]
88 lastrep id x1 y1 z1 MOUSEbutton
89 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
92 while {[dval MOUSEbutton] == 0} {
93 pick id x2 y2 z2 MOUSEbutton nowait
96 translate $name 0 dy 0
100 if {[dval MOUSEbutton] == 1} { display $name; return;}
102 translate $name 0 dy 0
108 set name [lastrep id x y MOUSEbutton]
110 lastrep id x1 y1 z1 MOUSEbutton
111 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
114 while {[dval MOUSEbutton] == 0} {
115 pick id x2 y2 z2 MOUSEbutton nowait
118 translate $name 0 0 dz
122 if {[dval MOUSEbutton] == 1} { display $name; return;}
124 translate $name 0 0 dz
130 set name [lastrep id x y MOUSEbutton]
132 lastrep id x1 y1 z1 MOUSEbutton
133 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
134 while {[dval MOUSEbutton] == 0} {
135 pick id x2 y2 z2 MOUSEbutton nowait
136 dset dx x2-x0 dy y2-y0 dz z2-z0
137 eval ttranslate [explode $name e] dx dy dz
140 if {[dval MOUSEbutton] == 3} return;
141 dset dx x2-x0 dy y2-y0 dz z2-z0
142 ttranslate $name dx dy dz
147 set name [lastrep id x y MOUSEbutton]
149 lastrep id x1 y1 z1 MOUSEbutton
150 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
151 while {[dval MOUSEbutton] == 0} {
152 pick id x2 y2 z2 MOUSEbutton nowait
154 eval ttranslate [explode $name e] dx 0 0
157 if {[dval MOUSEbutton] == 3} return;
159 ttranslate $name dx 0 0
164 set name [lastrep id x y MOUSEbutton]
166 lastrep id x1 y1 z1 MOUSEbutton
167 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
168 while {[dval MOUSEbutton] == 0} {
169 pick id x2 y2 z2 MOUSEbutton nowait
171 eval ttranslate [explode $name e] 0 dy 0
174 if {[dval MOUSEbutton] == 3} return;
176 ttranslate $name 0 dy 0
181 set name [lastrep id x y MOUSEbutton]
183 lastrep id x1 y1 z1 MOUSEbutton
184 dset x0 x1 y0 y1 z0 z1 MOUSEbutton 0
185 while {[dval MOUSEbutton] == 0} {
186 pick id x2 y2 z2 MOUSEbutton nowait
188 eval ttranslate [explode $name e] 0 0 dz
191 if {[dval MOUSEbutton] == 3} return;
193 ttranslate $name 0 0 dz