0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / Approx / Approx_SweepFunction.cdl
CommitLineData
b311480e 1-- Created on: 1997-06-25
2-- Created by: Philippe MANGIN
3-- Copyright (c) 1997-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17deferred class SweepFunction from Approx inherits TShared from MMgt
18
19 ---Purpose: defined the function used by SweepApproximation to
20 -- perform sweeping application.
21
22
23uses
24 Shape from GeomAbs,
25 Pnt from gp,
26 Array1OfPnt from TColgp,
27 Array1OfPnt2d from TColgp,
28 Array1OfVec from TColgp,
29 Array1OfVec2d from TColgp,
30 Array1OfInteger from TColStd,
31 Array1OfReal from TColStd
32
33raises NotImplemented ,
34 OutOfRange from Standard
35
36is
37
38--
39--========== To compute Sections and derivatives Sections
40--
41 D0(me : mutable;
42 Param: Real;
43 First, Last : Real;
44 Poles : out Array1OfPnt from TColgp;
45 Poles2d : out Array1OfPnt2d from TColgp;
46 Weigths : out Array1OfReal from TColStd)
47 ---Purpose: compute the section for v = param
48 returns Boolean is deferred;
49
50 D1(me : mutable;
51 Param: Real;
52 First, Last : Real;
53 Poles : out Array1OfPnt from TColgp;
54 DPoles : out Array1OfVec from TColgp;
55 Poles2d : out Array1OfPnt2d from TColgp;
56 DPoles2d : out Array1OfVec2d from TColgp;
57 Weigths : out Array1OfReal from TColStd;
58 DWeigths : out Array1OfReal from TColStd)
59 ---Purpose: compute the first derivative in v direction of the
60 -- section for v = param
61 -- Warning : It used only for C1 or C2 aproximation
62 returns Boolean
63 raises NotImplemented
64 is virtual;
65
66 D2(me : mutable;
67 Param: Real;
68 First, Last : Real;
69 Poles : out Array1OfPnt from TColgp;
70 DPoles : out Array1OfVec from TColgp;
71 D2Poles : out Array1OfVec from TColgp;
72 Poles2d : out Array1OfPnt2d from TColgp;
73 DPoles2d : out Array1OfVec2d from TColgp;
74 D2Poles2d : out Array1OfVec2d from TColgp;
75 Weigths : out Array1OfReal from TColStd;
76 DWeigths : out Array1OfReal from TColStd;
77 D2Weigths : out Array1OfReal from TColStd)
78 ---Purpose: compute the second derivative in v direction of the
79 -- section for v = param
80 -- Warning : It used only for C2 aproximation
81 returns Boolean
82 raises NotImplemented
83 is virtual;
84
85--
86-- =================== General Information On The Function ===================
87--
88 Nb2dCurves(me)
89 ---Purpose: get the number of 2d curves to approximate.
90 returns Integer is deferred;
91
92 SectionShape(me; NbPoles : out Integer from Standard;
93 NbKnots : out Integer from Standard;
94 Degree : out Integer from Standard)
95 ---Purpose: get the format of an section
96 is deferred;
97
98 Knots(me; TKnots: out Array1OfReal from TColStd)
99 ---Purpose: get the Knots of the section
100 is deferred;
101
102 Mults(me; TMults: out Array1OfInteger from TColStd)
103 ---Purpose: get the Multplicities of the section
104 is deferred;
105
106 IsRational(me)
107 ---Purpose: Returns if the sections are rationnal or not
108 returns Boolean is deferred;
109
110
111--
112-- =================== Management of continuity ===================
113--
114 NbIntervals(me; S : Shape from GeomAbs)
115 ---Purpose: Returns the number of intervals for continuity
116 -- <S>.
117 -- May be one if Continuity(me) >= <S>
118 returns Integer is deferred;
119
120 Intervals(me; T : in out Array1OfReal from TColStd;
121 S : Shape from GeomAbs)
122 ---Purpose: Stores in <T> the parameters bounding the intervals
123 -- of continuity <S>.
124 --
125 -- The array must provide enough room to accomodate
126 -- for the parameters. i.e. T.Length() > NbIntervals()
127 raises
128 OutOfRange from Standard
129 is deferred;
130
131
132 SetInterval(me: mutable; First, Last: Real from Standard)
133 ---Purpose: Sets the bounds of the parametric interval on
134 -- the fonction
135 -- This determines the derivatives in these values if the
136 -- function is not Cn.
137 is deferred;
138
139
140-- ===================== To help computation of Tolerance ======
141-- Evaluation of error, in 2d space, or on rational function, is
142-- difficult. The following methods can help the approximation to
143-- make good evaluation and use good tolerances.
144--
145-- It is not necessary for the following informations to be very
146-- precise. A fast evaluation is sufficient.
147
148 Resolution(me;
149 Index : Integer from Standard;
150 Tol : Real from Standard;
151 TolU, TolV : out Real from Standard)
152 ---Purpose: Returns the resolutions in the sub-space 2d <Index>
153 -- This information is usfull to find an good tolerance in
154 -- 2d approximation.
155 ---Warning: Used only if Nb2dCurve > 0
156 raises NotImplemented
157 is virtual;
158
159
160 GetTolerance(me;
161 BoundTol, SurfTol, AngleTol : Real;
162 Tol3d : out Array1OfReal)
163 ---Purpose: Returns the tolerance to reach in approximation
164 -- to satisfy.
165 -- BoundTol error at the Boundary
166 -- AngleTol tangent error at the Boundary (in radian)
167 -- SurfTol error inside the surface.
168 is deferred;
169
170
171 SetTolerance(me : mutable; Tol3d, Tol2d : Real)
172 ---Purpose: Is usefull, if (me) have to run numerical
173 -- algorithm to perform D0, D1 or D2
174 is deferred;
175
176 BarycentreOfSurf(me)
177 ---Purpose: Get the barycentre of Surface.
178 -- An very poor estimation is sufficent.
179 -- This information is usefull to perform well
180 -- conditioned rational approximation.
181 -- Warning: Used only if <me> IsRational
182 returns Pnt from gp
183 raises NotImplemented
184 is virtual;
185
186
187 MaximalSection(me) returns Real
188 ---Purpose: Returns the length of the greater section. This
189 -- information is usefull to G1's control.
190 -- Warning: With an little value, approximation can be slower.
191 raises NotImplemented
192 is virtual;
193
194 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
195 ---Purpose: Compute the minimal value of weight for each poles
196 -- in all sections.
197 -- This information is usefull to control error
198 -- in rational approximation.
199 -- Warning: Used only if <me> IsRational
200 raises NotImplemented
201 is virtual;
202
203end SweepFunction;