Commit | Line | Data |
---|---|---|
7fd59977 | 1 | -- File: IntTools_EdgeFace.cdl |
2 | -- Created: Mon Feb 26 10:12:13 2001 | |
3 | -- Author: Peter KURNEV | |
4 | -- <pkv@irinox> | |
5 | ---Copyright: Matra Datavision 2001 | |
6 | ||
7 | ||
8 | class EdgeFace from IntTools | |
9 | ||
10 | ---Purpose: The class provides Edge/Face algorithm to determine | |
11 | --- common parts between edge and face in 3-d space. | |
12 | -- Common parts can be : Vertices or Edges. | |
13 | --- | |
14 | ||
15 | uses | |
16 | Pnt from gp, | |
17 | Edge from TopoDS, | |
18 | Face from TopoDS, | |
19 | Curve from BRepAdaptor, | |
20 | Surface from BRepAdaptor, | |
21 | SequenceOfRanges from IntTools, | |
22 | CArray1OfReal from IntTools, | |
23 | CommonPrt from IntTools, | |
24 | FClass2d from IntTools, | |
25 | SequenceOfRoots from IntTools, | |
26 | SequenceOfCommonPrts from IntTools, | |
4f189102 P |
27 | Context from IntTools, |
28 | Range from IntTools | |
29 | ||
7fd59977 | 30 | --raises |
31 | ||
32 | is | |
33 | Create | |
34 | returns EdgeFace from IntTools; | |
35 | ---Purpose: | |
36 | --- Empty Constructor | |
37 | --- | |
38 | ||
39 | SetEdge (me:out; anEdge:Edge from TopoDS); | |
40 | ---Purpose: | |
41 | --- Initializes algorithm by the edge anEdge | |
42 | --- | |
43 | ||
44 | SetTolE (me:out; aTolEdge1:Real from Standard); | |
45 | ---Purpose: | |
46 | --- Initializes algorithm by edge tolerance | |
47 | --- | |
48 | ||
49 | SetFace (me:out; aFace:Face from TopoDS); | |
50 | ---Purpose: | |
51 | --- Initializes algorithm by the face aFace | |
52 | --- | |
53 | ||
54 | SetTolF (me:out; aTolFace:Real from Standard); | |
55 | ---Purpose: | |
56 | --- Initializes algorithm by face tolerance | |
57 | --- | |
58 | ||
59 | SetDiscretize (me:out; aDiscret:Integer from Standard); | |
60 | ---Purpose: | |
61 | --- Initializes algorithm by discretization value | |
62 | --- | |
63 | ||
64 | SetDeflection (me:out; aDeflection:Real from Standard); | |
65 | ---Purpose: | |
66 | --- Initializes algorithm by deflection value | |
67 | --- | |
68 | ||
69 | SetEpsilonT (me:out; anEpsT:Real from Standard); | |
70 | ---Purpose: | |
71 | --- Initializes algorithm by parameter tolerance | |
72 | --- | |
73 | ||
74 | SetEpsilonNull (me:out; anEpsNull:Real from Standard); | |
75 | ---Purpose: | |
76 | --- Initializes algorithm by distance tolerance | |
77 | --- | |
78 | ||
79 | SetRange (me:out; aRange:Range from IntTools); | |
80 | ---Purpose: | |
81 | --- Sets boundaries for edge. | |
82 | --- The algorithm processes edge inside these boundaries. | |
83 | --- | |
84 | ||
85 | SetRange (me:out; aFirst, aLast:Real from Standard); | |
86 | ---Purpose: | |
87 | --- Sets boundaries for edge. | |
88 | --- The algorithm processes edge inside these boundaries. | |
89 | --- | |
90 | ||
4f189102 P |
91 | SetContext (me: in out; |
92 | theContext: Context from IntTools); | |
7fd59977 | 93 | ---Purpose: |
4f189102 | 94 | --- Sets the intersecton context |
7fd59977 | 95 | --- |
4f189102 P |
96 | |
97 | Context (me) | |
98 | returns Context from IntTools; | |
99 | ---C++:return const & | |
100 | ---Purpose: | |
101 | --- Gets the intersecton context | |
102 | --- | |
103 | ||
7fd59977 | 104 | Perform (me:out); |
105 | ---Purpose: | |
106 | --- Launches the process | |
107 | --- | |
108 | ||
109 | IsDone (me) | |
110 | returns Boolean from Standard; | |
111 | ---Purpose: | |
112 | --- Returns true if computation was done | |
113 | --- successfully, otherwise returns false | |
114 | --- | |
115 | ||
116 | ErrorStatus(me) | |
117 | returns Integer from Standard; | |
118 | ---Purpose: | |
119 | --- Returns code of completion | |
120 | --- 0 - means successful completion | |
121 | --- 1 - the process was not started | |
122 | --- 2,3,4,5 - invalid source data for the algorithm | |
123 | --- 6 - discretization failed | |
124 | --- 7 - no projectable ranges found | |
125 | --- 11 - distance computing error | |
126 | --- | |
127 | ||
128 | CommonParts(me) | |
129 | returns SequenceOfCommonPrts from IntTools; | |
130 | ---C++: return const& | |
131 | ---Purpose: | |
132 | --- Returns results | |
133 | --- | |
134 | ||
135 | Range (me) | |
136 | returns Range from IntTools; | |
137 | ---C++: return const& | |
138 | ---Purpose: | |
139 | --- Returns boundaries for edge | |
140 | --- | |
141 | ||
142 | -- | |
143 | IsEqDistance(myclass; | |
144 | aP: Pnt from gp; | |
145 | aS: Surface from BRepAdaptor; | |
146 | aT: Real from Standard; | |
147 | aD:out Real from Standard) | |
148 | returns Boolean from Standard; | |
149 | ---Purpose: | |
150 | --- | |
151 | --- | |
152 | -- | |
153 | ||
154 | ----------------------------------------------------- | |
155 | -- Block of private methods of the algorithm -- | |
156 | ----------------------------------------------------- | |
157 | ||
158 | CheckData (me:out) is private; | |
159 | ||
160 | Prepare (me:out) is private; | |
161 | ||
162 | IsProjectable (me; t:Real from Standard) | |
163 | returns Boolean from Standard | |
164 | is private; | |
165 | ||
166 | FindProjectableRoot (me:out; | |
167 | t1,t2:Real from Standard; | |
168 | f1,f2:Integer from Standard; | |
169 | tRoot:out Real from Standard) | |
170 | is private; | |
171 | ||
172 | DistanceFunction (me:out;t:Real from Standard) | |
173 | returns Real from Standard | |
174 | is private; | |
175 | ||
176 | DerivativeFunction (me:out;t:Real from Standard) | |
177 | returns Real from Standard | |
178 | is private; | |
179 | ||
180 | PrepareArgsFuncArrays (me:out;t1,t2:Real from Standard) | |
181 | is private; | |
182 | ||
183 | ||
184 | AddDerivativePoints (me:out; t,f:CArray1OfReal from IntTools) | |
185 | is private; | |
186 | ||
187 | ||
188 | FindSimpleRoot (me:out; IP:Integer from Standard; | |
189 | ta, tb, fA:Real from Standard) | |
190 | returns Real from Standard | |
191 | is private; | |
192 | ||
193 | FindGoldRoot (me:out; ta, tb, coeff:Real from Standard) | |
194 | returns Real from Standard | |
195 | is private; | |
196 | ||
197 | MakeType (me:out; | |
198 | aCP: out CommonPrt from IntTools) | |
199 | returns Integer from Standard | |
200 | is private; | |
201 | ||
202 | ||
203 | IsIntersection (me:out; ta,tb:Real from Standard) | |
204 | is private; | |
205 | ||
206 | FindDerivativeRoot (me:out;t,f:CArray1OfReal from IntTools) | |
207 | is private; | |
208 | ||
209 | -- | |
210 | RemoveIdenticalRoots(me:out) | |
211 | is private; | |
212 | ||
213 | CheckTouch (me: out; | |
214 | aCP: CommonPrt from IntTools; | |
215 | aTX:out Real from Standard) | |
216 | returns Boolean from Standard | |
217 | is private; | |
218 | ||
219 | CheckTouchVertex (me:out; | |
220 | aCP: CommonPrt from IntTools; | |
221 | aTX:out Real from Standard) | |
222 | returns Boolean from Standard | |
223 | is private; | |
224 | -- | |
225 | ||
226 | fields | |
227 | -- Data | |
228 | myEdge : Edge from TopoDS; | |
229 | myFace : Face from TopoDS; | |
230 | myTolE : Real from Standard; | |
231 | myTolF : Real from Standard; | |
232 | ||
233 | myDiscret : Integer from Standard; | |
234 | ||
235 | myEpsT : Real from Standard; | |
236 | myEpsNull : Real from Standard; | |
237 | myDeflection : Real from Standard; | |
238 | ||
239 | -- data curves | |
240 | myC : Curve from BRepAdaptor; | |
241 | myTmin : Real from Standard; | |
242 | myTmax : Real from Standard; | |
243 | ||
244 | myS : Surface from BRepAdaptor; | |
245 | ||
246 | myCriteria : Real from Standard; | |
247 | ||
248 | -- IsDone | |
249 | myIsDone : Boolean from Standard; | |
250 | myErrorStatus : Integer from Standard; | |
251 | ||
252 | --- internal members | |
4f189102 | 253 | myContext : Context from IntTools; |
7fd59977 | 254 | myProjectableRanges: SequenceOfRanges from IntTools; |
255 | myFClass2d : FClass2d from IntTools; | |
256 | myFuncArray : CArray1OfReal from IntTools; | |
257 | myArgsArray : CArray1OfReal from IntTools; | |
258 | mySequenceOfRoots : SequenceOfRoots from IntTools; | |
259 | mySeqOfCommonPrts : SequenceOfCommonPrts from IntTools; | |
260 | ||
261 | myPar1 : Real from Standard; | |
262 | myParallel : Boolean from Standard; | |
263 | myAllNullFlag : Boolean from Standard; | |
264 | ||
265 | myRange : Range from IntTools; | |
266 | ||
267 | end EdgeFace; |