0024023: Revamp the OCCT Handle -- downcast (automatic)
[occt.git] / src / GeomFill / GeomFill_NSections.cdl
CommitLineData
b311480e 1-- Created on: 1998-12-14
2-- Created by: Joelle CHAUVET
3-- Copyright (c) 1998-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
17class NSections from GeomFill inherits SectionLaw from GeomFill
18
19 ---Purpose: Define a Section Law by N Sections
20
21uses
22 Curve from Geom,
23 SequenceOfCurve from TColGeom,
24 BSplineSurface from Geom,
25 BSplineCurve from Geom,
26 Function from Law,
27 Shape from GeomAbs,
28 Pnt from gp,
29 Array1OfPnt from TColgp,
30 Array1OfVec from TColgp,
31 Array1OfInteger from TColStd,
32 Array1OfReal from TColStd,
98dbbeb4
J
33 SequenceOfReal from TColStd,
34 SequenceOfTrsf from GeomFill
7fd59977 35
36raises
37 OutOfRange
38
39is
40 Create(NC : SequenceOfCurve from TColGeom)
41 ---Purpose: Make a SectionLaw with N Curves.
42
43 returns NSections from GeomFill;
44
45 Create(NC : SequenceOfCurve from TColGeom;
46 NP : SequenceOfReal from TColStd)
47 ---Purpose: Make a SectionLaw with N Curves and N associated parameters.
48
49 returns NSections from GeomFill;
50
51 Create(NC : SequenceOfCurve from TColGeom;
52 NP : SequenceOfReal from TColStd;
53 UF, UL : Real from Standard)
54 ---Purpose: Make a SectionLaw with N Curves and N associated parameters.
55 -- UF and UL are the parametric bounds of the NSections
56
57 returns NSections from GeomFill;
58
59 Create(NC : SequenceOfCurve from TColGeom;
60 NP : SequenceOfReal from TColStd;
61 UF, UL, VF, VL : Real from Standard)
62 ---Purpose: Make a SectionLaw with N Curves and N associated parameters.
63 -- UF and UL are the parametric bounds of the NSections
64 -- VF and VL are the parametric bounds of the path
65
66 returns NSections from GeomFill;
67
98dbbeb4
J
68 Create(NC : SequenceOfCurve from TColGeom;
69 Trsfs : SequenceOfTrsf from GeomFill;
70 NP : SequenceOfReal from TColStd;
7fd59977 71 UF, UL, VF, VL : Real from Standard;
72 Surf : BSplineSurface from Geom)
73 ---Purpose: Make a SectionLaw with N Curves and N associated parameters.
74 -- UF and UL are the parametric bounds of the NSections
75 -- VF and VL are the parametric bounds of the path
76 -- UF and UL are the parametric bounds of the NSections
77 -- Surf is a reference surface used by BRepFill_NSections
78
79 returns NSections from GeomFill;
80
81--
82--========== To compute Sections and derivatives Sections
83--
84
85 D0(me : mutable;
86 Param: Real;
87 Poles : out Array1OfPnt from TColgp;
88 Weigths : out Array1OfReal from TColStd)
89 ---Purpose: compute the section for v = param
90 returns Boolean is redefined;
91
92 D1(me : mutable;
93 Param: Real;
94 Poles : out Array1OfPnt from TColgp;
95 DPoles : out Array1OfVec from TColgp;
96 Weigths : out Array1OfReal from TColStd;
97 DWeigths : out Array1OfReal from TColStd)
98 ---Purpose: compute the first derivative in v direction of the
99 -- section for v = param
100 -- Warning : It used only for C1 or C2 aproximation
101 returns Boolean
102 is redefined;
103
104 D2(me : mutable;
105 Param: Real;
106 Poles : out Array1OfPnt from TColgp;
107 DPoles : out Array1OfVec from TColgp;
108 D2Poles : out Array1OfVec from TColgp;
109 Weigths : out Array1OfReal from TColStd;
110 DWeigths : out Array1OfReal from TColStd;
111 D2Weigths : out Array1OfReal from TColStd)
112 ---Purpose: compute the second derivative in v direction of the
113 -- section for v = param
114 -- Warning : It used only for C2 aproximation
115 returns Boolean
116 is redefined;
117
118
119
120 SetSurface(me: mutable; RefSurf: BSplineSurface from Geom)
121 ---Purpose: Sets the reference surface
122 --
123 ;
124
125
126 ComputeSurface(me: mutable)
127 ---Purpose: Computes the surface
128 --
129 ;
130
131
132 BSplineSurface(me)
133 ---Purpose: give if possible an bspline Surface, like iso-v are the
134 -- section. If it is not possible this methode have to
135 -- get an Null Surface. Is it the default implementation.
136 returns BSplineSurface from Geom
137 is redefined;
138
139 SectionShape(me; NbPoles : out Integer from Standard;
140 NbKnots : out Integer from Standard;
141 Degree : out Integer from Standard)
142 ---Purpose: get the format of an section
143 is redefined;
144
145 Knots(me; TKnots: out Array1OfReal from TColStd)
146 ---Purpose: get the Knots of the section
147 is redefined;
148
149 Mults(me; TMults: out Array1OfInteger from TColStd)
150 ---Purpose: get the Multplicities of the section
151 is redefined;
152
153 IsRational(me)
154 ---Purpose: Returns if the sections are rationnal or not
155 returns Boolean is redefined;
156
157 IsUPeriodic(me)
158 ---Purpose: Returns if the sections are periodic or not
159 returns Boolean is redefined;
160
161 IsVPeriodic(me)
162 ---Purpose: Returns if the law isperiodic or not
163 returns Boolean is redefined;
164--
165-- =================== Management of continuity ===================
166--
167 NbIntervals(me; S : Shape from GeomAbs)
168 ---Purpose: Returns the number of intervals for continuity
169 -- <S>.
170 -- May be one if Continuity(me) >= <S>
171 returns Integer is redefined;
172
173 Intervals(me; T : in out Array1OfReal from TColStd;
174 S : Shape from GeomAbs)
175 ---Purpose: Stores in <T> the parameters bounding the intervals
176 -- of continuity <S>.
177 --
178 -- The array must provide enough room to accomodate
179 -- for the parameters. i.e. T.Length() > NbIntervals()
180 raises
181 OutOfRange from Standard
182 is redefined;
183
184
185 SetInterval(me: mutable; First, Last: Real from Standard)
186 ---Purpose: Sets the bounds of the parametric interval on
187 -- the function
188 -- This determines the derivatives in these values if the
189 -- function is not Cn.
190 is redefined;
191
192 GetInterval(me; First, Last: out Real from Standard)
193 ---Purpose: Gets the bounds of the parametric interval on
194 -- the function
195 is redefined;
196
197 GetDomain(me; First, Last: out Real from Standard)
198 ---Purpose: Gets the bounds of the function parametric domain.
199 -- Warning: This domain it is not modified by the
200 -- SetValue method
201 is redefined;
202
203-- ===================== To help computation of Tolerance ======
204-- Evaluation of error, in 2d space, or on rational function, is
205-- difficult. The following methods can help the approximation to
206-- make good evaluation and use good tolerances.
207--
208-- It is not necessary for the following informations to be very
209-- precise. A fast evaluation is sufficient.
210
211 GetTolerance(me;
212 BoundTol, SurfTol, AngleTol : Real;
213 Tol3d : out Array1OfReal)
214 ---Purpose: Returns the tolerances associated at each poles to
215 -- reach in approximation, to satisfy: BoundTol error
216 -- at the Boundary AngleTol tangent error at the
217 -- Boundary (in radian) SurfTol error inside the
218 -- surface.
219 is redefined;
220
221 BarycentreOfSurf(me)
222 ---Purpose: Get the barycentre of Surface.
223 -- An very poor estimation is sufficent.
224 -- This information is usefull to perform well
225 -- conditioned rational approximation.
226 -- Warning: Used only if <me> IsRational
227 returns Pnt from gp
228 is redefined;
229
230
231 MaximalSection(me) returns Real
232 ---Purpose: Returns the length of the greater section. This
233 -- information is usefull to G1's control.
234 -- Warning: With an little value, approximation can be slower.
235 is redefined;
236
237 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
238 ---Purpose: Compute the minimal value of weight for each poles
239 -- in all sections.
240 -- This information is usefull to control error
241 -- in rational approximation.
242 -- Warning: Used only if <me> IsRational
243 is redefined;
244
245
246--- Particular case
247
248
249 IsConstant(me; Error : out Real)
250 ---Purpose: return True If the Law isConstant
251 returns Boolean
252 is redefined;
253
254 ConstantSection(me)
255 ---Purpose: Return the constant Section if <me> IsConstant.
256 --
257 returns Curve from Geom
258 is redefined;
259
260 IsConicalLaw(me; Error : out Real)
261 ---Purpose: Returns True if all section are circle, with same
262 -- plane,same center and linear radius evolution
263 -- Return False by Default.
264 returns Boolean
265 is redefined;
266
267 CirclSection(me; Param : Real)
268 ---Purpose: Return the circle section at parameter <Param>, if
269 -- <me> a IsConicalLaw
270 returns Curve from Geom
271 raises OutOfRange from Standard -- If <me> is not a Conical Law
272 is redefined;
273
274fields
275 UFirst, ULast, VFirst, VLast : Real;
276 mySections : SequenceOfCurve from TColGeom;
98dbbeb4
J
277 myTrsfs : SequenceOfTrsf from GeomFill;
278 myParams : SequenceOfReal from TColStd;
7fd59977 279 mySurface : BSplineSurface from Geom;
280 myRefSurf : BSplineSurface from Geom;
281end NSections;
282
283
284
285
286