1 -- Created on: 1997-02-06
2 -- Created by: Laurent BOURESCHE
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public 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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class SurfRstConstRad from BRepBlend
18 inherits SurfRstFunction from Blend
21 uses Vector from math,
29 Array1OfPnt from TColgp,
30 Array1OfVec from TColgp,
31 Array1OfPnt2d from TColgp,
32 Array1OfVec2d from TColgp,
33 Array1OfReal from TColStd,
34 Array1OfInteger from TColStd,
37 SectionShape from BlendFunc,
38 HSurface from Adaptor3d,
39 HCurve from Adaptor3d,
40 HCurve2d from Adaptor2d,
41 CurveOnSurface from Adaptor3d,
42 ParameterisationType from Convert
47 Create(Surf : HSurface from Adaptor3d;
48 SurfRst : HSurface from Adaptor3d;
49 Rst : HCurve2d from Adaptor2d;
50 CGuide : HCurve from Adaptor3d)
51 returns SurfRstConstRad from BRepBlend;
54 ---Purpose: Returns 3.
55 returns Integer from Standard;
58 ---Purpose: Returns 3.
59 returns Integer from Standard;
61 Value(me: in out; X: Vector; F: out Vector)
62 ---Purpose: computes the values <F> of the Functions for the
64 -- Returns True if the computation was done successfully,
66 returns Boolean from Standard;
68 Derivatives(me: in out; X: Vector; D: out Matrix)
69 ---Purpose: returns the values <D> of the derivatives for the
71 -- Returns True if the computation was done successfully,
73 returns Boolean from Standard;
75 Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
76 ---Purpose: returns the values <F> of the functions and the derivatives
77 -- <D> for the variable <X>.
78 -- Returns True if the computation was done successfully,
80 returns Boolean from Standard;
83 SurfRef : HSurface from Adaptor3d;
84 RstRef : HCurve2d from Adaptor2d);
86 Set(me: in out; Param: Real from Standard);
88 Set(me: in out; First, Last: Real from Standard);
89 ---Purpose: Sets the bounds of the parametric interval on
91 -- This determines the derivatives in these values if the
92 -- function is not Cn.
94 GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard);
96 GetBounds(me; InfBound,SupBound: out Vector from math);
98 IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
99 returns Boolean from Standard;
101 GetMinimalDistance(me)
102 ---Purpose: Returns the minimal Distance beetween two
103 -- extremitys of calculed sections.
104 returns Real from Standard
107 --- TheFollowing methods are called only when
108 -- IsSolution returns Standard_True.
111 ---C++: return const&
115 ---C++: return const&
119 ---Purpose: Returns U,V coordinates of the point on the surface.
120 ---C++: return const&
121 returns Pnt2d from gp;
124 ---Purpose: Returns U,V coordinates of the point on the curve on
126 ---C++: return const&
127 returns Pnt2d from gp;
130 ---Purpose: Returns parameter of the point on the curve.
131 returns Real from Standard;
134 returns Boolean from Standard;
137 ---C++: return const&
141 ---C++: return const&
142 returns Vec2d from gp;
145 ---C++: return const&
149 ---C++: return const&
150 returns Vec2d from gp;
153 Sol : Vector from math;
154 NS,TgS : out Vec from gp)
155 ---Purpose: Enables implementation of a criterion of decrochage
156 -- specific to the function.
157 -- Warning: Can be called without previous call of issolution
158 -- but the values calculated can be senseless.
159 returns Boolean from Standard
162 -- methodes hors template (en plus du create)
165 Radius : Real from Standard;
166 Choix : Integer from Standard)
169 Set(me: in out; TypeSection: SectionShape from BlendFunc)
170 ---Purpose: Sets the type of section generation for the
175 Param : Real from Standard;
176 U,V,W : Real from Standard;
177 Pdeb,Pfin : out Real from Standard;
178 C : out Circ from gp)
181 -- Methods for the approximation
183 IsRational(me) returns Boolean
184 ---Purpose: Returns if the section is rationnal
187 GetSectionSize(me) returns Real
188 ---Purpose: Returns the length of the maximum section
191 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
192 ---Purpose: Compute the minimal value of weight for each poles
196 NbIntervals(me; S : Shape from GeomAbs) returns Integer
197 ---Purpose: Returns the number of intervals for continuity
198 -- <S>. May be one if Continuity(me) >= <S>
201 Intervals(me; T : in out Array1OfReal from TColStd;
202 S : Shape from GeomAbs)
203 ---Purpose: Stores in <T> the parameters bounding the intervals
204 -- of continuity <S>.
205 -- The array must provide enough room to accomodate
206 -- for the parameters. i.e. T.Length() > NbIntervals()
209 GetShape(me : in out;
210 NbPoles : out Integer from Standard;
211 NbKnots : out Integer from Standard;
212 Degree : out Integer from Standard;
213 NbPoles2d : out Integer from Standard)
217 BoundTol, SurfTol, AngleTol : Real;
220 ---Purpose: Returns the tolerance to reach in approximation
222 -- BoundTol error at the Boundary
223 -- AngleTol tangent error at the Boundary
224 -- SurfTol error inside the surface.
227 Knots(me: in out; TKnots: out Array1OfReal from TColStd)
230 Mults(me: in out; TMults: out Array1OfInteger from TColStd)
233 Section(me : in out ;
234 P : Point from Blend;
235 Poles : out Array1OfPnt from TColgp;
236 DPoles : out Array1OfVec from TColgp;
237 Poles2d : out Array1OfPnt2d from TColgp;
238 DPoles2d : out Array1OfVec2d from TColgp;
239 Weigths : out Array1OfReal from TColStd;
240 DWeigths : out Array1OfReal from TColStd)
241 ---Purpose: Used for the first and last section
242 returns Boolean from Standard
245 Section(me: in out; P: Point from Blend;
246 Poles : out Array1OfPnt from TColgp;
247 DPoles : out Array1OfVec from TColgp;
248 D2Poles : out Array1OfVec from TColgp;
249 Poles2d : out Array1OfPnt2d from TColgp;
250 DPoles2d : out Array1OfVec2d from TColgp;
251 D2Poles2d : out Array1OfVec2d from TColgp;
252 Weigths : out Array1OfReal from TColStd;
253 DWeigths : out Array1OfReal from TColStd;
254 D2Weigths : out Array1OfReal from TColStd)
255 ---Purpose: Used for the first and last section
256 -- The method returns Standard_True if the derivatives
257 -- are computed, otherwise it returns Standard_False.
258 returns Boolean from Standard
261 Section(me : in out ;
262 P : Point from Blend;
263 Poles : out Array1OfPnt from TColgp;
264 Poles2d : out Array1OfPnt2d from TColgp;
265 Weigths : out Array1OfReal from TColStd)
269 IC2d : Integer from Standard;
270 Tol : Real from Standard;
271 TolU, TolV : out Real from Standard);
275 surf : HSurface from Adaptor3d;
276 surfrst : HSurface from Adaptor3d;
277 rst : HCurve2d from Adaptor2d;
278 cons : CurveOnSurface from Adaptor3d;
279 guide : HCurve from Adaptor3d;
280 tguide : HCurve from Adaptor3d;
283 pt2ds : Pnt2d from gp;
284 pt2drst : Pnt2d from gp;
285 prmrst : Real from Standard;
286 istangent: Boolean from Standard;
288 tg2ds : Vec2d from gp;
290 tg2drst : Vec2d from gp;
292 ray : Real from Standard;
293 choix : Integer from Standard;
298 normtg : Real from Standard;
299 theD : Real from Standard;
301 surfref : HSurface from Adaptor3d;
302 rstref : HCurve2d from Adaptor2d;
304 maxang : Real from Standard;
305 minang : Real from Standard;
306 distmin : Real from Standard;
307 mySShape : SectionShape from BlendFunc;
308 myTConv : ParameterisationType from Convert;