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