0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / ShapeCustom / ShapeCustom_BSplineRestriction.cdl
1 -- Created on: 1999-06-18
2 -- Created by: Galina Koulikova
3 -- Copyright (c) 1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 private class BSplineRestriction from ShapeCustom inherits Modification from BRepTools
18
19         ---Purpose: this tool intended for aproximation surfaces, curves and pcurves with 
20         -- specified degree , max number of segments, tolerance 2d, tolerance 3d. Specified 
21         -- continuity can be reduced if approximation with specified continuity was not done. 
22
23 uses
24     Surface  from Geom, 
25     Curve    from Geom, 
26     Curve    from Geom2d, 
27     Shape    from TopoDS, 
28     Face     from TopoDS, 
29     Edge     from TopoDS, 
30     Vertex   from TopoDS, 
31     Location from TopLoc,
32     Shape    from GeomAbs,
33     Pnt      from gp,
34     RestrictionParameters from ShapeCustom
35     
36 is
37     Create  returns BSplineRestriction from ShapeCustom;  
38         ---Purpose: Empty constructor.
39     
40     
41     Create(anApproxSurfaceFlag, 
42            anApproxCurve3dFlag, 
43            anApproxCurve2dFlag         : Boolean;
44            aTol3d, aTol2d              : Real; 
45            aContinuity3d, aContinuity2d: Shape from GeomAbs ;  
46            aMaxDegree, aNbMaxSeg       : Integer; 
47            Degree, Rational            : Boolean)
48     returns BSplineRestriction from ShapeCustom;
49         ---Purpose: Initializes with specified parameters of aproximation.
50     
51     Create(anApproxSurfaceFlag, anApproxCurve3dFlag, anApproxCurve2dFlag: Boolean from Standard;
52            aTol3d, aTol2d                                               : Real; 
53            aContinuity3d, aContinuity2d                                 : Shape from GeomAbs ;  
54            aMaxDegree, aNbMaxSeg                                        : Integer; 
55            Degree, Rational                                             : Boolean;
56            aModes                                       : RestrictionParameters from ShapeCustom)
57     returns BSplineRestriction from ShapeCustom;  
58         ---Purpose: Initializes with specified parameters of aproximation.
59     
60     NewSurface(me: mutable; F       :     Face     from TopoDS;
61                             S       : out Surface  from Geom;
62                             L       : out Location from TopLoc;
63                             Tol     : out Real     from Standard;
64                             RevWires : out Boolean from Standard;
65                             RevFace  : out Boolean from Standard)
66         
67         ---Purpose: Returns Standard_True if  the  face <F> has   been
68         --          modified.  In this  case, <S> is the new geometric
69         --          support of  the  face, <L> the new  location,<Tol>
70         --          the new   tolerance.<RevWires>  has to be   set to
71         --          Standard_True when  the modification reverses  the
72         --          normal of  the   surface.(the wires  have   to  be
73         --          reversed).  <RevFace>    has   to   be   set    to
74         --          Standard_True if  the  orientation of the modified
75         --          face changes in the shells which contain it.
76         --          
77         --          Otherwise, returns Standard_False, and <S>,   <L>,
78         --          <Tol> , <RevWires> ,<RevFace> are not  significant.
79
80     
81         returns Boolean from Standard;
82         
83
84     NewCurve(me: mutable; E  :     Edge     from TopoDS;
85                           C  : out Curve    from Geom;
86                           L  : out Location from TopLoc;
87                           Tol: out Real     from Standard)
88     
89         returns Boolean from Standard;
90
91         ---Purpose: Returns Standard_True  if  curve from the edge <E> has  been
92         --          modified.  In this case,  <C> is the new geometric
93         --          support of the  edge, <L> the  new location, <Tol>
94         --          the         new    tolerance.
95         --          Otherwise, returns Standard_True if Surface is modified or 
96         --          one of pcurves of edge is modified. In this case C is copy of
97         --          geometric support of the edge.
98         --          In other cases returns Standard_False, and  <C>,  <L>,  <Tol> are not
99         --          significant.
100         
101     NewCurve2d(me: mutable;  E    :     Edge     from TopoDS;
102                              F    :     Face     from TopoDS;
103                              NewE :     Edge     from TopoDS;
104                              NewF :     Face     from TopoDS;
105                              C    : out Curve    from Geom2d;
106                              Tol  : out Real     from Standard)
107     
108         returns Boolean from Standard;
109         
110         ---Purpose: Returns Standard_True if  the edge  <E> has been modified.
111         --          In this case,if curve on the surface is modified, <C>
112         --          is the new geometric support of  the edge, <L> the
113         --          new location, <Tol> the new tolerance. If curve on the surface 
114         --          is not modified C is copy curve on surface from the edge <E>.
115         --          
116         --          Otherwise, returns  Standard_False, and <C>,  <L>,
117         --          <Tol> are not significant.
118         --          
119         --          <NewE> is the new  edge created from  <E>.  <NewF>
120         --          is the new face created from <F>. They may be usefull.
121         
122
123     ConvertSurface(me: mutable; aSurface : Surface from Geom; S : out Surface  from Geom; 
124         UF,UL,VF,VL : Real from Standard;
125         IsOf : Boolean from Standard = Standard_True) 
126         returns Boolean from Standard;
127     ---Purpose: Returns Standard_True if  the surface has been modified.
128     --          if flag IsOf equals Standard_True Offset surfaces are aproximated to Offset 
129     --          if Standard_False to BSpline
130     
131     ConvertCurve(me: mutable;aCurve : in out Curve from Geom; C : out Curve from Geom; IsConvert : Boolean;
132        First, Last : Real; TolCur : in out Real;IsOf : Boolean from Standard = Standard_True) 
133         returns Boolean from Standard;
134     ---Purpose: Returns Standard_True if  the curve has been modified.
135     --          if flag IsOf equals Standard_True Offset curves are aproximated to Offset 
136     --          if Standard_False to BSpline
137     
138     ConvertCurve2d(me: mutable;aCurve : in out Curve from Geom2d; C : out Curve from Geom2d; IsConvert : Boolean;
139        First, Last : Real; TolCur : in out Real;IsOf : Boolean from Standard = Standard_True)  
140         returns Boolean from Standard;
141     ---Purpose: Returns Standard_True if the pcurve has been modified.
142     --          if flag IsOf equals Standard_True Offset pcurves are aproximated to Offset 
143     --          if Standard_False to BSpline
144     
145     -- Methods for setting and obtaining fields
146     
147     SetTol3d(me: mutable; Tol3d : Real from Standard);
148         ---C++: inline
149         ---Purpose: Sets tolerance of aproximation for curve3d and surface
150     
151     SetTol2d(me: mutable; Tol2d : Real from Standard);
152         ---C++: inline
153         ---Purpose: Sets tolerance of aproximation for curve2d 
154     
155     ModifyApproxSurfaceFlag(me : mutable) returns Boolean;
156         ---C++: inline
157         ---C++: return &
158         ---Purpose: Returns (modifiable) the flag which defines whether the
159         --          surface is aproximated.
160         
161     ModifyApproxCurve3dFlag(me : mutable) returns Boolean;
162         ---C++: inline
163         ---C++: return &
164         ---Purpose: Returns (modifiable) the flag which defines whether the
165         --          curve3d is aproximated.
166         
167     ModifyApproxCurve2dFlag(me : mutable) returns Boolean;
168         ---C++: inline
169         ---C++: return &
170         ---Purpose: Returns (modifiable) the flag which defines whether the curve2d is aproximated.
171     
172     SetContinuity3d(me : mutable; Continuity3d : Shape from GeomAbs);
173         ---C++: inline
174         ---Purpose: Sets continuity3d for aproximation curve3d and surface.
175     
176     SetContinuity2d(me : mutable; Continuity2d : Shape from GeomAbs);
177         ---C++: inline
178         ---Purpose: Sets continuity3d for aproximation curve2d.
179     
180     SetMaxDegree(me : mutable; MaxDegree : Integer from Standard);
181         ---C++: inline
182         ---Purpose: Sets max degree for aproximation.
183     
184     SetMaxNbSegments(me : mutable; MaxNbSegments : Integer from Standard);
185         ---C++: inline
186         ---Purpose: Sets max number of segments for aproximation.
187     
188     SetPriority(me : mutable; Degree : Boolean from Standard);
189         ---C++: inline
190         ---Purpose: Sets priority  for aproximation curves and surface.
191         --          If Degree is True approximation is made with degree less 
192         --          then specified MaxDegree at the expense of number of spanes.
193         --          If Degree is False approximation is made with number of 
194         --          spans less then specified MaxNbSegment at the expense of 
195         --          specified MaxDegree.
196     
197     SetConvRational(me : mutable; Rational : Boolean from Standard);
198         ---C++: inline
199         ---Purpose: Sets flag for define if rational BSpline or Bezier is 
200         --          converted to polynomial. If Rational is True approximation 
201         --          for rational BSpline and Bezier is made to polynomial even
202         --          if degree is less then MaxDegree and number of spans is less
203         --          then specified MaxNbSegment.
204     
205     GetRestrictionParameters(me) 
206     returns RestrictionParameters from ShapeCustom;
207         ---C++: inline
208         ---Purpose: Returns the container of modes which defines 
209         --          what geometry should be converted to BSplines.
210         
211     SetRestrictionParameters(me: mutable; 
212                              aModes: RestrictionParameters from ShapeCustom);
213         ---C++: inline
214         ---Purpose: Sets the container of modes which defines 
215         --          what geometry should be converted to BSplines.
216     
217     Curve3dError(me) returns Real;
218     ---C++: inline
219     ---Purpose:Returns error for aproximation curve3d.
220     
221     Curve2dError(me) returns Real;
222     ---C++: inline
223     ---Purpose:Returns error for aproximation curve2d.
224     
225     SurfaceError(me) returns Real;
226     ---C++: inline
227     ---Purpose:Returns error for aproximation surface.
228
229     NewPoint(me: mutable; V  :     Vertex   from TopoDS;
230                           P  : out Pnt      from gp;
231                           Tol: out Real     from Standard)
232     
233         returns Boolean from Standard;
234
235     NewParameter(me: mutable; V  :     Vertex   from TopoDS;
236                               E  :     Edge     from TopoDS;
237                               P  : out Real     from Standard;
238                               Tol: out Real     from Standard)
239     
240         returns Boolean from Standard;
241         
242
243     
244
245     Continuity(me: mutable; E          : Edge from TopoDS;
246                             F1,F2      : Face from TopoDS;
247                             NewE       : Edge from TopoDS;
248                             NewF1,NewF2: Face from TopoDS)
249     
250         returns Shape from GeomAbs;
251
252     MaxErrors (me; aCurve3dErr, aCurve2dErr : out Real) returns Real from Standard;
253     ---Purpose:Returns error for aproximation surface, curve3d and curve2d.
254     
255     NbOfSpan (me) returns Integer from Standard;
256     ---Purpose:Returns number for aproximation surface, curve3d and curve2d.
257     
258
259 fields 
260     myContinuity3d,
261     myContinuity2d   : Shape   from GeomAbs;
262     myMaxDegree,
263     myNbMaxSeg       : Integer from Standard;
264     myTol3d,
265     myTol2d,
266     mySurfaceError,
267     myCurve3dError,
268     myCurve2dError   : Real    from Standard;
269     myNbOfSpan       : Integer from Standard;
270     myApproxSurfaceFlag,
271     myApproxCurve3dFlag,
272     myApproxCurve2dFlag : Boolean from Standard;
273     myDeg            : Boolean from Standard;
274     myConvert        : Boolean from Standard;    
275     myRational       : Boolean from Standard;
276         
277     myParameters     : RestrictionParameters from ShapeCustom;
278     
279     
280 end BSplineRestriction;