1 -- Created on: 1993-12-02
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1993-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 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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class ConstRad from BlendFunc
19 inherits Function from Blend
23 uses Vector from math,
25 Tensor from BlendFunc,
31 Array1OfPnt from TColgp,
32 Array1OfVec from TColgp,
33 Array1OfPnt2d from TColgp,
34 Array1OfVec2d from TColgp,
35 Array1OfReal from TColStd,
36 Array1OfInteger from TColStd,
38 SectionShape from BlendFunc,
40 ParameterisationType from Convert,
41 HSurface from Adaptor3d,
46 Create(S1,S2: HSurface from Adaptor3d; C: HCurve from Adaptor3d)
47 returns ConstRad from BlendFunc;
50 ---Purpose: returns the number of equations of the function.
51 returns Integer from Standard
54 Value(me: in out; X: Vector; F: out Vector)
55 ---Purpose: computes the values <F> of the Functions for the
57 -- Returns True if the computation was done successfully,
59 returns Boolean from Standard
62 Derivatives(me: in out; X: Vector; D: out Matrix)
63 ---Purpose: returns the values <D> of the derivatives for the
65 -- Returns True if the computation was done successfully,
67 returns Boolean from Standard
70 Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
71 ---Purpose: returns the values <F> of the functions and the derivatives
72 -- <D> for the variable <X>.
73 -- Returns True if the computation was done successfully,
75 returns Boolean from Standard
78 ComputeValues(me : in out;
81 ByParam : Boolean = Standard_False;
83 returns Boolean from Standard
87 Set(me: in out; Param: Real from Standard);
89 Set(me: in out; First, Last: Real from Standard);
91 GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard);
94 GetBounds(me; InfBound,SupBound: out Vector from math);
96 IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
97 returns Boolean from Standard;
99 GetMinimalDistance(me)
100 ---Purpose: Returns the minimal Distance beetween two
101 -- extremitys of calculed sections.
102 returns Real from Standard;
104 PointOnS1(me) returns Pnt from gp;
105 ---C++: return const&
107 PointOnS2(me) returns Pnt from gp;
108 ---C++: return const&
110 IsTangencyPoint(me) returns Boolean from Standard;
112 TangentOnS1(me) returns Vec from gp;
113 ---C++: return const&
115 Tangent2dOnS1(me) returns Vec2d from gp;
116 ---C++: return const&
118 TangentOnS2(me) returns Vec from gp;
119 ---C++: return const&
121 Tangent2dOnS2(me) returns Vec2d from gp;
122 ---C++: return const&
125 U1,V1,U2,V2 : Real from Standard;
126 TgFirst,TgLast,NormFirst,NormLast : out Vec from gp);
127 ---Purpose: Returns the tangent vector at the section,
128 -- at the beginning and the end of the section, and
129 -- returns the normal (of the surfaces) at
133 returns Boolean from Standard
137 returns Boolean from Standard
140 -- methodes hors template (en plus du create)
142 Set(me: in out; Radius: Real from Standard; Choix: Integer from Standard)
143 ---Purpose: Inits the value of radius, and the "quadrant".
146 Set(me: in out; TypeSection: SectionShape from BlendFunc)
147 ---Purpose: Sets the type of section generation for the
151 Section(me: in out; Param: Real from Standard;
152 U1,V1,U2,V2: Real from Standard;
153 Pdeb,Pfin: out Real from Standard;
155 ---Purpose: Utile pour une visu rapide et approximative de la surface.
158 --- Pour les approximations
160 IsRational(me) returns Boolean
161 ---Purpose: Returns if the section is rationnal
164 GetSectionSize(me) returns Real
165 ---Purpose: Returns the length of the maximum section
168 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
169 ---Purpose: Compute the minimal value of weight for each poles
173 NbIntervals(me; S : Shape from GeomAbs) returns Integer
174 ---Purpose: Returns the number of intervals for continuity
175 -- <S>. May be one if Continuity(me) >= <S>
178 Intervals(me; T : in out Array1OfReal from TColStd;
179 S : Shape from GeomAbs)
180 ---Purpose: Stores in <T> the parameters bounding the intervals
181 -- of continuity <S>.
183 -- The array must provide enough room to accomodate
184 -- for the parameters. i.e. T.Length() > NbIntervals()
188 NbPoles : out Integer from Standard;
189 NbKnots : out Integer from Standard;
190 Degree : out Integer from Standard;
191 NbPoles2d : out Integer from Standard)
196 BoundTol, SurfTol, AngleTol : Real;
199 ---Purpose: Returns the tolerance to reach in approximation
201 -- BoundTol error at the Boundary
202 -- AngleTol tangent error at the Boundary
203 -- SurfTol error inside the surface.
206 Knots(me: in out; TKnots: out Array1OfReal from TColStd)
210 Mults(me: in out; TMults: out Array1OfInteger from TColStd)
213 Section(me: in out ; P: Point from Blend;
214 Poles : out Array1OfPnt from TColgp;
215 DPoles : out Array1OfVec from TColgp;
216 D2Poles : out Array1OfVec from TColgp;
217 Poles2d : out Array1OfPnt2d from TColgp;
218 DPoles2d : out Array1OfVec2d from TColgp;
219 D2Poles2d : out Array1OfVec2d from TColgp;
220 Weigths : out Array1OfReal from TColStd;
221 DWeigths : out Array1OfReal from TColStd;
222 D2Weigths : out Array1OfReal from TColStd)
223 ---Purpose: Used for the first and last section
224 returns Boolean from Standard
227 Section(me: in out ; P: Point from Blend;
228 Poles : out Array1OfPnt from TColgp;
229 DPoles : out Array1OfVec from TColgp;
230 Poles2d : out Array1OfPnt2d from TColgp;
231 DPoles2d : out Array1OfVec2d from TColgp;
232 Weigths : out Array1OfReal from TColStd;
233 DWeigths : out Array1OfReal from TColStd)
234 ---Purpose: Used for the first and last section
235 returns Boolean from Standard
238 Section(me: in out ; P: Point from Blend;
239 Poles : out Array1OfPnt from TColgp;
240 Poles2d : out Array1OfPnt2d from TColgp;
241 Weigths : out Array1OfReal from TColStd)
244 AxeRot(me: in out; Prm: Real from Standard) returns Ax1 from gp
248 IC2d : Integer from Standard;
249 Tol : Real from Standard;
250 TolU, TolV : out Real from Standard);
255 -- the basic inpout geometry
256 surf1 : HSurface from Adaptor3d;
257 surf2 : HSurface from Adaptor3d;
258 curv : HCurve from Adaptor3d;
259 tcurv : HCurve from Adaptor3d;
261 -- the basic output geometry
264 istangent: Boolean from Standard;
266 tg12d : Vec2d from gp;
268 tg22d : Vec2d from gp;
271 param : Real from Standard;
272 ray1 : Real from Standard;
273 ray2 : Real from Standard;
274 choix : Integer from Standard;
275 myXOrder : Integer from Standard;
276 myTOrder : Integer from Standard;
277 xval : Vector from math;
278 tval : Real from Standard;
281 -- Auxiliary Geometry
283 d1u1, d1u2 : Vec from gp;
284 d1v1, d1v2 : Vec from gp;
285 d2u1, d2v1, d2uv1 : Vec from gp;
286 d2u2, d2v2, d2uv2 : Vec from gp;
287 dn1w, dn2w : Vec from gp;
288 d2n1w, d2n2w : Vec from gp;
290 nsurf1 : Vec from gp;
291 dns1u1, dns1u2 : Vec from gp;
292 dns1v1, dns1v2 : Vec from gp;
293 nsurf2 : Vec from gp;
294 dnplan : Vec from gp;
295 d2nplan : Vec from gp;
296 dnsurf1 : Vec from gp;
297 dnsurf2 : Vec from gp;
299 -- Auxilary math Object
300 dndu1, dndu2 : Vec from gp;
301 dndv1, dndv2 : Vec from gp;
302 d2ndu1, d2ndu2 : Vec from gp;
303 d2ndv1, d2ndv2 : Vec from gp;
304 d2nduv1, d2nduv2 : Vec from gp;
305 d2ndtu1, d2ndtu2 : Vec from gp;
306 d2ndtv1, d2ndtv2 : Vec from gp;
308 E : Vector from math;
309 DEDX : Matrix from math;
310 DEDT : Vector from math;
311 D2EDX2 : Tensor from BlendFunc;
312 D2EDXDT : Matrix from math;
313 D2EDT2 : Vector from math;
315 -- Information on sections
316 maxang : Real from Standard;
317 minang : Real from Standard;
318 distmin : Real from Standard;
319 mySShape : SectionShape from BlendFunc;
320 myTConv : ParameterisationType from Convert;