1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 //========================================================================
16 // circulaire tangent a un element de type : - Cercle. +
19 // centre sur un deuxieme element de type : - Cercle. +
21 // de rayon donne : Radius. +
22 //========================================================================
25 #include <math_DirectPolynomialRoots.hxx>
26 #include <TColStd_Array1OfReal.hxx>
27 #include <Standard_NegativeValue.hxx>
28 #include <gp_Dir2d.hxx>
29 #include <Standard_OutOfRange.hxx>
30 #include <StdFail_NotDone.hxx>
31 #include <GccEnt_BadQualifier.hxx>
32 #include <IntRes2d_Domain.hxx>
33 #include <IntRes2d_IntersectionPoint.hxx>
35 //=========================================================================
36 // Cercle tangent : a un cercle Qualified1 (C1). +
37 // centre : sur une droite OnLine. +
38 // de rayon : Radius. +
40 // On initialise le tableau de solutions cirsol ainsi que tous les +
42 // On elimine en fonction du qualifieur les cas ne presentant pas de +
44 // On resoud l equation du second degre indiquant que le point de centre +
45 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
46 // sur la droite OnLine. +
47 // Les solutions sont representees par les cercles : +
48 // - de centre Pntcen(xc,yc) +
49 // - de rayon Radius. +
50 //=========================================================================
52 GccGeo_Circ2dTanOnRad::
53 GccGeo_Circ2dTanOnRad (const TheQCurve& Qualified1,
54 const gp_Lin2d& OnLine ,
55 const Standard_Real Radius ,
56 const Standard_Real Tolerance ):
58 //=========================================================================
59 // Initialisation des champs. +
60 //=========================================================================
72 //=========================================================================
74 //=========================================================================
76 gp_Dir2d dirx(1.0,0.0);
77 Standard_Real Tol = Abs(Tolerance);
78 Standard_Real thefirst = -100000.;
79 Standard_Real thelast = 100000.;
80 Standard_Real firstparam;
81 Standard_Real lastparam;
82 WellDone = Standard_False;
84 if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() ||
85 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
86 GccEnt_BadQualifier::Raise();
89 Standard_Integer nbrcote1 = 0;
90 TColStd_Array1OfReal Coef(1,2);
91 TheCurve Cu1 = Qualified1.Qualified();
93 if (Radius < 0.0) { Standard_NegativeValue::Raise(); }
95 if (Qualified1.IsEnclosed()) {
96 // ===========================
100 else if(Qualified1.IsOutside()) {
101 // ===============================
105 else if(Qualified1.IsUnqualified()) {
106 // ===================================
112 TheIntConicCurve Intp;
113 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
114 Handle(TheHParGenCurve) HCu1 = new TheHParGenCurve(Cu1);
115 TheParGenCurve C2(HCu1,Coef(jcote1));
116 firstparam = Max(TheCurvePGTool::FirstParameter(C2),thefirst);
117 lastparam = Min(TheCurvePGTool::LastParameter(C2),thelast);
118 IntRes2d_Domain D2(TheCurvePGTool::Value(C2,firstparam),firstparam,Tol,
119 TheCurvePGTool::Value(C2,lastparam),lastparam,Tol);
120 Intp.Perform(OnLine,D1,C2,D2,Tol,Tol);
122 if (!Intp.IsEmpty()) {
123 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
125 gp_Pnt2d Center(Intp.Point(i).Value());
126 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
127 // =======================================================
128 qualifier1(NbrSol) = Qualified1.Qualifier();
129 TheSame1(NbrSol) = 0;
130 pararg1(NbrSol) = Intp.Point(i).ParamOnSecond();
131 parcen3(NbrSol) = Intp.Point(i).ParamOnFirst();
132 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
134 pnttg1sol(NbrSol) = gp_Pnt2d(TheTool::Value(Cu1,pararg1(NbrSol)));
135 pntcen3(NbrSol) = Center;
138 WellDone = Standard_True;
144 //=========================================================================
145 // Cercle tangent : a un cercle Qualified1 (C1). +
146 // centre : sur une droite OnLine. +
147 // de rayon : Radius. +
149 // On initialise le tableau de solutions cirsol ainsi que tous les +
151 // On elimine en fonction du qualifieur les cas ne presentant pas de +
153 // On resoud l equation du second degre indiquant que le point de centre +
154 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
155 // sur la droite OnLine. +
156 // Les solutions sont representees par les cercles : +
157 // - de centre Pntcen(xc,yc) +
158 // - de rayon Radius. +
159 //=========================================================================
161 GccGeo_Circ2dTanOnRad::
162 GccGeo_Circ2dTanOnRad (const TheQCurve& Qualified1,
163 const gp_Circ2d& OnCirc ,
164 const Standard_Real Radius ,
165 const Standard_Real Tolerance ):
167 //=========================================================================
168 // Initialisation des champs. +
169 //=========================================================================
181 //=========================================================================
183 //=========================================================================
185 gp_Dir2d dirx(1.0,0.0);
186 Standard_Real thefirst = -100000.;
187 Standard_Real thelast = 100000.;
188 Standard_Real firstparam;
189 Standard_Real lastparam;
190 Standard_Real Tol = Abs(Tolerance);
191 Standard_Integer nbrcote1=0;
192 WellDone = Standard_False;
194 if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() ||
195 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
196 GccEnt_BadQualifier::Raise();
199 TColStd_Array1OfReal cote1(1,2);
200 TheCurve Cu1 = Qualified1.Qualified();
203 Standard_NegativeValue::Raise();
206 if (Qualified1.IsEnclosed()) {
207 // ===========================
211 else if(Qualified1.IsOutside()) {
212 // ===============================
216 else if(Qualified1.IsUnqualified()) {
217 // ===================================
222 IntRes2d_Domain D1(ElCLib::Value(0.,OnCirc), 0.,Tol,
223 ElCLib::Value(2.*M_PI,OnCirc),2.*M_PI,Tol);
224 D1.SetEquivalentParameters(0.,2.*M_PI);
225 TheIntConicCurve Intp;
226 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
227 Handle(TheHParGenCurve) HCu1 = new TheHParGenCurve(Cu1);
228 TheParGenCurve C2(HCu1,cote1(jcote1));
229 firstparam = Max(TheCurvePGTool::FirstParameter(C2),thefirst);
230 lastparam = Min(TheCurvePGTool::LastParameter(C2),thelast);
231 IntRes2d_Domain D2(TheCurvePGTool::Value(C2,firstparam),firstparam,Tol,
232 TheCurvePGTool::Value(C2,lastparam),lastparam,Tol);
233 Intp.Perform(OnCirc,D1,C2,D2,Tol,Tol);
235 if (!Intp.IsEmpty()) {
236 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
238 gp_Pnt2d Center(Intp.Point(i).Value());
239 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
240 // =======================================================
241 qualifier1(NbrSol) = Qualified1.Qualifier();
242 TheSame1(NbrSol) = 0;
243 pararg1(NbrSol) = Intp.Point(i).ParamOnSecond();
244 parcen3(NbrSol) = Intp.Point(i).ParamOnFirst();
245 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
247 pnttg1sol(NbrSol) = gp_Pnt2d(TheTool::Value(Cu1,pararg1(NbrSol)));
248 pntcen3(NbrSol) = Center;
251 WellDone = Standard_True;
257 //=========================================================================
258 // Cercle tangent : a un cercle Qualified1 (C1). +
259 // centre : sur une droite OnLine. +
260 // de rayon : Radius. +
262 // On initialise le tableau de solutions cirsol ainsi que tous les +
264 // On elimine en fonction du qualifieur les cas ne presentant pas de +
266 // On resoud l equation du second degre indiquant que le point de centre +
267 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
268 // sur la droite OnLine. +
269 // Les solutions sont representees par les cercles : +
270 // - de centre Pntcen(xc,yc) +
271 // - de rayon Radius. +
272 //=========================================================================
274 GccGeo_Circ2dTanOnRad::
275 GccGeo_Circ2dTanOnRad (const GccEnt_QualifiedCirc& Qualified1,
276 const TheCurve& OnCurv ,
277 const Standard_Real Radius ,
278 const Standard_Real Tolerance ):
280 //=========================================================================
281 // Initialisation des champs. +
282 //=========================================================================
294 //=========================================================================
296 //=========================================================================
298 gp_Dir2d dirx(1.0,0.0);
299 Standard_Real thefirst = -100000.;
300 Standard_Real thelast = 100000.;
301 Standard_Real firstparam;
302 Standard_Real lastparam;
303 Standard_Real Tol = Abs(Tolerance);
304 Standard_Integer nbrcote1=0;
305 WellDone = Standard_False;
307 if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() ||
308 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
309 GccEnt_BadQualifier::Raise();
312 TColStd_Array1OfReal cote1(1,2);
313 gp_Circ2d C1 = Qualified1.Qualified();
314 gp_Pnt2d center1(C1.Location());
315 Standard_Real R1 = C1.Radius();
318 Standard_NegativeValue::Raise();
321 if (Qualified1.IsEnclosed()) {
322 // ===========================
326 else if(Qualified1.IsOutside()) {
327 // ===============================
331 else if(Qualified1.IsUnqualified()) {
332 // ===================================
337 TheIntConicCurve Intp;
338 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
339 gp_Circ2d Circ(C1.XAxis(),R1 + cote1(jcote1));
340 IntRes2d_Domain D1(ElCLib::Value(0.,Circ), 0.,Tol,
341 ElCLib::Value(2.*M_PI,Circ),2.*M_PI,Tol);
342 D1.SetEquivalentParameters(0.,2.*M_PI);
343 firstparam = Max(TheTool::FirstParameter(OnCurv),thefirst);
344 lastparam = Min(TheTool::LastParameter(OnCurv),thelast);
345 IntRes2d_Domain D2(TheTool::Value(OnCurv,firstparam),firstparam,Tol,
346 TheTool::Value(OnCurv,lastparam),lastparam,Tol);
347 Intp.Perform(Circ,D1,OnCurv,D2,Tol,Tol);
349 if (!Intp.IsEmpty()) {
350 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
352 gp_Pnt2d Center(Intp.Point(i).Value());
353 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
354 // =======================================================
355 Standard_Real distcc1 = Center.Distance(center1);
356 if (!Qualified1.IsUnqualified()) {
357 qualifier1(NbrSol) = Qualified1.Qualifier();
359 else if (Abs(distcc1+Radius-R1) < Tol) {
360 qualifier1(NbrSol) = GccEnt_enclosed;
362 else if (Abs(distcc1-R1-Radius) < Tol) {
363 qualifier1(NbrSol) = GccEnt_outside;
365 else { qualifier1(NbrSol) = GccEnt_enclosing; }
366 TheSame1(NbrSol) = 0;
367 pararg1(NbrSol) = Intp.Point(i).ParamOnFirst();
368 parcen3(NbrSol) = Intp.Point(i).ParamOnSecond();
369 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
371 pnttg1sol(NbrSol) = ElCLib::Value(pararg1(NbrSol),C1);
372 pntcen3(NbrSol) = Center;
375 WellDone = Standard_True;
381 //=========================================================================
382 // Cercle tangent : a un cercle Qualified1 (C1). +
383 // centre : sur une droite OnLine. +
384 // de rayon : Radius. +
386 // On initialise le tableau de solutions cirsol ainsi que tous les +
388 // On elimine en fonction du qualifieur les cas ne presentant pas de +
390 // On resoud l equation du second degre indiquant que le point de centre +
391 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
392 // sur la droite OnLine. +
393 // Les solutions sont representees par les cercles : +
394 // - de centre Pntcen(xc,yc) +
395 // - de rayon Radius. +
396 //=========================================================================
398 GccGeo_Circ2dTanOnRad::
399 GccGeo_Circ2dTanOnRad (const GccEnt_QualifiedLin& Qualified1,
400 const TheCurve& OnCurv ,
401 const Standard_Real Radius ,
402 const Standard_Real Tolerance ):
404 //=========================================================================
405 // Initialisation des champs. +
406 //=========================================================================
418 //=========================================================================
420 //=========================================================================
422 gp_Dir2d dirx(1.0,0.0);
423 Standard_Real thefirst = -100000.;
424 Standard_Real thelast = 100000.;
425 Standard_Real firstparam;
426 Standard_Real lastparam;
427 Standard_Real Tol = Abs(Tolerance);
428 WellDone = Standard_False;
430 if (!(Qualified1.IsEnclosed() ||
431 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
432 GccEnt_BadQualifier::Raise();
435 Standard_Integer nbrcote1=0;
436 TColStd_Array1OfReal cote1(1,2);
437 gp_Lin2d L1 = Qualified1.Qualified();
438 gp_Pnt2d origin1(L1.Location());
439 gp_Dir2d dir1(L1.Direction());
440 gp_Dir2d norm1(-dir1.Y(),dir1.X());
443 Standard_NegativeValue::Raise();
446 if (Qualified1.IsEnclosed()) {
447 // ===========================
451 else if(Qualified1.IsOutside()) {
452 // ===============================
456 else if(Qualified1.IsUnqualified()) {
457 // ===================================
462 TheIntConicCurve Intp;
463 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
464 gp_Pnt2d Point(dir1.XY()+cote1(jcote1)*norm1.XY());
465 gp_Lin2d Line(Point,dir1); // ligne avec deport.
467 firstparam = Max(TheTool::FirstParameter(OnCurv),thefirst);
468 lastparam = Min(TheTool::LastParameter(OnCurv),thelast);
469 IntRes2d_Domain D2(TheTool::Value(OnCurv,firstparam),firstparam,Tol,
470 TheTool::Value(OnCurv,lastparam),lastparam,Tol);
471 Intp.Perform(Line,D1,OnCurv,D2,Tol,Tol);
473 if (!Intp.IsEmpty()) {
474 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
476 gp_Pnt2d Center(Intp.Point(i).Value());
477 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
478 // =======================================================
479 gp_Dir2d dc1(origin1.XY()-Center.XY());
480 if (!Qualified1.IsUnqualified()) {
481 qualifier1(NbrSol) = Qualified1.Qualifier();
483 else if (dc1.Dot(norm1) > 0.0) {
484 qualifier1(NbrSol) = GccEnt_outside;
486 else { qualifier1(NbrSol) = GccEnt_enclosed; }
487 TheSame1(NbrSol) = 0;
488 pararg1(NbrSol) = Intp.Point(i).ParamOnFirst();
489 parcen3(NbrSol) = Intp.Point(i).ParamOnSecond();
490 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
492 pnttg1sol(NbrSol) = ElCLib::Value(pararg1(NbrSol),L1);
493 pntcen3(NbrSol) = Center;
496 WellDone = Standard_True;
502 //=========================================================================
503 // Cercle tangent : a un cercle Qualified1 (C1). +
504 // centre : sur une droite OnLine. +
505 // de rayon : Radius. +
507 // On initialise le tableau de solutions cirsol ainsi que tous les +
509 // On elimine en fonction du qualifieur les cas ne presentant pas de +
511 // On resoud l equation du second degre indiquant que le point de centre +
512 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
513 // sur la droite OnLine. +
514 // Les solutions sont representees par les cercles : +
515 // - de centre Pntcen(xc,yc) +
516 // - de rayon Radius. +
517 //=========================================================================
519 GccGeo_Circ2dTanOnRad::
520 GccGeo_Circ2dTanOnRad (const TheQCurve& Qualified1,
521 const TheCurve& OnCurv ,
522 const Standard_Real Radius ,
523 const Standard_Real Tolerance ):
525 //=========================================================================
526 // Initialisation des champs. +
527 //=========================================================================
539 //=========================================================================
541 //=========================================================================
543 gp_Dir2d dirx(1.0,0.0);
544 Standard_Real thefirst = -100000.;
545 Standard_Real thelast = 100000.;
546 Standard_Real firstparam;
547 Standard_Real lastparam;
548 Standard_Real Tol = Abs(Tolerance);
549 Standard_Integer nbrcote1=0;
550 WellDone = Standard_False;
552 if (!(Qualified1.IsEnclosed() || Qualified1.IsEnclosing() ||
553 Qualified1.IsOutside() || Qualified1.IsUnqualified())) {
554 GccEnt_BadQualifier::Raise();
557 TColStd_Array1OfReal cote1(1,2);
558 TheCurve Cu1 = Qualified1.Qualified();
561 Standard_NegativeValue::Raise();
564 if (Qualified1.IsEnclosed()) {
565 // ===========================
569 else if(Qualified1.IsOutside()) {
570 // ===============================
574 else if(Qualified1.IsUnqualified()) {
575 // ===================================
580 TheIntCurveCurve Intp;
581 for (Standard_Integer jcote1 = 1 ; jcote1 <= nbrcote1 ; jcote1++) {
582 Handle(TheHParGenCurve) HCu1 = new TheHParGenCurve(Cu1);
583 TheParGenCurve C1(HCu1,cote1(jcote1));
584 firstparam = Max(TheCurvePGTool::FirstParameter(C1),thefirst);
585 lastparam = Min(TheCurvePGTool::LastParameter(C1),thelast);
586 IntRes2d_Domain D1(TheCurvePGTool::Value(C1,firstparam),firstparam,Tol,
587 TheCurvePGTool::Value(C1,lastparam),lastparam,Tol);
588 Handle(TheHParGenCurve) HOnCurv = new TheHParGenCurve(OnCurv);
589 TheParGenCurve C2(HOnCurv);
590 firstparam = Max(TheCurvePGTool::FirstParameter(C2),thefirst);
591 lastparam = Min(TheCurvePGTool::LastParameter(C2),thelast);
592 IntRes2d_Domain D2(TheCurvePGTool::Value(C2,firstparam),firstparam,Tol,
593 TheCurvePGTool::Value(C2,lastparam),lastparam,Tol);
594 Intp.Perform(C1,D1,C2,D2,Tol,Tol);
596 if (!Intp.IsEmpty()) {
597 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
599 gp_Pnt2d Center(Intp.Point(i).Value());
600 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
601 // =======================================================
602 qualifier1(NbrSol) = Qualified1.Qualifier();
603 TheSame1(NbrSol) = 0;
604 pararg1(NbrSol) = Intp.Point(i).ParamOnFirst();
605 parcen3(NbrSol) = Intp.Point(i).ParamOnSecond();
606 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
608 pnttg1sol(NbrSol) = gp_Pnt2d(TheTool::Value(Cu1,pararg1(NbrSol)));
609 pntcen3(NbrSol) = Center;
612 WellDone = Standard_True;
618 //=========================================================================
619 // Cercle tangent : a un cercle Qualified1 (C1). +
620 // centre : sur une droite OnLine. +
621 // de rayon : Radius. +
623 // On initialise le tableau de solutions cirsol ainsi que tous les +
625 // On elimine en fonction du qualifieur les cas ne presentant pas de +
627 // On resoud l equation du second degre indiquant que le point de centre +
628 // recherche (xc,yc) est a une distance Radius du cercle C1 et +
629 // sur la droite OnLine. +
630 // Les solutions sont representees par les cercles : +
631 // - de centre Pntcen(xc,yc) +
632 // - de rayon Radius. +
633 //=========================================================================
635 GccGeo_Circ2dTanOnRad::
636 GccGeo_Circ2dTanOnRad (const gp_Pnt2d& Point1 ,
637 const TheCurve& OnCurv ,
638 const Standard_Real Radius ,
639 const Standard_Real Tolerance ):
641 //=========================================================================
642 // Initialisation des champs. +
643 //=========================================================================
655 //=========================================================================
657 //=========================================================================
659 gp_Dir2d dirx(1.0,0.0);
660 Standard_Real thefirst = -100000.;
661 Standard_Real thelast = 100000.;
662 Standard_Real firstparam;
663 Standard_Real lastparam;
664 Standard_Real Tol = Abs(Tolerance);
665 WellDone = Standard_False;
669 Standard_NegativeValue::Raise();
672 // gp_Dir2d Dir(-y1dir,x1dir);
673 gp_Circ2d Circ(gp_Ax2d(Point1,gp_Dir2d(1.,0.)),Radius);
674 IntRes2d_Domain D1(ElCLib::Value(0.,Circ), 0.,Tol,
675 ElCLib::Value(2.*M_PI,Circ),2*M_PI,Tol);
676 D1.SetEquivalentParameters(0.,2.*M_PI);
677 firstparam = Max(TheTool::FirstParameter(OnCurv),thefirst);
678 lastparam = Min(TheTool::LastParameter(OnCurv),thelast);
679 IntRes2d_Domain D2(TheTool::Value(OnCurv,firstparam),firstparam,Tol,
680 TheTool::Value(OnCurv,lastparam),lastparam,Tol);
681 TheIntConicCurve Intp(Circ,D1,OnCurv,D2,Tol,Tol);
683 if (!Intp.IsEmpty()) {
684 for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
686 gp_Pnt2d Center(Intp.Point(i).Value());
687 cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
688 // =======================================================
689 qualifier1(NbrSol) = GccEnt_noqualifier;
690 TheSame1(NbrSol) = 0;
691 pararg1(NbrSol) = Intp.Point(i).ParamOnFirst();
692 parcen3(NbrSol) = Intp.Point(i).ParamOnSecond();
693 par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol),
695 pnttg1sol(NbrSol) = Point1;
696 pntcen3(NbrSol) = Center;
698 WellDone = Standard_True;
704 //=========================================================================
706 Standard_Boolean GccGeo_Circ2dTanOnRad::
707 IsDone () const { return WellDone; }
709 Standard_Integer GccGeo_Circ2dTanOnRad::
710 NbSolutions () const { return NbrSol; }
712 gp_Circ2d GccGeo_Circ2dTanOnRad::
713 ThisSolution (const Standard_Integer Index) const
716 if (Index > NbrSol || Index <= 0)
717 Standard_OutOfRange::Raise();
719 return cirsol(Index);
722 void GccGeo_Circ2dTanOnRad::
723 WhichQualifier(const Standard_Integer Index ,
724 GccEnt_Position& Qualif1 ) const
726 if (!WellDone) { StdFail_NotDone::Raise(); }
727 else if (Index <= 0 ||Index > NbrSol) { Standard_OutOfRange::Raise(); }
729 Qualif1 = qualifier1(Index);
733 void GccGeo_Circ2dTanOnRad::
734 Tangency1 (const Standard_Integer Index,
735 Standard_Real& ParSol,
736 Standard_Real& ParArg,
737 gp_Pnt2d& PntSol) const{
739 StdFail_NotDone::Raise();
741 else if (Index <= 0 ||Index > NbrSol) {
742 Standard_OutOfRange::Raise();
745 ParSol = par1sol(Index);
746 ParArg = pararg1(Index);
747 PntSol = gp_Pnt2d(pnttg1sol(Index));
751 void GccGeo_Circ2dTanOnRad::
752 CenterOn3 (const Standard_Integer Index,
753 Standard_Real& ParArg,
754 gp_Pnt2d& PntSol) const {
756 StdFail_NotDone::Raise();
758 else if (Index <= 0 ||Index > NbrSol) {
759 Standard_OutOfRange::Raise();
762 ParArg = parcen3(Index);
763 PntSol = pnttg1sol(Index);
767 Standard_Boolean GccGeo_Circ2dTanOnRad::
768 IsTheSame1 (const Standard_Integer Index) const
770 if (!WellDone) StdFail_NotDone::Raise();
771 if (Index <= 0 ||Index > NbrSol) Standard_OutOfRange::Raise();
773 if (TheSame1(Index) == 0)
774 return Standard_False;
776 return Standard_True;