1 // File GccGeo_Circ2dTanOnRad.cxx, REG 19/07/91
3 //========================================================================
4 // circulaire tangent a un element de type : - Cercle. +
7 // centre sur un deuxieme element de type : - Cercle. +
9 // de rayon donne : Radius. +
10 //========================================================================
13 #include <math_DirectPolynomialRoots.hxx>
14 #include <TColStd_Array1OfReal.hxx>
15 #include <Standard_NegativeValue.hxx>
16 #include <gp_Dir2d.hxx>
17 #include <Standard_OutOfRange.hxx>
18 #include <StdFail_NotDone.hxx>
19 #include <GccEnt_BadQualifier.hxx>
20 #include <IntRes2d_Domain.hxx>
21 #include <IntRes2d_IntersectionPoint.hxx>
23 //=========================================================================
24 // Cercle tangent : a un cercle Qualified1 (C1). +
25 // centre : sur une droite OnLine. +
26 // de rayon : Radius. +
28 // On initialise le tableau de solutions cirsol ainsi que tous les +
30 // On elimine en fonction du qualifieur les cas ne presentant pas de +
32 // On resoud l equation du second degre indiquant que le point de centre +
33 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
34 // sur la droite OnLine. +
35 // Les solutions sont representees par les cercles : +
36 // - de centre Pntcen(xc,yc) +
37 // - de rayon Radius. +
38 //=========================================================================
40 GccGeo_Circ2dTanOnRad::
41 GccGeo_Circ2dTanOnRad (const TheQCurve& Qualified1,
42 const gp_Lin2d& OnLine ,
43 const Standard_Real Radius ,
44 const Standard_Real Tolerance ):
46 //=========================================================================
47 // Initialisation des champs. +
48 //=========================================================================
60 //=========================================================================
62 //=========================================================================
64 gp_Dir2d dirx(1.0,0.0);
65 Standard_Real Tol = Abs(Tolerance);
66 Standard_Real thefirst = -100000.;
67 Standard_Real thelast = 100000.;
68 Standard_Real firstparam;
69 Standard_Real lastparam;
70 WellDone = Standard_False;
72 if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() ||
73 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
74 GccEnt_BadQualifier::Raise();
77 Standard_Integer nbrcote1 = 0;
78 TColStd_Array1OfReal Coef(1,2);
79 TheCurve Cu1 = Qualified1.Qualified();
81 if (Radius < 0.0) { Standard_NegativeValue::Raise(); }
83 if (Qualified1.IsEnclosed()) {
84 // ===========================
88 else if(Qualified1.IsOutside()) {
89 // ===============================
93 else if(Qualified1.IsUnqualified()) {
94 // ===================================
100 TheIntConicCurve Intp;
101 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
102 Handle(TheHParGenCurve) HCu1 = new TheHParGenCurve(Cu1);
103 TheParGenCurve C2(HCu1,Coef(jcote1));
104 firstparam = Max(TheCurvePGTool::FirstParameter(C2),thefirst);
105 lastparam = Min(TheCurvePGTool::LastParameter(C2),thelast);
106 IntRes2d_Domain D2(TheCurvePGTool::Value(C2,firstparam),firstparam,Tol,
107 TheCurvePGTool::Value(C2,lastparam),lastparam,Tol);
108 Intp.Perform(OnLine,D1,C2,D2,Tol,Tol);
110 if (!Intp.IsEmpty()) {
111 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
113 gp_Pnt2d Center(Intp.Point(i).Value());
114 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
115 // =======================================================
116 qualifier1(NbrSol) = Qualified1.Qualifier();
117 TheSame1(NbrSol) = 0;
118 pararg1(NbrSol) = Intp.Point(i).ParamOnSecond();
119 parcen3(NbrSol) = Intp.Point(i).ParamOnFirst();
120 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
122 pnttg1sol(NbrSol) = gp_Pnt2d(TheTool::Value(Cu1,pararg1(NbrSol)));
123 pntcen3(NbrSol) = Center;
126 WellDone = Standard_True;
132 //=========================================================================
133 // Cercle tangent : a un cercle Qualified1 (C1). +
134 // centre : sur une droite OnLine. +
135 // de rayon : Radius. +
137 // On initialise le tableau de solutions cirsol ainsi que tous les +
139 // On elimine en fonction du qualifieur les cas ne presentant pas de +
141 // On resoud l equation du second degre indiquant que le point de centre +
142 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
143 // sur la droite OnLine. +
144 // Les solutions sont representees par les cercles : +
145 // - de centre Pntcen(xc,yc) +
146 // - de rayon Radius. +
147 //=========================================================================
149 GccGeo_Circ2dTanOnRad::
150 GccGeo_Circ2dTanOnRad (const TheQCurve& Qualified1,
151 const gp_Circ2d& OnCirc ,
152 const Standard_Real Radius ,
153 const Standard_Real Tolerance ):
155 //=========================================================================
156 // Initialisation des champs. +
157 //=========================================================================
169 //=========================================================================
171 //=========================================================================
173 gp_Dir2d dirx(1.0,0.0);
174 Standard_Real thefirst = -100000.;
175 Standard_Real thelast = 100000.;
176 Standard_Real firstparam;
177 Standard_Real lastparam;
178 Standard_Real Tol = Abs(Tolerance);
179 Standard_Integer nbrcote1=0;
180 WellDone = Standard_False;
182 if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() ||
183 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
184 GccEnt_BadQualifier::Raise();
187 TColStd_Array1OfReal cote1(1,2);
188 TheCurve Cu1 = Qualified1.Qualified();
191 Standard_NegativeValue::Raise();
194 if (Qualified1.IsEnclosed()) {
195 // ===========================
199 else if(Qualified1.IsOutside()) {
200 // ===============================
204 else if(Qualified1.IsUnqualified()) {
205 // ===================================
210 IntRes2d_Domain D1(ElCLib::Value(0.,OnCirc), 0.,Tol,
211 ElCLib::Value(2.*M_PI,OnCirc),2.*M_PI,Tol);
212 D1.SetEquivalentParameters(0.,2.*M_PI);
213 TheIntConicCurve Intp;
214 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
215 Handle(TheHParGenCurve) HCu1 = new TheHParGenCurve(Cu1);
216 TheParGenCurve C2(HCu1,cote1(jcote1));
217 firstparam = Max(TheCurvePGTool::FirstParameter(C2),thefirst);
218 lastparam = Min(TheCurvePGTool::LastParameter(C2),thelast);
219 IntRes2d_Domain D2(TheCurvePGTool::Value(C2,firstparam),firstparam,Tol,
220 TheCurvePGTool::Value(C2,lastparam),lastparam,Tol);
221 Intp.Perform(OnCirc,D1,C2,D2,Tol,Tol);
223 if (!Intp.IsEmpty()) {
224 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
226 gp_Pnt2d Center(Intp.Point(i).Value());
227 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
228 // =======================================================
229 qualifier1(NbrSol) = Qualified1.Qualifier();
230 TheSame1(NbrSol) = 0;
231 pararg1(NbrSol) = Intp.Point(i).ParamOnSecond();
232 parcen3(NbrSol) = Intp.Point(i).ParamOnFirst();
233 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
235 pnttg1sol(NbrSol) = gp_Pnt2d(TheTool::Value(Cu1,pararg1(NbrSol)));
236 pntcen3(NbrSol) = Center;
239 WellDone = Standard_True;
245 //=========================================================================
246 // Cercle tangent : a un cercle Qualified1 (C1). +
247 // centre : sur une droite OnLine. +
248 // de rayon : Radius. +
250 // On initialise le tableau de solutions cirsol ainsi que tous les +
252 // On elimine en fonction du qualifieur les cas ne presentant pas de +
254 // On resoud l equation du second degre indiquant que le point de centre +
255 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
256 // sur la droite OnLine. +
257 // Les solutions sont representees par les cercles : +
258 // - de centre Pntcen(xc,yc) +
259 // - de rayon Radius. +
260 //=========================================================================
262 GccGeo_Circ2dTanOnRad::
263 GccGeo_Circ2dTanOnRad (const GccEnt_QualifiedCirc& Qualified1,
264 const TheCurve& OnCurv ,
265 const Standard_Real Radius ,
266 const Standard_Real Tolerance ):
268 //=========================================================================
269 // Initialisation des champs. +
270 //=========================================================================
282 //=========================================================================
284 //=========================================================================
286 gp_Dir2d dirx(1.0,0.0);
287 Standard_Real thefirst = -100000.;
288 Standard_Real thelast = 100000.;
289 Standard_Real firstparam;
290 Standard_Real lastparam;
291 Standard_Real Tol = Abs(Tolerance);
292 Standard_Integer nbrcote1=0;
293 WellDone = Standard_False;
295 if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() ||
296 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
297 GccEnt_BadQualifier::Raise();
300 TColStd_Array1OfReal cote1(1,2);
301 gp_Circ2d C1 = Qualified1.Qualified();
302 gp_Pnt2d center1(C1.Location());
303 Standard_Real R1 = C1.Radius();
306 Standard_NegativeValue::Raise();
309 if (Qualified1.IsEnclosed()) {
310 // ===========================
314 else if(Qualified1.IsOutside()) {
315 // ===============================
319 else if(Qualified1.IsUnqualified()) {
320 // ===================================
325 TheIntConicCurve Intp;
326 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
327 gp_Circ2d Circ(C1.XAxis(),R1 + cote1(jcote1));
328 IntRes2d_Domain D1(ElCLib::Value(0.,Circ), 0.,Tol,
329 ElCLib::Value(2.*M_PI,Circ),2.*M_PI,Tol);
330 D1.SetEquivalentParameters(0.,2.*M_PI);
331 firstparam = Max(TheTool::FirstParameter(OnCurv),thefirst);
332 lastparam = Min(TheTool::LastParameter(OnCurv),thelast);
333 IntRes2d_Domain D2(TheTool::Value(OnCurv,firstparam),firstparam,Tol,
334 TheTool::Value(OnCurv,lastparam),lastparam,Tol);
335 Intp.Perform(Circ,D1,OnCurv,D2,Tol,Tol);
337 if (!Intp.IsEmpty()) {
338 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
340 gp_Pnt2d Center(Intp.Point(i).Value());
341 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
342 // =======================================================
343 Standard_Real distcc1 = Center.Distance(center1);
344 if (!Qualified1.IsUnqualified()) {
345 qualifier1(NbrSol) = Qualified1.Qualifier();
347 else if (Abs(distcc1+Radius-R1) < Tol) {
348 qualifier1(NbrSol) = GccEnt_enclosed;
350 else if (Abs(distcc1-R1-Radius) < Tol) {
351 qualifier1(NbrSol) = GccEnt_outside;
353 else { qualifier1(NbrSol) = GccEnt_enclosing; }
354 TheSame1(NbrSol) = 0;
355 pararg1(NbrSol) = Intp.Point(i).ParamOnFirst();
356 parcen3(NbrSol) = Intp.Point(i).ParamOnSecond();
357 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
359 pnttg1sol(NbrSol) = ElCLib::Value(pararg1(NbrSol),C1);
360 pntcen3(NbrSol) = Center;
363 WellDone = Standard_True;
369 //=========================================================================
370 // Cercle tangent : a un cercle Qualified1 (C1). +
371 // centre : sur une droite OnLine. +
372 // de rayon : Radius. +
374 // On initialise le tableau de solutions cirsol ainsi que tous les +
376 // On elimine en fonction du qualifieur les cas ne presentant pas de +
378 // On resoud l equation du second degre indiquant que le point de centre +
379 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
380 // sur la droite OnLine. +
381 // Les solutions sont representees par les cercles : +
382 // - de centre Pntcen(xc,yc) +
383 // - de rayon Radius. +
384 //=========================================================================
386 GccGeo_Circ2dTanOnRad::
387 GccGeo_Circ2dTanOnRad (const GccEnt_QualifiedLin& Qualified1,
388 const TheCurve& OnCurv ,
389 const Standard_Real Radius ,
390 const Standard_Real Tolerance ):
392 //=========================================================================
393 // Initialisation des champs. +
394 //=========================================================================
406 //=========================================================================
408 //=========================================================================
410 gp_Dir2d dirx(1.0,0.0);
411 Standard_Real thefirst = -100000.;
412 Standard_Real thelast = 100000.;
413 Standard_Real firstparam;
414 Standard_Real lastparam;
415 Standard_Real Tol = Abs(Tolerance);
416 WellDone = Standard_False;
418 if (!(Qualified1.IsEnclosed() ||
419 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
420 GccEnt_BadQualifier::Raise();
423 Standard_Integer nbrcote1=0;
424 TColStd_Array1OfReal cote1(1,2);
425 gp_Lin2d L1 = Qualified1.Qualified();
426 gp_Pnt2d origin1(L1.Location());
427 gp_Dir2d dir1(L1.Direction());
428 gp_Dir2d norm1(-dir1.Y(),dir1.X());
431 Standard_NegativeValue::Raise();
434 if (Qualified1.IsEnclosed()) {
435 // ===========================
439 else if(Qualified1.IsOutside()) {
440 // ===============================
444 else if(Qualified1.IsUnqualified()) {
445 // ===================================
450 TheIntConicCurve Intp;
451 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
452 gp_Pnt2d Point(dir1.XY()+cote1(jcote1)*norm1.XY());
453 gp_Lin2d Line(Point,dir1); // ligne avec deport.
455 firstparam = Max(TheTool::FirstParameter(OnCurv),thefirst);
456 lastparam = Min(TheTool::LastParameter(OnCurv),thelast);
457 IntRes2d_Domain D2(TheTool::Value(OnCurv,firstparam),firstparam,Tol,
458 TheTool::Value(OnCurv,lastparam),lastparam,Tol);
459 Intp.Perform(Line,D1,OnCurv,D2,Tol,Tol);
461 if (!Intp.IsEmpty()) {
462 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
464 gp_Pnt2d Center(Intp.Point(i).Value());
465 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
466 // =======================================================
467 gp_Dir2d dc1(origin1.XY()-Center.XY());
468 if (!Qualified1.IsUnqualified()) {
469 qualifier1(NbrSol) = Qualified1.Qualifier();
471 else if (dc1.Dot(norm1) > 0.0) {
472 qualifier1(NbrSol) = GccEnt_outside;
474 else { qualifier1(NbrSol) = GccEnt_enclosed; }
475 TheSame1(NbrSol) = 0;
476 pararg1(NbrSol) = Intp.Point(i).ParamOnFirst();
477 parcen3(NbrSol) = Intp.Point(i).ParamOnSecond();
478 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
480 pnttg1sol(NbrSol) = ElCLib::Value(pararg1(NbrSol),L1);
481 pntcen3(NbrSol) = Center;
484 WellDone = Standard_True;
490 //=========================================================================
491 // Cercle tangent : a un cercle Qualified1 (C1). +
492 // centre : sur une droite OnLine. +
493 // de rayon : Radius. +
495 // On initialise le tableau de solutions cirsol ainsi que tous les +
497 // On elimine en fonction du qualifieur les cas ne presentant pas de +
499 // On resoud l equation du second degre indiquant que le point de centre +
500 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
501 // sur la droite OnLine. +
502 // Les solutions sont representees par les cercles : +
503 // - de centre Pntcen(xc,yc) +
504 // - de rayon Radius. +
505 //=========================================================================
507 GccGeo_Circ2dTanOnRad::
508 GccGeo_Circ2dTanOnRad (const TheQCurve& Qualified1,
509 const TheCurve& OnCurv ,
510 const Standard_Real Radius ,
511 const Standard_Real Tolerance ):
513 //=========================================================================
514 // Initialisation des champs. +
515 //=========================================================================
527 //=========================================================================
529 //=========================================================================
531 gp_Dir2d dirx(1.0,0.0);
532 Standard_Real thefirst = -100000.;
533 Standard_Real thelast = 100000.;
534 Standard_Real firstparam;
535 Standard_Real lastparam;
536 Standard_Real Tol = Abs(Tolerance);
537 Standard_Integer nbrcote1=0;
538 WellDone = Standard_False;
540 if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() ||
541 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
542 GccEnt_BadQualifier::Raise();
545 TColStd_Array1OfReal cote1(1,2);
546 TheCurve Cu1 = Qualified1.Qualified();
549 Standard_NegativeValue::Raise();
552 if (Qualified1.IsEnclosed()) {
553 // ===========================
557 else if(Qualified1.IsOutside()) {
558 // ===============================
562 else if(Qualified1.IsUnqualified()) {
563 // ===================================
568 TheIntCurveCurve Intp;
569 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
570 Handle(TheHParGenCurve) HCu1 = new TheHParGenCurve(Cu1);
571 TheParGenCurve C1(HCu1,cote1(jcote1));
572 firstparam = Max(TheCurvePGTool::FirstParameter(C1),thefirst);
573 lastparam = Min(TheCurvePGTool::LastParameter(C1),thelast);
574 IntRes2d_Domain D1(TheCurvePGTool::Value(C1,firstparam),firstparam,Tol,
575 TheCurvePGTool::Value(C1,lastparam),lastparam,Tol);
576 Handle(TheHParGenCurve) HOnCurv = new TheHParGenCurve(OnCurv);
577 TheParGenCurve C2(HOnCurv);
578 firstparam = Max(TheCurvePGTool::FirstParameter(C2),thefirst);
579 lastparam = Min(TheCurvePGTool::LastParameter(C2),thelast);
580 IntRes2d_Domain D2(TheCurvePGTool::Value(C2,firstparam),firstparam,Tol,
581 TheCurvePGTool::Value(C2,lastparam),lastparam,Tol);
582 Intp.Perform(C1,D1,C2,D2,Tol,Tol);
584 if (!Intp.IsEmpty()) {
585 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
587 gp_Pnt2d Center(Intp.Point(i).Value());
588 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
589 // =======================================================
590 qualifier1(NbrSol) = Qualified1.Qualifier();
591 TheSame1(NbrSol) = 0;
592 pararg1(NbrSol) = Intp.Point(i).ParamOnFirst();
593 parcen3(NbrSol) = Intp.Point(i).ParamOnSecond();
594 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
596 pnttg1sol(NbrSol) = gp_Pnt2d(TheTool::Value(Cu1,pararg1(NbrSol)));
597 pntcen3(NbrSol) = Center;
600 WellDone = Standard_True;
606 //=========================================================================
607 // Cercle tangent : a un cercle Qualified1 (C1). +
608 // centre : sur une droite OnLine. +
609 // de rayon : Radius. +
611 // On initialise le tableau de solutions cirsol ainsi que tous les +
613 // On elimine en fonction du qualifieur les cas ne presentant pas de +
615 // On resoud l equation du second degre indiquant que le point de centre +
616 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
617 // sur la droite OnLine. +
618 // Les solutions sont representees par les cercles : +
619 // - de centre Pntcen(xc,yc) +
620 // - de rayon Radius. +
621 //=========================================================================
623 GccGeo_Circ2dTanOnRad::
624 GccGeo_Circ2dTanOnRad (const gp_Pnt2d& Point1 ,
625 const TheCurve& OnCurv ,
626 const Standard_Real Radius ,
627 const Standard_Real Tolerance ):
629 //=========================================================================
630 // Initialisation des champs. +
631 //=========================================================================
643 //=========================================================================
645 //=========================================================================
647 gp_Dir2d dirx(1.0,0.0);
648 Standard_Real thefirst = -100000.;
649 Standard_Real thelast = 100000.;
650 Standard_Real firstparam;
651 Standard_Real lastparam;
652 Standard_Real Tol = Abs(Tolerance);
653 WellDone = Standard_False;
657 Standard_NegativeValue::Raise();
660 // gp_Dir2d Dir(-y1dir,x1dir);
661 gp_Circ2d Circ(gp_Ax2d(Point1,gp_Dir2d(1.,0.)),Radius);
662 IntRes2d_Domain D1(ElCLib::Value(0.,Circ), 0.,Tol,
663 ElCLib::Value(2.*M_PI,Circ),2*M_PI,Tol);
664 D1.SetEquivalentParameters(0.,2.*M_PI);
665 firstparam = Max(TheTool::FirstParameter(OnCurv),thefirst);
666 lastparam = Min(TheTool::LastParameter(OnCurv),thelast);
667 IntRes2d_Domain D2(TheTool::Value(OnCurv,firstparam),firstparam,Tol,
668 TheTool::Value(OnCurv,lastparam),lastparam,Tol);
669 TheIntConicCurve Intp(Circ,D1,OnCurv,D2,Tol,Tol);
671 if (!Intp.IsEmpty()) {
672 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
674 gp_Pnt2d Center(Intp.Point(i).Value());
675 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
676 // =======================================================
677 qualifier1(NbrSol) = GccEnt_noqualifier;
678 TheSame1(NbrSol) = 0;
679 pararg1(NbrSol) = Intp.Point(i).ParamOnFirst();
680 parcen3(NbrSol) = Intp.Point(i).ParamOnSecond();
681 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
683 pnttg1sol(NbrSol) = Point1;
684 pntcen3(NbrSol) = Center;
686 WellDone = Standard_True;
692 //=========================================================================
694 Standard_Boolean GccGeo_Circ2dTanOnRad::
695 IsDone () const { return WellDone; }
697 Standard_Integer GccGeo_Circ2dTanOnRad::
698 NbSolutions () const { return NbrSol; }
700 gp_Circ2d GccGeo_Circ2dTanOnRad::
701 ThisSolution (const Standard_Integer Index) const
704 if (Index > NbrSol || Index <= 0)
705 Standard_OutOfRange::Raise();
707 return cirsol(Index);
710 void GccGeo_Circ2dTanOnRad::
711 WhichQualifier(const Standard_Integer Index ,
712 GccEnt_Position& Qualif1 ) const
714 if (!WellDone) { StdFail_NotDone::Raise(); }
715 else if (Index <= 0 ||Index > NbrSol) { Standard_OutOfRange::Raise(); }
717 Qualif1 = qualifier1(Index);
721 void GccGeo_Circ2dTanOnRad::
722 Tangency1 (const Standard_Integer Index,
723 Standard_Real& ParSol,
724 Standard_Real& ParArg,
725 gp_Pnt2d& PntSol) const{
727 StdFail_NotDone::Raise();
729 else if (Index <= 0 ||Index > NbrSol) {
730 Standard_OutOfRange::Raise();
733 ParSol = par1sol(Index);
734 ParArg = pararg1(Index);
735 PntSol = gp_Pnt2d(pnttg1sol(Index));
739 void GccGeo_Circ2dTanOnRad::
740 CenterOn3 (const Standard_Integer Index,
741 Standard_Real& ParArg,
742 gp_Pnt2d& PntSol) const {
744 StdFail_NotDone::Raise();
746 else if (Index <= 0 ||Index > NbrSol) {
747 Standard_OutOfRange::Raise();
750 ParArg = parcen3(Index);
751 PntSol = pnttg1sol(Index);
755 Standard_Boolean GccGeo_Circ2dTanOnRad::
756 IsTheSame1 (const Standard_Integer Index) const
758 if (!WellDone) StdFail_NotDone::Raise();
759 if (Index <= 0 ||Index > NbrSol) Standard_OutOfRange::Raise();
761 if (TheSame1(Index) == 0)
762 return Standard_False;
764 return Standard_True;