b311480e |
1 | -- Created on: 1997-01-23 |
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 | -- |
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 SurfRstLineBuilder from BRepBlend |
18 | |
19 | ---Purpose: This class processes data resulting from |
20 | -- Blend_CSWalking taking in consideration the Surface |
21 | -- supporting the curve to detect the breakpoint. |
22 | -- |
23 | -- The criteria of distribution of points on the line are detailed |
24 | -- because it is to be used in the calculatuon of values approached |
25 | -- by an approximation of functions continued basing on |
26 | -- Blend_SurfRstFunction. |
27 | -- |
28 | -- Thus this pseudo path necessitates 3 criteria of regrouping : |
29 | -- |
30 | -- 1) exit of the domain of the curve |
31 | -- |
32 | -- 2) exit of the domain of the surface |
33 | -- |
34 | -- 3) stall as there is a solution to the problem |
35 | -- surf/surf within the domain of the surface |
36 | -- of support of the restriction. |
ff8178ef |
37 | -- |
38 | -- Construction of a BRepBlend_Line between a surface and |
39 | -- a pcurve on surface from an approached |
40 | -- starting solution. The output entries of this builder |
41 | -- are of the same nature as of the traditional walking |
42 | -- but the requirements on the Line are not the same |
43 | -- If the determination of validity range is always |
44 | -- guaranteed, the criteria of correct repartition of sections |
45 | -- before smoothing are not respected. The resulting Line |
46 | -- is f(t) oriented. |
7fd59977 |
47 | |
48 | uses Point from Blend, |
49 | Status from Blend, |
50 | SurfRstFunction from Blend, |
51 | FuncInv from Blend, |
52 | SurfPointFuncInv from Blend, |
53 | SurfCurvFuncInv from Blend, |
54 | Vector from math, |
55 | Matrix from math, |
56 | State from TopAbs, |
57 | Pnt from gp, |
58 | Pnt2d from gp, |
59 | Vec from gp, |
60 | Vec2d from gp, |
61 | HArray1OfReal from TColStd, |
62 | Transition from IntSurf, |
63 | HVertex from Adaptor3d, |
64 | HSurface from Adaptor3d, |
65 | HCurve2d from Adaptor2d, |
66 | TopolTool from Adaptor3d, |
67 | Line from BRepBlend, |
68 | Extremity from BRepBlend |
69 | |
70 | is |
71 | |
72 | Create(Surf1 : HSurface from Adaptor3d; |
73 | Domain1 : TopolTool from Adaptor3d; |
74 | Surf2 : HSurface from Adaptor3d; |
75 | Rst : HCurve2d from Adaptor2d; |
76 | Domain2 : TopolTool from Adaptor3d) |
77 | returns SurfRstLineBuilder from BRepBlend; |
78 | |
79 | Perform(me : in out; |
80 | Func : in out SurfRstFunction from Blend; |
81 | Finv : in out FuncInv from Blend; |
82 | FinvP : in out SurfPointFuncInv from Blend; |
83 | FinvC : in out SurfCurvFuncInv from Blend; |
84 | Pdep : Real from Standard; |
85 | Pmax : Real from Standard; |
86 | MaxStep : Real from Standard; |
87 | TolGuide : Real from Standard; |
88 | Soldep : Vector from math; |
89 | Tolesp : Real from Standard; |
90 | Fleche : Real from Standard; |
91 | Appro : Boolean from Standard = Standard_False) |
92 | is static; |
93 | |
94 | PerformFirstSection(me : in out; |
95 | Func : in out SurfRstFunction from Blend; |
96 | Finv : in out FuncInv from Blend; |
97 | FinvP : in out SurfPointFuncInv from Blend; |
98 | FinvC : in out SurfCurvFuncInv from Blend; |
99 | Pdep : Real from Standard; |
100 | Pmax : Real from Standard; |
101 | Soldep : Vector from math; |
102 | Tolesp : Real from Standard; |
103 | TolGuide : Real from Standard; |
104 | RecRst : Boolean from Standard; |
105 | RecP : Boolean from Standard; |
106 | RecS : Boolean from Standard; |
107 | Psol : out Real from Standard; |
108 | ParSol : out Vector from math) |
109 | returns Boolean from Standard |
110 | is static; |
111 | |
112 | Complete(me : in out; |
113 | Func : in out SurfRstFunction from Blend; |
114 | Finv : in out FuncInv from Blend; |
115 | FinvP : in out SurfPointFuncInv from Blend; |
116 | FinvC : in out SurfCurvFuncInv from Blend; |
117 | Pmin : Real from Standard) |
118 | |
119 | returns Boolean from Standard |
120 | is static; |
121 | |
122 | InternalPerform (me : in out; |
123 | Func : in out SurfRstFunction from Blend; |
124 | Finv : in out FuncInv from Blend; |
125 | FinvP : in out SurfPointFuncInv from Blend; |
126 | FinvC : in out SurfCurvFuncInv from Blend; |
127 | Bound : Real from Standard) |
128 | is static private; |
129 | |
130 | ArcToRecadre(me : in out; |
131 | Sol : Vector from math; |
132 | PrevIndex : Integer; |
133 | pt2d, lastpt2d : out Pnt2d from gp; |
134 | ponarc : out Real) |
135 | returns Integer; |
136 | |
137 | Recadre(me : in out; |
138 | FinvC : in out SurfCurvFuncInv from Blend; |
139 | Solinv : out Vector from math; |
140 | Arc : out HCurve2d from Adaptor2d; |
141 | IsVtx : out Boolean from Standard; |
142 | Vtx : out HVertex from Adaptor3d) |
143 | returns Boolean from Standard |
144 | is static private; |
145 | |
146 | Recadre(me : in out; |
147 | Func : in out SurfRstFunction from Blend; |
148 | Finv : in out FuncInv from Blend; |
149 | Solinv : out Vector from math; |
150 | IsVtx : out Boolean from Standard; |
151 | Vtx : out HVertex from Adaptor3d) |
152 | returns Boolean from Standard |
153 | is static private; |
154 | |
155 | Recadre(me : in out; |
156 | FinvP : in out SurfPointFuncInv from Blend; |
157 | Solinv : out Vector from math; |
158 | IsVtx : out Boolean from Standard; |
159 | Vtx : out HVertex from Adaptor3d) |
160 | returns Boolean from Standard |
161 | is static private; |
162 | |
163 | IsDone(me) |
164 | returns Boolean from Standard |
165 | ---C++: inline |
166 | is static; |
167 | |
168 | Line(me) |
169 | returns Line from BRepBlend |
170 | ---C++: inline |
171 | ---C++: return const& |
172 | is static; |
173 | |
174 | DecrochStart(me) |
175 | returns Boolean from Standard |
176 | ---C++: inline |
177 | is static; |
178 | |
179 | DecrochEnd(me) |
180 | returns Boolean from Standard |
181 | ---C++: inline |
182 | is static; |
183 | |
184 | Transition(me : in out; |
185 | OnFirst : Boolean from Standard; |
186 | Arc : HCurve2d from Adaptor2d; |
187 | Param : Real from Standard; |
188 | TLine,TArc : out Transition from IntSurf) |
189 | is static private; |
190 | |
191 | MakeExtremity(me : in out; |
192 | Extrem : in out Extremity from BRepBlend; |
193 | OnFirst : Boolean from Standard; |
194 | Arc : HCurve2d from Adaptor2d; |
195 | Param : Real from Standard; |
196 | IsVtx : Boolean from Standard; |
197 | Vtx : HVertex from Adaptor3d) |
198 | is static private; |
199 | |
200 | CheckDeflectionOnSurf(me : in out; |
201 | CurPoint : Point from Blend) |
202 | returns Status from Blend |
203 | is static private; |
204 | |
205 | CheckDeflectionOnRst(me : in out; |
206 | CurPoint : Point from Blend) |
207 | returns Status from Blend |
208 | is static private; |
209 | |
210 | TestArret(me : in out; |
211 | Func : in out SurfRstFunction from Blend; |
212 | TestDeflection : Boolean from Standard; |
213 | State : Status from Blend) |
214 | returns Status from Blend |
215 | is static private; |
216 | |
217 | CheckInside(me : in out; |
218 | Func : in out SurfRstFunction from Blend; |
219 | SituOnC : out State from TopAbs; |
220 | SituOnS : out State from TopAbs; |
221 | Decroch : out Boolean from Standard) |
222 | returns Boolean from Standard |
223 | is static private; |
224 | |
225 | fields |
226 | |
227 | done : Boolean from Standard; |
228 | line : Line from BRepBlend; |
229 | sol : Vector from math; |
230 | surf1 : HSurface from Adaptor3d; |
231 | domain1 : TopolTool from Adaptor3d; |
232 | surf2 : HSurface from Adaptor3d; |
233 | rst : HCurve2d from Adaptor2d; |
234 | domain2 : TopolTool from Adaptor3d; |
235 | |
236 | tolesp : Real from Standard; |
237 | tolgui : Real from Standard; |
238 | pasmax : Real from Standard; |
239 | fleche : Real from Standard; |
240 | param : Real from Standard; |
241 | previousP : Point from Blend; |
242 | rebrou : Boolean from Standard; |
243 | iscomplete : Boolean from Standard; |
244 | comptra : Boolean from Standard; |
245 | sens : Real from Standard; |
246 | decrochdeb : Boolean from Standard; |
247 | decrochfin : Boolean from Standard; |
248 | |
249 | end SurfRstLineBuilder from BRepBlend; |