1 # Copyright (c) 1999-2014 OPEN CASCADE SAS
3 # This file is part of Open CASCADE Technology software library.
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
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.
11 # Alternatively, this file may be used under the terms of Open CASCADE
12 # commercial license or contractual agreement.
16 set name [lastrep id x y b]
19 cfindp $name id x y pole
20 if {[dval pole] == 0} return
21 dset x0 x1 y0 y1 z0 z1 b 0
23 while {[dval b] == 0} {
24 pick id x2 y2 z2 b nowait
25 dset dx x2-x1 dy y2-y1 dz z2-z1 x1 x2 y1 y2 z1 z2
27 cmovep $name pole dx dy dz
31 if {[dval b] == 1} return;
32 dset dx x0-x2 dy y0-y2 dz z0-z2
33 cmovep $name pole dx dy dz
38 set name [lastrep id x y b]
41 sfindp $name id x y upole vpole
42 if {[dval upole] == 0} return
43 dset x0 x1 y0 y1 z0 z1 b 0
45 while { [dval b] == 0} {
46 pick id x2 y2 z2 b nowait
47 dset dx x2-x1 dy y2-y1 dz z2-z1 x1 x2 y1 y2 z1 z2
49 movep $name upole vpole dx dy dz
53 if {[dval b] == 1} return
54 dset dx x0-x2 dy y0-y2 dz z0-z2
55 movep $name upole vpole dx dy dz
58 #################################################
60 #################################################
62 help smooth {smooth cname tol [filename] } "DRAW Variables management"
64 proc smooth {name tol {file ""}} {
66 uplevel #0 "bsmooth $name $tol"
69 uplevel #0 "bsmooth $name $tol $Draw_DataDir/$file"
74 #################################################
76 #################################################
78 help beziersmooth { beziersmooth cname tol deg [-GR -VA -PR] [filename] } "DRAW Variables management"
80 proc beziersmooth {name tol deg option {file ""}} {
82 uplevel #0 "bzsmooth $name $tol $deg $option"
85 uplevel #0 "bzsmooth $name $tol $deg $option $Draw_DataDir/$file"
90 help pickf {name : extract picked with mouse face as a new variable\
91 } {DRAW Variables management}
95 eval renamevar "[pickface]" $name