Warnings on vc14 were eliminated
[occt.git] / src / QADNaming / QADNaming_Selection.tcl
CommitLineData
973c2be1 1# Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2#
973c2be1 3# This file is part of Open CASCADE Technology software library.
b311480e 4#
d5f74e42 5# This library is free software; you can redistribute it and/or modify it under
6# the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7# by the Free Software Foundation, with special exception defined in the file
8# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9# distribution for complete text of the license and disclaimer of any warranty.
b311480e 10#
973c2be1 11# Alternatively, this file may be used under the terms of Open CASCADE
12# commercial license or contractual agreement.
b311480e 13
7fd59977 14proc SelectLoop { DF shape T} {
15
16#
17# loop to select all the sub-shapes of type <T> in the context <shape>
18#
19
20 global $DF
21 global $shape
22 display $shape
23 fit
24 clear
25 set L [Label $DF 0:1000]
26 isos $shape 0
27
28 set ter _*
29 global $ter
30
31 foreach S [directory [concat $shape$ter]] {
32 global $S
33 unset $S
34 }
35
36 uplevel #0 explode $shape $T
37
38 foreach S [directory [concat $shape$ter]] {
39 clear
40 puts $S
41 global $S
42 display $shape
43 display $S
44 #wclick
45 #SelectShape $DF $L $S $shape
46 SelectGeometry $DF $L $S $shape
47 DumpSelection $DF $L 1
48 wclick
49 SolveSelection $DF $L
50
51 pick ID x y z b
52 if {[dval b] == 3} {
53 foreach OS [directory [concat $shape$ter]] {
54 global $OS
55 unqset $OS
56 }
57 return
58 }
59 }
60}
61
62
63
64
65