0024023: Revamp the OCCT Handle -- downcast (automatic)
[occt.git] / src / GeomFill / GeomFill_SectionLaw.cdl
CommitLineData
b311480e 1-- Created on: 1997-11-20
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 SectionLaw from GeomFill inherits TShared from MMgt
18
19 ---Purpose: To define section law in sweeping
20
21uses
22 BSplineSurface from Geom,
23 Curve from Geom,
24 HCurve from Adaptor3d,
25 Shape from GeomAbs,
26 Pnt from gp,
27 Array1OfPnt from TColgp,
28 Array1OfVec from TColgp,
29 Array1OfInteger from TColStd,
30 Array1OfReal from TColStd
31
32raises NotImplemented ,
33 DomainError,
34 OutOfRange from Standard
35is
36--
37--========== To compute Sections and derivatives Sections
38--
39
40 D0(me : mutable;
41 Param: Real;
42 Poles : out Array1OfPnt from TColgp;
43 Weigths : out Array1OfReal from TColStd)
44 ---Purpose: compute the section for v = param
45 returns Boolean is deferred;
46
47 D1(me : mutable;
48 Param: Real;
49 Poles : out Array1OfPnt from TColgp;
50 DPoles : out Array1OfVec from TColgp;
51 Weigths : out Array1OfReal from TColStd;
52 DWeigths : out Array1OfReal from TColStd)
53 ---Purpose: compute the first derivative in v direction of the
54 -- section for v = param
55 -- Warning : It used only for C1 or C2 aproximation
56 returns Boolean
57 raises NotImplemented
58 is virtual;
59
60 D2(me : mutable;
61 Param: Real;
62 Poles : out Array1OfPnt from TColgp;
63 DPoles : out Array1OfVec from TColgp;
64 D2Poles : out Array1OfVec from TColgp;
65 Weigths : out Array1OfReal from TColStd;
66 DWeigths : out Array1OfReal from TColStd;
67 D2Weigths : out Array1OfReal from TColStd)
68 ---Purpose: compute the second derivative in v direction of the
69 -- section for v = param
70 -- Warning : It used only for C2 aproximation
71 returns Boolean
72 raises NotImplemented
73 is virtual;
74
75 BSplineSurface(me)
76 ---Purpose: give if possible an bspline Surface, like iso-v are the
77 -- section. If it is not possible this methode have to
78 -- get an Null Surface. It is the default implementation.
79 returns BSplineSurface from Geom
80 is virtual;
81
82 SectionShape(me; NbPoles : out Integer from Standard;
83 NbKnots : out Integer from Standard;
84 Degree : out Integer from Standard)
85 ---Purpose: get the format of an section
86 is deferred;
87
88 Knots(me; TKnots: out Array1OfReal from TColStd)
89 ---Purpose: get the Knots of the section
90 is deferred;
91
92 Mults(me; TMults: out Array1OfInteger from TColStd)
93 ---Purpose: get the Multplicities of the section
94 is deferred;
95
96 IsRational(me)
97 ---Purpose: Returns if the sections are rationnal or not
98 returns Boolean is deferred;
99
100 IsUPeriodic(me)
101 ---Purpose: Returns if the sections are periodic or not
102 returns Boolean is deferred;
103
104 IsVPeriodic(me)
105 ---Purpose: Returns if law is periodic or not
106 returns Boolean is deferred;
107--
108-- =================== Management of continuity ===================
109--
110 NbIntervals(me; S : Shape from GeomAbs)
111 ---Purpose: Returns the number of intervals for continuity
112 -- <S>.
113 -- May be one if Continuity(me) >= <S>
114 returns Integer is deferred;
115
116 Intervals(me; T : in out Array1OfReal from TColStd;
117 S : Shape from GeomAbs)
118 ---Purpose: Stores in <T> the parameters bounding the intervals
119 -- of continuity <S>.
120 --
121 -- The array must provide enough room to accomodate
122 -- for the parameters. i.e. T.Length() > NbIntervals()
123 raises
124 OutOfRange from Standard
125 is deferred;
126
127
128 SetInterval(me: mutable; First, Last: Real from Standard)
129 ---Purpose: Sets the bounds of the parametric interval on
130 -- the function
131 -- This determines the derivatives in these values if the
132 -- function is not Cn.
133 is deferred;
134
135 GetInterval(me; First, Last: out Real from Standard)
136 ---Purpose: Gets the bounds of the parametric interval on
137 -- the function
138 is deferred;
139
140 GetDomain(me; First, Last: out Real from Standard)
141 ---Purpose: Gets the bounds of the function parametric domain.
142 -- Warning: This domain it is not modified by the
143 -- SetValue method
144 is deferred;
145
146-- ===================== To help computation of Tolerance ======
147-- Evaluation of error, in 2d space, or on rational function, is
148-- difficult. The following methods can help the approximation to
149-- make good evaluation and use good tolerances.
150--
151-- It is not necessary for the following informations to be very
152-- precise. A fast evaluation is sufficient.
153
154 GetTolerance(me;
155 BoundTol, SurfTol, AngleTol : Real;
156 Tol3d : out Array1OfReal)
157 ---Purpose: Returns the tolerances associated at each poles to
158 -- reach in approximation, to satisfy: BoundTol error
159 -- at the Boundary AngleTol tangent error at the
160 -- Boundary (in radian) SurfTol error inside the
161 -- surface.
162 is deferred;
163
164
165 SetTolerance(me : mutable; Tol3d, Tol2d : Real)
166 ---Purpose: Is usefull, if (me) have to run numerical
167 -- algorithm to perform D0, D1 or D2
168 -- The default implementation make nothing.
169
170 is virtual;
171
172 BarycentreOfSurf(me)
173 ---Purpose: Get the barycentre of Surface.
174 -- An very poor estimation is sufficent.
175 -- This information is usefull to perform well
176 -- conditioned rational approximation.
177 -- Warning: Used only if <me> IsRational
178 returns Pnt from gp
179 raises NotImplemented
180 is virtual;
181
182
183 MaximalSection(me) returns Real
184 ---Purpose: Returns the length of the greater section. This
185 -- information is usefull to G1's control.
186 -- Warning: With an little value, approximation can be slower.
187 is deferred;
188
189 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
190 ---Purpose: Compute the minimal value of weight for each poles
191 -- in all sections.
192 -- This information is usefull to control error
193 -- in rational approximation.
194 -- Warning: Used only if <me> IsRational
195 raises NotImplemented
196 is virtual;
197
198--- Particular case
199
200 IsConstant(me; Error : out Real)
201 ---Purpose: Say if all sections are equals
202 returns Boolean
203 is virtual;
204
205 ConstantSection(me)
206 ---Purpose: Return a copy of the constant Section, if me
207 -- IsConstant
208 --
209 returns Curve from Geom
210 raises DomainError -- If <me> is not Constante
211 is virtual;
212
213 IsConicalLaw(me; Error : out Real)
214 ---Purpose: Returns True if all section are circle, with same
215 -- plane,same center and linear radius evolution
216 -- Return False by Default.
217 returns Boolean
218 is virtual;
219
220 CirclSection(me; Param : Real)
221 ---Purpose: Return the circle section at parameter <Param>, if
222 -- <me> a IsConicalLaw
223 returns Curve from Geom
224 raises DomainError -- If <me> is not a Conical Law
225 is virtual;
226
227end SectionLaw;