1 -- Created on: 2001-02-26
2 -- Created by: Peter KURNEV
3 -- Copyright (c) 2001-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
22 class EdgeFace from IntTools
24 ---Purpose: The class provides Edge/Face algorithm to determine
25 --- common parts between edge and face in 3-d space.
26 -- Common parts can be : Vertices or Edges.
33 Curve from BRepAdaptor,
34 Surface from BRepAdaptor,
35 SequenceOfRanges from IntTools,
36 CArray1OfReal from IntTools,
37 CommonPrt from IntTools,
38 FClass2d from IntTools,
39 SequenceOfRoots from IntTools,
40 SequenceOfCommonPrts from IntTools,
48 returns EdgeFace from IntTools;
53 SetEdge (me:out; anEdge:Edge from TopoDS);
55 --- Initializes algorithm by the edge anEdge
58 SetTolE (me:out; aTolEdge1:Real from Standard);
60 --- Initializes algorithm by edge tolerance
63 SetFace (me:out; aFace:Face from TopoDS);
65 --- Initializes algorithm by the face aFace
68 SetTolF (me:out; aTolFace:Real from Standard);
70 --- Initializes algorithm by face tolerance
73 SetDiscretize (me:out; aDiscret:Integer from Standard);
75 --- Initializes algorithm by discretization value
78 SetDeflection (me:out; aDeflection:Real from Standard);
80 --- Initializes algorithm by deflection value
83 SetEpsilonT (me:out; anEpsT:Real from Standard);
85 --- Initializes algorithm by parameter tolerance
88 SetEpsilonNull (me:out; anEpsNull:Real from Standard);
90 --- Initializes algorithm by distance tolerance
93 SetRange (me:out; aRange:Range from IntTools);
95 --- Sets boundaries for edge.
96 --- The algorithm processes edge inside these boundaries.
99 SetRange (me:out; aFirst, aLast:Real from Standard);
101 --- Sets boundaries for edge.
102 --- The algorithm processes edge inside these boundaries.
105 SetContext (me: in out;
106 theContext: Context from BOPInt);
108 --- Sets the intersecton context
112 returns Context from BOPInt;
113 ---C++:return const &
115 --- Gets the intersecton context
120 --- Launches the process
124 returns Boolean from Standard;
126 --- Returns true if computation was done
127 --- successfully, otherwise returns false
131 returns Integer from Standard;
133 --- Returns code of completion
134 --- 0 - means successful completion
135 --- 1 - the process was not started
136 --- 2,3,4,5 - invalid source data for the algorithm
137 --- 6 - discretization failed
138 --- 7 - no projectable ranges found
139 --- 11 - distance computing error
143 returns SequenceOfCommonPrts from IntTools;
144 ---C++: return const&
150 returns Range from IntTools;
151 ---C++: return const&
153 --- Returns boundaries for edge
157 IsEqDistance(myclass;
159 aS: Surface from BRepAdaptor;
160 aT: Real from Standard;
161 aD:out Real from Standard)
162 returns Boolean from Standard;
168 -----------------------------------------------------
169 -- Block of private methods of the algorithm --
170 -----------------------------------------------------
172 CheckData (me:out) is private;
174 Prepare (me:out) is private;
176 IsProjectable (me; t:Real from Standard)
177 returns Boolean from Standard
180 FindProjectableRoot (me:out;
181 t1,t2:Real from Standard;
182 f1,f2:Integer from Standard;
183 tRoot:out Real from Standard)
186 DistanceFunction (me:out;t:Real from Standard)
187 returns Real from Standard
190 DerivativeFunction (me:out;t:Real from Standard)
191 returns Real from Standard
194 PrepareArgsFuncArrays (me:out;t1,t2:Real from Standard)
198 AddDerivativePoints (me:out; t,f:CArray1OfReal from IntTools)
202 FindSimpleRoot (me:out; IP:Integer from Standard;
203 ta, tb, fA:Real from Standard)
204 returns Real from Standard
207 FindGoldRoot (me:out; ta, tb, coeff:Real from Standard)
208 returns Real from Standard
212 aCP: out CommonPrt from IntTools)
213 returns Integer from Standard
217 IsIntersection (me:out; ta,tb:Real from Standard)
220 FindDerivativeRoot (me:out;t,f:CArray1OfReal from IntTools)
224 RemoveIdenticalRoots(me:out)
228 aCP: CommonPrt from IntTools;
229 aTX:out Real from Standard)
230 returns Boolean from Standard
233 CheckTouchVertex (me:out;
234 aCP: CommonPrt from IntTools;
235 aTX:out Real from Standard)
236 returns Boolean from Standard
242 myEdge : Edge from TopoDS;
243 myFace : Face from TopoDS;
244 myTolE : Real from Standard;
245 myTolF : Real from Standard;
247 myDiscret : Integer from Standard;
249 myEpsT : Real from Standard;
250 myEpsNull : Real from Standard;
251 myDeflection : Real from Standard;
254 myC : Curve from BRepAdaptor;
255 myTmin : Real from Standard;
256 myTmax : Real from Standard;
258 myS : Surface from BRepAdaptor;
260 myCriteria : Real from Standard;
263 myIsDone : Boolean from Standard;
264 myErrorStatus : Integer from Standard;
267 myContext : Context from BOPInt;
268 myProjectableRanges: SequenceOfRanges from IntTools;
269 myFClass2d : FClass2d from IntTools;
270 myFuncArray : CArray1OfReal from IntTools;
271 myArgsArray : CArray1OfReal from IntTools;
272 mySequenceOfRoots : SequenceOfRoots from IntTools;
273 mySeqOfCommonPrts : SequenceOfCommonPrts from IntTools;
275 myPar1 : Real from Standard;
276 myParallel : Boolean from Standard;
277 myAllNullFlag : Boolean from Standard;
279 myRange : Range from IntTools;