1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0022312: Translation of french commentaries in OCCT files

This commit is contained in:
YSN
2011-10-26 10:11:35 +00:00
committed by bugmaster
parent c898afcea8
commit b2342827fa
3 changed files with 202 additions and 210 deletions

View File

@@ -176,8 +176,7 @@ ExtremaExtElC_TrigonometricRoots::
while(!Triee);
//
infinite_roots=Standard_False;
if(NbRoots==0) {
//--!!!!! Detection du cas Pol = Cte ( 1e-50 ) !!!!
if(NbRoots==0) { //--!!!!! Detect case Pol = Cte ( 1e-50 ) !!!!
if((Abs(CC) + Abs(SC) + Abs(C) + Abs(S)) < 1e-10) {
if(Abs(Cte) < 1e-10) {
infinite_roots=Standard_True;
@@ -187,7 +186,7 @@ ExtremaExtElC_TrigonometricRoots::
} // else #1
} // if(MTFR.IsDone()) {
else {
// on essaie en mettant les tres petits coeff. a ZERO
// try to set very small coefficients to ZERO
if (Abs(CC)<1e-10) {
cc = 0.0;
}
@@ -223,26 +222,25 @@ Extrema_ExtElC::Extrema_ExtElC ()
Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1,
const gp_Lin& C2,
const Standard_Real)
// Fonction:
// Recherche de la distance minimale entre 2 droites.
// Function:
// Find min distance between 2 straight lines.
// Methode:
// Soit D1 et D2, les 2 directions des droites C1 et C2.
// 2 cas sont consideres:
// 1- si Angle(D1,D2) < AngTol, les droites sont paralleles.
// La distance est la distance entre un point quelconque de C1 et la droite
// C2.
// 2- si Angle(D1,D2) > AngTol:
// Soit P1=C1(u1) et P2=C2(u2) les 2 points solutions:
// Alors, ( P1P2.D1 = 0. (1)
// Method:
// Let D1 and D2, be 2 directions of straight lines C1 and C2.
// 2 cases are considered:
// 1- if Angle(D1,D2) < AngTol, straight lines are parallel.
// The distance is the distance between a point of C1 and the straight line C2.
// 2- if Angle(D1,D2) > AngTol:
// Let P1=C1(u1) and P2=C2(u2) be 2 solution points:
// Then, ( P1P2.D1 = 0. (1)
// ( P1P2.D2 = 0. (2)
// Soit O1 et O2 les origines de C1 et C2;
// Alors, (1) <=> (O1P2-u1*D1).D1 = 0. car O1P1 = u1*D1
// <=> u1 = O1P2.D1 car D1.D1 = 1.
// (2) <=> (P1O2+u2*D2).D2 = 0. car O2P2 = u2*D2
// <=> u2 = O2P1.D2 car D2.D2 = 1.
// Let O1 and O2 be the origins of C1 and C2;
// THen, (1) <=> (O1P2-u1*D1).D1 = 0. as O1P1 = u1*D1
// <=> u1 = O1P2.D1 as D1.D1 = 1.
// (2) <=> (P1O2+u2*D2).D2 = 0. as O2P2 = u2*D2
// <=> u2 = O2P1.D2 as D2.D2 = 1.
// <=> u2 = (O2O1+O1P1).D2
// <=> u2 = O2O1.D2+((O1P2.T1)T1).T2) car O1P1 = u1*T1 = (O1P2.T1)T1
// <=> u2 = O2O1.D2+((O1P2.T1)T1).T2) as O1P1 = u1*T1 = (O1P2.T1)T1
// <=> u2 = O2O1.D2+(((O1O2+O2P2).D1)D1).D2)
// <=> u2 = O2O1.D2+((O1O2.D1)D1).D2)+(O2P2.D1)(D1.D2)
// <=> u2 = ((O1O2.D1)D1-O1O2).D2 + u2*(D2.D1)(D1.D2)
@@ -309,35 +307,34 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1,
const Standard_Real)
/*-----------------------------------------------------------------------------
Fonction:
Recherche des distances extremales entre la droite C1 et le cercle C2.
Find extreme distances between straight line C1 and circle C2.
Methode:
Soit P1=C1(u1) et P2=C2(u2) deux points solutions
D la direction de la droite C1
T la tangente au point P2;
Alors, ( P1P2.D = 0. (1)
Method:
Let P1=C1(u1) and P2=C2(u2) be two solution points
D the direction of straight line C1
T tangent at point P2;
Then, ( P1P2.D = 0. (1)
( P1P2.T = 0. (2)
Soit O1 et O2 les origines de C1 et C2;
Alors, (1) <=> (O1P2-u1*D).D = 0. car O1P1 = u1*D
<=> u1 = O1P2.D car D.D = 1.
(2) <=> P1O2.T = 0. car O2P2.T = 0.
<=> ((P2O1.D)D+O1O2).T = 0. car P1O1 = -u1*D = (P2O1.D)D
Let O1 and O2 be the origins of C1 and C2;
Then, (1) <=> (O1P2-u1*D).D = 0. as O1P1 = u1*D
<=> u1 = O1P2.D as D.D = 1.
(2) <=> P1O2.T = 0. as O2P2.T = 0.
<=> ((P2O1.D)D+O1O2).T = 0. as P1O1 = -u1*D = (P2O1.D)D
<=> (((P2O2+O2O1).D)D+O1O2).T = 0.
<=> ((P2O2.D)(D.T)+((O2O1.D)D-O2O1).T = 0.
On se place dans le repere du cercle; soit:
Cos = Cos(u2) et Sin = Sin(u2),
We are in the reference of the circle; let:
Cos = Cos(u2) and Sin = Sin(u2),
P2 (R*Cos,R*Sin,0.),
T (-R*Sin,R*Cos,0.),
D (Dx,Dy,Dz),
V (Vx,Vy,Vz) = (O2O1.D)D-O2O1;
Alors, on obtient l'equation en Cos et Sin suivante:
Then, the equation by Cos and Sin is as follows:
-(2*R*R*Dx*Dy) * Cos**2 + A1
R*R*(Dx**2-Dy**2) * Cos*Sin + 2* A2
R*Vy * Cos + A3
-R*Vx * Sin + A4
R*R*Dx*Dy = 0. A5
On utilise l'algorithme math_TrigonometricFunctionRoots pour resoudre
cette equation.
Use the algorithm math_TrigonometricFunctionRoots to solve this equation.
-----------------------------------------------------------------------------*/
{
Standard_Real Dx,Dy,Dz,aRO2O1, aTolRO2O1;
@@ -347,8 +344,8 @@ Methode:
myIsPar = Standard_False;
myDone = Standard_False;
myNbExt = 0;
//
// Calcul de T1 dans le repere du cercle ...
// Calculate T1 in the reference of the circle ...
D = C1.Direction();
D1 = D;
x2 = C2.XAxis().Direction();
@@ -387,8 +384,8 @@ Methode:
//modified by NIZNHY-PKV Wed Sep 21 07:45:42 2011t
//
gp_XYZ Vxyz = (D.XYZ()*(O2O1.Dot(D)))-O2O1.XYZ();
//
// Calcul des coefficients de l equation en Cos et Sin ...
// Calculate the coefficients of the equation by Cos and Sin ...
aTol=1.e-12;
R = C2.Radius();
A5 = R*R*Dx*Dy;
@@ -423,8 +420,7 @@ Methode:
myDone = Standard_True;
return;
}
//
// Stockage des solutions ...
// Storage of solutions ...
Standard_Integer NoSol, NbSol;
Standard_Real U1,U2;
gp_Pnt P1,P2;
@@ -450,42 +446,41 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1,
const gp_Elips& C2)
{
/*-----------------------------------------------------------------------------
Fonction:
Recherche des distances extremales entre la droite C1 et l ellipse C2.
Function:
Find extreme distances between straight line C1 and ellipse C2.
Methode:
Soit P1=C1(u1) et P2=C2(u2) deux points solutions
D la direction de la droite C1
T la tangente au point P2;
Alors, ( P1P2.D = 0. (1)
Method:
Let P1=C1(u1) and P2=C2(u2) two solution points
D the direction of straight line C1
T the tangent to point P2;
Then, ( P1P2.D = 0. (1)
( P1P2.T = 0. (2)
Soit O1 et O2 les origines de C1 et C2;
Alors, (1) <=> (O1P2-u1*D).D = 0. car O1P1 = u1*D
<=> u1 = O1P2.D car D.D = 1.
(2) <=> P1O2.T = 0. car O2P2.T = 0.
<=> ((P2O1.D)D+O1O2).T = 0. car P1O1 = -u1*D = (P2O1.D)D
Let O1 and O2 be the origins of C1 and C2;
Then, (1) <=> (O1P2-u1*D).D = 0. as O1P1 = u1*D
<=> u1 = O1P2.D as D.D = 1.
(2) <=> P1O2.T = 0. as O2P2.T = 0.
<=> ((P2O1.D)D+O1O2).T = 0. as P1O1 = -u1*D = (P2O1.D)D
<=> (((P2O2+O2O1).D)D+O1O2).T = 0.
<=> ((P2O2.D)(D.T)+((O2O1.D)D-O2O1).T = 0.
On se place dans le repere de l ellipse; soit:
Cos = Cos(u2) et Sin = Sin(u2),
We are in the reference of the ellipse; let:
Cos = Cos(u2) and Sin = Sin(u2),
P2 (MajR*Cos,MinR*Sin,0.),
T (-MajR*Sin,MinR*Cos,0.),
D (Dx,Dy,Dz),
V (Vx,Vy,Vz) = (O2O1.D)D-O2O1;
Alors, on obtient l'equation en Cos et Sin suivante:
Then, get the following equation by Cos and Sin:
-(2*MajR*MinR*Dx*Dy) * Cos**2 +
(MajR*MajR*Dx**2-MinR*MinR*Dy**2) * Cos*Sin +
MinR*Vy * Cos +
- MajR*Vx * Sin +
MinR*MajR*Dx*Dy = 0.
On utilise l'algorithme math_TrigonometricFunctionRoots pour resoudre
cette equation.
Use algorithm math_TrigonometricFunctionRoots to solve this equation.
-----------------------------------------------------------------------------*/
myIsPar = Standard_False;
myDone = Standard_False;
myNbExt = 0;
// Calcul de T1 dans le repere de l'ellipse ...
// Calculate T1 the reference of the ellipse ...
gp_Dir D = C1.Direction();
gp_Dir D1 = D;
gp_Dir x2, y2, z2;
@@ -497,14 +492,14 @@ Methode:
Standard_Real Dz = D.Dot(z2);
D.SetCoord(Dx,Dy,Dz);
// Calcul de V ...
// Calculate V ...
gp_Pnt O1 = C1.Location();
gp_Pnt O2 = C2.Location();
gp_Vec O2O1 (O2,O1);
O2O1.SetCoord(O2O1.Dot(x2), O2O1.Dot(y2), O2O1.Dot(z2));
gp_XYZ Vxyz = (D.XYZ()*(O2O1.Dot(D)))-O2O1.XYZ();
// Calcul des coefficients de l equation en Cos et Sin ...
// Calculate the coefficients of the equation by Cos and Sin ...
Standard_Real MajR = C2.MajorRadius();
Standard_Real MinR = C2.MinorRadius();
Standard_Real A5 = MajR*MinR*Dx*Dy;
@@ -528,7 +523,7 @@ Methode:
ExtremaExtElC_TrigonometricRoots Sol(A1,A2,A3,A4,A5,0.,PI+PI);
if (!Sol.IsDone()) { return; }
// Stockage des solutions ...
// Storage of solutions ...
gp_Pnt P1,P2;
Standard_Real U1,U2;
Standard_Integer NbSol = Sol.NbSolutions();
@@ -553,46 +548,45 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1,
const gp_Hypr& C2)
{
/*-----------------------------------------------------------------------------
Fonction:
Recherche des distances extremales entre la droite C1 et l'hyperbole C2.
Function:
Find extrema between straight line C1 and hyperbola C2.
Methode:
Soit P1=C1(u1) et P2=C2(u2) deux points solutions
D la direction de la droite C1
T la tangente au point P2;
Alors, ( P1P2.D = 0. (1)
( P1P2.T = 0. (2)
Soit O1 et O2 les origines de C1 et C2;
Alors, (1) <=> (O1P2-u1*D).D = 0. car O1P1 = u1*D
<=> u1 = O1P2.D car D.D = 1.
Method:
Let P1=C1(u1) and P2=C2(u2) be two solution points
D the direction of straight line C1
T the tangent at point P2;
Then, ( P1P2.D = 0. (1)
( P1P2.T = 0. (2)
Let O1 and O2 be the origins of C1 and C2;
Then, (1) <=> (O1P2-u1*D).D = 0. as O1P1 = u1*D
<=> u1 = O1P2.D as D.D = 1.
(2) <=> (P1O2 + O2P2).T= 0.
<=> ((P2O1.D)D+O1O2 + O2P2).T = 0. car P1O1 = -u1*D = (P2O1.D)D
<=> ((P2O1.D)D+O1O2 + O2P2).T = 0. as P1O1 = -u1*D = (P2O1.D)D
<=> (((P2O2+O2O1).D)D+O1O2 + O2P2).T = 0.
<=> (P2O2.D)(D.T)+((O2O1.D)D-O2O1).T + O2P2.T= 0.
On se place dans le repere de l'hyperbole; soit:
en ecrivant P (R* Chu, r* Shu, 0.0)
et Chu = (v**2 + 1)/(2*v) ,
Shu = (V**2 - 1)/(2*v)
We are in the reference of the hyperbola; let:
by writing P (R* Chu, r* Shu, 0.0)
and Chu = (v**2 + 1)/(2*v) ,
Shu = (V**2 - 1)/(2*v)
T(R*Shu, r*Chu)
D (Dx,Dy,Dz),
V (Vx,Vy,Vz) = (O2O1.D)D-O2O1;
Alors, on obtient l'equation en v suivante:
Then we obtain the following equation by v:
(-2*R*r*Dx*Dy - R*R*Dx*Dx-r*r*Dy*Dy + R*R + r*r) * v**4 +
(2*R*Vx + 2*r*Vy) * v**3 +
(-2*R*Vx + 2*r*Vy) * v +
(-2*R*r*Dx*Dy - (R*R*Dx*Dx-r*r*Dy*Dy + R*R + r*r)) = 0
On utilise l'algorithme math_DirectPolynomialRoots pour resoudre
cette equation.
Use the algorithm math_DirectPolynomialRoots to solve this equation.
-----------------------------------------------------------------------------*/
myIsPar = Standard_False;
myDone = Standard_False;
myNbExt = 0;
// Calcul de T1 dans le repere de l'hyperbole ...
// Calculate T1 in the reference of the hyperbola...
gp_Dir D = C1.Direction();
gp_Dir D1 = D;
gp_Dir x2, y2, z2;
@@ -604,7 +598,7 @@ Methode:
Standard_Real Dz = D.Dot(z2);
D.SetCoord(Dx,Dy,Dz);
// Calcul de V ...
// Calculate V ...
gp_Pnt O1 = C1.Location();
gp_Pnt O2 = C2.Location();
gp_Vec O2O1 (O2,O1);
@@ -613,7 +607,7 @@ Methode:
Standard_Real Vx = Vxyz.X();
Standard_Real Vy = Vxyz.Y();
// Calcul des coefficients de l equation en v
// Calculate coefficients of the equation by v
Standard_Real R = C2.MajorRadius();
Standard_Real r = C2.MinorRadius();
Standard_Real a = -2*R*r*Dx*Dy;
@@ -626,7 +620,7 @@ Methode:
math_DirectPolynomialRoots Sol(A1,A2,0.0,A4, A5);
if (!Sol.IsDone()) { return; }
// Stockage des solutions ...
// Store solutions ...
gp_Pnt P1,P2;
Standard_Real U1,U2, v;
Standard_Integer NbSol = Sol.NbSolutions();
@@ -653,42 +647,41 @@ Extrema_ExtElC::Extrema_ExtElC (const gp_Lin& C1,
const gp_Parab& C2)
{
/*-----------------------------------------------------------------------------
Fonction:
Recherche des distances extremales entre la droite C1 et la parabole C2.
Function:
Find extreme distances between straight line C1 and parabole C2.
Methode:
Soit P1=C1(u1) et P2=C2(u2) deux points solutions
D la direction de la droite C1
T la tangente au point P2;
Alors, ( P1P2.D = 0. (1)
( P1P2.T = 0. (2)
Soit O1 et O2 les origines de C1 et C2;
Alors, (1) <=> (O1P2-u1*D).D = 0. car O1P1 = u1*D
<=> u1 = O1P2.D car D.D = 1.
Method:
Let P1=C1(u1) and P2=C2(u2) be two solution points
D the direction of straight line C1
T the tangent to point P2;
Then, ( P1P2.D = 0. (1)
( P1P2.T = 0. (2)
Let O1 and O2 be the origins of C1 and C2;
Then, (1) <=> (O1P2-u1*D).D = 0. as O1P1 = u1*D
<=> u1 = O1P2.D as D.D = 1.
(2) <=> (P1O2 + O2P2).T= 0.
<=> ((P2O1.D)D+O1O2 + O2P2).T = 0. car P1O1 = -u1*D = (P2O1.D)D
<=> ((P2O1.D)D+O1O2 + O2P2).T = 0. as P1O1 = -u1*D = (P2O1.D)D
<=> (((P2O2+O2O1).D)D+O1O2 + O2P2).T = 0.
<=> (P2O2.D)(D.T)+((O2O1.D)D-O2O1).T + O2P2.T = 0.
On se place dans le repere de la parabole; soit:
We are in the reference of the parabola; let:
P2 (y*y/(2*p), y, 0)
T (y/p, 1, 0)
D (Dx,Dy,Dz),
V (Vx,Vy,Vz) = (O2O1.D)D-O2O1;
Alors, on obtient l'equation en y suivante:
Then, get the following equation by y:
((1-Dx*Dx)/(2*p*p)) * y*y*y + A1
(-3*Dx*Dy/(2*p)) * y*y + A2
(1-Dy*Dy + Vx/p) * y + A3
Vy = 0. A4
On utilise l'algorithme math_DirectPolynomialRoots pour resoudre
cette equation.
Use the algorithm math_DirectPolynomialRoots to solve this equation.
-----------------------------------------------------------------------------*/
myIsPar = Standard_False;
myDone = Standard_False;
myNbExt = 0;
// Calcul de T1 dans le repere de la parabole ...
// Calculate T1 in the reference of the parabola...
gp_Dir D = C1.Direction();
gp_Dir D1 = D;
gp_Dir x2, y2, z2;
@@ -700,14 +693,14 @@ Methode:
Standard_Real Dz = D.Dot(z2);
D.SetCoord(Dx,Dy,Dz);
// Calcul de V ...
// Calculate V ...
gp_Pnt O1 = C1.Location();
gp_Pnt O2 = C2.Location();
gp_Vec O2O1 (O2,O1);
O2O1.SetCoord(O2O1.Dot(x2), O2O1.Dot(y2), O2O1.Dot(z2));
gp_XYZ Vxyz = (D.XYZ()*(O2O1.Dot(D)))-O2O1.XYZ();
// Calcul des coefficients de l equation en y
// Calculate coefficients of the equation by y
Standard_Real P = C2.Parameter();
Standard_Real A1 = (1-Dx*Dx)/(2.0*P*P);
Standard_Real A2 = (-3.0*Dx*Dy/(2.0*P));
@@ -717,7 +710,7 @@ Methode:
math_DirectPolynomialRoots Sol(A1,A2,A3,A4);
if (!Sol.IsDone()) { return; }
// Stockage des solutions ...
// Storage of solutions ...
gp_Pnt P1,P2;
Standard_Real U1,U2;
Standard_Integer NbSol = Sol.NbSolutions();