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 b]
23 cfindp $name id x y pole
24 if {[dval pole] == 0} return
25 dset x0 x1 y0 y1 z0 z1 b 0
27 while {[dval b] == 0} {
28 pick id x2 y2 z2 b nowait
29 dset dx x2-x1 dy y2-y1 dz z2-z1 x1 x2 y1 y2 z1 z2
31 cmovep $name pole dx dy dz
35 if {[dval b] == 1} return;
36 dset dx x0-x2 dy y0-y2 dz z0-z2
37 cmovep $name pole dx dy dz
42 set name [lastrep id x y b]
45 sfindp $name id x y upole vpole
46 if {[dval upole] == 0} return
47 dset x0 x1 y0 y1 z0 z1 b 0
49 while { [dval b] == 0} {
50 pick id x2 y2 z2 b nowait
51 dset dx x2-x1 dy y2-y1 dz z2-z1 x1 x2 y1 y2 z1 z2
53 movep $name upole vpole dx dy dz
57 if {[dval b] == 1} return
58 dset dx x0-x2 dy y0-y2 dz z0-z2
59 movep $name upole vpole dx dy dz
62 #################################################
64 #################################################
65 proc smooth {name tol {file ""}} {
67 uplevel #0 "bsmooth $name $tol"
70 uplevel #0 "bsmooth $name $tol $Draw_DataDir/$file"
75 help smooth {smooth cname tol [filename] } "DRAW Variables management"
77 #################################################
79 #################################################
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 beziersmooth { beziersmooth cname tol deg [-GR -VA -PR] [filename] } "DRAW Variables management"