7fd59977 |
1 | proc SelectLoop { DF shape T} { |
2 | |
3 | # |
4 | # loop to select all the sub-shapes of type <T> in the context <shape> |
5 | # |
6 | |
7 | global $DF |
8 | global $shape |
9 | display $shape |
10 | fit |
11 | clear |
12 | set L [Label $DF 0:1000] |
13 | isos $shape 0 |
14 | |
15 | set ter _* |
16 | global $ter |
17 | |
18 | foreach S [directory [concat $shape$ter]] { |
19 | global $S |
20 | unset $S |
21 | } |
22 | |
23 | uplevel #0 explode $shape $T |
24 | |
25 | foreach S [directory [concat $shape$ter]] { |
26 | clear |
27 | puts $S |
28 | global $S |
29 | display $shape |
30 | display $S |
31 | #wclick |
32 | #SelectShape $DF $L $S $shape |
33 | SelectGeometry $DF $L $S $shape |
34 | DumpSelection $DF $L 1 |
35 | wclick |
36 | SolveSelection $DF $L |
37 | |
38 | pick ID x y z b |
39 | if {[dval b] == 3} { |
40 | foreach OS [directory [concat $shape$ter]] { |
41 | global $OS |
42 | unqset $OS |
43 | } |
44 | return |
45 | } |
46 | } |
47 | } |
48 | |
49 | |
50 | |
51 | |
52 | |