b311480e |
1 | // Created on: 1992-07-27 |
2 | // Created by: Laurent BUCHARD |
3 | // Copyright (c) 1992-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 | |
0797d9d3 |
17 | #ifndef OCCT_DEBUG |
7fd59977 |
18 | #define No_Standard_RangeError |
19 | #define No_Standard_OutOfRange |
20 | #endif |
21 | |
22 | #define CREATE IntAna_IntConicQuad::IntAna_IntConicQuad |
23 | #define PERFORM void IntAna_IntConicQuad::Perform |
24 | |
25 | |
26 | |
27 | #include <IntAna_IntConicQuad.ixx> |
28 | |
29 | #include <IntAna_QuadQuadGeo.hxx> |
30 | |
31 | #include <IntAna2d_AnaIntersection.hxx> |
32 | #include <IntAna2d_IntPoint.hxx> |
33 | #include <IntAna_ResultType.hxx> |
34 | |
35 | #include <gp_Vec.hxx> |
36 | #include <gp_Lin2d.hxx> |
37 | #include <gp_Circ2d.hxx> |
38 | #include <gp_Ax3.hxx> |
39 | |
40 | #include <math_DirectPolynomialRoots.hxx> |
41 | #include <math_TrigonometricFunctionRoots.hxx> |
42 | #include <ElCLib.hxx> |
43 | |
44 | |
c6541a0c |
45 | static Standard_Real PIpPI = M_PI + M_PI; |
7fd59977 |
46 | //============================================================================= |
47 | //== E m p t y C o n s t r u c t o r |
48 | //== |
49 | CREATE(void) { |
50 | done=Standard_False; |
51 | } |
52 | //============================================================================= |
53 | //== L i n e - Q u a d r i c |
54 | //== |
55 | CREATE(const gp_Lin& L,const IntAna_Quadric& Quad) { |
56 | Perform(L,Quad); |
57 | } |
58 | |
59 | PERFORM(const gp_Lin& L,const IntAna_Quadric& Quad) { |
60 | |
61 | Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte; |
62 | done=inquadric=parallel=Standard_False; |
63 | |
64 | //---------------------------------------------------------------------- |
65 | //-- Substitution de x=t Lx + Lx0 ( exprime dans ) |
66 | //-- y=t Ly + Ly0 ( le systeme de coordonnees ) |
67 | //-- z=t Lz + Lz0 ( canonique ) |
68 | //-- |
69 | //-- Dans Qxx x**2 + Qyy y**2 + Qzz z**2 |
70 | //-- + 2 ( Qxy x y + Qxz x z + Qyz y z ) |
71 | //-- + 2 ( Qx x + Qy y + Qz z ) |
72 | //-- + QCte |
73 | //-- |
74 | //-- Done un polynome en t : A2 t**2 + A1 t + A0 avec : |
75 | //---------------------------------------------------------------------- |
76 | |
77 | |
78 | Standard_Real Lx0,Ly0,Lz0,Lx,Ly,Lz; |
79 | |
80 | |
81 | nbpts=0; |
82 | |
83 | L.Direction().Coord(Lx,Ly,Lz); |
84 | L.Location().Coord(Lx0,Ly0,Lz0); |
85 | |
86 | Quad.Coefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte); |
87 | |
88 | Standard_Real A0=(QCte + Qxx*Lx0*Lx0 + Qyy*Ly0*Ly0 + Qzz*Lz0*Lz0 |
89 | + 2.0* ( Lx0*( Qx + Qxy*Ly0 + Qxz*Lz0) |
90 | + Ly0*( Qy + Qyz*Lz0 ) |
91 | + Qz*Lz0 ) |
92 | ); |
93 | |
94 | |
95 | Standard_Real A1=2.0*( Lx*( Qx + Qxx*Lx0 + Qxy*Ly0 + Qxz*Lz0 ) |
96 | +Ly*( Qy + Qxy*Lx0 + Qyy*Ly0 + Qyz*Lz0 ) |
97 | +Lz*( Qz + Qxz*Lx0 + Qyz*Ly0 + Qzz*Lz0 )); |
98 | |
99 | Standard_Real A2=(Qxx*Lx*Lx + Qyy*Ly*Ly + Qzz*Lz*Lz |
100 | + 2.0*( Lx*( Qxy*Ly + Qxz*Lz ) |
101 | + Qyz*Ly*Lz)); |
102 | |
103 | math_DirectPolynomialRoots LinQuadPol(A2,A1,A0); |
104 | |
105 | if( LinQuadPol.IsDone()) { |
106 | done=Standard_True; |
107 | if(LinQuadPol.InfiniteRoots()) { |
108 | inquadric=Standard_True; |
109 | } |
110 | else { |
111 | nbpts= LinQuadPol.NbSolutions(); |
112 | |
113 | for(Standard_Integer i=1 ; i<=nbpts; i++) { |
114 | Standard_Real t= LinQuadPol.Value(i); |
115 | paramonc[i-1] = t; |
116 | pnts[i-1]=gp_Pnt( Lx0+Lx*t |
117 | ,Ly0+Ly*t |
118 | ,Lz0+Lz*t); |
119 | } |
120 | } |
121 | } |
122 | } |
123 | |
124 | //============================================================================= |
125 | //== C i r c l e - Q u a d r i c |
126 | //== |
127 | CREATE(const gp_Circ& C,const IntAna_Quadric& Quad) { |
128 | Perform(C,Quad); |
129 | } |
130 | |
131 | PERFORM(const gp_Circ& C,const IntAna_Quadric& Quad) { |
132 | |
133 | Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte; |
134 | |
135 | //---------------------------------------------------------------------- |
136 | //-- Dans le repere liee a C.Position() : |
137 | //-- xC = R * Cos[t] |
138 | //-- yC = R * Sin[t] |
139 | //-- zC = 0 |
140 | //-- |
141 | //-- On exprime la quadrique dans ce repere et on substitue |
142 | //-- xC,yC et zC a x,y et z |
143 | //-- |
144 | //-- On Obtient un polynome en Cos[t] et Sin[t] de degre 2 |
145 | //---------------------------------------------------------------------- |
146 | done=inquadric=parallel=Standard_False; |
147 | |
148 | Quad.Coefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte); |
149 | Quad.NewCoefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte,C.Position()); |
150 | |
151 | Standard_Real R=C.Radius(); |
152 | Standard_Real RR=R*R; |
153 | |
154 | Standard_Real P_CosCos = RR * Qxx; //-- Cos Cos |
155 | Standard_Real P_SinSin = RR * Qyy; //-- Sin Sin |
156 | Standard_Real P_Sin = R * Qy; //-- 2 Sin |
157 | Standard_Real P_Cos = R * Qx; //-- 2 Cos |
158 | Standard_Real P_CosSin = RR * Qxy; //-- 2 Cos Sin |
159 | Standard_Real P_Cte = QCte; //-- 1 |
160 | |
161 | math_TrigonometricFunctionRoots CircQuadPol( P_CosCos-P_SinSin |
162 | ,P_CosSin |
163 | ,P_Cos+P_Cos |
164 | ,P_Sin+P_Sin |
165 | ,P_Cte+P_SinSin |
166 | ,0.0,PIpPI); |
167 | |
168 | if(CircQuadPol.IsDone()) { |
169 | done=Standard_True; |
170 | if(CircQuadPol.InfiniteRoots()) { |
171 | inquadric=Standard_True; |
172 | } |
173 | else { |
174 | nbpts= CircQuadPol.NbSolutions(); |
175 | |
176 | for(Standard_Integer i=1 ; i<=nbpts; i++) { |
177 | Standard_Real t= CircQuadPol.Value(i); |
178 | paramonc[i-1] = t; |
179 | pnts[i-1] = ElCLib::CircleValue(t,C.Position(),R); |
180 | } |
181 | } |
182 | } |
183 | } |
184 | |
185 | |
186 | //============================================================================= |
187 | //== E l i p s - Q u a d r i c |
188 | //== |
189 | CREATE(const gp_Elips& E,const IntAna_Quadric& Quad) { |
190 | Perform(E,Quad); |
191 | } |
192 | |
193 | PERFORM(const gp_Elips& E,const IntAna_Quadric& Quad) { |
194 | |
195 | Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte; |
196 | |
197 | done=inquadric=parallel=Standard_False; |
198 | |
199 | //---------------------------------------------------------------------- |
200 | //-- Dans le repere liee a E.Position() : |
201 | //-- xE = R * Cos[t] |
202 | //-- yE = r * Sin[t] |
203 | //-- zE = 0 |
204 | //-- |
205 | //-- On exprime la quadrique dans ce repere et on substitue |
206 | //-- xE,yE et zE a x,y et z |
207 | //-- |
208 | //-- On Obtient un polynome en Cos[t] et Sin[t] de degre 2 |
209 | //---------------------------------------------------------------------- |
210 | |
211 | Quad.Coefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte); |
212 | Quad.NewCoefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte,E.Position()); |
213 | |
214 | Standard_Real R=E.MajorRadius(); |
215 | Standard_Real r=E.MinorRadius(); |
216 | |
217 | |
218 | Standard_Real P_CosCos = R*R * Qxx; //-- Cos Cos |
219 | Standard_Real P_SinSin = r*r * Qyy; //-- Sin Sin |
220 | Standard_Real P_Sin = r * Qy; //-- 2 Sin |
221 | Standard_Real P_Cos = R * Qx; //-- 2 Cos |
222 | Standard_Real P_CosSin = R*r * Qxy; //-- 2 Cos Sin |
223 | Standard_Real P_Cte = QCte; //-- 1 |
224 | |
225 | math_TrigonometricFunctionRoots ElipsQuadPol( P_CosCos-P_SinSin |
226 | ,P_CosSin |
227 | ,P_Cos+P_Cos |
228 | ,P_Sin+P_Sin |
229 | ,P_Cte+P_SinSin |
230 | ,0.0,PIpPI); |
231 | |
232 | if(ElipsQuadPol.IsDone()) { |
233 | done=Standard_True; |
234 | if(ElipsQuadPol.InfiniteRoots()) { |
235 | inquadric=Standard_True; |
236 | } |
237 | else { |
238 | nbpts= ElipsQuadPol.NbSolutions(); |
239 | for(Standard_Integer i=1 ; i<=nbpts; i++) { |
240 | Standard_Real t= ElipsQuadPol.Value(i); |
241 | paramonc[i-1] = t; |
242 | pnts[i-1] = ElCLib::EllipseValue(t,E.Position(),R,r); |
243 | } |
244 | } |
245 | } |
246 | } |
247 | |
248 | //============================================================================= |
249 | //== P a r a b - Q u a d r i c |
250 | //== |
251 | CREATE(const gp_Parab& P,const IntAna_Quadric& Quad) { |
252 | Perform(P,Quad); |
253 | } |
254 | |
255 | PERFORM(const gp_Parab& P,const IntAna_Quadric& Quad) { |
256 | |
257 | Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte; |
258 | |
259 | done=inquadric=parallel=Standard_False; |
260 | |
261 | //---------------------------------------------------------------------- |
262 | //-- Dans le repere liee a P.Position() : |
263 | //-- xP = y*y / (2 p) |
264 | //-- yP = y |
265 | //-- zP = 0 |
266 | //-- |
267 | //-- On exprime la quadrique dans ce repere et on substitue |
268 | //-- xP,yP et zP a x,y et z |
269 | //-- |
270 | //-- On Obtient un polynome en y de degre 4 |
271 | //---------------------------------------------------------------------- |
272 | |
273 | Quad.Coefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte); |
274 | Quad.NewCoefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte,P.Position()); |
275 | |
276 | Standard_Real f=P.Focal(); |
277 | Standard_Real Un_Sur_2p = 0.25 / f; |
278 | |
279 | Standard_Real A4 = Qxx * Un_Sur_2p * Un_Sur_2p; |
280 | Standard_Real A3 = (Qxy+Qxy) * Un_Sur_2p; |
281 | Standard_Real A2 = Qyy + (Qx+Qx) * Un_Sur_2p; |
282 | Standard_Real A1 = Qy+Qy; |
283 | Standard_Real A0 = QCte; |
284 | |
285 | math_DirectPolynomialRoots ParabQuadPol(A4,A3,A2,A1,A0); |
286 | |
287 | if( ParabQuadPol.IsDone()) { |
288 | done=Standard_True; |
289 | if(ParabQuadPol.InfiniteRoots()) { |
290 | inquadric=Standard_True; |
291 | } |
292 | else { |
293 | nbpts= ParabQuadPol.NbSolutions(); |
294 | |
295 | for(Standard_Integer i=1 ; i<=nbpts; i++) { |
296 | Standard_Real t= ParabQuadPol.Value(i); |
297 | paramonc[i-1] = t; |
298 | pnts[i-1] = ElCLib::ParabolaValue(t,P.Position(),f); |
299 | } |
300 | } |
301 | } |
302 | } |
303 | |
304 | //============================================================================= |
305 | //== H y p r - Q u a d r i c |
306 | //== |
307 | CREATE(const gp_Hypr& H,const IntAna_Quadric& Quad) { |
308 | Perform(H,Quad); |
309 | } |
310 | |
311 | PERFORM(const gp_Hypr& H,const IntAna_Quadric& Quad) { |
312 | |
313 | Standard_Real Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte; |
314 | |
315 | done=inquadric=parallel=Standard_False; |
316 | |
317 | //---------------------------------------------------------------------- |
318 | //-- Dans le repere liee a P.Position() : |
319 | //-- xH = R Ch[t] |
320 | //-- yH = r Sh[t] |
321 | //-- zH = 0 |
322 | //-- |
323 | //-- On exprime la quadrique dans ce repere et on substitue |
324 | //-- xP,yP et zP a x,y et z |
325 | //-- |
326 | //-- On Obtient un polynome en Exp[t] de degre 4 |
327 | //---------------------------------------------------------------------- |
328 | |
329 | Quad.Coefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte); |
330 | Quad.NewCoefficients(Qxx,Qyy,Qzz,Qxy,Qxz,Qyz,Qx,Qy,Qz,QCte,H.Position()); |
331 | |
332 | Standard_Real R=H.MajorRadius(); |
333 | Standard_Real r=H.MinorRadius(); |
334 | |
335 | Standard_Real RR=R*R; |
336 | Standard_Real rr=r*r; |
337 | Standard_Real Rr=R*r; |
338 | |
339 | Standard_Real A4 = RR * Qxx + Rr* ( Qxy + Qxy ) + rr * Qyy; |
340 | Standard_Real A3 = 4.0* ( R*Qx + r*Qy ); |
341 | Standard_Real A2 = 2.0* ( (QCte+QCte) + Qxx*RR - Qyy*rr ); |
342 | Standard_Real A1 = 4.0* ( R*Qx - r*Qy); |
343 | Standard_Real A0 = Qxx*RR - Rr*(Qxy+Qxy) + Qyy*rr; |
344 | |
345 | math_DirectPolynomialRoots HyperQuadPol(A4,A3,A2,A1,A0); |
346 | |
347 | if( HyperQuadPol.IsDone()) { |
348 | done=Standard_True; |
349 | if(HyperQuadPol.InfiniteRoots()) { |
350 | inquadric=Standard_True; |
351 | } |
352 | else { |
353 | nbpts= HyperQuadPol.NbSolutions(); |
354 | Standard_Integer bonnessolutions = 0; |
355 | for(Standard_Integer i=1 ; i<=nbpts; i++) { |
356 | Standard_Real t= HyperQuadPol.Value(i); |
357 | if(t>=RealEpsilon()) { |
358 | Standard_Real Lnt = Log(t); |
359 | paramonc[bonnessolutions] = Lnt; |
360 | pnts[bonnessolutions] = ElCLib::HyperbolaValue(Lnt,H.Position(),R,r); |
361 | bonnessolutions++; |
362 | } |
363 | } |
364 | nbpts=bonnessolutions; |
365 | } |
366 | } |
367 | } |
368 | //============================================================================= |
369 | |
370 | |
371 | |
372 | |
373 | IntAna_IntConicQuad::IntAna_IntConicQuad (const gp_Lin& L, const gp_Pln& P, |
04cbc9d3 |
374 | const Standard_Real Tolang, |
375 | const Standard_Real Tol, |
376 | const Standard_Real Len) { |
377 | Perform(L,P,Tolang,Tol,Len); |
7fd59977 |
378 | } |
379 | |
380 | |
381 | IntAna_IntConicQuad::IntAna_IntConicQuad (const gp_Circ& C, const gp_Pln& P, |
382 | const Standard_Real Tolang, |
383 | const Standard_Real Tol) { |
384 | Perform(C,P,Tolang,Tol); |
385 | } |
386 | |
387 | |
388 | IntAna_IntConicQuad::IntAna_IntConicQuad (const gp_Elips& E, const gp_Pln& P, |
389 | const Standard_Real Tolang, |
390 | const Standard_Real Tol) { |
391 | Perform(E,P,Tolang,Tol); |
392 | } |
393 | |
394 | |
395 | IntAna_IntConicQuad::IntAna_IntConicQuad (const gp_Parab& Pb, const gp_Pln& P, |
396 | const Standard_Real Tolang){ |
397 | Perform(Pb,P,Tolang); |
398 | } |
399 | |
400 | |
401 | IntAna_IntConicQuad::IntAna_IntConicQuad (const gp_Hypr& H, const gp_Pln& P, |
402 | const Standard_Real Tolang){ |
403 | Perform(H,P,Tolang); |
404 | } |
405 | |
406 | |
407 | void IntAna_IntConicQuad::Perform (const gp_Lin& L, const gp_Pln& P, |
04cbc9d3 |
408 | const Standard_Real Tolang, |
409 | const Standard_Real Tol, |
410 | const Standard_Real Len) { |
7fd59977 |
411 | |
412 | // Tolang represente la tolerance angulaire a partir de laquelle on considere |
413 | // que l angle entre 2 vecteurs est nul. On raisonnera sur le cosinus de cet |
414 | // angle, (on a Cos(t) equivalent a t au voisinage de Pi/2). |
415 | |
416 | done=Standard_False; |
417 | |
418 | Standard_Real A,B,C,D; |
419 | Standard_Real Al,Bl,Cl; |
420 | Standard_Real Dis,Direc; |
421 | |
422 | P.Coefficients(A,B,C,D); |
423 | gp_Pnt Orig(L.Location()); |
424 | L.Direction().Coord(Al,Bl,Cl); |
425 | |
426 | Direc=A*Al+B*Bl+C*Cl; |
427 | Dis = A*Orig.X() + B*Orig.Y() + C*Orig.Z() + D; |
04cbc9d3 |
428 | // |
429 | parallel=Standard_False; |
7fd59977 |
430 | if (Abs(Direc) < Tolang) { |
04cbc9d3 |
431 | parallel=Standard_True; |
432 | if (Len!=0 && Direc!=0) { |
433 | //check the distance from bounding point of the line to the plane |
434 | gp_Pnt aP1, aP2; |
435 | // |
436 | aP1.SetCoord(Orig.X()-Dis*A, Orig.Y()-Dis*B, Orig.Z()-Dis*C); |
437 | aP2.SetCoord(aP1.X()+Len*Al, aP1.Y()+Len*Bl, aP1.Z()+Len*Cl); |
438 | if (P.Distance(aP2) > Tol) { |
439 | parallel=Standard_False; |
440 | } |
441 | } |
442 | } |
443 | if (parallel) { |
7fd59977 |
444 | if (Abs(Dis) < Tolang) { |
445 | inquadric=Standard_True; |
446 | } |
447 | else { |
448 | inquadric=Standard_False; |
449 | } |
450 | } |
451 | else { |
452 | parallel=Standard_False; |
453 | inquadric=Standard_False; |
454 | nbpts = 1; |
455 | paramonc [0] = - Dis/Direc; |
04cbc9d3 |
456 | pnts[0].SetCoord(Orig.X()+paramonc[0]*Al, |
457 | Orig.Y()+paramonc[0]*Bl, |
458 | Orig.Z()+paramonc[0]*Cl); |
7fd59977 |
459 | } |
460 | done=Standard_True; |
461 | } |
462 | |
463 | |
464 | void IntAna_IntConicQuad::Perform (const gp_Circ& C, const gp_Pln& P, |
465 | const Standard_Real Tolang, |
466 | const Standard_Real Tol) |
467 | { |
468 | |
469 | done=Standard_False; |
470 | |
471 | gp_Pln Plconic(gp_Ax3(C.Position())); |
472 | IntAna_QuadQuadGeo IntP(Plconic,P,Tolang,Tol); |
473 | if (!IntP.IsDone()) {return;} |
474 | if (IntP.TypeInter() == IntAna_Empty) { |
475 | parallel=Standard_True; |
476 | Standard_Real distmax = P.Distance(C.Location()) + C.Radius()*Tolang; |
477 | if (distmax < Tol) { |
478 | inquadric = Standard_True; |
479 | } |
480 | else { |
481 | inquadric = Standard_False; |
482 | } |
483 | done=Standard_True; |
484 | } |
485 | else if(IntP.TypeInter() == IntAna_Same) { |
486 | inquadric = Standard_True; |
487 | done = Standard_True; |
488 | } |
489 | else { |
490 | inquadric=Standard_False; |
491 | parallel=Standard_False; |
492 | gp_Lin Ligsol(IntP.Line(1)); |
493 | |
494 | gp_Vec V0(Plconic.Location(),Ligsol.Location()); |
495 | gp_Vec Axex(Plconic.Position().XDirection()); |
496 | gp_Vec Axey(Plconic.Position().YDirection()); |
497 | |
498 | gp_Pnt2d Orig(Axex.Dot(V0),Axey.Dot(V0)); |
499 | gp_Vec2d Dire(Axex.Dot(Ligsol.Direction()), |
500 | Axey.Dot(Ligsol.Direction())); |
501 | |
502 | gp_Lin2d Ligs(Orig,Dire); |
503 | gp_Pnt2d Pnt2dBid(0.0,0.0); |
504 | gp_Dir2d Dir2dBid(1.0,0.0); |
505 | gp_Ax2d Ax2dBid(Pnt2dBid,Dir2dBid); |
506 | gp_Circ2d Cir(Ax2dBid,C.Radius()); |
507 | |
508 | IntAna2d_AnaIntersection Int2d(Ligs,Cir); |
509 | |
510 | if (!Int2d.IsDone()) {return;} |
511 | |
512 | nbpts=Int2d.NbPoints(); |
513 | for (Standard_Integer i=1; i<=nbpts; i++) { |
514 | |
515 | gp_Pnt2d resul(Int2d.Point(i).Value()); |
516 | Standard_Real X= resul.X(); |
517 | Standard_Real Y= resul.Y(); |
518 | pnts[i-1].SetCoord(Plconic.Location().X() + X*Axex.X() + Y*Axey.X(), |
519 | Plconic.Location().Y() + X*Axex.Y() + Y*Axey.Y(), |
520 | Plconic.Location().Z() + X*Axex.Z() + Y*Axey.Z()); |
521 | paramonc[i-1]=Int2d.Point(i).ParamOnSecond(); |
522 | } |
523 | done=Standard_True; |
524 | } |
525 | } |
526 | |
527 | |
528 | void IntAna_IntConicQuad::Perform (const gp_Elips& E, const gp_Pln& Pln, |
529 | const Standard_Real, |
530 | const Standard_Real){ |
531 | Perform(E,Pln); |
532 | } |
533 | |
534 | |
535 | void IntAna_IntConicQuad::Perform (const gp_Parab& P, const gp_Pln& Pln, |
536 | const Standard_Real){ |
537 | Perform(P,Pln); |
538 | } |
539 | |
540 | |
541 | void IntAna_IntConicQuad::Perform (const gp_Hypr& H, const gp_Pln& Pln, |
542 | const Standard_Real){ |
543 | Perform(H,Pln); |
544 | } |
545 | |
546 | |