mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0022312: Translation of french commentaries in OCCT files
This commit is contained in:
@@ -15,13 +15,13 @@
|
||||
#include <gp_Trsf2d.hxx>
|
||||
|
||||
//Attention :
|
||||
//Pour eviter de trainer des tableaux persistent dans les champs
|
||||
//on dimensionne les tableaux au maxi (TheNbKnots et TheNbPoles)
|
||||
//qui correspondent au cercle complet. Pour un arc de cercle on a
|
||||
//evidemment besoin de moins de poles et de noeuds, c'est pourquoi les
|
||||
//champs nbKnots et nbPoles sont presents et sont mis a jour dans le
|
||||
//constructeur d'un arc de cercle B-spline pour tenir compte du nombre
|
||||
//effectif de poles et de noeuds.
|
||||
//To avoid use of persistent tables in the fields
|
||||
//the tables are dimensioned to the maximum (TheNbKnots and TheNbPoles)
|
||||
//that correspond to the full circle. For an arc of circle there is a
|
||||
//need of less poles and nodes, that is why the fields
|
||||
//nbKnots and nbPoles are present and updated in the
|
||||
//constructor of an arc of B-spline circle to take into account
|
||||
//the real number of poles and nodes.
|
||||
|
||||
|
||||
// parametrization :
|
||||
@@ -55,8 +55,8 @@ Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve
|
||||
R = C.Radius() ;
|
||||
if (Parameterisation != Convert_TgtThetaOver2 &&
|
||||
Parameterisation != Convert_RationalC1) {
|
||||
// Dans ce cas BuildCosAndSin ne sait pas gerer la periodicite
|
||||
// => on trim sur 0,2*PI
|
||||
// In case if BuildCosAndSin does not know how to manage the periodicity
|
||||
// => trim on 0,2*PI
|
||||
isperiodic = Standard_False;
|
||||
Convert_ConicToBSplineCurve::
|
||||
BuildCosAndSin(Parameterisation,
|
||||
@@ -99,8 +99,8 @@ Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve
|
||||
value = -R ;
|
||||
}
|
||||
|
||||
// On replace la bspline dans le repere du cercle.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the reference of the circle.
|
||||
// and calculate the weight of the bspline.
|
||||
|
||||
for (ii = 1; ii <= nbPoles ; ii++) {
|
||||
poles->ChangeArray1()(ii).SetCoord(1, R * CosNumeratorPtr->Value(ii)) ;
|
||||
@@ -164,8 +164,8 @@ Convert_CircleToBSplineCurve::Convert_CircleToBSplineCurve
|
||||
value = -R ;
|
||||
}
|
||||
|
||||
// On replace la bspline dans le repere du cercle.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the reference of the circle.
|
||||
// and calculate the weight of the bspline.
|
||||
|
||||
for (ii = 1; ii <= nbPoles ; ii++) {
|
||||
poles->ChangeArray1()(ii).SetCoord(1, R * CosNumeratorPtr->Value(ii)) ;
|
||||
|
@@ -2,9 +2,6 @@
|
||||
// Created: Wed Oct 20 14:55:08 1993
|
||||
// Author: Bruno DUMORTIER
|
||||
// <dub@topsn3>
|
||||
// modified 25/06/1996 PMN : Ajout d'une tolerance Angulaire dans le
|
||||
// constructeur pour le test de continuite G1 (1 Radians c'etait trop
|
||||
// cf BUG PRO4481)
|
||||
|
||||
#include <Convert_CompBezierCurves2dToBSplineCurve2d.ixx>
|
||||
|
||||
@@ -161,7 +158,7 @@ void Convert_CompBezierCurves2dToBSplineCurve2d::Perform()
|
||||
TColgp_Array1OfPnt2d Points(1, myDegree+1);
|
||||
|
||||
for (i = LowerI ; i <= UpperI ; i++) {
|
||||
// 1- Elever la courbe de Bezier au degre maximum.
|
||||
// 1- Rise Bezier curve to the maximum degree.
|
||||
Deg = mySequence(i)->Length()-1;
|
||||
Inc = myDegree - Deg;
|
||||
if ( Inc > 0) {
|
||||
@@ -173,13 +170,13 @@ void Convert_CompBezierCurves2dToBSplineCurve2d::Perform()
|
||||
Points = mySequence(i)->Array1();
|
||||
}
|
||||
|
||||
// 2- Traiter le noeud de jonction entre 2 courbes de Bezier.
|
||||
// 2- Process the node of junction between Bezier curves.
|
||||
if (i == LowerI) {
|
||||
// Traitement du noeud initial de la BSpline.
|
||||
// Processing of initial node of the BSpline.
|
||||
for (Standard_Integer j = 1 ; j <= MaxDegree ; j++) {
|
||||
CurvePoles.Append(Points(j));
|
||||
}
|
||||
CurveKnVals(1) = 1.; // Pour amorcer la serie.
|
||||
CurveKnVals(1) = 1.; // To begin the series.
|
||||
KnotsMultiplicities.Append(MaxDegree+1);
|
||||
Det = 1.;
|
||||
}
|
||||
@@ -194,12 +191,11 @@ void Convert_CompBezierCurves2dToBSplineCurve2d::Perform()
|
||||
Lambda = Sqrt(D2/D1);
|
||||
|
||||
|
||||
// Traitement de la tangence entre la Bezier et sa precedente.
|
||||
// Ceci permet d''assurer au moins une continuite C1 si
|
||||
// les tangentes sont coherentes.
|
||||
// Processing of the tangency between the Bezier and the previous.
|
||||
// This allows guaranteeing at least continuity C1 if the tangents are coherent.
|
||||
|
||||
|
||||
// Test de l'angle a myAngular
|
||||
// Test of angle at myAngular
|
||||
|
||||
if (V1.Magnitude() > gp::Resolution() &&
|
||||
V2.Magnitude() > gp::Resolution() &&
|
||||
@@ -216,7 +212,7 @@ void Convert_CompBezierCurves2dToBSplineCurve2d::Perform()
|
||||
KnotsMultiplicities.Append(MaxDegree);
|
||||
}
|
||||
|
||||
// Stocker les poles.
|
||||
// Store poles.
|
||||
for (Standard_Integer j = 2 ; j <= MaxDegree ; j++) {
|
||||
CurvePoles.Append(Points(j));
|
||||
}
|
||||
@@ -225,14 +221,14 @@ void Convert_CompBezierCurves2dToBSplineCurve2d::Perform()
|
||||
|
||||
|
||||
if (i == UpperI) {
|
||||
// Traitement du noeud terminal de la BSpline.
|
||||
// Process end node of the BSpline.
|
||||
CurvePoles.Append(Points(MaxDegree+1));
|
||||
KnotsMultiplicities.Append(MaxDegree+1);
|
||||
}
|
||||
P1 = Points(MaxDegree);
|
||||
}
|
||||
|
||||
// Corriger les valeurs nodales pour les faire varier dans [0.,1.].
|
||||
// Correct nodal values to make them variable within [0.,1.].
|
||||
CurveKnots.Append(0.0);
|
||||
for (i = 2 ; i <= NbrCurv ; i++) {
|
||||
CurveKnots.Append(CurveKnots(i-1) + (CurveKnVals(i-1)/Det));
|
||||
|
@@ -2,9 +2,7 @@
|
||||
// Created: Wed Oct 20 14:55:08 1993
|
||||
// Author: Bruno DUMORTIER
|
||||
// <dub@topsn3>
|
||||
// modified 25/06/1996 PMN : Ajout d'une tolerance Angulaire dans le
|
||||
// constructeur pour le test de continuite G1 (1 Radians c'etait trop
|
||||
// cf BUG PRO4481)
|
||||
|
||||
|
||||
#include <Convert_CompBezierCurvesToBSplineCurve.ixx>
|
||||
|
||||
@@ -158,7 +156,7 @@ void Convert_CompBezierCurvesToBSplineCurve::Perform()
|
||||
TColgp_Array1OfPnt Points(1, myDegree+1);
|
||||
|
||||
for (i = LowerI ; i <= UpperI ; i++) {
|
||||
// 1- Elever la courbe de Bezier au degre maximum.
|
||||
// 1- Raise the Bezier curve to the maximum degree.
|
||||
Deg = mySequence(i)->Length()-1;
|
||||
Inc = myDegree - Deg;
|
||||
if ( Inc > 0) {
|
||||
@@ -170,13 +168,13 @@ void Convert_CompBezierCurvesToBSplineCurve::Perform()
|
||||
Points = mySequence(i)->Array1();
|
||||
}
|
||||
|
||||
// 2- Traiter le noeud de jonction entre 2 courbes de Bezier.
|
||||
// 2- Process the node of junction between 2 Bezier curves.
|
||||
if (i == LowerI) {
|
||||
// Traitement du noeud initial de la BSpline.
|
||||
// Processing of the initial node of the BSpline.
|
||||
for (Standard_Integer j = 1 ; j <= MaxDegree ; j++) {
|
||||
CurvePoles.Append(Points(j));
|
||||
}
|
||||
CurveKnVals(1) = 1.; // Pour amorcer la serie.
|
||||
CurveKnVals(1) = 1.; // To begin the series.
|
||||
KnotsMultiplicities.Append(MaxDegree+1);
|
||||
Det = 1.;
|
||||
}
|
||||
@@ -191,9 +189,9 @@ void Convert_CompBezierCurvesToBSplineCurve::Perform()
|
||||
Lambda = Sqrt(D2/D1);
|
||||
// cout << "D1, D2, Lambda : " << D1 << " " << D2 << " " << Lambda << endl;
|
||||
|
||||
// Traitement de la tangence entre la Bezier et sa precedente.
|
||||
// Ceci permet d''assurer au moins une continuite C1 si
|
||||
// les tangentes sont coherentes.
|
||||
// Processing of the tangency between Bezier and the previous.
|
||||
// This allows to guarantee at least a C1 continuity if the tangents are
|
||||
// coherent.
|
||||
|
||||
if (V1.Magnitude() > gp::Resolution() &&
|
||||
V2.Magnitude() > gp::Resolution() &&
|
||||
@@ -217,7 +215,7 @@ void Convert_CompBezierCurvesToBSplineCurve::Perform()
|
||||
Det += CurveKnVals(i) ;
|
||||
}
|
||||
|
||||
// Stocker les poles.
|
||||
// Store the poles.
|
||||
for (Standard_Integer j = 2 ; j <= MaxDegree ; j++) {
|
||||
CurvePoles.Append(Points(j));
|
||||
}
|
||||
@@ -226,14 +224,14 @@ void Convert_CompBezierCurvesToBSplineCurve::Perform()
|
||||
|
||||
|
||||
if (i == UpperI) {
|
||||
// Traitement du noeud terminal de la BSpline.
|
||||
// Processing of the end node of the BSpline.
|
||||
CurvePoles.Append(Points(MaxDegree+1));
|
||||
KnotsMultiplicities.Append(MaxDegree+1);
|
||||
}
|
||||
P1 = Points(MaxDegree);
|
||||
}
|
||||
|
||||
// Corriger les valeurs nodales pour les faire varier dans [0.,1.].
|
||||
// Correct nodal values to make them variable within [0.,1.].
|
||||
CurveKnots.Append(0.0);
|
||||
// cout << "Convert : Det = " << Det << endl;
|
||||
for (i = 2 ; i <= NbrCurv ; i++) {
|
||||
|
@@ -26,7 +26,7 @@ static void ComputePoles( const Standard_Real R,
|
||||
|
||||
Standard_Integer i;
|
||||
|
||||
// Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
|
||||
@@ -86,9 +86,9 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
|
||||
isvperiodic = Standard_False;
|
||||
|
||||
Standard_Integer i,j;
|
||||
// construction du cone dans le repere de reference xOy.
|
||||
// construction of cone in the reference mark xOy.
|
||||
|
||||
// Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
|
||||
@@ -112,8 +112,8 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
|
||||
vknots(1) = V1; vmults(1) = 2;
|
||||
vknots(2) = V2; vmults(2) = 2;
|
||||
|
||||
// On replace la bspline dans le repere de la sphere.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the mark of the sphere.
|
||||
// and calculate the weight of the bspline.
|
||||
Standard_Real W1;
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( C.Position(), gp::XOY());
|
||||
@@ -151,7 +151,7 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
|
||||
isuperiodic = Standard_True;
|
||||
isvperiodic = Standard_False;
|
||||
|
||||
// construction du cone dans le repere de reference xOy.
|
||||
// construction of the cone in the reference mark xOy.
|
||||
|
||||
Standard_Real R = C.RefRadius();
|
||||
Standard_Real A = C.SemiAngle();
|
||||
@@ -170,8 +170,8 @@ Convert_ConeToBSplineSurface::Convert_ConeToBSplineSurface
|
||||
vknots(1) = V1; vmults(1) = 2;
|
||||
vknots(2) = V2; vmults(2) = 2;
|
||||
|
||||
// On replace la bspline dans le repere du cone.
|
||||
// et on calcule les poids de la bspline.
|
||||
// replace bspline in the mark of the cone.
|
||||
// and calculate the weight of bspline.
|
||||
Standard_Real W;
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( C.Position(), gp::XOY());
|
||||
|
@@ -26,7 +26,7 @@ static void ComputePoles( const Standard_Real R,
|
||||
|
||||
Standard_Integer i;
|
||||
|
||||
// Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
|
||||
@@ -78,9 +78,9 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
|
||||
isvperiodic = Standard_False;
|
||||
|
||||
Standard_Integer i,j;
|
||||
// construction du cylindre dans le repere de reference xOy.
|
||||
// construction of the cylinder in the reference mark xOy.
|
||||
|
||||
// Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
Standard_Real AlfaU = deltaU / ( nbUSpans * 2);
|
||||
@@ -103,8 +103,8 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
|
||||
vknots(1) = V1; vmults(1) = 2;
|
||||
vknots(2) = V2; vmults(2) = 2;
|
||||
|
||||
// On replace la bspline dans le repere de la sphere.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace bspline in the mark of the sphere.
|
||||
// and calculate the weight of the bspline.
|
||||
Standard_Real W1;
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( Cyl.Position(), gp::XOY());
|
||||
@@ -142,7 +142,7 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
|
||||
isuperiodic = Standard_True;
|
||||
isvperiodic = Standard_False;
|
||||
|
||||
// construction du cylindre dans le repere de reference xOy.
|
||||
// construction of the cylinder in the reference mark xOy.
|
||||
|
||||
Standard_Real R = Cyl.Radius();
|
||||
|
||||
@@ -160,8 +160,8 @@ Convert_CylinderToBSplineSurface::Convert_CylinderToBSplineSurface
|
||||
vknots(1) = V1; vmults(1) = 2;
|
||||
vknots(2) = V2; vmults(2) = 2;
|
||||
|
||||
// On replace la bspline dans le repere du cone.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline inn the mark of the cone.
|
||||
// and calculate the weight of the bspline.
|
||||
Standard_Real W;
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( Cyl.Position(), gp::XOY());
|
||||
|
@@ -18,16 +18,16 @@
|
||||
#include <Precision.hxx>
|
||||
|
||||
//Attention :
|
||||
//Pour eviter de trainer des tableaux persistent dans les champs
|
||||
//on dimensionne les tableaux au maxi (TheNbKnots et TheNbPoles)
|
||||
//qui correspondent au cercle complet. Pour un arc de cercle on a
|
||||
//evidemment besoin de moins de poles et de noeuds, c'est pourquoi les
|
||||
//champs nbKnots et nbPoles sont presents et sont mis a jour dans le
|
||||
//constructeur d'un arc de cercle B-spline pour tenir compte du nombre
|
||||
//effectif de poles et de noeuds.
|
||||
//To avoid use of persistent tables in the fields
|
||||
//the tables are dimensioned to the maximum (TheNbKnots and TheNbPoles)
|
||||
//that correspond to the full circle. For an arc of circle there is a
|
||||
//need of less poles and nodes, that is why the fields
|
||||
//nbKnots and nbPoles are present and updated in the
|
||||
//constructor of an arc of B-spline circle to take into account
|
||||
//the real number of poles and nodes.
|
||||
|
||||
|
||||
// parametrization :
|
||||
// parameterization :
|
||||
// Reference : Rational B-spline for Curve and Surface Representation
|
||||
// Wayne Tiller CADG September 1983
|
||||
//
|
||||
@@ -62,8 +62,8 @@ Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve
|
||||
|
||||
if (Parameterisation != Convert_TgtThetaOver2 &&
|
||||
Parameterisation != Convert_RationalC1) {
|
||||
// Dans ce cas BuildCosAndSin ne sait pas gerer la periodicite
|
||||
// => on trim sur 0,2*PI
|
||||
// If BuildCosAndSin cannot manage the periodicity
|
||||
// => trim on 0,2*PI
|
||||
isperiodic = Standard_False;
|
||||
Convert_ConicToBSplineCurve::
|
||||
BuildCosAndSin(Parameterisation,
|
||||
@@ -105,8 +105,8 @@ Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve
|
||||
value = -r ;
|
||||
}
|
||||
|
||||
// On replace la bspline dans le repere du cercle.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the mark of the circle.
|
||||
// and calculate the weight of the bspline.
|
||||
|
||||
for (ii = 1; ii <= nbPoles ; ii++) {
|
||||
poles->ChangeArray1()(ii).SetCoord(1, R * CosNumeratorPtr->Value(ii)) ;
|
||||
@@ -167,8 +167,8 @@ Convert_EllipseToBSplineCurve::Convert_EllipseToBSplineCurve
|
||||
value = -r ;
|
||||
}
|
||||
|
||||
// On replace la bspline dans le repere du cercle.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the mark of the circle.
|
||||
// and calculate the weight of the bspline.
|
||||
|
||||
for (ii = 1; ii <= nbPoles ; ii++) {
|
||||
poles->ChangeArray1()(ii).SetCoord(1, R * CosNumeratorPtr->Value(ii)) ;
|
||||
|
@@ -43,7 +43,7 @@ Convert_HyperbolaToBSplineCurve::Convert_HyperbolaToBSplineCurve
|
||||
knots->ChangeArray1()(1) = UF; mults->ChangeArray1()(1) = 3;
|
||||
knots->ChangeArray1()(2) = UL; mults->ChangeArray1()(2) = 3;
|
||||
|
||||
// construction de l hyperbole dans le repere de reference xOy.
|
||||
// construction of hyperbola in the reference xOy.
|
||||
|
||||
Standard_Real R = H.MajorRadius();
|
||||
Standard_Real r = H.MinorRadius();
|
||||
@@ -51,10 +51,10 @@ Convert_HyperbolaToBSplineCurve::Convert_HyperbolaToBSplineCurve
|
||||
gp_Dir2d Oy = H.Axis().YDirection();
|
||||
Standard_Real S = ( Ox.X() * Oy.Y() - Ox.Y() * Oy.X() > 0.) ? 1 : -1;
|
||||
|
||||
// poles exprimes dans le repere de reference
|
||||
// le 2eme pole est a l intersection des 2 tangentes a la courbe
|
||||
// aux pointx P(UF), P(UL)
|
||||
// le poids de ce pole est egal a : Cosh((UL-UF)/2)
|
||||
// poles expressed in the reference mark
|
||||
// the 2nd pole is at the intersection of 2 tangents to the curve
|
||||
// at points P(UF), P(UL)
|
||||
// the weight of this pole is equal to : Cosh((UL-UF)/2)
|
||||
|
||||
weights->ChangeArray1()(1) = 1.;
|
||||
weights->ChangeArray1()(2) = Cosh((UL-UF)/2);
|
||||
@@ -67,7 +67,7 @@ Convert_HyperbolaToBSplineCurve::Convert_HyperbolaToBSplineCurve
|
||||
poles->ChangeArray1()(2) = gp_Pnt2d( x, y);
|
||||
poles->ChangeArray1()(3) = gp_Pnt2d( R * Cosh(UL), S * r * Sinh(UL));
|
||||
|
||||
// on replace la bspline dans le repere de l hyperbole
|
||||
// replace the bspline in the mark of the hyperbola
|
||||
gp_Trsf2d Trsf;
|
||||
Trsf.SetTransformation( H.Axis().XAxis(), gp::OX2d());
|
||||
poles->ChangeArray1()(1).Transform( Trsf);
|
||||
|
@@ -52,7 +52,7 @@ Convert_ParabolaToBSplineCurve::Convert_ParabolaToBSplineCurve
|
||||
Standard_Real S = ( Ox.X() * Oy.Y() - Ox.Y() * Oy.X() > 0.) ? 1 : -1;
|
||||
|
||||
|
||||
// poles exprimes dans le repere de reference
|
||||
// poles expressed in the reference mark
|
||||
poles->ChangeArray1()(1) =
|
||||
gp_Pnt2d( ( UF * UF) / ( 2. * p), S * UF );
|
||||
poles->ChangeArray1()(2) =
|
||||
@@ -60,7 +60,7 @@ Convert_ParabolaToBSplineCurve::Convert_ParabolaToBSplineCurve
|
||||
poles->ChangeArray1()(3) =
|
||||
gp_Pnt2d( ( UL * UL) / ( 2. * p), S * UL );
|
||||
|
||||
// on replace la bspline dans le repere de la parabole.
|
||||
// replace the bspline in the mark of the parabola
|
||||
gp_Trsf2d Trsf;
|
||||
Trsf.SetTransformation( Prb.Axis().XAxis(), gp::OX2d());
|
||||
poles->ChangeArray1()(1).Transform( Trsf);
|
||||
|
@@ -2,7 +2,6 @@
|
||||
// Created: Tue Oct 10 15:56:28 1995
|
||||
// Author: Jacques GOUSSARD
|
||||
// <jag@bravox>
|
||||
//PMN 4/12/1997 On se ramene toujours sur [0, Delta] pour eviter les cas tordus
|
||||
|
||||
|
||||
#include <Convert_PolynomialCosAndSin.hxx>
|
||||
@@ -74,8 +73,8 @@ void BuildPolynomialCosAndSin
|
||||
Standard_Integer ii, degree = num_poles -1 ;
|
||||
locUFirst = UFirst ;
|
||||
|
||||
// On Rammene le UFirst dans [-2PI; 2PI]
|
||||
// afin de faire des rotation sans risque
|
||||
// Return UFirst in [-2PI; 2PI]
|
||||
// to make rotations without risk
|
||||
while (locUFirst > PI2) {
|
||||
locUFirst -= PI2;
|
||||
}
|
||||
@@ -83,18 +82,18 @@ void BuildPolynomialCosAndSin
|
||||
locUFirst += PI2;
|
||||
}
|
||||
|
||||
// on se ramene a l'arc [0, Delta]
|
||||
// Return to the arc [0, Delta]
|
||||
Delta = ULast - UFirst;
|
||||
middle = 0.5e0 * Delta ;
|
||||
//
|
||||
// on fait coincider la bisectrice du secteur angulaire que l on desire avec
|
||||
// l axe -Ox de definition du cercle en Bezier de degree 7 de sorte que le
|
||||
// parametre 1/2 de la Bezier soit exactement un point de la bissectrice du
|
||||
// secteur angulaire que l on veut.
|
||||
|
||||
// coincide the required bisector of the angular sector with
|
||||
// axis -Ox definition of the circle in Bezier of degree 7 so that
|
||||
// parametre 1/2 of Bezier was exactly a point of the bissectrice
|
||||
// of the required angular sector.
|
||||
//
|
||||
Angle = middle - PI ;
|
||||
//
|
||||
// Cercle de rayon 1. Voir Euclid
|
||||
// Circle of radius 1. See Euclid
|
||||
//
|
||||
|
||||
TColgp_Array1OfPnt2d TPoles(1,8),
|
||||
@@ -125,8 +124,8 @@ void BuildPolynomialCosAndSin
|
||||
t_min,
|
||||
t_max);
|
||||
//
|
||||
// puisque la Bezier est symetrique par rapport a la bissectrice du
|
||||
// secteur angulaire ...
|
||||
// as Bezier is symmetric correspondingly to the bissector
|
||||
// of the angular sector ...
|
||||
|
||||
trim_min = 1.0e0 - trim_max ;
|
||||
//
|
||||
@@ -155,7 +154,7 @@ void BuildPolynomialCosAndSin
|
||||
NewTPoles,
|
||||
BSplCLib::NoWeights());
|
||||
|
||||
// recalage sans doute superflu
|
||||
// readjustment is obviously redundant
|
||||
Standard_Real SinD = Sin(Delta), CosD = Cos(Delta);
|
||||
gp_Pnt2d Pdeb(1., 0.);
|
||||
gp_Pnt2d Pfin(CosD, SinD);
|
||||
@@ -166,14 +165,14 @@ void BuildPolynomialCosAndSin
|
||||
Pdeb.ChangeCoord() += theXY;
|
||||
NewTPoles(2) = Pdeb;
|
||||
|
||||
// Recalages a la Euclid
|
||||
// readjustment to Euclid
|
||||
dtg = NewTPoles(num_poles).Distance(NewTPoles(num_poles-1));
|
||||
NewTPoles(num_poles) = Pfin;
|
||||
theXY.SetCoord(dtg*SinD,-dtg*CosD);
|
||||
Pfin.ChangeCoord() += theXY;
|
||||
NewTPoles(num_poles-1) = Pfin;
|
||||
|
||||
// Rotation pour se ramener a l'arc [LocUFirst, LocUFirst+Delta]
|
||||
// Rotation to return to the arc [LocUFirst, LocUFirst+Delta]
|
||||
T.SetRotation(gp::Origin2d(), locUFirst);
|
||||
for (ii=1; ii<=num_poles; ii++) {
|
||||
NewTPoles(ii).Transform(T);
|
||||
|
@@ -26,7 +26,7 @@ static void ComputePoles ( const Standard_Real R,
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
// Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
Standard_Integer
|
||||
@@ -94,9 +94,9 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
|
||||
isvperiodic = Standard_False;
|
||||
|
||||
Standard_Integer i,j;
|
||||
// construction de la sphere dans le repere de reference xOy.
|
||||
// construction of the sphere in the reference mark xOy.
|
||||
|
||||
// Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
Standard_Integer
|
||||
@@ -125,8 +125,8 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
|
||||
vmults(1)++; vmults(nbVKnots)++;
|
||||
|
||||
|
||||
// On replace la bspline dans le repere de la sphere.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the reference of the sphere.
|
||||
// and calculate the weight of the bspline.
|
||||
Standard_Real W1, W2;
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( Sph.Position(), gp::XOY());
|
||||
@@ -228,8 +228,8 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
|
||||
CosU = Cos(AlfaU);
|
||||
}
|
||||
|
||||
// On replace la bspline dans le repere de la sphere.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the mark of the sphere.
|
||||
// and calculate the weight of bspline.
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( Sph.Position(), gp::XOY());
|
||||
|
||||
@@ -270,7 +270,7 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
|
||||
nbUKnots = 4;
|
||||
nbVKnots = 3;
|
||||
|
||||
// Construction de la sphere dans le repere reference xOy.
|
||||
// Construction of the sphere in the reference mark xOy.
|
||||
|
||||
Standard_Real R = Sph.Radius();
|
||||
|
||||
@@ -289,8 +289,8 @@ Convert_SphereToBSplineSurface::Convert_SphereToBSplineSurface
|
||||
vmults(1) = vmults(3) = 3;
|
||||
vmults(2) = 2;
|
||||
|
||||
// On replace la bspline dans le repere de la sphere.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the mark of the sphere.
|
||||
// and calculate the weight of the bspline.
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( Sph.Position(), gp::XOY());
|
||||
|
||||
|
@@ -27,7 +27,7 @@ static void ComputePoles ( const Standard_Real R,
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
// Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
Standard_Integer
|
||||
@@ -96,9 +96,9 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
isvperiodic = Standard_False;
|
||||
|
||||
Standard_Integer i,j;
|
||||
// construction du tore dans le repere de reference xOy.
|
||||
// construction of the torus in the reference mark xOy.
|
||||
|
||||
// Nombre de spans : ouverture maximale = 150 degres ( = PI / 1.2 rds)
|
||||
// Number of spans : maximum opening = 150 degrees ( = PI / 1.2 rds)
|
||||
Standard_Integer
|
||||
nbUSpans = (Standard_Integer)IntegerPart( 1.2 * deltaU / PI) + 1;
|
||||
Standard_Integer
|
||||
@@ -128,8 +128,8 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
vmults(1)++; vmults(nbVKnots)++;
|
||||
|
||||
|
||||
// On replace la bspline dans le repere du tore.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the reference of the torus.
|
||||
// and calculate the weight of the bspline.
|
||||
Standard_Real W1, W2;
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( T.Position(), gp::XOY());
|
||||
@@ -233,8 +233,8 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
CosU = Cos(AlfaU);
|
||||
}
|
||||
|
||||
// On replace la bspline dans le repere du tore.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the reference of the torus.
|
||||
// and calculate the weight of the bspline.
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( T.Position(), gp::XOY());
|
||||
|
||||
@@ -276,7 +276,7 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
nbUKnots = 4;
|
||||
nbVKnots = 4;
|
||||
|
||||
// Construction du Tore dans le repere reference xOy.
|
||||
// Construction of the Torus in the reference mark xOy.
|
||||
|
||||
Standard_Real R = T.MajorRadius();
|
||||
Standard_Real r = T.MinorRadius();
|
||||
@@ -291,8 +291,8 @@ Convert_TorusToBSplineSurface::Convert_TorusToBSplineSurface
|
||||
umults( i) = vmults( i) = 2;
|
||||
}
|
||||
|
||||
// On replace la bspline dans le repere du tore.
|
||||
// et on calcule les poids de la bspline.
|
||||
// Replace the bspline in the mark of the torus.
|
||||
// and calculate the weight of the bspline.
|
||||
gp_Trsf Trsf;
|
||||
Trsf.SetTransformation( T.Position(), gp::XOY());
|
||||
|
||||
|
Reference in New Issue
Block a user