// Created: Thu Jan 2 15:52:15 1992
// Author: Remi GILET
// <reg@topsn3>
-// JCT 06/07/98 cas des droites confondues (PRO14405)
-// JCT 16/11/98 tri des solutions apres le calcul (PRO16384)
#include <GccAna_Circ2d2TanOn.jxx>
gp_Dir2d dirx(1.,0.);
Standard_Real Tol = Abs(Tolerance);
- // calcul de la (des) bisectrice(s) de L1 et L2
+ // calculation of bisectrices of L1 and L2
gp_Lin2d L1(Qualified1.Qualified());
gp_Lin2d L2(Qualified2.Qualified());
gp_Pnt2d originL1(L1.Location());
if (Bis.IsDone()) {
if (Bis.NbSolutions() == 1 || Bis.NbSolutions() == 2) {
- // si 1 bisectrice, L1 et L2 sont paralleles
- // si 2 bisectrices, L1 et L2 sont secantes
+ // if 1 bisectrice, L1 and L2 are parallel
+ // if 2 bisectrices, L1 and L2 are intersected
for (Standard_Integer k = 1 ; k <= Bis.NbSolutions() ; k++) {
IntAna2d_AnaIntersection Intp(Bis.ThisSolution(k),OnLine);
if (Intp.IsDone()) {
WellDone = Standard_True;
- // pour les cas degeneres, pas de solution acceptable
- // (OnLine et bisectrice paralleles strictement ou pas)
+ // for degenerated cases, no acceptable solution
+ // (OnLine and bisectrice strictly parallel or not)
if (!Intp.IdenticalElements()
&& !Intp.ParallelElements()
&& !Intp.IsEmpty()) {
- // au maximum 1 point d'intersection !
+ // at maximum 1 point of intersection !
for (Standard_Integer l = 1 ; l <= Intp.NbPoints() ; l++) {
gp_Pnt2d pt(Intp.Point(l).Value());
gp_Ax2d axe(pt,dirx);
Standard_Real Radius = L1.Distance(pt);
if (!L1.Contains(pt,Tol) && Radius<1.0/Tol && NbrSol<2) {
- // solution acceptable : le rayon est correct
+ // acceptable solution : the radius is correct
NbrSol++;
cirsol(NbrSol) = gp_Circ2d(axe,Radius);
}
}
- // tri selon les qualifiers des NbrSol solutions acceptables
+ // parce following the qualifiers NbrSol acceptable solutions
for (Standard_Integer i=1 ; i <= NbrSol ; i++) {
Standard_Real Radius = cirsol(i).Radius();
Standard_Boolean ok = Standard_False;
- // solution Outside ou Enclosed / L1
+ // solution Outside or Enclosed / L1
gp_Dir2d dc1(originL1.XY()-pbid.XY());
Standard_Real sign1 = dc1.Dot(gp_Dir2d(-L1.Direction().Y(),
L1.Direction().X()));
else ok = (Qualified1.IsUnqualified()
|| Qualified1.IsEnclosed());
- // solution Outside ou Enclosed / L2
+ // solution Outside or Enclosed / L2
gp_Dir2d dc2(originL2.XY()-pbid.XY());
Standard_Real sign2 = dc2.Dot(gp_Dir2d(-L2.Direction().Y(),
L2.Direction().X()));
|| Qualified2.IsEnclosed());
if (ok) {
- // solution a garder
+ // solution to be preserved
dc1 = gp_Dir2d(sign1*gp_XY(-L1.Direction().Y(),
L1.Direction().X()));
pnttg1sol(i) = gp_Pnt2d(pbid.XY()+Radius*dc1.XY());
parcen3(i)=ElCLib::Parameter(OnLine,pntcen(i));
}
else {
- // solution a jeter
+ // solution to be rejected
if (i==NbrSol) NbrSol--;
else {
for (Standard_Integer k = i+1 ; k <= NbrSol ; k++) {