1 -- Created on: 2001-02-26
2 -- Created by: Peter KURNEV
3 -- Copyright (c) 2001-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
16 class EdgeFace from IntTools
18 ---Purpose: The class provides Edge/Face algorithm to determine
19 --- common parts between edge and face in 3-d space.
20 -- Common parts can be : Vertices or Edges.
26 Curve from BRepAdaptor,
27 Surface from BRepAdaptor,
28 SequenceOfRanges from IntTools,
29 CArray1OfReal from IntTools,
30 CommonPrt from IntTools,
31 FClass2d from IntTools,
32 SequenceOfRoots from IntTools,
33 SequenceOfCommonPrts from IntTools,
34 Context from IntTools,
41 returns EdgeFace from IntTools;
47 anEdge:Edge from TopoDS);
49 --- Initializes algorithm by the edge anEdge
52 aTolEdge1:Real from Standard);
54 --- Initializes algorithm by edge tolerance
57 aFace:Face from TopoDS);
59 --- Initializes algorithm by the face aFace
62 aTolFace:Real from Standard);
64 --- Initializes algorithm by face tolerance
67 returns Edge from TopoDS;
68 ---C++: return const &
73 returns Face from TopoDS;
74 ---C++: return const &
79 returns Real from Standard;
81 --- Returns tolerance of the edge
84 returns Real from Standard;
86 --- Returns tolerance of the face
88 SetDiscretize (me:out;
89 aDiscret:Integer from Standard);
91 --- Initializes algorithm by discretization value
93 SetDeflection (me:out;
94 aDeflection:Real from Standard);
96 --- Initializes algorithm by deflection value
99 anEpsT:Real from Standard);
101 --- Initializes algorithm by parameter tolerance
103 SetEpsilonNull (me:out;
104 anEpsNull:Real from Standard);
106 --- Initializes algorithm by distance tolerance
109 aRange:Range from IntTools);
111 --- Sets boundaries for edge.
112 --- The algorithm processes edge inside these boundaries.
115 aFirst, aLast:Real from Standard);
117 --- Sets boundaries for edge.
118 --- The algorithm processes edge inside these boundaries.
120 SetContext (me: in out;
121 theContext: Context from IntTools);
123 --- Sets the intersecton context
126 returns Context from IntTools;
127 ---C++:return const &
129 --- Gets the intersecton context
133 --- Launches the process
136 returns Boolean from Standard;
138 --- Returns true if computation was done
139 --- successfully, otherwise returns false
142 returns Integer from Standard;
144 --- Returns code of completion
145 --- 0 - means successful completion
146 --- 1 - the process was not started
147 --- 2,3,4,5 - invalid source data for the algorithm
148 --- 6 - discretization failed
149 --- 7 - no projectable ranges found
150 --- 11 - distance computing error
153 returns SequenceOfCommonPrts from IntTools;
154 ---C++: return const&
159 returns Range from IntTools;
160 ---C++: return const&
162 --- Returns boundaries for edge
164 IsEqDistance(myclass;
166 aS: Surface from BRepAdaptor;
167 aT: Real from Standard;
168 aD:out Real from Standard)
169 returns Boolean from Standard;
171 -------------------------------------------------------
172 -- Block of protected methods of the algorithm --
173 -------------------------------------------------------
182 t:Real from Standard)
183 returns Boolean from Standard
186 FindProjectableRoot (me:out;
187 t1,t2:Real from Standard;
188 f1,f2:Integer from Standard;
189 tRoot:out Real from Standard)
192 DistanceFunction (me:out;
193 t:Real from Standard)
194 returns Real from Standard
197 DerivativeFunction (me:out;
198 t:Real from Standard)
199 returns Real from Standard
202 PrepareArgsFuncArrays (me:out;
203 t1,t2:Real from Standard)
207 AddDerivativePoints(me:out;
208 t,f:CArray1OfReal from IntTools)
212 FindSimpleRoot (me:out;
213 IP:Integer from Standard;
214 ta, tb, fA:Real from Standard)
215 returns Real from Standard
218 FindGoldRoot (me:out;
219 ta, tb, coeff:Real from Standard)
220 returns Real from Standard
224 aCP: out CommonPrt from IntTools)
225 returns Integer from Standard
229 IsIntersection (me:out;
230 ta,tb:Real from Standard)
233 FindDerivativeRoot(me:out;
234 t,f:CArray1OfReal from IntTools)
237 RemoveIdenticalRoots(me:out)
241 aCP: CommonPrt from IntTools;
242 aTX:out Real from Standard)
243 returns Boolean from Standard
246 CheckTouchVertex (me:out;
247 aCP: CommonPrt from IntTools;
248 aTX:out Real from Standard)
249 returns Boolean from Standard
254 myEdge : Edge from TopoDS;
255 myFace : Face from TopoDS;
256 myTolE : Real from Standard;
257 myTolF : Real from Standard;
259 myDiscret : Integer from Standard;
261 myEpsT : Real from Standard;
262 myEpsNull : Real from Standard;
263 myDeflection : Real from Standard;
266 myC : Curve from BRepAdaptor;
267 myTmin : Real from Standard;
268 myTmax : Real from Standard;
270 myS : Surface from BRepAdaptor;
272 myCriteria : Real from Standard;
275 myIsDone : Boolean from Standard;
276 myErrorStatus : Integer from Standard;
279 myContext : Context from IntTools;
280 myProjectableRanges: SequenceOfRanges from IntTools;
281 myFClass2d : FClass2d from IntTools;
282 myFuncArray : CArray1OfReal from IntTools;
283 myArgsArray : CArray1OfReal from IntTools;
284 mySequenceOfRoots : SequenceOfRoots from IntTools;
285 mySeqOfCommonPrts : SequenceOfCommonPrts from IntTools;
287 myPar1 : Real from Standard;
288 myParallel : Boolean from Standard;
290 myRange : Range from IntTools;