From: ysn Date: Wed, 25 Jul 2018 15:13:26 +0000 (+0300) Subject: 0029987: Request for translation of French comments in the code X-Git-Tag: V7_4_0_beta~85 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FIR-2019-07-12;p=occt.git 0029987: Request for translation of French comments in the code French comments in two files have been translated in English. --- diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx index 6f624b5774..22cf3afe5d 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx @@ -14,12 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// Modification de l'interface -// Amelioration de l'aglo de remplissage -// 29-09-97 ; jct; correction du calcul des points doublons (tol 2d et non 3d) -// 16-10-97 ; jct; on remet un Raise au lieu du cout sous debug (sinon plantage dans k1fab) -// 03-11-97 ; jct; plus de reference a BRepAdaptor et BRepTools - #include #include #include @@ -75,25 +69,22 @@ #include #include -// pour la verif G2 -// pour les intersection entre les courbes -// projection + #ifdef DRAW #include #include #include #include -// 0 : Pas de display -// 1 : Display des Geometries et controle intermediaire -// 2 : Display du nombre de contrainte par courbe + Intersection -// 3 : Dump des contraintes dans Plate +// 0 : No display +// 1 : Display of Geometries and intermediary control +// 2 : Display of the number of constraints by curve + Intersection +// 3 : Dump of constraints in Plate static Standard_Integer NbPlan = 0; //static Standard_Integer NbCurv2d = 0; static Standard_Integer NbMark = 0; static Standard_Integer NbProj = 0; #endif -// pour mes tests #ifdef OCCT_DEBUG #include #include @@ -102,12 +93,12 @@ static Standard_Integer Affich=0; //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// // ========================================================= -// C O N S T R U C T E U R S +// C O N S T R U C T O R S // ========================================================= //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// //--------------------------------------------------------- -// Constructeur compatible avec l'ancienne version +// Constructor compatible with the old version //--------------------------------------------------------- GeomPlate_BuildPlateSurface::GeomPlate_BuildPlateSurface ( const Handle(TColStd_HArray1OfInteger)& NPoints, @@ -129,9 +120,8 @@ myTol2d(Tol2d), myTol3d(Tol3d), myTolAng(TolAng), myNbBounds(0) -{ Standard_Integer NTCurve=TabCurve->Length();// Nombre de contraintes lineaires - myNbPtsOnCur = 0; // Debrayage du calcul du nombre de points - // en fonction de la longueur +{ Standard_Integer NTCurve=TabCurve->Length();// Number of linear constraints + myNbPtsOnCur = 0; // Different calculation of the number of points depending on the length myLinCont = new GeomPlate_HSequenceOfCurveConstraint; myPntCont = new GeomPlate_HSequenceOfPointConstraint; if (myNbIter<1) @@ -150,7 +140,7 @@ myNbBounds(0) throw Standard_ConstructionError("GeomPlate : the resolution is impossible if the number of constraints points is 0"); if (myDegree<2) throw Standard_ConstructionError("GeomPlate ; the degree resolution must be upper of 2"); - // Remplissage des champs passage de l'ancien constructeur au nouveau + // Filling fields passing from the old constructor to the new one for(i=1;i<=NTCurve;i++) { Handle(GeomPlate_CurveConstraint) Cont = new GeomPlate_CurveConstraint ( TabCurve->Value(i), @@ -165,7 +155,7 @@ myNbBounds(0) } //------------------------------------------------------------------ -// Constructeur avec surface d'init et degre de resolution de plate +// Constructor with initial surface and degree //------------------------------------------------------------------ GeomPlate_BuildPlateSurface::GeomPlate_BuildPlateSurface ( const Handle(Geom_Surface)& Surf, @@ -190,7 +180,7 @@ myNbBounds(0) { if (myNbIter<1) throw Standard_ConstructionError("GeomPlate : Number of iteration must be >= 1"); if (myDegree<2) - throw Standard_ConstructionError("GeomPlate : the degree resolution must be upper of 2"); + throw Standard_ConstructionError("GeomPlate : the degree must be above 2"); myLinCont = new GeomPlate_HSequenceOfCurveConstraint; myPntCont = new GeomPlate_HSequenceOfPointConstraint; mySurfInitIsGive=Standard_True; @@ -201,7 +191,7 @@ myNbBounds(0) //--------------------------------------------------------- -// Constructeur avec degre de resolution de plate +// Constructor with degree //--------------------------------------------------------- GeomPlate_BuildPlateSurface::GeomPlate_BuildPlateSurface ( const Standard_Integer Degree, @@ -235,27 +225,28 @@ myNbBounds(0) //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// // ========================================================= -// M E T H O D E S P U B L I Q U E S +// P U B L I C M E T H O D S // ========================================================= //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// //------------------------------------------------------------------------- -// Fonction : TrierTab, Fonction interne, ne fait partie de la classe +// Function : TrierTab, internal Function, does not belong to class //------------------------------------------------------------------------- -// Reordonne le tableau des permutations -// Apres l'appel a CourbeJointive l'ordre des courbes est modifie -// Ex : ordre init des courbe ==> A B C D E F -// Dans TabInit on note ==> 1 2 3 4 5 6 -// apres CourbeJointive ==> A E C B D F +// Reorder the table of transformations +// After the call of CourbeJointive the order of curves is modified +// Ex : initial order of curves ==> A B C D E F +// In TabInit we note ==> 1 2 3 4 5 6 +// after CourbeJointive ==> A E C B D F // TabInit ==> 1 5 3 2 4 6 -// apres TrierTab le Tableau contient ==> 1 4 3 5 2 6 -// On peut ainsi acceder a la 2eme courbe en prenant TabInit[2] -// c'est a dire la 4eme du tableau des courbes classees +// after TrierTab the Table contains ==> 1 4 3 5 2 6 +// It is also possible to access the 2nd curve by taking TabInit[2] +// i.e. the 4th from the table of classified curves //------------------------------------------------------------------------- -void TrierTab(Handle(TColStd_HArray1OfInteger)& Tab) -{ // Trie le tableau des permutations pour retrouver l'ordre initial +static void TrierTab(Handle(TColStd_HArray1OfInteger)& Tab) +{ + // Parse the table of transformations to find the initial order Standard_Integer Nb=Tab->Length(); TColStd_Array1OfInteger TabTri(1,Nb); for (Standard_Integer i=1;i<=Nb;i++) @@ -264,10 +255,11 @@ void TrierTab(Handle(TColStd_HArray1OfInteger)& Tab) } //--------------------------------------------------------- -// Fonction : ProjectCurve +// Function : ProjectCurve //--------------------------------------------------------- Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Adaptor3d_HCurve)& Curv) -{ // Projection d'une courbe sur un plan +{ + // Project a curve on a plane Handle(Geom2d_Curve) Curve2d ; Handle(GeomAdaptor_HSurface) hsur = new GeomAdaptor_HSurface(mySurfInit); gp_Pnt2d P2d; @@ -285,16 +277,16 @@ Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada { if (Projector.IsSinglePnt(1, P2d)) { - //solution ponctuelles + // solution in a point TColgp_Array1OfPnt2d poles(1, 2); poles.Init(P2d); Curve2d = new (Geom2d_BezierCurve) (poles); } else { - Curve2d.Nullify(); // Pas de solution continue + Curve2d.Nullify(); // No continuous solution #ifdef OCCT_DEBUG - cout << "BuildPlateSurace :: Pas de projection continue" << endl; + cout << "BuildPlateSurace :: No continuous projection" << endl; #endif } } @@ -324,10 +316,11 @@ Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada return Curve2d; } //--------------------------------------------------------- -// Fonction : ProjectedCurve +// Function : ProjectedCurve //--------------------------------------------------------- Handle(Adaptor2d_HCurve2d) GeomPlate_BuildPlateSurface::ProjectedCurve( Handle(Adaptor3d_HCurve)& Curv) -{ // Projection d'une courbe sur la surface d'init +{ + // Projection of a curve on the initial surface Handle(GeomAdaptor_HSurface) hsur = new GeomAdaptor_HSurface(mySurfInit); @@ -337,9 +330,9 @@ Handle(Adaptor2d_HCurve2d) GeomPlate_BuildPlateSurface::ProjectedCurve( Handle( if (Projector.NbCurves() != 1) { - HProjector.Nullify(); // Pas de solution continue + HProjector.Nullify(); // No continuous solution #ifdef OCCT_DEBUG - cout << "BuildPlateSurace :: Pas de projection continue" << endl; + cout << "BuildPlateSurace :: No continuous projection" << endl; #endif } else @@ -359,9 +352,9 @@ Handle(Adaptor2d_HCurve2d) GeomPlate_BuildPlateSurface::ProjectedCurve( Handle( } else { - HProjector.Nullify(); // Pas de solution continue + HProjector.Nullify(); // No continuous solution #ifdef OCCT_DEBUG - cout << "BuildPlateSurace :: Pas de projection complete" << endl; + cout << "BuildPlateSurace :: No complete projection" << endl; #endif } } @@ -369,9 +362,9 @@ Handle(Adaptor2d_HCurve2d) GeomPlate_BuildPlateSurface::ProjectedCurve( Handle( } //--------------------------------------------------------- -// Fonction : ProjectPoint +// Function : ProjectPoint //--------------------------------------------------------- -// Projete une point sur la surface d'init +// Projects a point on the initial surface //--------------------------------------------------------- gp_Pnt2d GeomPlate_BuildPlateSurface::ProjectPoint(const gp_Pnt &p3d) { Extrema_POnSurf P; @@ -399,13 +392,13 @@ gp_Pnt2d GeomPlate_BuildPlateSurface::ProjectPoint(const gp_Pnt &p3d) } //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// // ========================================================= -// M E T H O D E S P U B L I Q U E S +// P U B L I C M E T H O D S // ========================================================= //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// //--------------------------------------------------------- -// Fonction : Init +// Function : Init //--------------------------------------------------------- -// Initialise les contraintes lineaires et ponctuelles +// Initializes linear and point constraints //--------------------------------------------------------- void GeomPlate_BuildPlateSurface::Init() { myLinCont->Clear(); @@ -415,9 +408,9 @@ void GeomPlate_BuildPlateSurface::Init() } //--------------------------------------------------------- -// Fonction : LoadInitSurface +// Function : LoadInitSurface //--------------------------------------------------------- -// Charge la surface initiale +// Loads the initial surface //--------------------------------------------------------- void GeomPlate_BuildPlateSurface::LoadInitSurface(const Handle(Geom_Surface)& Surf) { mySurfInit = Surf; @@ -425,10 +418,10 @@ void GeomPlate_BuildPlateSurface::LoadInitSurface(const Handle(Geom_Surface)& Su } //--------------------------------------------------------- -//fonction : Add +// Function : Add //--------------------------------------------------------- //--------------------------------------------------------- -// Ajout d'une contrainte lineaire +// Adds a linear constraint //--------------------------------------------------------- void GeomPlate_BuildPlateSurface:: Add(const Handle(GeomPlate_CurveConstraint)& Cont) @@ -441,10 +434,10 @@ void GeomPlate_BuildPlateSurface::SetNbBounds( const Standard_Integer NbBounds ) } //--------------------------------------------------------- -//fonction : Add +// Function : Add //--------------------------------------------------------- //--------------------------------------------------------- -// Ajout d'une contrainte ponctuelle +// Adds a point constraint //--------------------------------------------------------- void GeomPlate_BuildPlateSurface:: Add(const Handle(GeomPlate_PointConstraint)& Cont) @@ -453,13 +446,13 @@ void GeomPlate_BuildPlateSurface:: } //--------------------------------------------------------- -//fonction : Perform -// Calcul la surface de remplissage avec les contraintes chargees +// Function : Perform +// Calculates the surface filled with loaded constraints //--------------------------------------------------------- void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator) & aProgress) { #ifdef OCCT_DEBUG - // Chronmetrage + // Timing OSD_Chronometer Chrono; Chrono.Reset(); Chrono.Start(); @@ -470,11 +463,10 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator myPlate.Init(); //===================================================================== - //Declaration des variables. + // Declaration of variables. //===================================================================== Standard_Integer NTLinCont = myLinCont->Length(), NTPntCont = myPntCont->Length(), NbBoucle=0; - // La variable NTPoint peut etre enlevee Standard_Boolean Fini=Standard_True; if ((NTLinCont + NTPntCont) == 0) { @@ -486,14 +478,14 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator } //====================================================================== - // Surface Initiale + // Initial Surface //====================================================================== if (!mySurfInitIsGive) ComputeSurfInit(aProgress); else { if (NTLinCont>=2) - { // Tableau des permutations pour conserver l'ordre initial voir TrierTab + { // Table of transformations to preserve the initial order, see TrierTab myInitOrder = new TColStd_HArray1OfInteger(1,NTLinCont); for (Standard_Integer l=1;l<=NTLinCont;l++) myInitOrder->SetValue(l,l); @@ -503,7 +495,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator cout<<"WARNING : Courbes non jointives a "< 0)//Patch { @@ -526,7 +518,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator myTolU,myTolV); //====================================================================== - // Projection des courbes + // Projection of curves //====================================================================== Standard_Boolean Ok = Standard_True; for (Standard_Integer i = 1; i <= NTLinCont; i++) @@ -592,7 +584,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator } //====================================================================== - // Projection des points + // Projection of points //====================================================================== for (Standard_Integer i=1;i<=NTPntCont;i++) { if (! myPntCont->Value(i)->HasPnt2dOnSurf()) { @@ -603,13 +595,13 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator } //====================================================================== - // Nbre de point par courbe + // Number of points by curve //====================================================================== if ((NTLinCont !=0)&&(myNbPtsOnCur!=0)) CalculNbPtsInit(); //====================================================================== - // Gestion des incompatibilites entre courbes + // Management of incompatibilites between curves //====================================================================== Handle(GeomPlate_HArray1OfSequenceOfReal) PntInter; Handle(GeomPlate_HArray1OfSequenceOfReal) PntG1G1; @@ -620,7 +612,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator } //====================================================================== - // Boucle pour obtenir une meilleur surface + // Loop to obtain a better surface //====================================================================== myFree = !myIsLinear; @@ -640,24 +632,24 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator NbBoucle++; if (NTLinCont!=0) { //==================================================================== - // Calcul le nombre de point total et le maximum de points par courbe + // Calculate the total number of points and the maximum of points by curve //==================================================================== Standard_Integer NPointMax=0; for (Standard_Integer i=1;i<=NTLinCont;i++) if ((myLinCont->Value(i)->NbPoints())>NPointMax) NPointMax=(Standard_Integer )( myLinCont->Value(i)->NbPoints()); //==================================================================== - // Discretisation des courbes + // Discretization of curves //==================================================================== Discretise(PntInter, PntG1G1); //==================================================================== - //Preparation des points de contrainte pour plate + // Preparation of constraint points for plate //==================================================================== LoadCurve( NbBoucle ); if ( myPntCont->Length() != 0) LoadPoint( NbBoucle ); //==================================================================== - //Resolution de la surface + // Construction of the surface //==================================================================== myPlate.SolveTI(myDegree, ComputeAnisotropie(), aProgress); @@ -670,7 +662,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator if (!myPlate.IsDone()) { #ifdef OCCT_DEBUG - cout << "WARNING : GeomPlate : abort calcul of Plate." << endl; + cout << "WARNING : GeomPlate : calculation of Plate failed" << endl; #endif return; } @@ -684,7 +676,7 @@ void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator if ((NbBoucle >= myNbIter)&&(!Fini)) { #ifdef OCCT_DEBUG - cout<<"Warning objectif non atteint"<Length(); Standard_Integer NTPntCont = myPntCont->Length(); gp_Pnt2d P2d; @@ -873,7 +865,7 @@ void GeomPlate_BuildPlateSurface:: Handle(GeomPlate_CurveConstraint) LinCont = myLinCont->Value(i); if (LinCont->Order()!=-1) { Standard_Integer NbPt=myParCont->Value(i).Length(); - // premier point de contrainte (j=0) + // first point of constraint (j=0) if (!LinCont->ProjectedCurve().IsNull()) P2d = LinCont->ProjectedCurve()->Value(myParCont->Value(i).Value(1)); @@ -910,7 +902,7 @@ void GeomPlate_BuildPlateSurface:: UV.SetX(P2d.Coord(1)); UV.SetY(P2d.Coord(2)); Seq2d.Append(UV); - // point milieu precedent + // point 1/2 previous if (!LinCont->ProjectedCurve().IsNull()) P2d = LinCont->ProjectedCurve()->Value((Ujp1+Uj)/2); @@ -928,7 +920,7 @@ void GeomPlate_BuildPlateSurface:: UV.SetX(P2d.Coord(1)); UV.SetY(P2d.Coord(2)); Seq2d.Append(UV); - // point 3/4 precedent + // point 3/4 previous if (!LinCont->ProjectedCurve().IsNull()) P2d = LinCont->ProjectedCurve()->Value((3*Ujp1+Uj)/4); @@ -946,7 +938,7 @@ void GeomPlate_BuildPlateSurface:: UV.SetX(P2d.Coord(1)); UV.SetY(P2d.Coord(2)); Seq2d.Append(UV); - // point de contrainte courant + // current constraint point if (!LinCont->ProjectedCurve().IsNull()) P2d = LinCont->ProjectedCurve()->Value(Ujp1); @@ -970,7 +962,7 @@ void GeomPlate_BuildPlateSurface:: } //--------------------------------------------------------- -// fonction : Disc3dContour +// Function : Disc3dContour //--------------------------------------------------------- void GeomPlate_BuildPlateSurface:: Disc3dContour (const Standard_Integer /*nbp*/, @@ -979,13 +971,13 @@ Disc3dContour (const Standard_Integer /*nbp*/, { #ifdef OCCT_DEBUG if (Seq3d.Length()!=4) - cout<<"nbp doit etre egal a 4 pour Disc3dContour"<Bounds(u1,v1,u2,v2); GeomAdaptor_Surface Surf(mySurfInit); @@ -1023,8 +1015,8 @@ Disc3dContour (const Standard_Integer /*nbp*/, if (myLinCont->Value(i)->Order()!=-1) { Standard_Integer NbPt=myParCont->Value(i).Length();; - // premier point de contrainte (j=0) - // Standard_Integer NbPt=myParCont->Length(); + // first constraint point (j=0) + // Standard_Integer NbPt=myParCont->Length(); if (iordre==0) { myLinCont->Value(i)->D0(myParCont->Value(i).Value(1),P3d); Pos.SetX(P3d.X()); @@ -1045,25 +1037,25 @@ Disc3dContour (const Standard_Integer /*nbp*/, { Standard_Real Uj=myParCont->Value(i).Value(j), Ujp1=myParCont->Value(i).Value(j+1); if (iordre==0) { - // point 1/4 precedent + // point 1/4 previous myLinCont->Value(i)->D0((Ujp1+3*Uj)/4,P3d); Pos.SetX(P3d.X()); Pos.SetY(P3d.Y()); Pos.SetZ(P3d.Z()); Seq3d.Append(Pos); - // point milieu precedent + // point 1/2 previous myLinCont->Value(i)->D0((Ujp1+Uj)/2,P3d); Pos.SetX(P3d.X()); Pos.SetY(P3d.Y()); Pos.SetZ(P3d.Z()); Seq3d.Append(Pos); - // point 3/4 precedent + // point 3/4 previous myLinCont->Value(i)->D0((3*Ujp1+Uj)/4,P3d); Pos.SetX(P3d.X()); Pos.SetY(P3d.Y()); Pos.SetZ(P3d.Z()); Seq3d.Append(Pos); - // point de contrainte courant + // current constraint point myLinCont->Value(i)->D0(Ujp1,P3d); Pos.SetX(P3d.X()); Pos.SetY(P3d.Y()); @@ -1071,28 +1063,28 @@ Disc3dContour (const Standard_Integer /*nbp*/, Seq3d.Append(Pos); } else { - // point 1/4 precedent + // point 1/4 previous myLinCont->Value(i)->D1((Ujp1+3*Uj)/4,P3d,v1h,v2h); v3h=v1h^v2h; Pos.SetX(v3h.X()); Pos.SetY(v3h.Y()); Pos.SetZ(v3h.Z()); Seq3d.Append(Pos); - // point milieu precedent + // point 1/2 previous myLinCont->Value(i)->D1((Ujp1+Uj)/2,P3d,v1h,v2h); v3h=v1h^v2h; Pos.SetX(v3h.X()); Pos.SetY(v3h.Y()); Pos.SetZ(v3h.Z()); Seq3d.Append(Pos); - // point 3/4 precedent + // point 3/4 previous myLinCont->Value(i)->D1((3*Ujp1+Uj)/4,P3d,v1h,v2h); v3h=v1h^v2h; Pos.SetX(v3h.X()); Pos.SetY(v3h.Y()); Pos.SetZ(v3h.Z()); Seq3d.Append(Pos); - // point de contrainte courant + // current constraint point myLinCont->Value(i)->D1(Ujp1,P3d,v1h,v2h); v3h=v1h^v2h; Pos.SetX(v3h.X()); @@ -1107,7 +1099,7 @@ Disc3dContour (const Standard_Integer /*nbp*/, //--------------------------------------------------------- -// fonction : IsDone +// Function : IsDone //--------------------------------------------------------- Standard_Boolean GeomPlate_BuildPlateSurface::IsDone() const { return myPlate.IsDone(); @@ -1116,14 +1108,14 @@ Standard_Boolean GeomPlate_BuildPlateSurface::IsDone() const //--------------------------------------------------------- -// fonction : Surface +// Function : Surface //--------------------------------------------------------- Handle(GeomPlate_Surface) GeomPlate_BuildPlateSurface::Surface() const { return myGeomPlateSurface ; } //--------------------------------------------------------- -// fonction : SurfInit +// Function : SurfInit //--------------------------------------------------------- Handle(Geom_Surface) GeomPlate_BuildPlateSurface::SurfInit() const { return mySurfInit ; @@ -1131,7 +1123,7 @@ Handle(Geom_Surface) GeomPlate_BuildPlateSurface::SurfInit() const //--------------------------------------------------------- -// fonction : Sense +// Function : Sense //--------------------------------------------------------- Handle(TColStd_HArray1OfInteger) GeomPlate_BuildPlateSurface::Sense() const { Standard_Integer NTCurve = myLinCont->Length(); @@ -1145,7 +1137,7 @@ Handle(TColStd_HArray1OfInteger) GeomPlate_BuildPlateSurface::Sense() const //--------------------------------------------------------- -// fonction : Curve2d +// Function : Curve2d //--------------------------------------------------------- Handle(TColGeom2d_HArray1OfCurve) GeomPlate_BuildPlateSurface::Curves2d() const { Standard_Integer NTCurve = myLinCont->Length(); @@ -1160,7 +1152,7 @@ Handle(TColGeom2d_HArray1OfCurve) GeomPlate_BuildPlateSurface::Curves2d() const //--------------------------------------------------------- -//fonction : Order +// Function : Order //--------------------------------------------------------- Handle(TColStd_HArray1OfInteger) GeomPlate_BuildPlateSurface::Order() const { Handle(TColStd_HArray1OfInteger) result= @@ -1172,21 +1164,21 @@ Handle(TColStd_HArray1OfInteger) GeomPlate_BuildPlateSurface::Order() const //--------------------------------------------------------- -// fonction : G0Error +// Function : G0Error //--------------------------------------------------------- Standard_Real GeomPlate_BuildPlateSurface::G0Error() const { return myG0Error; } //--------------------------------------------------------- -// fonction : G1Error +// Function : G1Error //--------------------------------------------------------- Standard_Real GeomPlate_BuildPlateSurface::G1Error() const { return myG1Error; } //--------------------------------------------------------- -// fonction : G2Error +// Function : G2Error //--------------------------------------------------------- Standard_Real GeomPlate_BuildPlateSurface::G2Error() const { return myG2Error; @@ -1256,15 +1248,15 @@ Handle(GeomPlate_PointConstraint) GeomPlate_BuildPlateSurface::PointConstraint( } //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// // ========================================================= -// M E T H O D E S P R I V E S +// P R I V A T E M E T H O D S // ========================================================= //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// //======================================================================= -// function : CourbeJointive -// purpose : Effectue un chainage des courbes pour pouvoir calculer -// la surface d'init avec la methode du flux maxi. -// Retourne vrai si il s'agit d'un contour ferme. +// Function : CourbeJointive +// Purpose : Create a chain of curves to calculate the +// initial surface with the method of max flow. +// Return true if it is a closed contour. //======================================================================= Standard_Boolean GeomPlate_BuildPlateSurface:: @@ -1305,7 +1297,7 @@ Standard_Boolean GeomPlate_BuildPlateSurface:: myLinCont->SetValue(j+1,myLinCont->Value(i)); myLinCont->SetValue(i,tampon); Standard_Integer Tmp=myInitOrder->Value(j+1); - //Voir fonction TrierTab pour le fonctionnement de myInitOrder + // See function TrierTab for the functioning of myInitOrder myInitOrder->SetValue(j+1,myInitOrder->Value(i)); myInitOrder->SetValue(i,Tmp); @@ -1325,7 +1317,7 @@ Standard_Boolean GeomPlate_BuildPlateSurface:: myLinCont->SetValue(j+1,myLinCont->Value(i)); myLinCont->SetValue(i,tampon); Standard_Integer Tmp=myInitOrder->Value(j+1); - //Voir fonction TrierTab pour le fonctionnement de myInitOrder + // See function TrierTab for the functioning of myInitOrder myInitOrder->SetValue(j+1,myInitOrder->Value(i)); myInitOrder->SetValue(i,Tmp); }; @@ -1360,11 +1352,11 @@ Standard_Boolean GeomPlate_BuildPlateSurface:: //------------------------------------------------------------------------- -// fonction : ComputeSurfInit +// Function : ComputeSurfInit //------------------------------------------------------------------------- -// Calcul la surface d'init soit par la methode du flux maxi soit par -// la methode du plan d'inertie si le contour n'est pas ferme ou si -// il y a des contraintes ponctuelles +// Calculate the initial surface either by the method of max flow or by +// the method of the plane of inertia if the contour is not closed or if +// there are point constraints. //------------------------------------------------------------------------- void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressIndicator) & aProgress) @@ -1373,9 +1365,9 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI Standard_Boolean isHalfSpace = Standard_True; Standard_Real LinTol = 0.001, AngTol = 0.001; //AngTol = 0.0001; //LinTol = 0.0001 - // Option pour le calcul du plan initial + // Option to calculate the initial plane Standard_Integer NTLinCont = myLinCont->Length(), NTPntCont = myPntCont->Length(); - // Tableau des permutation pour conserver l'ordre initial voir TrierTab + // Table of transformation to preserve the initial order see TrierTab if (NTLinCont != 0) { myInitOrder = new TColStd_HArray1OfInteger(1,NTLinCont); for (Standard_Integer i = 1; i <= NTLinCont; i++) @@ -1386,7 +1378,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI if (CourbeJoint && IsOrderG1()) { nopt = 3; - // Tableau contenant le nuage de point pour le calcul du plan + // Table contains the cloud of points for calculation of the plane Standard_Integer NbPoint = 20, Discr = NbPoint/4, pnum = 0; Handle( TColgp_HArray1OfPnt ) Pts = new TColgp_HArray1OfPnt( 1, (NbPoint+1)*NTLinCont+NTPntCont ); TColgp_SequenceOfVec Vecs, NewVecs; @@ -1421,8 +1413,8 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI } for (Standard_Integer j = 0; j <= NbPoint; j++) - { // Nombre de point par courbe = 20 - // Repartition lineaire + { // Number of points per curve = 20 + // Linear distribution Standard_Real Inter = j*Uif/(NbPoint); if (Order < GeomAbs_G1 || j % Discr != 0) myLinCont->Value(i)->D0( Uinit+Inter, Pts->ChangeValue(++pnum) ); @@ -1515,7 +1507,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI GeomPlate_BuildAveragePlane BAP( Vecs, Pts ); Standard_Real u1,u2,v1,v2; BAP.MinMaxBox(u1,u2,v1,v2); - // On agrandit le bazar pour les projections + // The space is greater for projections Standard_Real du = u2 - u1; Standard_Real dv = v2 - v1; u1 -= du; u2 += du; v1 -= dv; v2 += dv; @@ -1533,16 +1525,16 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI } //if (NTLinCont != 0 && (CourbeJoint = CourbeJointive( myTol3d )) && IsOrderG1()) if (NTLinCont != 0) - TrierTab( myInitOrder ); // Reordonne le tableau des permutations + TrierTab( myInitOrder ); // Reorder the table of transformations if (nopt != 3) { if ( NTPntCont != 0) - nopt = 1; //Calcul par la methode du plan d'inertie + nopt = 1; //Calculate by the method of plane of inertia else if (!CourbeJoint || NTLinCont != myNbBounds) {// throw Standard_Failure("Curves are not joined"); #ifdef OCCT_DEBUG - cout<<"WARNING : Courbes non jointives a "<Value(i)->D0(Uinit+Inter,P); @@ -1598,7 +1590,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI } Standard_Real u1,u2,v1,v2; BAP.MinMaxBox(u1,u2,v1,v2); - // On agrandit le bazar pour les projections + // The space is greater for projections Standard_Real du = u2 - u1; Standard_Real dv = v2 - v1; u1 -= du; u2 += du; v1 -= dv; v2 += dv; @@ -1684,7 +1676,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI myTolU,myTolV); //====================================================================== - // Projection des courbes + // Projection of curves //====================================================================== Standard_Integer i; for (i = 1; i <= NTLinCont; i++) @@ -1692,7 +1684,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI myLinCont->ChangeValue(i)->SetCurve2dOnSurf(ProjectCurve(myLinCont->Value(i)->Curve3d())); //====================================================================== - // Projection des points + // Projection of points //====================================================================== for (i = 1; i<=NTPntCont; i++) { gp_Pnt P; @@ -1702,13 +1694,13 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI } //====================================================================== - // Nbre de point par courbe + // Number of points by curve //====================================================================== if ((NTLinCont !=0)&&(myNbPtsOnCur!=0)) CalculNbPtsInit(); //====================================================================== - // Gestion des incompatibilites entre courbes + // Management of incompatibilities between curves //====================================================================== Handle(GeomPlate_HArray1OfSequenceOfReal) PntInter; Handle(GeomPlate_HArray1OfSequenceOfReal) PntG1G1; @@ -1720,17 +1712,17 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI } //==================================================================== - // Discretisation des courbes + // Discretization of curves //==================================================================== Discretise(PntInter, PntG1G1); //==================================================================== - //Preparation des points de contrainte pour plate + //Preparation of points of constraint for plate //==================================================================== LoadCurve( 0, 0 ); if (myPntCont->Length() != 0) LoadPoint( 0, 0 ); //==================================================================== - //Resolution de la surface + // Construction of the surface //==================================================================== myPlate.SolveTI(2, ComputeAnisotropie(), aProgress); if (!aProgress.IsNull() && aProgress->UserBreak()) @@ -1741,7 +1733,7 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI if (!myPlate.IsDone()) { #ifdef OCCT_DEBUG - cout << "WARNING : GeomPlate : abort calcul of Plate." << endl; + cout << "WARNING : GeomPlate : calculation of Plate failed" << endl; #endif return; } @@ -1775,11 +1767,11 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressI } //--------------------------------------------------------- -// fonction : Intersect +// Function : Intersect //--------------------------------------------------------- -// Recherche les intersections entre les courbe 2d -// Si intersection et compatible( dans le cas G1-G1) -// enleve le point sur une des deux courbes +// Find intersections between 2d curves +// If the intersection is compatible (in cases G1-G1) +// remove the point on one of two curves //--------------------------------------------------------- void GeomPlate_BuildPlateSurface:: Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, @@ -1796,7 +1788,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, for (Standard_Integer i=1;i<=NTLinCont;i++) { //Standard_Real NbPnt_i=myLinCont->Value(i)->NbPoints(); - // Cherche l'intersection avec chaque courbe y compris elle meme. + // Find the intersection with each curve including the curve itself Ci.Load(myLinCont->Value(i)->Curve2dOnSurf()); for(Standard_Integer j=i; j<=NTLinCont; j++) { @@ -1807,9 +1799,9 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, Intersection.Perform(Ci, Cj, myTol2d*10, myTol2d*10); if (!Intersection.IsEmpty()) - { // il existe une intersection + { // there is one intersection Standard_Integer nbpt = Intersection.NbPoints(); - // nombre de point d'intersection + // number of points of intersection for (Standard_Integer k = 1; k <= nbpt; k++) { int2d = Intersection.Point(k); myLinCont->Value(i)->D0(int2d.ParamOnFirst(),P1); @@ -1823,13 +1815,13 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, } #endif if (P1.Distance( P2 ) < myTol3d) - { // L'intersection 2d correspond a des points 3d proches - // On note l'intervalle dans lequel il faudra enlever - // un point pour eviter les doublons ce qui fait une - // erreur dans plate. le point sur la courbe i est enleve - // on conserve celui de la courbe j - // la longueur de l'intervalle est une longueur 2d - // correspondant en 3d a myTol3d + { // 2D intersection corresponds to close 3D points. + // Note the interval, in which the point needs to be removed + // to avoid duplications, which cause + // error in plate. The point on curve i is removed; + // the point on curve j is preserved; + // the length of interval is a length 2d + // corresponding in 3d to myTol3d Standard_Real tolint = Ci.Resolution(myTol3d); Ci.D1(int2d.ParamOnFirst(),P2d, V2d); Standard_Real aux = V2d.Magnitude(); @@ -1843,7 +1835,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, PntInter->ChangeValue(i).Append( int2d.ParamOnFirst() - tolint); PntInter->ChangeValue(i).Append( int2d.ParamOnFirst() + tolint); - // Si G1-G1 + // If G1-G1 if ( (myLinCont->Value(i)->Order()==1) &&(myLinCont->Value(j)->Order()==1)) { gp_Vec v11,v12,v13,v14,v15,v16,v21,v22,v23,v24,v25,v26; @@ -1855,9 +1847,8 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, ant= M_PI -ant; if ((Abs(v16*v15-v16*v25)>(myTol3d/1000)) ||(Abs(ant)>myTol3d/1000)) - // Pas compatible ==> on enleve une zone en - // contrainte G1 correspondant - // a une tolerance 3D de 0.01 + // Non-compatible ==> remove zone in constraint G1 + // corresponding to 3D tolerance of 0.01 { Standard_Real coin; Standard_Real Tol= 100 * myTol3d; Standard_Real A1; @@ -1870,25 +1861,25 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, A1= M_PI - A1; if (Abs(Abs(A1)-M_PI)ChangeValue(i).Append(Par1); PntG1G1->ChangeValue(i).Append(Par2); coin = Cj.Resolution(Tol); Par1=int2d.ParamOnSecond()-coin; Par2=int2d.ParamOnSecond()+coin; - // Stockage de l'intervalle pour la courbe j + // Storage of the interval for curve j PntG1G1->ChangeValue(j).Append(Par1); PntG1G1->ChangeValue(j).Append(Par2); } } - // Si G0-G1 + // If G0-G1 if ((myLinCont->Value(i)->Order()==0 && myLinCont->Value(j)->Order()==1) || (myLinCont->Value(i)->Order()==1 && myLinCont->Value(j)->Order()==0)) { @@ -1909,9 +1900,9 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, Standard_Real Angle = vec.Angle( N ); Angle = Abs( M_PI/2-Angle ); if (Angle > myTolAng/10.) //????????? //if (Abs( scal ) > myTol3d/100) - { // Pas compatible ==> on enleve une zone en - // contrainte G0 et G1 correspondant - // a une tolerance 3D de 0.01 + { + // Non-compatible ==> one removes zone in constraint G0 and G1 + // corresponding to 3D tolerance of 0.01 Standard_Real coin; Standard_Real Tol= 100 * myTol3d; Standard_Real A1; @@ -1936,7 +1927,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, #endif Standard_Real Par1 = int2d.ParamOnFirst() - coin; Standard_Real Par2 = int2d.ParamOnFirst() + coin; - // Stockage de l'intervalle pour la courbe i + // Storage of the interval for curve i PntG1G1->ChangeValue(i).Append( Par1 ); PntG1G1->ChangeValue(i).Append( Par2 ); } @@ -1949,7 +1940,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, #endif Standard_Real Par1 = int2d.ParamOnSecond() - coin; Standard_Real Par2 = int2d.ParamOnSecond() + coin; - // Stockage de l'intervalle pour la courbe j + // Storage of the interval for curve j PntG1G1->ChangeValue(j).Append( Par1 ); PntG1G1->ChangeValue(j).Append( Par2 ); } @@ -1957,13 +1948,13 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, } } //if (P1.Distance( P2 ) < myTol3d) else { - //L'intersection 2d correspond a des points 3d eloigne - // On note l'intervalle dans lequel il faudra enlever - // des points pour eviter les doublons ce qui fait une - // erreur dans plate. le point sur la courbe i est enleve - // on conserve celui de la courbe j. - // la longueur de l'intervalle est une longueur 2d - // correspondant a la distance des points en 3d a myTol3d + // 2D intersection corresponds to extended 3D points. + // Note the interval where it is necessary to remove + // the points to avoid duplications causing + // error in plate. The point on curve i is removed, + // the point on curve j is preserved. + // The length of interval is 2D length + // corresponding to the distance of points in 3D to myTol3d Standard_Real tolint, Dist; Dist = P1.Distance(P2); tolint = Ci.Resolution(Dist); @@ -1979,8 +1970,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, } #ifdef OCCT_DEBUG - cout<<"Attention: Deux points 3d ont la meme projection dist=" - <