b311480e |
1 | -- Created on: 1997-07-28 |
2 | -- Created by: Jerome LEMONIER |
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 | |
17 | class SurfRstEvolRad from BRepBlend |
18 | inherits SurfRstFunction from Blend |
19 | |
ff8178ef |
20 | ---Purpose: Function to approximate by AppSurface for |
21 | -- Edge/Face and evolutif radius |
7fd59977 |
22 | |
23 | uses Vector from math, |
24 | Matrix from math, |
25 | Ax1 from gp, |
26 | Vec from gp, |
27 | Vec2d from gp, |
28 | Pnt from gp, |
29 | Pnt2d from gp, |
30 | Circ from gp, |
31 | Array1OfPnt from TColgp, |
32 | Array1OfVec from TColgp, |
33 | Array1OfPnt2d from TColgp, |
34 | Array1OfVec2d from TColgp, |
35 | Array1OfReal from TColStd, |
36 | Array1OfInteger from TColStd, |
37 | Shape from GeomAbs, |
38 | Point from Blend, |
39 | SectionShape from BlendFunc, |
40 | HSurface from Adaptor3d, |
41 | HCurve from Adaptor3d, |
42 | HCurve2d from Adaptor2d, |
43 | CurveOnSurface from Adaptor3d, |
44 | ParameterisationType from Convert, |
45 | Function from Law |
46 | |
47 | is |
48 | |
49 | Create(Surf : HSurface from Adaptor3d; |
50 | SurfRst : HSurface from Adaptor3d; |
51 | Rst : HCurve2d from Adaptor2d; |
52 | CGuide : HCurve from Adaptor3d; |
53 | Evol : Function from Law) |
54 | returns SurfRstEvolRad from BRepBlend; |
55 | |
56 | NbVariables(me) |
57 | ---Purpose: Returns 3. |
58 | returns Integer from Standard; |
59 | |
60 | NbEquations(me) |
61 | ---Purpose: Returns 3. |
62 | returns Integer from Standard; |
63 | |
64 | Value(me: in out; X: Vector; F: out Vector) |
65 | ---Purpose: computes the values <F> of the Functions for the |
66 | -- variable <X>. |
67 | -- Returns True if the computation was done successfully, |
68 | -- False otherwise. |
69 | returns Boolean from Standard; |
70 | |
71 | Derivatives(me: in out; X: Vector; D: out Matrix) |
72 | ---Purpose: returns the values <D> of the derivatives for the |
73 | -- variable <X>. |
74 | -- Returns True if the computation was done successfully, |
75 | -- False otherwise. |
76 | returns Boolean from Standard; |
77 | |
78 | Values(me: in out; X: Vector; F: out Vector; D: out Matrix) |
79 | ---Purpose: returns the values <F> of the functions and the derivatives |
80 | -- <D> for the variable <X>. |
81 | -- Returns True if the computation was done successfully, |
82 | -- False otherwise. |
83 | returns Boolean from Standard; |
84 | |
85 | Set(me : in out; |
86 | SurfRef : HSurface from Adaptor3d; |
87 | RstRef : HCurve2d from Adaptor2d); |
88 | |
89 | Set(me: in out; Param: Real from Standard); |
90 | |
91 | Set(me: in out; First, Last: Real from Standard); |
92 | ---Purpose: Sets the bounds of the parametric interval on |
93 | -- the guide line. |
94 | -- This determines the derivatives in these values if the |
95 | -- function is not Cn. |
96 | |
97 | GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard); |
98 | |
99 | GetBounds(me; InfBound,SupBound: out Vector from math); |
100 | |
101 | IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard) |
102 | returns Boolean from Standard; |
103 | |
104 | GetMinimalDistance(me) |
105 | ---Purpose: Returns the minimal Distance beetween two |
106 | -- extremitys of calculed sections. |
107 | returns Real from Standard |
108 | is redefined; |
109 | |
110 | --- TheFollowing methods are called only when |
111 | -- IsSolution returns Standard_True. |
112 | |
113 | PointOnS(me) |
114 | ---C++: return const& |
115 | returns Pnt from gp; |
116 | |
117 | PointOnRst(me) |
118 | ---C++: return const& |
119 | returns Pnt from gp; |
120 | |
121 | Pnt2dOnS(me) |
122 | ---Purpose: Returns U,V coordinates of the point on the surface. |
123 | ---C++: return const& |
124 | returns Pnt2d from gp; |
125 | |
126 | Pnt2dOnRst(me) |
127 | ---Purpose: Returns U,V coordinates of the point on the curve on |
128 | -- surface. |
129 | ---C++: return const& |
130 | returns Pnt2d from gp; |
131 | |
132 | ParameterOnRst(me) |
133 | ---Purpose: Returns parameter of the point on the curve. |
134 | returns Real from Standard; |
135 | |
136 | IsTangencyPoint(me) |
137 | returns Boolean from Standard; |
138 | |
139 | TangentOnS(me) |
140 | ---C++: return const& |
141 | returns Vec from gp; |
142 | |
143 | Tangent2dOnS(me) |
144 | ---C++: return const& |
145 | returns Vec2d from gp; |
146 | |
147 | TangentOnRst(me) |
148 | ---C++: return const& |
149 | returns Vec from gp; |
150 | |
151 | Tangent2dOnRst(me) |
152 | ---C++: return const& |
153 | returns Vec2d from gp; |
154 | |
155 | Decroch(me; |
156 | Sol : Vector from math; |
157 | NS,TgS : out Vec from gp) |
158 | ---Warning: Peut etre appele sans appel prealable a issolution |
159 | -- mais les valeurs calculees risquent de ne pas avoir |
160 | -- grand sens. |
161 | ---Purpose: Permet d ' implementer un critere de decrochage |
162 | -- specifique a la fonction. |
163 | returns Boolean from Standard |
164 | is static; |
165 | |
166 | -- methodes hors template (en plus du create) |
167 | |
168 | Set(me : in out; |
169 | Choix : Integer from Standard) |
170 | is static; |
171 | |
172 | Set(me: in out; TypeSection: SectionShape from BlendFunc) |
173 | ---Purpose: Sets the type of section generation for the |
174 | -- approximations. |
175 | is static; |
176 | |
177 | Section(me : in out; |
178 | Param : Real from Standard; |
179 | U,V,W : Real from Standard; |
180 | Pdeb,Pfin : out Real from Standard; |
181 | C : out Circ from gp) |
182 | is static; |
183 | |
184 | -- Methods for the approximation |
185 | -- |
186 | IsRational(me) returns Boolean |
187 | ---Purpose: Returns if the section is rationnal |
188 | is static; |
189 | |
190 | GetSectionSize(me) returns Real |
191 | ---Purpose: Returns the length of the maximum section |
192 | is static; |
193 | |
194 | GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd) |
195 | ---Purpose: Compute the minimal value of weight for each poles |
196 | -- of all sections. |
197 | is static; |
198 | |
199 | NbIntervals(me; S : Shape from GeomAbs) returns Integer |
200 | ---Purpose: Returns the number of intervals for continuity |
201 | -- <S>. May be one if Continuity(me) >= <S> |
202 | is static; |
203 | |
204 | Intervals(me; T : in out Array1OfReal from TColStd; |
205 | S : Shape from GeomAbs) |
206 | ---Purpose: Stores in <T> the parameters bounding the intervals |
207 | -- of continuity <S>. |
208 | -- The array must provide enough room to accomodate |
209 | -- for the parameters. i.e. T.Length() > NbIntervals() |
210 | is static; |
211 | |
212 | GetShape(me : in out; |
213 | NbPoles : out Integer from Standard; |
214 | NbKnots : out Integer from Standard; |
215 | Degree : out Integer from Standard; |
216 | NbPoles2d : out Integer from Standard) |
217 | is static; |
218 | |
219 | GetTolerance(me; |
220 | BoundTol, SurfTol, AngleTol : Real; |
221 | Tol3d : out Vector; |
222 | Tol1D : out Vector ) |
223 | ---Purpose: Returns the tolerance to reach in approximation |
224 | -- to respecte |
225 | -- BoundTol error at the Boundary |
226 | -- AngleTol tangent error at the Boundary |
227 | -- SurfTol error inside the surface. |
228 | is static; |
229 | |
230 | Knots(me: in out; TKnots: out Array1OfReal from TColStd) |
231 | is static; |
232 | |
233 | Mults(me: in out; TMults: out Array1OfInteger from TColStd) |
234 | is static; |
235 | |
236 | Section(me : in out ; |
237 | P : Point from Blend; |
238 | Poles : out Array1OfPnt from TColgp; |
239 | DPoles : out Array1OfVec from TColgp; |
240 | Poles2d : out Array1OfPnt2d from TColgp; |
241 | DPoles2d : out Array1OfVec2d from TColgp; |
242 | Weigths : out Array1OfReal from TColStd; |
243 | DWeigths : out Array1OfReal from TColStd) |
244 | ---Purpose: Used for the first and last section |
245 | returns Boolean from Standard |
246 | is static; |
247 | |
248 | Section(me: in out; P: Point from Blend; |
249 | Poles : out Array1OfPnt from TColgp; |
250 | DPoles : out Array1OfVec from TColgp; |
251 | D2Poles : out Array1OfVec from TColgp; |
252 | Poles2d : out Array1OfPnt2d from TColgp; |
253 | DPoles2d : out Array1OfVec2d from TColgp; |
254 | D2Poles2d : out Array1OfVec2d from TColgp; |
255 | Weigths : out Array1OfReal from TColStd; |
256 | DWeigths : out Array1OfReal from TColStd; |
257 | D2Weigths : out Array1OfReal from TColStd) |
258 | ---Purpose: Used for the first and last section |
259 | -- The method returns Standard_True if the derivatives |
260 | -- are computed, otherwise it returns Standard_False. |
261 | returns Boolean from Standard |
262 | is static; |
263 | |
264 | Section(me : in out ; |
265 | P : Point from Blend; |
266 | Poles : out Array1OfPnt from TColgp; |
267 | Poles2d : out Array1OfPnt2d from TColgp; |
268 | Weigths : out Array1OfReal from TColStd) |
269 | is static; |
270 | |
271 | Resolution(me; |
272 | IC2d : Integer from Standard; |
273 | Tol : Real from Standard; |
274 | TolU, TolV : out Real from Standard); |
275 | |
276 | fields |
277 | |
278 | surf : HSurface from Adaptor3d; |
279 | surfrst : HSurface from Adaptor3d; |
280 | rst : HCurve2d from Adaptor2d; |
281 | cons : CurveOnSurface from Adaptor3d; |
282 | guide : HCurve from Adaptor3d; |
283 | tguide : HCurve from Adaptor3d; |
284 | pts : Pnt from gp; |
285 | ptrst : Pnt from gp; |
286 | pt2ds : Pnt2d from gp; |
287 | pt2drst : Pnt2d from gp; |
288 | prmrst : Real from Standard; |
289 | istangent: Boolean from Standard; |
290 | tgs : Vec from gp; |
291 | tg2ds : Vec2d from gp; |
292 | tgrst : Vec from gp; |
293 | tg2drst : Vec2d from gp; |
294 | |
295 | ray : Real from Standard; |
296 | dray : Real from Standard; |
297 | choix : Integer from Standard; |
298 | ptgui : Pnt from gp; |
299 | d1gui : Vec from gp; |
300 | d2gui : Vec from gp; |
301 | nplan : Vec from gp; |
302 | normtg : Real from Standard; |
303 | theD : Real from Standard; |
304 | |
305 | surfref : HSurface from Adaptor3d; |
306 | rstref : HCurve2d from Adaptor2d; |
307 | |
308 | maxang : Real from Standard; |
309 | minang : Real from Standard; |
310 | distmin : Real from Standard; |
311 | mySShape : SectionShape from BlendFunc; |
312 | myTConv : ParameterisationType from Convert; |
313 | tevol : Function from Law ; |
314 | fevol : Function from Law ; |
315 | sg1 : Real from Standard; |
316 | |
317 | end SurfRstEvolRad; |