1 -- Created on: 1992-03-25
2 -- Created by: Isabelle GRIGNON
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
22 generic class IWalking from IntWalk (
23 ThePointOfPath as any;
24 ThePointOfPathTool as any; -- as PathPointTool(ThePointOfPath)
25 ThePOPIterator as any; -- as Iterator from IntWalk(ThePointOfPath)
26 ThePointOfLoop as any;
27 ThePointOfLoopTool as any; -- as LoopPointTool(ThePointOfLoop)
28 ThePOLIterator as any; -- as Iterator from IntWalk(ThePointOfLoop)
30 ThePSurfaceTool as any; -- as PSurfaceTool(ThePSurface)
31 TheIWFunction as any) -- as IWFunction from IntWalk(ThePSurface)
34 ---Purpose: This class implements an algorithm to find all the points
35 -- on a parametric surface verifying f(u,v)=0
36 -- where f is defined in the IWFunction class.
37 -- These points are found by a marching algorithm, using a set of
38 -- points as starting points.
43 uses Vector from math,
44 SequenceOfInteger from TColStd,
45 SequenceOfReal from TColStd,
46 StatusDeflection from IntWalk,
47 VectorOfInteger from IntWalk,
48 VectorOfWalkingData from IntWalk,
54 raises NotDone from StdFail,
55 OutOfRange from Standard
58 class TheIWLine instantiates IWLine from IntWalk
61 class SequenceOfIWLine instantiates Sequence from TCollection
67 Create(Epsilon, Deflection, Step : Real from Standard)
69 ---Purpose: Deflection is the maximum deflection admitted between two
70 -- consecutive points on a resulting polyline.
71 -- Step is the maximum increment admitted between two
72 -- consecutive points (in 2d space).
73 -- Epsilon is the tolerance beyond which 2 points
76 returns IWalking from IntWalk;
79 SetTolerance(me: in out;Epsilon, Deflection, Step : Real from Standard)
81 ---Purpose: Deflection is the maximum deflection admitted between two
82 -- consecutive points on a resulting polyline.
83 -- Step is the maximum increment admitted between two
84 -- consecutive points (in 2d space).
85 -- Epsilon is the tolerance beyond which 2 points
94 Pnts1 : ThePOPIterator;
95 Pnts2 : ThePOLIterator;
96 Func : in out TheIWFunction;
98 Reversed : Boolean from Standard = Standard_False)
100 ---Purpose: Searches a set of polylines starting on a point of Pnts1
102 -- Each point on a resulting polyline verifies F(u,v)=0
108 Pnts1 : ThePOPIterator;
109 Func : in out TheIWFunction;
111 Reversed : Boolean from Standard = Standard_False)
113 ---Purpose: Searches a set of polylines starting on a point of Pnts1.
114 -- Each point on a resulting polyline verifies F(u,v)=0
121 ---Purpose: Returns true if the calculus was successful.
123 returns Boolean from Standard
131 ---Purpose: Returns the number of resulting polylines.
132 -- An exception is raised if IsDone returns False.
134 returns Integer from Standard
137 raises NotDone from StdFail
142 Value(me; Index: Integer from Standard)
144 ---Purpose: Returns the polyline of range Index.
145 -- An exception is raised if IsDone is False.
146 -- An exception is raised if Index<=0 or Index>NbLines.
149 ---C++: return const&
152 raises OutOfRange from Standard,
160 ---Purpose: Returns the number of points belonging to Pnts on which no
161 -- line starts or ends.
162 -- An exception is raised if IsDone returns False.
164 returns Integer from Standard
167 raises NotDone from StdFail
172 SinglePnt(me ; Index: Integer from Standard)
174 ---Purpose: Returns the point of range Index .
175 -- An exception is raised if IsDone returns False.
176 -- An exception is raised if Index<=0 or
177 -- Index > NbSinglePnts.
179 returns ThePointOfPath
180 ---C++: return const&
183 raises OutOfRange from Standard,
191 Cadrage(me; BornInf, BornSup, UVap : in out Vector from math;
192 Step : in out Real from Standard;
193 -- StepV : in out Real from Standard;
194 StepSign : Integer from Standard)
195 returns Boolean from Standard
198 TestArretPassage (me: in out; Umult : SequenceOfReal from TColStd;
199 Vmult : SequenceOfReal from TColStd;
200 Section: in out TheIWFunction;
201 UV : in out Vector from math;
202 Irang : out Integer from Standard)
203 returns Boolean from Standard
206 TestArretPassage (me: in out; Umult : SequenceOfReal from TColStd;
207 Vmult : SequenceOfReal from TColStd;
208 UV : Vector from math;
209 Index : Integer from Standard;
210 Irang : out Integer from Standard)
211 returns Boolean from Standard
214 TestArretAjout(me: in out; Section: in out TheIWFunction;
215 UV : in out Vector from math;
216 Irang : out Integer from Standard;
217 PSol : out PntOn2S from IntSurf )
218 returns Boolean from Standard
221 TestArretCadre(me : in out; Umult : SequenceOfReal from TColStd;
222 Vmult : SequenceOfReal from TColStd;
223 Line : mutable TheIWLine;
224 Section: in out TheIWFunction;
225 UV : in out Vector from math;
226 Irang : out Integer from Standard)
230 TestDeflection(me: in out; Section : in out TheIWFunction;
231 Finished : Boolean from Standard;
232 UV : Vector from math;
233 StatusPrecedent : StatusDeflection from IntWalk;
234 NbDivision : in out Integer from Standard;
235 Step : in out Real from Standard;
236 -- StepV : in out Real from Standard;
237 StepSign : Integer from Standard)
238 returns StatusDeflection from IntWalk
241 ComputeOpenLine(me : in out; Umult : SequenceOfReal from TColStd;
242 Vmult : SequenceOfReal from TColStd;
243 Pnts1 : ThePOPIterator;
244 Section: in out TheIWFunction;
245 Rajout : in out Boolean from Standard)
248 OpenLine(me : in out; N : Integer from Standard;
249 Psol : PntOn2S from IntSurf;
250 Pnts1 : ThePOPIterator;
251 Section: in out TheIWFunction;
252 Line : mutable TheIWLine)
255 ComputeCloseLine(me : in out; Umult : SequenceOfReal from TColStd;
256 Vmult : SequenceOfReal from TColStd;
257 Pnts1 : ThePOPIterator;
258 Pnts2 : ThePOLIterator;
259 Section: in out TheIWFunction;
260 Rajout : in out Boolean from Standard)
263 AddPointInCurrentLine(me ; N : Integer from Standard;
264 PathPnt : ThePointOfPath;
265 CurrentLine : mutable TheIWLine)
268 MakeWalkingPoint(me : in out ; Case : Integer from Standard;
269 U,V : Real from Standard;
270 Section : in out TheIWFunction;
271 Psol : in out PntOn2S from IntSurf)
275 Clear (me: in out) is static protected;
276 ---Purpose: Clears up internal containers
281 done : Boolean from Standard;
282 seqSingle : ThePOPIterator;
283 fleche : Real from Standard;
284 pas : Real from Standard;
285 tolerance : Vector from math;
286 epsilon : Real from Standard;
287 reversed : Boolean from Standard;
289 wd1 : VectorOfWalkingData from IntWalk;
290 wd2 : VectorOfWalkingData from IntWalk;
291 nbMultiplicities : VectorOfInteger from IntWalk;
292 Um : Real from Standard; -- Min U de la surf
293 UM : Real from Standard; -- Max U de la surf
294 Vm : Real from Standard; -- Min V de la surf
295 VM : Real from Standard; -- Max V de la surf
296 previousPoint : PntOn2S from IntSurf;
297 prevtg : Boolean from Standard;
298 previousd3d : Vec from gp;
299 previousd2d : Dir2d from gp;
300 seqAjout : SequenceOfInteger from TColStd;
301 lines : SequenceOfIWLine;
302 NbPointsConfondusConsecutifs: Integer from Standard;
303 EpsilonSembleTropGrand : Integer from Standard;