From 0d9695538c5f5789c63dc55eacfdbc165bafebc7 Mon Sep 17 00:00:00 2001 From: YSN <> Date: Thu, 27 Oct 2011 07:50:55 +0000 Subject: [PATCH] 0022312: Translation of french commentaries in OCCT files --- src/AIS/AIS.cxx | 18 +- src/AIS/AIS_InteractiveContext.cxx | 45 +- src/AIS/AIS_LengthDimension.cxx | 7 +- src/AIS/AIS_TangentRelation.cxx | 2 +- src/AIS/AIS_TexturedShape.cxx | 6 +- .../APIHeaderSection_MakeHeader.cxx | 8 +- src/Adaptor3d/Adaptor3d_TopolTool.cxx | 12 +- src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx | 88 +- src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx | 4082 +++++++------- src/AdvApp2Var/AdvApp2Var_Context.cxx | 28 +- src/AdvApp2Var/AdvApp2Var_Iso.cxx | 34 +- src/AdvApp2Var/AdvApp2Var_MathBase.cxx | 4720 +++++++---------- src/AdvApp2Var/AdvApp2Var_Patch.cxx | 137 +- src/AdvApp2Var/AdvApp2Var_SysBase.cxx | 2085 +++----- src/AppBlend/AppBlend_Debug.cxx | 2 +- src/AppDef/AppDef_MyLineTool.cxx | 2 - src/AppParCurves/AppParCurves_MultiCurve.cxx | 2 +- src/AppParCurves/AppParCurves_MultiPoint.cxx | 1 - src/Approx/Approx_SameParameter.cxx | 43 +- src/Approx/Approx_SweepApproximation.cxx | 101 +- src/Aspect/Aspect_AspectFillArea.cxx | 18 +- src/Aspect/Aspect_AspectLine.cxx | 18 +- src/Aspect/Aspect_AspectMarker.cxx | 18 +- src/Aspect/Aspect_Driver.cxx | 18 +- src/BRep/BRep_Tool.cxx | 16 +- src/BRepAdaptor/BRepAdaptor_CompCurve.cxx | 47 +- src/BRepAlgo/BRepAlgo_1.cxx | 12 +- src/BRepAlgo/BRepAlgo_BooleanOperation.cxx | 64 +- src/BRepAlgo/BRepAlgo_DSAccess.cxx | 26 +- src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx | 22 +- src/BRepAlgo/BRepAlgo_Loop.cxx | 74 +- src/BRepAlgo/BRepAlgo_NormalProjection.cxx | 28 +- src/BRepAlgo/BRepAlgo_Tool.cxx | 6 +- src/BRepBlend/BRepBlend_RstRstConstRad.cxx | 3 +- src/BRepBlend/BRepBlend_RstRstEvolRad.cxx | 9 +- src/BRepBlend/BRepBlend_SurfRstConstRad.cxx | 3 +- .../BRepBlend_SurfRstLineBuilder.cxx | 2 +- .../BRepBuilderAPI_FindPlane.cxx | 2 +- src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx | 6 +- src/BRepCheck/BRepCheck_Face.cxx | 26 +- src/BRepCheck/BRepCheck_Result.cxx | 2 +- src/BRepCheck/BRepCheck_Vertex.cxx | 26 +- src/BRepCheck/BRepCheck_Wire.cxx | 96 +- src/BRepClass3d/BRepClass3d_SolidExplorer.cxx | 52 +- src/BRepFeat/BRepFeat_Form.cxx | 147 +- src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx | 49 +- src/BRepFeat/BRepFeat_MakeDPrism.cxx | 56 +- src/BRepFeat/BRepFeat_MakeLinearForm.cxx | 103 +- src/BRepFeat/BRepFeat_MakePipe.cxx | 16 +- src/BRepFeat/BRepFeat_MakePrism.cxx | 88 +- src/BRepFeat/BRepFeat_MakeRevol.cxx | 40 +- src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx | 103 +- src/BRepFeat/BRepFeat_RibSlot.cxx | 150 +- src/BRepFeat/BRepFeat_SplitShape.cxx | 2 +- src/BRepFill/BRepFill.cxx | 96 +- src/BRepFill/BRepFill_ACRLaw.cdl | 7 +- src/BRepFill/BRepFill_ACRLaw.cxx | 12 +- src/BRepFill/BRepFill_Draft.cxx | 156 +- src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx | 4 +- src/BRepFill/BRepFill_Evolved.cdl | 10 +- src/BRepFill/BRepFill_Evolved.cxx | 473 +- src/BRepFill/BRepFill_Generator.cxx | 129 +- src/BRepFill/BRepFill_LocationLaw.cxx | 52 +- src/BRepFill/BRepFill_MultiLine.cxx | 32 +- src/BRepFill/BRepFill_NSections.cxx | 56 +- src/BRepFill/BRepFill_OffsetWire.cxx | 185 +- src/BRepFill/BRepFill_Pipe.cxx | 26 +- src/BRepFill/BRepFill_PipeShell.cxx | 136 +- src/BRepFill/BRepFill_SectionLaw.cxx | 10 +- src/BRepFill/BRepFill_SectionPlacement.cxx | 6 +- src/BRepFill/BRepFill_ShapeLaw.cxx | 30 +- src/BRepFill/BRepFill_Sweep.cxx | 272 +- src/BRepFill/BRepFill_TrimEdgeTool.cxx | 50 +- src/BRepFill/BRepFill_TrimSurfaceTool.cxx | 42 +- .../BRepIntCurveSurface_Inter.cxx | 8 +- src/BRepLib/BRepLib.cxx | 80 +- src/BRepLib/BRepLib_MakeWire.cxx | 44 +- src/BRepLib/BRepLib_MakeWire_1.cxx | 2 +- src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.cxx | 38 +- src/BRepMesh/BRepMesh_FastDiscretFace.cxx | 27 +- src/BRepOffset/BRepOffset_Analyse.cxx | 32 +- src/BRepOffset/BRepOffset_Inter2d.cxx | 73 +- src/BRepOffset/BRepOffset_Inter3d.cxx | 92 +- src/BRepOffset/BRepOffset_MakeLoops.cxx | 70 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 226 +- src/BRepOffset/BRepOffset_Offset.cxx | 19 +- .../BRepOffsetAPI_MakeOffset.cxx | 12 +- .../BRepOffsetAPI_MakeOffsetShape.cxx | 4 +- .../BRepOffsetAPI_ThruSections.cxx | 63 +- src/BRepPrim/BRepPrim_Sphere.cxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.cxx | 16 +- src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx | 1 - src/BRepSweep/BRepSweep_Rotation.cxx | 16 +- src/BRepSweep/BRepSweep_Translation.cxx | 17 +- src/BRepTest/BRepTest_BasicCommands.cxx | 4 +- src/BRepTest/BRepTest_CurveCommands.cxx | 26 +- src/BRepTest/BRepTest_FilletCommands.cxx | 78 +- src/BRepTest/BRepTest_MatCommands.cxx | 39 +- src/BRepTest/BRepTest_SweepCommands.cxx | 16 +- src/BRepToIGES/BRepToIGES_BRSolid.cxx | 18 +- src/BRepToIGES/BRepToIGES_BRWire.cxx | 16 +- src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx | 42 +- src/BRepTools/BRepTools_Modifier.cxx | 18 +- src/BRepTools/BRepTools_WireExplorer.cxx | 14 +- .../BRepTopAdaptor_FClass2d.cxx | 54 +- src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx | 14 +- .../BRepTopAdaptor_TopolTool.cxx | 13 +- src/BSplCLib/BSplCLib.cxx | 110 +- src/BSplSLib/BSplSLib.cxx | 43 +- src/BiTgte/BiTgte_Blend.cxx | 400 +- src/Bisector/Bisector_Bisec.cxx | 84 +- src/Bisector/Bisector_BisecAna.cxx | 207 +- src/Bisector/Bisector_BisecCC.cxx | 184 +- src/Bisector/Bisector_BisecPC.cxx | 47 +- src/Bisector/Bisector_Inter.cxx | 52 +- src/Bnd/Bnd_BoundSortBox.cxx | 107 +- src/BndLib/BndLib.cxx | 7 +- src/CDF/CDF_Application.cxx | 4 +- src/CPnts/CPnts_AbscissaPoint.cxx | 37 +- src/CPnts/CPnts_UniformDeflection.cxx | 63 +- src/CSLib/CSLib.cxx | 62 +- src/CSLib/CSLib_Class2d.cxx | 10 +- src/Contap/Contap_ContAna.cxx | 47 +- src/Convert/Convert_CircleToBSplineCurve.cxx | 26 +- ...ert_CompBezierCurves2dToBSplineCurve2d.cxx | 24 +- ...Convert_CompBezierCurvesToBSplineCurve.cxx | 24 +- src/Convert/Convert_ConeToBSplineSurface.cxx | 16 +- .../Convert_CylinderToBSplineSurface.cxx | 16 +- src/Convert/Convert_EllipseToBSplineCurve.cxx | 28 +- .../Convert_HyperbolaToBSplineCurve.cxx | 12 +- .../Convert_ParabolaToBSplineCurve.cxx | 4 +- src/Convert/Convert_PolynomialCosAndSin.cxx | 29 +- .../Convert_SphereToBSplineSurface.cxx | 20 +- src/Convert/Convert_TorusToBSplineSurface.cxx | 20 +- src/DBRep/DBRep.cxx | 14 +- src/DDataStd/DDataStd_DrawPresentation.cxx | 4 +- src/Draft/Draft_Modification_1.cxx | 114 +- src/Draw/CommandWindow.cxx | 38 +- src/Draw/Draw_BasicCommands.cxx | 2 +- src/Draw/Draw_Interpretor.cxx | 6 +- src/Draw/Draw_Main.cxx | 28 - src/Draw/MainWindow.cxx | 12 +- src/DrawDim/DrawDim_Angle.cxx | 8 +- src/DrawResources/TestDraw.cxx | 34 +- src/DsgPrs/DsgPrs_LengthPresentation.cdl | 1 - src/ElSLib/ElSLib.cxx | 19 +- src/Extrema/Extrema_ExtCS.cxx | 4 - src/Extrema/Extrema_ExtElC2d.cxx | 45 +- src/Extrema/Extrema_ExtPElC.cxx | 131 +- src/Extrema/Extrema_ExtPElS.cxx | 139 +- src/Extrema/Extrema_ExtPS.cxx | 7 +- src/Extrema/Extrema_FuncExtCC.cdl | 29 +- src/Extrema/Extrema_FuncExtCS.cdl | 32 +- src/Extrema/Extrema_FuncExtPC.cdl | 32 +- src/Extrema/Extrema_FuncExtPS.cdl | 28 +- src/Extrema/Extrema_FuncExtSS.cdl | 30 +- src/Extrema/Extrema_GenExtPS.cxx | 14 +- src/Extrema/Extrema_GenLocateExtPS.cxx | 17 +- src/FairCurve/FairCurve_Batten.cxx | 59 +- src/FairCurve/FairCurve_Energy.cxx | 50 +- src/FairCurve/FairCurve_MinimalVariation.cxx | 48 +- src/FairCurve/FairCurve_Newton.cxx | 14 +- src/GC/GC_MakeConicalSurface.cxx | 8 +- src/GC/GC_MakeCylindricalSurface.cxx | 10 +- src/GC/GC_MakeTranslation.cxx | 6 +- src/GC/GC_MakeTrimmedCone.cxx | 8 +- src/GC/GC_MakeTrimmedCylinder.cxx | 8 +- src/GccAna/GccAna_Circ2d2TanOn.cxx | 22 +- src/GccAna/GccAna_Circ2d2TanOn_1.cxx | 25 +- src/GccAna/GccAna_Circ2d2TanOn_10.cxx | 26 +- src/GccAna/GccAna_Circ2d2TanOn_11.cxx | 24 +- src/GccAna/GccAna_Circ2d2TanOn_2.cxx | 26 +- src/GccAna/GccAna_Circ2d2TanOn_3.cxx | 26 +- src/GccAna/GccAna_Circ2d2TanOn_4.cxx | 32 +- src/GccAna/GccAna_Circ2d2TanOn_5.cxx | 16 +- src/GccAna/GccAna_Circ2d2TanOn_6.cxx | 25 +- src/GccAna/GccAna_Circ2d2TanOn_7.cxx | 4 +- src/GccAna/GccAna_Circ2d2TanOn_8.cxx | 14 +- src/GccAna/GccAna_Circ2d2TanRad.cxx | 48 +- src/GccAna/GccAna_Circ2d2TanRad_1.cxx | 18 +- src/GccAna/GccAna_Circ2d2TanRad_2.cxx | 20 +- src/GccAna/GccAna_Circ2d2TanRad_3.cxx | 25 +- src/GccAna/GccAna_Circ2d2TanRad_4.cxx | 16 +- src/GccAna/GccAna_Circ2d2TanRad_5.cxx | 10 +- src/GccAna/GccAna_Circ2d3Tan.cxx | 6 +- src/GccAna/GccAna_Circ2d3Tan_1.cxx | 18 +- src/GccAna/GccAna_Circ2d3Tan_2.cxx | 6 +- src/GccAna/GccAna_Circ2d3Tan_3.cxx | 18 +- src/GccAna/GccAna_Circ2d3Tan_4.cxx | 16 +- src/GccAna/GccAna_Circ2d3Tan_5.cxx | 12 +- src/GccAna/GccAna_Circ2d3Tan_6.cxx | 4 +- src/GccAna/GccAna_Circ2d3Tan_7.cxx | 8 +- src/GccAna/GccAna_Circ2d3Tan_8.cxx | 4 +- src/GccAna/GccAna_Circ2d3Tan_9.cxx | 24 +- src/GccAna/GccAna_Circ2dBisec.cxx | 26 +- src/GccAna/GccAna_Circ2dTanCen.cxx | 43 +- src/GccAna/GccAna_Circ2dTanOnRad.cxx | 34 +- src/GccAna/GccAna_Circ2dTanOnRad_1.cxx | 24 +- src/GccAna/GccAna_Circ2dTanOnRad_2.cxx | 24 +- src/GccAna/GccAna_Circ2dTanOnRad_3.cxx | 19 +- src/GccAna/GccAna_Circ2dTanOnRad_4.cxx | 27 +- src/GccAna/GccAna_Circ2dTanOnRad_5.cxx | 19 +- src/GccAna/GccAna_CircLin2dBisec.cxx | 30 +- src/GccAna/GccAna_CircPnt2dBisec.cxx | 46 +- src/GccAna/GccAna_Lin2d2Tan.cxx | 49 +- src/GccAna/GccAna_Lin2dBisec.cxx | 20 +- src/GccAna/GccAna_Lin2dTanObl.cxx | 28 +- src/GccAna/GccAna_Lin2dTanPar.cxx | 26 +- src/GccAna/GccAna_Lin2dTanPer.cxx | 36 +- src/GccAna/GccAna_LinPnt2dBisec.cxx | 2 +- src/GccAna/GccAna_Pnt2dBisec.cxx | 2 +- src/GccEnt/GccEnt.cxx | 2 +- 214 files changed, 8841 insertions(+), 10544 deletions(-) diff --git a/src/AIS/AIS.cxx b/src/AIS/AIS.cxx index e16db31e17..16e1e00950 100755 --- a/src/AIS/AIS.cxx +++ b/src/AIS/AIS.cxx @@ -461,11 +461,11 @@ Standard_Boolean AIS::ComputeGeometry(const TopoDS_Edge& anEdge1, if (isOnPlanC1 && isOnPlanC2) return Standard_True; - if (!isOnPlanC1 && isOnPlanC2) {// courbe 2 seulement dans le plan + if (!isOnPlanC1 && isOnPlanC2) {// curve 2 only in the plane indexExt = 1; extCurve = aSov1; } - else if (isOnPlanC1 && !isOnPlanC2) {// courbe 1 seulement dans le plan + else if (isOnPlanC1 && !isOnPlanC2) {// curve 1 only in the plane indexExt = 2; extCurve = aSov2; } @@ -742,7 +742,7 @@ void AIS::ComputeLengthBetweenPlanarFaces( const TopoDS_Face & FirstFace, gp_Pnt & Position ) { TopExp_Explorer aExp( FirstFace, TopAbs_VERTEX ); - // cas des plans infinis . SMO. + // case of infinite planes. SMO. if (!aExp.More()) FirstAttach = Plane1.Location(); else @@ -808,7 +808,7 @@ static gp_Pnt FindFarPoint (const gp_Ax1 & anAxis, TopExp_Explorer Explo (aFace, TopAbs_VERTEX); if (!Explo.More()) { - // Cas des plans infinis (pas de Vertex, pas d'arete) + // Case of infinite planes (no Vertex, no edge) gp_Pln plane; Handle( Geom_Surface ) aSurf; AIS_KindOfSurface KOS; @@ -1370,7 +1370,7 @@ void AIS::ComputeProjEdgePresentation( const Handle( Prs3d_Presentation )& aPres TopoDS_Edge E; - // Calcul de la presentation de l'edge + // Calculate presentation of the edge if (ProjCurve->IsInstance(STANDARD_TYPE(Geom_Line)) ) { // CLE // const Handle(Geom_Line) & gl = (Handle(Geom_Line)&) ProjCurve; @@ -1399,7 +1399,7 @@ void AIS::ComputeProjEdgePresentation( const Handle( Prs3d_Presentation )& aPres } StdPrs_WFDeflectionShape::Add(aPresentation, E, aDrawer); - //Calcul de la presentation des lignes de raccord + //Calculate the presentation of line connections aDrawer->WireAspect()->SetTypeOfLine(aCallTOL); if (!isInfinite) { gp_Pnt ppf(0.0,0.0,0.0), ppl(0.0,0.0,0.0); @@ -1461,7 +1461,7 @@ void AIS::ComputeProjVertexPresentation( const Handle( Prs3d_Presentation )& aPr pa->SetTypeOfMarker(aProjTOM); } - // calcul du projete + // calculate the projection StdPrs_Point::Add(aPresentation, new Geom_CartesianPoint(ProjPoint), aDrawer); if (!aDrawer->HasWireAspect()){ @@ -1476,9 +1476,9 @@ void AIS::ComputeProjVertexPresentation( const Handle( Prs3d_Presentation )& aPr li->SetWidth(aWidth); } - // Si les points ne sont pas confondus... + // If the points are not mixed... if (!ProjPoint.IsEqual (BRep_Tool::Pnt(aVertex),Precision::Confusion())) { - // calcul des lignes de rappel + // calculate the lines of recall BRepBuilderAPI_MakeEdge MakEd(ProjPoint,BRep_Tool::Pnt(aVertex)); StdPrs_WFDeflectionShape::Add(aPresentation, MakEd.Edge(), aDrawer); } diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 577102cf0c..c3ef614a3d 100755 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -70,7 +70,7 @@ // is always equal to 0 if it is -1. #define BUC61051 -// On close the local context the method ::ResetOriginalState() sets the selection mode equal to 0 +// The local context is closed the method ::ResetOriginalState() sets the selection mode equal to 0 // in spite of the selection mode of the interactive object in Natural Point. #define OCC166 @@ -226,7 +226,7 @@ void AIS_InteractiveContext::UpdateCurrentViewer() void AIS_InteractiveContext::OpenCollector() { myIsCollClosed =Standard_True; - // a completer.... + // to be completed.... } @@ -263,7 +263,7 @@ void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO, } else{ TColStd_MapOfTransient theMap; - // point neutre + // neutral point for(;It.More();It.Next()){ if(It.Value()->GraphicStatus()==AIS_DS_Displayed) theMap.Add(It.Key()); @@ -272,7 +272,7 @@ void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO, cout<<"\tFrom Neutral Point : "<HasInteractiveContext()) anIObj->SetContext(aThis); - //PAS DE CONTEXTE LOCAL OUVERT + //NO LOCAL CONTEXT OPEN if(!HasOpenedContext()) { #ifndef OCC4373 // SAN : Do not return here. Perform advanced display mode analysis a bit later... @@ -465,7 +465,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj #endif Standard_Boolean updcol = Standard_False; - // il n'existait pas encore + // it did not yet exist if(!myObjects.IsBound(anIObj)){ Handle(AIS_GlobalStatus) STATUS= @@ -485,7 +485,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj if(updateviewer) myMainVwr->Update(); } - // il est quelque part ailleurs.... + // it is somewhere else... else { // CLE // const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj); @@ -498,7 +498,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj myCollectorPM->Erase(anIObj,HiMod); mgrSelector->Deactivate(anIObj,myCollectorSel); updcol = updateviewer; - }// attention on fait expres de ne pas mettre de break.. + }// attention the break is not set on purpose... case AIS_DS_FullErased:{ TColStd_ListIteratorOfListOfInteger ItL (STATUS->DisplayedModes()); for (;ItL.More();ItL.Next()){ @@ -565,7 +565,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj if(updcol && !myCollectorVwr.IsNull()) myCollectorVwr->Update(); } - // CONTEXTE LOCAL OUVERT + // LOCAL CONTEXT OPEN else { myLocalContexts(myCurLocalIndex)->Display(anIObj,DispMode,anIObj->AcceptShapeDecomposition(),SelMode); @@ -593,7 +593,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj if(!anIObj->HasInteractiveContext()) anIObj->SetContext(this); - // si aucun contexte local... + // if no local context... if(!HasOpenedContext()) { // if(!anIObj->HasDisplayMode()) // anIObj->SetDisplayMode(aDisplayMode); @@ -685,9 +685,8 @@ void AIS_InteractiveContext::Erase(const Handle(AIS_InteractiveObject)& anIObj, } else { - // d'abors on regarde si on peut effacer dans le contexte local courant - // ensuite, on essaye d'effacer dans les autres contextes locaux, - // s'ils le permettent... + // First it is checked if it is possible to remove in the current local context + // then one tries to remove in other local contexts, if they allow it... Standard_Boolean WasInCtx = myLocalContexts(myCurLocalIndex)->Erase(anIObj); // if(!WasInCtx) { @@ -1488,7 +1487,7 @@ void AIS_InteractiveContext::RecomputeSelectionOnly(const Handle(AIS_Interactive mgrSelector->RecomputeSelection(anIObj); - // A VOIR SI ENCORE UTILE... + TColStd_ListOfInteger LI; TColStd_ListIteratorOfListOfInteger Lit; ActivatedModes(anIObj,LI); @@ -1576,7 +1575,7 @@ void AIS_InteractiveContext::SetLocation(const Handle(AIS_InteractiveObject)& an } if(aLoc.IsIdentity()) return ; - // d'abord faire un reset de la precedente location pour tout nettoyer proprement... + // first reset the previous location to properly clean everything... if(anIObj->HasLocation()) anIObj->ResetLocation(); @@ -1950,7 +1949,7 @@ void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIOb } anIObj->SetRecomputeOk(); #ifdef DEB - cout<<"nb de modes a recalculer : "<SetRecomputeOk(); #ifdef DEB - cout<<"nb de modes a recalculer : "<SetRecomputeOk(); #ifdef DEB - cout<<"nb de modes a recalculer : "<SetRecomputeOk(); #ifdef DEB - cout<<"nb de modes a recalculer : "<SetRecomputeOk(); #ifdef DEB - cout<<"nb de modes a recalculer : "<SetRecomputeOk(); #ifdef DEB - cout<<"nb de modes a recalculer : "<SetRecomputeOk(); } @@ -2326,7 +2325,7 @@ void AIS_InteractiveContext::SetWidth(const Handle(AIS_InteractiveObject)& anIOb NbDisp++; } #ifdef DEB - cout<<"nb de modes a recalculer : "<SetRecomputeOk(); } diff --git a/src/AIS/AIS_LengthDimension.cxx b/src/AIS/AIS_LengthDimension.cxx index 8845051a6d..d2af5e1440 100755 --- a/src/AIS/AIS_LengthDimension.cxx +++ b/src/AIS/AIS_LengthDimension.cxx @@ -868,14 +868,13 @@ void AIS_LengthDimension::ComputeOneEdgeOneVertexLength( const Handle( Prs3d_Pre Position, SymbolPrs); - //Display des morceaux de raccordement vers la curve si elle - // n'est pas dans le WP + //Display the pieces connecting to the curve if it is not in the WP if (ExtShape != 0) { - if (!extCurv.IsNull()) { // c'est l'edge qui n'est pas dans le WP + if (!extCurv.IsNull()) { // this is the edge that is not in the WP AIS::ComputeProjEdgePresentation(aPresentation,aDrawer,theedge,geom_lin,ptonedge1,ptonedge2); } - else { // c'est le point qui n'est pas dans le WP + else { // this is the point that is not in the WP AIS::ComputeProjVertexPresentation(aPresentation,aDrawer,thevertex,FirstAttach); } } diff --git a/src/AIS/AIS_TangentRelation.cxx b/src/AIS/AIS_TangentRelation.cxx index 6106d5a4d1..ea8f8a2289 100755 --- a/src/AIS/AIS_TangentRelation.cxx +++ b/src/AIS/AIS_TangentRelation.cxx @@ -297,7 +297,7 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation } else return; - //On cherche d'abord le vertex de tangence s'il existe + //First find the tangengy vector if exists TopoDS_Vertex VCom; TopExp_Explorer expF(TopoDS::Edge(myFShape),TopAbs_VERTEX); TopExp_Explorer expS(TopoDS::Edge(mySShape),TopAbs_VERTEX); diff --git a/src/AIS/AIS_TexturedShape.cxx b/src/AIS/AIS_TexturedShape.cxx index 11a9f42998..af82a7204f 100755 --- a/src/AIS/AIS_TexturedShape.cxx +++ b/src/AIS/AIS_TexturedShape.cxx @@ -399,7 +399,7 @@ void AIS_TexturedShape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP TopLoc_Location aLocation = myFace.Location(); #ifdef DEBUG - cout << "J\'explore actuellement la face " << NumFace << "\n" << endl; + cout << "The face is being processed" << NumFace << "\n" << endl; #endif Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, aLocation); // Returns the Triangulation of the face. It is a null handle if there is no triangulation. @@ -429,7 +429,7 @@ void AIS_TexturedShape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP for (nt = 1; nt <= nnn; nt++) { #ifdef DEBUG - cout << "On traite actuellement le triangle : "<< nt <<"\n"; + cout << "The triangle is being processed: "<< nt <<"\n"; #endif if (SST.Orientation(myFace) == TopAbs_REVERSED) // if the face is "reversed" triangles(nt).Get(n1,n3,n2); // the triangle is n1,n3,n2 @@ -437,7 +437,7 @@ void AIS_TexturedShape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP triangles(nt).Get(n1,n2,n3); // the triangle is n1,n2,n3 if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) ) - { // Associates vertexNT to each node + { // vertexNT associated to each node Graphic3d_Array1OfVertexNT Points(1,3); Aspect_Array1OfEdge aretes(1,3); diff --git a/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx b/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx index 9db240e0f7..c00ddfc97a 100755 --- a/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx +++ b/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx @@ -22,7 +22,7 @@ #include #include -// IL S AGIT ICI DU HEADER GENERIQUE pour tout schema STEP ... +// This is a generic header for any STEP sheme static Handle(TCollection_HAsciiString) nulstr; @@ -71,7 +71,7 @@ void APIHeaderSection_MakeHeader::Init (const Standard_CString nameval) if (fn.IsNull()) fn = new HeaderSection_FileName; Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(nameval); fn->SetName(name); - Interface_MSG::TDate (timestamp,0,0,0,0,0,1,"C:%4.4d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d"); // maintenant + Interface_MSG::TDate (timestamp,0,0,0,0,0,1,"C:%4.4d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d"); // actually Handle(TCollection_HAsciiString) tst = new TCollection_HAsciiString(timestamp); fn->SetTimeStamp(tst); @@ -142,7 +142,7 @@ void APIHeaderSection_MakeHeader::Apply header.AddItem(fn); if (HasFs() && !model->HasHeaderEntity (STANDARD_TYPE(HeaderSection_FileSchema))) { -// Schema defini ? Sinon le prendre depuis le protocole +// Schema defined? If not take it from the protocole Handle(TCollection_HAsciiString) sch; Handle(Interface_HArray1OfHAsciiString) schid = fs->SchemaIdentifiers(); if (!schid.IsNull()) sch = schid->Value(1); @@ -150,7 +150,7 @@ void APIHeaderSection_MakeHeader::Apply schid = new Interface_HArray1OfHAsciiString(1,1); fs->SetSchemaIdentifiers(schid); } - if (!sch.IsNull()) { if (sch->Length() < 2) sch.Nullify(); } // non defini + if (!sch.IsNull()) { if (sch->Length() < 2) sch.Nullify(); } // not defined if (sch.IsNull()) { Handle(StepData_Protocol) stepro = Handle(StepData_Protocol)::DownCast ( model->Protocol()); diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.cxx b/src/Adaptor3d/Adaptor3d_TopolTool.cxx index 1ac2924f19..7a73a38c0a 100755 --- a/src/Adaptor3d/Adaptor3d_TopolTool.cxx +++ b/src/Adaptor3d/Adaptor3d_TopolTool.cxx @@ -24,7 +24,7 @@ static void GetConeApexParam(const gp_Cone& C, Standard_Real& U, Standard_Real& U = 0.0; } else if ( -Radius > Ploc.Z()* Tan(SAngle) ) { - // le point est du `mauvais` cote de l`apex + // the point is at the `wrong` side of the apex U = atan2(-Ploc.Y(), -Ploc.X()); } else { @@ -60,7 +60,7 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S) //Adaptor2d_Line2d * Line2dPtr ; myNbSamplesU=-1; - Uinf = S->FirstUParameter(); // ou UIntervalFirst ?? + Uinf = S->FirstUParameter(); // where UIntervalFirst ?? Vinf = S->FirstVParameter(); Usup = S->LastUParameter(); Vsup = S->LastVParameter(); @@ -580,7 +580,7 @@ static void Analyse(const TColgp_Array2OfPnt& array2, C.Y()-B.Y()-B.Y()+A.Y(), C.Z()-B.Z()-B.Z()+A.Z()); Standard_Integer locnbch=0; - for(j=3; j -// Modified: Wed Jan 15 10:04:41 1997 -// by: Joelle CHAUVET -// G1135 : Constructor with criterion -// Private methods 'Init','InitGrid','Perform','ConvertBS', -// 'ComputePatches','ComputeConstraints', -// 'Compute3DErrors','ComputeCritError' -// Public method 'CritError' -// Fields 'myConditions','myResults','myConstraints' -// Modified: Fri Oct 3 14:58:05 1997 -// by: Joelle CHAUVET -// GeomConvert_CompBezierSurfacesToBSplineSurface est remplace par -// Convert_GridPolynomialToPoles dans ConvertBS #include #include @@ -291,7 +279,7 @@ void AdvApp2Var_ApproxAFunc2Var::InitGrid(const Standard_Integer NbInt) AdvApp2Var_Framework Constraints(Bag,UStrip,VStrip); -// decoupes regulieres si NbInt>1 +// regular cutting if NbInt>1 Standard_Real deltu = (myLastParInU-myFirstParInU)/NbInt, deltv = (myLastParInV-myFirstParInV)/NbInt; for (iint=1;iint<=NbInt-1;iint++) { @@ -350,10 +338,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice while (myResult.FirstNotApprox(FirstNA)) { -// completude de l'ensemble des contraintes +// complete the set of constraints ComputeConstraints(UChoice, VChoice, Func); -// discretisation des contraintes relatives au carreau +// discretization of constraints relative to the square myResult(FirstNA).Discretise(myConditions,myConstraints,Func); if ( ! myResult(FirstNA).IsDiscretised() ) { myHasResult = myDone = Standard_False; @@ -361,8 +349,8 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice ("AdvApp2Var_ApproxAFunc2Var : Surface Discretisation Error"); } -// calcul du nombre et du type de decoupes autorisees -// en fonction du nombre de carreaux max et de la validite des decoupes suiv. +// calculate the number and the type of autorized cuts +// depending on the max number of squares and the validity of next cuts. NbU = myResult.NbPatchInU(); NbV = myResult.NbPatchInV(); NbPatch = NbU*NbV; @@ -385,13 +373,13 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice if ( Umore && Vmore ) NumDec=5; } -// approximation du carreau +// approximation of the square myResult(FirstNA).MakeApprox(myConditions,myConstraints,NumDec); if ( ! myResult(FirstNA).IsApproximated() ) { switch (myResult(FirstNA).CutSense()) { case 0 : -// On ne peut plus decouper : on garde le resultat +// It is not possible to cut : the result is preserved if ( myResult(FirstNA).HasResult()) { myResult(FirstNA).OverwriteApprox(); } @@ -402,17 +390,17 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice } break; case 1 : -// Il faut decouper en U +// It is necessary to cut in U myResult.UpdateInU(Udec); myConstraints.UpdateInU(Udec); break; case 2 : -// Il faut decouper en V +// It is necessary to cut in V myResult.UpdateInV(Vdec); myConstraints.UpdateInV(Vdec); break; case 3 : -// Il faut decouper en U et en V +// It is necesary to cut in U and V myResult.UpdateInU(Udec); myConstraints.UpdateInU(Udec); myResult.UpdateInV(Vdec); @@ -444,14 +432,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice while (myResult.FirstNotApprox(FirstNA)) { -// completude de l'ensemble des contraintes +// complete the set of constraints ComputeConstraints(UChoice, VChoice, Func, Crit); if (decision>0) { m0 = m1; m1 = 0.; } -// discretisation des contraintes relatives au carreau +// discretize the constraints relative to the square myResult(FirstNA).Discretise(myConditions,myConstraints,Func); if ( ! myResult(FirstNA).IsDiscretised() ) { myHasResult = myDone = Standard_False; @@ -459,8 +447,8 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice ("AdvApp2Var_ApproxAFunc2Var : Surface Discretisation Error"); } -// calcul du nombre et du type de decoupes autorisees -// en fonction du nombre de carreaux max et de la validite des decoupes suiv. +// calculate the number and type of autorized cuts +// depending on the max number of squares and the validity of next cuts NbU = myResult.NbPatchInU(); NbV = myResult.NbPatchInV(); NbPatch = NbU*NbV; @@ -484,7 +472,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice if ( Umore && Vmore ) NumDec=5; } -// approximation du carreau +// approximation of the square if ( CritAbs ) { myResult(FirstNA).MakeApprox(myConditions,myConstraints,0); } @@ -493,13 +481,13 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice } if (NumDec>=3) NumDec = NumDec - 2; -// evaluation du critere sur le carreau +// evaluation of the criterion on the square if ( myResult(FirstNA).HasResult() ) { Crit.Value(myResult(FirstNA),myConditions); CritValue = myResult(FirstNA).CritValue(); if (m1 poles + // Prepare data for conversion grid of polynoms --> poles Handle(TColStd_HArray1OfReal) Uint1 = new (TColStd_HArray1OfReal) (1,2); Uint1->SetValue(1, -1); @@ -835,7 +823,7 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS() Standard_Integer SSP, i; for (SSP=1; SSP <= myNumSubSpaces[2]; SSP++) { - // Creation de la grille de polynomes + // Creation of the grid of polynoms Standard_Integer n=0,icf=1,ieq; for (j=1; j<=myResult.NbPatchInV(); j++) { for (i=1; i<=myResult.NbPatchInU(); i++) { @@ -850,13 +838,13 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS() } } - // Conversion en poles + // Conversion into poles Convert_GridPolynomialToPoles CvP (myResult.NbPatchInU(),myResult.NbPatchInV(), iu,iv,myMaxDegInU,myMaxDegInV,NbCoeff, Poly,Uint1,Vint1,Uint2,Vint2); if ( !CvP.IsDone() ) { myDone = Standard_False; } - // Conversion en BSpline + // Conversion into BSpline mySurfaces->ChangeValue(SSP) = new (Geom_BSplineSurface) ( CvP.Poles()->Array2(), CvP.UKnots()->Array1(), CvP.VKnots()->Array1(), diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx index e58f68c060..ef083f3166 100755 --- a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx @@ -299,87 +299,79 @@ int mma1cdi_(integer *ndimen, static integer ibb, kkm, kkp; static doublereal bid1, bid2, bid3; - /* ********************************************************************** */ - -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Discretisation sur les parametres des polynomes d'interpolation */ -/* des contraintes a l'ordre IORDRE. */ +/* Discretisation on the parameters of interpolation polynomes */ +/* constraints of order IORDRE. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, AB_SPECIFI::CONTRAINTE&, DISCRETISATION, &POINT */ +/* ALL, AB_SPECIFI::CONTRAINTE&, DISCRETISATION, &POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* NBROOT: Nbre de parametres INTERNES de discretisation. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* ROOTLG: Tableau des parametres de discretisation SUR (-1,1). */ -/* IORDRE: Ordre de contrainte impose aux extremites de l'iso. */ -/* = 0, on calcule les extremites de l'iso */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso */ -/* CONTR1: Contient, si IORDRE>=0, les IORDRE+1 valeurs en TTABLE(0) -*/ -/* (1ere extremitee) de derivees de F(Uc,Ve) ou F(Ue,Vc), */ -/* voir ci dessous. */ -/* CONTR2: Contient, si IORDRE>=0, les IORDRE+1 valeurs en */ -/* TTABLE(NBROOT+1) (2eme extremitee) de: */ -/* Si ISOFAV=1, derivee d'ordre IDERIV en U, derivee */ -/* d'ordre 0 a IORDRE en V de F(Uc,Ve) ou Uc=TCONST */ -/* (valeur de l'iso fixe) et Ve est l'extremite fixe. */ -/* Si ISOFAV=2, derivee d'ordre IDERIV en V, derivee */ -/* d'ordre 0 a IORDRE en U de F(Ue,Vc) ou Vc=TCONST */ -/* (valeur de l'iso fixe) et Ue est l'extremite fixe. */ - -/* SOMTAB: Tableau des NBROOT/2 sommes des 2 points d'indices */ -/* NBROOT-II+1 et II, pour II = 1, NBROOT/2. */ -/* DIFTAB: Tableau des NBROOT/2 differences des 2 points d'indices */ -/* NBROOT-II+1 et II, pour II = 1, NBROOT/2. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Space dimension. */ +/* NBROOT: Number of INTERNAL discretisation parameters. */ +/* It is also the root number Legendre polynome where */ +/* the discretization is performed. */ +/* ROOTLG: Table of discretization parameters ON (-1,1). */ +/* IORDRE: Order of constraint imposed to the extremities of the iso. */ +/* = 0, the extremities of the iso are calculated */ +/* = 1, additionally, the 1st derivative in the direction */ +/* of the iso is calculated. */ +/* = 2, additionally, the 2nd derivative in the direction */ +/* of the iso is calculated. */ +/* CONTR1: Contains, if IORDRE>=0, values IORDRE+1 in TTABLE(0) +*/ +/* (1st extremity) of derivatives of F(Uc,Ve) or F(Ue,Vc), */ +/* see below. */ +/* CONTR2: Contains, if IORDRE>=0, values IORDRE+1 in */ +/* TTABLE(NBROOT+1) (2nd extremity) of: */ +/* If ISOFAV=1, derived of order IDERIV by U, derived */ +/* ordre 0 to IORDRE by V of F(Uc,Ve) or Uc=TCONST */ +/* (fixed iso value) and Ve is the fixed extremity. */ +/* If ISOFAV=2, derivative of order IDERIV by V, derivative */ +/* of order 0 to IORDRE by U of F(Ue,Vc) or Vc=TCONST */ +/* (fixed iso value) and Ue is the fixed extremity. */ + +/* SOMTAB: Table of NBROOT/2 sums of 2 index points */ +/* NBROOT-II+1 and II, for II = 1, NBROOT/2. */ +/* DIFTAB: Table of NBROOT/2 differences of 2 index points */ +/* NBROOT-II+1 and II, for II = 1, NBROOT/2. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* SOMTAB: Tableau des NBROOT/2 sommes des 2 points d'indices */ -/* NBROOT-II+1 et II, pour II = 1, NBROOT/2 */ -/* DIFTAB: Tableau des NBROOT/2 differences des 2 points d'indices */ -/* NBROOT-II+1 et II, pour II = 1, NBROOT/2 */ -/* FPNTAB: Tableau auxiliaire. */ -/* HERMIT: Table des coeff. des 2*(IORDRE+1) polynomes d'Hermite */ -/* de degre 2*IORDRE+1. */ -/* IERCOD: Code d'erreur, */ -/* = 0, Tout est OK */ -/* = 1, La valeur de IORDRE est hors de (0,2) */ - -/* COMMONS UTILISES : */ +/* SOMTAB: Table of NBROOT/2 sums of 2 index points */ +/* NBROOT-II+1 and II, for II = 1, NBROOT/2 */ +/* DIFTAB: Table of NBROOT/2 differences of 2 index points */ +/* NBROOT-II+1 and II, for II = 1, NBROOT/2 */ +/* FPNTAB: Auxiliary table. */ +/* HERMIT: Table of coeff. 2*(IORDRE+1) Hermite polynoms */ +/* of degree 2*IORDRE+1. */ +/* IERCOD: Error code, */ +/* = 0, Everythig is OK */ +/* = 1, The value of IORDRE is out of (0,2) */ +/* COMMON USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Les resultats de la discretisation sont ranges dans 2 tableaux */ -/* SOMTAB et DIFTAB pour gagner du temps par la suite lors du */ -/* calcul des coefficients de la courbe d' approximation. */ +/* The results of discretization are arranged in 2 tables */ +/* SOMTAB and DIFTAB to earn time during the */ +/* calculation of coefficients of the approximation curve. */ -/* Si NBROOT est impair, on stocke dans SOMTAB(0,*) et DIFTAB(0,*) */ -/* les valeurs de la racine mediane de Legendre (0.D0 dans (-1,1)). */ +/* If NBROOT is uneven in SOMTAB(0,*) and DIFTAB(0,*) one stores */ +/* the values of the median root of Legendre (0.D0 in (-1,1)). */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 02-07-1991: RBD; Creation. */ -/* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -410,7 +402,7 @@ int mma1cdi_(integer *ndimen, } *iercod = 0; -/* --- Recup des 2*(IORDRE+1) coeff des 2*(IORDRE+1) polyn. d'Hermite --- +/* --- Recuperate 2*(IORDRE+1) coeff of 2*(IORDRE+1) of Hermite polynom --- */ AdvApp2Var_ApproxF2var::mma1her_(iordre, &hermit[hermit_offset], iercod); @@ -418,7 +410,7 @@ int mma1cdi_(integer *ndimen, goto L9100; } -/* ------------------- Discretisation des polynomes d'Hermite ----------- +/* ------------------- Discretization of Hermite polynoms ----------- */ ncfhe = (*iordre + 1) << 1; @@ -433,7 +425,7 @@ int mma1cdi_(integer *ndimen, /* L100: */ } -/* ---- On retranche les discretisations des polynomes de contrainte ---- +/* ---- Discretizations of boundary polynoms are taken ---- */ nroo2 = *nbroot / 2; @@ -466,9 +458,9 @@ int mma1cdi_(integer *ndimen, /* L300: */ } -/* ------------ Cas ou l' on discretise sur les racines d' un ----------- +/* ------------ Cas when discretization is done on the roots of a ----------- */ -/* ---------- polynome de Legendre de degre impair, 0 est racine -------- +/* ---------- Legendre polynom of uneven degree, 0 is root -------- */ if (*nbroot % 2 == 1) { @@ -492,7 +484,7 @@ int mma1cdi_(integer *ndimen, /* ------------------------------ The End ------------------------------- */ -/* --> IORDRE n'est pas dans la plage autorisee. */ +/* --> IORDRE is not in the authorized zone. */ L9100: *iercod = 1; goto L9999; @@ -529,51 +521,46 @@ int mma1cnt_(integer *ndimen, /* *********************************************************************** */ - /* FONCTION : */ + /* FUNCTION : */ /* ---------- */ - /* Ajout du polynome de contrainte. */ + /* Add constraint to polynom. */ /* MOTS CLES : */ /* ----------- */ - /* TOUS,AB_SPECIFI::COURE&,APPROXIMATION,ADDITION,&CONTRAINTE */ + /* ALL,AB_SPECIFI::COURE&,APPROXIMATION,ADDITION,&CONSTRAINT */ - /* ARGUMENTS D'ENTREE : */ + /* INPUT ARGUMENTS : */ /* -------------------- */ - /* NDIMEN: Dimension de l'espace */ - /* IORDRE: Ordre de contrainte. */ - /* CONTR1: pt de contrainte en -1, de l'ordre 0 a IORDRE. */ - /* CONTR2: Pt de contrainte en +1, de l'ordre 0 a IORDRE. */ - /* HERMIT: Table des polynomes d'hermite d'ordre IORDRE. */ - /* CRVJAV: Courbe d'approximation dans la base de Jacobi. */ + /* NDIMEN: Dimension of the space */ + /* IORDRE: Order of constraint. */ + /* CONTR1: pt of constraint in -1, from order 0 to IORDRE. */ + /* CONTR2: Pt of constraint in +1, from order 0 to IORDRE. */ + /* HERMIT: Table of Hermit polynoms of order IORDRE. */ + /* CRVJAV: Curve of approximation in Jacobi base. */ - /* ARGUMENTS DE SORTIE : */ + /* OUTPUT ARGUMENTS : */ /* --------------------- */ - /* CRVJAV: Courbe d'approximation dans la base de Jacobi */ - /* a laquelle on a ajoute le polynome d'interpolation des */ - /* contraintes. */ + /* CRVJAV: Curve of approximation in Jacobi base */ + /* to which the polynom of interpolation of constraints is added. */ - /* COMMONS UTILISES : */ + /* COMMON USED : */ /* ------------------ */ - /* REFERENCES APPELEES : */ + /* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 07-08-91:RBD; Ecriture version originale. */ /* > */ /* *********************************************************************** */ /* DECLARATIONS */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* *********************************************************************** */ @@ -603,7 +590,7 @@ int mma1cnt_(integer *ndimen, /* *********************************************************************** */ -/* TRAITEMENT */ +/* Processing */ /* *********************************************************************** */ @@ -627,7 +614,7 @@ int mma1cnt_(integer *ndimen, /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -685,97 +672,89 @@ int mma1fdi_(integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Discretisation d' une fonction non polynomiale F(U,V) ou d'une */ -/* de ses derivees a isoparametre fixe. */ +/* DiscretiZation of a non-polynomial function F(U,V) or of */ +/* its derivative with fixed isoparameter. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, AB_SPECIFI::FONCTION&, DISCRETISATION, &POINT */ +/* ALL, AB_SPECIFI::FONCTION&, DISCRETISATION, &POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* UVFONC: Bornes du pave de definition en U et en V de la fonction */ -/* a approcher. */ -/* FONCNP: Le NOM de la fonction non polynomiale a approcher */ -/* (programme externe). */ -/* ISOFAV: Isoparametre fixe pour la discretisation; */ -/* = 1, on discretise a U fixe et V variable. */ -/* = 2, on discretise a V fixe et U variable. */ -/* TCONST: Valeur de l'iso fixe. */ -/* NBROOT: Nbre de parametres INTERNES de discretisation. */ -/* (s'il y a des contraintes, on doit ajouter 2 extremites). -*/ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* TTABLE: Tableau des parametres de discretisation et des 2 */ -/* extremites */ -/* (Respectivement (-1, NBROOT racines de Legendre,1) */ -/* recadrees dans l'intervalle adequat. */ -/* IORDRE: Ordre de contrainte impose aux extremites de l'iso. */ -/* (Si Iso-U, on doit calculer les derivees en V et vice */ +/* NDIMEN: Space dimension. */ +/* UVFONC: Limits of the path of definition by U and by V of the approximated function */ +/* FONCNP: The NAME of the non-polynomial function to be approximated */ +/* (external program). */ +/* ISOFAV: Fixed isoparameter for the discretization; */ +/* = 1, discretization with fixed U and variable V. */ +/* = 2, discretization with fixed V and variable U. */ +/* TCONST: Iso value is also fixed. */ +/* NBROOT: Number of INTERNAL discretization parameters. */ +/* (if there are constraints, 2 extremities should be added). +*/ +/* This is also the root number of the Legendre polynom where */ +/* the discretization is done. */ +/* TTABLE: Table of discretization parameters and of 2 extremities */ +/* (Respectively (-1, NBROOT Legendre roots,1) */ +/* reframed within the adequate interval. */ +/* IORDRE: Order of constraint imposed on the extremities of the iso. */ +/* (If Iso-U, it is necessary to calculate the derivatives by V and vice */ /* versa). */ -/* = 0, on calcule les extremites de l'iso */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso */ -/* IDERIV: Ordre de derivee transverse a l'iso fixee (Si Iso-U=Uc */ -/* fixee, on discretise la derivee d'ordre IDERIV en U de */ -/* F(Uc,v). Idem si on fixe une iso-V). */ -/* Varie de 0 (positionnement) a 2 (derivee 2nde). */ - -/* ARGUMENTS DE SORTIE : */ +/* = 0, the extremities of the iso are calculated. */ +/* = 1, additionally the 1st derivative in the direction of the iso is calculated */ +/* = 2, additionally the 2nd derivative in the direction of the iso is calculated */ +/* IDERIV: Order of derivative transversal to fixed iso (If Iso-U=Uc */ +/* is fixed, the derivative of order IDERIV is discretized by U of */ +/* F(Uc,v). Same if iso-V is fixed). */ +/* Varies from 0 (positioning) to 2 (2nd derivative). */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* FPNTAB: Tableau auxiliaire. */ -/* SOMTAB: Tableau des NBROOT/2 sommes des 2 points d'indices */ -/* NBROOT-II+1 et II, pour II = 1, NBROOT/2 */ -/* DIFTAB: Tableau des NBROOT/2 differences des 2 points d'indices */ -/* NBROOT-II+1 et II, pour II = 1, NBROOT/2 */ -/* CONTR1: Contient, si IORDRE>=0, les IORDRE+1 valeurs en TTABLE(0) -*/ -/* (1ere extremitee) de derivees de F(Uc,Ve) ou F(Ue,Vc), */ -/* voir ci dessous. */ -/* CONTR2: Contient, si IORDRE>=0, les IORDRE+1 valeurs en */ -/* TTABLE(NBROOT+1) (2eme extremitee) de: */ -/* Si ISOFAV=1, derivee d'ordre IDERIV en U, derivee */ -/* d'ordre 0 a IORDRE en V de F(Uc,Ve) ou Uc=TCONST */ -/* (valeur de l'iso fixe) et Ve est l'extremite fixe. */ -/* Si ISOFAV=2, derivee d'ordre IDERIV en V, derivee */ -/* d'ordre 0 a IORDRE en U de F(Ue,Vc) ou Vc=TCONST */ -/* (valeur de l'iso fixe) et Ue est l'extremite fixe. */ -/* IERCOD: Code d' erreur > 100; Pb dans l' evaluation de FONCNP, */ -/* le code d'erreur renvoye est egal au code d' erreur */ -/* de FONCNP + 100. */ - -/* COMMONS UTILISES : */ +/* FPNTAB: Auxiliary table. + SOMTAB: Table of NBROOT/2 sums of 2 index points */ +/* NBROOT-II+1 and II, for II = 1, NBROOT/2 */ +/* DIFTAB: Table of NBROOT/2 differences of 2 index points */ +/* NBROOT-II+1 and II, for II = 1, NBROOT/2 */ +/* CONTR1: Contains, if IORDRE>=0, values IORDRE+1 in TTABLE(0) +*/ +/* (1st extremity) of derivatives of F(Uc,Ve) or F(Ue,Vc), */ +/* see below. */ +/* CONTR2: Contains, if IORDRE>=0, values IORDRE+1 in */ +/* TTABLE(NBROOT+1) (2nd extremity) of: */ +/* If ISOFAV=1, derived of order IDERIV by U, derived */ +/* ordre 0 to IORDRE by V of F(Uc,Ve) or Uc=TCONST */ +/* (fixed iso value) and Ve is the fixed extremity. */ +/* If ISOFAV=2, derivative of order IDERIV by V, derivative */ +/* of order 0 to IORDRE by U of F(Ue,Vc) or Vc=TCONST */ +/* (fixed iso value) and Ue is the fixed extremity. */ +/* IERCOD: Error code > 100; Pb in evaluation of FONCNP, */ +/* the returned error code is equal to error code of FONCNP + 100. */ + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Les resultats de la discretisation sont ranges dans 2 tableaux */ -/* SOMTAB et DIFTAB pour gagner du temps par la suite lors du */ -/* calcul des coefficients de la courbe d' approximation. */ +/* The results of discretization are arranged in 2 tables */ +/* SOMTAB and DIFTAB to earn time during the */ +/* calculation of coefficients of the approximation curve. */ -/* Si NBROOT est impair, on stocke dans SOMTAB(0,*) et DIFTAB(0,*) */ -/* les valeurs de la racine mediane de Legendre (0.D0 dans (-1,1)). */ +/* If NBROOT is uneven in SOMTAB(0,*) and DIFTAB(0,*) one stores */ +/* the values of the median root of Legendre (0.D0 in (-1,1)). */ -/* La fonction F(u,v) definie dans UVFONC est reparametre dans */ -/* (-1,1)x(-1,1). On renormalise donc les derivees 1eres et 2ndes. */ +/* Function F(u,v) defined in UVFONC is reparameterized in */ +/* (-1,1)x(-1,1). Then 1st and 2nd derivatives are renormalized. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 24-06-1991: RBD; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -802,32 +781,32 @@ int mma1fdi_(integer *ndimen, } *iercod = 0; -/* --------------- Definition du nbre de points a calculer -------------- +/* --------------- Definition of the nb of points to calculate -------------- */ -/* --> Si contraintes, on prend aussi les bornes */ +/* --> If constraints, the limits are also taken */ if (*iordre >= 0) { ideb = 0; ifin = *nbroot + 1; -/* --> Sinon, seule les racines de Legendre (recadrees) sont utilisees +/* --> Otherwise, only Legendre roots (reframed) are used . */ } else { ideb = 1; ifin = *nbroot; } -/* --> Nbre de point a calculer. */ +/* --> Nb of point to calculate. */ nbp = ifin - ideb + 1; nroo2 = *nbroot / 2; -/* --------------- Determination de l'ordre de derivation global -------- +/* --------------- Determination of the order of global derivation -------- */ -/* --> Ici ISOFAV ne prend que les valeurs 1 ou 2. */ -/* Si Iso-U, on derive en U a l'ordre IDERIV */ +/* --> ISOFAV takes only values 1 or 2. */ +/* if Iso-U, derive by U of order IDERIV */ if (*isofav == 1) { ideru = *ideriv; iderv = 0; d__1 = (uvfonc[4] - uvfonc[3]) / 2.; renor = AdvApp2Var_MathBase::pow__di(&d__1, ideriv); -/* Si Iso-V, on derive en V a l'ordre IDERIV */ +/* if Iso-V, derive by V of order IDERIV */ } else { ideru = 0; iderv = *ideriv; @@ -835,9 +814,9 @@ int mma1fdi_(integer *ndimen, renor = AdvApp2Var_MathBase::pow__di(&d__1, ideriv); } -/* ----------- Discretisation sur les racines du polynome --------------- +/* ----------- Discretization on roots of the --------------- */ -/* ---------------------- de Legendre de degre NBROOT ------------------- +/* ---------------------- Legendre polynom of degree NBROOT ------------------- */ (*foncnp)(ndimen, @@ -869,9 +848,9 @@ int mma1fdi_(integer *ndimen, /* L100: */ } -/* ------------ Cas ou l' on discretise sur les racines d' un ----------- +/* ------------ Case when discretisation is done on roots of a ---- */ -/* ---------- polynome de Legendre de degre impair, 0 est racine -------- +/* ---------- Legendre polynom of uneven degree, 0 is root -------- */ if (*nbroot % 2 == 1) { @@ -892,11 +871,11 @@ int mma1fdi_(integer *ndimen, } -/* --------------------- Prise en compte des contraintes ---------------- +/* --------------------- Take into account constraints ---------------- */ if (*iordre >= 0) { -/* --> Recup des extremites deja calculees. */ +/* --> Recover already calculated extremities. */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { contr1[nd + contr1_dim1] = renor * fpntab[nd]; @@ -904,11 +883,11 @@ int mma1fdi_(integer *ndimen, fpntab_dim1]; /* L400: */ } -/* --> Nbre de pts a calculer/appel a FONCNP */ +/* --> Nb of points to calculate/call to FONCNP */ nbp = 1; -/* Si Iso-U, on derive en V jusqu'a l'ordre IORDRE */ +/* If Iso-U, derive by V till order IORDRE */ if (*isofav == 1) { -/* --> Facteur de normalisation derivee 1ere. */ +/* --> Factor of normalisation 1st derivative. */ bid1 = (uvfonc[6] - uvfonc[5]) / 2.; i__1 = *iordre; for (iderv = 1; iderv <= i__1; ++iderv) { @@ -930,9 +909,9 @@ int mma1fdi_(integer *ndimen, } /* L510: */ } -/* Si Iso-V, on derive en U jusqu'a l'ordre IORDRE */ +/* If Iso-V, derive by U till order IORDRE */ } else { -/* --> Facteur de normalisation derivee 1ere. */ +/* --> Factor of normalization 1st derivative. */ bid1 = (uvfonc[4] - uvfonc[3]) / 2.; i__1 = *iordre; for (ideru = 1; ideru <= i__1; ++ideru) { @@ -956,9 +935,9 @@ int mma1fdi_(integer *ndimen, } } -/* ------------------------- Normalisation des derivees ------------- +/* ------------------------- Normalization of derivatives ------------- ---- */ -/* (La fonction est redefinie sur (-1,1)*(-1,1)) */ +/* (The function is redefined on (-1,1)*(-1,1)) */ bid2 = renor; i__1 = *iordre; for (ii = 1; ii <= i__1; ++ii) { @@ -1016,71 +995,65 @@ int mma1fer_(integer *,//ndimen, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul du degre et les erreurs d'approximation d'une frontiere. */ +/* Calculate the degree and the errors of approximation of a border. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,AB_SPECIFI :: COURBE&,TRONCATURE, &PRECISION */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* NDIMEN: Dimension totale de l' espace (somme des dimensions */ -/* des sous-espaces) */ -/* NBSESP: Nombre de sous-espaces "independants". */ -/* NDIMSE: Table des dimensions des sous-espaces. */ -/* IORDRE: Ordre de contrainte aux extremites de la frontiere */ -/* -1 = pas de contraintes, */ -/* 0 = contraintes de passage aux bornes (i.e. C0), */ -/* 1 = C0 + contraintes de derivees 1eres (i.e. C1), */ -/* 2 = C1 + contraintes de derivees 2ndes (i.e. C2). */ -/* NDGJAC: Degre du developpement en serie a utiliser pour le calcul -*/ -/* dans la base de Jacobi. */ -/* CRVJAC: Table des coeff. de la courbe d'approximation dans la */ -/* base de Jacobi. */ -/* NCFLIM: Nombre maxi de coeff de la "courbe" polynomiale */ -/* d' approximation (doit etre superieur ou egal a */ -/* 2*IORDRE+2 et inferieur ou egal a 50). */ -/* EPSAPR: Table des erreurs d' approximations a ne pas depasser, */ -/* sous-espace par sous-espace. */ -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Total Dimension of the space (sum of dimensions of sub-spaces) */ +/* NBSESP: Number of "independent" sub-spaces. */ +/* NDIMSE: Table of dimensions of sub-spaces. */ +/* IORDRE: Order of constraint at the extremities of the border */ +/* -1 = no constraints, */ +/* 0 = constraints of passage to limits (i.e. C0), */ +/* 1 = C0 + constraintes of 1st derivatives (i.e. C1), */ +/* 2 = C1 + constraintes of 2nd derivatives (i.e. C2). */ +/* NDGJAC: Degree of development in series to use for the calculation +/* in the base of Jacobi. */ +/* CRVJAC: Table of coeff. of the curve of approximation in the */ +/* base of Jacobi. */ +/* NCFLIM: Max number of coeff of the polynomial curve */ +/* of approximation (should be above or equal to */ +/* 2*IORDRE+2 and below or equal to 50). */ +/* EPSAPR: Table of errors of approximations that cannot be passed, */ +/* sub-space by sub-space. */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* YCVMAX: Tableau auxiliaire. */ -/* ERRMAX: Table des erreurs (sous-espace par sous espace) */ -/* MAXIMALES commises dans l' approximation de FONCNP par */ +/* YCVMAX: Auxiliary Table. */ +/* ERRMAX: Table of errors (sub-space by sub-space) */ +/* MAXIMUM made in the approximation of FONCNP by */ /* COURBE. */ -/* ERRMOY: Table des erreurs (sous-espace par sous espace) */ -/* MOYENNES commises dans l' approximation de FONCNP par */ +/* ERRMOY: Table of errors (sub-space by sub-space) */ +/* AVERAGE made in the approximation of FONCNP by */ /* COURBE. */ -/* NCOEFF: Nombre de coeff. significatifs de la "courbe" calculee. */ -/* IERCOD: Code d'erreur */ +/* NCOEFF: Number of significative coeffs. of the calculated "curve". */ +/* IERCOD: Error code */ /* = 0, ok, */ -/* =-1, warning, la tolerance demandee ne peut etre */ -/* satisfaite avec NCFLIM coefficients. */ -/* = 1, L'ordre des contraintes (IORDRE) n'est pas dans les */ -/* valeurs autorisees. */ +/* =-1, warning, required tolerance can't be */ +/* met with coefficients NFCLIM. */ +/* = 1, order of constraints (IORDRE) is not within authorised values */ +/* -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 07-02-92: RBD; Correction du retour du code d'erreur negatif. */ -/* 07-08-91: RBD; VERSION ORIGINALE */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -1103,16 +1076,16 @@ int mma1fer_(integer *,//ndimen, *ncoeff = 0; ncfja = *ndgjac + 1; -/* ------------ Calcul du degre de la courbe et de l' erreur Max -------- +/* ------------ Calculate the degree of the curve and of the Max error -------- */ -/* -------------- de l' approximation pour tous les sous-espaces -------- +/* -------------- of approximation for all sub-spaces -------- */ i__1 = *nbsesp; for (ii = 1; ii <= i__1; ++ii) { ndses = ndimse[ii]; -/* ------------ coupure des coeff. et calcul de l' erreur Max ------- +/* ------------ cutting of coeff. and calculation of Max error ------- ---- */ AdvApp2Var_MathBase::mmtrpjj_(&ncfja, &ndses, &ncfja, &epsapr[ii], iordre, &crvjac[idim * @@ -1120,7 +1093,7 @@ int mma1fer_(integer *,//ndimen, /* ****************************************************************** **** */ -/* ------------- Si precision OK, calcul de l' erreur moyenne ------- +/* ------------- If precision OK, calculate the average error ------- ---- */ /* ****************************************************************** **** */ @@ -1130,7 +1103,7 @@ int mma1fer_(integer *,//ndimen, crvjac_dim1], &ncfnw, &errmoy[ii]); *ncoeff = max(ncfnw,*ncoeff); -/* ------------- Mise a 0.D0 des coefficients ecartes ----------- +/* ------------- Set the declined coefficients to 0.D0 ----------- -------- */ nbr0 = *ncflim - ncfnw; @@ -1146,14 +1119,14 @@ int mma1fer_(integer *,//ndimen, /* ************************************************************** ******** */ -/* ------------------- Si precision souhaitee non atteinte ------ +/* ------------------- If required precision can't be reached---- -------- */ /* ************************************************************** ******** */ *iercod = -1; -/* ------------------------- calcul de l' erreur Max ------------ +/* ------------------------- calculate the Max error ------------ -------- */ AdvApp2Var_MathBase::mmaperx_(&ncfja, &ndses, &ncfja, iordre, &crvjac[idim * @@ -1162,12 +1135,12 @@ int mma1fer_(integer *,//ndimen, goto L9100; } -/* -------------------- du nbre de coeff a renvoyer ------------- +/* -------------------- nb of coeff to be returned ------------- -------- */ *ncoeff = *ncflim; -/* ------------------- et calcul de l' erreur moyenne ----------- +/* ------------------- and calculation of the average error ---- -------- */ mmaperm_(&ncfja, &ndses, &ncfja, iordre, &crvjac[idim * @@ -1181,7 +1154,7 @@ int mma1fer_(integer *,//ndimen, /* ------------------------------ The end ------------------------------- */ -/* --> L'ordre des contraintes n'est pas dans les valeurs autorisees. */ +/* --> The order of constraints is not within autorized values. */ L9100: *iercod = 1; goto L9999; @@ -1216,55 +1189,50 @@ int AdvApp2Var_ApproxF2var::mma1her_(const integer *iordre, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul des 2*(IORDRE+1) polynomes d'Hermite de degre 2*IORDRE+1 */ -/* sur (-1,1) */ +/* Calculate 2*(IORDRE+1) Hermit polynoms of degree 2*IORDRE+1 */ +/* on (-1,1) */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, AB_SPECIFI::CONTRAINTE&, INTERPOLATION, &POLYNOME */ +/* ALL, AB_SPECIFI::CONTRAINTE&, INTERPOLATION, &POLYNOME */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* IORDRE: Ordre de contrainte. */ -/* = 0, Polynome d'interpolation a l'ordre C0 sur (-1,1). */ -/* = 1, Polynome d'interpolation a l'ordre C0 et C1 sur (-1,1). */ -/* = 2, Polynome d'interpolation a l'ordre C0, C1 et C2 sur (-1,1). +/* IORDRE: Order of constraint. */ +/* = 0, Polynom of interpolation of order C0 on (-1,1). */ +/* = 1, Polynom of interpolation of order C0 and C1 on (-1,1). */ +/* = 2, Polynom of interpolation of order C0, C1 and C2 on (-1,1). */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* HERMIT: Table des 2*IORDRE+2 coeff. de chacun des 2*(IORDRE+1) */ -/* polynomes d'HERMITE. */ -/* IERCOD: Code d'erreur, */ +/* HERMIT: Table of 2*IORDRE+2 coeff. of each of 2*(IORDRE+1) */ +/* HERMIT polynom. */ +/* IERCOD: Error code, */ /* = 0, Ok */ -/* = 1, L'ordre de contrainte demande n'est pas gere ici. */ -/* COMMONS UTILISES : */ +/* = 1, required order of constraint is not managed here. */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* La partie du tableau HERMIT(*,2*i+j) ou j=1 ou 2 et i=0 a IORDRE, -*/ -/* contient les coefficients du polynome de degre 2*IORDRE+1 */ -/* tel que TOUTES les valeurs en -1 et en +1 de ce polynome et de */ -/* ses derivees jusqu'a l'ordre de derivation IORDRE sont NULLES, */ -/* SAUF la derivee d'ordre i: */ -/* - qui vaut 1 en -1 si j=1 */ -/* - qui vaut 1 en +1 si j=2. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 02-07-1991: RBD; Creation. */ +/* The part of HERMIT(*,2*i+j) table where j=1 or 2 and i=0 to IORDRE, +/* contains the coefficients of the polynom of degree 2*IORDRE+1 */ +/* such as ALL values in -1 and in +1 of this polynom and its */ +/* derivatives till order of derivation IORDRE are NULL, */ +/* EXCEPT for the derivative of order i: */ +/* - valued 1 in -1 if j=1 */ +/* - valued 1 in +1 if j=2. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -1279,7 +1247,7 @@ int AdvApp2Var_ApproxF2var::mma1her_(const integer *iordre, } *iercod = 0; -/* --- Recup des (IORDRE+2) coeff des 2*(IORDRE+1) polynomes d'Hermite -- +/* --- Recover (IORDRE+2) coeff of 2*(IORDRE+1) Hermit polynoms -- */ if (*iordre == 0) { @@ -1387,59 +1355,50 @@ int mma1jak_(integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule la courbe d' approximation d' une fonction non */ -/* polynomiale dans la base de Jacobi. */ +/* Calculate the curve of approximation of a non-polynomial function */ +/* in the base of Jacobi. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* FONCTION,DISCRETISATION,APPROXIMATION,CONTRAINTE,COURBE,JACOBI */ +/* FUNCTION,DISCRETISATION,APPROXIMATION,CONSTRAINT,CURVE,JACOBI */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension totale de l' espace (somme des dimensions */ -/* des sous-espaces) */ -/* NBROOT: Nbre de points de discretisation de l'iso, extremites non -*/ -/* comprises. */ -/* IORDRE: Ordre de contrainte aux extremites de la frontiere */ -/* -1 = pas de contraintes, */ -/* 0 = contraintes de passage aux bornes (i.e. C0), */ -/* 1 = C0 + contraintes de derivees 1eres (i.e. C1), */ -/* 2 = C1 + contraintes de derivees 2ndes (i.e. C2). */ -/* NDGJAC: Degre du developpement en serie a utiliser pour le calcul -*/ -/* dans la base de Jacobi. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Total dimension of the space (sum of dimensions */ +/* of sub-spaces) */ +/* NBROOT: Nb of points of discretization of the iso, extremities not +/* included. */ +/* IORDRE: Order of constraint at the extremities of the boundary */ +/* -1 = no constraints, */ +/* 0 = constraints of passage of limits (i.e. C0), */ +/* 1 = C0 + constraints of 1st derivatives (i.e. C1), */ +/* 2 = C1 + constraints of 2nd derivatives (i.e. C2). */ +/* NDGJAC: Degree of development in series to be used for calculation in the +/* base of Jacobi. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CRVJAC : Courbe d' approximation de FONCNP avec (eventuellement) */ -/* prise en compte des contraintes aux extremites. */ -/* Cette courbe est de degre NDGJAC. */ -/* IERCOD : Code d' erreur : */ -/* 0 = Tout est ok. */ -/* 33 = Pb dans la recuperation des donnees du block data */ -/* des coeff. d' integration par la methode de GAUSS. */ -/* par le programme MMAPPTT. */ - -/* COMMONS UTILISES : */ +/* CRVJAC : Curve of approximation of FONCNP with (eventually) */ +/* taking into account of constraints at the extremities. */ +/* This curve is of degree NDGJAC. */ +/* IERCOD : Error code : */ +/* 0 = All is ok. */ +/* 33 = Pb to return data of du block data */ +/* of coeff. of integration by GAUSS method. */ +/* by program MMAPPTT. */ + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 07-08-1991 : RBD ; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ diftab_dim1 = *nbroot / 2 + 1; @@ -1460,7 +1419,7 @@ int mma1jak_(integer *ndimen, } *iercod = 0; -/* ----------------- Recup des coeff. d'integration par Gauss ----------- +/* ----------------- Recover coeffs of integration by Gauss ----------- */ AdvApp2Var_ApproxF2var::mmapptt_(ndgjac, nbroot, iordre, cgauss, iercod); @@ -1469,7 +1428,7 @@ int mma1jak_(integer *ndimen, goto L9999; } -/* --------------- Calcul de la courbe dans la base de Jacobi ----------- +/* --------------- Calculate the curve in the base of Jacobi ----------- */ mmmapcoe_(ndimen, ndgjac, iordre, nbroot, &somtab[somtab_offset], &diftab[ @@ -1513,72 +1472,68 @@ int mma1noc_(doublereal *dfuvin, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Normalisation des contraintes de derivees, definies sur DFUVIN */ -/* sur le pave DUVOUT. */ +/* Normalization of constraints of derivatives, defined on DFUVIN */ +/* on block DUVOUT. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, AB_SPECIFI::VECTEUR&,DERIVEE&,NORMALISATION,&VECTEUR */ +/* ALL, AB_SPECIFI::VECTEUR&,DERIVEE&,NORMALISATION,&VECTEUR */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* DFUVIN: Bornes du pave de definition en U et en V ou sont definies +/* DFUVIN: Limits of the block of definition by U and by V where */ -/* les contraintes CNTRIN. */ -/* NDIMEN: Dimension de l' espace. */ -/* IORDRE: Ordre de contrainte impose aux extremites de l'iso. */ -/* (Si Iso-U, on doit calculer les derivees en V et vice */ +/* constraints CNTRIN are defined. */ +/* NDIMEN: Dimension of the space. */ +/* IORDRE: Order of constraint imposed at the extremities of the iso. */ +/* (if Iso-U, it is necessary to calculate derivatives by V and vice */ /* versa). */ -/* = 0, on a calcule les extremites de l'iso */ -/* = 1, on a calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso */ -/* = 2, on a calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso */ -/* CNTRIN: Contient, si IORDRE>=0, les IORDRE+1 derivees */ -/* d'ordre IORDRE de F(Uc,v) ou de F(u,Vc), suivant la */ -/* valeur de ISOFAV, RENORMALISEES pour u et v dans (-1,1). */ -/* DUVOUT: Bornes du pave de definition en U et en V ou seront */ -/* definies les contraintes CNTOUT. */ -/* ISOFAV: Isoparametre fixe pour la discretisation; */ -/* = 1, on discretise a U=Uc fixe et V variable. */ -/* = 2, on discretise a V=Vc fixe et U variable. */ +/* = 0, the extremities of the iso are calculated */ +/* = 1, additionally the 1st derivative in the direction */ +/* of the iso is calculated */ +/* = 2, additionally the 2nd derivative in the direction */ +/* of the iso is calculated */ +/* CNTRIN: Contains, if IORDRE>=0, IORDRE+1 derivatives */ +/* of order IORDRE of F(Uc,v) or of F(u,Vc), following the */ +/* value of ISOFAV, RENORMALIZED by u and v in (-1,1). */ +/* DUVOUT: Limits of the block of definition by U and by V where the */ +/* constraints CNTOUT will be defined. */ +/* ISOFAV: Isoparameter fixed for the discretization; */ +/* = 1, discretization with fixed U=Uc and variable V. */ +/* = 2, discretization with fixed V=Vc and variable U. */ /* IDERIV: Ordre de derivee transverse a l'iso fixee (Si Iso-U=Uc */ -/* fixee, on discretise la derivee d'ordre IDERIV en U de */ -/* F(Uc,v). Idem si on fixe une iso-V). */ -/* Varie de 0 (positionnement) a 2 (derivee 2nde). */ +/* is fixed, the derivative of order IDERIV is discretized by U */ +/* of F(Uc,v). The same if iso-V is fixed). */ +/* Varies from (positioning) to 2 (2nd derivative). */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CNTOUT: Contient, si IORDRE>=0, les IORDRE+1 derivees */ -/* d'ordre IORDRE de F(Uc,v) ou de F(u,Vc), suivant la */ -/* valeur de ISOFAV, RENORMALISEES pour u et v dans DUVOUT. */ +/* CNTOUT: Contains, if IORDRE>=0, IORDRE+1 derivatives */ +/* of order IORDRE of F(Uc,v) or of F(u,Vc), depending on the */ +/* value of ISOFAV, RENORMALIZED for u and v in DUVOUT. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* CNTRIN peut etre un argument d'entree/sortie, */ -/* c'est a dire que l'appel: */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ +/* ------------------------------- */ +/* CNTRIN can be an output/input argument, */ +/* so the call: */ /* CALL MMA1NOC(DFUVIN,NDIMEN,IORDRE,CNTRIN,DUVOUT */ /* 1 ,ISOFAV,IDERIV,CNTRIN) */ -/* est correct. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 10-02-1992: RBD; Creation. */ +/* is correct. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -1593,7 +1548,7 @@ int mma1noc_(doublereal *dfuvin, AdvApp2Var_SysBase::mgenmsg_("MMA1NOC", 7L); } -/* --------------- Determination des coefficients de normalisation ------- +/* --------------- Determination of coefficients of normalization ------- */ if (*isofav == 1) { @@ -1609,7 +1564,7 @@ int mma1noc_(doublereal *dfuvin, riord = AdvApp2Var_MathBase::pow__di(&d__1, iordre); } -/* ------------- Renormalisation du vecteur de contrainte --------------- +/* ------------- Renormalization of the vector of constraint --------------- */ bid = rider * riord; @@ -1652,47 +1607,35 @@ int mma1nop_(integer *nbroot, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Normalisation de parametres d'une iso, a partir du pave */ -/* parametrique et des parametres sur (-1,1). */ +/* Normalization of parameters of an iso, starting from */ +/* parametric block and parameters on (-1,1). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,AB_SPECIFI :: ISO&,POINT&,NORMALISATION,&POINT,&ISO */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* NBROOT: Nbre de pts de discretisation INTERIEURS a l'iso */ -/* definie sur (-1,1). */ -/* ROOTLG: Table des parametres de discretisation sur )-1,1( */ -/* de l'iso. */ -/* UVFONC: Pave de definition de l'iso */ -/* ISOFAV: = 1, c'est une iso-u; =2, c'est une iso-v. */ - -/* ARGUMENTS DE SORTIE : */ +/* NBROOT: Nb of points of discretisation INSIDE the iso */ +/* defined on (-1,1). */ +/* ROOTLG: Table of discretization parameters on )-1,1( */ +/* of the iso. */ +/* UVFONC: Block of definition of the iso */ +/* ISOFAV: = 1, this is iso-u; =2, this is iso-v. */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* TTABLE: Table des parametres renormalises sur UVFONC de l'iso. +/* TTABLE: Table of parameters renormalized on UVFONC of the iso. */ /* IERCOD: = 0, OK */ -/* = 1, ISOFAV est hors des valeurs permises. */ +/* = 1, ISOFAV is out of allowed values. */ -/* COMMONS UTILISES : */ -/* ------------------ */ - -/* REFERENCES APPELEES : */ -/* --------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 06-02-92: RBD; Creation version originale, d'apres MA1NPA. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -1788,65 +1731,52 @@ int AdvApp2Var_ApproxF2var::mma2ac1_(integer const *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Ajout des polynomes de contraintes des coins. */ +/* Add polynoms of edge constraints. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,AB_SPECIFI::POINT&,CONTRAINTE&,ADDITION,&POLYNOME */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l'espace. */ -/* MXUJAC: Degre maxi du polynome d' approximation en U. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre MXUJAC-2*(IORDRU+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2 */ -/* MXVJAC: Degre maxi du polynome d' approximation en V. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre MXVJAC-2*(IORDRV+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2 */ -/* IORDRU: Ordre de la base de Jacobi (-1,0,1 ou 2) en U. Correspond */ -/* a pas de contraintes, contraintes C0, C1 ou C2. */ -/* IORDRV: Ordre de la base de Jacobi (-1,0,1 ou 2) en V. Correspond */ -/* a pas de contraintes, contraintes C0, C1 ou C2. */ -/* CONTR1: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U0,V0)et de ses derivees. */ -/* CONTR2: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U1,V0)et de ses derivees. */ -/* CONTR3: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U0,V1)et de ses derivees. */ -/* CONTR4: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U1,V1)et de ses derivees. */ -/* UHERMT: Coeff. des polynomes d'Hermite d'ordre IORDRU. */ -/* VHERMT: Coeff. des polynomes d'Hermite d'ordre IORDRV. */ -/* PATJAC: Table des coefficients du polynome P(u,v) d' approximation */ -/* de F(u,v) SANS prise en compte des contraintes. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Dimension of the space. */ +/* MXUJAC: Max degree of the polynom of approximation by U. The */ +/* representation in the orthogonal base starts from degree */ +/* 0 to degree MXUJAC-2*(IORDRU+1). The polynomial base is the */ +/* base of Jacobi of order -1 (Legendre), 0, 1 or 2 */ +/* MXVJAC: Max degree of the polynom of approximation by V. The */ +/* representation in the orthogonal base starts from degree */ +/* 0 to degree MXUJAC-2*(IORDRU+1). The polynomial base is the */ +/* base of Jacobi of order -1 (Legendre), 0, 1 or 2 */ +/* IORDRU: Order of the base of Jacobi (-1,0,1 or 2) by U. Corresponds */ +/* to the step of constraints: C0, C1 or C2. */ +/* IORDRV: Order of the base of Jacobi (-1,0,1 or 2) by V. Corresponds */ +/* to the step of constraints: C0, C1 or C2. */ +/* CONTR1: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U0,V0) and its derivatives. */ +/* CONTR2: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U1,V0) and its derivatives. */ +/* CONTR3: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U0,V1) and its derivatives. */ +/* CONTR4: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U1,V1) and its derivatives. */ +/* UHERMT: Coeff. of Hermit polynoms of order IORDRU. */ +/* VHERMT: Coeff. of Hermit polynoms of order IORDRV. */ +/* PATJAC: Table of coefficients of the polynom P(u,v) of approximation */ +/* of F(u,v) WITHOUT taking into account the constraints. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PATJAC: Table des coefficients du polynome P(u,v) d' approximation */ -/* de F(u,v) AVEC prise en compte des contraintes. */ - -/* COMMONS UTILISES : */ -/* ---------------- */ - -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 06-02-1992: RBD; Creation d'apres MA2CA1. */ +/* PATJAC: Table of coefficients of the polynom P(u,v) by approximation */ +/* of F(u,v) WITH taking into account of constraints. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ -/* --------------------------- Initialisations -------------------------- +/* --------------------------- Initialization -------------------------- */ /* Parameter adjustments */ @@ -1883,7 +1813,7 @@ int AdvApp2Var_ApproxF2var::mma2ac1_(integer const *ndimen, AdvApp2Var_SysBase::mgenmsg_("MMA2AC1", 7L); } -/* ------------ SOUSTRACTION des CONTRAINTES DE COINS ------------------- +/* ------------ SUBTRACTION OF ANGULAR CONSTRAINTS ------------------- */ ioru1 = *iordru + 1; @@ -1964,59 +1894,49 @@ int AdvApp2Var_ApproxF2var::mma2ac2_(const integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Ajout des polynomes de contraintes */ +/* Add polynoms of constraints */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* FONCTION,APPROXIMATION,COEFFICIENT,POLYNOME */ +/* FUNCTION,APPROXIMATION,COEFFICIENT,POLYNOM */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l'espace. */ -/* MXUJAC: Degre maxi du polynome d' approximation en U. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre MXUJAC-2*(IORDRU+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2 */ -/* MXVJAC: Degre maxi du polynome d' approximation en V. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre MXVJAC-2*(IORDRV+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2 */ -/* IORDRV: Ordre de la base de Jacobi (-1,0,1 ou 2) en V. Correspond */ -/* a pas de contraintes, contraintes C0, C1 ou C2. */ -/* NCLIMU: Nbre LIMITE de coeff. en u de la solution P(u,v). */ -/* NCFIV1: Nbre de Coeff. des courbes stockees dans CRBIV1. */ -/* CRBIV1: Table des coeffs de l'approximation de l'iso-V0 et ses */ -/* derivees jusqu'a l'ordre IORDRV. */ -/* NCFIV2: Nbre de Coeff. des courbes stockees dans CRBIV2. */ -/* CRBIV2: Table des coeffs de l'approximation de l'iso-V1 et ses */ -/* derivees jusqu'a l'ordre IORDRV. */ -/* VHERMT: Table des coeff. des polynomes d'Hermite d'ordre IORDRV. */ -/* PATJAC: Table des coefficients du polynome P(u,v) d' approximation */ -/* de F(u,v) SANS prise en compte des contraintes. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Dimension of the space. */ +/* MXUJAC: Max degree of the polynom of approximation by U. The */ +/* representation in the orthogonal base starts from degree */ +/* 0 to degree MXUJAC-2*(IORDRU+1). The polynomial base is the */ +/* base of Jacobi of order -1 (Legendre), 0, 1 or 2 */ +/* MXVJAC: Max degree of the polynom of approximation by V. The */ +/* representation in the orthogonal base starts from degree */ +/* 0 to degree MXUJAC-2*(IORDRU+1). The polynomial base is the */ +/* base of Jacobi of order -1 (Legendre), 0, 1 or 2 */ +/* IORDRV: Order of the base of Jacobi (-1,0,1 or 2) by V. Corresponds */ +/* to the step of constraints: C0, C1 or C2. */ +/* NCLIMU LIMIT nb of coeff by u of the solution P(u,v) +* NCFIV1: Nb of Coeff. of curves stored in CRBIV1. */ +/* CRBIV1: Table of coeffs of the approximation of iso-V0 and its */ +/* derivatives till order IORDRV. */ +/* NCFIV2: Nb of Coeff. of curves stored in CRBIV2. */ +/* CRBIV2: Table of coeffs of approximation of iso-V1 and its */ +/* derivatives till order IORDRV. */ +/* VHERMT: Coeff. of Hermit polynoms of order IORDRV. */ +/* PATJAC: Table of coefficients of the polynom P(u,v) of approximation */ +/* of F(u,v) WITHOUT taking into account the constraints. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PATJAC: Table des coefficients du polynome P(u,v) d' approximation */ -/* de F(u,v) AVEC prise en compte des contraintes. */ - -/* COMMONS UTILISES : */ -/* ---------------- */ +/* PATJAC: Table of coefficients of the polynom P(u,v) by approximation */ +/* of F(u,v) WITH taking into account of constraints. */ +/* > *//* -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 06-02-1992: RBD; Creation d'apres MA2CA2. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* --------------------------- Initialisations -------------------------- */ @@ -2046,7 +1966,7 @@ int AdvApp2Var_ApproxF2var::mma2ac2_(const integer *ndimen, AdvApp2Var_SysBase::mgenmsg_("MMA2AC2", 7L); } -/* ------------ AJOUT des coeff en u des courbes, en v d'Hermite -------- +/* ------------ ADDING of coeff by u of curves, by v of Hermit -------- */ i__1 = *iordrv + 1; @@ -2123,61 +2043,50 @@ int AdvApp2Var_ApproxF2var::mma2ac3_(const integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ /* Ajout des polynomes de contraintes */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* FONCTION,APPROXIMATION,COEFFICIENT,POLYNOME */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l'espace. */ -/* MXUJAC: Degre maxi du polynome d' approximation en U. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre MXUJAC-2*(IORDRU+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2 */ -/* MXVJAC: Degre maxi du polynome d' approximation en V. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre MXVJAC-2*(IORDRU+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2 */ -/* IORDRU: Ordre de la base de Jacobi (-1,0,1 ou 2) en V. Correspond */ -/* a pas de contraintes, contraintes C0, C1 ou C2. */ -/* NCLIMV: Nbre LIMITE de coeff. en v de la solution P(u,v). */ -/* NCFIU1: Nbre de Coeff. des courbes stockees dans CRBIU1. */ -/* CRBIU1: Table des coeffs de l'approximation de l'iso-U0 et ses */ -/* derivees jusqu'a l'ordre IORDRU. */ -/* NCFIU2: Nbre de Coeff. des courbes stockees dans CRBIU2. */ -/* CRBIU2: Table des coeffs de l'approximation de l'iso-U1 et ses */ -/* derivees jusqu'a l'ordre IORDRU. */ -/* UHERMT: Table des coeff. des polynomes d'Hermite d'ordre IORDRU. */ -/* PATJAC: Table des coefficients du polynome P(u,v) d' approximation */ -/* de F(u,v) SANS prise en compte des contraintes. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Dimension of the space. */ +/* MXUJAC: Max degree of the polynom of approximation by U. The */ +/* representation in the orthogonal base starts from degree */ +/* 0 to degree MXUJAC-2*(IORDRU+1). The polynomial base is the */ +/* base of Jacobi of order -1 (Legendre), 0, 1 or 2 */ +/* MXVJAC: Max degree of the polynom of approximation by V. The */ +/* representation in the orthogonal base starts from degree */ +/* 0 to degree MXUJAC-2*(IORDRU+1). The polynomial base is the */ +/* base of Jacobi of order -1 (Legendre), 0, 1 or 2 */ +/* IORDRU: Order of the base of Jacobi (-1,0,1 or 2) by U. Corresponds */ +/* to the step of constraints: C0, C1 or C2. */ +/* NCLIMV LIMIT nb of coeff by v of the solution P(u,v) +* NCFIU1: Nb of Coeff. of curves stored in CRBIU1. */ +/* CRBIU1: Table of coeffs of the approximation of iso-U0 and its */ +/* derivatives till order IORDRU. */ +/* NCFIU2: Nb of Coeff. of curves stored in CRBIU2. */ +/* CRBIU2: Table of coeffs of approximation of iso-U1 and its */ +/* derivatives till order IORDRU */ +/* UHERMT: Coeff. of Hermit polynoms of order IORDRU. */ +/* PATJAC: Table of coefficients of the polynom P(u,v) of approximation */ +/* of F(u,v) WITHOUT taking into account the constraints. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PATJAC: Table des coefficients du polynome P(u,v) d' approximation */ -/* de F(u,v) AVEC prise en compte des contraintes. */ - -/* COMMONS UTILISES : */ -/* ---------------- */ +/* PATJAC: Table of coefficients of the polynom P(u,v) by approximation */ +/* of F(u,v) WITH taking into account of constraints. */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 06-02-1991: RBD; Creation d'apres MA2CA3. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* The name of the routine */ -/* --------------------------- Initialisations -------------------------- +/* --------------------------- Initializations -------------------------- */ /* Parameter adjustments */ @@ -2205,7 +2114,7 @@ int AdvApp2Var_ApproxF2var::mma2ac3_(const integer *ndimen, AdvApp2Var_SysBase::mgenmsg_("MMA2AC3", 7L); } -/* ------------ AJOUT des coeff en u des courbes, en v d'Hermite -------- +/* ------------ ADDING of coeff by u of curves, by v of Hermit -------- */ i__1 = *iordru + 1; @@ -2282,49 +2191,44 @@ int AdvApp2Var_ApproxF2var::mma2can_(const integer *ncfmxu, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Changement de base Jacobi vers canonique (-1,1) et ecriture dans */ -/* un tableau + grand. */ +/* Change of Jacobi base to canonical (-1,1) and writing in a greater */ +/* table. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS,AB_SPECIFI,CARREAU&,CONVERSION,JACOBI,CANNONIQUE,&CARREAU */ +/* ALL,AB_SPECIFI,CARREAU&,CONVERSION,JACOBI,CANNONIQUE,&CARREAU */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* NCFMXU: Dimension en U du tableau resultat PATCAN */ -/* NCFMXV: Dimension en V du tableau resultat PATCAN */ -/* NDIMEN: Dimension de l'espace de travail. */ -/* IORDRU: Ordre de contrainte en U */ -/* IORDRV: Ordre de contrainte en V. */ -/* NCOEFU: Nbre de coeff en U du carreau PATJAC */ -/* NCOEFV: Nbre de coeff en V du carreau PATJAC */ -/* PATJAC: Carreau dans la base de Jacobi d'ordre IORDRU en U et */ -/* IORDRV en V. */ - -/* ARGUMENTS DE SORTIE : */ +/* NCFMXU: Dimension by U of resulting table PATCAN */ +/* NCFMXV: Dimension by V of resulting table PATCAN */ +/* NDIMEN: Dimension of the workspace. */ +/* IORDRU: Order of constraint by U */ +/* IORDRV: Order of constraint by V. */ +/* NCOEFU: Nb of coeff by U of square PATJAC */ +/* NCOEFV: Nb of coeff by V of square PATJAC */ +/* PATJAC: Square in the base of Jacobi of order IORDRU by U and */ +/* IORDRV by V. */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* PATAUX: Tableau auxiliaire. */ -/* PATCAN: Tableau des coefficients dans la base canonique. */ -/* IERCOD: Code d'erreur. */ -/* = 0, tout va tres bien, toutes choses etant egales par */ -/* ailleurs. */ -/* = 1, le programme refuse de traiter avec des arguments */ -/* d'entrees aussi stupides. */ - -/* COMMONS UTILISES : */ +/* PATAUX: Auxiliary Table. */ +/* PATCAN: Table of coefficients in the canonic base. */ +/* IERCOD: Error code. */ +/* = 0, everything goes well, and all things are equal. */ +/* = 1, the program refuses to process with incorrect input arguments */ + + +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 29-01-1992: RBD; Ecriture version originale. */ /* > */ /* ********************************************************************** */ @@ -2358,16 +2262,11 @@ int AdvApp2Var_ApproxF2var::mma2can_(const integer *ncfmxu, goto L9100; } -/* -------------------- Ah les jolis changements de bases --------------- -*/ -/* ------------ (Sur l'air des 'jolies colonies de vacances') ----------- -*/ - -/* --> On passe en base canonique (-1,1) */ +/* --> Pass to canonic base (-1,1) */ mmjacpt_(ndimen, ncoefu, ncoefv, iordru, iordrv, &patjac[patjac_offset], & pataux[1], &patcan[patcan_offset]); -/* --> On ecrit le tout dans un tableau + grand */ +/* --> Write all in a greater table */ AdvApp2Var_MathBase::mmfmca8_((integer *)ncoefu, (integer *)ncoefv, (integer *)ndimen, @@ -2377,7 +2276,7 @@ int AdvApp2Var_ApproxF2var::mma2can_(const integer *ncfmxu, (doublereal *)&patcan[patcan_offset], (doublereal *)&patcan[patcan_offset]); -/* --> On complete avec des zeros le tableau resultat. */ +/* --> Complete with zeros the resulting table. */ ilon1 = *ncfmxu - *ncoefu; ilon2 = *ncfmxu * (*ncfmxv - *ncoefv); i__1 = *ndimen; @@ -2399,7 +2298,7 @@ int AdvApp2Var_ApproxF2var::mma2can_(const integer *ncfmxu, goto L9999; -/* ---------------------- A la revoyure M'sieu dames -------------------- +/* ---------------------- */ L9100: @@ -2464,95 +2363,83 @@ int mma2cd1_(integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Discretisation sur les parametres des polynomes d'interpolation */ -/* des contraintes aux coins a l'ordre IORDRE. */ +/* Discretisation on the parameters of polynoms of interpolation */ +/* of constraints at the corners of order IORDRE. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS, AB_SPECIFI::CONTRAINTE&, DISCRETISATION, &POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* NBPNTU: Nbre de parametres INTERNES de discretisation EN U. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* UROOTL: Tableau des parametres de discretisation SUR (-1,1) EN U. -*/ -/* NBPNTV: Nbre de parametres INTERNES de discretisation EN V. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* VROOTL: Tableau des parametres de discretisation SUR (-1,1) EN V. -*/ -/* IORDRU: Ordre de contrainte impose aux extremites de l'iso-V */ -/* = 0, on calcule les extremites de l'iso-V */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso-V */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso-V */ -/* IORDRV: Ordre de contrainte impose aux extremites de l'iso-U */ -/* = 0, on calcule les extremites de l'iso-U. */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso-U */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso-U */ -/* CONTR1: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U0,V0)et de ses derivees. */ -/* CONTR2: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U1,V0)et de ses derivees. */ -/* CONTR3: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U0,V1)et de ses derivees. */ -/* CONTR4: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U1,V1)et de ses derivees. */ -/* SOSOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* DISOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* SODITB: Tableau deja initialise (argument d'entree/sortie). */ -/* DIDITB: Tableau deja initialise (argument d'entree/sortie). */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Dimension of the space. */ +/* NBPNTU: Nb of INTERNAL parameters of discretisation by U. */ +/* This is also the nb of root of Legendre polynom where discretization is done. */ +/* UROOTL: Table of parameters of discretisation ON (-1,1) by U. +*/ +/* NBPNTV: Nb of INTERNAL parameters of discretisation by V. */ +/* This is also the nb of root of Legendre polynom where discretization is done. */ +/* VROOTL: Table of discretization parameters on (-1,1) by V. +/* IORDRU: Order of constraint imposed at the extremities of iso-V */ +/* = 0, calculate the extremities of iso-V */ +/* = 1, calculate, additionally, the 1st derivative in the direction of iso-V */ +/* = 2, calculate, additionally, the 2nd derivative in the direction of iso-V */ +/* IORDRV: Order of constraint imposed at the extremities of iso-U */ +/* = 0, calculate the extremities of iso-U */ +/* = 1, calculate, additionally, the 1st derivative in the direction of iso-U */ +/* = 2, calculate, additionally, the 2nd derivative in the direction of iso-U */ +/* CONTR1: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U0,V0) and its derivatives. */ +/* CONTR2: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U1,V0) and its derivatives. */ +/* CONTR3: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U0,V1) and its derivatives. */ +/* CONTR4: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U1,V1) and its derivatives. */ +/* SOSOTB: Preinitialized table (input/output argument). */ +/* DISOTB: Preinitialized table (input/output argument). */ +/* SODITB: Preinitialized table (input/output argument). */ +/* DIDITB: Preinitialized table (input/output argument) */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* FPNTBU: Tableau auxiliaire. */ -/* FPNTBV: Tableau auxiliaire. */ -/* UHERMT: Table des 2*(IORDRU+1) coeff. des 2*(IORDRU+1) polynomes */ -/* d'Hermite. */ -/* VHERMT: Table des 2*(IORDRV+1) coeff. des 2*(IORDRV+1) polynomes */ -/* d'Hermite. */ -/* SOSOTB: Tableau ou l'on ajoute les termes de contraintes */ +/* FPNTBU: Auxiliary table. */ +/* FPNTBV: Auxiliary table. */ +/* UHERMT: Table of 2*(IORDRU+1) coeff. of 2*(IORDRU+1) polynoms of Hermite. */ +/* VHERMT: Table of 2*(IORDRV+1) coeff. of 2*(IORDRV+1) polynoms of Hermite. */ +/* SOSOTB: Table where the terms of constraints are added */ /* C(ui,vj) + C(ui,-vj) + C(-ui,vj) + C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DISOTB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DISOTB: Table where the terms of constraints are added */ /* C(ui,vj) + C(ui,-vj) - C(-ui,vj) - C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table where the terms of constraints are added */ /* C(ui,vj) - C(ui,-vj) + C(-ui,vj) - C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table where the terms of constraints are added */ /* C(ui,vj) - C(ui,-vj) - C(-ui,vj) + C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 09-08-1991: RBD; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -2609,7 +2496,7 @@ int mma2cd1_(integer *ndimen, AdvApp2Var_SysBase::mgenmsg_("MMA2CD1", 7L); } -/* ------------------- Discretisation des polynomes d'Hermite ----------- +/* ------------------- Discretisation of Hermite polynoms ----------- */ ncfhu = (*iordru + 1) << 1; @@ -2635,7 +2522,7 @@ int mma2cd1_(integer *ndimen, /* L30: */ } -/* ---- On retranche les discretisations des polynomes de contrainte ---- +/* ---- The discretizations of polynoms of constraints are subtracted ---- */ nuroo = *nbpntu / 2; @@ -2701,10 +2588,10 @@ int mma2cd1_(integer *ndimen, /* L400: */ } -/* ------------ Cas ou l' on discretise sur les racines d' un +/* ------------ Case when the discretization is done only on the roots +----------- */ +/* ---------- of Legendre polynom of uneven degree, 0 is root ----------- */ -/* ---------- polynome de Legendre de degre impair, 0 est raci -ne -------- */ if (*nbpntu % 2 == 1) { sou1 = fpntbu[nuroo + 1 + ((ii << 1) - 1) * fpntbu_dim1]; @@ -2830,86 +2717,81 @@ int mma2cd2_(integer *ndimen, /* ********************************************************************** */ - -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Discretisation sur les parametres des polynomes d'interpolation */ -/* des contraintes sur les 2 bords iso-V a l'ordre IORDRV. */ +/* Discretisation on the parameters of polynoms of interpolation */ +/* of constraints on 2 borders iso-V of order IORDRV. */ -/* MOTS CLES : */ + +/* KEYWORDS : */ /* ----------- */ /* TOUS, AB_SPECIFI::CONTRAINTE&, DISCRETISATION, &POINT */ -/* ARGUMENTS D'ENTREE : */ -/* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* NBPNTU: Nbre de parametres INTERNES de discretisation EN U. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* NBPNTV: Nbre de parametres INTERNES de discretisation EN V. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* VROOTL: Tableau des parametres de discretisation SUR (-1,1) EN V. -*/ -/* IORDRV: Ordre de derivation de l'iso-V */ -/* = 0, on calcule l'iso-V. */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* transverse a l'iso-V (donc en V). */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* transverse a l'iso-V (donc en V). */ -/* SOTBV1: Tableau des NBPNTV/2 sommes des 2 points d'indices */ -/* NBPNTV-II+1 et II, pour II = 1, NBPNTV/2 sur l'iso-V0. */ -/* SOTBV2: Tableau des NBPNTV/2 sommes des 2 points d'indices */ -/* NBPNTV-II+1 et II, pour II = 1, NBPNTV/2 sur l'iso-V1. */ -/* DITBV1: Tableau des NBPNTV/2 differences des 2 points d'indices */ -/* NBPNTV-II+1 et II, pour II = 1, NBPNTV/2 sur l'iso-V0. */ -/* DITBV2: Tableau des NBPNTV/2 differences des 2 points d'indices */ -/* NBPNTV-II+1 et II, pour II = 1, NBPNTV/2 sur l'iso-V1. */ -/* SOSOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* DISOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* SODITB: Tableau deja initialise (argument d'entree/sortie). */ -/* DIDITB: Tableau deja initialise (argument d'entree/sortie). */ -/* ARGUMENTS DE SORTIE : */ + +/* INPUT ARGUMENTS : */ +/* ------------------ */ +/* NDIMEN: Dimension of the space. */ +/* NBPNTU: Nb of INTERNAL parameters of discretisation by U. */ +/* This is also the nb of root of Legendre polynom where discretization is done. */ +/* UROOTL: Table of parameters of discretisation ON (-1,1) by U. +*/ +/* NBPNTV: Nb of INTERNAL parameters of discretisation by V. */ +/* This is also the nb of root of Legendre polynom where discretization is done. */ +/* VROOTL: Table of discretization parameters on (-1,1) by V. +/* IORDRV: Order of constraint imposed at the extremities of iso-V */ +/* = 0, calculate the extremities of iso-V */ +/* = 1, calculate, additionally, the 1st derivative in the direction of iso-V */ +/* = 2, calculate, additionally, the 2nd derivative in the direction of iso-V */ +/* SOTBV1: Table of NBPNTV/2 sums of 2 index points */ +/* NBPNTV-II+1 and II, for II = 1, NBPNTV/2 on iso-V0. */ +/* SOTBV2: Table of NBPNTV/2 sums of 2 index points */ +/* NBPNTV-II+1 and II, for II = 1, NBPNTV/2 on iso-V1. */ +/* DITBV1: Table of NBPNTV/2 differences of 2 index points */ +/* NBPNTV-II+1 and II, for II = 1, NBPNTV/2 on iso-V0. */ +/* DITBV2: Table of NBPNTV/2 differences of 2 index points */ +/* NBPNTV-II+1 and II, for II = 1, NBPNTV/2 on iso-V1. */ +/* SOSOTB: Preinitialized table (input/output argument). */ +/* DISOTB: Preinitialized table (input/output argument). */ +/* SODITB: Preinitialized table (input/output argument). */ +/* DIDITB: Preinitialized table (input/output argument) */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* FPNTAB: Tableau auxiliaire. */ -/* VHERMT: Table des 2*(IORDRV+1) coeff. des 2*(IORDRV+1) polynomes */ -/* d'Hermite. */ -/* SOSOTB: Tableau ou l'on ajoute les termes de contraintes */ +/* FPNTAB: Auxiliary table. */ +/* VHERMT: Table of 2*(IORDRV+1) coeff. of 2*(IORDRV+1) polynoms of Hermite. */ +/* SOSOTB: Table where the terms of constraints are added */ /* C(ui,vj) + C(ui,-vj) + C(-ui,vj) + C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DISOTB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DISOTB: Table where the terms of constraints are added */ /* C(ui,vj) + C(ui,-vj) - C(-ui,vj) - C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table where the terms of constraints are added */ /* C(ui,vj) - C(ui,-vj) + C(-ui,vj) - C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table where the terms of constraints are added */ /* C(ui,vj) - C(ui,-vj) - C(-ui,vj) + C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 08-08-1991: RBD; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -2959,7 +2841,7 @@ int mma2cd2_(integer *ndimen, AdvApp2Var_SysBase::mgenmsg_("MMA2CD2", 7L); } -/* ------------------- Discretisation des polynomes d'Hermite ----------- +/* ------------------- Discretization of Hermit polynoms ----------- */ ncfhv = (*iordrv + 1) << 1; @@ -2974,7 +2856,7 @@ int mma2cd2_(integer *ndimen, /* L50: */ } -/* ---- On retranche les discretisations des polynomes de contrainte ---- +/* ---- The discretizations of polynoms of constraints are subtracted ---- */ nuroo = *nbpntu / 2; @@ -3030,10 +2912,9 @@ int mma2cd2_(integer *ndimen, /* L200: */ } -/* ------------ Cas ou l' on discretise sur les racines d' un ------- ----- */ -/* ---------- polynome de Legendre de degre impair, 0 est racine ---- ----- */ +/* ------------ Case when the discretization is done only on the roots */ +/* ---------- of Legendre polynom of uneven degree, 0 is root */ + if (*nbpntv % 2 == 1) { i__2 = *iordrv + 1; @@ -3149,78 +3030,72 @@ int mma2cd3_(integer *ndimen, /* ********************************************************************** */ - -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Discretisation sur les parametres des polynomes d'interpolation */ -/* des contraintes sur les 2 bords iso-U a l'ordre IORDRU. */ +/* Discretisation on the parameters of polynoms of interpolation */ +/* of constraints on 2 borders iso-U of order IORDRU. */ -/* MOTS CLES : */ + +/* KEYWORDS : */ /* ----------- */ /* TOUS, AB_SPECIFI::CONTRAINTE&, DISCRETISATION, &POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* NBPNTU: Nbre de parametres INTERNES de discretisation EN U. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* UROOTL: Tableau des parametres de discretisation SUR (-1,1) EN U. -*/ -/* NBPNTV: Nbre de parametres INTERNES de discretisation EN V. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* IORDRU: Ordre de derivation de l'iso-U */ -/* = 0, on calcule l'iso-U. */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* transverse a l'iso-U (donc en U). */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* transverse a l'iso-U (donc en U). */ -/* SOTBU1: Tableau des NBPNTU/2 sommes des 2 points d'indices */ -/* NBPNTU-II+1 et II, pour II = 1, NBPNTU/2 sur l'iso-U0. */ -/* SOTBU2: Tableau des NBPNTU/2 sommes des 2 points d'indices */ -/* NBPNTU-II+1 et II, pour II = 1, NBPNTU/2 sur l'iso-U1. */ -/* DITBU1: Tableau des NBPNTU/2 differences des 2 points d'indices */ -/* NBPNTU-II+1 et II, pour II = 1, NBPNTU/2 sur l'iso-U0. */ -/* DITBU2: Tableau des NBPNTU/2 differences des 2 points d'indices */ -/* NBPNTU-II+1 et II, pour II = 1, NBPNTU/2 sur l'iso-U1. */ -/* SOSOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* DISOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* SODITB: Tableau deja initialise (argument d'entree/sortie). */ -/* DIDITB: Tableau deja initialise (argument d'entree/sortie). */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Dimension of the space. */ +/* NBPNTU: Nb of INTERNAL parameters of discretisation by U. */ +/* This is also the nb of root of Legendre polynom where discretization is done. */ +/* UROOTL: Table of parameters of discretisation ON (-1,1) by U. +*/ +/* NBPNTV: Nb of INTERNAL parameters of discretisation by V. */ +/* This is also the nb of root of Legendre polynom where discretization is done. */ +/* IORDRV: Order of constraint imposed at the extremities of iso-V */ +/* = 0, calculate the extremities of iso-V */ +/* = 1, calculate, additionally, the 1st derivative in the direction of iso-V */ +/* = 2, calculate, additionally, the 2nd derivative in the direction of iso-V */ +/* SOTBU1: Table of NBPNTU/2 sums of 2 index points */ +/* NBPNTU-II+1 and II, for II = 1, NBPNTU/2 on iso-V0. */ +/* SOTBU2: Table of NBPNTV/2 sums of 2 index points */ +/* NBPNTU-II+1 and II, for II = 1, NBPNTU/2 on iso-V1. */ +/* DITBU1: Table of NBPNTU/2 differences of 2 index points */ +/* NBPNTU-II+1 and II, for II = 1, NBPNTU/2 on iso-V0. */ +/* DITBU2: Table of NBPNTU/2 differences of 2 index points */ +/* NBPNTU-II+1 and II, for II = 1, NBPNTU/2 on iso-V1. */ +/* SOSOTB: Preinitialized table (input/output argument). */ +/* DISOTB: Preinitialized table (input/output argument). */ +/* SODITB: Preinitialized table (input/output argument). */ +/* DIDITB: Preinitialized table (input/output argument) */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* FPNTAB: Tableau auxiliaire. */ -/* UHERMT: Table des 2*(IORDRU+1) coeff. des 2*(IORDRU+1) polynomes */ -/* d'Hermite. */ -/* SOSOTB: Tableau ou l'on ajoute les termes de contraintes */ +/* FPNTAB: Auxiliary table. */ +/* UHERMT: Table of 2*(IORDRU+1) coeff. of 2*(IORDRU+1) polynoms of Hermite. */ +/* SOSOTB: Table where the terms of constraints are added */ /* C(ui,vj) + C(ui,-vj) + C(-ui,vj) + C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DISOTB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DISOTB: Table where the terms of constraints are added */ /* C(ui,vj) + C(ui,-vj) - C(-ui,vj) - C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table where the terms of constraints are added */ /* C(ui,vj) - C(ui,-vj) + C(-ui,vj) - C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table where the terms of constraints are added */ /* C(ui,vj) - C(ui,-vj) - C(-ui,vj) + C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - /* $ HISTORIQUE DES MODIFICATIONS : */ /* -------------------------------- */ /* 08-08-1991: RBD; Creation. */ @@ -3228,7 +3103,7 @@ int mma2cd3_(integer *ndimen, /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -3278,7 +3153,7 @@ int mma2cd3_(integer *ndimen, AdvApp2Var_SysBase::mgenmsg_("MMA2CD3", 7L); } -/* ------------------- Discretisation des polynomes d'Hermite ----------- +/* ------------------- Discretization of polynoms of Hermit ----------- */ ncfhu = (*iordru + 1) << 1; @@ -3297,7 +3172,7 @@ int mma2cd3_(integer *ndimen, /* L50: */ } -/* ---- On retranche les discretisations des polynomes de contrainte ---- +/* ---- The discretizations of polynoms of constraints are subtracted ---- */ nvroo = *nbpntv / 2; @@ -3353,10 +3228,10 @@ int mma2cd3_(integer *ndimen, /* L200: */ } -/* ------------ Cas ou l' on discretise sur les racines d' un ------- ----- */ -/* ---------- polynome de Legendre de degre impair, 0 est racine ---- ----- */ +/* ------------ Case when the discretization is done only on the roots */ +/* ---------- of Legendre polynom of uneven degree, 0 is root */ + + if (*nbpntu % 2 == 1) { i__2 = *iordru + 1; @@ -3489,109 +3364,99 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Discretisation sur les parametres des polynomes d'interpolation */ -/* des contraintes a l'ordre IORDRE. */ +/* Discretisation on the parameters of polynomes of interpolation */ +/* of constraints of order IORDRE. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS, AB_SPECIFI::CONTRAINTE&, DISCRETISATION, &POINT */ -/* ARGUMENTS D'ENTREE : */ +//* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* NBPNTU: Nbre de parametres INTERNES de discretisation EN U. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* UROOTL: Tableau des parametres de discretisation SUR (-1,1) EN U. -*/ -/* NBPNTV: Nbre de parametres INTERNES de discretisation EN V. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* VROOTL: Tableau des parametres de discretisation SUR (-1,1) EN V. -*/ -/* IORDRU: Ordre de contrainte impose aux extremites de l'iso-V */ -/* = 0, on calcule les extremites de l'iso-V */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso-V */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso-V */ -/* IORDRV: Ordre de contrainte impose aux extremites de l'iso-U */ -/* = 0, on calcule les extremites de l'iso-U. */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso-U */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso-U */ -/* CONTR1: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U0,V0)et de ses derivees. */ -/* CONTR2: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U1,V0)et de ses derivees. */ -/* CONTR3: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U0,V1)et de ses derivees. */ -/* CONTR4: Contient, si IORDRU et IORDRV>=0, les valeurs aux */ -/* extremitees de F(U1,V1)et de ses derivees. */ -/* SOTBU1: Tableau des NBPNTU/2 sommes des 2 points d'indices */ -/* NBPNTU-II+1 et II, pour II = 1, NBPNTU/2 sur l'iso-U0. */ -/* SOTBU2: Tableau des NBPNTU/2 sommes des 2 points d'indices */ -/* NBPNTU-II+1 et II, pour II = 1, NBPNTU/2 sur l'iso-U1. */ -/* DITBU1: Tableau des NBPNTU/2 differences des 2 points d'indices */ -/* NBPNTU-II+1 et II, pour II = 1, NBPNTU/2 sur l'iso-U0. */ -/* DITBU2: Tableau des NBPNTU/2 differences des 2 points d'indices */ -/* NBPNTU-II+1 et II, pour II = 1, NBPNTU/2 sur l'iso-U1. */ -/* SOTBV1: Tableau des NBPNTV/2 sommes des 2 points d'indices */ -/* NBPNTV-II+1 et II, pour II = 1, NBPNTV/2 sur l'iso-V0. */ -/* SOTBV2: Tableau des NBPNTV/2 sommes des 2 points d'indices */ -/* NBPNTV-II+1 et II, pour II = 1, NBPNTV/2 sur l'iso-V1. */ -/* DITBV1: Tableau des NBPNTV/2 differences des 2 points d'indices */ -/* NBPNTV-II+1 et II, pour II = 1, NBPNTV/2 sur l'iso-V0. */ -/* DITBV2: Tableau des NBPNTV/2 differences des 2 points d'indices */ -/* NBPNTV-II+1 et II, pour II = 1, NBPNTV/2 sur l'iso-V1. */ -/* SOSOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* DISOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* SODITB: Tableau deja initialise (argument d'entree/sortie). */ -/* DIDITB: Tableau deja initialise (argument d'entree/sortie). */ +/* NDIMEN: Dimension of the space. */ +/* NBPNTU: Nb of INTERNAL parameters of discretisation by U. */ +/* This is also the nb of root of Legendre polynom where discretization is done. */ +/* UROOTL: Table of parameters of discretisation ON (-1,1) by U. +*/ +/* NBPNTV: Nb of INTERNAL parameters of discretisation by V. */ +/* This is also the nb of root of Legendre polynom where discretization is done. */ +/* VROOTL: Table of parameters of discretisation ON (-1,1) by V. + +/* IORDRV: Order of constraint imposed at the extremities of iso-U */ +/* = 0, calculate the extremities of iso-U */ +/* = 1, calculate, additionally, the 1st derivative in the direction of iso-U */ +/* = 2, calculate, additionally, the 2nd derivative in the direction of iso-U */ +/* IORDRU: Order of constraint imposed at the extremities of iso-V */ +/* = 0, calculate the extremities of iso-V */ +/* = 1, calculate, additionally, the 1st derivative in the direction of iso-V */ +/* = 2, calculate, additionally, the 2nd derivative in the direction of iso-V */ +/* CONTR1: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U0,V0) and its derivatives. */ +/* CONTR2: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U1,V0) and its derivatives. */ +/* CONTR3: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U0,V1) and its derivatives. */ +/* CONTR4: Contains, if IORDRU and IORDRV>=0, the values at the */ +/* extremities of F(U1,V1) and its derivatives. */ +/* SOTBU1: Table of NBPNTU/2 sums of 2 index points */ +/* NBPNTU-II+1 and II, for II = 1, NBPNTU/2 on iso-V0. */ +/* SOTBU2: Table of NBPNTV/2 sums of 2 index points */ +/* NBPNTU-II+1 and II, for II = 1, NBPNTU/2 on iso-V1. */ +/* DITBU1: Table of NBPNTU/2 differences of 2 index points */ +/* NBPNTU-II+1 and II, for II = 1, NBPNTU/2 on iso-V0. */ +/* DITBU2: Table of NBPNTU/2 differences of 2 index points */ +/* NBPNTU-II+1 and II, for II = 1, NBPNTU/2 on iso-V1. */ +/* SOTBV1: Table of NBPNTV/2 sums of 2 index points */ +/* NBPNTV-II+1 and II, for II = 1, NBPNTV/2 on iso-V0. */ +/* SOTBV2: Table of NBPNTV/2 sums of 2 index points */ +/* NBPNTV-II+1 and II, for II = 1, NBPNTV/2 on iso-V1. */ +/* DITBV1: Table of NBPNTV/2 differences of 2 index points */ +/* NBPNTV-II+1 and II, for II = 1, NBPNTV/2 on iso-V0. */ +/* DITBV2: Table of NBPNTV/2 differences of 2 index points */ +/* NBPNTV-II+1 and II, for II = 1, NBPNTV/2 on iso-V1. */ +/* SOSOTB: Preinitialized table (input/output argument). */ +/* DISOTB: Preinitialized table (input/output argument). */ +/* SODITB: Preinitialized table (input/output argument). */ +/* DIDITB: Preinitialized table (input/output argument) */ /* ARGUMENTS DE SORTIE : */ /* ------------------- */ -/* SOSOTB: Tableau ou l'on ajoute les termes de contraintes */ +/* SOSOTB: Table where the terms of constraints are added */ /* C(ui,vj) + C(ui,-vj) + C(-ui,vj) + C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DISOTB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DISOTB: Table where the terms of constraints are added */ /* C(ui,vj) + C(ui,-vj) - C(-ui,vj) - C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table where the terms of constraints are added */ /* C(ui,vj) - C(ui,-vj) + C(-ui,vj) - C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau ou l'on ajoute les termes de contraintes */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table where the terms of constraints are added */ /* C(ui,vj) - C(ui,-vj) - C(-ui,vj) + C(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ +/* with ui and vj positive roots of the polynom of Legendre */ +/* of degree NBPNTU and NBPNTV respectively. */ /* IERCOD: = 0, OK, */ -/* = 1, Valeur de IORDRV ou IORDRU hors des valeurs permises. */ -/* =13, Pb d'alloc dynamique. */ +/* = 1, Value or IORDRV or IORDRU is out of allowed values. */ +/* =13, Pb of dynamic allocation. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* REFERENCES CALLED : */ +/* -------------------- */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ +/* ------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 08-08-1991: RBD; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* The name of the routine */ /* Parameter adjustments */ @@ -3652,7 +3517,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, goto L9100; } -/* ------------------------- Mise a zero -------------------------------- +/* ------------------------- Set to zero -------------------------------- */ ilong = (*nbpntu / 2 + 1) * (*nbpntv / 2 + 1) * *ndimen; @@ -3683,7 +3548,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, if (*iordru >= 0 && *iordru <= 2) { -/* --- Recup des 2*(IORDRU+1) coeff des 2*(IORDRU+1) polyn. d'Hermite +/* --- Return 2*(IORDRU+1) coeff of 2*(IORDRU+1) polynoms of Hermite --- */ AdvApp2Var_ApproxF2var::mma1her_(iordru, &wrkar[ipt1], iercod); @@ -3691,7 +3556,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, goto L9100; } -/* ---- On retranche les discretisations des polynomes de contrainte +/* ---- Subract discretizations of polynoms of constraints ---- */ mma2cd3_(ndimen, nbpntu, &urootl[1], nbpntv, iordru, &sotbu1[1], & @@ -3702,7 +3567,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, if (*iordrv >= 0 && *iordrv <= 2) { -/* --- Recup des 2*(IORDRV+1) coeff des 2*(IORDRV+1) polyn. d'Hermite +/* --- Return 2*(IORDRV+1) coeff of 2*(IORDRV+1) polynoms of Hermite --- */ AdvApp2Var_ApproxF2var::mma1her_(iordrv, &wrkar[ipt2], iercod); @@ -3710,7 +3575,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, goto L9100; } -/* ---- On retranche les discretisations des polynomes de contrainte +/* ---- Subtract discretisations of polynoms of constraint ---- */ mma2cd2_(ndimen, nbpntu, nbpntv, &vrootl[1], iordrv, &sotbv1[1], & @@ -3719,7 +3584,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, disotb_offset], &diditb[diditb_offset]); } -/* --------------- On retranche les contraintes de coins ---------------- +/* --------------- Subtract constraints of corners ---------------- */ if (*iordru >= 0 && *iordrv >= 0) { @@ -3734,11 +3599,11 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, /* ------------------------------ The End ------------------------------- */ -/* --> IORDRE n'est pas dans la plage autorisee. */ +/* --> IORDRE is not within the autorised diapason. */ L9100: *iercod = 1; goto L9999; -/* --> PB d'alloc dyn. */ +/* --> PB of dynamic allocation. */ L9013: *iercod = 13; goto L9999; @@ -3811,122 +3676,113 @@ int AdvApp2Var_ApproxF2var::mma2ce1_(integer *numdec, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul des coefficients de l' approximation polynomiale de degre */ -/* (NDJACU,NDJACV) d'une fonction F(u,v) quelconque, a partir de sa */ -/* discretisation sur les racines du polynome de Legendre de degre */ -/* NBPNTU en U et NBPNTV en V. */ +/* Calculation of coefficients of polynomial approximation of degree */ +/* (NDJACU,NDJACV) of a function F(u,v), starting from its */ +/* discretization on roots of Legendre polynom of degree */ +/* NBPNTU by U and NBPNTV by V. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,AB_SPECIFI::FONCTION&,APPROXIMATION,&POLYNOME,&ERREUR */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NUMDEC: Indique si on PEUT decouper encore la fonction F(u,v). */ -/* = 5, On PEUT couper en U ou en V ou dans les 2 sens a la */ -/* fois. */ -/* = 4, On PEUT couper en U ou en V MAIS PAS dans les 2 sens */ -/* a la fois (decoupe en V favorisee). */ -/* = 3, On PEUT couper en U ou en V MAIS PAS dans les 2 sens */ -/* a la fois (decoupe en U favorisee). */ -/* = 2, on ne PEUT couper qu'en V (i.e. inserer un parametre */ -/* de decoupe Vj). */ -/* = 1, on ne PEUT couper qu'en U (i.e. inserer un parametre */ -/* de decoupe Ui). */ -/* = 0, on ne PEUT plus rien couper */ -/* NDIMEN: Dimension de l'espace. */ -/* NBSESP: Nbre de sous-espaces independant sur lesquels on calcule */ -/* les erreurs. */ -/* NDIMSE: Table des dimensions de chacun des sous-espaces. */ -/* NDMINU: Degre minimum en U a conserver pour l'approximation. */ -/* NDMINV: Degre minimum en V a conserver pour l'approximation. */ -/* NDGULI: Limite du nbre de coefficients en U de la solution. */ -/* NDGVLI: Limite du nbre de coefficients en V de la solution. */ -/* NDJACU: Degre maxi du polynome d' approximation en U. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre NDJACU-2*(IORDRU+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2. */ -/* On doit avoir 2*IORDRU+1 <= NDMINU <= NDGULI < NDJACU */ -/* NDJACV: Degre maxi du polynome d' approximation en V. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre NDJACV-2*(IORDRV+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2 */ -/* On doit avoir 2*IORDRV+1 <= NDMINV <= NDGVLI < NDJACV */ -/* IORDRU: Ordre de la base de Jacobi (-1,0,1 ou 2) en U. Correspond */ -/* a pas de contraintes, contraintes C0, C1 ou C2. */ -/* IORDRV: Ordre de la base de Jacobi (-1,0,1 ou 2) en V. Correspond */ -/* a pas de contraintes, contraintes C0, C1 ou C2. */ -/* NBPNTU: Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration suivant u */ -/* par la methode de Gauss. On doit avoir NBPNTU = 30, 40, */ -/* 50 ou 61 et NDJACU-2*(IORDRU+1) < NBPNTU. */ -/* NBPNTV: Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration suivant v */ -/* par la methode de Gauss. On doit avoir NBPNTV = 30, 40, */ -/* 50 ou 61 et NDJACV-2*(IORDRV+1) < NBPNTV. */ -/* EPSAPR: Table des NBSESP tolerances imposees sur chacun des */ -/* sous-espaces. */ -/* SOSOTB: Tableau de F(ui,vj) + F(ui,-vj) + F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. De plus, */ -/* le tableau SOSOTB(0,j) contient F(0,vj) + F(0,-vj), */ -/* le tableau SOSOTB(i,0) contient F(ui,0) + F(-ui,0) et */ -/* SOSOTB(0,0) contient F(0,0). */ -/* DISOTB: Tableau de F(ui,vj) + F(ui,-vj) - F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau de F(ui,vj) - F(ui,-vj) + F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau de F(ui,vj) - F(ui,-vj) - F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. De plus, */ -/* le tableau DIDITB(0,j) contient F(0,vj) - F(0,-vj), */ -/* et le tableau DIDITB(i,0) contient F(ui,0) - F(-ui,0). */ - -/* ARGUMENTS DE SORTIE : */ -/* ------------------- */ -/* PATJAC: Table des coefficients du polynome P(u,v) d' approximation */ -/* de F(u,v) avec eventuellement prise en compte des */ -/* contraintes. P(u,v) est de degre (NDJACU,NDJACV). */ -/* Ce tableau ne contient les coeff que si ITYDEC = 0. */ -/* ERRMAX: Pour 1<=i<=NBSESP, ERRMAX(i) contient les erreurs maxi */ -/* sur chacun des sous-espaces SI ITYDEC = 0. */ -/* ERRMOY: Contient les erreurs moyennes pour chacun des NBSESP */ -/* sous-espaces SI ITYDEC = 0. */ -/* NDEGPU: Degre en U pour le carreau PATJAC. Valable si ITYDEC=0. */ -/* NDEGPV: Degre en V pour le carreau PATJAC. Valable si ITYDEC=0. */ -/* ITYDEC: Indique si on DOIT decouper encore la fonction F(u,v). */ -/* = 0, on ne DOIT plus rien couper, PATJAC est OK. */ -/* = 1, on ne DOIT couper qu'en U (i.e. inserer un parametre */ -/* de decoupe Ui). */ -/* = 2, on ne DOIT couper qu'en V (i.e. inserer un parametre */ -/* de decoupe Vj). */ -/* = 3, On DOIT couper en U ET en V a la fois. */ -/* IERCOD: Code d'erreur. */ -/* = 0, Eh bien tout va tres bien. */ -/* = -1, On a une solution, la meilleure possible, mais la */ -/* tolerance utilisateur n'est pas satisfaite (3*helas) */ -/* = 1, Entrees incoherentes. */ - -/* COMMONS UTILISES : */ +/* NUMDEC: Indicates if it is POSSIBLE to cut function F(u,v). */ +/* = 5, It is POSSIBLE to cut by U or by V or in both directions simultaneously. */ +/* = 4, It is POSSIBLE to cut by U or by V BUT NOT in both */ +/* directions simultaneously (cutting by V is preferable). */ +/* = 3, It is POSSIBLE to cut by U or by V BUT NOT in both */ +/* directions simultaneously (cutting by U is preferable). */ +/* = 2, It is POSSIBLE to cut only by V (i.e. insert parameter */ +/* of cutting Vj). */ +/* = 1, It is POSSIBLE to cut only by U (i.e. insert parameter */ +/* of cutting Ui). */ +/* = 0, It is not POSSIBLE to cut anything */ +/* NDIMEN: Dimension of the space. */ +/* NBSESP: Nb of independent sub-spaces on which the errors are calculated. */ +/* NDIMSE: Table of dimensions of each of sub-spaces. */ +/* NDMINU: Minimum degree by U to be preserved for the approximation. */ +/* NDMINV: Minimum degree by V to be preserved for the approximation. */ +/* NDGULI: Limit of nb of coefficients by U of the solution. */ +/* NDGVLI: Limit of nb of coefficients by V of the solution. */ +/* NDJACU: Max degree of the polynom of approximation by U. */ +/* The representation in the orthogonal base starts from degree */ +/* 0 to degree NDJACU-2*(IORDRU+1). The polynomial base is the base of */ +/* Jacobi of order -1 (Legendre), 0, 1 or 2. */ +/* It is required that 2*IORDRU+1 <= NDMINU <= NDGULI < NDJACU */ +/* NDJACV: Max degree of the polynom of approximation by V. */ +/* The representation in the orthogonal base starts from degree */ +/* 0 to degree NDJACV-2*(IORDRV+1). The polynomial base is */ +/* the base of Jacobi of order -1 (Legendre), 0, 1 or 2 */ +/* It is required that 2*IORDRV+1 <= NDMINV <= NDGVLI < NDJACV */ +/* IORDRU: Order of the Jacobi base (-1,0,1 or 2) by U. Corresponds */ +/* to the step of constraints C0, C1 or C2. */ +/* IORDRV: Order of the Jacobi base (-1,0,1 or 2) by U. Corresponds */ +/* to the step of constraints C0, C1 or C2. */ +/* NBPNTU: Degree of Legendre polynom on the roots which of are */ +/* calculated the coefficients of integration by u */ +/* by Gauss method. It is required that NBPNTU = 30, 40, */ +/* 50 or 61 and NDJACU-2*(IORDRU+1) < NBPNTU. */ +/* NBPNTV: Degree of Legendre polynom on the roots which of are */ +/* calculated the coefficients of integration by u */ +/* by Gauss method. It is required that NBPNTV = 30, 40, */ +/* 50 or 61 and NDJACV-2*(IORDRV+1) < NBPNTV. */ +/* EPSAPR: Table of NBSESP tolerances imposed on each sub-spaces. */ +/* SOSOTB: Table of F(ui,vj) + F(ui,-vj) + F(-ui,vj) + F(-ui,-vj) */ +/* with ui and vj - positive roots of the Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. Additionally, */ +/* table SOSOTB(0,j) contains F(0,vj) + F(0,-vj), */ +/* table SOSOTB(i,0) contains F(ui,0) + F(-ui,0) and */ +/* SOSOTB(0,0) contains F(0,0). */ +/* DISOTB: Table of F(ui,vj) + F(ui,-vj) - F(-ui,vj) - F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table of F(ui,vj) - F(ui,-vj) + F(-ui,vj) - F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table of F(ui,vj) - F(ui,-vj) - F(-ui,vj) + F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. Additionally, */ +/* table DIDITB(0,j) contains F(0,vj) - F(0,-vj), */ +/* and table DIDITB(i,0) contains F(ui,0) - F(-ui,0). */ + +/* OUTPUT ARGUMENTS */ +/* --------------- */ +/* PATJAC: Table of coefficients of polynom P(u,v) of approximation */ +/* of F(u,v) with eventually taking into account of */ +/* constraints. P(u,v) is of degree (NDJACU,NDJACV). */ +/* This table contains other coeff if ITYDEC = 0. */ +/* ERRMAX: For 1<=i<=NBSESP, ERRMAX(i) contains max errors */ +/* on each of sub-spaces SI ITYDEC = 0. */ +/* ERRMOY: Contains average errors for each of NBSESP sub-spaces SI ITYDEC = 0. */ +/* NDEGPU: Degree by U for square PATJAC. Valable if ITYDEC=0. */ +/* NDEGPV: Degree by V for square PATJAC. Valable if ITYDEC=0. */ +/* ITYDEC: Shows if it is NECESSARY to cut again function F(u,v). */ +/* = 0, it is not NECESSARY to cut anything, PATJAC is OK. */ +/* = 1, it is NECESSARY to cut only by U (i.e. insert parameter of cutting Ui). */ +/* = 2, it is NECESSARY to cut only by V (i.e. insert parameter of cutting Vj). */ +/* = 3, it is NECESSARY to cut both by U AND by V. */ +/* IERCOD: Error code. */ +/* = 0, Everything is OK. */ +/* = -1, There is the best possible solution, but the */ +/* user tolerance is not satisfactory (3*only) */ +/* = 1, Incoherent entries. */ + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ +/* ------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 22-01-1992: RBD; Creation d'apres MA2CF1. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* --------------------------- Initialisations -------------------------- @@ -3986,7 +3842,7 @@ int AdvApp2Var_ApproxF2var::mma2ce1_(integer *numdec, ipt6 = ipt5 + isz5; ipt7 = ipt6 + isz6; -/* ----------------- Recup des coeff. d'integr. de Gauss ---------------- +/* ----------------- Return Gauss coefficients of integration ---------------- */ AdvApp2Var_ApproxF2var::mmapptt_(ndjacu, nbpntu, iordru, &wrkar[ipt1], iercod); @@ -3998,13 +3854,13 @@ int AdvApp2Var_ApproxF2var::mma2ce1_(integer *numdec, goto L9999; } -/* ------------------- Recup des max des polynomes de Jacobi ------------ +/* ------------------- Return max polynoms of Jacobi ------------ */ AdvApp2Var_ApproxF2var::mma2jmx_(ndjacu, iordru, &wrkar[ipt5]); AdvApp2Var_ApproxF2var::mma2jmx_(ndjacv, iordrv, &wrkar[ipt6]); -/* ------ Calcul des coefficients et de leur contribution a l'erreur ---- +/* ------ Calculate the coefficients and their contribution to the error ---- */ mma2ce2_(numdec, ndimen, nbsesp, &ndimse[1], ndminu, ndminv, ndguli, @@ -4097,144 +3953,126 @@ int mma2ce2_(integer *numdec, /* ********************************************************************** */ - -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul des coefficients de l' approximation polynomiale de degre */ -/* (NDJACU,NDJACV) d'une fonction F(u,v) quelconque, a partir de sa */ -/* discretisation sur les racines du polynome de Legendre de degre */ -/* NBPNTU en U et NBPNTV en V. */ +/* Calculation of coefficients of polynomial approximation of degree */ +/* (NDJACU,NDJACV) of a function F(u,v), starting from its */ +/* discretization on roots of Legendre polynom of degree */ +/* NBPNTU by U and NBPNTV by V. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,AB_SPECIFI::FONCTION&,APPROXIMATION,&COEFFICIENT,&POLYNOME */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NUMDEC: Indique si on PEUT decouper encore la fonction F(u,v). */ -/* = 5, On PEUT couper en U ou en V ou dans les 2 sens a la */ -/* fois. */ -/* = 4, On PEUT couper en U ou en V MAIS PAS dans les 2 sens */ -/* a la fois (decoupe en V favorisee). */ -/* = 3, On PEUT couper en U ou en V MAIS PAS dans les 2 sens */ -/* a la fois (decoupe en U favorisee). */ -/* = 2, on ne PEUT couper qu'en V (i.e. inserer un parametre */ -/* de decoupe Vj). */ -/* = 1, on ne PEUT couper qu'en U (i.e. inserer un parametre */ -/* de decoupe Ui). */ -/* = 0, on ne PEUT plus rien couper */ -/* NDIMEN: Dimension totale de l'espace */ -/* NBSESP: Nbre de sous-espaces independant sur lesquels on calcule */ -/* les erreurs. */ -/* NDIMSE: Table des dimensions de chacun des sous-espaces. */ -/* NDMINU: Degre minimum en U a conserver pour l'approximation. */ -/* NDMINV: Degre minimum en V a conserver pour l'approximation. */ -/* NDGULI: Limite du degre en U de la solution. */ -/* NDGVLI: Limite du degre en V de la solution. */ -/* NDJACU: Degre maxi du polynome d' approximation en U. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre NDJACU-2*(IORDRU+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2. */ -/* On doit avoir 2*IORDRU+1 <= NDMINU <= NDGULI < NDJACU */ -/* NDJACV: Degre maxi du polynome d' approximation en V. La */ -/* representation dans la base orthogonale part du degre */ -/* 0 au degre NDJACV-2*(IORDRV+1). La base polynomiale est */ -/* la base de Jacobi d' ordre -1 (Legendre), 0, 1 ou 2 */ -/* On doit avoir 2*IORDRV+1 <= NDMINV <= NDGVLI < NDJACV */ -/* IORDRU: Ordre de la base de Jacobi (-1,0,1 ou 2) en U. Correspond */ -/* a pas de contraintes, contraintes C0, C1 ou C2. */ -/* IORDRV: Ordre de la base de Jacobi (-1,0,1 ou 2) en V. Correspond */ -/* a pas de contraintes, contraintes C0, C1 ou C2. */ -/* NBPNTU: Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration suivant u */ -/* par la methode de Gauss. On doit avoir NBPNTU = 30, 40, */ -/* 50 ou 61 et NDJACU-2*(IORDRU+1) < NBPNTU. */ -/* NBPNTV: Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration suivant v */ -/* par la methode de Gauss. On doit avoir NBPNTV = 30, 40, */ -/* 50 ou 61 et NDJACV-2*(IORDRV+1) < NBPNTV. */ -/* EPSAPR: Table des NBSESP tolerances imposees sur chacun des */ -/* sous-espaces. */ -/* SOSOTB: Tableau de F(ui,vj) + F(ui,-vj) + F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. De plus, */ -/* le tableau SOSOTB(0,j) contient F(0,vj) + F(0,-vj), */ -/* le tableau SOSOTB(i,0) contient F(ui,0) + F(-ui,0) et */ -/* SOSOTB(0,0) contient F(0,0). */ -/* DISOTB: Tableau de F(ui,vj) + F(ui,-vj) - F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau de F(ui,vj) - F(ui,-vj) + F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau de F(ui,vj) - F(ui,-vj) - F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. De plus, */ -/* le tableau DIDITB(0,j) contient F(0,vj) - F(0,-vj), */ -/* et le tableau DIDITB(i,0) contient F(ui,0) - F(-ui,0). */ -/* GSSUTB: Table des coefficients d' integration par la methode de */ -/* Gauss suivant U: i varie de 0 a NBPNTU/2 et k varie de 0 a */ +/* NUMDEC: Indicates if it is POSSIBLE to cut function F(u,v). */ +/* = 5, It is POSSIBLE to cut by U or by V or in both directions simultaneously. */ +/* = 4, It is POSSIBLE to cut by U or by V BUT NOT in both */ +/* directions simultaneously (cutting by V is preferable). */ +/* = 3, It is POSSIBLE to cut by U or by V BUT NOT in both */ +/* directions simultaneously (cutting by U is preferable). */ +/* = 2, It is POSSIBLE to cut only by V (i.e. insert parameter */ +/* of cutting Vj). */ +/* = 1, It is POSSIBLE to cut only by U (i.e. insert parameter */ +/* of cutting Ui). */ +/* = 0, It is not POSSIBLE to cut anything */ +/* NDIMEN: Total dimension of the space. */ +/* NBSESP: Nb of independent sub-spaces on which the errors are calculated. */ +/* NDIMSE: Table of dimensions of each of sub-spaces. */ +/* NDMINU: Minimum degree by U to be preserved for the approximation. */ +/* NDMINV: Minimum degree by V to be preserved for the approximation. */ +/* NDGULI: Limit of nb of coefficients by U of the solution. */ +/* NDGVLI: Limit of nb of coefficients by V of the solution. */ +/* NDJACU: Max degree of the polynom of approximation by U. */ +/* The representation in the orthogonal base starts from degree */ +/* 0 to degree NDJACU-2*(IORDRU+1). The polynomial base is the base of */ +/* Jacobi of order -1 (Legendre), 0, 1 or 2. */ +/* It is required that 2*IORDRU+1 <= NDMINU <= NDGULI < NDJACU */ +/* NDJACV: Max degree of the polynom of approximation by V. */ +/* The representation in the orthogonal base starts from degree */ +/* 0 to degree NDJACV-2*(IORDRV+1). The polynomial base is */ +/* the base of Jacobi of order -1 (Legendre), 0, 1 or 2 */ +/* It is required that 2*IORDRV+1 <= NDMINV <= NDGVLI < NDJACV */ +/* IORDRU: Order of the Jacobi base (-1,0,1 or 2) by U. Corresponds */ +/* to the step of constraints C0, C1 or C2. */ +/* IORDRV: Order of the Jacobi base (-1,0,1 or 2) by U. Corresponds */ +/* to the step of constraints C0, C1 or C2. */ +/* NBPNTU: Degree of Legendre polynom on the roots which of are */ +/* calculated the coefficients of integration by u */ +/* by Gauss method. It is required that NBPNTU = 30, 40, */ +/* 50 or 61 and NDJACU-2*(IORDRU+1) < NBPNTU. */ +/* NBPNTV: Degree of Legendre polynom on the roots which of are */ +/* calculated the coefficients of integration by u */ +/* by Gauss method. It is required that NBPNTV = 30, 40, */ +/* 50 or 61 and NDJACV-2*(IORDRV+1) < NBPNTV. */ +/* EPSAPR: Table of NBSESP tolerances imposed on each sub-spaces. */ +/* SOSOTB: Table of F(ui,vj) + F(ui,-vj) + F(-ui,vj) + F(-ui,-vj) */ +/* with ui and vj - positive roots of the Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. Additionally, */ +/* table SOSOTB(0,j) contains F(0,vj) + F(0,-vj), */ +/* table SOSOTB(i,0) contains F(ui,0) + F(-ui,0) and */ +/* SOSOTB(0,0) contains F(0,0). */ +/* DISOTB: Table of F(ui,vj) + F(ui,-vj) - F(-ui,vj) - F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table of F(ui,vj) - F(ui,-vj) + F(-ui,vj) - F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table of F(ui,vj) - F(ui,-vj) - F(-ui,vj) + F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. Additionally, */ +/* table DIDITB(0,j) contains F(0,vj) - F(0,-vj), */ +/* and table DIDITB(i,0) contains F(ui,0) - F(-ui,0). */ +/* GSSUTB: Table of coefficients of integration by Gauss method */ +/* by U: i varies from 0 to NBPNTU/2 and k varies from 0 to */ /* NDJACU-2*(IORDRU+1). */ -/* GSSVTB: Table des coefficients d' integration par la methode de */ -/* Gauss suivant V: i varie de 0 a NBPNTV/2 et k varie de 0 a */ +/* GSSVTB: Table of coefficients of integration by Gauss method */ +/* by V: i varies from 0 to NBPNTV/2 and k varies from 0 to */ /* NDJACV-2*(IORDRV+1). */ -/* XMAXJU: Valeur maximale des polynomes de Jacobi d'ordre IORDRU, */ -/* du degre 0 au degre NDJACU - 2*(IORDRU+1) */ -/* XMAXJV: Valeur maximale des polynomes de Jacobi d'ordre IORDRV, */ -/* du degre 0 au degre NDJACV - 2*(IORDRV+1) */ +/* XMAXJU: Maximum value of Jacobi polynoms of order IORDRU, */ +/* from degree 0 to degree NDJACU - 2*(IORDRU+1) */ +/* XMAXJV: Maximum value of Jacobi polynoms of order IORDRV, */ +/* from degree 0 to degree NDJACV - 2*(IORDRV+1) */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* VECERR: Tableau auxiliaire. */ -/* CHPAIR: Tableau auxiliaire de termes lies au degre NDJACU en U */ -/* pour calculer les coeff. de l'approximation de degre PAIR */ -/* en V. */ -/* CHIMPR: Tableau auxiliaire de termes lies au degre NDJACU en U */ -/* pour calculer les coeff. de l'approximation de degre IMPAIR -*/ -/* en V. */ -/* PATJAC: Table des coefficients du polynome P(u,v) d' approximation */ -/* de F(u,v) avec eventuellement prise en compte des */ -/* contraintes. P(u,v) est de degre (NDJACU,NDJACV). */ -/* Ce tableau ne contient les coeff que si ITYDEC = 0. */ -/* ERRMAX: Pour 1<=i<=NBSESP, ERRMAX(i) contient les erreurs maxi */ -/* sur chacun des sous-espaces SI ITYDEC = 0. */ -/* ERRMOY: Contient les erreurs moyennes pour chacun des NBSESP */ -/* sous-espaces SI ITYDEC = 0. */ -/* NDEGPU: Degre en U pour le carreau PATJAC. Valable si ITYDEC=0. */ -/* NDEGPV: Degre en V pour le carreau PATJAC. Valable si ITYDEC=0. */ -/* ITYDEC: Indique si on DOIT decouper encore la fonction F(u,v). */ -/* = 0, on ne DOIT plus rien couper, PATJAC est OK ou alors */ -/* NUMDEC etant egal a zero, on ne pouvait plus couper. */ -/* = 1, on ne DOIT couper qu'en U (i.e. inserer un parametre */ -/* de decoupe Ui). */ -/* = 2, on ne DOIT couper qu'en V (i.e. inserer un parametre */ -/* de decoupe Vj). */ -/* = 3, On DOIT couper en U ET en V a la fois. */ -/* IERCOD: Code d'erreur. */ -/* = 0, Eh bien tout va tres bien. */ -/* = -1, On a une solution, la meilleure possible, mais la */ -/* tolerance utilisateur n'est pas satisfaite (3*helas) */ -/* = 1, Entrees incoherentes. */ - -/* COMMONS UTILISES : */ +/* VECERR: Auxiliary table. */ +/* CHPAIR: Auxiliary table of terms connected to degree NDJACU by U */ +/* to calculate the coeff. of approximation of EVEN degree by V. */ +/* CHIMPR: Auxiliary table of terms connected to degree NDJACU by U */ +/* to calculate the coeff. of approximation of UNEVEN degree by V. */ +/* PATJAC: Table of coefficients of polynom P(u,v) of approximation */ +/* of F(u,v) with eventually taking into account of */ +/* constraints. P(u,v) is of degree (NDJACU,NDJACV). */ +/* This table contains other coeff if ITYDEC = 0. */ +/* ERRMAX: For 1<=i<=NBSESP, ERRMAX(i) contains max errors */ +/* on each of sub-spaces SI ITYDEC = 0. */ +/* ERRMOY: Contains average errors for each of NBSESP sub-spaces SI ITYDEC = 0. */ +/* NDEGPU: Degree by U for square PATJAC. Valable if ITYDEC=0. */ +/* NDEGPV: Degree by V for square PATJAC. Valable if ITYDEC=0. */ +/* ITYDEC: Shows if it is NECESSARY to cut again function F(u,v). */ +/* = 0, it is not NECESSARY to cut anything, PATJAC is OK. */ +/* = 1, it is NECESSARY to cut only by U (i.e. insert parameter of cutting Ui). */ +/* = 2, it is NECESSARY to cut only by V (i.e. insert parameter of cutting Vj). */ +/* = 3, it is NECESSARY to cut both by U AND by V. */ +/* IERCOD: Error code. */ +/* = 0, Everything is OK. */ +/* = -1, There is the best possible solution, but the */ +/* user tolerance is not satisfactory (3*only) */ +/* = 1, Incoherent entries. */ + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 07-02-1992: RBD; Gestion des cas MINU>MAXU et/ou MINV>MAXV */ -/* 05-02-1992: RBD: Prise en compte decalages de CHPAIR et CHIMPR */ -/* 22-01-1992: RBD; Creation d'apres MA2CF2. */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* --------------------------- Initialisations -------------------------- @@ -4284,9 +4122,9 @@ int mma2ce2_(integer *numdec, if (ldbg) { AdvApp2Var_SysBase::mgenmsg_("MMA2CE2", 7L); } -/* --> A priori tout va bien */ +/* --> A priori everything is OK */ *iercod = 0; -/* --> test des entrees */ +/* --> test of inputs */ if (*numdec < 0 || *numdec > 5) { goto L9001; } @@ -4308,16 +4146,16 @@ int mma2ce2_(integer *numdec, if (*ndgvli >= *ndjacv) { goto L9001; } -/* --> A priori, pas de decoupes a faire. */ +/* --> A priori, no cuts to be done */ *itydec = 0; -/* --> Degres mini a retourner: NDMINU,NDMINV */ +/* --> Min. degrees to return: NDMINU,NDMINV */ *ndegpu = *ndminu; *ndegpv = *ndminv; -/* --> Pour le moment, les erreurs max sont nulles */ +/* --> For the moment, max errors are null */ AdvApp2Var_SysBase::mvriraz_(nbsesp, (char *)&errmax[1]); nd = *ndimen << 2; AdvApp2Var_SysBase::mvriraz_(&nd, (char *)&vecerr[vecerr_offset]); -/* --> et le carreau aussi. */ +/* --> and the square, too. */ nd = (*ndjacu + 1) * (*ndjacv + 1) * *ndimen; AdvApp2Var_SysBase::mvriraz_(&nd, (char *)&patjac[patjac_offset]); @@ -4326,7 +4164,7 @@ int mma2ce2_(integer *numdec, /* ********************************************************************** */ -/* -------------------- ICI, ON PEUT ENCORE DECOUPER -------------------- +/* -------------------- HERE IT IS POSSIBLE TO CUT ---------------------- */ /* ********************************************************************** */ @@ -4335,7 +4173,7 @@ int mma2ce2_(integer *numdec, /* ****************************************************************** **** */ -/* ---------------------- Calcul des coeff de la zone 4 ------------- +/* ---------------------- Calculate coeff of zone 4 ------------- ---- */ minu = *ndguli + 1; @@ -4349,7 +4187,7 @@ int mma2ce2_(integer *numdec, goto L9001; } -/* ---------------- Calcul des termes lies au degre en U ------------ +/* ---------------- Calculate the terms connected to degree by U --------- ---- */ i__1 = *ndimen; @@ -4369,7 +4207,7 @@ int mma2ce2_(integer *numdec, /* L100: */ } -/* ------------------- Calcul des coefficients de PATJAC ------------ +/* ------------------- Calculate the coefficients of PATJAC ------------ ---- */ igsu = minu - i2rdu; @@ -4386,9 +4224,8 @@ int mma2ce2_(integer *numdec, /* L130: */ } -/* ----- Contribution des termes calcules a l'erreur d'approximati -on ---- */ -/* pour les termes (I,J) avec MINU <= I <= MAXU, J fixe. */ +/* ----- Contribution of calculated terms to the approximation error */ +/* for terms (I,J) with MINU <= I <= MAXU, J fixe. */ idim = 1; i__2 = *nbsesp; @@ -4409,7 +4246,7 @@ on ---- */ /* ****************************************************************** **** */ -/* ---------------------- Calcul des coeff de la zone 2 ------------- +/* ---------------------- Calculate the coeff of zone 2 ------------- ---- */ minu = (*iordru + 1) << 1; @@ -4417,13 +4254,13 @@ on ---- */ minv = *ndgvli + 1; maxv = *ndjacv; -/* --> Si la zone 2 est vide, on passe a la zone 3. */ -/* VECERR(ND,2) a deja ete mis a zero. */ +/* --> If zone 2 is empty, pass to zone 3. */ +/* VECERR(ND,2) was already set to zero. */ if (minu > maxu) { goto L300; } -/* ---------------- Calcul des termes lies au degre en U ------------ +/* ---------------- Calculate the terms connected to degree by U ------------ ---- */ i__1 = *ndimen; @@ -4443,7 +4280,7 @@ on ---- */ /* L200: */ } -/* ------------------- Calcul des coefficients de PATJAC ------------ +/* ------------------- Calculate the coefficients of PATJAC ------------ ---- */ igsu = minu - i2rdu; @@ -4462,9 +4299,8 @@ on ---- */ /* L220: */ } -/* ----- Contribution des termes calcules a l'erreur d'approximation ----- */ -/* pour les termes (I,J) avec MINU <= I <= MAXU, MINV <= J <= MAXV */ +/* -----Contribution of calculated terms to the approximation error */ +/* for terms (I,J) with MINU <= I <= MAXU, MINV <= J <= MAXV */ idim = 1; i__1 = *nbsesp; @@ -4480,7 +4316,7 @@ on ---- */ /* ****************************************************************** **** */ -/* ---------------------- Calcul des coeff de la zone 3 ------------- +/* ---------------------- Calculation of coeff of zone 3 ------------- ---- */ L300: @@ -4489,15 +4325,15 @@ L300: minv = (*iordrv + 1) << 1; maxv = *ndgvli; -/* --> Si la zone 3 est vide, on passe au test de decoupe. */ -/* VECERR(ND,3) a deja ete mis a zero */ +/* -> If zone 3 is empty, pass to the test of cutting. */ +/* VECERR(ND,3) was already set to zero */ if (minv > maxv) { goto L400; } -/* ----------- Les termes lies au degre en U sont deja calcules ----- +/* ----------- The terms connected to the degree by U are already calculated ----- ---- */ -/* ------------------- Calcul des coefficients de PATJAC ------------ +/* ------------------- Calculation of coefficients of PATJAC ------------ ---- */ igsu = minu - i2rdu; @@ -4516,9 +4352,8 @@ L300: /* L320: */ } -/* ----- Contribution des termes calcules a l'erreur d'approximation ----- */ -/* pour les termes (I,J) avec MINU <= I <= MAXU, MINV <= J <= MAXV. */ +/* ----- Contribution of calculated terms to the approximation error +/* for terms (I,J) with MINU <= I <= MAXU, MINV <= J <= MAXV. */ idim = 1; i__1 = *nbsesp; @@ -4534,7 +4369,7 @@ L300: /* ****************************************************************** **** */ -/* --------------------------- Tests de decoupe --------------------- +/* --------------------------- Tests of cutting --------------------- ---- */ L400: @@ -4563,7 +4398,7 @@ L400: /* ****************************************************************** **** */ -/* --- OK, le carreau est valable, on calcule les coeff de la zone 1 +/* --- OK, the square is valid, the coeff of zone 1 are calculated ---- */ minu = (*iordru + 1) << 1; @@ -4571,16 +4406,14 @@ L400: minv = (*iordrv + 1) << 1; maxv = *ndgvli; -/* --> Si la zone 1 est vide, on passe au calcul de l'erreur Maxi et -*/ -/* Moyenne. */ +/* --> If zone 1 is empty, pass to the calculation of Max and Average error. */ if (minu > maxu || minv > maxv) { goto L600; } -/* ----------- Les termes lies au degre en U sont deja calcules ----- +/* ----------- The terms connected to degree by U are already calculated ----- ---- */ -/* ------------------- Calcul des coefficients de PATJAC ------------ +/* ------------------- Calculate the coefficients of PATJAC ------------ ---- */ igsu = minu - i2rdu; @@ -4599,7 +4432,7 @@ L400: /* L520: */ } -/* --------------- Maintenant, on baisse le degre au maximum -------- +/* --------------- Now the degree is maximally lowered -------- ---- */ L600: @@ -4627,12 +4460,12 @@ L600: nu1 = nu + 1; nv1 = nv + 1; -/* --> Calcul de l'erreur moyenne. */ +/* --> Calculate the average error. */ mma2moy_(ndjacu, ndjacv, &ndses, &nu1, ndjacu, &nv1, ndjacv, iordru, iordrv, &patjac[idim * patjac_dim2 * patjac_dim1], &errmoy[nd]); -/* --> Mise a 0.D0 des coeff ecartes. */ +/* --> Set to 0.D0 the rejected coeffs. */ i__2 = idim + ndses - 1; for (ii = idim; ii <= i__2; ++ii) { i__3 = *ndjacv; @@ -4648,7 +4481,7 @@ L600: /* L620: */ } -/* --> Recup des nbre de coeff de l'approximation. */ +/* --> Return the nb of coeffs of approximation. */ *ndegpu = max(*ndegpu,nu); *ndegpv = max(*ndegpv,nv); idim += ndses; @@ -4657,7 +4490,7 @@ L600: /* ****************************************************************** **** */ -/* -------------------- LA, ON NE PEUT PLUS DECOUPER ---------------- +/* -------------------- IT IS NOT POSSIBLE TO CUT ------------------- ---- */ /* ****************************************************************** **** */ @@ -4668,7 +4501,7 @@ L600: minv = (*iordrv + 1) << 1; maxv = *ndjacv; -/* ---------------- Calcul des termes lies au degre en U ------------ +/* ---------------- Calculate the terms connected to the degree by U ------------ ---- */ i__1 = *ndimen; @@ -4686,7 +4519,7 @@ L600: /* L710: */ } -/* ---------------------- Calcul de tous les coefficients ------- +/* ---------------------- Calculate all coefficients ------- -------- */ igsu = minu - i2rdu; @@ -4703,9 +4536,8 @@ L600: /* L700: */ } -/* ----- Contribution des termes calcules a l'erreur d'approximation ----- */ -/* pour les termes (I,J) avec MINU <= I <= MAXU, MINV <= J <= MAXV */ +/* ----- Contribution of calculated terms to the approximation error +/* for terms (I,J) with MINU <= I <= MAXU, MINV <= J <= MAXV */ idim = 1; i__1 = *nbsesp; @@ -4730,7 +4562,7 @@ L600: &errmax[nd]); } -/* ---------------------------- Si ERRMAX > EPSAPR, stop -------- +/* ---------------------------- IF ERRMAX > EPSAPR, stop -------- -------- */ if (errmax[nd] > epsapr[nd]) { @@ -4738,7 +4570,7 @@ L600: nu = *ndguli; nv = *ndgvli; -/* ------------- Sinon, on essaie d'enlever encore des coeff +/* ------------- Otherwise, try to remove again the coeff ------------ */ } else { @@ -4761,7 +4593,7 @@ L600: } } -/* --------------------- Calcul de l'erreur moyenne ------------- +/* --------------------- Calculate the average error ------------- -------- */ nu1 = nu + 1; @@ -4770,7 +4602,7 @@ L600: iordru, iordrv, &patjac[idim * patjac_dim2 * patjac_dim1], &errmoy[nd]); -/* --------------------- Mise a 0.D0 des coeff ecartes ---------- +/* --------------------- Set to 0.D0 the rejected coeffs ---------- -------- */ i__2 = idim + ndses - 1; @@ -4788,7 +4620,7 @@ L600: /* L740: */ } -/* --------------- Recup des nbre de coeff de l'approximation --- +/* --------------- Return the nb of coeff of approximation --- -------- */ *ndegpu = max(*ndegpu,nu); @@ -4802,15 +4634,15 @@ L600: /* ------------------------------ The end ------------------------------- */ -/* --> Erreur dans les entrees */ +/* --> Error in inputs */ L9001: *iercod = 1; goto L9999; -/* --------- Gestion des decoupes, ici doit avoir 0 < NUMDEC <= 5 ------- +/* --------- Management of cuts, it is required 0 < NUMDEC <= 5 ------- */ -/* --> Ici on peut et on doit couper, on choisit en U si c'est possible */ +/* --> Here it is possible and necessary to cut, choose by U if it is possible */ L9100: if (*numdec <= 0 || *numdec > 5) { goto L9001; @@ -4821,7 +4653,7 @@ L9100: *itydec = 2; } goto L9999; -/* --> Ici on peut et on doit couper, on choisit en V si c'est possible */ +/* --> Here it is possible and necessary to cut, choose by U if it is possible */ L9200: if (*numdec <= 0 || *numdec > 5) { goto L9001; @@ -4832,7 +4664,7 @@ L9200: *itydec = 1; } goto L9999; -/* --> Ici on peut et on doit couper, on choisit en 4 si c'est possible */ +/* --> Here it is possible and necessary to cut, choose by 4 if it is possible */ L9300: if (*numdec <= 0 || *numdec > 5) { goto L9001; @@ -4885,73 +4717,69 @@ int mma2cfu_(integer *ndujac, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul des termes lies au degre NDUJAC en U de l' approximation */ -/* polynomiale d' une fonction F(u,v) quelconque, a partir de sa */ -/* discretisation sur les racines du polynome de Legendre de degre */ -/* NBPNTU en U et NBPNTV en V. */ +/* Calculate the terms connected to degree NDUJAC by U of the polynomial approximation */ +/* of function F(u,v), starting from its discretisation +/* on the roots of Legendre polynom of degree */ +/* NBPNTU by U and NBPNTV by V. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* FONCTION,APPROXIMATION,COEFFICIENT,POLYNOME */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTSE : */ /* ------------------ */ -/* NDUJAC: Degre en U fixe pour lequel on calcule les termes */ -/* permettant d'obtenir les coeff. dans Legendre ou Jacobi */ -/* de degre pair ou impair en V. */ -/* NBPNTU: Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration suivant U */ -/* par la methode de Gauss. On doit avoir NBPNTU = 30, 40, */ -/* 50 ou 61. */ -/* NBPNTV: Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration suivant v */ -/* par la methode de Gauss. On doit avoir NBPNTV = 30, 40, */ -/* 50 ou 61. */ -/* SOSOTB: Tableau de F(ui,vj) + F(ui,-vj) + F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. De plus, */ -/* le tableau SOSOTB(0,j) contient F(0,vj) + F(0,-vj), */ -/* le tableau SOSOTB(i,0) contient F(ui,0) + F(-ui,0) et */ -/* SOSOTB(0,0) contient F(0,0). */ -/* DISOTB: Tableau de F(ui,vj) + F(ui,-vj) - F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau de F(ui,vj) - F(ui,-vj) + F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau de F(ui,vj) - F(ui,-vj) - F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. De plus, */ -/* le tableau DIDITB(0,j) contient F(0,vj) - F(0,-vj), */ -/* et le tableau DIDITB(i,0) contient F(ui,0) - F(-ui,0). */ -/* GSSUTB: Table des coefficients d' integration par la methode de */ -/* Gauss suivant U pour NDUJAC fixe: i varie de 0 a NBPNTU/2. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDUJAC: Fixed degree by U for which the terms */ +/* allowing to obtain the Legendre or Jacobi coeff*/ +/* of even or uneven degree by V are calculated. */ +/* NBPNTU: Degree of Legendre polynom on the roots which of */ +/* the coefficients of integration by U are calculated */ +/* by Gauss method. It is required that NBPNTU = 30, 40, 50 or 61. */ +/* NBPNTV: Degree of Legendre polynom on the roots which of */ +/* the coefficients of integration by V are calculated */ +/* by Gauss method. It is required that NBPNTV = 30, 40, 50 or 61. */ +/* SOSOTB: Table of F(ui,vj) + F(ui,-vj) + F(-ui,vj) + F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. Moreover, */ +/* table SOSOTB(0,j) contains F(0,vj) + F(0,-vj), */ +/* table SOSOTB(i,0) contains F(ui,0) + F(-ui,0) and */ +/* SOSOTB(0,0) contains F(0,0). */ +/* DISOTB: Table of F(ui,vj) + F(ui,-vj) - F(-ui,vj) - F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table of F(ui,vj) - F(ui,-vj) + F(-ui,vj) - F(-ui,-vj) */ +/* with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table of F(ui,vj) - F(ui,-vj) - F(-ui,vj) + F(-ui,-vj) */ +/* avec ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. Moreover, */ +/* table DIDITB(0,j) contains F(0,vj) - F(0,-vj), */ +/* and table DIDITB(i,0) contains F(ui,0) - F(-ui,0). */ +/* GSSUTB: Table of coefficients of integration by Gauss method */ +/* Gauss by U for fixed NDUJAC : i varies from 0 to NBPNTU/2. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CHPAIR: Tableau de termes lies au degre NDUJAC en U pour calculer */ -/* les coeff. de l'approximation de degre PAIR en V. */ -/* CHIMPR: Tableau de termes lies au degre NDUJAC en U pour calculer */ -/* les coeff. de l'approximation de degre IMPAIR en V. */ +/* CHPAIR: Table of terms connected to degree NDUJAC by U to calculate the */ +/* coeff. of the approximation of EVEN degree by V. */ +/* CHIMPR: Table of terms connected to degree NDUJAC by U to calculate */ +/* the coeff. of approximation of UNEVEN degree by V. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 10-06-1991 : RBD ; Creation. */ + /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* --------------------------- Initialisations -------------------------- @@ -4979,9 +4807,9 @@ int mma2cfu_(integer *ndujac, /* ********************************************************************** */ -/* CALCUL DES COEFFICIENTS EN U */ +/* CALCULATE COEFFICIENTS BY U */ -/* ----------------- Calcul des coefficients de degre pair -------------- +/* ----------------- Calculate coefficients of even degree -------------- */ if (*ndujac % 2 == 0) { @@ -5001,7 +4829,7 @@ int mma2cfu_(integer *ndujac, /* L100: */ } -/* --------------- Calcul des coefficients de degre impair ---------- +/* --------------- Calculate coefficients of uneven degree ---------- ---- */ } else { @@ -5022,12 +4850,11 @@ int mma2cfu_(integer *ndujac, } } -/* ------- Ajout des termes lies a la racine supplementaire (0.D0) ------ +/* ------- Add terms connected to the supplementary root (0.D0) ------ +/* ----------- of Legendre polynom of uneven degree NBPNTU ----------- */ -/* ----------- du polynome de Legendre de degre impair NBPNTU ----------- -*/ -/* --> Seul les termes NDUJAC pair sont modifies car GSSUTB(0) = 0 */ -/* lorsque NDUJAC est impair. */ +/* --> Only even NDUJAC terms are modified as GSSUTB(0) = 0 */ +/* when NDUJAC is uneven. */ if (*nbpntu % 2 != 0 && *ndujac % 2 == 0) { bid0 = gssutb[0]; @@ -5039,15 +4866,15 @@ int mma2cfu_(integer *ndujac, } } -/* ------ Calcul des termes lies a la racine supplementaire (0.D0) ------ +/* ------ Calculate the terms connected to supplementary roots (0.D0) ------ */ -/* ----------- du polynome de Legendre de degre impair NBPNTV ----------- +/* ----------- of Legendre polynom of uneven degree NBPNTV ----------- */ if (*nbpntv % 2 != 0) { -/* --> Seul les termes CHPAIR sont calcules car GSSVTB(0,IH-IDEBV)=0 +/* --> Only CHPAIR terms are calculated as GSSVTB(0,IH-IDEBV)=0 */ -/* lorsque IH est impair (voir MMA2CFV). */ +/* when IH is uneven (see MMA2CFV). */ if (*ndujac % 2 == 0) { bid1 = 0.; @@ -5107,62 +4934,52 @@ int mma2cfv_(integer *ndvjac, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul des coefficients de l' approximation polynomiale de F(u,v) -*/ -/* de degre NDVJAC en V et de degre en U variant de MINDGU a MAXDGU. +/* Calculate the coefficients of polynomial approximation of F(u,v) +/* of degree NDVJAC by V and of degree by U varying from MINDGU to MAXDGU. */ -/* MOTS CLES : */ +/* Keywords : */ /* ----------- */ /* FONCTION,APPROXIMATION,COEFFICIENT,POLYNOME */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDVJAC: Degre du polynome d' approximation en V. */ -/* La representation dans la base orthogonale part du degre */ -/* 0. La base polynomiale est la base de Jacobi d' ordre -1 */ -/* (Legendre), 0, 1 ou 2 */ -/* MINDGU: Degre minimum en U des coeff. a calculer. */ -/* MAXDGU: Degre maximum en U des coeff. a calculer. */ -/* NBPNTV: Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration suivant V */ -/* par la methode de Gauss. On doit avoir NBPNTV = 30, 40, */ -/* 50 ou 61 et NDVJAC < NBPNTV. */ -/* GSSVTB: Table des coefficients d' integration par la methode de */ -/* Gauss suivant V pour NDVJAC fixe: j varie de 0 a NBPNTV/2. */ -/* CHPAIR: Tableau de termes lies aux degres MINDGU a MAXDGU en U pour -*/ -/* calculer les coeff. de l'approximation de degre PAIR NDVJAC -*/ -/* en V. */ -/* CHIMPR: Tableau de termes lies aux degres MINDGU a MAXDGU en U pour -*/ -/* calculer les coeff. de l'approximation de degre IMPAIR */ -/* NDVJAC en V. */ -/* ARGUMENTS DE SORTIE : */ +/* NDVJAC: Degree of the polynom of approximation by V. */ +/* The representation in the orthogonal base starts from degre 0. + /* The polynomial base is the base of Jacobi of order -1 */ +/* (Legendre), 0, 1 or 2 */ +/* MINDGU: Degree minimum by U of coeff. to calculate. */ +/* MAXDGU: Degree maximum by U of coeff. to calculate. */ +/* NBPNTV: Degree of the Legendre polynom on the roots which of */ +/* the coefficients of integration by V are calculated */ +/* by Gauss method. It is reqired that NBPNTV = 30, 40, 50 or 61 and NDVJAC < NBPNTV. */ +/* GSSVTB: Table of coefficients of integration by Gauss method */ +/* by V for NDVJAC fixed: j varies from 0 to NBPNTV/2. */ +/* CHPAIR: Table of terms connected to degrees from MINDGU to MAXDGU by U to +/* calculate the coeff. of approximation of EVEN degree NDVJAC by V. */ +/* CHIMPR: Table of terms connected to degrees from MINDGU to MAXDGU by U to +/* calculate the coeff. of approximation of UNEVEN degree NDVJAC by V. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PATJAC: Table des coefficients en U du polynome d' approximation */ -/* P(u,v) de degre MINDGU a MAXDGU en U et NDVJAC en V. */ - -/* COMMONS UTILISES : */ -/* ---------------- */ +/* PATJAC: Table of coefficients by U of the polynom of approximation */ +/* P(u,v) of degree MINDGU to MAXDGU by U and NDVJAC by V. */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* COMMONS USED : */ +/* -------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 11-06-1991 : RBD ; Creation. */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ +/* ------------------------------- */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* --------------------------- Initialisations -------------------------- @@ -5185,7 +5002,7 @@ int mma2cfv_(integer *ndvjac, } nptv2 = *nbpntv / 2; -/* --------- Calcul des coefficients pour un degre NDVJAC pair ---------- +/* --------- Calculate the coefficients for even degree NDVJAC ---------- */ if (*ndvjac % 2 == 0) { @@ -5201,7 +5018,7 @@ int mma2cfv_(integer *ndvjac, /* L100: */ } -/* -------- Calcul des coefficients pour un degre NDVJAC impair ----- +/* -------- Calculate the coefficients for uneven degree NDVJAC ----- ---- */ } else { @@ -5218,10 +5035,8 @@ int mma2cfv_(integer *ndvjac, } } -/* ------- Ajout des termes lies a la racine supplementaire (0.D0) ------ -*/ -/* ----------- du polynome de Legendre de degre impair NBPNTV ----------- -*/ +/* ------- Add terms connected to the supplementary root (0.D0) ----- */ +/* --------of the Legendre polynom of uneven degree NBPNTV --------- */ if (*nbpntv % 2 != 0 && *ndvjac % 2 == 0) { bid1 = gssvtb[0]; @@ -5291,149 +5106,142 @@ int AdvApp2Var_ApproxF2var::mma2ds1_(integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Discretisation d'une fonction F(u,v) sur les racines des */ -/* polynomes de Legendre. */ +/* Discretisation of function F(u,v) on the roots of Legendre polynoms. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* FONCTION&,DISCRETISATION,&POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* UINTFN: Bornes de l' intervalle de definition en u de la fonction */ -/* a approcher: (UINTFN(1),UINTFN(2)). */ -/* VINTFN: Bornes de l' intervalle de definition en v de la fonction */ -/* a approcher: (VINTFN(1),VINTFN(2)). */ -/* FONCNP: Le NOM de la fonction non polynomiale a approcher. */ -/* NBPNTU: Le degre du polynome de Legendre sur les racines duquel */ -/* on discretise FONCNP en u. */ -/* NBPNTV: Le degre du polynome de Legendre sur les racines duquel */ -/* on discretise FONCNP en v. */ -/* UROOTB: Tableau des racines STRICTEMENTS POSITIVES du polynome */ -/* de Legendre de degre NBPNTU defini sur (-1,1). */ -/* VROOTB: Tableau des racines STRICTEMENTS POSITIVES du polynome */ -/* de Legendre de degre NBPNTV defini sur (-1,1). */ -/* ISOFAV: Indique le type d'iso de F(u,v) a extraire pour ameliorer */ -/* la rapidite de calcul (n'a aucune influence sur la forme */ -/* du resultat) */ -/* = 1, indique que l'on doit calculer les points de F(u,v) */ -/* avec u fixe (donc avec NBPNTV valeurs differentes de v). */ -/* = 2, indique que l'on doit calculer les points de F(u,v) */ -/* avec v fixe (donc avec NBPNTU valeurs differentes de u). */ -/* SOSOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* DISOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* SODITB: Tableau deja initialise (argument d'entree/sortie). */ -/* DIDITB: Tableau deja initialise (argument d'entree/sortie). */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Dimension of the space. */ +/* UINTFN: Limits of the interval of definition by u of the function */ +/* to be processed: (UINTFN(1),UINTFN(2)). */ +/* VINTFN: Limits of the interval of definition by v of the function */ +/* to be processed: (VINTFN(1),VINTFN(2)). */ +/* FONCNP: The NAME of the non-polynomial function to be processed. */ +/* NBPNTU: The degree of Legendre polynom on the roots which of */ +/* FONCNP is discretized by u. */ +/* NBPNTV: The degree of Legendre polynom on the roots which of */ +/* FONCNP is discretized by v. */ +/* UROOTB: Table of STRICTLY POSITIVE roots of the polynom */ +/* of Legendre of degree NBPNTU defined on (-1,1). */ +/* VROOTB: Table of STRICTLY POSITIVE roots of the polynom */ +/* of Legendre of degree NBPNTV defined on (-1,1). */ +/* ISOFAV: Shows the type of iso of F(u,v) to be extracted to improve */ +/* the rapidity of calculation (has no influence on the form */ +/* of result) */ +/* = 1, shows that it is necessary to calculate the points of F(u,v) */ +/* with fixed u (with NBPNTV values different from v). */ +/* = 2, shows that it is necessaty to calculate the points of F(u,v) */ +/* with fixed v (with NBPNTU values different from u). */ +/* SOSOTB: Preinitialized table (input/output argument). */ +/* DISOTB: Preinitialized table (input/output argument). */ +/* SODITB: Preinitialized table (input/output argument). */ +/* DIDITB: Preinitialized table (input/output argument). */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* SOSOTB: Tableau ou l'on ajoute les termes */ +/* SOSOTB: Table where the terms */ /* F(ui,vj) + F(ui,-vj) + F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DISOTB: Tableau ou l'on ajoute les termes */ +/* are added with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DISOTB: Table where the terms */ /* F(ui,vj) + F(ui,-vj) - F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau ou l'on ajoute les termes */ +/* are added with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table where the terms */ /* F(ui,vj) - F(ui,-vj) + F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau ou l'on ajoute les termes */ +/* are added with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table where the terms */ /* F(ui,vj) - F(ui,-vj) - F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* FPNTAB: Tableau auxiliaire. */ -/* TTABLE: Tableau auxiliaire. */ -/* IERCOD: Code d' erreur >100 Pb dans l' evaluation de FONCNP, */ -/* le code d'erreur renvoye est egal au code d' erreur */ -/* de FONCNP + 100. */ - -/* COMMONS UTILISES : */ +/* are added with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* FPNTAB: Auxiliary table. */ +/* TTABLE: Auxiliary table. */ +/* IERCOD: Error code >100 Pb in the evaluation of FONCNP, */ +/* the returned error code is equal to error code of FONCNP + 100. */ + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* -->La fonction externe creee par l' appelant de MA2F1K, MA2FDK */ -/* ou de MA2FXK doit etre de la forme : */ +/* --> The external function created by the caller of MA2F1K, MA2FDK */ +/* where MA2FXK should be in the following form : */ /* SUBROUTINE FONCNP(NDIMEN,UINTFN,VINTFN,ISOFAV,TCONST,NBPTAB */ /* ,TTABLE,IDERIU,IDERIV,PPNTAB,IERCOD) */ -/* ou les arguments d' entree sont : */ -/* - NDIMEN est un entier defini comme la somme des dimensions des */ -/* sous-espaces (i.e. dimension totale du probleme). */ -/* - UINTFN(2) est un tableau de 2 reels contenant l' intervalle */ -/* en u ou est definie la fonction a approximer */ -/* (donc ici egal a UIFONC). */ -/* - VINTFN(2) est un tableau de 2 reels contenant l' intervalle */ -/* en v ou est definie la fonction a approximer */ -/* (donc ici egal a VIFONC). */ -/* - ISOFAV, vaut 1 si l'on veut calculer des points a u constant, */ -/* vaut 2 si l'on calcule les points a v constant. Tout */ -/* autre valeur est une erreur. */ -/* - TCONST, un reel, valeur du parametre fixe. Prend ses valeurs */ -/* dans (UIFONC(1),UIFONC(2)) si ISOFAV = 1 ou dans */ -/* dans (VIFONC(1),VIFONC(2)) si ISOFAV = 2. */ -/* - NBPTAB, un entier. Indique le nombre de points a calculer. */ -/* - TTABLE, un tableau de NBPTAB reels. Ce sont les valeurs du */ -/* parametre 'libre' de discretisation (v si IISOFAV=1, */ -/* u si IISOFAV=2). */ -/* - IDERIU, un entier, prend ses valeurs entre 0 (positionnement) */ -/* et IORDRE(1) (derivee partielle de la fonction en u a */ -/* l' ordre IORDRE(1) si IORDRE(1) > 0). */ -/* - IDERIV, un entier, prend ses valeurs entre 0 (positionnement) */ -/* et IORDRE(2) (derivee partielle de la fonction en v a */ -/* l' ordre IORDRE(2) si IORDRE(2) > 0). */ -/* Si IDERIU=i et IDERIV=j, FONCNP devra calculer des */ -/* points de la derivee: */ +/* with the following input arguments : */ +/* - NDIMEN is integer defined as the sum of dimensions of */ +/* sub-spaces (i.e. total dimension of the problem). */ +/* - UINTFN(2) is a table of 2 reals containing the interval */ +/* by u where the function to be approximated is defined */ +/* (so it is equal to UIFONC). */ +/* - VINTFN(2) is a table of 2 reals containing the interval */ +/* by v where the function to be approximated is defined */ +/* (so it is equal to VIFONC). */ +/* - ISOFAV, is 1 if it is necessary to calculate points with constant u, */ +/* is 2 if it is necessary to calculate points with constant v. */ +/* Any other value is an error. */ +/* - TCONST, real, value of the fixed parameter. Takes values */ +/* in (UIFONC(1),UIFONC(2)) if ISOFAV = 1 or */ +/* ins (VIFONC(1),VIFONC(2)) if ISOFAV = 2. */ +/* - NBPTAB, integer. Shows the number of points to be calculated. */ +/* - TTABLE, a table of reals NBPTAB. These are the values of */ +/* 'free' parameter of discretization (v if IISOFAV=1, */ +/* u if IISOFAV=2). */ +/* - IDERIU, integer, takes values between 0 (position) */ +/* and IORDRE(1) (partial derivative of the function by u */ +/* of order IORDRE(1) if IORDRE(1) > 0). */ +/* - IDERIV, integer, takes values between 0 (position) */ +/* and IORDRE(2) (partial derivative of the function by v */ +/* of order IORDRE(2) if IORDRE(2) > 0). */ +/* If IDERIU=i and IDERIV=j, FONCNP should calculate the */ +/* points of the derivative : */ /* i+j */ /* d F(u,v) */ /* -------- */ /* i j */ /* du dv */ -/* et les arguments de sortie sont : */ -/* - FPNTAB(NDIMEN,NBPTAB) contient, en sortie, le tableau des */ -/* NBPTAB points calcules dans FONCNP. */ -/* - IERCOD est, en sortie, le code d' erreur de FONCNP. Ce code */ -/* (entier) doit etre strictement positif s' il y a eu */ -/* un probleme. */ +/* and the output arguments aret : */ +/* - FPNTAB(NDIMEN,NBPTAB) contains, at output, the table of */ +/* NBPTAB points calculated in FONCNP. */ +/* - IERCOD is, at output the error code of FONCNP. This code */ +/* (integer) should be strictly positive if there is a problem. */ -/* Les arguments d' entree NE DOIVENT PAS etre modifies sous FONCNP. +/* The input arguments SHOULD NOT be modified under FONCNP. */ -/* -->Comme FONCNP n' est pas forcement definie dans (-1,1)*(-1,1), on */ -/* modifie les valeurs de UROOTB et VROOTB en consequence. */ +/* -->As FONCNP is not forcedly defined in (-1,1)*(-1,1), the */ +/* values of UROOTB and VROOTB are consequently modified. */ -/* -->Les resultats de la discretisation sont ranges dans 4 tableaux */ -/* SOSOTB, DISOTB, SODITB et DIDITB pour gagner du temps par la suite */ -/* lors du calcul des coefficients du polynome d' approximation. */ +/* -->The results of discretisation are ranked in 4 tables */ +/* SOSOTB, DISOTB, SODITB and DIDITB to earn time */ +/* during the calculation of coefficients of the polynom of approximation. */ -/* Lorsque NBPNTU est impair: */ -/* le tableau SOSOTB(0,j) contient F(0,vj) + F(0,-vj), */ -/* le tableau DIDITB(0,j) contient F(0,vj) - F(0,-vj), */ -/* Lorsque NBPNTV est impair: */ -/* le tableau SOSOTB(i,0) contient F(ui,0) + F(-ui,0), */ -/* le tableau DIDITB(i,0) contient F(ui,0) - F(-ui,0), */ -/* Lorsque NBPNTU et NBPNTV sont impairs: */ -/* le terme SOSOTB(0,0) contient F(0,0). */ +/* When NBPNTU is uneven : */ +/* table SOSOTB(0,j) contains F(0,vj) + F(0,-vj), */ +/* table DIDITB(0,j) contains F(0,vj) - F(0,-vj), */ +/* When NBPNTV is uneven : */ +/* table SOSOTB(i,0) contains F(ui,0) + F(-ui,0), */ +/* table DIDITB(i,0) contains F(ui,0) - F(-ui,0), */ +/* When NBPNTU and NBPNTV are uneven : */ +/* term SOSOTB(0,0) contains F(0,0). */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 06-06-1991: RBD; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ -/* --------------------------- Initialisations -------------------------- +/* --------------------------- Initialization -------------------------- */ /* Parameter adjustments */ @@ -5476,10 +5284,8 @@ int AdvApp2Var_ApproxF2var::mma2ds1_(integer *ndimen, /* ********************************************************************** */ -/* --------- Discretisation en U sur les racines du polynome de --------- -*/ -/* --------------- Legendre de degre NBPNTU, iso-V par iso-V ------------ -*/ +/* --------- Discretization by U on the roots of the polynom of ------ */ +/* --------------- Legendre of degree NBPNTU, iso-V by iso-V --------- */ /* ********************************************************************** */ @@ -5491,15 +5297,13 @@ int AdvApp2Var_ApproxF2var::mma2ds1_(integer *ndimen, /* ****************************************************************** **** */ -/* --------- Discretisation en V sur les racines du polynome de ----- ----- */ -/* --------------- Legendre de degre NBPNTV, iso-U par iso-U -------- ----- */ +/* --------- Discretization by V on the roots of the polynom of ------ */ +/* --------------- Legendre of degree NBPNTV, iso-V by iso-V --------- */ /* ****************************************************************** **** */ } else { -/* --> Inversion des indices des tableaux */ +/* --> Inversion of indices of tables */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { isz1 = *nbpntu / 2 + 1; @@ -5537,7 +5341,7 @@ int AdvApp2Var_ApproxF2var::mma2ds1_(integer *ndimen, vrootb[1], &urootb[1], &iuouv, &sosotb[sosotb_offset], & soditb[soditb_offset], &disotb[disotb_offset], &diditb[ diditb_offset], &fpntab[fpntab_offset], &ttable[1], iercod); -/* --> Inversion des indices des tableaux */ +/* --> Inversion of indices of tables */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { isz1 = *nbpntv / 2 + 1; @@ -5639,164 +5443,151 @@ int mma2ds2_(integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Discretisation d'une fonction F(u,v) sur les racines des polynomes -*/ -/* de Legendre. */ +/* Discretization of function F(u,v) on the roots of polynoms of Legendre. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* FONCTION&,DISCRETISATION,&POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* UINTFN: Bornes de l' intervalle de definition en u de la fonction */ -/* a approcher: (UINTFN(1),UINTFN(2)). */ -/* VINTFN: Bornes de l' intervalle de definition en v de la fonction */ -/* a approcher: (VINTFN(1),VINTFN(2)). */ -/* FONCNP: Le NOM de la fonction non polynomiale a approcher. */ -/* NBPNTU: Le degre du polynome de Legendre sur les racines duquel */ -/* on discretise FONCNP en u. */ -/* NBPNTV: Le degre du polynome de Legendre sur les racines duquel */ -/* on discretise FONCNP en v. */ -/* UROOTB: Tableau des racines STRICTEMENTS POSITIVES du polynome */ -/* de Legendre de degre NBPNTU defini sur (-1,1). */ -/* VROOTB: Tableau des racines STRICTEMENTS POSITIVES du polynome */ -/* de Legendre de degre NBPNTV defini sur (-1,1). */ -/* IIUOUV: Indique le type d'iso de F(u,v) a extraire pour ameliorer */ -/* la rapidite de calcul (n'a aucune influence sur la forme */ -/* du resultat) */ -/* = 1, indique que l'on doit calculer les points de F(u,v) */ -/* avec u fixe (donc avec NBPNTV valeurs differentes de v). */ -/* = 2, indique que l'on doit calculer les points de F(u,v) */ -/* avec v fixe (donc avec NBPNTU valeurs differentes de u). */ -/* SOSOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* DISOTB: Tableau deja initialise (argument d'entree/sortie). */ -/* SODITB: Tableau deja initialise (argument d'entree/sortie). */ -/* DIDITB: Tableau deja initialise (argument d'entree/sortie). */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Dimension of the space. */ +/* UINTFN: Limits of the interval of definition by u of the function */ +/* to be processed: (UINTFN(1),UINTFN(2)). */ +/* VINTFN: Limits of the interval of definition by v of the function */ +/* to be processed: (VINTFN(1),VINTFN(2)). */ +/* FONCNP: The NAME of the non-polynomial function to be processed. */ +/* NBPNTU: The degree of Legendre polynom on the roots which of */ +/* FONCNP is discretized by u. */ +/* NBPNTV: The degree of Legendre polynom on the roots which of */ +/* FONCNP is discretized by v. */ +/* UROOTB: Table of STRICTLY POSITIVE roots of the polynom */ +/* of Legendre of degree NBPNTU defined on (-1,1). */ +/* VROOTB: Table of STRICTLY POSITIVE roots of the polynom */ +/* of Legendre of degree NBPNTV defined on (-1,1). */ +/* IIUOUV: Shows the type of iso of F(u,v) tom be extracted to improve the */ +/* rapidity of calculation (has no influence on the form of result) */ +/* = 1, shows that it is necessary to calculate the points of F(u,v) */ +/* with fixed u (so with NBPNTV values different from v). */ +/* = 2, shows that it is necessary to calculate the points of F(u,v) */ +/* with fixed v (so with NBPNTV values different from u). */ +/* SOSOTB: Preinitialized table (input/output argument). */ +/* DISOTB: Preinitialized table (input/output argument). */ +/* SODITB: Preinitialized table (input/output argument). */ +/* DIDITB: Preinitialized table (input/output argument). */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* SOSOTB: Tableau ou l'on ajoute les termes */ +/* SOSOTB: Table where the terms */ /* F(ui,vj) + F(ui,-vj) + F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DISOTB: Tableau ou l'on ajoute les termes */ +/* are added with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DISOTB: Table where the terms */ /* F(ui,vj) + F(ui,-vj) - F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* SODITB: Tableau ou l'on ajoute les termes */ +/* are added with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* SODITB: Table where the terms */ /* F(ui,vj) - F(ui,-vj) + F(-ui,vj) - F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* DIDITB: Tableau ou l'on ajoute les termes */ +/* are added with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* DIDITB: Table where the terms */ /* F(ui,vj) - F(ui,-vj) - F(-ui,vj) + F(-ui,-vj) */ -/* avec ui et vj racines positives du polynome de Legendre */ -/* de degre NBPNTU et NBPNTV respectivement. */ -/* FPNTAB: Tableau auxiliaire. */ -/* TTABLE: Tableau auxiliaire. */ -/* IERCOD: Code d' erreur >100 Pb dans l' evaluation de FONCNP, */ -/* le code d'erreur renvoye est egal au code d' erreur */ -/* de FONCNP + 100. */ - -/* COMMONS UTILISES : */ +/* are added with ui and vj positive roots of Legendre polynom */ +/* of degree NBPNTU and NBPNTV respectively. */ +/* FPNTAB: Auxiliary table. */ +/* TTABLE: Auxiliary table. */ +/* IERCOD: Error code >100 Pb in the evaluation of FONCNP, */ +/* the returned error code is equal to error code of FONCNP + 100. */ + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* -->La fonction externe creee par l' appelant de MA2F1K, MA2FDK */ -/* ou de MA2FXK doit etre de la forme : */ +/* --> The external function created by the caller of MA2F1K, MA2FDK */ +/* where MA2FXK should be in the following form : */ /* SUBROUTINE FONCNP(NDIMEN,UINTFN,VINTFN,IIIUOUV,TCONST,NBPTAB */ /* ,TTABLE,IDERIU,IDERIV,PPNTAB,IERCOD) */ -/* ou les arguments d' entree sont : */ -/* - NDIMEN est un entier defini comme la somme des dimensions des */ -/* sous-espaces (i.e. dimension totale du probleme). */ -/* - UINTFN(2) est un tableau de 2 reels contenant l' intervalle */ -/* en u ou est definie la fonction a approximer */ -/* (donc ici egal a UIFONC). */ -/* - VINTFN(2) est un tableau de 2 reels contenant l' intervalle */ -/* en v ou est definie la fonction a approximer */ -/* (donc ici egal a VIFONC). */ -/* - IIIUOUV, vaut 1 si l'on veut calculer des points a u constant, -*/ -/* vaut 2 si l'on calcule les points a v constant. Tout */ -/* autre valeur est une erreur. */ -/* - TCONST, un reel, valeur du parametre fixe. Prend ses valeurs */ -/* dans (UIFONC(1),UIFONC(2)) si IIUOUV = 1 ou dans */ -/* dans (VIFONC(1),VIFONC(2)) si IIUOUV = 2. */ -/* - NBPTAB, un entier. Indique le nombre de points a calculer. */ -/* - TTABLE, un tableau de NBPTAB reels. Ce sont les valeurs du */ -/* parametre 'libre' de discretisation (v si IIIUOUV=1, */ -/* u si IIIUOUV=2). */ -/* - IDERIU, un entier, prend ses valeurs entre 0 (positionnement) */ -/* et IORDRE(1) (derivee partielle de la fonction en u a */ -/* l' ordre IORDRE(1) si IORDRE(1) > 0). */ -/* - IDERIV, un entier, prend ses valeurs entre 0 (positionnement) */ -/* et IORDRE(2) (derivee partielle de la fonction en v a */ -/* l' ordre IORDRE(2) si IORDRE(2) > 0). */ -/* Si IDERIU=i et IDERIV=j, FONCNP devra calculer des */ -/* points de la derivee: */ +/* with the following input arguments : */ +/* - NDIMEN is integer defined as the sum of dimensions of */ +/* sub-spaces (i.e. total dimension of the problem). */ +/* - UINTFN(2) is a table of 2 reals containing the interval */ +/* by u where the function to be approximated is defined */ +/* (so it is equal to UIFONC). */ +/* - VINTFN(2) is a table of 2 reals containing the interval */ +/* by v where the function to be approximated is defined */ +/* (so it is equal to VIFONC). */ +/* - IIIUOUV, is 1 if it is necessary to calculate points with constant u, */ +/* is 2 if it is necessary to calculate points with constant v. */ +/* Any other value is an error. */ +/* - TCONST, real, value of the fixed parameter. Takes values */ +/* in (UIFONC(1),UIFONC(2)) if ISOFAV = 1 or */ +/* ins (VIFONC(1),VIFONC(2)) if ISOFAV = 2. */ +/* - NBPTAB, integer. Shows the number of points to be calculated. */ +/* - TTABLE, a table of reals NBPTAB. These are the values of */ +/* 'free' parameter of discretization (v if IIIUOUV=1, */ +/* u if IIIUOUV=2). */ +/* - IDERIU, integer, takes values between 0 (position) */ +/* and IORDRE(1) (partial derivative of the function by u */ +/* of order IORDRE(1) if IORDRE(1) > 0). */ +/* - IDERIV, integer, takes values between 0 (position) */ +/* and IORDRE(2) (partial derivative of the function by v */ +/* of order IORDRE(2) if IORDRE(2) > 0). */ +/* If IDERIU=i and IDERIV=j, FONCNP should calculate the */ +/* points of the derivative : */ /* i+j */ /* d F(u,v) */ /* -------- */ /* i j */ /* du dv */ -/* et les arguments de sortie sont : */ -/* - FPNTAB(NDIMEN,NBPTAB) contient, en sortie, le tableau des */ -/* NBPTAB points calcules dans FONCNP. */ -/* - IERCOD est, en sortie, le code d' erreur de FONCNP. Ce code */ -/* (entier) doit etre strictement positif s' il y a eu */ -/* un probleme. */ - -/* Les arguments d' entree NE DOIVENT PAS etre modifies sous FONCNP. -*/ - -/* -->Comme FONCNP n' est pas forcement definie dans (-1,1)*(-1,1), on */ -/* modifie les valeurs de UROOTB et VROOTB en consequence. */ - -/* -->Les resultats de la discretisation sont ranges dans 4 tableaux */ -/* SOSOTB, DISOTB, SODITB et DIDITB pour gagner du temps par la suite */ -/* lors du calcul des coefficients du polynome d' approximation. */ - -/* Lorsque NBPNTU est impair: */ -/* le tableau SOSOTB(0,j) contient F(0,vj) + F(0,-vj), */ -/* le tableau DIDITB(0,j) contient F(0,vj) - F(0,-vj), */ -/* Lorsque NBPNTV est impair: */ -/* le tableau SOSOTB(i,0) contient F(ui,0) + F(-ui,0), */ -/* le tableau DIDITB(i,0) contient F(ui,0) - F(-ui,0), */ -/* Lorsque NBPNTU et NBPNTV sont impairs: */ -/* le terme SOSOTB(0,0) contient F(0,0). */ - -/* ATTENTION: On remplit toujours ces 4 tableaux en faisant varier */ -/* le 1er indice d'abord. C'est a dire que les discretisations */ -/* de F(...,t) (pour IIUOUV = 2) ou de F(t,...) (IIUOUV = 1) */ -/* sont stockees dans SOSOTB(...,t), SODITB(...,t), etc... */ -/* (ceci permet un gain de temps non negligeable). */ -/* Il faut donc que l'appelant, dans le cas ou IIUOUV=1, */ -/* intervertisse les roles de u et v, de SODITB et DISOTB AVANT le */ -/* calcul puis, APRES le calcul prenne la transposee des 4 tableau. */ +/* and the output arguments aret : */ +/* - FPNTAB(NDIMEN,NBPTAB) contains, at output, the table of */ +/* NBPTAB points calculated in FONCNP. */ +/* - IERCOD is, at output the error code of FONCNP. This code */ +/* (integer) should be strictly positive if there is a problem. */ + +/* The input arguments SHOULD NOT be modified under FONCNP. +*/ + +/* -->As FONCNP is not forcedly defined in (-1,1)*(-1,1), the */ +/* values of UROOTB and VROOTB are consequently modified. */ + +/* -->The results of discretisation are ranked in 4 tables */ +/* SOSOTB, DISOTB, SODITB and DIDITB to earn time */ +/* during the calculation of coefficients of the polynom of approximation. */ + +/* When NBPNTU is uneven : */ +/* table SOSOTB(0,j) contains F(0,vj) + F(0,-vj), */ +/* table DIDITB(0,j) contains F(0,vj) - F(0,-vj), */ +/* When NBPNTV is uneven : */ +/* table SOSOTB(i,0) contains F(ui,0) + F(-ui,0), */ +/* table DIDITB(i,0) contains F(ui,0) - F(-ui,0), */ +/* When NBPNTU and NBPNTV are uneven : */ +/* term SOSOTB(0,0) contains F(0,0). */ + +/* ATTENTION: These 4 tables are filled by varying the */ +/* 1st index first. So, the discretizations */ +/* of F(...,t) (for IIUOUV = 2) or of F(t,...) (IIUOUV = 1) */ +/* are stored in SOSOTB(...,t), SODITB(...,t), etc... */ +/* (this allows to gain important time). */ +/* It is required that the caller, in case of IIUOUV=1, */ +/* invert the roles of u and v, of SODITB and DISOTB BEFORE the */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 26-09-1996: JCT; TCONS toujours defini sur VINTFN, d'ou init. */ -/* de DBFN1, DBFN2 en fonction de IIUOUV. */ -/* 06-06-1991: RBD; Finalisation du developpement. */ -/* 31-07-1989: RBD; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ -/* --> Indices de boucles. */ +/* --> Indices of loops. */ -/* --------------------------- Initialisations -------------------------- +/* --------------------------- Initialization -------------------------- */ /* Parameter adjustments */ @@ -5851,10 +5642,8 @@ int mma2ds2_(integer *ndimen, /* ********************************************************************** */ -/* -------- Discretisation en U sur les racines du polynome de ---------- -*/ -/* ---------------- Legendre de degre NBPNTU, a Vj fixe ---------------- -*/ +/* -------- Discretization by U on the roots of Legendre polynom -------- */ +/* ---------------- of degree NBPNTU, with Vj fixed -------------------- */ /* ********************************************************************** */ @@ -5862,8 +5651,7 @@ int mma2ds2_(integer *ndimen, nvroo = *nbpntv / 2; jdec = (*nbpntu + 1) / 2; -/* ----------- Chargement des parametres de discretisation en U --------- -*/ +/* ----------- Loading of parameters of discretization by U ------------- */ i__1 = *nbpntu; for (iu = 1; iu <= i__1; ++iu) { @@ -5871,8 +5659,7 @@ int mma2ds2_(integer *ndimen, /* L100: */ } -/* -------------- Pour Vj fixe, racine de Legendre negative ------------- -*/ +/* -------------- For Vj fixed, negative root of Legendre ------------- */ i__1 = nvroo; for (iv = 1; iv <= i__1; ++iv) { @@ -5914,8 +5701,7 @@ int mma2ds2_(integer *ndimen, /* L200: */ } -/* --------- Pour Vj = 0 (NBPNTV impair), discretisation en U ----------- -*/ +/* --------- For Vj = 0 (uneven NBPNTV), discretization by U ----------- */ if (*nbpntv % 2 != 0) { tcons = blinv; @@ -5944,8 +5730,7 @@ int mma2ds2_(integer *ndimen, } } -/* -------------- Pour Vj fixe, racine de Legendre positive ------------- -*/ +/* -------------- For Vj fixed, positive root of Legendre ------------- */ i__1 = nvroo; for (iv = 1; iv <= i__1; ++iv) { @@ -6030,92 +5815,73 @@ int mma2er1_(integer *ndjacu, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule l' erreur d' approximation maxi faite lorsque l'on */ -/* enleve les coefficients de PATJAC t.q. le degre en U varie entre */ -/* MINDGU et MAXDGU et le degre en V varie entre MINDGV et MAXDGV. */ +/* Calculate max approximation error done when */ +/* the coefficients of PATJAC such that the degree by U varies between */ +/* MINDGU and MAXDGU and the degree by V varies between MINDGV and MAXDGV are removed. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,AB_SPECIFI:: CARREAU&,CALCUL,&ERREUR */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDJACU: Dimension en U du tableau PATJAC. */ -/* NDJACV: Dimension en V du tableau PATJAC. */ -/* NDIMEN: Dimension de l'espace. */ -/* MINDGU: Borne inf de l'indice en U des coeff. de PATJAC a prendre -*/ -/* en compte. */ -/* MAXDGU: Borne sup de l'indice en U des coeff. de PATJAC a prendre -*/ -/* en compte. */ -/* MINDGV: Borne inf de l'indice en V des coeff. de PATJAC a prendre -*/ -/* en compte. */ -/* MAXDGV: Borne sup de l'indice en V des coeff. de PATJAC a prendre -*/ -/* en compte. */ -/* IORDRU: Ordre de continuite en U assure par le carreau PATJAC */ -/* (de -1 a 2) */ -/* IORDRV: Ordre de continuite en V assure par le carreau PATJAC */ -/* (de -1 a 2) */ -/* XMAXJU: Valeur maximale des polynomes de Jacobi d'ordre IORDRU, */ -/* du degre 0 a MAXDGU - 2*(IORDU+1) */ -/* XMAXJV: Valeur maximale des polynomes de Jacobi d'ordre IORDRV, */ -/* du degre 0 a MAXDGV - 2*(IORDV+1) */ -/* PATJAC: Table des coeff. du carreau d'approximation avec */ -/* contraintes d'ordre IORDRU en U et IORDRV en V. */ - -/* VECERR: Vecteur auxiliaire. */ -/* ERREUR: L'erreur MAXI commise enlevant les coeff de PATJAC */ -/* DEJA CALCULEE */ - -/* ARGUMENTS DE SORTIE : */ +/* NDJACU: Dimension by U of table PATJAC. */ +/* NDJACV: Dimension by V of table PATJAC. */ +/* NDIMEN: Dimension of the space. */ +/* MINDGU: Lower limit of index by U of coeff. of PATJAC to be taken into account. */ +/* MAXDGU: Upper limit of index by U of coeff. of PATJAC to be taken into account. */ +/* MINDGV: Lower limit of index by V of coeff. of PATJAC to be taken into account. */ +/* MAXDGV: Upper limit of index by V of coeff. of PATJAC to be taken into account. */ +/* IORDRU: Order of continuity by U provided by square PATJAC (from -1 to 2) */ +/* IORDRV: Order of continuity by U provided by square PATJAC (from -1 to 2) */ +/* XMAXJU: Maximum value of Jacobi polynoms of order IORDRU, */ +/* from degree 0 to MAXDGU - 2*(IORDU+1) */ +/* XMAXJV: Maximum value of Jacobi polynoms of order IORDRV, */ +/* from degree 0 to MAXDGV - 2*(IORDV+1) */ +/* PATJAC: Table of coeff. of square of approximation with */ +/* constraints of order IORDRU by U and IORDRV by V. */ +/* VECERR: Auxiliary vector. */ +/* ERREUR: MAX Error commited during removal of ALREADY CALCULATED coeff of PATJAC */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* ERREUR: L'erreur MAXI commise enlevant les coeff de PATJAC */ -/* d'indices MINDGU a MAXDGU en U et MINDGV a MAXDGV en V */ -/* PLUS l'erreur deja calculee. */ +/* ERREUR: MAX Error commited during removal of coeff of PATJAC */ +/* of indices from MINDGU to MAXDGU by U and from MINDGV to MAXDGV by V */ +/* THEN the already calculated error. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Dans le tableau PATJAC sont stockes les coeff. Cij du carreau */ -/* d'approximation de F(U,V). Les indices i et j indique le degre en -*/ -/* U et en V des polynomes de base. Ces polynomes de base sont de la -*/ -/* forme: */ +/* Table PATJAC is the place of storage of coeff. Cij of the square of */ +/* approximation of F(U,V). The indices i and j show the degree */ +/* by U and by V of base polynoms. These polynoms have the form: */ -/* ((1 - U*U)**(IORDRU+1)).J(i-2*(IORDRU+1)(U), ou */ +/* ((1 - U*U)**(IORDRU+1)).J(i-2*(IORDRU+1)(U), where */ -/* le polynome J(i-2*(IORDU+1)(U) est le polynome de Jacobi d'ordre */ -/* IORDRU+1 (idem en V en remplacant U par V dans l'expression ci */ -/* dessus). */ +/* polynom J(i-2*(IORDU+1)(U) is the Jacobi polynom of order */ +/* IORDRU+1 (the same by V by replacing U u V in the expression above). */ -/* La contribution a l'erreur du terme Cij lorsque celui-ci est */ -/* enleve de PATJAC est majoree par: */ +/* The contribution to the error of term Cij when it is */ +/* removed from PATJAC is increased by: */ -/* DABS(Cij)*XMAXJU(i-2*(IORDRU+1))*XMAXJV(J-2*(IORDRV+1)) ou on a */ +/* DABS(Cij)*XMAXJU(i-2*(IORDRU+1))*XMAXJV(J-2*(IORDRV+1)) where */ /* XMAXJU(i-2*(IORDRU+1) = ((1 - U*U)**(IORDRU+1)).J(i-2*(IORDRU+1)(U), */ /* XMAXJV(i-2*(IORDRV+1) = ((1 - V*V)**(IORDRV+1)).J(j-2*(IORDRV+1)(V). */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 22-01-1992:RBD; Creation d'apres MA2ERR. */ /* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* ----------------------------- Initialisations ------------------------ @@ -6137,12 +5903,9 @@ int mma2er1_(integer *ndjacu, minu = (*iordru + 1) << 1; minv = (*iordrv + 1) << 1; -/* ------------------- Calcul du majorant de l'erreur max --------------- -*/ -/* ----- lorsque sont enleves les coeff. d'indices MINDGU a MAXDGU ------ -*/ -/* ---------------- en U et d'indices MINDGV a MAXDGV en V -------------- -*/ +/* ------------------- Calculate the increment of the max error --------------- */ +/* ----- during the removal of the coeffs of indices from MINDGU to MAXDGU ---- */ +/* ---------------- by U and indices from MINDGV to MAXDGV by V --------------- */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { @@ -6164,8 +5927,7 @@ int mma2er1_(integer *ndjacu, /* L100: */ } -/* ----------------------- Calcul de l' erreur max ---------------------- -*/ +/* ----------------------- Calculate the max error ----------------------*/ bid1 = AdvApp2Var_MathBase::mzsnorm_(ndimen, &vecerr[1]); vaux[0] = *erreur; @@ -6221,88 +5983,78 @@ int mma2er2_(integer *ndjacu, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Enleve des coefficients de PATJAC jusqu'a obtenir les degre en U */ -/* et V minimum verifiant la tolerance imposee. */ +/* Remove coefficients of PATJAC to obtain the minimum degree */ +/* by U and V checking the imposed tolerance. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,AB_SPECIFI:: CARREAU&,CALCUL,&ERREUR */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDJACU: Degre en U du tableau PATJAC. */ -/* NDJACV: Degre en V du tableau PATJAC. */ -/* NDIMEN: Dimension de l'espace. */ -/* MINDGU: Borne de l'indice en U des coeff. de PATJAC a GARDER */ -/* (doit etre >= 0). */ -/* MAXDGU: Borne sup de l'indice en U des coeff. de PATJAC a prendre */ -/* en compte. */ -/* MINDGV: Borne de l'indice en V des coeff. de PATJAC a GARDER */ -/* (doit etre >= 0). */ -/* MAXDGV: Borne sup de l'indice en V des coeff. de PATJAC a prendre */ -/* en compte. */ -/* IORDRU: Ordre de continuite en U assure par le carreau PATJAC */ -/* (de -1 a 2) */ -/* IORDRV: Ordre de continuite en V assure par le carreau PATJAC */ -/* (de -1 a 2) */ -/* XMAXJU: Valeur maximale des polynomes de Jacobi d'ordre IORDRU, */ -/* du degre 0 a MAXDGU - 2*(IORDU+1) */ -/* XMAXJV: Valeur maximale des polynomes de Jacobi d'ordre IORDRV, */ -/* du degre 0 a MAXDGV - 2*(IORDV+1) */ -/* PATJAC: Table des coeff. du carreau d'approximation avec */ -/* contraintes d'ordre IORDRU en U et IORDRV en V. */ -/* EPMSCUT: Tolerance d'approximation. */ -/* VECERR: tableau auxiliaire. */ -/* ERREUR: L'erreur MAXI commise DEJA CALCULEE. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDJACU: Degree by U of table PATJAC. */ +/* NDJACV: Degree by V of table PATJAC. */ +/* NDIMEN: Dimension of the space. */ +/* MINDGU: Limit of index by U of coeff. of PATJAC to be PRESERVED (should be >=0). */ +/* MAXDGU: Upper limit of index by U of coeff. of PATJAC to be taken into account. */ +/* MINDGV: Limit of index by V of coeff. of PATJAC to be PRESERVED (should be >=0). */ +/* MAXDGV: Upper limit of index by V of coeff. of PATJAC to be taken into account. */ +/* IORDRU: Order of continuity by U provided by square PATJAC (from -1 to 2) */ +/* IORDRV: Order of continuity by U provided by square PATJAC (from -1 to 2) */ +/* XMAXJU: Maximum value of Jacobi polynoms of order IORDRU, */ +/* from degree 0 to MAXDGU - 2*(IORDU+1) */ +/* XMAXJV: Maximum value of Jacobi polynoms of order IORDRV, */ +/* from degree 0 to MAXDGV - 2*(IORDV+1) */ +/* PATJAC: Table of coeff. of square of approximation with */ +/* constraints of order IORDRU by U and IORDRV by V. */ +/* EPMSCUT: Tolerance of approximation. */ +/* VECERR: Auxiliary vector. */ +/* ERREUR: MAX Error commited ALREADY CALCULATED */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* ERREUR: L'erreur MAXI commise en ne gardant que les coeff de */ -/* PATJAC d'indices 0 a NEWDGU en U et 0 a NEWDGV en V, */ -/* PLUS l'erreur maxi deja calculee. */ -/* NEWDGU: Degre en U minimum t.q. le carreau d'approximation */ -/* verifie la tolerance. On a toujours NEWDGU >= MINDGU >= 0. */ -/* NEWDGV: Degre en V minimum t.q. le carreau d'approximation */ -/* verifie la tolerance. On a toujours NEWDGV >= MINDGV >= 0. */ - -/* COMMONS UTILISES : */ +/* ERREUR: MAX Error commited by preserving only coeff of PATJAC */ +/* of indices from 0 to NEWDGU by U and from 0 to NEWDGV by V */ +/* PLUS the already calculated error. */ +/* NEWDGU: Min. Degree by U such as the square of approximation */ +/* could check the tolerance. There is always NEWDGU >= MINDGU >= 0. */ +/* NEWDGV: Min. Degree by V such as the square of approximation */ +/* could check the tolerance. There is always NEWDGV >= MINDGV >= 0. */ + + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Dans le tableau PATJAC sont stockes les coeff. Cij du carreau */ -/* d'approximation de F(U,V). Les indices i et j indique le degre */ -/* en U et en V des polynomes de base. Ces polynomes de base sont */ -/* de la forme: */ +/* Table PATJAC is the place of storage of coeff. Cij of the square of */ +/* approximation of F(U,V). The indices i and j show the degree */ +/* by U and by V of base polynoms. These polynoms have the form: */ -/* ((1 - U*U)**(IORDRU+1)).J(i-2*(IORDRU+1)(U), ou */ +/* ((1 - U*U)**(IORDRU+1)).J(i-2*(IORDRU+1)(U), where */ -/* le polynome J(i-2*(IORDU+1)(U) est le polynome de Jacobi d'ordre */ -/* IORDRU+1 (idem en V en remplacant U par V dans l'expression ci */ -/* dessus). */ +/* polynom J(i-2*(IORDU+1)(U) is the Jacobi polynom of order */ +/* IORDRU+1 (the same by V by replacing U u V in the expression above). */ -/* La contribution a l'erreur du terme Cij lorsque celui-ci est */ -/* enleve de PATJAC est majoree par: */ +/* The contribution to the error of term Cij when it is */ +/* removed from PATJAC is increased by: */ -/* DABS(Cij)*XMAXJU(i-2*(IORDRU+1))*XMAXJV(J-2*(IORDRV+1)) ou on a */ +/* DABS(Cij)*XMAXJU(i-2*(IORDRU+1))*XMAXJV(J-2*(IORDRV+1)) where */ /* XMAXJU(i-2*(IORDRU+1) = ((1 - U*U)**(IORDRU+1)).J(i-2*(IORDRU+1)(U), */ /* XMAXJV(i-2*(IORDRV+1) = ((1 - V*V)**(IORDRV+1)).J(j-2*(IORDRV+1)(V). */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 23-01-1992: RBD; Creation d'apres MA2CUT. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* ----------------------------- Initialisations ------------------------ @@ -6328,18 +6080,16 @@ int mma2er2_(integer *ndjacu, /* ********************************************************************** */ -/* -------------------- Coupure des coefficients ------------------------ +/* -------------------- Cutting of oefficients ------------------------ */ /* ********************************************************************** */ L1001: -/* ------------------- Calcul du majorant de l'erreur max --------------- -*/ -/* ----- lorsque sont enleves les coeff. d'indices MINDGU a MAXDGU ------ -*/ -/* ---------------- en U, le degre en V etant fixe a NV ----------------- +/* ------------------- Calculate the increment of max error --------------- */ +/* ----- during the removal of coeff. of indices from MINDGU to MAXDGU ------ */ +/* ---------------- by U, the degree by V is fixed to NV ----------------- */ bid0 = 0.; @@ -6362,11 +6112,9 @@ L1001: } errnv = AdvApp2Var_MathBase::mzsnorm_(ndimen, &vecerr[1]); -/* ------------------- Calcul du majorant de l'erreur max --------------- -*/ -/* ----- lorsque sont enleves les coeff. d'indices MINDGV a MAXDGV ------ -*/ -/* ---------------- en V, le degre en U etant fixe a NU ----------------- +/* ------------------- Calculate the increment of max error --------------- */ +/* ----- during the removal of coeff. of indices from MINDGV to MAXDGV ------ */ +/* ---------------- by V, the degree by U is fixed to NU ----------------- */ bid0 = 0.; @@ -6389,7 +6137,7 @@ L1001: } errnu = AdvApp2Var_MathBase::mzsnorm_(ndimen, &vecerr[1]); -/* ----------------------- Calcul de l' erreur max ---------------------- +/* ----------------------- Calculate the max error ---------------------- */ vaux[0] = *erreur; @@ -6417,7 +6165,7 @@ L1001: goto L1001; -/* -------------------------- Recuperation des degres ------------------- +/* -------------------------- Return the degrees ------------------- */ L2001: @@ -6508,174 +6256,157 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Approximation d'UNE frontiere d'une fonction non polynomiale F(u,v) */ -/* (dans l' espace de dimension NDIMEN) par PLUSIEURS courbes */ -/* polynomiales, par la methode des moindres carres. Le parametre de la */ -/* fonction est conserve. */ +/* Approximation of a limit of non polynomial function F(u,v) */ +/* (in the space of dimension NDIMEN) by SEVERAL */ +/* polynomial curves, by the method of least squares. The parameter of the function is preserved. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS, AB_SPECIFI :: FONCTION&,EXTREMITE&, APPROXIMATION, &COURBE. */ -/* ARGUMENTS D'ENTREE : */ -/* ------------------ */ -/* NDIMEN: Dimension totale de l' espace (somme des dimensions */ -/* des sous-espaces) */ -/* NBSESP: Nombre de sous-espaces "independants". */ -/* NDIMSE: Table des dimensions des sous-espaces. */ -/* UVFONC: Bornes de l' intervalle (a,b)x(c,d) de definition de la */ -/* fonction a approcher en U (UVFONC(*,1) contient (a,b)) */ -/* et en V (UVFONC(*,2) contient (c,d)). */ -/* FONCNP: Fonction externe de positionnement sur la fonction non */ -/* polynomiale a approcher. */ -/* TCONST: Valeur de l'isoparametre de F(u,v) a discretiser. */ -/* ISOFAV: Type d'iso choisi, = 1, indique que l'on discretise a u */ -/* fixe; = 2, indique que v est fixe. */ -/* NBROOT: Nbre de points de discretisation de l'iso, extremites non -*/ -/* comprises. */ -/* ROOTLG: Table des racines du polynome de Legendre defini sur */ -/* (-1,1), de degre NBROOT. */ -/* IORDRE: Ordre de contrainte aux extremites de la frontiere */ -/* -1 = pas de contraintes, */ -/* 0 = contraintes de passage aux bornes (i.e. C0), */ -/* 1 = C0 + contraintes de derivees 1eres (i.e. C1), */ -/* 2 = C1 + contraintes de derivees 2ndes (i.e. C2). */ -/* IDERIV: Ordre de derivee de la frontiere. */ -/* NDGJAC: Degre du developpement en serie a utiliser pour le calcul -*/ -/* dans la base de Jacobi. */ -/* NBCRMX: Nbre maxi de courbes a creer. */ -/* NCFLIM: Nombre maxi de coeff de la "courbe" polynomiale */ -/* d' approximation (doit etre superieur ou egal a */ -/* 2*IORDRE+2 et inferieur ou egal a 50). */ -/* EPSAPR: Table des erreurs d' approximations souhaitees */ -/* sous-espace par sous-espace. */ - -/* ARGUMENTS DE SORTIE : */ +/* INPUT ARGUMENTS : */ +/* ----------------- */ +/* NDIMEN: Total Dimension of the space (sum of dimensions */ +/* of sub-spaces) */ +/* NBSESP: Number of "independent" sub-spaces. */ +/* NDIMSE: Table of dimensions of sub-spaces. */ +/* UVFONC: Limits of the interval (a,b)x(c,d) of definition of the */ +/* function to be approached by U (UVFONC(*,1) contains (a,b)) */ +/* and by V (UVFONC(*,2) contains (c,d)). */ +/* FONCNP: External function of position on the non polynomial function to be approached. */ +/* TCONST: Value of isoparameter of F(u,v) to be discretized. */ +/* ISOFAV: Type of chosen iso, = 1, shose that discretization is with u */ +/* fixed; = 2, shows that v is fixed. */ +/* NBROOT: Nb of points of discretisation of the iso, extremities not included. */ +/* ROOTLG: Table of roots of the polynom of Legendre defined on */ +/* (-1,1), of degree NBROOT. */ +/* IORDRE: Order of constraint at the extremities of the limit */ +/* -1 = no constraints, */ +/* 0 = constraints of passage to limits (i.e. C0), */ +/* 1 = C0 + constraints of 1st derivatives (i.e. C1), */ +/* 2 = C1 + constraints of 2nd derivatives (i.e. C2). */ +/* IDERIV: Order of derivative of the limit. */ +/* NDGJAC: Degree of serial development to be used for calculation in */ +/* the Jacobi base. */ +/* NBCRMX: Max Nb of curves to be created. */ +/* NCFLIM: Max Nb of coeff of the polynomial curve */ +/* of approximation (should be above or equal to */ +/* 2*IORDRE+2 and below or equal to 50). */ +/* EPSAPR: Table of required errors of approximation */ +/* sub-space by sub-space. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* NCOEFF: Nombre de coeff. significatifs des courbes calculees. */ -/* COURBE: Tableau des coeff. des courbes polynomiales calculees. */ -/* Doit etre dimensionne en (NCFLIM,NDIMEN,NBCRMX). */ -/* Ces courbes sont TOUJOURS parametrees dans (-1,1). */ -/* NBCRBE: Nbre de courbes calculees. */ -/* SOMTAB: Pour F definie sur (-1,1) (sinon on recale les */ -/* parametres), c'est la table des sommes F(u,vj) + F(u,-vj) -*/ -/* si ISOFAV = 1 (et IDERIV=0, sinon on prend les derivees */ -/* en u d'ordre IDERIV) ou des sommes F(ui,v) + F(-ui,v) si */ -/* ISOFAV = 2 (et IDERIV=0, sinon on prend les derivees en */ -/* v d'ordre IDERIV). */ -/* DIFTAB: Pour F definie sur (-1,1) (sinon on recale les */ -/* parametres), c'est la table des sommes F(u,vj) - F(u,-vj) -*/ -/* si ISOFAV = 1 (et IDERIV=0, sinon on prend les derivees */ -/* en u d'ordre IDERIV) ou des sommes F(ui,v) - F(-ui,v) si */ -/* ISOFAV = 2 (et IDERIV=0, sinon on prend les derivees en */ -/* v d'ordre IDERIV). */ -/* CONTR1: Contient les coordonnees de l'extremite gauche de l'iso */ -/* et de ses derivees jusqu'a l'ordre IORDRE */ -/* CONTR2: Contient les coordonnees de l'extremite droite de l'iso */ -/* et de ses derivees jusqu'a l'ordre IORDRE */ -/* TABDEC: Table des NBCRBE+1 parametres de decoupe de UVFONC(1:2,1) -*/ -/* si ISOFAV=2, ou de UVFONC(1:2,2) si ISOFAV=1. */ -/* ERRMAX: Table des erreurs (sous-espace par sous espace) */ -/* MAXIMALES commises dans l' approximation de FONCNP par */ -/* les NBCRBE courbes. */ -/* ERRMOY: Table des erreurs (sous-espace par sous espace) */ -/* MOYENNES commises dans l' approximation de FONCNP par */ -/* les NBCRBE courbes. */ -/* IERCOD: Code d' erreur : */ -/* -1 = ERRMAX > EPSAPR pour au moins un des sous-espace. */ -/* (les courbes resultat de degre mathematique NCFLIM-1 -*/ -/* au plus , sont quand meme calculees). */ -/* 0 = Tout est ok. */ -/* 1 = Pb d' incoherence des entrees. */ -/* 10 = Pb de calcul de l' interpolation des contraintes. */ -/* 13 = Pb dans l' allocation dynamique. */ -/* 33 = Pb dans la recuperation des donnees du block data */ -/* des coeff. d' integration par la methode de GAUSS. */ -/* >100 Pb dans l' evaluation de FONCNP, le code d' erreur */ -/* renvoye est egal au code d' erreur de FONCNP + 100. */ - -/* COMMONS UTILISES : */ +/* NCOEFF: Number of significative coeff of calculated curves. */ +/* COURBE: Table of coeff. of calculated polynomial curves. */ +/* Should be dimensioned in (NCFLIM,NDIMEN,NBCRMX). */ +/* These curves are ALWAYS parametrized in (-1,1). */ +/* NBCRBE: Nb of calculated curves. */ +/* SOMTAB: For F defined on (-1,1) (otherwise rescale the */ +/* parameters), this is the table of sums F(u,vj) + F(u,-vj) +*/ +/* if ISOFAV = 1 (and IDERIV=0, otherwise the derivatives */ +/* by u of order IDERIV are taken) or sumes F(ui,v) + F(-ui,v) if */ +/* ISOFAV = 2 (and IDERIV=0, otherwise the derivatives by */ +/* v of order IDERIV are taken). */ +/* DIFTAB: For F defined on (-1,1) (otherwise rescale the */ +/* parameters), this is the table of sums F(u,vj) - F(u,-vj) +*/ +/* if ISOFAV = 1 (and IDERIV=0, otherwise the derivatives */ +/* by u of order IDERIV are taken) or sumes F(ui,v) + F(-ui,v) if */ +/* ISOFAV = 2 (and IDERIV=0, otherwise the derivatives by */ +/* v of order IDERIV are taken). */ +/* CONTR1: Contains the coordinates of the left extremity of the iso */ +/* and of its derivatives till order IORDRE */ +/* CONTR2: Contains the coordinates of the right extremity of the iso */ +/* and of its derivatives till order IORDRE */ +/* TABDEC: Table of NBCRBE+1 parameters of cut of UVFONC(1:2,1) +*/ +/* if ISOFAV=2, or of UVFONC(1:2,2) if ISOFAV=1. */ +/* ERRMAX: Table of MAX errors (sub-space by sub-space) */ +/* committed in the approximation of FONCNP by NBCRBE curves. */ +/* ERRMOY: Table of AVERAGE errors (sub-space by sub-space) */ +/* committed in the approximation of FONCNP by NBCRBE curves. +/* IERCOD: Error code: */ +/* -1 = ERRMAX > EPSAPR for at least one sub-space. */ +/* (the resulting curves of at least mathematic degree NCFLIM-1 */ +/* are calculated). */ +/* 0 = Everything is ok. */ +/* 1 = Pb of incoherence of inputs. */ +/* 10 = Pb of calculation of the interpolation of constraints. */ +/* 13 = Pb in the dynamic allocation. */ +/* 33 = Pb in the data recuperation from block data */ +/* of coeff. of integration by GAUSS method. */ +/* >100 Pb in the evaluation of FONCNP, the returned error code */ +/* is equal to the error code of FONCNP + 100. */ + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* --> La partie approximation est faite dans l' espace de dimension */ -/* NDIMEN (la somme des dimensions des sous-espaces). Par exemple : */ -/* Si NBSESP=2 et NDIMSE(1)=3, NDIMSE(2)=2, on a un lissage avec */ -/* NDIMEN=5. Le resultat (dans COURBE(NDIMEN,NCOEFF,i) ), sera */ -/* compose du resultat du lissage de la fonction 3D dans */ -/* COURBE(1:3,1:NCOEFF,i) et du lissage de la fonction 2D dans */ +/* --> The approximation part is done in the space of dimension */ +/* NDIMEN (the sum of dimensions of sub-spaces). For example : */ +/* If NBSESP=2 and NDIMSE(1)=3, NDIMSE(2)=2, there is smoothing with */ +/* NDIMEN=5. The result (in COURBE(NDIMEN,NCOEFF,i) ), will be */ +/* composed of the result of smoothing of 3D function in */ +/* COURBE(1:3,1:NCOEFF,i) and of smoothing of 2D function in */ /* COURBE(4:5,1:NCOEFF,i). */ -/* --> La routine FONCNP doit etre declaree EXTERNAL dans le programme */ -/* appelant MMA2FNC. */ +/* --> Routine FONCNP should be declared EXTERNAL in the program */ +/* calling MMA2FNC. */ -/* --> La fonction FONCNP, declaree ici en externe, doit etre declaree */ -/* IMPERATIVEMENT sous la forme : */ +/* --> Function FONCNP, declared externally, should be declared */ +/* IMPERATIVELY in form : */ /* SUBROUTINE FONCNP(NDIMEN,UINTFN,VINTFN,IIUOUV,TCONST,NBPTAB */ /* ,TTABLE,IDERIU,IDERIV,IERCOD) */ -/* ou les arguments d' entree sont : */ -/* - NDIMEN est un entier defini comme la somme des dimensions des */ -/* sous-espaces (i.e. dimension totale du probleme). */ -/* - UINTFN(2) est un tableau de 2 reels contenant l' intervalle */ -/* en U ou est definie la fonction a approximer */ -/* (donc ici egal a UIFONC). */ -/* - VINTFN(2) est un tableau de 2 reels contenant l' intervalle */ -/* en V ou est definie la fonction a approximer */ -/* (donc ici egal a VIFONC). */ -/* - IIUOUV, indique que les points a calculer sont a U constant */ -/* (IIUOUV=1) ou a V constant (IIUOUV=2). */ -/* - TCONST, un reel, le parametre fixe de discretisation qui prend -*/ -/* ses valeurs dans (UINTFN(1),UINTFN(2)) si IIUOUV=1, */ -/* ou dans (VINTFN(1),VINTFN(2)) si IIUOUV=2. */ -/* - NBPTAB, Le nbre de point de discretisation suivant la variable -*/ -/* libre: V si IIUOUV=1 ou U si IIUOUV = 2. */ -/* - TTABLE, La table des NBPTAB parametres de discretisation. */ -/* - IDERIU, un entier, prend ses valeurs entre 0 (positionnement) */ -/* et IORDRU (derivee partielle en U de la fonction a */ -/* l' ordre IORDRU si IORDRU > 0). */ -/* - IDERIV, un entier, prend ses valeurs entre 0 (positionnement) */ -/* et IORDRV (derivee partielle en V de la fonction a */ -/* l' ordre IORDRV si IORDRV > 0). */ -/* et les arguments de sortie sont : */ -/* - FPNTAB(NDIMEN,NBPTAB) contient, en sortie, le tableau des */ -/* NBPTAB points calcules de dimension NDIMEN. */ -/* - IERCOD est, en sortie, le code d' erreur de FONCNP. Ce code */ -/* (entier) doit etre strictement positif s' il y a eu */ -/* un probleme. */ -/* Les arguments d' entree NE DOIVENT PAS etre modifies sous FONCNP. -*/ - -/* --> Si IERCOD=-1, la precision demandee n' est pas atteinte (ERRMAX */ -/* est superieur a EPSAPR sur au moins l' un des sous espaces), mais -*/ -/* on donne le meilleur resultat possible pour NCFLIM et EPSAPR */ -/* choisis par l'utilisateur. Dans ce cas (ainsi que pour */ -/* IERCOD=0), on a une solution. */ - +/* where the input arguments are : */ +/* - NDIMEN is integer defined as the sum of dimensions of */ +/* sub-spaces (i.e. total dimension of the problem). */ +/* - UINTFN(2) is a table of 2 reals containing the interval */ +/* by u where the function to be approximated is defined */ +/* (so it is equal to UIFONC). */ +/* - VINTFN(2) is a table of 2 reals containing the interval */ +/* by v where the function to be approximated is defined */ +/* (so it is equal to VIFONC). */ +/* - IIUOUV, shows that the points to be calculated have a constant U */ +/* (IIUOUV=1) or a constant V (IIUOUV=2). */ +/* - TCONST, real, value of the fixed discretisation parameter. Takes values */ +/* in (UINTFN(1),UINTFN(2)) if IIUOUV=1, */ +/* or in (VINTFN(1),VINTFN(2)) if IIUOUV=2. */ +/* - NBPTAB, the nb of point of discretisation following the free variable */ +/* : V if IIUOUV=1 or U if IIUOUV = 2. */ +/* - TTABLE, Table of NBPTAB parametres of discretisation. . */ +/* - IDERIU, integer, takes values between 0 (position) */ +/* and IORDREU (partial derivative of the function by u */ +/* of order IORDREU if IORDREU > 0). */ +/* - IDERIV, integer, takes values between 0 (position) */ +/* and IORDREV (partial derivative of the function by v */ +/* of order IORDREV if IORDREV > 0). */ +/* and the output arguments are : */ +/* - FPNTAB(NDIMEN,NBPTAB) contains, at output, the table of */ +/* NBPTAB points calculated in FONCNP. */ +/* - IERCOD is, at output the error code of FONCNP. This code */ +/* (integer) should be strictly positive if there is a problem. */ + +/* The input arguments SHOULD NOT BE modified under FONCNP. +*/ + +/* --> If IERCOD=-1, the required precision can't be reached (ERRMAX */ +/* is above EPSAPR on at least one sub-space), but +*/ +/* one gives the best possible result for NCFLIM and EPSAPR */ +/* chosen by the user. In this case (and for IERCOD=0), there is a solution. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 04-02-1992: RBD; Correction passage SOMTAB et DIFTAB en argument */ -/* et appel a MMFMCA8. */ -/* 26-09-1991: RBD; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ --epsapr; @@ -6718,7 +6449,7 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, *iercod = 0; iofwr = 0; -/* ---------------- Mise a zero des coefficients de COURBE -------------- +/* ---------------- Set to zero the coefficients of CURVE -------------- */ ilong = *ndimen * *ncflim * *nbcrmx; @@ -6726,7 +6457,7 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, /* ********************************************************************** */ -/* -------------------------- Verification des entrees ------------------ +/* -------------------------- Checking of entries ------------------ */ /* ********************************************************************** */ @@ -6744,49 +6475,46 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, uv11[2] = -1.; uv11[3] = 1.; -/* ********************************************************************** -*/ -/* ------------- Preparation des parametres de discretisation ----------- -*/ +/* ********************************************************************** */ +/* ------------- Preparation of parameters of discretisation ----------- */ /* ********************************************************************** */ -/* -- Allocation d'une table de parametres et de pts de discretisation -- -*/ -/* --> Pour les parametres de discretisation. */ +/* -- Allocation of a table of parameters and points of discretisation -- */ +/* --> For the parameters of discretisation. */ isz1 = *nbroot + 2; -/* --> Pour les pts de discretisation dans MMA1FDI et MMA1CDI et la courbe +/* --> For the points of discretisation in MMA1FDI and MMA1CDI and */ -/* auxiliaire pour MMAPCMP */ +/* the auxiliary curve for MMAPCMP */ ibid1 = *ndimen * (*nbroot + 2); ibid2 = ((*iordre + 1) << 1) * *nbroot; isz2 = max(ibid1,ibid2); ibid1 = (((*ncflim - 1) / 2 + 1) << 1) * *ndimen; isz2 = max(ibid1,isz2); -/* --> Pour recuperer les polynomes d'hermite. */ +/* --> To return the polynoms of hermit. */ isz3 = ((*iordre + 1) << 2) * (*iordre + 1); -/* --> Pour les coeff. d'integration de Gauss. */ +/* --> For the Gauss coeff. of integration. */ isz4 = (*nbroot / 2 + 1) * (*ndgjac + 1 - ((*iordre + 1) << 1)); -/* --> Pour les coeff de la courbe dans la base de Jacobi */ +/* --> For the coeff of the curve in the base of Jacobi */ isz5 = (*ndgjac + 1) * *ndimen; ndwrk = isz1 + isz2 + isz3 + isz4 + isz5; AdvApp2Var_SysBase::mcrrqst_(&c__8, &ndwrk, wrkar, &iofwr, &ier); if (ier > 0) { goto L9013; } -/* --> Pour les parametres de discretisation (NBROOT+2 extremites). */ +/* --> For the parameters of discretisation (NBROOT+2 extremities). */ ipt1 = iofwr; -/* --> Pour les pts de discretisation FPNTAB(NDIMEN,NBROOT+2), */ -/* FPNTAB(NBROOT,2*(IORDRE+1)) et pour WRKAR de MMAPCMP. */ +/* --> For the points of discretisation FPNTAB(NDIMEN,NBROOT+2), */ +/* FPNTAB(NBROOT,2*(IORDRE+1)) and for WRKAR of MMAPCMP. */ ipt2 = ipt1 + isz1; -/* --> Pour les polynomes d'Hermite */ +/* --> For the polynoms of Hermit */ ipt3 = ipt2 + isz2; -/* --> Pour les coeff d'integration de Gauss. */ +/* --> For the Gauss coeff of integration. */ ipt4 = ipt3 + isz3; -/* --> Pour la courbe dans Jacobi. */ +/* --> For the curve in Jacobi. */ ipt5 = ipt4 + isz4; -/* ------------------ Initialisation de la gestion des decoupes --------- +/* ------------------ Initialisation of management of cuts --------- */ if (*isofav == 1) { @@ -6808,12 +6536,12 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, /* ********************************************************************** */ -/* APPROXIMATION AVEC DECOUPES */ +/* APPROXIMATION WITH CUTS */ /* ********************************************************************** */ L1000: -/* --> Lorsque l' on a atteint le haut de la pile, c' est fini ! */ +/* --> When the top is reached, this is the end ! */ if (nupil - *nbcrbe == 0) { goto L9900; } @@ -6828,16 +6556,14 @@ L1000: goto L9100; } -/* -------------------- Normalisation des parametres -------------------- -*/ +/* -------------------- Normalization of parameters -------------------- */ mma1nop_(nbroot, &rootlg[1], uvpav, isofav, &wrkar[ipt1], &ier); if (ier > 0) { goto L9100; } -/* -------------------- Discretisation de FONCNP ------------------------ -*/ +/* -------------------- Discretisation of FONCNP ------------------------ */ mma1fdi_(ndimen, uvpav, foncnp, isofav, tconst, nbroot, &wrkar[ipt1], iordre, ideriv, &wrkar[ipt2], &somtab[(ncb1 * somtab_dim2 + 1) * @@ -6848,8 +6574,7 @@ L1000: goto L9900; } -/* -----------On retranche la discretisation des contraintes ------------ -*/ +/* -----------Cut the discretisation of constraints ------------*/ if (*iordre >= 0) { mma1cdi_(ndimen, nbroot, &rootlg[1], iordre, &contr1[(ncb1 * @@ -6864,7 +6589,7 @@ L1000: /* ********************************************************************** */ -/* -------------------- Calcul de la courbe d'approximation ------------- +/* -------------------- Calculate the curve of approximation ------------- */ /* ********************************************************************** */ @@ -6878,7 +6603,7 @@ L1000: /* ********************************************************************** */ -/* ---------------- Ajout du polynome d'interpolation ------------------- +/* ---------------- Add polynom of interpolation ------------------- */ /* ********************************************************************** */ @@ -6891,7 +6616,7 @@ L1000: /* ********************************************************************** */ -/* --------------- Calcul de l'erreur Max et Moyenne -------------------- +/* --------------- Calculate Max and Average error ---------------------- */ /* ********************************************************************** */ @@ -6916,7 +6641,7 @@ L1000: *iercod = -1; } ncfja = *ndgjac + 1; -/* -> Compression du resultat dans WRKAR(IPT2) */ +/* -> Compression of result in WRKAR(IPT2) */ /*pkv f*/ /* AdvApp2Var_MathBase::mmapcmp_(ndimen, @@ -6930,7 +6655,7 @@ L1000: /*pkv t*/ ilong = *ndimen * *ncflim; AdvApp2Var_SysBase::mvriraz_(&ilong, (char*)&wrkar[ipt5]); -/* -> Passage a la base canonique (-1,1) (resultat dans WRKAR(IPT5)). +/* -> Passage to canonic base (-1,1) (result in WRKAR(IPT5)). */ ndgre = ncoeff[ncb1] - 1; i__1 = *ndimen; @@ -6941,14 +6666,14 @@ L1000: /* L400: */ } -/* -> On stocke la courbe calculee */ +/* -> Store the calculated curve */ ibid1 = 1; AdvApp2Var_MathBase::mmfmca8_(&ncoeff[ncb1], ndimen, &ibid1, ncflim, ndimen, &ibid1, & wrkar[ipt5], &courbe[(ncb1 * courbe_dim2 + 1) * courbe_dim1 + 1]); -/* -> Les contraintes ayant ete normalisee sur (-1,1), on recalcule */ -/* les contraintes vraies. */ +/* -> Before normalization of constraints on (-1,1), recalculate */ +/* the true constraints. */ i__1 = *iordre; for (ii = 0; ii <= i__1; ++ii) { mma1noc_(uv11, ndimen, &ii, &contr1[(ii + 1 + ncb1 * contr1_dim2) @@ -6976,10 +6701,10 @@ L1000: /* L210: */ } -/* -> Mise ajour du nbre de courbes deja crees */ +/* -> Update the nb of already created curves */ ++(*nbcrbe); -/* -> ...sinon on essai de decouper l' intervalle courant en 2... */ +/* -> ...otherwise try to cut the current interval in 2... */ } else { tmil = (tabdec[*nbcrbe + 1] + tabdec[*nbcrbe]) / 2.; ideb = *nbcrbe + 1; @@ -6990,23 +6715,23 @@ L1000: ++nupil; } -/* ---------- On fait l' approximation de la suite de la pile ----------- +/* ---------- Make approximation of the rest ----------- */ goto L1000; -/* --------------------- Recuperation du code d' erreur ----------------- +/* --------------------- Return code of error ----------------- */ -/* --> Pb alloc. dynamique. */ +/* --> Pb with dynamic allocation */ L9013: *iercod = 13; goto L9900; -/* --> Entrees incoherentes. */ +/* --> Inputs incoherent. */ L9100: *iercod = 1; goto L9900; -/* -------------------------- Desallocation dynamique ------------------- +/* -------------------------- Dynamic desallocation ------------------- */ L9900: @@ -7067,82 +6792,60 @@ int AdvApp2Var_ApproxF2var::mma2fx6_(integer *ncfmxu, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Reduction de degre lorsque les carreaux sont les carreaux de */ -/* contraintes. */ +/* Reduction of degree when the squares are the squares of constraints. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,AB_SPECIFI::CARREAU&,REDUCTION,&CARREAU */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCFMXU: Nbre maximal de coeff en u de la solution P(u,v) (tableau */ -/* PATCAN). Cet argument sert uniquement a declarer la taille */ -/* de ce tableau. */ -/* NCFMXV: Nbre maximal de coeff en v de la solution P(u,v) (tableau */ -/* PATCAN). Cet argument sert uniquement a declarer la taille */ -/* de ce tableau. */ -/* NDIMEN: Dimension totale de l' espace ou la fonction a approcher */ -/* prend ses valeurs.(somme des dimensions des sous-espaces) */ -/* NBSESP: Nombre de sous-espaces independants ou l'on mesure les */ -/* erreurs. */ -/* NDIMSE: Table des dimensions des NBSESP sous-espaces. */ -/* NBUPAT: Nbre de carreau solution en u. */ -/* NBVPAT: Nbre de carreau solution en v. */ -/* IORDRU: Ordre de contrainte impose aux extremites de l'iso-V */ -/* = 0, on calcule les extremites de l'iso-V */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso-V */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso-V */ +/* NCFMXU: Max Nb of coeff by u of solution P(u,v) (table */ +/* PATCAN). This argument serves only to declare the size of this table. */ +/* NCFMXV: Max Nb of coeff by v of solution P(u,v) (table */ +/* PATCAN). This argument serves only to declare the size of this table. */ +/* NDIMEN: Total dimension of the space where the processed function */ +/* takes its values.(sum of dimensions of sub-spaces) */ +/* NBSESP: Nb of independent sub-spaces where the errors are measured. */ +/* NDIMSE: Table of dimensions of NBSESP sub-spaces. */ +/* NBUPAT: Nb of square solution by u. */ +/* NBVPAT: Nb of square solution by v. */ +/* IORDRU: Order of constraint imposed at the extremities of iso-V */ +/* = 0, the extremities of iso-V are calculated */ +/* = 1, additionally the 1st derivative in the direction of iso-V is calculated */ +/* = 2, additionally the 2nd derivative in the direction of iso-V is calculated */ /* IORDRV: Ordre de contrainte impose aux extremites de l'iso-U */ /* = 0, on calcule les extremites de l'iso-U. */ -/* = 1, on calcule, en plus, la derivee 1ere dans le sens */ -/* de l'iso-U */ -/* = 2, on calcule, en plus, la derivee 2nde dans le sens */ -/* de l'iso-U */ -/* EPSAPR: Table des precisions imposees, sous-espace par sous-espace. */ -/* EPSFRO: Table des precisions imposees, sous-espace par sous-espace */ -/* sur les frontieres des carreaux. */ -/* PATCAN: Tableau des coeff. dans la base canonique des carreaux P(u,v) -*/ -/* calcules, pour (u,v) dans (-1,1). */ -/* ERRMAX: Table des erreurs (sous-espace par sous espace) */ -/* MAXIMALES commises dans l' approximation de F(u,v) par */ -/* les P(u,v). */ -/* NCOEFU: Table des Nbres de coeff. significatifs en u des carreaux */ -/* calcules. */ -/* NCOEFV: Table des Nbres de coeff. significatifs en v des carreaux */ -/* calcules. */ - -/* ARGUMENTS DE SORTIE : */ +/* = 1, additionally the 1st derivative in the direction of iso-U is calculated */ +/* = 2, additionally the 2nd derivative in the direction of iso-U is calculated */ +/* EPSAPR: Table of imposed precisions, sub-space by sub-space. */ +/* EPSFRO: Table of imposed precisions, sub-space by sub-space on the limits of squares. */ +/* PATCAN: Table of coeff. in the canonic base of squares P(u,v) calculated for (u,v) in (-1,1). */ +/* ERRMAX: Table of MAX errors (sub-space by sub-space) */ +/* committed in the approximation of F(u,v) by P(u,v). */ +/* NCOEFU: Table of Nb of significative coeffs. by u of calculated squares. */ +/* NCOEFV: Table of Nb of significative coeffs. by v of calculated squares. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* NCOEFU: Table des Nbres de coeff. significatifs en u des carreaux */ -/* calcules. */ -/* NCOEFV: Table des Nbres de coeff. significatifs en v des carreaux */ -/* calcules. */ +/* NCOEFU: Table of Nb of significative coeffs. by u of calculated squares. */ +/* NCOEFV: Table of Nb of significative coeffs. by v of calculated squares. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 15-07-1996: JCT/RBD; Initialisation de TOL quand on reduit */ -/* le degre uniquement en V */ -/* 14-02-1992: RBD; Creation. */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ +/* ------------------------------- */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -7183,12 +6886,9 @@ int AdvApp2Var_ApproxF2var::mma2fx6_(integer *ncfmxu, ncfu = ncoefu[ii + jj * ncoefu_dim1]; ncfv = ncoefv[ii + jj * ncoefv_dim1]; -/* ************************************************************** -******** */ -/* -------------------- Reduction du degre en U ----------------- --------- */ -/* ************************************************************** -******** */ +/* ********************************************************************** */ +/* -------------------- Reduction of degree by U ------------------------- */ +/* ********************************************************************** */ L200: if (ncfu <= (*iordru + 1) << 1 && ncfu > 2) { @@ -7251,12 +6951,9 @@ L200: goto L200; } -/* ************************************************************** -******** */ -/* -------------------- Reduction du degre en V ----------------- --------- */ -/* ************************************************************** -******** */ +/* ********************************************************************** */ +/* -------------------- Reduction of degree by V ------------------------- */ +/* ********************************************************************** */ L300: if (ncfv <= (*iordrv + 1) << 1 && ncfv > 2) { @@ -7319,8 +7016,7 @@ L300: goto L300; } -/* --- On recupere les nbres de coeff. et on passe au carreau suiv -ant --- */ +/* --- Return the nbs of coeff. and pass to the next square --- */ L400: ncoefu[ii + jj * ncoefu_dim1] = max(ncfu,2); @@ -7528,40 +7224,37 @@ int AdvApp2Var_ApproxF2var::mma2jmx_(integer *ndgjac, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule les max des polynomes de Jacobi multiplies par le poids */ -/* sur (-1,1) pour ordre 0,4,6 ou Legendre. */ +/* Calculate the max of Jacobo polynoms multiplied by the weight on */ +/* (-1,1) for order 0,4,6 or Legendre. */ -/* MOTS CLES : */ +/* KEYWORDSS : */ /* ----------- */ /* LEGENDRE,APPROXIMATION,ERREUR. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDGJAC: Nbre de coeff. de l'approximation de Jacobi. */ -/* IORDRE: Ordre de continuite (de -1 a 2) */ +/* NDGJAC: Nb of Jacobi coeff. of approximation. */ +/* IORDRE: Order of continuity (from -1 to 2) */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* XJACMX: Table des maximums des polynomes de Jacobi. */ +/* XJACMX: Table of maximums of Jacobi polynoms. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 20-08-1991: RBD; Creation. */ /* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* ----------------------------- Initialisations ------------------------ */ @@ -7635,78 +7328,59 @@ int mma2moy_(integer *ndgumx, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule l'erreur moyenne d'approximation faite lorsque l'on ne */ -/* garde que les coefficients de PATJAC de degre compris entre */ -/* 2*(IORDRU+1) et MINDGU en U et 2*(IORDRV+1) et MINDGV en V. */ +/* Calculate the average approximation error made when only */ +/* the coefficients of PATJAC of degree between */ +/* 2*(IORDRU+1) and MINDGU by U and 2*(IORDRV+1) and MINDGV by V are preserved. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LEGENDRE,APPROXIMATION,ERREUR MOYENNE */ +/* LEGENDRE,APPROXIMATION, AVERAGE ERROR */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDGUMX: Dimension en U du tableau PATJAC. */ -/* NDGVMX: Dimension en V du tableau PATJAC. */ -/* NDIMEN: Dimension de l'espace. */ -/* MINDGU: Borne inf de l'indice en U des coeff. de PATJAC a prendre -*/ -/* en compte. */ -/* MAXDGU: Borne sup de l'indice en U des coeff. de PATJAC a prendre -*/ -/* en compte. */ -/* MINDGV: Borne inf de l'indice en V des coeff. de PATJAC a prendre -*/ -/* en compte. */ -/* MAXDGV: Borne sup de l'indice en V des coeff. de PATJAC a prendre -*/ -/* en compte. */ -/* IORDRU: Ordre de continuite en U assure par le carreau PATJAC */ -/* (de -1 a 2) */ -/* IORDRV: Ordre de continuite en V assure par le carreau PATJAC */ -/* (de -1 a 2) */ -/* PATJAC: Table des coeff. du carreau d'approximation avec */ -/* contraintes d'ordre IORDRU en U et IORDRV en V. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDGUMX: Dimension by U of table PATJAC. */ +/* NDGVMX: Dimension by V of table PATJAC. */ +/* NDIMEN: Dimension of the space. */ +/* MINDGU: Lower limit of the index by U of PATJAC coeff to be taken into account. */ +/* MAXDGU: Upper limit of the index by U of PATJAC coeff to be taken into account. */ +/* MINDGV: Lower limit of the index by V of PATJAC coeff to be taken into account. */ +/* MAXDGV: Upper limit of the index by V of PATJAC coeff to be taken into account. */ +/* IORDRU: Order of continuity by U provided by square PATJAC (from -1 to 2) */ +/* IORDRV: Order of continuity by V provided by square PATJAC (from -1 to 2) */ +/* PATJAC: Table of coeff. of the approximation square with */ +/* constraints of order IORDRU by U and IORDRV by V. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* ERRMOY: L'erreur moyenne commise en ne gardant que les coeff de */ -/* PATJAC 2*(IORDRU+1) a MINDGU en U et 2*(IORDRV+1) a */ -/* MINDGV en V. */ +/* ERRMOY: Average error commited by preserving only the coeff of */ +/* PATJAC 2*(IORDRU+1) in MINDGU by U and 2*(IORDRV+1) in MINDGV by V. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Dans le tableau PATJAC sont stockes les coeff. Cij du carreau */ -/* d'approximation de F(U,V). Les indices i et j indique le degre en -*/ -/* U et en V des polynomes de base. Ces polynomes de base sont de la -*/ -/* forme: */ - -/* ((1 - U*U)**(IORDRU+1)).J(i-2*(IORDRU+1)(U), ou */ +/* Table PATJAC stores the coeff. Cij of */ +/* approximation square F(U,V). Indexes i and j show the degree by */ +/* U and by V of the base polynoms. These base polynoms are in the form: */ -/* le polynome J(i-2*(IORDU+1)(U) est le polynome de Jacobi d'ordre */ -/* IORDRU+1 (idem en V en remplacant U par V dans l'expression ci */ -/* dessus). */ +/* ((1 - U*U)**(IORDRU+1)).J(i-2*(IORDRU+1)(U), where */ -/* La contribution a l'erreur moyenne du terme Cij lorsque */ -/* celui-ci est enleve de PATJAC est Cij*Cij. */ +/* polynom J(i-2*(IORDU+1)(U) is the Jacobi polynom of order */ +/* IORDRU+1 (the same by V by replacing U by V in the above expression). */ +/* The contribution to the average error of term Cij when */ +/* it is removed from PATJAC is Cij*Cij. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 13-06-1991: RBD; Creation. */ /* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* ----------------------------- Initialisations ------------------------ @@ -7731,12 +7405,9 @@ int mma2moy_(integer *ndgumx, bid0 = 0.; *errmoy = 0.; -/* ------------------ Calcul du majorant de l'erreur moyenne ------------ -*/ -/* ----- lorsque sont enleves les coeff. d'indices MINDGU a MAXDGU ------ -*/ -/* ---------------- en U et d'indices MINDGV a MAXDGV en V -------------- -*/ +/* ------------------ Calculation of the upper bound of the average error ------------ */ +/* -------------------- when the coeff. of indexes from MINDGU to MAXDGU ------ */ +/* ---------------- by U and of indexes from MINDGV to MAXDGV by V are removed -------------- */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { @@ -7768,7 +7439,7 @@ int mma2moy_(integer *ndgumx, /* L400: */ } -/* ----------------------- Calcul de l'erreur moyenne ------------------- +/* ----------------------- Calculation of the average error ------------- */ bid0 /= 4; @@ -7801,47 +7472,42 @@ int AdvApp2Var_ApproxF2var::mma2roo_(integer *nbpntu, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Recuperation des racines de Legendre pour les discretisations. */ +/* Return roots of Legendre for discretisations. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS, AB_SPECIFI::CONTRAINTE&, DISCRETISATION, &POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NBPNTU: Nbre de parametres INTERNES de discretisation EN U. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ -/* NBPNTV: Nbre de parametres INTERNES de discretisation EN V. */ -/* C'est aussi le nbre de racine du polynome de Legendre ou */ -/* on discretise. */ +/* NBPNTU: Nb of INTERNAL parameters of discretization BY U. */ +/* This is also the nb of root of the Legendre polynom where the discretization is done. */ +/* NBPNTV: Nb of INTERNAL parameters of discretization BY V. */ +/* This is also the nb of root of the Legendre polynom where the discretization is done. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* UROOTL: Tableau des parametres de discretisation SUR (-1,1) EN U. +/* UROOTL: Table of parameters of discretisation ON (-1,1) BY U. */ -/* VROOTL: Tableau des parametres de discretisation SUR (-1,1) EN V. +/* VROOTL: Table of parameters of discretisation ON (-1,1) BY V. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 02-07-1991: RBD; Creation. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -7854,7 +7520,7 @@ int AdvApp2Var_ApproxF2var::mma2roo_(integer *nbpntu, AdvApp2Var_SysBase::mgenmsg_("MMA2ROO", 7L); } -/* ---------------- Recup des racines POSITIVES sur U ------------------ +/* ---------------- Return the POSITIVE roots on U ------------------ */ AdvApp2Var_MathBase::mmrtptt_(nbpntu, &urootl[(*nbpntu + 1) / 2 + 1]); @@ -7867,7 +7533,7 @@ int AdvApp2Var_ApproxF2var::mma2roo_(integer *nbpntu, urootl[*nbpntu / 2 + 1] = 0.; } -/* ---------------- Recup des racines POSITIVES sur V ------------------ +/* ---------------- Return the POSITIVE roots on V ------------------ */ AdvApp2Var_MathBase::mmrtptt_(nbpntv, &vrootl[(*nbpntv + 1) / 2 + 1]); @@ -7916,65 +7582,55 @@ int mmmapcoe_(integer *ndim, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul des coefficients de la courbe d' approximation polynomiale -*/ -/* de degre NDGJAC par la methode des moindres carres a partir de la -*/ -/* discretisation de la fonction sur les racines du polynome de */ -/* Legendre de degre NBPNTS. */ +/* Calculate the coefficients of polinomial approximation curve */ +/* of degree NDGJAC by the method of smallest squares starting from */ +/* the discretization of function on the roots of Legendre polynom */ +/* of degree NBPNTS. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* FONCTION,APPROXIMATION,COEFFICIENT,POLYNOME */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIM : Dimension de l' espace. */ -/* NDGJAC : Degre maxi du polynome d' approximation. La */ -/* representation dans la base orthogonale part du degre -*/ -/* 0 au degre NDGJAC-2*(JORDRE+1). La base polynomiale */ -/* est la base de Jacobi d' ordre -1 (Legendre), 0, 1 */ -/* et 2 */ -/* IORDRE : Ordre de la base de Jacobi (-1,0,1 ou 2). Correspond */ -/* a pas de contraintes, contraintes C0,C1 ou C2. */ -/* NBPNTS : Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration par la */ -/* methode de Gauss. On doit avoir NBPNTS=30,40,50 ou 61 -*/ -/* et NDGJAC < NBPNTS. */ -/* SOMTAB : Tableau de F(ti)+F(-ti) avec ti dans ROOTAB. */ -/* DIFTAB : Tableau de F(ti)-F(-ti) avec ti dans ROOTAB. */ -/* GSSTAB(i,k) : Table des coefficients d' integration par la */ -/* methode de Gauss : i varie de 0 a NBPNTS et */ -/* k varie de 0 a NDGJAC-2*(JORDRE+1). */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIM : Dimension of the space. */ +/* NDGJAC : Max Degree of the polynom of approximation. */ +/* The representation in the orthogonal base starts from degree */ +/* 0 to degree NDGJAC-2*(JORDRE+1). The polynomial base */ +/* is the base of Jacobi of order -1 (Legendre), 0, 1 and 2 */ +/* IORDRE : Order of the base of Jacobi (-1,0,1 or 2). Corresponds */ +/* to step of constraints, C0,C1 or C2. */ +/* NBPNTS : Degree of the polynom of Legendre on the roots which of */ +/* are calculated the coefficients of integration by */ +/* Gauss method. It is required to set NBPNTS=30,40,50 or 61 */ +/* and NDGJAC < NBPNTS. */ +/* SOMTAB : Table of F(ti)+F(-ti) with ti in ROOTAB. */ +/* DIFTAB : Table of F(ti)-F(-ti) with ti in ROOTAB. */ +/* GSSTAB(i,k) : Table of coefficients of integration by the Gauss method : */ +/* i varies from 0 to NBPNTS and */ +/* k varies from 0 to NDGJAC-2*(JORDRE+1). */ + +/* OUTPUT ARGUMENTSE : */ /* ------------------- */ -/* CRVJAC : Courbe d' approximation de FONCNP avec eventuellement -*/ -/* prise en compte des contraintes aux extremites. */ -/* Cette courbe est de degre NDGJAC. */ +/* CRVJAC : Curve of approximation of FONCNP with eventually */ +/* taking into account of constraints at the extremities. */ +/* This curve is of degree NDGJAC. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 11-04-1989 : RBD ; Creation. */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ +/* ------------------------------- */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ crvjac_dim1 = *ndgjac + 1; @@ -7999,7 +7655,7 @@ int mmmapcoe_(integer *ndim, i__1 = *ndim; for (nd = 1; nd <= i__1; ++nd) { -/* ----------------- Calcul des coefficients de degre pair ---------- +/* ----------------- Calculate the coefficients of even degree ---------- ---- */ i__2 = *ndgjac; @@ -8016,7 +7672,7 @@ int mmmapcoe_(integer *ndim, /* L200: */ } -/* --------------- Calcul des coefficients de degre impair ---------- +/* --------------- Calculate the coefficients of uneven degree ---------- ---- */ i__2 = *ndgjac; @@ -8036,9 +7692,8 @@ int mmmapcoe_(integer *ndim, /* L100: */ } -/* ------- Ajout des termes lies a la racine supplementaire (0.D0) ------ -*/ -/* ----------- du polynome de Legendre de degre impair NBPNTS ----------- +/* ------- Add terms connected to the supplementary root (0.D0) ------ */ +/* ----------- of Legendre polynom of uneven degree NBPNTS ----------- */ if (*nbpnts % 2 == 0) { @@ -8090,49 +7745,43 @@ int mmaperm_(integer *ncofmx, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule la racine carree de l' erreur quadratique moyenne */ -/* d' approximation faite lorsque l' on ne conserve que les */ -/* premiers NCFNEW coefficients d' une courbe de degre NCOEFF-1 */ -/* ecrite dans la base de Jacobi NORMALISEE d' ordre */ -/* 2*(IORDRE+1). */ +/* Calculate the square root of the average quadratic error */ +/* of approximation done when only the */ +/* first NCFNEW coefficients of a curve of degree NCOEFF-1 */ +/* written in NORMALIZED Jacobi base of order 2*(IORDRE+1) are preserved. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* LEGENDRE,POLYGONE,APPROXIMATION,ERREUR. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Degre maximum de la courbe. */ -/* NDIM : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 de la courbe. */ -/* IORDRE : Ordre de contrainte de continuite aux extremites. */ -/* CRVJAC : La courbe dont on veut baisser le degre. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ - -/* ARGUMENTS DE SORTIE : */ +/* NCOFMX : Maximum degree of the curve. */ +/* NDIM : Dimension of the space. */ +/* NCOEFF : Degree +1 of the curve. */ +/* IORDRE : Order of constraint of continuity at the extremities. */ +/* CRVJAC : The curve the degree which of will be lowered. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* ERRMOY : La precision moyenne de l' approximation. */ +/* ERRMOY : Average precision of approximation. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 23-12-1989 : RBD ; Creation */ - /* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ crvjac_dim1 = *ncofmx; @@ -8145,7 +7794,7 @@ int mmaperm_(integer *ncofmx, AdvApp2Var_SysBase::mgenmsg_("MMAPERM", 7L); } -/* --------- Degre minimum pouvant etre atteint : Arret a 1 ou IA ------- +/* --------- Minimum degree that can be reached : Stop at 1 or IA ------- */ ia = (*iordre + 1) << 1; @@ -8154,10 +7803,8 @@ int mmaperm_(integer *ncofmx, ncfcut = *ncfnew + 1; } -/* -------------- Elimination des coefficients de haut degre ------------ -*/ -/* ----------- Boucle sur la serie de Jacobi :NCFCUT --> NCOEFF --------- -*/ +/* -------------- Elimination of coefficients of high degree ------------ */ +/* ----------- Loop on the series of Jacobi :NCFCUT --> NCOEFF --------- */ *errmoy = 0.; bid = 0.; @@ -8172,7 +7819,7 @@ int mmaperm_(integer *ncofmx, /* L100: */ } -/* ----------- Racine carree de l' erreur quadratique moyenne ----------- +/* ----------- Square Root of average quadratic error e ----------- */ bid /= 2.; @@ -8207,164 +7854,51 @@ int AdvApp2Var_ApproxF2var::mmapptt_(const integer *ndgjac, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Charge les elements necessaires a une integration par la */ -/* methode de Gauss pour obtenir les coefficients dans la base de -*/ -/* Legendre de l' approximation par les moindres carres d' une */ -/* fonction. les elements sont stockes dans les communs MMAPGSS */ -/* (cas sans contrainte), MMAPGS0 (contraintes C0), MMAPGS1 */ -/* (contraintes C1) et MMAPGS2 (contraintes C2). */ - -/* MOTS CLES : */ +/* Load the elements required for integration by */ +/* Gauss method to obtain the coefficients in the base of +/* Legendre of the approximation by the least squares of a */ +/* function. The elements are stored in commons MMAPGSS */ +/* (case without constraint), MMAPGS0 (constraints C0), MMAPGS1 */ +/* (constraints C1) and MMAPGS2 (constraints C2). */ + +/* KEYWORDS : */ /* ----------- */ /* INTEGRATION,GAUSS,JACOBI */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDGJAC : Degre maxi du polynome d' approximation. La */ -/* representation dans la base orthogonale part du degre -*/ -/* 0 au degre NDGJAC-2*(JORDRE+1). La base polynomiale */ -/* est la base de Jacobi d' ordre -1 (Legendre), 0, 1 */ -/* et 2 */ -/* NBPNTS : Degre du polynome de Legendre sur les racines duquel */ -/* sont calcules les coefficients d' integration par la */ -/* methode de Gauss. On doit avoir NBPNTS=8,10,15,20,25, -*/ -/* 30,40,50 ou 61 et NDGJAC < NBPNTS. */ -/* JORDRE : Ordre de la base de Jacobi (-1,0,1 ou 2). Correspond */ -/* a pas de contraintes, contraintes C0,C1 ou C2. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDGJAC : Max degree of the polynom of approximation. */ +/* The representation in orthogonal base goes from degree +/* 0 to degree NDGJAC-2*(JORDRE+1). The polynomial base */ +/* is the base of Jacobi of order -1 (Legendre), 0, 1 and 2 */ +/* NBPNTS : Degree of the polynom of Legendre on the roots which of */ +/* are calculated the coefficients of integration by the */ +/* method of Gauss. It is required that NBPNTS=8,10,15,20,25, */ +/* 30,40,50 or 61 and NDGJAC < NBPNTS. */ +/* JORDRE : Order of the base of Jacobi (-1,0,1 or 2). Corresponds */ +/* to step of constraints C0,C1 or C2. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CGAUSS(i,k) : Table des coefficients d' integration par la */ -/* methode de Gauss : i varie de 0 a la partie */ -/* entiere de NBPNTS/2 et k varie de 0 a */ -/* NDGJAC-2*(JORDRE+1). */ -/* Ce sont donc les coeff. d'integration associes */ -/* aux racines positives du polynome de Legendre de -*/ -/* degre NBPNTS. CGAUSS(0,k) contient les coeff. */ -/* d'integration associes a la racine t = 0 lorsque -*/ -/* NBPNTS est impair. */ -/* IERCOD : Code d' erreur. */ +/* CGAUSS(i,k) : Table of coefficients of integration by */ +/* Gauss method : i varies from 0 to the integer part */ +/* of NBPNTS/2 and k varies from 0 to NDGJAC-2*(JORDRE+1). */ +/* These are the coeff. of integration associated to */ +/* positive roots of the polynom of Legendre of degree */ +/* NBPNTS. CGAUSS(0,k) contains coeff. */ +/* of integration associated to root t = 0 when */ +/* NBPNTS is uneven. */ +/* IERCOD : Error code. */ /* = 0 OK, */ -/* = 11 NBPNTS ne vaut pas 8,10,15,20,25,30,40,50 ou 61. -*/ -/* = 21 JORDRE ne vaut pas -1,0,1 ou 2. */ -/* = 31 NDGJAC est trop grand ou trop petit. */ +/* = 11 NBPNTS is not 8,10,15,20,25,30,40,50 or 61. */ +/* = 21 JORDRE is not -1,0,1 or 2. */ +/* = 31 NDGJAC is too great or too small. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* MMAPGSS,MMAPGS0,MMAPGS1,MMAPGS2. */ - -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 12-03-93 : MPS ; Ajout des valeurs 8,10,15,20,25 pour */ -/* le nombre de points d'integration */ -/* 13-05-91 : RBD ; Ajout commentaires. */ -/* 03-03-90 : NAK ; Includes. */ -/* 21-04-87 : RBD ; Creation. */ -/* > */ -/* ********************************************************************** -*/ -/* Le nom de la routine */ - - -/* *********************************************************************** - */ - -/* FONCTION : */ -/* ---------- */ - -/* MOTS CLES : */ -/* ----------- */ - -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* INITIALISATION : BLOCK DATA */ -/* FONCTION D'ACCES SEULEMENT : MMAPPTT */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 12-03-93 : MPS ; Modification des parametres IPTGSS et IP0GSS */ -/* 02-03-90 : NAK ; Creation version originale */ -/* > */ - -/* *********************************************************************** - */ - -/* FONCTION : */ -/* ---------- */ - -/* MOTS CLES : */ -/* ----------- */ - -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* INITIALISATION : BLOCK DATA */ -/* FONCTION D'ACCES SEULEMENT : MMAPPTT */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 12-03-93: MPS ; Modification des parametres IPTGS0 et IP0GS0 */ -/* 02-03-90 : NAK ; Creation version originale */ -/* > */ -/* *********************************************************************** - */ - -/* *********************************************************************** - */ - -/* FONCTION : */ -/* ---------- */ - -/* MOTS CLES : */ -/* ----------- */ - -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* INITIALISATION : BLOCK DATA */ -/* FONCTION D'ACCES SEULEMENT : MMAPPTT */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 12-03-93 : MPS ; Modification des parametres IPTGS1 etIP0GS1 */ -/* 02-03-90 : NAK ; Creation version originale */ -/* > */ -/* *********************************************************************** - */ - - -/* *********************************************************************** - */ - -/* FONCTION : */ -/* ---------- */ - -/* MOTS CLES : */ -/* ----------- */ - -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* INITIALISATION : BLOCK DATA */ -/* FONCTION D'ACCES SEULEMENT : MMAPPTT */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 12-03-93 : MPS ; Modification des parametres IPTGS2 et IP0GS2 */ -/* 02-03-90 : NAK ; Creation version originale */ -/* > */ - /* *********************************************************************** */ /* Parameter adjustments */ @@ -8377,7 +7911,7 @@ int AdvApp2Var_ApproxF2var::mmapptt_(const integer *ndgjac, } *iercod = 0; -/* ------------------- Tests sur la validite des entrees ---------------- +/* ------------------- Tests on the validity of inputs ---------------- */ infdg = (*jordre + 1) << 1; @@ -8395,7 +7929,7 @@ int AdvApp2Var_ApproxF2var::mmapptt_(const integer *ndgjac, goto L9300; } -/* --------------- Calcul du pointeur de debut suivant NBPNTS ----------- +/* --------------- Calculation of the start pointer following NBPNTS ----------- */ iptdb = 0; @@ -8432,7 +7966,7 @@ int AdvApp2Var_ApproxF2var::mmapptt_(const integer *ndgjac, ipdb0 = ipdb0 + (24 - infdg) / 2 + 1; } -/* ------------------ Choix du commun en fonction de JORDRE ------------- +/* ------------------ Choice of the common depending on JORDRE ------------- */ if (*jordre == -1) { @@ -8448,7 +7982,7 @@ int AdvApp2Var_ApproxF2var::mmapptt_(const integer *ndgjac, goto L4000; } -/* ---------------- Commun MMAPGSS (cas sans contraintes) ---------------- +/* ---------------- Common MMAPGSS (case without constraints) ---------------- */ L1000: @@ -8461,7 +7995,7 @@ L1000: (char *)&cgauss[kjac * cgauss_dim1 + 1]); /* L100: */ } -/* --> Cas ou le nbre de points est impair. */ +/* --> Case when the number of points is uneven. */ if (*nbpnts % 2 == 1) { iptt = ipdb0; i__1 = *ndgjac; @@ -8478,7 +8012,7 @@ L1000: } goto L9999; -/* ---------------- Commun MMAPGS0 (cas avec contraintes C0) ------------- +/* ---------------- Common MMAPGS0 (case with constraints C0) ------------- */ L2000: @@ -8492,7 +8026,7 @@ L2000: (char *)&cgauss[kjac * cgauss_dim1 + 1]); /* L200: */ } -/* --> Cas ou le nbre de points est impair. */ +/* --> Case when the number of points is uneven. */ if (*nbpnts % 2 == 1) { iptt = ipdb0; i__1 = mxjac; @@ -8509,7 +8043,7 @@ L2000: } goto L9999; -/* ---------------- Commun MMAPGS1 (cas avec contraintes C1) ------------- +/* ---------------- Common MMAPGS1 (case with constraints C1) ------------- */ L3000: @@ -8523,7 +8057,7 @@ L3000: (char *)&cgauss[kjac * cgauss_dim1 + 1]); /* L300: */ } -/* --> Cas ou le nbre de points est impair. */ +/* --> Case when the number of points is uneven. */ if (*nbpnts % 2 == 1) { iptt = ipdb0; i__1 = mxjac; @@ -8540,7 +8074,7 @@ L3000: } goto L9999; -/* ---------------- Commun MMAPGS2 (cas avec contraintes C2) ------------- +/* ---------------- Common MMAPGS2 (case with constraints C2) ------------- */ L4000: @@ -8554,7 +8088,7 @@ L4000: (char *)&cgauss[kjac * cgauss_dim1 + 1]); /* L400: */ } -/* --> Cas ou le nbre de points est impair. */ +/* --> Cas of uneven number of points. */ if (*nbpnts % 2 == 1) { iptt = ipdb0; i__1 = mxjac; @@ -8571,17 +8105,17 @@ L4000: } goto L9999; -/* ------------------------- Recuperation du code d' erreur -------------- +/* ------------------------- Return the error code -------------- */ -/* --> NBPNTS n' est pas bon */ +/* --> NBPNTS is not OK */ L9100: *iercod = 11; goto L9999; -/* --> JORDRE n' est pas bon */ +/* --> JORDRE is not OK */ L9200: *iercod = 21; goto L9999; -/* --> NDGJAC n' est pas bon */ +/* --> NDGJAC is not OK */ L9300: *iercod = 31; goto L9999; @@ -8626,45 +8160,41 @@ int mmjacpt_(const integer *ndimen, /* FONCTION : */ /* ---------- */ -/* Passage de la base canonique a la base de Jacobi pour */ -/* un "carreau" dans un espace de dimension qcq. */ +/* Passage from canonical to Jacobi base for a */ +/* "square" in a space of arbitrary dimension. */ /* MOTS CLES : */ /* ----------- */ -/* LISSAGE,BASE,LEGENDRE */ +/* SMOOTHING,BASE,LEGENDRE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFU : Degre+1 en U. */ -/* NCOEFV : Degre+1 en V. */ -/* IORDRU : Ordre des polynomes de Jacobi en U. */ -/* IORDRV : Ordre des polynomes de Jacobi en V. */ -/* PTCLGD : Le carreau dans la base de Jacobi. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN : Dimension of the space. */ +/* NCOEFU : Degree+1 by U. */ +/* NCOEFV : Degree+1 by V. */ +/* IORDRU : Order of Jacobi polynoms by U. */ +/* IORDRV : Order of Jacobi polynoms by V. */ +/* PTCLGD : The square in the Jacobi base. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PTCAUX : Espace auxilliaire. */ -/* PTCCAN : Le carreau dans la base canonique (-1,1) */ +/* PTCAUX : Auxilliary space. */ +/* PTCCAN : The square in the canonic base (-1,1) */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* APPLIED REFERENCES : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Annule et remplace MJACPC */ +/* Cancels and replaces MJACPC */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 03-08-1989 : RBD; Creation. */ -/* > */ /* ********************************************************************* */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -8688,7 +8218,7 @@ int mmjacpt_(const integer *ndimen, AdvApp2Var_SysBase::mgenmsg_("MMJACPT", 7L); } -/* Passage dans canonique en u. */ +/* Passage into canonical by u. */ kdim = *ndimen * *ncoefv; AdvApp2Var_MathBase::mmjaccv_((integer *)ncoefu, @@ -8698,7 +8228,7 @@ int mmjacpt_(const integer *ndimen, (doublereal *)&ptcaux[ptcaux_offset], (doublereal *)&ptccan[ptccan_offset]); -/* Permutation des u et des v. */ +/* Swapping of u and v. */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { @@ -8716,7 +8246,7 @@ int mmjacpt_(const integer *ndimen, /* L300: */ } -/* Passage dans canonique en v. */ +/* Passage into canonical by v. */ kdim = *ndimen * *ncoefu; AdvApp2Var_MathBase::mmjaccv_((integer *)ncoefv, @@ -8726,7 +8256,7 @@ int mmjacpt_(const integer *ndimen, (doublereal *)&ptccan[ptccan_offset], (doublereal *)&ptcaux[(((ptcaux_dim3 << 1) + 1) * ptcaux_dim2 + 1) * ptcaux_dim1 + 1]); -/* Permutation des u et des v. */ +/* Swapping of u and v. */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { diff --git a/src/AdvApp2Var/AdvApp2Var_Context.cxx b/src/AdvApp2Var/AdvApp2Var_Context.cxx index 45047ec561..eb4cd65169 100755 --- a/src/AdvApp2Var/AdvApp2Var_Context.cxx +++ b/src/AdvApp2Var/AdvApp2Var_Context.cxx @@ -2,50 +2,44 @@ // Created: Tue Jul 2 10:31:42 1996 // Author: Joelle CHAUVET // -// Modified: Mon Dec 9 11:39:13 1996 -// by: Joelle CHAUVET -// G1135 : empty constructor -// G1134 : option 0 for precision code -// by PMN -// PRO9093 on remplace MA1NPB par une gestion contextuelle -// pour determiner le degree de Jacobbi. + #include #include #include -// Calcul des parametres +// Calculaton of parameters static Standard_Boolean lesparam(const Standard_Integer iordre, const Standard_Integer ncflim, const Standard_Integer icodeo, Standard_Integer& nbpnts, Standard_Integer& ndgjac) { - // degree de jacobi - ndgjac = ncflim; // il toujours garder un coeff en reserve + // jacobi degree + ndgjac = ncflim; // it always keeps a reserve coefficient if (icodeo< 0) return Standard_False; if (icodeo > 0) { - ndgjac += (9 - (iordre+1)); //iordre decale les frequences vers le haut + ndgjac += (9 - (iordre+1)); //iordre rescales the frequences upwards ndgjac += (icodeo-1)*10; } - // ---> Nbre mini de points necessaires. + // ---> Min Number of required pointss. if (ndgjac < 8) { nbpnts = 8; } else if (ndgjac < 10) { nbpnts = 10; } - // else if (ndgjac < 15) { nbpnt = 15; } Bug Nombre impairs + // else if (ndgjac < 15) { nbpnt = 15; } Bug Uneven number else if (ndgjac < 20) { nbpnts = 20;} - // else if (ndgjac < 25) { nbpnt = 25; } Bug Nombre impairs + // else if (ndgjac < 25) { nbpnt = 25; } Bug Uneven number else if (ndgjac < 30) { nbpnts = 30;} else if (ndgjac < 40) { nbpnts = 40;} else if (ndgjac < 50) { nbpnts = 50;} - // else if (*ndgjac < 61) { nbpnt = 61;} Bug Nombre impairs + // else if (*ndgjac < 61) { nbpnt = 61;} Bug Uneven number else { nbpnts = 50; #if DEB - cout << "F(U, V) : Pas assez de point de discretisation" << endl; + cout << "F(U, V) : Not enough points of discretization" << endl; #endif } - // Si contraintes aux bords, cela fait 2 points de plus + // If constraints are on borders, this adds 2 points if (iordre>-1) { nbpnts += 2;} return Standard_True; diff --git a/src/AdvApp2Var/AdvApp2Var_Iso.cxx b/src/AdvApp2Var/AdvApp2Var_Iso.cxx index c073f50ed1..506a210b7b 100755 --- a/src/AdvApp2Var/AdvApp2Var_Iso.cxx +++ b/src/AdvApp2Var/AdvApp2Var_Iso.cxx @@ -103,26 +103,26 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions, AdvApp2Var_Node& NodeBegin, AdvApp2Var_Node& NodeEnd) { -// les valeurs fixes +// fixed values Standard_Integer NBCRMX=1, NBCRBE; -// les donnees stockees dans le Context +// data stored in the Context Standard_Integer NDIMEN, NBSESP, NDIMSE; NDIMEN = Conditions.TotalDimension(); NBSESP = Conditions.TotalNumberSSP(); -// Attention : ne marche que pour le 3D +// Attention : works only in 3D NDIMSE = 3; -// le domaine de la grille +// the domain of the grid Standard_Real UVFONC[4]; UVFONC[0] = U0; UVFONC[1] = U1; UVFONC[2] = V0; UVFONC[3] = V1; -// les donnees relatives a l'iso a approcher +// data related to the processed iso Standard_Integer IORDRE = myExtremOrder, IDERIV = myDerivOrder; Standard_Real TCONST = myConstPar; -// les donnees relatives au type de l'iso +// data related to the type of the iso Standard_Integer ISOFAV,NBROOT,NDGJAC,NCFLIM; Standard_Real TABDEC[2]; Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots(); @@ -162,7 +162,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions, //#endif } -// les donnees relatives a la position de l'iso (frontiere ou ligne de decoupe) +// data relative to the position of iso (front or cut line) Handle (TColStd_HArray1OfReal) HEPSAPR = new TColStd_HArray1OfReal(1,NBSESP); Standard_Integer iesp; switch(myPosition) { @@ -195,7 +195,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions, Standard_Real *EPSAPR = (Standard_Real *) &HEPSAPR ->ChangeArray1()(HEPSAPR ->Lower()); -// les tableaux des approximations +// the tables of approximations Standard_Integer SZCRB = NDIMEN*NCFLIM; Handle (TColStd_HArray1OfReal) HCOURBE = new TColStd_HArray1OfReal(1,SZCRB*(IDERIV+1)); @@ -233,13 +233,13 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions, (HERRMOY ->LowerRow(),HERRMOY ->LowerCol()); Standard_Real *EMYAPP = new Standard_Real[NBSESP]; // -// les approximations +// the approximations // Standard_Integer IERCOD=0, NCOEFF=0; Standard_Integer iapp,ncfapp,ierapp; // Standard_Integer id,ic,ideb; for (iapp=0;iapp<=IDERIV;iapp++) { -// approximation de la derivee d'ordre iapp +// approximation of the derivative of order iapp ncfapp = 0; ierapp = 0; // GCC 3.0 would not accept this line without the void @@ -271,7 +271,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions, EMXAPP, EMYAPP, &ierapp); -// gestion des erreurs et du nombre de coeff. +// error and coefficient management. if (ierapp>0) { myApprIsDone = Standard_False; myHasResult = Standard_False; @@ -279,7 +279,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions, } if (NCOEFF<=ncfapp) NCOEFF=ncfapp; if (ierapp==-1) IERCOD = -1; -// recuperation des contraintes d'ordre 0 a IORDRE aux extremites +// return constraints of order 0 to IORDRE of extremities Standard_Integer ider, jpos=HCONTR1->Lower(); for (ider=0; ider<=IORDRE;ider++) { gp_Pnt pt(HCONTR1->Value(jpos), @@ -306,25 +306,25 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions, } jpos+=3; } -// recuperation des erreurs +// return errors for (iesp=1; iesp<=NBSESP;iesp++) { HERRMAX->SetValue(iesp,iapp+1,EMXAPP[iesp-1]); HERRMOY->SetValue(iesp,iapp+1,EMYAPP[iesp-1]); } -// passage a l'approximation d'ordre superieur +// passage to the approximation of higher order CRBAPP += SZCRB; SOMAPP += SZTAB; DIFAPP += SZTAB; } -// gestion des resultats +// management of results if (IERCOD == 0) { -// toutes les approx. sont bonnes +// all approximations are correct myApprIsDone = Standard_True; myHasResult = Standard_True; } else if (IERCOD == -1) { -// une approx. au moins n'est pas bonne +// at least one approximation is not correct myApprIsDone = Standard_False; myHasResult = Standard_True; } diff --git a/src/AdvApp2Var/AdvApp2Var_MathBase.cxx b/src/AdvApp2Var/AdvApp2Var_MathBase.cxx index bc760db1a9..d8f91e87e4 100755 --- a/src/AdvApp2Var/AdvApp2Var_MathBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_MathBase.cxx @@ -265,40 +265,32 @@ int AdvApp2Var_MathBase::mdsptpt_(integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* CALCULE LA DISTANCE ENTRE DEUX POINTS */ +/* CALCULATE DISTANCE BETWEEN TWO POINTS */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* DISTANCE,POINT. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace. */ -/* POINT1: Tableau des coordonnees du 1er point. */ -/* POINT2: Tableau des coordonnees du 2eme point. */ +/* NDIMEN: Space Dimension. */ +/* POINT1: Table of coordinates of the 1st point. */ +/* POINT2: Table of coordinates of the 2nd point. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* DISTAN: Distance des 2 points. */ +/* DISTAN: Distance between 2 points. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 21-07-94 : PMN ; La valeur seuil pour alloc passe de 3 a 100 */ -/* 15-07-93 : PMN ; Protection des points... */ -/* 08-09-90 : DHU ; Utilisation de MZSNORM */ -/* 18-07-88 : RBD ; AJOUT D' UN EN TETE STANDARD */ -/* ??-??-?? : XXX ; CREATION */ /* > */ /* ********************************************************************** */ @@ -306,11 +298,11 @@ int AdvApp2Var_MathBase::mdsptpt_(integer *ndimen, /* *********************************************************************** */ -/* INITIALISATIONS */ +/* INITIALISATION */ /* *********************************************************************** */ - /* Parameter adjustments */ + /* Parameter adjustment */ --point2; --point1; @@ -328,7 +320,7 @@ int AdvApp2Var_MathBase::mdsptpt_(integer *ndimen, AdvApp2Var_SysBase::mcrrqst_(&c__8, ndimen, differ, &iofset, &ier); } -/* --- Si l'allocation est refuse, on applique la methode trivial */ +/* --- If allocation is refused, the trivial method is applied. */ if (ier > 0) { @@ -341,7 +333,7 @@ int AdvApp2Var_MathBase::mdsptpt_(integer *ndimen, } *distan = sqrt(*distan); -/* --- Sinon on utilise MZSNORM pour minimiser les risques d'overflow +/* --- Otherwise MZSNORM is used to minimize the risks of overflow */ } else { @@ -357,11 +349,11 @@ int AdvApp2Var_MathBase::mdsptpt_(integer *ndimen, /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ -/* --- Desallocation dynamique */ +/* --- Dynamic Desallocation */ if (iofset != 0) { AdvApp2Var_SysBase::mcrdelt_(&c__8, ndimen, differ, &iofset, &ier); @@ -423,51 +415,46 @@ int AdvApp2Var_MathBase::mmapcmp_(integer *ndim, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Compression de la courbe CRVOLD en un tableau comprenant */ -/* les coeff. de rang pair : CRVNEW(*,0,*) */ -/* et de rang impair : CRVNEW(*,1,*). */ +/* Compression of curve CRVOLD in a table of */ +/* coeff. of even : CRVNEW(*,0,*) */ +/* and uneven range : CRVNEW(*,1,*). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* COMPRESSION,COURBE. */ +/* COMPRESSION,CURVE. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIM : Dimension de l' espace. */ -/* NCOFMX : Le nbre maximum de coeff. de la courbe a compacter. */ -/* NCOEFF : Le nbre maximum de coeff. de la courbe compactee. */ -/* CRVOLD : La courbe (0:NCOFMX-1,NDIM) a compacter. */ +/* NDIM : Space Dimension. */ +/* NCOFMX : Max nb of coeff. of the curve to compress. */ +/* NCOEFF : Max nb of coeff. of the compressed curve. */ +/* CRVOLD : The curve (0:NCOFMX-1,NDIM) to compress. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CRVNEW : La coube compactee en (0:(NCOEFF-1)/2,0,NDIM) (contenant +/* CRVNEW : Curve compacted in (0:(NCOEFF-1)/2,0,NDIM) (containing */ -/* les termes pairs) et en (0:(NCOEFF-1)/2,1,NDIM) */ -/* (contenant les termes impairs). */ +/* even terms) and in (0:(NCOEFF-1)/2,1,NDIM) */ +/* (containing uneven terms). */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Cette routine est utile pour preparer les coefficients d' une */ -/* courbe dans une base orthogonale (Legendre ou Jacobi) avant de */ -/* calculer les coefficients dans la base canonique [-1,1] par */ +/* This routine is useful to prepare coefficients of a */ +/* curve in an orthogonal base (Legendre or Jacobi) before */ +/* calculating the coefficients in the canonical; base [-1,1] by */ /* MMJACAN. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 12-04-1989 : RBD ; Creation. */ -/* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ crvold_dim1 = *ncofmx; @@ -546,50 +533,45 @@ int mmaper0_(integer *ncofmx, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule l' erreur d' approximation maxi faite lorsque l' on */ -/* ne conserve que les premiers NCFNEW coefficients d' une courbe +/* Calculate the max error of approximation done when */ +/* only the first NCFNEW coefficients of a curve are preserved. */ -/* de degre NCOEFF-1 ecrite dans la base de Legendre (Jacobi */ -/* d' ordre 0). */ +/* Degree NCOEFF-1 written in the base of Legendre (Jacobi */ +/* of order 0). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LEGENDRE,POLYGONE,APPROXIMATION,ERREUR. */ +/* LEGENDRE,POLYGON,APPROXIMATION,ERROR. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Degre maximum de la courbe. */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 de la courbe. */ -/* CRVLGD : La courbe dont on veut baisser le degre. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* NCOFMX : Max. degree of the curve. */ +/* NDIMEN : Space dimension. */ +/* NCOEFF : Degree +1 of the curve. */ +/* CRVLGD : Curve the degree which of should be lowered. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* YCVMAX : Tableau auxiliaire (erreur max sur chaque dimension). +/* YCVMAX : Auxiliary Table (max error on each dimension). */ -/* ERRMAX : La precision de l' approximation. */ +/* ERRMAX : Precision of the approximation. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 08-08-1991: RBD; Creation. */ -/* > */ /* *********************************************************************** */ -/* ------------------- Init pour calcul d' erreur ----------------------- +/* ------------------- Init to calculate an error ----------------------- */ /* Parameter adjustments */ @@ -605,7 +587,7 @@ int mmaper0_(integer *ncofmx, /* L100: */ } -/* ------ Degre minimum pouvant etre atteint : Arret a 1 ou NCFNEW ------ +/* ------ Minimum that can be reached : Stop at 1 or NCFNEW ------ */ ncut = 1; @@ -613,14 +595,14 @@ int mmaper0_(integer *ncofmx, ncut = *ncfnew + 1; } -/* -------------- Elimination des coefficients de haut degre ----------- +/* -------------- Elimination of high degree coefficients----------- */ -/* ----------- Boucle sur la serie de Legendre: NCUT --> NCOEFF -------- +/* ----------- Loop on the series of Legendre: NCUT --> NCOEFF -------- */ i__1 = *ncoeff; for (ii = ncut; ii <= i__1; ++ii) { -/* Facteur de renormalisation (Maximum de Li(t)). */ +/* Factor of renormalization (Maximum of Li(t)). */ bidon = ((ii - 1) * 2. + 1.) / 2.; bidon = sqrt(bidon); @@ -633,7 +615,7 @@ int mmaper0_(integer *ncofmx, /* L300: */ } -/* -------------- L'erreur est la norme du vecteur erreur --------------- +/* -------------- The error is the norm of the vector error --------------- */ *errmax = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]); @@ -733,48 +715,40 @@ int mmaper2_(integer *ncofmx, /* FONCTION : */ /* ---------- */ -/* Calcule l' erreur d' approximation maxi faite lorsque l' on */ +/* Calculate max approximation error i faite lorsque l' on */ /* ne conserve que les premiers NCFNEW coefficients d' une courbe */ /* de degre NCOEFF-1 ecrite dans la base de Jacobi d' ordre 2. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* JACOBI,POLYGONE,APPROXIMATION,ERREUR. */ - -/* ARGUMENTS D'ENTREE : */ +/* JACOBI, POLYGON, APPROXIMATION, ERROR. */ +/* +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Degre maximum de la courbe. */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 de la courbe. */ -/* CRVJAC : La courbe dont on veut baisser le degre. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* NCOFMX : Max. degree of the curve. */ +/* NDIMEN : Space dimension. */ +/* NCOEFF : Degree +1 of the curve. */ +/* CRVLGD : Curve the degree which of should be lowered. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* YCVMAX : Tableau auxiliaire (erreur max sur chaque dimension). +/* YCVMAX : Auxiliary Table (max error on each dimension). */ -/* ERRMAX : La precision de l' approximation. */ +/* ERRMAX : Precision of the approximation. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 12-02-1992: RBD; Correction d'indice de lecture de XMAXJ */ -/* 08-08-1991: RBD; Creation. */ -/* > */ -/* *********************************************************************** - */ -/* ------------------ Table des maximums de (1-t2)*Ji(t) ---------------- +/* ------------------ Table of maximums of (1-t2)*Ji(t) ---------------- */ /* Parameter adjustments */ @@ -787,7 +761,7 @@ int mmaper2_(integer *ncofmx, -/* ------------------- Init pour calcul d' erreur ----------------------- +/* ------------------- Init for error calculation ----------------------- */ i__1 = *ndimen; @@ -796,7 +770,7 @@ int mmaper2_(integer *ncofmx, /* L100: */ } -/* ------ Degre minimum pouvant etre atteint : Arret a 3 ou NCFNEW ------ +/* ------ Min. Degree that can be attained : Stop at 3 or NCFNEW ------ */ idec = 3; @@ -804,14 +778,14 @@ int mmaper2_(integer *ncofmx, i__1 = idec, i__2 = *ncfnew + 1; ncut = max(i__1,i__2); -/* -------------- Elimination des coefficients de haut degre ----------- +/* -------------- Removal of coefficients of high degree ----------- */ -/* ----------- Boucle sur la serie de Jacobi :NCUT --> NCOEFF ---------- +/* ----------- Loop on the series of Jacobi :NCUT --> NCOEFF ---------- */ i__1 = *ncoeff; for (ii = ncut; ii <= i__1; ++ii) { -/* Facteur de renormalisation. */ +/* Factor of renormalization. */ bidon = xmaxj[ii - idec]; i__2 = *ndimen; for (nd = 1; nd <= i__2; ++nd) { @@ -822,7 +796,7 @@ int mmaper2_(integer *ncofmx, /* L300: */ } -/* -------------- L'erreur est la norme du vecteur erreur --------------- +/* -------------- The error is the norm of the vector error --------------- */ *errmax = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]); @@ -923,50 +897,44 @@ int mmaper4_(integer *ncofmx, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule l' erreur d' approximation maxi faite lorsque l' on */ -/* ne conserve que les premiers NCFNEW coefficients d' une courbe +/* Calculate the max. error of approximation made when */ +/* only first NCFNEW coefficients of a curve are preserved */ -/* de degre NCOEFF-1 ecrite dans la base de Jacobi d' ordre 4. */ - -/* MOTS CLES : */ +/* degree NCOEFF-1 is written in the base of Jacobi of order 4. */ +/* KEYWORDS : */ /* ----------- */ -/* JACOBI,POLYGONE,APPROXIMATION,ERREUR. */ +/* LEGENDRE,POLYGON,APPROXIMATION,ERROR. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Degre maximum de la courbe. */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 de la courbe. */ -/* CRVJAC : La courbe dont on veut baisser le degre. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* NCOFMX : Max. degree of the curve. */ +/* NDIMEN : Space dimension. */ +/* NCOEFF : Degree +1 of the curve. */ +/* CRVJAC : Curve the degree which of should be lowered. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* YCVMAX : Tableau auxiliaire (erreur max sur chaque dimension). +/* YCVMAX : Auxiliary Table (max error on each dimension). */ -/* ERRMAX : La precision de l' approximation. */ +/* ERRMAX : Precision of the approximation. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ + -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 12-02-1992: RBD; Correction d'indice de lecture de XMAXJ */ -/* 08-08-1991: RBD; Creation. */ -/* > */ /* *********************************************************************** */ -/* ---------------- Table des maximums de ((1-t2)2)*Ji(t) --------------- +/* ---------------- Table of maximums of ((1-t2)2)*Ji(t) --------------- */ /* Parameter adjustments */ @@ -979,7 +947,7 @@ int mmaper4_(integer *ncofmx, -/* ------------------- Init pour calcul d' erreur ----------------------- +/* ------------------- Init for error calculation ----------------------- */ i__1 = *ndimen; @@ -988,7 +956,7 @@ int mmaper4_(integer *ncofmx, /* L100: */ } -/* ------ Degre minimum pouvant etre atteint : Arret a 5 ou NCFNEW ------ +/* ------ Min. Degree that can be attained : Stop at 5 or NCFNEW ------ */ idec = 5; @@ -996,14 +964,14 @@ int mmaper4_(integer *ncofmx, i__1 = idec, i__2 = *ncfnew + 1; ncut = max(i__1,i__2); -/* -------------- Elimination des coefficients de haut degre ----------- +/* -------------- Removal of high degree coefficients ----------- */ -/* ----------- Boucle sur la serie de Jacobi :NCUT --> NCOEFF ---------- +/* ----------- Loop on the series of Jacobi :NCUT --> NCOEFF ---------- */ i__1 = *ncoeff; for (ii = ncut; ii <= i__1; ++ii) { -/* Facteur de renormalisation. */ +/* Factor of renormalisation. */ bidon = xmaxj[ii - idec]; i__2 = *ndimen; for (nd = 1; nd <= i__2; ++nd) { @@ -1014,12 +982,12 @@ int mmaper4_(integer *ncofmx, /* L300: */ } -/* -------------- L'erreur est la norme du vecteur erreur --------------- +/* -------------- The error is the norm of the error vector --------------- */ *errmax = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]); -/* --------------------------------- Fin -------------------------------- +/* --------------------------------- End -------------------------------- */ return 0; @@ -1107,51 +1075,43 @@ int mmaper6_(integer *ncofmx, /* *********************************************************************** */ - -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule l' erreur d' approximation maxi faite lorsque l' on */ -/* ne conserve que les premiers NCFNEW coefficients d' une courbe +/* Calculate the max. error of approximation made when */ +/* only first NCFNEW coefficients of a curve are preserved */ -/* de degre NCOEFF-1 ecrite dans la base de Jacobi d' ordre 6. */ - -/* MOTS CLES : */ +/* degree NCOEFF-1 is written in the base of Jacobi of order 6. */ +/* KEYWORDS : */ /* ----------- */ -/* JACOBI,POLYGONE,APPROXIMATION,ERREUR. */ +/* JACOBI,POLYGON,APPROXIMATION,ERROR. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Degre maximum de la courbe. */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 de la courbe. */ -/* CRVJAC : La courbe dont on veut baisser le degre. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* NCOFMX : Max. degree of the curve. */ +/* NDIMEN : Space dimension. */ +/* NCOEFF : Degree +1 of the curve. */ +/* CRVJAC : Curve the degree which of should be lowered. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* YCVMAX : Tableau auxiliaire (erreur max sur chaque dimension). +/* YCVMAX : Auxiliary Table (max error on each dimension). */ -/* ERRMAX : La precision de l' approximation. */ +/* ERRMAX : Precision of the approximation. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 12-02-1992: RBD; Correction d'indice de lecture de XMAXJ */ -/* 08-08-1991: RBD; Creation. */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* > */ /* *********************************************************************** */ -/* ---------------- Table des maximums de ((1-t2)3)*Ji(t) --------------- +/* ---------------- Table of maximums of ((1-t2)3)*Ji(t) --------------- */ /* Parameter adjustments */ @@ -1164,7 +1124,7 @@ int mmaper6_(integer *ncofmx, -/* ------------------- Init pour calcul d' erreur ----------------------- +/* ------------------- Init for error calculation ----------------------- */ i__1 = *ndimen; @@ -1173,7 +1133,7 @@ int mmaper6_(integer *ncofmx, /* L100: */ } -/* ------ Degre minimum pouvant etre atteint : Arret a 3 ou NCFNEW ------ +/* ------ Min Degree that can be attained : Stop at 3 or NCFNEW ------ */ idec = 7; @@ -1181,14 +1141,14 @@ int mmaper6_(integer *ncofmx, i__1 = idec, i__2 = *ncfnew + 1; ncut = max(i__1,i__2); -/* -------------- Elimination des coefficients de haut degre ----------- +/* -------------- Removal of high degree coefficients ----------- */ -/* ----------- Boucle sur la serie de Jacobi :NCUT --> NCOEFF ---------- +/* ----------- Loop on the series of Jacobi :NCUT --> NCOEFF ---------- */ i__1 = *ncoeff; for (ii = ncut; ii <= i__1; ++ii) { -/* Facteur de renormalisation. */ +/* Factor of renormalization. */ bidon = xmaxj[ii - idec]; i__2 = *ndimen; for (nd = 1; nd <= i__2; ++nd) { @@ -1199,12 +1159,12 @@ int mmaper6_(integer *ncofmx, /* L300: */ } -/* -------------- L'erreur est la norme du vecteur erreur --------------- +/* -------------- The error is the norm of the vector error --------------- */ *errmax = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]); -/* --------------------------------- Fin -------------------------------- +/* --------------------------------- END -------------------------------- */ return 0; @@ -1234,52 +1194,42 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, /* ********************************************************************** */ - -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcule l' erreur d' approximation maxi faite lorsque l' on */ -/* ne conserve que les premiers NCFNEW coefficients d' une courbe +/* Calculate the max. error of approximation made when */ +/* only first NCFNEW coefficients of a curve are preserved */ -/* de degre NCOEFF-1 ecrite dans la base de Jacobi d' ordre */ -/* IORDRE. */ - -/* MOTS CLES : */ +/* degree NCOEFF-1 is written in the base of Jacobi of order IORDRE. */ +/* KEYWORDS : */ /* ----------- */ -/* JACOBI,LEGENDRE,POLYGONE,APPROXIMATION,ERREUR. */ +/* JACOBI,LEGENDRE,POLYGON,APPROXIMATION,ERROR. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Degre maximum de la courbe. */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 de la courbe. */ -/* IORDRE : Ordre de continuite aux extremites. */ -/* CRVJAC : La courbe dont on veut baisser le degre. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ - -/* ARGUMENTS DE SORTIE : */ +/* NCOFMX : Max. degree of the curve. */ +/* NDIMEN : Space dimension. */ +/* NCOEFF : Degree +1 of the curve. */ +/* IORDRE : Order of continuity at the extremities. */ +/* CRVJAC : Curve the degree which of should be lowered. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* YCVMAX : Tableau auxiliaire. */ -/* ERRMAX : La precision de l' approximation. */ +/* YCVMAX : Auxiliary Table (max error on each dimension). +*/ +/* ERRMAX : Precision of the approximation. */ /* IERCOD = 0, OK */ -/* = 1, L'ordre des contraintes (IORDRE) n'est pas dans */ -/* les valeurs autorisees. */ - -/* COMMONS UTILISES : */ +/* = 1, order of constraints (IORDRE) is not within the */ +/* autorized values. */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Annule et remplace MMAPERR. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 08-08-91: RBD; Creation d'apres MMAPERR, utilisation des nouveaux -*/ -/* majorants, appel aux MMAPER0, 2, 4 et 6. */ -/* > */ +/* Canceled and replaced MMAPERR. */ /* *********************************************************************** */ @@ -1292,7 +1242,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, /* Function Body */ *iercod = 0; -/* --> L'ordre des polynomes de Jacobi */ +/* --> Order of Jacobi polynoms */ jord = ( *iordre + 1) << 1; if (jord == 0) { @@ -1349,87 +1299,69 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Creation de la courbe C2(v) definie sur (0,1) identique a la */ -/* courbe C1(u) definie sur (U0,U1) (changement du parametre d' une */ -/* courbe). */ +/* Creation of curve C2(v) defined on (0,1) identic to */ +/* curve C1(u) defined on (U0,U1) (change of parameter */ +/* of a curve). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LIMITATION, RESTRICTION, COURBE */ +/* LIMITATION, RESTRICTION, CURVE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMAX : Dimensionnement de l' espace. */ -/* NDIMEN : Dimension de la courbe. */ -/* NCOEFF : Nbre de coefficients de la courbe. */ -/* CRVOLD : La courbe a limiter. */ -/* UPARA0 : Borne min de l' intervalle de restriction de la courbe. +/* NDIMAX : Space Dimensioning. */ +/* NDIMEN : Curve Dimension. */ +/* NCOEFF : Nb of coefficients of the curve. */ +/* CRVOLD : Curve to be limited. */ +/* UPARA0 : Min limit of the interval limiting the curve. */ -/* UPARA1 : Borne max de l' intervalle de restriction de la courbe. +/* UPARA1 : Max limit of the interval limiting the curve. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CRVNEW : La courbe relimitee, definie dans (0,1) et egale a */ -/* CRVOLD definie dans (U0,U1). */ +/* CRVNEW : Relimited curve, defined on (0,1) and equal to */ +/* CRVOLD defined on (U0,U1). */ /* IERCOD : = 0, OK */ -/* =10, Nbre de coeff. <1 ou > 61. */ +/* =10, Nb of coeff. <1 or > 61. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ - -/* .Neant. */ - -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* MAERMSG MCRFILL MVCVIN2 */ /* MVCVINV */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ---> L' algorithme employe dans le cas general est base sur le */ -/* principe suivant : */ -/* Soient S(t) = a0 + a1*t + a2*t**2 + ... de degre NCOEFF-1, et */ -/* U(t) = b0 + b1*t, on calcule alors les coeff. de */ -/* S(U(t)) de proche en proche a l' aide du tableau TBAUX. */ -/* A chaque etape numero N (N=2 a NCOEFF), TBAUX(n) contient le */ -/* n-ieme coefficient de U(t)**N pour n=1 a N. (RBD) */ +/* ---> Algorithm used in this general case is based on the */ +/* following principle : */ +/* Let S(t) = a0 + a1*t + a2*t**2 + ... of degree NCOEFF-1, and */ +/* U(t) = b0 + b1*t, then the coeff. of */ +/* S(U(t)) are calculated step by step with help of table TBAUX. */ +/* At each step number N (N=2 to NCOEFF), TBAUX(n) contains */ +/* the n-th coefficient of U(t)**N for n=1 to N. (RBD) */ /* ---> Reference : KNUTH, 'The Art of Computer Programming', */ /* Vol. 2/'Seminumerical Algorithms', */ /* Ex. 11 p:451 et solution p:562. (RBD) */ -/* ---> L' ecrasement de l' argument d' entree CRVOLD par CRVNEW est */ -/* possible, c' est a dire que l' appel : */ +/* ---> Removal of the input argument CRVOLD by CRVNEW is */ +/* possible, which means that the call : */ /* CALL MMARC41(NDIMAX,NDIMEN,NCOEFF,CURVE,UPARA0,UPARA1 */ /* ,CURVE,IERCOD) */ -/* est tout a fait LEGAL. (RBD) */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 18-09-1995 : JMF ; Verfor + implicit none */ -/* 18-10-88 : RBD ; Documentation de la FONCTION. */ -/* 24-06-88 : RBD ; Refonte totale du code pour le cas general : */ -/* optimisation et suppression du commun des CNP */ -/* qui ne sert plus. */ -/* 22-06-88 : NAK ; TRAITEMENT DES CAS PARTICULIERS SIMPLES ET */ -/* FREQUENTS. */ -/* 22-02-1988 : JJM ; Appel MFNDEB -> MNFNDEB. */ -/* 22-02-1988 : JJM ; Appel GERMSG -> MAERMSG. */ -/* 26-07-1985 : Remplacement de CAUX par CRVNEW, ajout du */ -/* common MBLANK. */ -/* 28-11-1985 : Creation JJM (NDIMAX en plus). */ +/* is absolutely LEGAL. (RBD) */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ -/* Tableau auxiliaire des coefficients de (UPARA1-UPARA0)T+UPARA0 a */ -/* la puissance N=1 a NCOEFF-1. */ +/* Auxiliary table of coefficients of (UPARA1-UPARA0)T+UPARA0 */ +/* with power N=1 to NCOEFF-1. */ /* Parameter adjustments */ @@ -1444,7 +1376,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, *iercod = 0; /* ********************************************************************** */ -/* CAS OU LE TRAITEMENT NE PEUT ETRE FAIT */ +/* CASE WHEN PROCESSING CAN'T BE DONE */ /* ********************************************************************** */ if (*ncoeff > 61 || *ncoeff < 1) { @@ -1453,7 +1385,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, } /* ********************************************************************** */ -/* SI PAS DE CHANGEMENT */ +/* IF NO CHANGES */ /* ********************************************************************** */ if (*ndimen == *ndimax && *upara0 == 0. && *upara1 == 1.) { @@ -1465,7 +1397,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, } /* ********************************************************************** */ -/* INVERSION 3D : TRAITEMENT RAPIDE */ +/* INVERSION 3D : FAST PROCESSING */ /* ********************************************************************** */ if (*upara0 == 1. && *upara1 == 0.) { @@ -1476,7 +1408,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, } /* ****************************************************************** **** */ -/* INVERSION 2D : TRAITEMENT RAPIDE */ +/* INVERSION 2D : FAST PROCESSING */ /* ****************************************************************** **** */ if (*ndimen == 2 && *ndimax == 2 && *ncoeff <= 21) { @@ -1487,10 +1419,10 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, } /* ********************************************************************** */ -/* TRAITEMENT GENERAL */ +/* GENERAL PROCESSING */ /* ********************************************************************** */ -/* -------------------------- Initialisations --------------------------- +/* -------------------------- Initializations --------------------------- */ i__1 = *ndimen; @@ -1504,13 +1436,13 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, tbaux[0] = *upara0; tbaux[1] = *upara1 - *upara0; -/* ----------------------- Calcul des coeff. de CRVNEW ------------------ +/* ----------------------- Calculation of coeff. of CRVNEW ------------------ */ i__1 = *ncoeff - 1; for (ncf = 2; ncf <= i__1; ++ncf) { -/* ------------ Prise en compte du NCF-ieme coeff. de CRVOLD -------- +/* ------------ Take into account NCF-th coeff. of CRVOLD -------- ---- */ i__2 = ncf - 1; @@ -1533,7 +1465,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, /* L500: */ } -/* --------- Calcul des (NCF+1) coeff. de ((U1-U0)*t + U0)**(NCF) --- +/* --------- Calculate (NCF+1) coeff. of ((U1-U0)*t + U0)**(NCF) --- ---- */ bid = *upara1 - *upara0; @@ -1547,7 +1479,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, /* L200: */ } -/* -------------- Prise en compte du dernier coeff. de CRVOLD ----------- +/* -------------- Take into account the last coeff. of CRVOLD ----------- */ i__1 = *ncoeff - 1; @@ -1611,56 +1543,48 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, /* ********************************************************************** -*/ - -/* FONCTION : */ +*//* FUNCTION : */ /* ---------- */ -/* Creation de la courbe C2(v) definie sur [U0,U1] identique a */ -/* la courbe C1(u) definie sur [-1,1] (changement du parametre */ -/* d' une courbe) avec INVERSION des indices du tableau resultat. */ +/* Creation of curve C2(v) defined on [U0,U1] identic to */ +/* curve C1(u) defined on [-1,1] (change of parameter */ +/* of a curve) with INVERSION of indices of the resulting table. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LIMITATION GENERALISEE,RESTRICTION,INVERSION,COURBE */ +/* GENERALIZED LIMITATION, RESTRICTION, INVERSION, CURVE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMAX : Dimensionnement maximal de l' espace. */ -/* NDIM : Dimension de la courbe. */ -/* NCOEFF : Nbre de coefficients de la courbe. */ -/* CRVOLD : La courbe a limiter. */ -/* U0 : Borne min de l' intervalle de restriction de la courbe. */ -/* U1 : Borne max de l' intervalle de restriction de la courbe. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMAX : Maximum Space Dimensioning. */ +/* NDIMEN : Curve Dimension. */ +/* NCOEFF : Nb of coefficients of the curve. */ +/* CRVOLD : Curve to be limited. */ +/* U0 : Min limit of the interval limiting the curve. +*/ +/* U1 : Max limit of the interval limiting the curve. +*/ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CRVNEW : La courbe relimitee, definie dans [U0,U1] et egale a */ -/* CRVOLD definie dans [-1,1]. */ +/* CRVNEW : Relimited curve, defined on [U0,U1] and equal to */ +/* CRVOLD defined on [-1,1]. */ /* IERCOD : = 0, OK */ -/* =10, Nbre de coeff. <1 ou > 61. */ -/* =13, L' intervalle de variation demande est nul. */ - -/* COMMONS UTILISES : */ +/* =10, Nb of coeff. <1 or > 61. */ +/* =13, the requested interval of variation is null. */ +/* COMMONS USED : */ /* ---------------- */ - -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* REFERENCES CALLED : */ +/* ---------------------- */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 21-11-1989 : RBD ; Correction Trait. general parametre X1. */ -/* 12-04-1989 : RBD ; Creation d' apres MMARC41. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ -/* Tableau auxiliaire des coefficients de X1*T+X0 a */ -/* la puissance N=1 a NCOEFF-1. */ +/* Auxiliary table of coefficients of X1*T+X0 */ +/* with power N=1 to NCOEFF-1. */ /* Parameter adjustments */ @@ -1677,7 +1601,7 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, AdvApp2Var_SysBase::mgenmsg_("MMARCIN", 7L); } -/* On teste au zero machine que l' intervalle d' arrivee n' est pas nul */ +/* At zero machine it is tested if the output interval is not null */ AdvApp2Var_MathBase::mmveps3_(&eps3); if ((d__1 = *u1 - *u0, abs(d__1)) < eps3) { @@ -1688,7 +1612,7 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, /* ********************************************************************** */ -/* CAS OU LE TRAITEMENT NE PEUT ETRE FAIT */ +/* CASE WHEN THE PROCESSING IS IMPOSSIBLE */ /* ********************************************************************** */ if (*ncoeff > 61 || *ncoeff < 1) { @@ -1697,8 +1621,8 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, } /* ********************************************************************** */ -/* SI PAS DE CHANGEMENT DE L' INTERVALLE DE DEFINITION */ -/* (SEULEMENT INVERSION DES INDICES DU TABLEAU CRVOLD) */ +/* IF NO CHANGE OF THE INTERVAL OF DEFINITION */ +/* (ONLY INVERSION OF INDICES OF TABLE CRVOLD) */ /* ********************************************************************** */ if (*ndim == *ndimax && *u0 == -1. && *u1 == 1.) { @@ -1708,7 +1632,7 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, } /* ********************************************************************** */ -/* CAS OU LE NOUVEL INTERVALLE DE DEFINITION EST [0,1] */ +/* CASE WHEN THE NEW INTERVAL OF DEFINITION IS [0,1] */ /* ********************************************************************** */ if (*u0 == 0. && *u1 == 1.) { @@ -1718,10 +1642,10 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, } /* ********************************************************************** */ -/* TRAITEMENT GENERAL */ +/* GENERAL PROCESSING */ /* ********************************************************************** */ -/* -------------------------- Initialisations --------------------------- +/* -------------------------- Initialization --------------------------- */ x0 = -(*u1 + *u0) / (*u1 - *u0); @@ -1737,13 +1661,13 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, tabaux[0] = x0; tabaux[1] = x1; -/* ----------------------- Calcul des coeff. de CRVNEW ------------------ +/* ----------------------- Calculation of coeff. of CRVNEW ------------------ */ i__1 = *ncoeff - 1; for (ncf = 2; ncf <= i__1; ++ncf) { -/* ------------ Prise en compte du NCF-ieme coeff. de CRVOLD -------- +/* ------------ Take into account the NCF-th coeff. of CRVOLD -------- ---- */ i__2 = ncf - 1; @@ -1766,7 +1690,7 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, /* L500: */ } -/* --------- Calcul des (NCF+1) coeff. de [X1*t + X0]**(NCF) -------- +/* --------- Calculation of (NCF+1) coeff. of [X1*t + X0]**(NCF) -------- ---- */ tabaux[ncf] = tabaux[ncf - 1] * x1; @@ -1779,7 +1703,7 @@ int AdvApp2Var_MathBase::mmarcin_(integer *ndimax, /* L200: */ } -/* -------------- Prise en compte du dernier coeff. de CRVOLD ----------- +/* -------------- Take into account the last coeff. of CRVOLD ----------- */ i__1 = *ncoeff - 1; @@ -1841,62 +1765,52 @@ int mmatvec_(integer *nligne, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* EFFECUE LE PRODUIT MATRICE VECTEUR OU LA MATRICE EST SOUS FORME */ -/* DE PROFIL */ +/* Produce vector matrix in form of profile */ /* MOTS CLES : */ /* ----------- */ -/* RESERVE, MATRICE, PRODUIT, VECTEUR, PROFIL */ +/* RESERVE, MATRIX, PRODUCT, VECTOR, PROFILE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* NLIGNE : NOMBRE DE LIGNE DE LA MATRICE DES CONTRAINTES */ -/* NCOLON :NOMBRE DE COLONNE DE LA MATRICE DES CONTRAINTES */ -/* GNSTOC: NOMBRE DE COEFFICIENTS DANS LE PROFILE de la matrice */ +/* NLIGNE : Line number of the matrix of constraints */ +/* NCOLON : Number of column of the matrix of constraints */ +/* GNSTOC: Number of coefficients in the profile of matrix GMATRI */ + +/* GPOSIT: Table of positioning of terms of storage */ +/* GPOSIT(1,I) contains the number of terms-1 on the line I +/* in the profile of the matrix. */ +/* GPOSIT(2,I) contains the index of storage of diagonal term*/ +/* of line I */ +/* GPOSIT(3,I) contains the index of column of the first term of */ +/* profile of line I */ +/* GNSTOC: Number of coefficients in the profile of matrix */ /* GMATRI */ - -/* GPOSIT: TABLE DE POSITIONNEMENT DES TERMES DE STOCKAGE */ -/* GPOSIT(1,I) CONTIENT LE NOMBRE DE TERMES-1 SUR LA LIGNE -*/ -/* I DANS LE PROFIL DE LA MATRICE */ -/* GPOSIT(2,I) CONTIENT L'INDICE DE STOCKAGE DU TERME DIAGONA -L*/ -/* DE LA LIGNE I */ -/* GPOSIT(3,I) CONTIENT L'INDICE COLONE DU PREMIER TERME DU -*/ -/* PROFIL DE LA LIGNE I */ -/* GNSTOC: NOMBRE DE COEFFICIENTS DANS LE PROFILE de la matrice */ -/* GMATRI */ -/* GMATRI : MATRICE DES CONTRAINTES SOUS FORME DE PROFIL */ -/* VECIN : VECTEUR ENTRE */ -/* DEBLIG : INDICE DE LIGNE A PARTIR DUQUEL ON VEUT CALCULER */ -/* LE PRODUIT MATRICE VECTEUR */ -/* ARGUMENTS DE SORTIE : */ +/* GMATRI : Matrix of constraints in form of profile */ +/* VECIN : Input vector */ +/* DEBLIG : Line indexusing which the vector matrix is calculated */ +/* +/* OUTPUT ARGUMENTS */ /* --------------------- */ -/* VECOUT : VECTEUR PRODUIT */ +/* VECOUT : VECTOR PRODUCT */ -/* IERCOD : CODE D'ERREUR */ +/* IERCOD : ERROR CODE */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 22-09-95 : ...; ECRITURE VERSION ORIGINALE. */ -/* > */ /* *********************************************************************** */ /* DECLARATIONS */ @@ -1926,7 +1840,7 @@ L*/ /* *********************************************************************** */ -/* TRAITEMENT */ +/* Processing */ /* *********************************************************************** */ AdvApp2Var_SysBase::mvriraz_((integer *)nligne, @@ -1953,7 +1867,7 @@ L*/ /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ /* *********************************************************************** */ @@ -1962,7 +1876,7 @@ L*/ /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -1999,54 +1913,35 @@ int AdvApp2Var_MathBase::mmbulld_(integer *nbcoln, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* TRI PAR BULLE DES COLONNES D'UN TABLEAU D'ENTIER DANS LE SENS */ -/* CROISSANT */ - -/* MOTS CLES : */ +/* Parsing of columns of a table of integers in increasing order */ +/* KEYWORDS : */ /* ----------- */ -/* POINT-ENTREE, TRI, BULLE */ - -/* ARGUMENTS D'ENTREE : */ +/* POINT-ENTRY, PARSING */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* - NBCOLN : NOMBRE DE COLONNES DU TABLEAU */ -/* - NBLIGN : NOMBRE DE LIGNE DU TABLEAU */ -/* - DTABTR : TABLEAU D'ENTIER A TRIER */ -/* - NUMCLE : POSITION DE LA CLE SUR LA COLONNE */ +/* - NBCOLN : Number of columns in the table */ +/* - NBLIGN : Number of lines in the table */ +/* - DTABTR : Table of integers to be parsed */ +/* - NUMCLE : Position of the key on the column */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* - DTABTR : TABLEAU TRIE */ +/* - DTABTR : Parsed table */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* PARTICULIEREMENT PERFORMANT LORSQUE LE TABLEAU EST PRESQUE TRIE */ -/* Dans le cas contraire il vaut mieux utiliser MVSHELD */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 25-09-1995: PMN; ECRITURE VERSION ORIGINALE d'apres MBULLE */ -/* > */ -/* *********************************************************************** - */ -/* DECLARATIONS */ -/* *********************************************************************** - */ - - - -/* *********************************************************************** - */ -/* INITIALISATIONS */ +/* Particularly performant if the table is almost parsed */ +/* In the opposite case it is better to use MVSHELD */ /* *********************************************************************** */ @@ -2066,15 +1961,15 @@ int AdvApp2Var_MathBase::mmbulld_(integer *nbcoln, /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ -/* ---->ALGORITHME EN N^2 / 2 ITERATION AU PLUS */ +/* ---->ALGORITHM in N^2 / 2 additional iteration */ while(nchan != 0) { -/* ----> PARCOURS DE GAUCHE A DROITE */ +/* ----> Parsing from left to the right */ nchan = 0; i__1 = nite1; @@ -2095,7 +1990,7 @@ int AdvApp2Var_MathBase::mmbulld_(integer *nbcoln, } --nite1; -/* ----> PARCOURS DE DROITE A GAUCHE */ +/* ----> Parsing from right to the left */ if (nchan != 0) { nchan = 0; @@ -2124,16 +2019,15 @@ int AdvApp2Var_MathBase::mmbulld_(integer *nbcoln, /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ /* *********************************************************************** */ -/* ----> PAS D'ERREURS EN APPELANT DES FONCTIONS, ON A UNIQUEMENT DES */ -/* TESTS ET DES BOUCLES. */ +/* ----> No errors at calling functions, only tests and loops. */ /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -2172,52 +2066,52 @@ int AdvApp2Var_MathBase::mmcdriv_(integer *ndimen, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* CALCUL DE LA MATRICE D'UNE COURBE DERIVEE D' ORDRE IDERIV. */ -/* AVEC PARAMETRES D' ENTRE DISTINCT DES PARAMETRES DE SORTIE. */ +/* Calculate matrix of a derivate curve of order IDERIV. */ +/* with input parameters other than output parameters. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* COEFFICIENTS,COURBE,DERIVEE I-EME. */ +/* COEFFICIENTS,CURVE,DERIVATE I-EME. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN : Dimension de l'espace (2 ou 3 en general) */ -/* NCOEFF : Le degre +1 de la courbe. */ -/* COURBE : Tableau des coefficients de la courbe. */ -/* IDERIV : Ordre de derivation demande : 1=derivee 1ere, etc... */ +/* NDIMEN : Space dimension (2 or 3 in general) */ +/* NCOEFF : Degree +1 of the curve. */ +/* COURBE : Table of coefficients of the curve. */ +/* IDERIV : Required order of derivation : 1=1st derivate, etc... */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* NCOFDV : Le degre +1 de la derivee d' ordre IDERIV de la courbe. */ -/* CRVDRV : Tableau des coefficients de la derivee d' ordre IDERIV */ -/* de la courbe. */ +/* NCOFDV : Degree +1 of the derivative of order IDERIV of the curve. */ +/* CRVDRV : Table of coefficients of the derivative of order IDERIV */ +/* of the curve. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ---> Il est possible de prendre comme argument de sortie la courbe */ -/* et le nombre de coeff passes en entree en faisant : */ +/* ---> It is possible to take as output argument the curve */ +/* and the number of coeff passed at input by making : */ /* CALL MMCDRIV(NDIMEN,NCOEFF,COURBE,IDERIV,NCOEFF,COURBE). */ -/* Apres cet appel, NCOEFF doone le nbre de coeff de la courbe */ -/* derivee dont les coefficients sont stockes dans COURBE. */ -/* Attention alors aux coefficients de COURBE de rang superieur a */ -/* NCOEFF : il ne sont pas mis a zero. */ +/* After this call, NCOEFF does the number of coeff of the derived */ +/* curve the coefficients which of are stored in CURVE. */ +/* Attention to the coefficients of CURVE of rank superior to */ +/* NCOEFF : they are not set to zero. */ -/* ---> Algorithme : */ -/* Le code ci dessous a ete ecrit a partir de l' algorithme suivant: +/* ---> Algorithm : */ +/* The code below was written basing on the following algorithm: */ -/* Soit P(t) = a1 + a2*t + ... an*t**n. La derivee d' ordre k de P */ -/* (comportant n-k coefficients) est calculee ainsi : */ +/* Let P(t) = a1 + a2*t + ... an*t**n. Derivate of order k of P */ +/* (containing n-k coefficients) is calculated as follows : */ /* Pk(t) = a(k+1)*CNP(k,k)*k! */ /* + a(k+2)*CNP(k+1,k)*k! * t */ @@ -2225,48 +2119,34 @@ int AdvApp2Var_MathBase::mmcdriv_(integer *ndimen, /* . */ /* . */ /* + a(n)*CNP(n-1,k)*k! * t**(n-k-1). */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 09-01-90 : TE ; COMMON MCCNP -> MMCMCNP.INC & INDICES DES CNP */ -/* 07-10-88 : RBD; Creation. */ -/* > */ /* *********************************************************************** */ -/* -------------- Cas ou l' ordre de derivee est plus ------------------- +/* -------------- Case when the order of derivative is ------------------- */ -/* ---------------- grand que le degre de la courbe --------------------- +/* ---------------- greater than the degree of the curve --------------------- */ /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a fournir les coefficients du binome (triangle de Pascal). */ +/* Serves to provide the coefficients of binome (Pascal's triangle). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* Coeff du binome de 0 a 60. read only . init par block data */ +/* Binomial coeff from 0 to 60. read only . init par block data */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Les coefficients du binome forment une matrice triangulaire. */ -/* On complete cette matrice dans le tableau CNP par sa transposee. */ -/* On a donc: CNP(I,J) = CNP(J,I) pour I et J = 0, ..., 60. */ +/* Binomial coefficients form a triangular matrix. */ +/* This matrix is completed in table CNP by its transposition. */ +/* So: CNP(I,J) = CNP(J,I) for I and J = 0, ..., 60. */ -/* L'initialisation est faite a partir du block-data MMLLL09.RES, */ -/* cree par le programme MQINICNP.FOR (voir l'equipe (AC) ). */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 03-07-90 : RBD; Ajout commentaires (nom du block-data). */ -/* 19-06-90 : RBD; Le commun MMCMCNP remplace MCCNP qui est obsolete. -*/ -/* 08-01-90 : TE ; CREATION */ -/* > */ +/* Initialization is done by block-data MMLLL09.RES, */ +/* created by program MQINICNP.FOR). */ /* ********************************************************************** */ @@ -2295,10 +2175,10 @@ int AdvApp2Var_MathBase::mmcdriv_(integer *ndimen, } /* ********************************************************************** */ -/* Traitement general */ +/* General processing */ /* ********************************************************************** */ -/* --------------------- Calcul de Factorielle(IDERIV) ------------------ +/* --------------------- Calculation of Factorial(IDERIV) ------------------ */ k = *ideriv; @@ -2309,10 +2189,10 @@ int AdvApp2Var_MathBase::mmcdriv_(integer *ndimen, /* L50: */ } -/* ------------ Calcul des coeff de la derivee d' ordre IDERIV ---------- +/* ------------ Calculation of coeff of the derived of order IDERIV ---------- */ -/* ---> Attention : le coefficient binomial C(n,m) est represente dans */ -/* MCCNP par CNP(N+1,M+1). */ +/* ---> Attention : coefficient binomial C(n,m) is represented in */ +/* MCCNP by CNP(N+1,M+1). */ i__1 = *ncoeff; for (j = k + 1; j <= i__1; ++j) { @@ -2371,72 +2251,67 @@ int AdvApp2Var_MathBase::mmcglc1_(integer *ndimax, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Permet de calculer la longueur d'un arc de courbe POLYNOMIAL */ -/* sur un intervalle [A,B] quelconque. */ +/* Allows calculating the length of an arc of curve POLYNOMIAL */ +/* on an interval [A,B]. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LONGUEUR,COURBE,GAUSS,PRIVE. */ +/* LENGTH,CURVE,GAUSS,PRIVATE. */ -/* ARGUMENTS DD'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMAX : Nombre de lignes maximum des tableaux */ -/* (i.e. nbre maxi des polynomes). */ -/* NDIMEN : Dimension de l'espace (nbre de polynomes). */ -/* NCOEFF : Nombre de coefficients du polynome. C'est le degre + 1. -*/ -/* COURBE(NDIMAX,NCOEFF) : Coefficients de la courbe. */ -/* TDEBUT : Borne inferieure de l'intervalle d'integration pour */ -/* le calcul de la longueur. */ -/* TFINAL : Borne superieure de l'intervalle d'integration pour */ -/* le calcul de la longueur. */ -/* EPSILN : Precision DEMANDEE sur le calcul de la longueur. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMAX : Max. number of lines of tables */ +/* (i.e. max. nb of polynoms). */ +/* NDIMEN : Dimension of the space (nb of polynoms). */ +/* NCOEFF : Nb of coefficients of the polynom. This is degree + 1. +*/ +/* COURBE(NDIMAX,NCOEFF) : Coefficients of the curve. */ +/* TDEBUT : Lower limit of the interval of integration for */ +/* length calculation. */ +/* TFINAL : Upper limit of the interval of integration for */ +/* length calculation. */ +/* EPSILN : REQIRED precision for length calculation. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* XLONGC : Longueur de l'arc de courbe */ -/* ERREUR : Precision OBTENUE sur le calcul de la longueur. */ -/* IERCOD : Code d' erreur, 0 OK, >0 Erreur grave. */ -/* = 1 Trop d'iterations, on sort le meilleur resultat */ -/* calcule (a ERREUR pres) */ -/* = 2 Pb MMLONCV (pas de resultat) */ -/* = 3 NDIM ou NCOEFF invalides (pas de resultat) */ - -/* COMMONS UTILISES : */ +/* XLONGC : Length of the arc of curve */ +/* ERREUR : Precision OBTAINED for the length calculation. */ +/* IERCOD : Error code, 0 OK, >0 Serious error. */ +/* = 1 Too much iterations, the best calculated resultat */ +/* (is almost ERROR) */ +/* = 2 Pb MMLONCV (no result) */ +/* = 3 NDIM or NCOEFF invalid (no result) */ + +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Le polynome est en fait un ensemble de polynomes dont les */ -/* coefficients sont ranges dans un tableau a 2 indices, chaque */ -/* ligne etant relative a 1 polynome. */ -/* Le polynome est defini par ses coefficients ordonne par les */ -/* puissances croissantes de la variable. */ -/* Tous les polynomes ont le meme nombre de coefficients (donc le */ -/* meme degre). */ - -/* Ce programme annule et remplace LENGCV, MLONGC et MLENCV. */ - -/* ATTENTION : si TDEBUT > TFINAL, la longueur est alors NEGATIVE. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 22-04-1991: ALR; ITMAX en dur a 13 */ -/* 14-05-1990: RBD; Appel MITERR au lieu de MEPSNR pour ITMAX */ -/* 26-04-1990: RBD; Creation. */ +/* The polynom is actually a set of polynoms with */ +/* coefficients arranged in a table of 2 indices, */ +/* each line relative to the polynom. */ +/* The polynom is defined by these coefficients ordered */ +/* by increasing power of the variable. */ +/* All polynoms have the same number of coefficients (the */ +/* same degree). */ + +/* This program cancels and replaces LENGCV, MLONGC and MLENCV. */ + +/* ATTENTION : if TDEBUT > TFINAL, the length is NEGATIVE. */ + /* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ -/* ------------------------ Initialisation generale --------------------- +/* ------------------------ General Initialization --------------------- */ /* Parameter adjustments */ @@ -2454,43 +2329,40 @@ int AdvApp2Var_MathBase::mmcglc1_(integer *ndimax, *xlongc = 0.; *erreur = 0.; -/* ------ Test d'egalite des bornes */ +/* ------ Test of equity of limits */ if (*tdebut == *tfinal) { *iercod = 0; goto L9999; } -/* ------ Test de la dimension et du nombre de coefficients */ +/* ------ Test of the dimension and the number of coefficients */ if (*ndimen <= 0 || *ncoeff <= 0) { goto L9003; } -/* ------ Nbre de decoupe en cours, nbre d'iteration, */ -/* nbre max d'iterations */ +/* ----- Nb of current cutting, nb of iteration, */ +/* max nb of iterations */ ndec = 1; iter = 1; -/* ALR NE PAS APPELER DE NOMBRE D ITERATION VENANT */ -/* D'ON NE SAIT OU !! 8 EST MIS EN DUR EXPRES !! */ - itmax = 13; -/* ------ Variation du nombre d'intervalles */ -/* On multiplie par 2 a chaque iteration */ +/* ------ Variation of the nb of intervals */ +/* Multiplied by 2 at each iteration */ L5000: pas = (*tfinal - *tdebut) / ndec; sottc = 0.; -/* ------ Boucle sur tous les NDEC intervalles en cours */ +/* ------ Loop on all current NDEC intervals */ i__1 = ndec; for (kk = 1; kk <= i__1; ++kk) { -/* ------ Bornes de l'intervalle d'integration en cours */ +/* ------ Limits of the current integration interval */ tdeb = *tdebut + (kk - 1) * pas; tfin = tdeb + pas; @@ -2506,10 +2378,10 @@ L5000: } -/* ----------------- Test sur le nombre maximum d'iterations ------------ +/* ----------------- Test of the maximum number of iterations ------------ */ -/* Test si passe au moins 1 fois ** */ +/* Test if passes at least once ** */ if (iter == 1) { oldso = sottc; @@ -2518,23 +2390,23 @@ L5000: goto L5000; } else { -/* ------ Prise en compte du DIF - Test de convergence */ +/* ------ Take into account DIF - Test of convergence */ ++iter; dif = (d__1 = sottc - oldso, abs(d__1)); -/* ------ Si DIF est OK, on va sortir..., sinon: */ +/* ------ If DIF is OK, leave..., otherwise: */ if (dif > *epsiln) { -/* ------ Si nbre iteration depasse, on sort */ +/* ------ If nb iteration exceeded, leave */ if (iter > itmax) { *iercod = 1; goto L9000; } else { -/* ------ Sinon on continue en decoupant l'intervalle initial. +/* ------ Otherwise continue by cutting the initial interval. */ oldso = sottc; @@ -2552,13 +2424,13 @@ L9000: *erreur = dif; goto L9999; -/* ---> PB dans MMLONCV */ +/* ---> PB in MMLONCV */ L9002: *iercod = 2; goto L9999; -/* ---> NCOEFF ou NDIM invalides. */ +/* ---> NCOEFF or NDIM invalid. */ L9003: *iercod = 3; @@ -2604,49 +2476,44 @@ int mmchole_(integer *,//mxcoef, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- T */ -/* Effectue la decomposition de choleski de la matrice A en S.S */ -/* Calcul la matrice triangulaire inferieure S. */ +/* Produce decomposition of choleski of matrix A in S.S */ +/* Calculate inferior triangular matrix S. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* RESOLUTION, MFACTORISATION, MATRICE_PROFILE, CHOLESKI */ +/* RESOLUTION, MFACTORISATION, MATRIX_PROFILE, CHOLESKI */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* MXCOEF : Nombres maximale de termes dans le profile du hessien */ -/* DIMENS : Dimension du probleme */ -/* AMATRI(MXCOEF) : Coefficients du profil de la matrice */ -/* APOSIT(1,*) : Distance diagonnale-extrimite gauche de la ligne +/* MXCOEF : Max number of terms in the hessian profile */ +/* DIMENS : Dimension of the problem */ +/* AMATRI(MXCOEF) : Coefficients of the matrix profile */ +/* APOSIT(1,*) : Distance diagonal-left extremity of the line */ -/* APOSIT(2,*) : Position des termes diagonnaux dans HESSIE */ -/* POSUIV(MXCOEF): premiere ligne inferieure non hors profil */ +/* APOSIT(2,*) : Position of diagonal terms in HESSIE */ +/* POSUIV(MXCOEF) : first line inferior not out of profile */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* CHOMAT(MXCOEF) : Matrice triangulaire inferieure qui conserve */ -/* le profil de AMATRI. */ -/* IERCOD : code d'erreur */ +/* CHOMAT(MXCOEF) : Inferior triangular matrix preserving the */ +/* profile of AMATRI. */ +/* IERCOD : error code */ /* = 0 : ok */ -/* = 1 : Matrice non definie positive */ +/* = 1 : non-defined positive matrix */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ /* .Neant. */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* NIVEAU DE DEBUG = 4 */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 14-02-1994: PMN; ECRITURE VERSION ORIGINALE. */ -/* > */ +/* DEBUG LEVEL = 4 */ /* *********************************************************************** */ /* DECLARATIONS */ @@ -2676,7 +2543,7 @@ int mmchole_(integer *,//mxcoef, /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ @@ -2705,7 +2572,7 @@ int mmchole_(integer *,//mxcoef, i__ = posuiv[ptcou]; ptcou = aposit[(i__ << 1) + 2] - (i__ - j); -/* Calcul la somme de S .S pour k =1 a j-1 */ +/* Calculate the sum of S .S for k =1 a j-1 */ /* ik jk */ somme = 0.; /* Computing MAX */ @@ -2726,7 +2593,7 @@ int mmchole_(integer *,//mxcoef, /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ /* *********************************************************************** */ @@ -2736,7 +2603,7 @@ L9101: /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -2779,76 +2646,64 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul d' une courbe polynomiale verifiant des */ -/* contraintes de passages (interpolation) */ -/* de derivees premieres etc... aux extremites. */ -/* Les parametres aux extremites sont supposes etre -1 et 1. */ +/* Calculate a polynomial curve checking the */ +/* passage constraints (interpolation) */ +/* from first derivatives, etc... to extremities. */ +/* Parameters at the extremities are supposed to be -1 and 1. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, AB_SPECIFI::CONTRAINTES&,INTERPOLATION,&COURBE */ +/* ALL, AB_SPECIFI::CONSTRAINTS&,INTERPOLATION,&CURVE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOFMX : Nre de coeff. de la courbe CRVRES sur chaque */ +/* NDIMEN : Space Dimension. */ +/* NCOFMX : Nb of coeff. of curve CRVRES on each */ /* dimension. */ -/* NDERIV : Ordre de contrainte aux derivees : */ +/* NDERIV : Order of constraint with derivatives : */ /* 0 --> interpolation simple. */ -/* 1 --> interpolation+contraintes aux derivees 1eres. */ -/* 2 --> cas (0)+ (1) + " " " 2emes. */ +/* 1 --> interpolation+constraints with 1st. */ +/* 2 --> cas (0)+ (1) + " " 2nd derivatives. */ /* etc... */ -/* CTRTES : Tableau des contraintes. */ -/* CTRTES(*,1,*) = contraintes en -1. */ -/* CTRTES(*,2,*) = contraintes en 1. */ +/* CTRTES : Table of constraints. */ +/* CTRTES(*,1,*) = contraints at -1. */ +/* CTRTES(*,2,*) = contraints at 1. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CRVRES : La courbe resultat definie dans (-1,1). */ -/* TABAUX : Matrice auxilliaire. */ -/* XMATRI : Matrice auxilliaire. */ +/* CRVRES : Resulting curve defined on (-1,1). */ +/* TABAUX : Auxilliary matrix. */ +/* XMATRI : Auxilliary matrix. */ /* COMMONS UTILISES : */ /* ---------------- */ /* .Neant. */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* MAERMSG R*8 DFLOAT MGENMSG */ /* MGSOMSG MMEPS1 MMRSLW */ /* I*4 MNFNDEB */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Le polynome (ou la courbe) est calculee en resolvant un */ -/* systeme d' equations lineaires. Si le degre impose est grand */ -/* il est preferable de faire appel a une routine basee sur */ -/* l' interpolation de Lagrange ou d' Hermite suivant le cas. */ -/* (pour un degre eleve la matrice du systeme peut etre mal */ -/* conditionnee). */ -/* Cette routine retourne une courbe definie dans (-1,1). */ -/* Pour un cas general, il faut utiliser MCVCTG. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 18-09-1995 : JMF ; Verfor */ -/* 14-02-1990 : RBD ; Correction declaration de NOMPRG. */ -/* 12-04-1989 : RBD ; Suppression des chaines de caracteres pour */ -/* les appel a MMRSLW. */ -/* 31-05-1988 : JJM ; Reorganisation contraintes. */ -/* 22-02-1988 : JJM ; Appel MFNDEB -> MNFNDEB */ -/* 22-02-1988 : JJM ; Appel GERMSG -> MAERMSG */ -/* 24-11-1987 : Cree par RBD. */ - +/* The polynom (or the curve) is calculated by solving a */ +/* system of linear equations. If the imposed degree is great */ +/* it is preferable to call a routine based on */ +/* Lagrange or Hermite interpolation depending on the case. */ +/* (for a high degree the matrix of the system can be badly */ +/* conditionned). */ +/* This routine returns a curve defined in (-1,1). */ +/* In general case, it is necessary to use MCVCTG. */ /* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -2870,12 +2725,12 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, if (ibb >= 3) { AdvApp2Var_SysBase::mgenmsg_("MMCVCTX", 7L); } -/* Les precisions. */ +/* Precision. */ AdvApp2Var_MathBase::mmeps1_(&eps1); -/* ****************** CALCUL DES COEFFICIENTS PAIRS ********************* +/* ****************** CALCULATION OF EVEN COEFFICIENTS ********************* */ -/* ------------------------- Initialisation ----------------------------- +/* ------------------------- Initialization ----------------------------- */ nordr = *nderiv + 1; @@ -2885,7 +2740,7 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* L100: */ } -/* ---------------- Calcul des termes correspondants aux derivees ------- +/* ---------------- Calculation of terms corresponding to derivatives ------- */ i__1 = nordr; @@ -2899,7 +2754,7 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* L200: */ } -/* ------------------ Ecriture du deuxieme membre ----------------------- +/* ------------------ Writing the second member ----------------------- */ moup1 = 1; @@ -2916,7 +2771,7 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* L400: */ } -/* -------------------- Resolution du systeme --------------------------- +/* -------------------- Resolution of the system --------------------------- */ mmrslw_(&nordr, &nordr, ndimen, &eps1, &tabaux[tabaux_offset], &xmatri[ @@ -2935,9 +2790,9 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* L600: */ } -/* ***************** CALCUL DES COEFFICIENTS IMPAIRS ******************** +/* ***************** CALCULATION OF UNEVEN COEFFICIENTS ******************** */ -/* ------------------------- Initialisation ----------------------------- +/* ------------------------- Initialization ----------------------------- */ @@ -2947,7 +2802,7 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* L1100: */ } -/* ---------------- Calcul des termes correspondants aux derivees ------- +/* ---------------- Calculation of terms corresponding to derivatives ------- */ i__1 = nordr; @@ -2961,7 +2816,7 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* L1200: */ } -/* ------------------ Ecriture du deuxieme membre ----------------------- +/* ------------------ Writing of the second member ----------------------- */ moup1 = -1; @@ -2978,7 +2833,7 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* L1400: */ } -/* -------------------- Resolution du systeme --------------------------- +/* -------------------- Solution of the system --------------------------- */ mmrslw_(&nordr, &nordr, ndimen, &eps1, &tabaux[tabaux_offset], &xmatri[ @@ -3036,45 +2891,36 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Inversion des arguments de la courbe finale. */ +/* Inversion of arguments of the final curve. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LISSAGE,COURBE */ +/* SMOOTHING,CURVE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIM: Dimension de l' espace. */ -/* NCOEF: Degre du polynome. */ -/* CURVEO: La courbe avant inversion. */ +/* NDIM: Space Dimension. */ +/* NCOEF: Degree of the polynom. */ +/* CURVEO: The curve before inversion. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CURVE: La courbe apres inversion. */ +/* CURVE: The curve after inversion. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ - /* REFERENCES APPELEES : */ /* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 22-02-1988 : JJM ; Appel MFNDEB -> MNFNDEB */ -/* 15-07-1987: Cree par JJM. */ - -/* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* The name of the routine */ /* Parameter adjustments */ curve_dim1 = *ndimax; curve_offset = curve_dim1 + 1; @@ -3126,75 +2972,59 @@ int mmcvstd_(integer *ncofmx, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Transforme une courbe definie entre [-1,1] a [0,1]. */ +/* Transform curve defined between [-1,1] into [0,1]. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LIMITATION,RESTRICTION,COURBE */ +/* LIMITATION,RESTRICTION,CURVE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMAX : Dimensionnement de l' espace. */ -/* NDIMEN : Dimension de la courbe. */ -/* NCOEFF : Degre de la courbe. */ -/* CRVCAN(NCOFMX,NDIMEN): La courbe definie entre [-1,1]. */ +/* NDIMAX : Dimension of the space. */ +/* NDIMEN : Dimension of the curve. */ +/* NCOEFF : Degree of the curve. */ +/* CRVCAN(NCOFMX,NDIMEN): The curve is defined at the interval [-1,1]. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* COURBE(NDIMAX,NCOEFF): La courbe definie dans [0,1]. */ +/* CURVE(NDIMAX,NCOEFF): Curve defined at the interval [0,1]. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 09-01-90 : TE ; COMMON MCCNP -> MMCMCNP.INC & INDICES DES CNP */ -/* 12-04-89 : RBD ; Appel MGSOMSG. */ -/* 22-02-88 : JJM ; Appel MFNDEB -> MNFNDEB */ -/* 19-02-88 : JJM ; Remontee des PARAMETER */ -/* 14-01-88 : JJM ; Suppression de MINOMBR */ -/* 28-11-86 : Creation JJM. */ /* > */ /* *********************************************************************** */ -/* Le nom du programme. */ +/* Name of the program. */ /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a fournir les coefficients du binome (triangle de Pascal). */ +/* Provides binomial coefficients (Pascal triangle). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* Coeff du binome de 0 a 60. read only . init par block data */ +/* Binomial coefficient from 0 to 60. read only . init by block data */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Les coefficients du binome forment une matrice triangulaire. */ -/* On complete cette matrice dans le tableau CNP par sa transposee. */ -/* On a donc: CNP(I,J) = CNP(J,I) pour I et J = 0, ..., 60. */ - -/* L'initialisation est faite a partir du block-data MMLLL09.RES, */ -/* cree par le programme MQINICNP.FOR (voir l'equipe (AC) ). */ +/* Binomial coefficients form a triangular matrix. */ +/* This matrix is completed in table CNP by its transposition. */ +/* So: CNP(I,J) = CNP(J,I) for I and J = 0, ..., 60. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 03-07-90 : RBD; Ajout commentaires (nom du block-data). */ -/* 19-06-90 : RBD; Le commun MMCMCNP remplace MCCNP qui est obsolete. -*/ -/* 08-01-90 : TE ; CREATION */ +/* Initialization is done with block-data MMLLL09.RES, */ +/* created by the program MQINICNP.FOR. */ /* > */ /* ********************************************************************** */ @@ -3218,7 +3048,7 @@ int mmcvstd_(integer *ncofmx, } ndeg = *ncoeff - 1; -/* ------------------ Construction de la courbe resultat ---------------- +/* ------------------ Construction of the resulting curve ---------------- */ i__1 = *ndimen; @@ -3248,7 +3078,7 @@ int mmcvstd_(integer *ncofmx, /* L300: */ } -/* ------------------- Renormalisation de COURBE ------------------------- +/* ------------------- Renormalization of the CURVE ------------------------- */ bid = 1.; @@ -3296,59 +3126,59 @@ int AdvApp2Var_MathBase::mmdrc11_(integer *iordre, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul des derivees successives de l' equation COURBE au */ -/* parametres -1, 1 de l' ordre 0 jusqu' a l' ordre IORDRE */ -/* inclus.Le calcul se fait sans connaitre les coefficients des */ -/* derivees de la courbe. */ +/* Calculation of successive derivatives of equation CURVE with */ +/* parameters -1, 1 from order 0 to order IORDRE */ +/* included. The calculation is produced without knowing the coefficients of */ +/* derivatives of the curve. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* POSITIONNEMENT,EXTREMITES,COURBE,DERIVEE. */ +/* POSITIONING,EXTREMITIES,CURVE,DERIVATIVE. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* IORDRE : Ordre maximal de calcul des derivees. */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Nombre de coefficients de la courbe (degre+1). */ -/* COURBE : Tableau des coefficients de la courbe. */ +/* IORDRE : Maximum order of calculation of derivatives. */ +/* NDIMEN : Dimension of the space. */ +/* NCOEFF : Number of coefficients of the curve (degree+1). */ +/* COURBE : Table of coefficients of the curve. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* POINTS : Tableau des valeurs des derivees successives */ -/* au parametres -1.D0 et 1.D0. */ -/* MFACTAB : Tableau auxiliaire pour le calcul de factorielle(I). +/* POINTS : Table of values of consecutive derivatives */ +/* of parameters -1.D0 and 1.D0. */ +/* MFACTAB : Auxiliary table for calculation of factorial(I). */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* Aucun. */ +/* None. */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ---> ATTENTION, les coefficients de la courbe sont ranges */ -/* "A L' ENVERS". */ +/* ---> ATTENTION, the coefficients of the curve are */ +/* in a reverse order. */ -/* ---> L' algorithme de calcul des derivees est base sur la */ -/* generalisation du schema de Horner : */ +/* ---> The algorithm of calculation of derivatives is based on */ +/* generalization of Horner scheme : */ /* k 2 */ -/* Soit C(t) = uk.t + ... + u2.t + u1.t + u0 . */ +/* Let C(t) = uk.t + ... + u2.t + u1.t + u0 . */ -/* On pose a0 = uk, b0 = 0, c0 = 0 et pour 1<=j<=k, on calcule : */ +/* a0 = uk, b0 = 0, c0 = 0 and for 1<=j<=k, it is calculated : */ /* aj = a(j-1).x + u(k-j) */ /* bj = b(j-1).x + a(j-1) */ /* cj = c(j-1).x + b(j-1) */ -/* On obtient alors : C(x) = ak, C'(x) = bk, C"(x) = 2.ck . */ +/* So : C(x) = ak, C'(x) = bk, C"(x) = 2.ck . */ -/* L' algorithme se generalise facilement pour le calcul de */ +/* The algorithm is generalized easily for calculation of */ /* (n) */ /* C (x) . */ @@ -3359,18 +3189,11 @@ int AdvApp2Var_MathBase::mmdrc11_(integer *iordre, /* --------- Vol. 2/Seminumerical Algorithms */ /* Addison-Wesley Pub. Co. (1969) */ /* pages 423-425. */ - - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 29-01-1990 : RBD ; Correction de l' en-tete, mise au normes. */ -/* 22-02-1988 : JJM ; Appel MFNDEB -> MNFNDEB */ -/* 25-11-1987 : Cree par JJM (d' apres MDRCRV). */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ points_dim2 = *iordre + 1; @@ -3390,7 +3213,7 @@ int AdvApp2Var_MathBase::mmdrc11_(integer *iordre, goto L9999; } -/* ------------------- Initialisation du tableau POINTS ----------------- +/* ------------------- Initialization of table POINTS ----------------- */ ndgcb = *ncoeff - 1; @@ -3414,7 +3237,7 @@ int AdvApp2Var_MathBase::mmdrc11_(integer *iordre, /* L300: */ } -/* Calcul au parametre -1 et 1 */ +/* Calculation with parameter -1 and 1 */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { @@ -3437,7 +3260,7 @@ int AdvApp2Var_MathBase::mmdrc11_(integer *iordre, /* L600: */ } -/* --------------------- Multiplication par factorielle(I) -------------- +/* --------------------- Multiplication by factorial(I) -------------- */ if (*iordre > 1) { @@ -3457,7 +3280,7 @@ int AdvApp2Var_MathBase::mmdrc11_(integer *iordre, } } -/* ---------------------------- Fin ------------------------------------- +/* ---------------------------- End ------------------------------------- */ L9999: @@ -3488,59 +3311,58 @@ int mmdrvcb_(integer *ideriv, /* *********************************************************************** - */ - -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul des derivees successives de l' equation COURBE au */ -/* parametre TPARAM de l' ordre 0 jusqu' a l' ordre IDERIV inclus. */ -/* Le calcul se fait sans utiliser les coefficients des */ -/* derivees de COURBE. */ -/* MOTS CLES : */ +/* Calculation of successive derivatives of equation CURVE with */ +/* parameter TPARAM from order 0 to order IDERIV included. */ +/* The calculation is produced without knowing the coefficients of */ +/* derivatives of the CURVE. */ + +/* KEYWORDS : */ /* ----------- */ -/* POSITIONNEMENT,PARAMETRE,COURBE,DERIVEE. */ +/* POSITIONING,PARAMETER,CURVE,DERIVATIVE. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* IDERIV : Ordre maximal de calcul des derivees. */ -/* NDIM : Dimension de l' espace. */ -/* NCOEFF : Nombre de coefficients de la courbe (degre+1). */ -/* COURBE : Tableau des coefficients de la courbe. */ -/* TPARAM : Valeur du parametre ou la courbe doit etre evaluee. */ +/* IORDRE : Maximum order of calculation of derivatives. */ +/* NDIMEN : Dimension of the space. */ +/* NCOEFF : Number of coefficients of the curve (degree+1). */ +/* COURBE : Table of coefficients of the curve. */ +/* TPARAM : Value of the parameter where the curve should be evaluated. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* TABPNT : Tableau des valeurs des derivees successives */ -/* au parametre TPARAM. */ -/* IERCOD : 0 = OK, */ -/* 1 = Entrees incoherentes. */ +/* TABPNT : Table of values of consecutive derivatives */ +/* of parameter TPARAM. */ + /* IERCOD : 0 = OK, */ +/* 1 = incoherent input. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* Aucun. */ +/* None. */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* L' algorithme de calcul des derivees est base sur la */ -/* generalisation du schema de Horner : */ +/* The algorithm of calculation of derivatives is based on */ +/* generalization of the Horner scheme : */ /* k 2 */ -/* Soit C(t) = uk.t + ... + u2.t + u1.t + u0 . */ +/* Let C(t) = uk.t + ... + u2.t + u1.t + u0 . */ -/* On pose a0 = uk, b0 = 0, c0 = 0 et pour 1<=j<=k, on calcule : */ +/* a0 = uk, b0 = 0, c0 = 0 and for 1<=j<=k, it is calculated : */ /* aj = a(j-1).x + u(k-j) */ /* bj = b(j-1).x + a(j-1) */ /* cj = c(j-1).x + b(j-1) */ -/* On obtient alors : C(x) = ak, C'(x) = bk, C"(x) = 2.ck . */ +/* So, it is obtained : C(x) = ak, C'(x) = bk, C"(x) = 2.ck . */ -/* L' algorithme se generalise facilement pour le calcul de */ +/* The algorithm can be easily generalized for the calculation of */ /* (n) */ /* C (x) . */ @@ -3552,18 +3374,13 @@ int mmdrvcb_(integer *ideriv, /* Addison-Wesley Pub. Co. (1969) */ /* pages 423-425. */ -/* ----> Pour evaluer les derivees en 0 et en 1, il est preferable */ -/* d' utiliser la routine MDRV01.FOR . */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 28-06-1988 : Cree par RBD. */ - +/* ---> To evaluare derivatives at 0 and 1, it is preferable */ +/* to use routine MDRV01.FOR . */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ tabpnt_dim1 = *ndim; @@ -3583,7 +3400,7 @@ int mmdrvcb_(integer *ideriv, } *iercod = 0; -/* ------------------- Initialisation du tableau TABPNT ----------------- +/* ------------------- Initialization of table TABPNT ----------------- */ ndgcrb = *ncoeff - 1; @@ -3601,7 +3418,7 @@ int mmdrvcb_(integer *ideriv, (char *)&tabpnt[tabpnt_dim1 + 1]); L200: -/* ------------------------ Calcul au parametre TPARAM ------------------ +/* ------------------------ Calculation of parameter TPARAM ------------------ */ i__1 = ndgcrb; @@ -3621,7 +3438,7 @@ L200: /* L500: */ } -/* --------------------- Multiplication par factorielle(I) ------------- +/* --------------------- Multiplication by factorial(I) ------------- */ i__1 = *ideriv; @@ -3685,41 +3502,41 @@ int AdvApp2Var_MathBase::mmdrvck_(integer *ncoeff, /* FONCTION : */ /* ---------- */ -/* CALCUL DE LA VALEUR D'UNE COURBE DERIVEE D' ORDRE IDERIV EN */ -/* UN POINT DE PARAMETRE TPARAM. */ +/* Calculate the value of a derived curve of order IDERIV in */ +/* a point of parameter TPARAM. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* POSITIONNEMENT,COURBE,DERIVEE D' ORDRE K. */ +/* POSITIONING,CURVE,DERIVATIVE of ORDER K. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOEFF : Le degre +1 de la courbe. */ -/* NDIMEN : Dimension de l'espace (2 ou 3 en general) */ -/* COURBE : Tableau des coefficients de la courbe. */ -/* IDERIV : Ordre de derivation demande : 1=derivee 1ere, etc... */ -/* TPARAM : Valeur du parametre de la courbe. */ +/* NCOEFF : Degree +1 of the curve. */ +/* NDIMEN : Dimension of the space (2 or 3 in general) */ +/* COURBE : Table of coefficients of the curve. */ +/* IDERIV : Required order of derivation : 1=1st derivative, etc... */ +/* TPARAM : Value of parameter of the curve. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PNTCRB : Le point de parametre TPARAM sur la derivee d' ordre */ -/* IDERIV de COURBE. */ +/* PNTCRB : Point of parameter TPARAM on the derivative of order */ +/* IDERIV of CURVE. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* MMCMCNP */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ -/* .Neant. */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* None. */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Le code ci dessous a ete ecrit a partir de l' algorithme suivant : +/* The code below was written basing on the following algorithm : */ -/* Soit P(t) = a1 + a2*t + ... an*t**n. La derivee d' ordre k de P */ -/* (comportant n-k coefficients) est calculee ainsi : */ +/* Let P(t) = a1 + a2*t + ... an*t**n. The derivative of order k of P */ +/* (containing n-k coefficients) is calculated as follows : */ /* Pk(t) = a(k+1)*CNP(k,k)*k! */ /* + a(k+2)*CNP(k+1,k)*k! * t */ @@ -3728,47 +3545,34 @@ int AdvApp2Var_MathBase::mmdrvck_(integer *ncoeff, /* . */ /* + a(n)*CNP(n-1,k)*k! * t**(n-k-1). */ -/* L' evaluation se fait suivant un schema de Horner classique. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 8-09-1995 : JMF ; Performance */ -/* 09-01-90 : TE ; COMMON MCCNP -> MMCMCNP.INC & INDICES DES CNP */ -/* 06-07-88 : RBD; Creation, sur une idee de GD. */ +/* Evaluation is produced following the classic Horner scheme. */ /* > */ /* *********************************************************************** */ -/* Factorielles (1 a 21) caculees sur VAX en R*16 */ +/* Factorials (1 to 21) caculated on VAX in R*16 */ /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a fournir les coefficients du binome (triangle de Pascal). */ +/* Serves to provide binomial coefficients (Pascal triangle). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* Coeff du binome de 0 a 60. read only . init par block data */ +/* Binomial Coeff from 0 to 60. read only . init by block data */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Les coefficients du binome forment une matrice triangulaire. */ -/* On complete cette matrice dans le tableau CNP par sa transposee. */ -/* On a donc: CNP(I,J) = CNP(J,I) pour I et J = 0, ..., 60. */ - -/* L'initialisation est faite a partir du block-data MMLLL09.RES, */ -/* cree par le programme MQINICNP.FOR (voir l'equipe (AC) ). */ +/* Binomial coefficients form a triangular matrix. */ +/* This matrix is completed in table CNP by its transposition. */ +/* So: CNP(I,J) = CNP(J,I) for I and J = 0, ..., 60. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 03-07-90 : RBD; Ajout commentaires (nom du block-data). */ -/* 19-06-90 : RBD; Le commun MMCMCNP remplace MCCNP qui est obsolete. -*/ -/* 08-01-90 : TE ; CREATION */ +/* Initialization is done by block-data MMLLL09.RES, */ +/* created by program MQINICNP.FOR. */ /* > */ /* ********************************************************************** */ @@ -3786,9 +3590,9 @@ int AdvApp2Var_MathBase::mmdrvck_(integer *ncoeff, /* Function Body */ -/* -------------- Cas ou l' ordre de derivee est plus ------------------- +/* -------------- Case when the order of derivative is greater than ------------------- */ -/* ---------------- grand que le degre de la courbe --------------------- +/* ---------------- the degree of the curve --------------------- */ if (*ideriv >= *ncoeff) { @@ -3801,10 +3605,10 @@ int AdvApp2Var_MathBase::mmdrvck_(integer *ncoeff, } /* ********************************************************************** */ -/* Traitement general */ +/* General processing*/ /* ********************************************************************** */ -/* --------------------- Calcul de Factorielle(IDERIV) ------------------ +/* --------------------- Calculation of Factorial(IDERIV) ------------------ */ k = *ideriv; @@ -3819,10 +3623,10 @@ int AdvApp2Var_MathBase::mmdrvck_(integer *ncoeff, } } -/* ------- Calcul de la derivee d' ordre IDERIV de COURBE en TPARAM ----- +/* ------- Calculation of derivative of order IDERIV of CURVE in TPARAM ----- */ -/* ---> Attention : le coefficient binomial C(n,m) est represente dans */ -/* MCCNP par CNP(N,M). */ +/* ---> Attention : binomial coefficient C(n,m) is represented in */ +/* MCCNP by CNP(N,M). */ i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { @@ -3861,44 +3665,38 @@ int AdvApp2Var_MathBase::mmeps1_(doublereal *epsilo) /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Extraction du EPS1 du COMMON MPRCSN. EPS1 est le zero spatial */ -/* egal a 1.D-9 */ +/* Extraction of EPS1 from COMMON MPRCSN. EPS1 is spatial zero */ +/* equal to 1.D-9 */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* MPRCSN,PRECISON,EPS1. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* Neant */ +/* None */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* EPSILO : Valeur de EPS1 (Le zero spatial (10**-9)) */ +/* EPSILO : Value of EPS1 (spatial zero (10**-9)) */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* EPS1 est le zero spatial ABSOLU , c.a.d. que l' on doit */ -/* l' utiliser chaque fois que l' on veut tester si une variable */ -/* est nulle. Par exemple, si la norme d' un vecteur est inferieure */ -/* a EPS1, c' est que ce vecteur est NUL ! (lorsqu' on travaille en */ -/* REAL*8) Il est vivement deconseille de tester des arguments par */ -/* rapport a EPS1**2. Vu les erreurs d' arrondis inevitables lors */ -/* des calculs, cela revient a tester par rapport a 0.D0. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 29-01-90 : DH ; Nettoyage */ -/* 27-07-88 : RBD; Ajouts de commentaires. */ -/* 29-10-87 : Cree par JJM. */ +/* EPS1 is ABSOLUTE spatial zero, so it is necessary */ +/* to use it whenever it is necessary to test if a variable */ +/* is null. For example, if the norm of a vector is lower than */ +/* EPS1, this vector is NULL ! (when one works in */ +/* REAL*8) It is absolutely not advised to test arguments */ +/* compared to EPS1**2. Taking into account the rounding errors inevitable */ +/* during calculations, this causes testing compared to 0.D0. */ /* > */ /* *********************************************************************** */ @@ -3908,49 +3706,41 @@ int AdvApp2Var_MathBase::mmeps1_(doublereal *epsilo) /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* DONNE LES TOLERANCES DE NULLITE DANS STRIM */ -/* AINSI QUE LES BORNES DES PROCESSUS ITERATIFS */ +/* Gives tolerances of invalidity in stream */ +/* as well as limits of iterative processes */ -/* CONTEXTE GENERAL, MODIFIABLE PAR L'UTILISATEUR */ +/* general context, modifiable by the user */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* PARAMETRE , TOLERANCE */ +/* PARAMETER , TOLERANCE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* INITIALISATION : PROFIL , **VIA MPRFTX** A L' ENTREE DANS STRI -M*/ +/* INITIALISATION : profile , **VIA MPRFTX** at input in stream +/* loading of default values of the profile in MPRFTX at input */ +/* in stream. They are preserved in local variables of MPRFTX */ -/* CHARGEMENT DES VALEURS PAR DEFAUT DU PROFIL DANS MPRFTX A L'ENTRE -E*/ -/* DANS STRIM. ELLES SONT CONSERVEES DANS DES VARIABLES LOCALES */ -/* DE MPRFTX */ +/* Reset of default values : MDFINT */ +/* Interactive modification by the user : MDBINT */ -/* REMISE DES VALEURS PAR DEFAUT : MDFINT */ -/* MODIFICATION INTERACTIVE PAR L'UTILISATEUR : MDBINT */ - -/* FONCTION D'ACCES : MMEPS1 ... EPS1 */ +/* ACCESS FUNCTION : MMEPS1 ... EPS1 */ /* MEPSPB ... EPS3,EPS4 */ /* MEPSLN ... EPS2, NITERM , NITERR */ /* MEPSNR ... EPS2 , NITERM */ /* MITERR ... NITERR */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 01-02-90 : NAK ; ENTETE */ /* > */ /* *********************************************************************** */ -/* NITERM : NB D'ITERATIONS MAXIMAL */ -/* NITERR : NB D'ITERATIONS RAPIDES */ -/* EPS1 : TOLERANCE DE DISTANCE 3D NULLE */ -/* EPS2 : TOLERANCE DE DISTANCE PARAMETRIQUE NULLE */ -/* EPS3 : TOLERANCE POUR EVITER LES DIVISIONS PAR 0.. */ -/* EPS4 : TOLERANCE ANGULAIRE */ +/* NITERM : max nb of iterations */ +/* NITERR : nb of rapid iterations */ +/* EPS1 : tolerance of 3D null distance */ +/* EPS2 : tolerance of parametric null distance */ +/* EPS3 : tolerance to avoid division by 0.. */ +/* EPS4 : angular tolerance */ @@ -3981,75 +3771,60 @@ int mmexthi_(integer *ndegre, /* FONCTION : */ /* ---------- */ -/* Extrait du commun LDGRTL les poids des formules de quadrature de */ -/* Gauss sur toutes les racines des polynomes de Legendre de degre */ -/* NDEGRE defini sur [-1,1]. */ +/* Extract of common LDGRTL the weight of formulas of */ +/* Gauss quadrature on all roots of Legendre polynoms of degree */ +/* NDEGRE defined on [-1,1]. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, AB_SPECIFI::COMMON&, EXTRACTION, &POIDS, &GAUSS. */ +/* ALL, AB_SPECIFI::COMMON&, EXTRACTION, &WEIGHT, &GAUSS. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDEGRE : Degre mathematique du polynome de Legendre. On doit avoir */ +/* NDEGRE : Mathematic degree of Legendre polynom. It should have */ /* 2 <= NDEGRE <= 61. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* HWGAUS : Le tableau des poids des formules de quadrature de Gauss */ -/* relatifs aux NDEGRE racines d' un polynome de Legendre de */ +/* HWGAUS : The table of weights of Gauss quadrature formulas */ +/* relative to NDEGRE roots of a polynome de Legendre de */ /* degre NDEGRE. */ /* COMMONS UTILISES : */ /* ---------------- */ /* MLGDRTL */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ATTENTION: La condition sur NDEGRE ( 2 <= NDEGRE <= 61) n'est */ -/* pas testee. A l'appelant de faire le test. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 23-03-90 : RBD ; Mise a jour en-tete, declaration variables locales, */ -/* correction poids associe racines negatives (bug */ -/* ENORME). */ -/* 15-01-90 : NAK ; MLGDRTL PAR INCLUDE MMLGDRT */ -/* 22-04-88 : JJM ; Creation. */ -/* > */ -/* ********************************************************************** -*/ +/* ATTENTION: The condition on NDEGRE ( 2 <= NDEGRE <= 61) is not */ +/* tested. The caller should make the test. -/* Le nom de la routine */ +/* Name of the routine */ -/* Le common MLGDRTL: */ -/* Ce common comprend les racines POSITIVES des polynomes de Legendre */ -/* ET les poids des formules de quadrature de Gauss sur toutes les */ -/* racines POSITIVES des polynomes de Legendre. */ +/* Common MLGDRTL: */ +/* This common includes POSITIVE roots of Legendre polynims */ +/* AND weights of Gauss quadrature formulas on all */ +/* POSITIVE roots of Legendre polynoms. */ /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Le common des racines de Legendre. */ +/* The common of Legendre roots. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* BASE LEGENDRE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 11-01-90 : NAK ; Creation version originale */ /* > */ /* *********************************************************************** */ @@ -4057,18 +3832,17 @@ int mmexthi_(integer *ndegre, -/* ROOTAB : Tableau de toutes les racines des polynomes de Legendre */ -/* comprises entre ]0,1]. Elles sont rangees pour des degres croissants -*/ -/* de 2 a 61. */ -/* HILTAB : Tableau des interpolants de Legendre concernant ROOTAB. */ -/* L' adressage est le meme. */ -/* HI0TAB : Tableau des interpolants de Legendre pour la racine x=0 */ -/* des polynomes de degre IMPAIR. */ -/* RTLTB0 : Tableau des Li(uk) ou les uk sont les racines d' un */ -/* polynome de Legendre de degre PAIR. */ -/* RTLTB1 : Tableau des Li(uk) ou les uk sont les racines d' un */ -/* polynome de Legendre de degre IMPAIR. */ +/* ROOTAB : Table of all roots of Legendre polynoms */ +/* within the interval [0,1]. They are ranked for the degrees increasing from */ +/* 2 to 61. */ +/* HILTAB : Table of Legendre interpolators concerning ROOTAB. */ +/* The adressing is the same. */ +/* HI0TAB : Table of Legendre interpolators for root x=0 */ +/* of polynoms of UNEVEN degree. */ +/* RTLTB0 : Table of Li(uk) where uk are the roots of */ +/* Legendre polynom of EVEN degree. */ +/* RTLTB1 : Table of Li(uk) where uk are the roots of */ +/* Legendre polynom of UNEVEN degree. */ /************************************************************************ @@ -4085,17 +3859,17 @@ int mmexthi_(integer *ndegre, ndeg2 = *ndegre / 2; nmod2 = *ndegre % 2; -/* Adresse du poids de Gauss associe a la 1ere racine strictement */ -/* positive du polynome de Legendre de degre NDEGRE dans MLGDRTL. */ +/* Address of Gauss weight associated to the 1st strictly */ +/* positive root of Legendre polynom of degree NDEGRE in MLGDRTL. */ iadd = ndeg2 * (ndeg2 - 1) / 2 + 1; -/* Indice du 1er element de HWGAUS associe a la 1ere racine */ -/* strictement positive du polynome de Legendre de degre NDEGRE. */ +/* Index of the 1st HWGAUS element associated to the 1st strictly */ +/* positive root of Legendre polynom of degree NDEGRE. */ ideb = (*ndegre + 1) / 2 + 1; -/* Lecture des poids associes aux racines strictement positives. */ +/* Reading of weights associated to strictly positive roots. */ i__1 = *ndegre; for (ii = ideb; ii <= i__1; ++ii) { @@ -4104,7 +3878,7 @@ int mmexthi_(integer *ndegre, /* L100: */ } -/* Pour les racines strictement negatives, les poids sont les memes. */ +/* For strictly negative roots, the weight is the same. */ /* i.e HW(1) = HW(NDEGRE), HW(2) = HW(NDEGRE-1), etc... */ i__1 = ndeg2; @@ -4113,8 +3887,8 @@ int mmexthi_(integer *ndegre, /* L200: */ } -/* Cas NDEGRE impair, 0 est racine du polynome de Legendre, on */ -/* charge le poids de Gauss associe. */ +/* Case of uneven NDEGRE, 0 is root of Legendre polynom, */ +/* associated Gauss weights are loaded. */ if (nmod2 == 1) { hwgaus[ndeg2 + 1] = mlgdrtl_.hi0tab[ndeg2]; @@ -4147,93 +3921,75 @@ int mmextrl_(integer *ndegre, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Extrait du Common LDGRTL les racines du polynome de Legendre */ -/* de degre NDEGRE defini sur [-1,1]. */ +/* Extract of the Common LDGRTL of Legendre polynom roots */ +/* of degree NDEGRE defined on [-1,1]. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, AB_SPECIFI::COMMON&, EXTRACTION, &RACINE, &LEGENDRE. */ +/* ALL, AB_SPECIFI::COMMON&, EXTRACTION, &ROOT, &LEGENDRE. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDEGRE : Degre mathematique du polynome de Legendre. On doit avoir */ -/* 2 <= NDEGRE <= 61. */ +/* NDEGRE : Mathematic degree of Legendre polynom. */ +/* It is required to have 2 <= NDEGRE <= 61. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* ROOTLG : Le tableau des racines du polynome de Legendre de degre */ -/* NDEGRE et defini sur [-1,1]. */ +/* ROOTLG : The table of roots of Legendre polynom of degree */ +/* NDEGRE defined on [-1,1]. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* MLGDRTL */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ATTENTION: La condition sur NDEGRE ( 2 <= NDEGRE <= 61) n'est */ -/* pas testee. A l'appelant de faire le test. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 23-03-90 : RBD ; Ajout commentaires + declarations. */ -/* 15-01-90 : NAK ; MLGDRTL PAR INCLUDE MMLGDRT */ -/* 04-03-88 : JJM ; Raccoursissement de MLGDRTL. */ -/* 22-02-88 : JJM ; Appel MFNDEB -> MNFNDEB */ -/* 23-10-87 : JJM ; Cree par JJM */ +/* ATTENTION: Condition of NDEGRE ( 2 <= NDEGRE <= 61) is not */ +/* tested. The caller should make the test. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ -/* Le common MLGDRTL: */ -/* Ce common comprend les racines POSITIVES des polynomes de Legendre */ -/* ET les poids des formules de quadrature de Gauss sur toutes les */ -/* racines POSITIVES des polynomes de Legendre. */ +/* Common MLGDRTL: */ +/* This common includes POSITIVE roots of Legendre polynoms */ +/* AND the weight of Gauss quadrature formulas on all */ +/* POSITIVE roots of Legendre polynoms. */ /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Le common des racines de Legendre. */ +/* The common of Legendre roots. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* BASE LEGENDRE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 11-01-90 : NAK ; Creation version originale */ -/* > */ /* *********************************************************************** */ - - - -/* ROOTAB : Tableau de toutes les racines des polynomes de Legendre */ -/* comprises entre ]0,1]. Elles sont rangees pour des degres croissants -*/ -/* de 2 a 61. */ -/* HILTAB : Tableau des interpolants de Legendre concernant ROOTAB. */ -/* L' adressage est le meme. */ -/* HI0TAB : Tableau des interpolants de Legendre pour la racine x=0 */ -/* des polynomes de degre IMPAIR. */ -/* RTLTB0 : Tableau des Li(uk) ou les uk sont les racines d' un */ -/* polynome de Legendre de degre PAIR. */ -/* RTLTB1 : Tableau des Li(uk) ou les uk sont les racines d' un */ -/* polynome de Legendre de degre IMPAIR. */ +/* ROOTAB : Table of all roots of Legendre polynoms */ +/* within the interval [0,1]. They are ranked for the degrees increasing from */ +/* 2 to 61. */ +/* HILTAB : Table of Legendre interpolators concerning ROOTAB. */ +/* The adressing is the same. */ +/* HI0TAB : Table of Legendre interpolators for root x=0 */ +/* of polynoms of UNEVEN degree. */ +/* RTLTB0 : Table of Li(uk) where uk are the roots of */ +/* Legendre polynom of EVEN degree. */ +/* RTLTB1 : Table of Li(uk) where uk are the roots of */ +/* Legendre polynom of UNEVEN degree. */ /************************************************************************ @@ -4250,17 +4006,17 @@ int mmextrl_(integer *ndegre, ndeg2 = *ndegre / 2; nmod2 = *ndegre % 2; -/* Adresse de la 1ere racine strictement positive du polynome de */ -/* Legendre de degre NDEGRE dans MLGDRTL. */ +/* Address of the 1st strictly positive root of Legendre polynom */ +/* of degree NDEGRE in MLGDRTL. */ iadd = ndeg2 * (ndeg2 - 1) / 2 + 1; -/* Indice, dans ROOTLG, de la 1ere racine strictement positive du */ -/* polynome de Legendre de degre NDEGRE. */ +/* Indice, in ROOTLG, of the 1st strictly positive root */ +/* of Legendre polynom of degree NDEGRE. */ ideb = (*ndegre + 1) / 2 + 1; -/* Lecture des racines strictement positives. */ +/* Reading of strictly positive roots. */ i__1 = *ndegre; for (ii = ideb; ii <= i__1; ++ii) { @@ -4269,9 +4025,9 @@ int mmextrl_(integer *ndegre, /* L100: */ } -/* Les racines strictement negatives sont egales aux racines positives +/* Strictly negative roots are equal to positive roots */ -/* au signe pres i.e RT(1) = -RT(NDEGRE), RT(2) = -RT(NDEGRE-1), etc... +/* to the sign i.e RT(1) = -RT(NDEGRE), RT(2) = -RT(NDEGRE-1), etc... */ i__1 = ndeg2; @@ -4280,7 +4036,7 @@ int mmextrl_(integer *ndegre, /* L200: */ } -/* Cas NDEGRE impair, 0 est racine du polynome de Legendre. */ +/* Case NDEGRE uneven, 0 is root of Legendre polynom. */ if (nmod2 == 1) { rootlg[ndeg2 + 1] = 0.; @@ -4321,51 +4077,47 @@ int AdvApp2Var_MathBase::mmfmca8_(integer *ndimen, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Expansion d' un tableau ne contenant que l' essentiel */ -/* en un tableau de donnees plus grand. */ +/* Expansion of a table containing only most important things into a */ +/* greater data table. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, MATH_ACCES:: CARREAU&, DECOMPRESSION, &CARREAU */ +/* ALL, MATH_ACCES:: CARREAU&, DECOMPRESSION, &CARREAU */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN: Dimension de l' espace de travail. */ -/* NCOEFU: Le degre +1 du tableau en u. */ -/* NCOEFV: Le degre +1 du tableau en v. */ -/* NDIMAX: Dimension maxi de l' espace. */ -/* NCFUMX: Degre maximal +1 du tableau en u. */ -/* NCFVMX: Degre maximal +1 du tableau en v. */ -/* TABINI: Le tableau a decompacter. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMEN: Dimension of the workspace. */ +/* NCOEFU: Degree +1 of the table by u. */ +/* NCOEFV: Degree +1 of the table by v. */ +/* NDIMAX: Max dimension of the space. */ +/* NCFUMX: Max Degree +1 of the table by u. */ +/* NCFVMX: Max Degree +1 of the table by v. */ +/* TABINI: The table to be decompressed. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* TABRES: Le tableau decompacte. */ +/* TABRES: Decompressed table. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* L' appel suivant : */ +/* The following call : */ /* CALL MMFMCA8(NDIMEN,NCOEFU,NCOEFV,NDIMAX,NCFUMX,NCFVMX,TABINI,TABINI) */ -/* ou TABINI est un argument d' entree/sortie, est possible pourvu */ -/* que l' appelant ait declare TABINI en (NDIMAX,NCFUMX,NCFVMX) */ - -/* ATTENTION : on ne verifie pas que NDIMAX >= NDIMEN, */ -/* NCOEFU >= NCFMXU et NCOEFV >= NCFMXV. */ +/* where TABINI is input/output argument, is possible provided */ +/* that the caller has declared TABINI in (NDIMAX,NCFUMX,NCFVMX) */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 03-08-1989 : RBD; Creation */ +/* ATTENTION : it is not checked that NDIMAX >= NDIMEN, */ +/* NCOEFU >= NCFMXU and NCOEFV >= NCFMXV. */ /* > */ /* ********************************************************************** */ @@ -4461,55 +4213,51 @@ L9999: /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Compression d' un tableau de donnees en un tableau ne */ -/* contenant que l' essentiel (Le tableau d' entree n' est */ -/* pas ecrase). */ +/* Compression of a data table in a table */ +/* containing only the main data (the input table is not removed). */ -/* MOTS CLES : */ +/* KEYWORDS: */ /* ----------- */ -/* TOUS, MATH_ACCES:: CARREAU&, COMPRESSION, &CARREAU */ +/* ALL, MATH_ACCES:: CARREAU&, COMPRESSION, &CARREAU */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMAX: Dimension maxi de l' espace. */ -/* NCFUMX: Degre maximal +1 du tableau en u. */ -/* NCFVMX: Degre maximal +1 du tableau en v. */ -/* NDIMEN: Dimension de l' espace de travail. */ -/* NCOEFU: Le degre +1 du tableau en u. */ -/* NCOEFV: Le degre +1 du tableau en v. */ -/* TABINI: Le tableau a compacter. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMAX: Max dimension of the space. */ +/* NCFUMX: Max degree +1 of the table by u. */ +/* NCFVMX: Max degree +1 of the table by v. */ +/* NDIMEN: Dimension of the workspace. */ +/* NCOEFU: Degree +1 of the table by u. */ +/* NCOEFV: Degree +1 of the table by v. */ +/* TABINI: The table to compress. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* TABRES: Le tableau compacte. */ +/* TABRES: The compressed table. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* L' appel suivant : */ +/* The following call : */ /* CALL MMFMCA9(NDIMAX,NCFUMX,NCFVMX,NDIMEN,NCOEFU,NCOEFV,TABINI,TABINI) */ -/* ou TABINI est un argument d' entree/sortie, est possible pourvu */ -/* que l' appelant ait bien verifie que : */ +/* where TABINI is input/output argument, is possible provided */ +/* that the caller has checked that : */ /* NDIMAX > NDIMEN, */ -/* ou NDIMAX = NDIMEN et NCFUMX > NCOEFU */ -/* ou NDIMAX = NDIMEN, NCFUMX = NCOEFU et NCFVMX > NCOEFV */ +/* or NDIMAX = NDIMEN and NCFUMX > NCOEFU */ +/* or NDIMAX = NDIMEN, NCFUMX = NCOEFU and NCFVMX > NCOEFV */ -/* Ces conditions ne sont pas testees dans le programme. */ +/* These conditions are not tested in the program. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 18-01-199O : RBD ; Creation. */ /* > */ /* ********************************************************************** */ @@ -4614,66 +4362,57 @@ int AdvApp2Var_MathBase::mmfmcar_(integer *ndimen, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* LIMITATION D'UN CARREAU DEFINI SUR (0,1)*(0,1) ENTRE LES ISOS */ -/* UPARA1 ET UPARA2 (EN U) ET VPARA1 ET VPARA2 EN V. */ +/* LIMITATION OF A SQUARE DEFINED ON (0,1)*(0,1) BETWEEN ISOS */ +/* UPARA1 AND UPARA2 (BY U) AND VPARA1 AND VPARA2 BY V. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LIMITATION , CARREAU , PARAMETRE */ +/* LIMITATION , SQUARE , PARAMETER */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX: NBRE MAXI DE COEFF EN U DU CARREAU */ -/* NCOEFU: NBRE DE COEFF EN U DU CARREAU */ -/* NCOEFV: NBRE DE COEFF EN V DU CARREAU */ -/* PATOLD : LE CARREAU A LIMITER SUIVANT UPARA1,UPARA2 ET VPARA1,VPARA2 +/* NCOFMX: MAX NUMBER OF COEFF OF THE SQUARE BY U */ +/* NCOEFU: NUMBER OF COEFF OF THE SQUARE BY U */ +/* NCOEFV: NUMBER OF COEFF OF THE SQUARE BY V */ +/* PATOLD : THE SQUARE IS LIMITED BY UPARA1,UPARA2 AND VPARA1,VPARA2 .*/ -/* UPARA1 : BORNE INF DES U */ -/* UPARA2 : BORNE SUP DES U */ -/* VPARA1 : BORNE INF DES V */ -/* VPARA2 : BORNE SUP DES V */ +/* UPARA1 : LOWER LIMIT OF U */ +/* UPARA2 : UPPER LIMIT OF U */ +/* VPARA1 : LOWER LIMIT OF V */ +/* VPARA2 : UPPER LIMIT OF V */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PATNEW : LE CARREAU RELIMITE, DEFINI DANS (0,1)**2 */ -/* IERCOD : =10 NBR DE COEFF TROP GRAND OU NUL */ -/* =13 PB DANS L' ALLOCATION DYNAMIQUE */ +/* PATNEW : RELIMITED SQUARE, DEFINED ON (0,1)**2 */ +/* IERCOD : =10 COEFF NB TOO GREAT OR NULL */ +/* =13 PB IN THE DYNAMIC ALLOCATION */ /* = 0 OK. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ - -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ---> L' appel suivant : */ +/* ---> The following call : */ /* CALL MMFMCAR(NCOFMX,NCOEFU,NCOEFV,PATOLD,UPARA1,UPARA2,VPARA1,VPARA2 */ /* ,PATOLD), */ -/* ou PATOLD est un argument d' entree/sortie est tout a fait */ -/* legal. */ +/* where PATOLD is input/output argument is absolutely legal. */ -/* ---> Le nombre maximum de coeff en u et en v de PATOLD est 61 */ +/* ---> The max number of coeff by u and v of PATOLD is 61 */ -/* ---> Si NCOEFU < NCOFMX, on compresse les donnees par MMFMCA9 avant -*/ -/* la limitation en v pour gagner du temps lors de l' execution */ -/* de MMARC41 qui suit (le carreau est traite comme une courbe de +/* ---> If NCOEFU < NCOFMX, the data is compressed by MMFMCA9 before +/* limitation by v to get time during the execution */ +/* of MMARC41 that follows (the square is processed as a curve of */ -/* dimension NDIMEN*NCOEFU possedant NCOEFV coefficients). */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 02-08-89 : RBD; CREATION. */ +/* dimension NDIMEN*NCOEFU possessing NCOEFV coefficients). */ /* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ @@ -4696,7 +4435,7 @@ int AdvApp2Var_MathBase::mmfmcar_(integer *ndimen, /* ********************************************************************** */ -/* TEST DES NOMBRES DE COEFFICIENTS */ +/* TEST OF COEFFICIENT NUMBERS */ /* ********************************************************************** */ @@ -4711,7 +4450,7 @@ int AdvApp2Var_MathBase::mmfmcar_(integer *ndimen, /* ********************************************************************** */ -/* CAS OU UPARA1=VPARA1=0 ET UPARA2=VPARA2=1 */ +/* CASE WHEN UPARA1=VPARA1=0 AND UPARA2=VPARA2=1 */ /* ********************************************************************** */ @@ -4725,7 +4464,7 @@ int AdvApp2Var_MathBase::mmfmcar_(integer *ndimen, /* ********************************************************************** */ -/* LIMITATION EN U */ +/* LIMITATION BY U */ /* ********************************************************************** */ @@ -4742,7 +4481,7 @@ int AdvApp2Var_MathBase::mmfmcar_(integer *ndimen, /* ********************************************************************** */ -/* LIMITATION EN V */ +/* LIMITATION BY V */ /* ********************************************************************** */ @@ -4751,12 +4490,12 @@ L2000: goto L9999; } -/* ----------- LIMITATION EN V (AVEC COMPRESSION I.E. NCOEFU (.,NDIMEN) sens vers AB +/* ISENMSC : required direction of the transfer : */ +/* 1 : passage of (NDIMEN,.) ---> (.,NDIMEN) direction to AB */ -/* -1 : passage de (.,NDIMEN) ---> (NDIMEN,.) sens vers TS,T +/* -1 : passage of (.,NDIMEN) ---> (NDIMEN,.) direction to TS,T V*/ /* NDIMAX : format / dimension */ -/* NCF1MX : format en t de COURB1 */ -/* si ISENMSC= 1 : COURB1: La courbe a traiter (NDIMAX,.) */ -/* NCOEFF : nombre de coef de la courbe */ -/* NCF2MX : format en t de COURB2 */ -/* NDIMEN : dimension de la courbe et format de COURB2 */ -/* si ISENMSC=-1 : COURB2: La courbe a traiter (.,NDIMEN) */ - -/* ARGUMENTS DE SORTIE : */ +/* NCF1MX : format by t of COURB1 */ +/* if ISENMSC= 1 : COURB1: The curve to be processed (NDIMAX,.) */ +/* NCOEFF : number of coeff of the curve */ +/* NCF2MX : format by t of COURB2 */ +/* NDIMEN : dimension of the curve and format of COURB2 */ +/* if ISENMSC=-1 : COURB2: The curve to be processed (.,NDIMEN) */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* si ISENMSC= 1 : COURB2: La courbe resultat (.,NDIMEN) */ -/* si ISENMSC=-1 : COURB1: La courbe resultat (NDIMAX,.) */ +/* if ISENMSC= 1 : COURB2: The resulting curve (.,NDIMEN) */ +/* if ISENMSC=-1 : COURB1: The resulting curve (NDIMAX,.) */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* permet de traiter les transferts usuels suivant : */ +/* allow to process the usual transfers as follows : */ /* | ---- ISENMSC = 1 ---- | | ---- ISENMSC =-1 ----- | */ /* TS (3,21) --> (21,3) AB ; AB (21,3) --> (3,21) TS */ /* TS (3,21) --> (NU,3) AB ; AB (NU,3) --> (3,21) TS */ /* (3,NU) --> (21,3) AB ; AB (21,3) --> (3,NU) */ /* (3,NU) --> (NU,3) AB ; AB (NU,3) --> (3,NU) */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* .07-08-89 : JG ; VERSION ORIGINALE (ANNULE ET REMPLACE MMCVINV) -*/ /* > */ /* *********************************************************************** */ @@ -5017,55 +4751,48 @@ int AdvApp2Var_MathBase::mmfmtb1_(integer *maxsz1, /************************************************************************ *******/ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Inversion des elements d'un tableau rectangulaire (T1(i,j) */ -/* est charge dans T2(j,i)) */ +/* Inversion of elements of a rectangular table (T1(i,j) */ +/* loaded in T2(j,i)) */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, MATH_ACCES :: TABLEAU&, INVERSION, &TABLEAU */ +/* ALL, MATH_ACCES :: TABLEAU&, INVERSION, &TABLEAU */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* MAXSZ1: Nbre maxi d'elements suivant la 1ere dimension de */ -/* TABLE1. */ -/* TABLE1: Table de reels a deux dimensions. */ -/* ISIZE1: Nbre d'elements utiles de TABLE1 sur la 1ere dimension */ -/* JSIZE1: Nbre d'elements utiles de TABLE1 sur la 2eme dimension */ -/* MAXSZ2: Nbre maxi d'elements suivant la 1ere dimension de */ -/* TABLE2. */ - -/* ARGUMENTS DE SORTIE : */ +/* MAXSZ1: Max Nb of elements by the 1st dimension of TABLE1. */ +/* TABLE1: Table of reals by two dimensions. */ +/* ISIZE1: Nb of useful elements of TABLE1 on the 1st dimension */ +/* JSIZE1: Nb of useful elements of TABLE1 on the 2nd dimension */ +/* MAXSZ2: Nb max of elements by the 1st dimension of TABLE2. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* TABLE2: Table de reels a deux dimensions, contenant la transposee -*/ -/* du tableau rectangulaire TABLE1. */ -/* ISIZE2: Nbre d'elements utiles de TABLE2 sur la 1ere dimension */ -/* JSIZE2: Nbre d'elements utiles de TABLE2 sur la 2eme dimension */ -/* IERCOD: Code d'erreur. */ +/* TABLE2: Table of reals by two dimensions, containing the transposition +/* of the rectangular table TABLE1. */ +/* ISIZE2: Nb of useful elements of TABLE2 on the 1st dimension */ +/* JSIZE2: Nb of useful elements of TABLE2 on the 2nd dimension */ +/* IERCOD: Erroe coder. */ /* = 0, ok. */ -/* = 1, erreur dans le dimensionnement des tables */ -/* soit MAXSZ1 < ISIZE1 (tableau TABLE1 trop petit). */ -/* soit MAXSZ2 < JSIZE1 (tableau TABLE2 trop petit). */ +/* = 1, error in the dimension of tables */ +/* ether MAXSZ1 < ISIZE1 (table TABLE1 too small). */ +/* or MAXSZ2 < JSIZE1 (table TABLE2 too small). */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* On peut utiliser TABLE1 comme tableau d'entree et de sortie i.e. */ -/* l'appel: */ +/* It is possible to use TABLE1 as input and output table i.e. */ +/* call: */ /* CALL MMFMTB1(MAXSZ1,TABLE1,ISIZE1,JSIZE1,MAXSZ2,TABLE1 */ /* ,ISIZE2,JSIZE2,IERCOD) */ -/* est valable. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 07-06-91: RBD; Creation d'apres VCRINV de NAK. */ +/* is valuable. */ /* > */ /* ********************************************************************** */ @@ -5092,7 +4819,7 @@ int AdvApp2Var_MathBase::mmfmtb1_(integer *maxsz1, goto L9200; } -/* NE PAS CRAINDRE D'ECRASEMENT. */ +/* DO NOT BE AFRAID OF CRUSHING. */ i__1 = *isize1; for (ii = 1; ii <= i__1; ++ii) { @@ -5110,7 +4837,7 @@ int AdvApp2Var_MathBase::mmfmtb1_(integer *maxsz1, (char *)&work[iofst], (char *)&table2[table2_offset]); -/* -------------- On recupere le nombre d'elements de TABLE2 ------------ +/* -------------- The number of elements of TABLE2 is returned ------------ */ ii = *isize1; @@ -5121,11 +4848,11 @@ int AdvApp2Var_MathBase::mmfmtb1_(integer *maxsz1, /* ------------------------------- THE END ------------------------------ */ -/* --> Entree invalide. */ +/* --> Invalid input. */ L9100: *iercod = 1; goto L9999; -/* --> Pb d'alloc. */ +/* --> Pb of allocation. */ L9200: *iercod = 2; goto L9999; @@ -5174,109 +4901,95 @@ int AdvApp2Var_MathBase::mmgaus1_(integer *ndimf, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* -------- */ -/* Calcul de l'integrale de la fonction BFUNX passee en parametre */ -/* entre les bornes XD et XF . */ -/* La fonction doit etre calculable pour n'importe quelle valeur */ -/* de la variable dans l'intervalle donne.. */ -/* La methode utilisee est celle de GAUSS-LEGENDRE. Des explications -*/ -/* peuvent etre obtenus sur le livre : */ +/* Calculate the integral of function BFUNX passed in parameter */ +/* between limits XD and XF . */ +/* The function should be calculated for any value */ +/* of the variable in the given interval.. */ +/* The method GAUSS-LEGENDRE is used. +/* For explications refer to the book : */ /* Complements de mathematiques a l'usage des Ingenieurs de */ /* l'electrotechnique et des telecommunications. */ /* Par Andre ANGOT - Collection technique et scientifique du CNET */ /* page 772 .... */ -/* Le degre des polynomes de LEGENDRE utilise est passe en parametre. +/* The degree of LEGENDRE polynoms used is passed in parameter. */ - -/* MOTS CLES : */ +/* KEYWORDS : */ /* --------- */ /* INTEGRATION,LEGENDRE,GAUSS */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMF : Dimension de la fonction */ -/* BFUNX : Fonction a integrer passee en argument */ -/* Doit etre declaree en EXTERNAL dans la routine d'appel. */ +/* NDIMF : Dimension of the function */ +/* BFUNX : Function to integrate passed as argument */ +/* Should be declared as EXTERNAL in the call routine. */ /* SUBROUTINE BFUNX(NDIMF,X,VAL,IER) */ /* REAL *8 X,VAL */ -/* K : Parametre determinant le degre du polynome de LEGENDRE qui +/* K : Parameter determining the degree of the LEGENDRE polynom that */ -/* peut prendre une valeur comprise entre 0 et 10. */ -/* Le degre du polynome est egal a 4 k, c'est a dire 4, 8, +/* can take a value between 0 and 10. */ +/* The degree of the polynom is equal to 4 k, that is 4, 8, */ -/* 12, 16, 20, 24, 28, 32, 36 et 40. */ -/* Si K n'est pas bon, le degre est pris a 40 directement. +/* 12, 16, 20, 24, 28, 32, 36 and 40. */ +/* If K is not correct, the degree is set to 40 directly. */ -/* XD : Borne inferieure de l'intervalle d'integration. */ -/* XF : Borne superieure de l'intervalle d'integration. */ -/* SAUX1 : Tableau auxiliaire */ -/* SAUX2 : Tableau auxiliaire */ +/* XD : Lower limit of the interval of integration. */ +/* XF : Upper limit of the interval of integration. */ +/* SAUX1 : Auxiliary table */ +/* SAUX2 : Auxiliary table */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* SOMME : Valeur de l'integrale */ -/* NITER : Nombre d'iterations effectues. */ -/* Il est egal au degre du polynome. */ +/* SOMME : Value of the integral */ +/* NITER : Number of iterations to be carried out. */ +/* It is equal to the degree of the polynom. */ -/* IER : Code d'erreur : */ +/* IER : Error code : */ /* < 0 ==> Attention - Warning */ -/* = 0 ==> Tout est OK */ -/* > 0 ==> Erreur severe - Faire un traitement special */ -/* ==> Erreur dans le calcul de BFUNX (code de retour */ -/* de cette routine */ +/* = 0 ==> Everything is OK */ +/* > 0 ==> Critical error - Apply special processing */ +/* ==> Error in the calculation of BFUNX (return code */ +/* of this routine */ -/* Si erreur => SOMME = 0 */ +/* If error => SUM = 0 */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ----------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* @ BFUNX MVGAUS0 */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* --------------------------------- */ -/* Voir les explications detaillees sur le listing */ - -/* Utilisation de la methode de GAUSS (polynomes orthogonaux) */ -/* On utilise la symetrie des racines de ces polynomes */ - -/* En fonction de K, le degre du polynome d'interpolation augmente. +/* See the explanations detailed in the listing */ +/* Use of the GAUSS method (orthogonal polynoms) */ +/* The symmetry of roots of these polynomes is used */ +/* Depending on K, the degree of the interpolated polynom grows. */ -/* Si vous voulez calculer l'integrale avec une precision donnee, */ -/* boucler sur k variant de 1 a 10 et tester la difference de 2 iteres +/* If you wish to calculate the integral with a given precision, */ +/* loop on k varying from 1 to 10 and test the difference of 2 */ -/* consecutifs. Arreter la boucle si cette difference est inferieure -*/ -/* a une valeur epsilon fixee a 10E-6 par exemple. */ -/* Si S1 et S2 sont 2 iteres successifs, tester suivant cet exemple : +/* consecutive iterations. Stop the loop if this difference is less that +/* an epsilon value set to 10E-6 for example. */ +/* If S1 and S2 are 2 successive iterations, test following this example : */ /* AF=DABS(S1-S2) */ /* AS=DABS(S2) */ -/* Si AS < 1 alors tester si FS < eps sinon tester AF/AS < eps +/* If AS < 1 test if FS < eps otherwise test if AF/AS < eps */ /* -- ----- ----- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ---------------------------- */ -/* 3-09-1993 : PMN; CREATION D'APRES VGAUS1 (SAUX1 et SAUX2 en */ -/* arguments) */ -/* . 04-10-89 : JP;AJOUT EXTERNAL BFUNX SGI_420_144 */ -/* . 20-08-87 : JP;INTEGRATION D'UNE FONCTION VECTORIELLE */ -/* . 08-08-87 : GD; Version originale */ - /* > */ /************************************************************************ ******/ @@ -5286,7 +4999,7 @@ int AdvApp2Var_MathBase::mmgaus1_(integer *ndimf, -/* ****** Initialisation generale ** */ +/* ****** General Initialization */ /* Parameter adjustments */ --somme; @@ -5298,7 +5011,7 @@ int AdvApp2Var_MathBase::mmgaus1_(integer *ndimf, (char *)&somme[1]); *iercod = 0; -/* ****** Chargement des coefficients U et H ** */ +/* ****** Loading of coefficients U and H ** */ /* -------------------------------------------- */ mvgaus0_(k, u, h__, &ndeg, iercod); @@ -5306,14 +5019,14 @@ int AdvApp2Var_MathBase::mmgaus1_(integer *ndimf, goto L9999; } -/* ****** C1X => Point milieu intervalle [XD,XF] */ -/* ****** C2X => 1/2 amplitude intervalle [XD,XF] */ +/* ****** C1X => Medium interval point [XD,XF] */ +/* ****** C2X => 1/2 amplitude interval [XD,XF] */ c1x = (*xf + *xd) * .5; c2x = (*xf - *xd) * .5; /* ---------------------------------------- */ -/* ****** Integration pour un degre NDEG ** */ +/* ****** Integration for degree NDEG ** */ /* ---------------------------------------- */ i__1 = ndeg; @@ -5345,7 +5058,7 @@ int AdvApp2Var_MathBase::mmgaus1_(integer *ndimf, somme[idimf] *= c2x; } -/* ****** Fin du sous-programme ** */ +/* ****** End of sub-program ** */ L9999: @@ -5383,59 +5096,52 @@ int mmherm0_(doublereal *debfin, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* INIT DES COEFFS. DES POLYNOMES D'INTERPOL. D'HERMITE */ +/* INIT OF COEFFS. OF POLYNOMS OF HERMIT INTERPOLATION */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* MATH_ACCES :: HERMITE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS */ /* -------------------- */ -/* DEBFIN : PARAMETRES OU SONT DONNEES LES CONTRAINTES */ -/* DEBFIN(1) : PREMIER PARAMETRE */ -/* DEBFIN(2) : DEUXIEME PARAMETRE */ +/* DEBFIN : PARAMETERS DEFINING THE CONSTRAINTS */ +/* DEBFIN(1) : FIRST PARAMETER */ +/* DEBFIN(2) : SECOND PARAMETER */ -/* ON DOIT AVOIR: */ +/* ONE SHOULD HAVE: */ /* ABS (DEBFIN(I)) < 100 */ -/* et */ +/* and */ /* (ABS(DEBFIN(1)+ABS(DEBFIN(2))) > 1/100 */ -/* (pour les overflows) */ +/* (for overflows) */ /* ABS(DEBFIN(2)-DEBFIN(1)) / (ABS(DEBFIN(1)+ABS(DEBFIN(2))) > 1/100 */ -/* (pour le conditionnement ) */ +/* (for the conditioning) */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* IERCOD : Code d'erreur : 0 : O.K. */ -/* 1 : LES valeur de DEBFIN */ -/* ne sont pas raisonnables */ -/* -1 : L'init etait deja faite */ -/* (OK mais pas de traitement) */ +/* IERCOD : Error code : 0 : O.K. */ +/* 1 : value of DEBFIN */ +/* are unreasonable */ +/* -1 : init was already done */ +/* (OK but no processing) */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Ce programme initialise les coefficients des polynomes */ -/* d'Hermite qui sont ensuite lus par MMHERM1 */ - -/* HISTORIQUE */ -/* --------------------------------------------------------- */ -/* 06-01-92: ALR; mise a 0 des termes de MAT non recalcules */ -/* 23-12-91: ALR; 2 CORRECTIONS */ -/* 12-11-91: ALR; ECRITURE VERSION ORIGINALE. */ -/* > */ +/* This program initializes the coefficients of Hermit polynoms */ +/* that are read later by MMHERM1 */ /* *********************************************************************** */ @@ -5444,25 +5150,19 @@ int mmherm0_(doublereal *debfin, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a STOCKER les coefficients des polynomes de */ -/* l'interpolation d'Hermite */ +/* Used to STORE coefficients of Hermit interpolation polynoms -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* HERMITE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* les coefficients des polynomes d'hermitesont calcules par */ -/* la routine MMHERM0 et lus par la routine MMHERM1 */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 23-11-91: ALR; MODIF DIMENSIONNEMENT */ -/* 12-11-91: ALR; CREATION */ +/* The coefficients of hermit polynoms are calculated by */ +/* the routine MMHERM0 and read by the routine MMHERM1 */ /* > */ /* ********************************************************************** */ @@ -5471,10 +5171,7 @@ int mmherm0_(doublereal *debfin, -/* NBCOEF est la taille de CMHERM (voir plus bas) */ - - - +/* NBCOEF is the size of CMHERM (see below) */ /* *********************************************************************** */ @@ -5486,7 +5183,7 @@ int mmherm0_(doublereal *debfin, /* *********************************************************************** */ -/* Verification des donnees */ +/* Data checking */ /* *********************************************************************** */ @@ -5518,7 +5215,7 @@ int mmherm0_(doublereal *debfin, /* *********************************************************************** */ -/* Initialisations */ +/* Initialization */ /* *********************************************************************** */ @@ -5530,7 +5227,7 @@ int mmherm0_(doublereal *debfin, /* *********************************************************************** */ -/* EST-CE DEJA INITIALISE ? */ +/* IS IT ALREADY INITIALIZED ? */ d1 = abs(debfin[1]) + abs(debfin[2]); d1 *= 16111959; @@ -5551,14 +5248,14 @@ int mmherm0_(doublereal *debfin, /* *********************************************************************** */ -/* CALCUL */ +/* CALCULATION */ /* *********************************************************************** */ L100: -/* Init. matrice identite: */ +/* Init. matrix identity : */ ncmat = 36; AdvApp2Var_SysBase::mvriraz_((integer *)&ncmat, @@ -5571,11 +5268,11 @@ L100: -/* Init a 0 du tableau CMHERM */ +/* Init to 0 of table CMHERM */ AdvApp2Var_SysBase::mvriraz_((integer *)&c__576, (char *)mmcmher_.cmherm); -/* Calcul par resolution de systemes lineaires */ +/* Calculation by solution of linear systems */ for (iord1 = -1; iord1 <= 2; ++iord1) { for (iord2 = -1; iord2 <= 2; ++iord2) { @@ -5590,7 +5287,7 @@ L100: ncf = iord[0] + iord[1] + 2; -/* Calcul matrice MAT a inverser: */ +/* Calculate matrix MAT to invert: */ for (cot = 1; cot <= 2; ++cot) { @@ -5620,7 +5317,7 @@ L100: i__2 = ncf; for (jj = pp; jj <= i__2; ++jj) { -/* tout se passe dans ces 3 lignes peu lisibles +/* everything is done in these 3 lines */ mat[ii + jj * 6 - 7] = cof[jj - 1] * prod; @@ -5668,7 +5365,7 @@ L100: /* *********************************************************************** */ -/* On positionne le flag initialise: */ +/* The initialized flag is located: */ mmcmher_.tdebut = debfin[1]; mmcmher_.tfinal = debfin[2]; @@ -5726,71 +5423,63 @@ int mmherm1_(doublereal *debfin, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* lecture des coeffs. des polynomes d'interpol. d'HERMITE */ +/* reading of coeffs. of HERMIT interpolation polynoms */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* MATH_ACCES :: HERMITE */ +/* MATH_ACCES :: HERMIT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* DEBFIN : PARAMETRES OU SONT DONNEES LES CONTRAINTES */ -/* DEBFIN(1) : PREMIER PARAMETRE */ -/* DEBFIN(2) : DEUXIEME PARAMETRE */ +/* DEBFIN : PARAMETES DEFINING THE CONSTRAINTS */ +/* DEBFIN(1) : FIRST PARAMETER */ +/* DEBFIN(2) : SECOND PARAMETER */ -/* Doivent etre egaux aux argeuments correspondant lors */ -/* du dernier appel a MMHERM0 pour l'init. des coeffs. */ +/* Should be equal to the corresponding arguments during the */ +/* last call to MMHERM0 for the initialization of coeffs. */ -/* ORDRMX : sert a indiquer le dimensionnent de HERMIT: */ -/* on n'a pas le choix : ORDRMX doit etre egal a la valeur */ -/* du PARAMETER IORDMX de l'INCLUDE MMCMHER, soit 2 pour */ -/* l'instant. */ +/* ORDRMX : indicates the dimensioning of HERMIT: */ +/* there is no choice : ORDRMX should be equal to the value */ +/* of PARAMETER IORDMX of INCLUDE MMCMHER, or 2 for the moment */ -/* IORDRE (2) : Ordres de contraintes en chaque parametre DEBFIN(I) -*/ -/* corrspondant. doivent etre compris entre -1 (pas de */ -/* contrainte) et ORDRMX. */ +/* IORDRE (2) : Orders of constraints in each corresponding parameter DEBFIN(I) +/* should be between -1 (no constraints) and ORDRMX. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* HERMIT : HERMIT(1:IORDRE(1)+IORDRE(2)+2, j, cote) sont les */ -/* coefficients dans la base canonique du polynome d'Hermite */ -/* correspondant aux ordres IORDRE aux paramtres DEBFIN pour */ -/* la contrainte d'ordre j en DEBFIN(cote). j est compris entre */ -/* 0 et IORDRE(cote). */ +/* HERMIT : HERMIT(1:IORDRE(1)+IORDRE(2)+2, j, cote) are the */ +/* coefficients in the canonic base of Hermit polynom */ +/* corresponding to orders IORDRE with parameters DEBFIN for */ +/* the constraint of order j on DEBFIN(cote). j is between 0 and IORDRE(cote). */ -/* IERCOD : Code d'erreur : */ -/* -1: O.K mais on a du reinitialise les coefficients */ -/* (info pour optimisation) */ +/* IERCOD : Error code : */ +/* -1: O.K but necessary to reinitialize the coefficients */ +/* (info for optimization) */ /* 0 : O.K. */ -/* 1 : Erreur dans MMHERM0 */ -/* 2 : arguments invalides */ +/* 1 : Error in MMHERM0 */ +/* 2 : arguments invalid */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Ce programme lit les coefficients des polynomes */ -/* d'Hermite qui ont ete au prealable initialise par MMHERM0 */ +/* This program reads coefficients of Hermit polynoms */ +/* that were earlier initialized by MMHERM0 */ + +/* PMN : initialisation is no more done by the caller. */ -/* PMN : L'initialisation n'est plus a la charge de l'appelant. */ -/* HISTORIQUE */ -/* --------------------------------------------------------- */ -/* 14-01-94: PMN; On appelle MMHERM0 si pas initialise. */ -/* 12-11-91: ALR; ECRITURE VERSION ORIGINALE. */ -/* > */ /* *********************************************************************** */ @@ -5799,25 +5488,20 @@ int mmherm1_(doublereal *debfin, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a STOCKER les coefficients des polynomes de */ -/* l'interpolation d'Hermite */ +/* Serves to STORE the coefficients of Hermit interpolation polynoms -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* HERMITE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* les coefficients des polynomes d'hermitesont calcules par */ -/* la routine MMHERM0 et lus par la routine MMHERM1 */ +/* the coefficients of Hetmit polynoms are calculated by */ +/* routine MMHERM0 and read by routine MMHERM1 */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 23-11-91: ALR; MODIF DIMENSIONNEMENT */ -/* 12-11-91: ALR; CREATION */ /* > */ /* ********************************************************************** */ @@ -5826,7 +5510,7 @@ int mmherm1_(doublereal *debfin, -/* NBCOEF est la taille de CMHERM (voir plus bas) */ +/* NBCOEF is the size of CMHERM (see lower) */ @@ -5839,7 +5523,7 @@ int mmherm1_(doublereal *debfin, /* *********************************************************************** */ -/* Initialisations */ +/* Initializations */ /* *********************************************************************** */ @@ -5857,7 +5541,7 @@ int mmherm1_(doublereal *debfin, /* *********************************************************************** */ -/* Verification des donnees */ +/* Data Checking */ /* *********************************************************************** */ @@ -5877,12 +5561,12 @@ int mmherm1_(doublereal *debfin, } -/* EST-CE BIEN INITIALISE ? */ +/* IS-IT CORRECTLY INITIALIZED ? */ d1 = abs(debfin[1]) + abs(debfin[2]); d1 *= 16111959; -/* SINON ON INITIALISE */ +/* OTHERWISE IT IS INITIALIZED */ if (debfin[1] != mmcmher_.tdebut || debfin[2] != mmcmher_.tfinal || d1 != mmcmher_.verifi) { @@ -5896,7 +5580,7 @@ int mmherm1_(doublereal *debfin, /* *********************************************************************** */ -/* LECTURE */ +/* READING */ /* *********************************************************************** */ @@ -5971,54 +5655,41 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* CONVERSION LA TABLE TCBOLD DES COEFFICIENTS DES COURBES */ -/* POLYNOMIALES EXPRIMEES DANS LA BASE HERMITE JACOBI, EN UNE */ -/* TABLE DE COEFFICIENTS TCBNEW DES COURBES EXPRIMEES DANS LA */ -/* BASE CANONIQUE */ +/* CONVERSION OF TABLE TCBOLD OF POLYNOMIAL CURVE COEFFICIENTS */ +/* EXPRESSED IN HERMIT JACOBI BASE, INTO A */ +/* TABLE OF COEFFICIENTS TCBNEW OF COURVES EXPRESSED IN THE CANONIC BASE */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* CANNONIQUE, HERMITE, JACCOBI */ +/* CANNONIC, HERMIT, JACCOBI */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* ORDHER : ORDRE DES POLYNOMES D'HERMITE OU ORDRE DE CONTINUITE */ -/* NCOEFS : NOMBRE DE COEFFICIENTS DE UNE LA COURBE POLYNOMIALE */ -/* POUR UNE DE SES NDIM COMPOSANTS;(DEGRE+1 DE LA COURBE) +/* ORDHER : ORDER OF HERMIT POLYNOMS OR ORDER OF CONTINUITY */ +/* NCOEFS : NUMBER OF COEFFICIENTS OF A POLYNOMIAL CURVE */ +/* FOR ONE OF ITS NDIM COMPONENTS;(DEGREE+1 OF THE CURVE) */ -/* NDIM : DIMENSION DE LA COURBE */ -/* CBHEJA : TABLE DE COEFFICIENTS DE LA COURBE DANS LA BASE */ -/* HERMITE JACOBI */ +/* NDIM : DIMENSION OF THE CURVE */ +/* CBHEJA : TABLE OF COEFFICIENTS OF THE CURVE IN THE BASE */ +/* HERMIT JACOBI */ /* (H(0,-1),..,H(ORDHER,-1),H(0,1),..,H(ORDHER,1), */ /* JA(ORDHER+1,2*ORDHER+2),....,JA(ORDHER+1,NCOEFS-1) */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* CBRCAN : TABLE DE COEFFICIENTS DE LA COURBE DANS LA BASE */ -/* CANONIQUE */ +/* CBRCAN : TABLE OF COEFFICIENTS OF THE CURVE IN THE CANONIC BASE */ /* (1, t, ...) */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ - - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 8-09-95 : KHN/PMN; ECRITURE VERSION ORIGINALE. */ -/* > */ -/* *********************************************************************** - */ -/* DECLARATIONS */ /* *********************************************************************** */ @@ -6026,20 +5697,16 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a fournir les constantes entieres de 0 a 1000 */ +/* Providesinteger constants from 0 to 1000 */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS,ENTIERS */ +/* ALL, INTEGER */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 11-10-89 : DH ; Creation version originale */ /* > */ /* *********************************************************************** */ @@ -6053,7 +5720,7 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen, /* *********************************************************************** */ -/* INITIALISATIONS */ +/* INITIALIZATION */ /* *********************************************************************** */ @@ -6080,7 +5747,7 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen, /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ @@ -6091,7 +5758,7 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen, goto L9101; } -/* CALCUL DES POLYNOMES D'HERMITE DANS LA BASE CANONIQUE SUR (-1,1) */ +/* CALCULATION OF HERMIT POLYNOMS IN THE CANONIC BASE ON (-1,1) */ iordre[0] = *orcont; @@ -6118,9 +5785,8 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen, i__2 = *ndimen; for (d__ = 1; d__ <= i__2; ++d__) { -/* CONVERSION DES COEFFICIENTS DE LA PARTIE DE LA COURBE EXPRI -MEE */ -/* DANS LA BASE HERMITE, DANS LA BASE CANONIQUE */ +/* CONVERSION OF THE COEFFICIENTS OF THE PART OF THE CURVE EXPRESSED */ +/* IN HERMIT BASE, INTO THE CANONIC BASE */ AdvApp2Var_SysBase::mvriraz_((integer *)&ncoeff, (char *)taux1); @@ -6145,17 +5811,16 @@ MEE */ tcbold_dim1]; } -/* CONVERSION DES COEFFICIENTS DE LA PARTIE DE LA COURBE EXPRI -MEE */ -/* DANS LA BASE CANONIQUE-JACOBI , DANS LA BASE CANONIQUE */ +/* CONVERSION OF THE COEFFICIENTS OF THE PART OF THE CURVE EXPRESSED */ +/* IN CANONIC-JACOBI BASE, INTO THE CANONIC BASE */ + AdvApp2Var_MathBase::mmapcmp_(&minombr_.nbr[1], &c__21, &ncoeff, taux1, tjacap); AdvApp2Var_MathBase::mmjacan_(orcont, &ndeg, tjacap, taux1); -/* RECOPIE DES COEFS RESULTANT DE LA CONVERSION DANS LA TA -BLE */ -/* DES RESULTAT */ +/* RECOPY THE COEFS RESULTING FROM THE CONVERSION IN THE TABLE */ +/* OF RESULTS */ i__3 = ncoeff; for (i__ = 1; i__ <= i__3; ++i__) { @@ -6170,7 +5835,7 @@ BLE */ /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* PROCESSING OF ERRORS */ /* *********************************************************************** */ @@ -6183,7 +5848,7 @@ L9102: /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -6221,66 +5886,61 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* . Insertion d'une ligne dans une table triee sans redondance */ +/* . Insert a line in a table parsed without redundance */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,MATH_ACCES :: TABLEAU&,INSERTION,&TABLEAU */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* . NCOLMX : Nombre de colonnes du tableau */ -/* . NLGNMX : Nombre de lignes du tableau */ -/* . TABTRI : Tableau trie par lignes sans redondances */ -/* . NBRCOL : Nombre de colonnes utilisees */ -/* . NBRLGN : Nombre de lignes utilisees */ -/* . AJOUTE : Ligne a ajouter */ -/* . EPSEGA : Epsilon pour le test de redondance */ - -/* ARGUMENTS DE SORTIE : */ +/* . NCOLMX : Number of columns in the table */ +/* . NLGNMX : Number of lines in the table */ +/* . TABTRI : Table parsed by lines without redundances */ +/* . NBRCOL : Number of columns used */ +/* . NBRLGN : Number of lines used */ +/* . AJOUTE : Line to be added */ +/* . EPSEGA : Epsilon to test the redundance */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* . TABTRI : Tableau trie par lignes sans redondances */ -/* . NBRLGN : Nombre de lignes utilisees */ -/* . IERCOD : 0 -> Pas de probleme */ -/* 1 -> La table est pleine */ +/* . TABTRI : Table parsed by lines without redundances */ +/* . NBRLGN : Number of lines used */ +/* . IERCOD : 0 -> No problem */ +/* 1 -> The table is full */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* . On n'insere la ligne que si il n'y a pas de ligne tq tous ses +/* . The line is inserted only if there is no line with all */ -/* elements soient egaux a ceux qu'on veut inserer a epsilon pres. */ +/* elements equl to those which are planned to be insered, to epsilon. */ -/* . Niveau de debug = 3 */ +/* . Level of de debug = 3 */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* . 24-06-91 : RBD; Suppression des accents (Pb. Bull). */ -/* . 01-10-89 : VV ; Version originale */ -/* > */ -/* *********************************************************************** - */ -/* DECLARATIONS , CONTROLE DES ARGUMENTS D'ENTREE , INITIALISATION */ + +/* +/* DECLARATIONS , CONTROL OF INPUT ARGUMENTS , INITIALIZATION */ /* *********************************************************************** */ -/* --- Parametres */ +/* --- Parameters */ -/* --- Fonctions */ +/* --- Functions */ -/* --- Variables locales */ +/* --- Local variables */ -/* --- Messagerie */ +/* --- Messages */ /* Parameter adjustments */ tabtri_dim1 = *ncolmx; @@ -6295,20 +5955,20 @@ L9999: AdvApp2Var_SysBase::mgenmsg_("MMINLTT", 7L); } -/* --- Controle arguments */ +/* --- Control arguments */ if (*nbrlgn >= *nlgnmx) { goto L9001; } /* -------------------- */ -/* *** INITIALISATIONS */ +/* *** INITIALIZATION */ /* -------------------- */ *iercod = 0; /* ---------------------------- */ -/* *** RECHERCHE DE REDONDANCE */ +/* *** SEARCH OF REDUNDANCE */ /* ---------------------------- */ i__1 = *nbrlgn; @@ -6334,7 +5994,7 @@ L20: } /* ----------------------------------- */ -/* *** RECHERCHE DU POINT D'INSERTION */ +/* *** SEARCH OF THE INSERTION POINT */ /* ----------------------------------- */ L30: @@ -6366,7 +6026,7 @@ L70: inser = ilgn; ++(*nbrlgn); -/* --- Decalage vers le bas */ +/* --- Shift lower */ nlgn = *nbrlgn - inser; if (nlgn > 0) { @@ -6376,7 +6036,7 @@ L70: (char *)&tabtri[(inser + 1)* tabtri_dim1 + 1]); } -/* --- Copie de la ligne */ +/* --- Copy line */ noct = *nbrcol << 3; AdvApp2Var_SysBase::mcrfill_((integer *)&noct, @@ -6386,15 +6046,15 @@ L70: goto L9999; /* ******************************************************************** */ -/* SORTIE ERREUR , RETOUR PROGRAMME APPELANT , MESSAGERIE */ +/* OUTPUT ERROR , RETURN CALLING PROGRAM , MESSAGES */ /* ******************************************************************** */ -/* --- La table est deja pleine */ +/* --- The table is already full */ L9001: *iercod = 1; -/* --- Fin */ +/* --- End */ L9999: if (*iercod != 0) { @@ -6425,82 +6085,68 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Routine de transfert de Jacobi normalise a canonique [-1,1], les */ -/* tableaux etant ranges en termes de degre pair puis impair. */ +/* Routine of transfer of Jacobi normalized to canonic [-1,1], */ +/* the tables are ranked by even, then by uneven degree. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* LEGENDRE,JACOBI,PASSAGE. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* IDERIV : Ordre de Jacobi compris entre -1 et 2. */ -/* NDEG : Le degre vrai du polynome. */ -/* POLJAC : Le polynome dans la base de Jacobi. */ +/* IDERIV : Order of Jacobi between -1 and 2. */ +/* NDEG : The true degree of the polynom. */ +/* POLJAC : The polynom in the Jacobi base. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* POLCAN : La courbe exprimee dans la base canonique [-1,1]. */ +/* POLCAN : The curve expressed in the canonic base [-1,1]. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 04-01-90 : NAK ; COMMON MMJCOBI PAR INCLUDE MMJCOBI */ -/* 12-04-1989 : RBD ; Appel MGSOMSG. */ -/* 27-04-1988 : JJM ; Test NDEG=0 */ -/* 01-03-1988 : JJM ; Creation. */ - /* > */ /* *********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ -/* Matrices de conversion */ +/* Matrices of conversion */ /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* MATRICE DE TRANSFORMATION DS LA BASE DE LEGENDRE */ +/* MATRIX OF TRANSFORMATION OF LEGENDRE BASE */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* MATH */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 04-01-90 : NAK ; Creation version originale */ /* > */ /* *********************************************************************** */ -/* Common de Legendre/Casteljau comprime. */ - -/* 0:1 0 Concerne les termes pairs, 1 les termes impairs. */ -/* CANPLG : Matrice de passage de canonique vers Jacobi avec parites */ -/* comptees */ -/* PLGCAN : Matrice de passage de Jacobi vers canonique avec parites */ -/* comptees. */ - +/* Legendre common / Restricted Casteljau. */ +/* 0:1 0 Concerns the even terms, 1 the uneven terms. */ +/* CANPLG : Matrix of passage to canonic from Jacobi with calculated parities */ +/* PLGCAN : Matrix of passage from Jacobi to canonic with calculated parities */ /* *********************************************************************** @@ -6515,7 +6161,7 @@ L9999: AdvApp2Var_SysBase::mgenmsg_("MMJACAN", 7L); } -/* ----------------- Expression des termes de degre pair ---------------- +/* ----------------- Expression of terms of even degree ---------------- */ i__1 = *ndeg / 2; @@ -6532,7 +6178,7 @@ L9999: /* L300: */ } -/* --------------- Expression des termes de degre impair ---------------- +/* --------------- Expression of terms of uneven degree ---------------- */ if (*ndeg == 0) { @@ -6589,46 +6235,41 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Passage de la base de Jacobi normalisee a la base canonique. */ +/* Passage from the normalized Jacobi base to the canonic base. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LISSAGE,BASE,LEGENDRE */ +/* SMOOTHING, BASE, LEGENDRE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIM: Dimension de l' espace. */ -/* NCOEF: Degre +1 du polynome. */ -/* IDER: Ordre des polynomes de Jacobi. */ -/* CRVLGD : La courbe dans la base de Jacobi. */ +/* NDIM: Space Dimension. */ +/* NCOEF: Degree +1 of the polynom. */ +/* IDER: Order of Jacobi polynoms. */ +/* CRVLGD : Curve in the base of Jacobi. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* POLAUX : Espace auxilliaire. */ -/* CRVCAN : La courbe dans la base canonique [-1,1] */ +/* POLAUX : Auxilliary space. */ +/* CRVCAN : The curve in the canonic base [-1,1] */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 26-04-1988 : RBD ; Cas de la courbe reduite a 1 point. */ -/* 01-03-1988 : JJM ; Creation. */ - /* > */ /* ********************************************************************* */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ polaux_dim1 = (*ncoef - 1) / 2 + 1; crvcan_dim1 = *ncoef - 1 + 1; @@ -6649,7 +6290,7 @@ L9999: i__1 = *ndim; for (nd = 1; nd <= i__1; ++nd) { -/* Chargement du tableau auxilliaire. */ +/* Loading of the auxilliary table. */ ii = 0; i__2 = ndeg / 2; for (i__ = 0; i__ <= i__2; ++i__) { @@ -6667,7 +6308,7 @@ L9999: /* L320: */ } } -/* Appel a la routine de changement de base. */ +/* Call the routine of base change. */ AdvApp2Var_MathBase::mmjacan_(ider, &ndeg, polaux, &crvcan[nd * crvcan_dim1]); /* L300: */ } @@ -6712,102 +6353,79 @@ int mmloncv_(integer *ndimax, /* ********************************************************************** */ -/* FONCTION : Longueur d'un arc de courbe sur un intervalle donne */ -/* ---------- pour une fonction dont la representation mathematique */ -/* est faite un polynome multidimensionnel. */ -/* Le polynome est en fait un ensemble de polynomes dont les coeffi- -*/ -/* cients sont ranges dans un tableau a 2 indices, chaque ligne */ -/* etant relative a 1 polynome. */ -/* Le polynome est defini par ses coefficients ordonne par les puis- -*/ -/* sances croissantes de la variable. */ -/* Tous les polynomes ont le meme nombre de coefficients (donc le */ -/* meme degre). */ +/* FUNCTION : Length of an arc of curve on a given interval */ +/* ---------- for a function the mathematic representation */ +/* which of is a multidimensional polynom. */ +/* The polynom is a set of polynoms the coefficients which of are ranked + /* in a table with 2 indices, each line relative to 1 polynom. */ +/* The polynom is defined by its coefficients ordered by increasing +* power of the variable. */ +/* All polynoms have the same number of coefficients (and the same degree). */ -/* MOTS CLES : LONGUEUR, COURBE */ +/* KEYWORDS : LENGTH, CURVE */ /* ----------- */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* NDIMAX : Nombre de lignes maximum des tableaux */ -/* (nombre maxi de polynomes). */ -/* NDIMEN : Dimension du polynome (Nombre de polynomes). */ -/* NCOEFF : Nombre de coefficients du polynome (pas de limitation) */ -/* C'est le degre + 1 */ -/* COURBE : Coefficients du polynome ordonne par les puissances */ -/* croissantes. A dimensionner a (NDIMAX,NCOEFF). */ -/* TDEBUT : Bornes inferieure de l'integration pour calcul de la */ -/* longueur. */ -/* TFINAL : Bornes superieure de l'integration pour calcul de la */ -/* longueur. */ - -/* ARGUMENTS DE SORTIE : */ +/* NDIMAX : Max number of lines of tables (max number of polynoms). */ +/* NDIMEN : Dimension of the polynom (Nomber of polynoms). */ +/* NCOEFF : Number of coefficients of the polynom (no limitation) */ +/* This is degree + 1 */ +/* COURBE : Coefficients of the polynom ordered by increasing power */ +/* Dimension to (NDIMAX,NCOEFF). */ +/* TDEBUT : Lower limit of integration for length calculation. */ +/* TFINAL : Upper limit of integration for length calculation. */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* XLONGC : Longueur de l'arc de courbe */ +/* XLONGC : Length of arc of curve */ -/* IERCOD : Code d'erreur : */ -/* = 0 ==> Tout est OK */ -/* = 1 ==> NDIMEN ou NCOEFF negatif ou nul */ -/* = 2 ==> Pb chargement racines Legendre et poids de Gauss */ -/* par MVGAUS0. */ +/* IERCOD : Error code : */ +/* = 0 ==> All is OK */ +/* = 1 ==> NDIMEN or NCOEFF negative or null */ +/* = 2 ==> Pb loading Legendre roots and Gauss weight */ +/* by MVGAUS0. */ -/* Si erreur => XLONGC = 0 */ +/* If error => XLONGC = 0 */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ /* .Neant. */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* MAERMSG R*8 DSQRT I*4 MIN */ /* MVGAUS0 */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Voir VGAUSS pour bien comprendre la technique. */ -/* On integre en verite SQRT (dpi^2) pour i=1,nbdime */ -/* Le calcul de la derivee est mele dans le code pour ne pas faire */ -/* un appel supplementaire a une routine. */ +/* See VGAUSS to understand well the technique. */ +/* Actually SQRT (dpi^2) is integrated for i=1,nbdime */ +/* Calculation of the derivative is included in the code to avoid an additional */ +/* call of the routine. */ -/* La fonction que l'on integre est strictement croissante, il */ -/* n'est pas necessaire d'utiliser un haut degre pour la methode */ -/* GAUSS */ +/* The integrated function is strictly increasing, it */ +/* is not necessary to use a high degree for the GAUSS method GAUSS. */ -/* Le degre du polynome de LEGENDRE est fonction du degre du */ -/* polynome a integrer. Il peut varier de 4 a 40 (par pas de 4). */ +/* The degree of LEGENDRE polynom results from the degree of the */ +/* polynom to be integrated. It can vary from 4 to 40 (with step of 4). */ -/* La precision (relative) de l'integration est de l'ordre */ -/* de 1.D-8. */ +/* The precision (relative) of integration is of order 1.D-8. */ -/* ATTENTION : si TDEBUT > TFINAL, la longueur est alors NEGATIVE. */ +/* ATTENTION : if TDEBUT > TFINAL, the length is NEGATIVE. */ -/* Attention : la precision sur le resultat n'est pas controlee. */ -/* Si vous desirez la controler utiliser plutot MMCGLC1, tout en */ -/* sachant que les performances (en temps) seront quand meme moins */ -/* bonnes. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 8-09-1995 : Performance */ -/* 08-04-94 : JMC ; Rem: Appeler MMCGLC1 pour controler la precision -*/ -/* 26-04-90 : RBD ; Augmentation du nbre de points KK pour calcul */ -/* + precis, appel a MXVINIT et MXVSAVE, recup */ -/* code d'erreur MVGAUS0, ajout commentaires. */ -/* 08-06-89 : GD ; Suppression des 2 parties de l'integration, */ -/* MVGAUS0 est appelle que si le degre a change. */ -/* 10-06-88 : GD ; Variation dynamique du degre LEGENDRE */ -/* 18-08-87 : GD ; Version originale */ +/* Attention : the precision of the result is not controlled. */ +/* If you wish to control it, use MMCGLC1, taking into account that */ +/* the performance (in time) will be worse. */ /* >===================================================================== */ -/* ATTENTION : SAUVER KGAR WGAUS et UROOT EVENTUELLEMENT */ +/* ATTENTION : SAVE KGAR WGAUS and UROOT EVENTUALLY */ /* ,IERXV */ /* INTEGER I1,I20 */ /* PARAMETER (I1=1,I20=20) */ @@ -6819,38 +6437,38 @@ int mmloncv_(integer *ndimax, /* Function Body */ -/* ****** Initialisation generale ** */ +/* ****** General initialization ** */ *iercod = 999999; *xlongc = 0.; -/* ****** Initialisation de UROOT, WGAUS, NGAUS et KGAR ** */ +/* ****** Initialization of UROOT, WGAUS, NGAUS and KGAR ** */ /* CALL MXVINIT(IERXV,'INTEGER',I1,KGAR,'INTEGER',I1,NGAUS */ /* 1 ,'DOUBLE PRECISION',I20,UROOT,'DOUBLE PRECISION',I20,WGAUS) */ /* IF (IERXV.GT.0) KGAR=0 */ -/* ****** Test d'egalite des bornes ** */ +/* ****** Test the equity of limits ** */ if (*tdebut == *tfinal) { *iercod = 0; goto L9900; } -/* ****** Test de la dimension et du nombre de coefficients ** */ +/* ****** Test the dimension and the number of coefficients ** */ if (*ndimen <= 0 || *ncoeff <= 0) { *iercod = 1; goto L9900; } -/* ****** Calcul du degre optimum ** */ +/* ****** Calculate the optimal degree ** */ kk = *ncoeff / 4 + 1; kk = min(kk,10); -/* ****** Recuperation des coefficients pour l'integrale (DEGRE=4*KK) */ -/* si KK <> KGAR. */ +/* ****** Return the coefficients for the integral (DEGRE=4*KK) */ +/* if KK <> KGAR. */ if (kk != kgar) { mvgaus0_(&kk, uroot, wgaus, &ngaus, iercod); @@ -6862,14 +6480,14 @@ int mmloncv_(integer *ndimax, kgar = kk; } -/* C1 => Point milieu intervalle */ -/* C2 => 1/2 amplitude intervalle */ +/* C1 => Point medium interval */ +/* C2 => 1/2 amplitude interval */ c1 = (*tfinal + *tdebut) * .5; c2 = (*tfinal - *tdebut) * .5; /* ----------------------------------------------------------- */ -/* ****** Integration - Boucle sur les intervalles de GAUSS ** */ +/* ****** Integration - Loop on GAUSS intervals ** */ /* ----------------------------------------------------------- */ som = 0.; @@ -6877,13 +6495,13 @@ int mmloncv_(integer *ndimax, i__1 = ngaus; for (jj = 1; jj <= i__1; ++jj) { -/* ****** Integration en tenant compte de la symetrie ** */ +/* ****** Integration taking the symmetry into account ** */ tran = c2 * uroot[jj - 1]; x1 = c1 + tran; x2 = c1 - tran; -/* ****** Derivation sur la dimension de l'espace ** */ +/* ****** Derivation on the dimension of the space ** */ der1 = 0.; der2 = 0.; @@ -6906,30 +6524,30 @@ int mmloncv_(integer *ndimax, som += wgaus[jj - 1] * c2 * (sqrt(der1) + sqrt(der2)); -/* ****** Fin de boucle dur les intervalles de GAUSS ** */ +/* ****** End of loop on GAUSS intervals ** */ /* L300: */ } -/* ****** Travail termine ** */ +/* ****** Work ended ** */ *xlongc = som; -/* ****** On force IERCOD = 0 ** */ +/* ****** It is forced IERCOD = 0 ** */ *iercod = 0; -/* ****** Traitement de fin ** */ +/* ****** Final processing ** */ L9900: -/* ****** Sauvegarde de UROOT, WGAUS, NGAUS et KGAR ** */ +/* ****** Save UROOT, WGAUS, NGAUS and KGAR ** */ /* CALL MXVSAVE(IERXV,'INTEGER',I1,KGAR,'INTEGER',I1,NGAUS */ /* 1 ,'DOUBLE PRECISION',I20,UROOT,'DOUBLE PRECISION',I20,WGAUS) */ /* IF (IERXV.GT.0) KGAR=0 */ -/* ****** Fin du sous-programme ** */ +/* ****** End of sub-program ** */ if (*iercod != 0) { AdvApp2Var_SysBase::maermsg_("MMLONCV", iercod, 7L); @@ -6975,53 +6593,48 @@ L9900: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Positionnement sur les polynomes de la base hermite-Jacobi */ -/* et leurs derives succesives */ +/* Position on the polynoms of base hermit-Jacobi */ +/* and their succesive derivatives */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* PUBLIC, POSITIONEMENT, HERMITE, JACOBI */ +/* PUBLIC, POSITION, HERMIT, JACOBI */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* TPARAM : Parametre pour lequel on se positionne. */ -/* IORDRE : Ordre d'hermite-Jacobi (-1,0,1, ou 2) */ -/* NCOEFF : Nombre de coeeficients des polynomes (Nb de valeur a */ -/* calculer) */ -/* NDERIV : Nombre de derive a calculer (0<= N <=3) */ -/* 0 -> Positionement simple sur les fonctions de base */ -/* N -> Positionement sur les fonctions de base et lerive */ -/* d'ordre 1 a N */ - -/* ARGUMENTS DE SORTIE : */ +/* TPARAM : Parameter for which the position is found. */ +/* IORDRE : Orderof hermit-Jacobi (-1,0,1, ou 2) */ +/* NCOEFF : Number of coefficients of polynoms (Nb of value to calculate) */ +/* NDERIV : Number of derivative to calculate (0<= N <=3) */ +/* 0 -> Position simple on base functions */ +/* N -> Position on base functions and derivative */ +/* of order 1 to N */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* VALBAS (NCOEFF, 0:NDERIV) : les valeur calculee */ +/* VALBAS (NCOEFF, 0:NDERIV) : calculated value */ /* i */ /* d vj(t) = VALBAS(J, I) */ /* -- i */ /* dt */ -/* IERCOD : Code d'erreur */ +/* IERCOD : Error code */ /* 0 : Ok */ -/* 1 : Incoherance des arguments d'entre */ +/* 1 : Incoherence of input arguments */ -/* COMMONS UTILISES : */ -/* ------------------ */ +/* COMMONS USED : */ +/* -------------- */ -/* REFERENCES APPELEES : */ -/* --------------------- */ +/* REFERENCES CALLED : */ +/* ------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 19-07-1995: PMN; ECRITURE VERSION ORIGINALE. */ /* > */ /* *********************************************************************** */ @@ -7039,7 +6652,7 @@ L9900: /* *********************************************************************** */ -/* INITIALISATIONS */ +/* INITIALIZATIONS */ /* *********************************************************************** */ @@ -7047,7 +6660,7 @@ L9900: /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ @@ -7065,9 +6678,9 @@ L9900: iord[1] = *iordre; iorjac = (*iordre + 1) << 1; -/* (1) Calculs generiques .... */ +/* (1) Generic Calculations .... */ -/* (1.a) Calcul des polynomes d'hermite */ +/* (1.a) Calculation of hermit polynoms */ if (*iordre >= 0) { mmherm1_(moin11, &c__2, iord, hermit, &ier); @@ -7076,7 +6689,7 @@ L9900: } } -/* (1.b) Evaluation des polynomes d'hermite */ +/* (1.b) Evaluation of hermit polynoms */ jj = 1; iunit = *nderiv + 1; @@ -7113,7 +6726,7 @@ L9900: } } -/* (1.c) Evaluation des polynomes de Jaccobi */ +/* (1.c) Evaluation of Jacobi polynoms */ ii = *ncoeff - iorjac; @@ -7122,7 +6735,7 @@ L9900: goto L9102; } -/* (1.d) Evaluation de W(t) */ +/* (1.d) Evaluation of W(t) */ /* Computing MAX */ i__1 = iorjac + 1; @@ -7150,7 +6763,7 @@ L9900: kk2 = kk1 << 1; kk3 = kk1 * 3; -/* (2) Evaluation a l'ordre 0 */ +/* (2) Evaluation of order 0 */ jj = 1; i__1 = iorjac; @@ -7164,7 +6777,7 @@ L9900: valbas[ii + iorjac] = wval[0] * vjac[ii - 1]; } -/* (3) Evaluation a l'ordre 1 */ +/* (3) Evaluation of order 1 */ if (*nderiv >= 1) { jj = 2; @@ -7182,7 +6795,7 @@ L9900: } } -/* (4) Evaluation a l'ordre 2 */ +/* (4) Evaluation of order 2 */ if (*nderiv >= 2) { jj = 3; @@ -7200,7 +6813,7 @@ L9900: } } -/* (5) Evaluation a l'ordre 3 */ +/* (5) Evaluation of order 3 */ if (*nderiv >= 3) { jj = 4; @@ -7222,7 +6835,7 @@ L9900: /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ /* *********************************************************************** */ @@ -7235,7 +6848,7 @@ L9102: /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -7270,44 +6883,41 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* CALCULE LES COORDONNEES D'UN POINT D'UNE COURBE DE PARAMETRE */ -/* DONNE TPARAM ( CECI EN 2D, 3D OU PLUS) */ +/* CALCULATE THE COORDINATES OF A POINT OF A CURVE OF GIVEN PARAMETER */ +/* TPARAM ( IN 2D, 3D OR MORE) */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS , MATH_ACCES :: COURBE&,PARAMETRE& , POSITIONNEMENT , &POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMAX : format / dimension de la courbe */ -/* NCOEFF : Nbre de coefficients de la courbe */ -/* COURBE : Matrice des coefficients de la courbe */ -/* NDIM : Dimension utile de l'espace de travail */ -/* TPARAM : Valeur du parametre ou est calcule le point */ +/* NDIMAX : format / dimension of the curve */ +/* NCOEFF : Nb of coefficients of the curve */ +/* COURBE : Matrix of coefficients of the curve */ +/* NDIM : Dimension useful of the workspace */ +/* TPARAM : Value of the parameter where the point is calculated */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PNTCRB : Coordonnees du point calcule */ +/* PNTCRB : Coordinates of the calculated point */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* .Neant. */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* MIRAZ MVPSCR2 MVPSCR3 */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 20-11-89 : JG : VERSION ORIGINALE */ /* > */ /* *********************************************************************** */ @@ -7331,17 +6941,17 @@ L9999: goto L9999; } -/* Traitement optimal 3d */ +/* optimal processing 3d */ if (*ndim == 3 && *ndimax == 3) { mvpscr3_(ncoeff, &courbe[courbe_offset], tparam, &pntcrb[1]); -/* Traitement optimal 2d */ +/* optimal processing 2d */ } else if (*ndim == 2 && *ndimax == 2) { mvpscr2_(ncoeff, &courbe[courbe_offset], tparam, &pntcrb[1]); -/* Dimension quelconque - schema de HORNER */ +/* Any dimension - scheme of HORNER */ } else if (*tparam == 0.) { i__1 = *ndim; @@ -7402,40 +7012,35 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Positionnement d'un point sur une courbe (ncofmx,ndim). */ +/* Position of a point on curve (ncofmx,ndim). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS , AB_SPECIFI :: COURBE&,POLYNOME&,POSITIONNEMENT,&POINT */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX: Format / degre de la COURBE. */ -/* NDIM : Dimension de l' espace. */ -/* NDEG : Degre du polynome. */ -/* COURBE: Les coefficients de la courbe. */ -/* TPARAM: parametre sur la courbe */ +/* NCOFMX: Format / degree of the CURVE. */ +/* NDIM : Dimension of the space. */ +/* NDEG : Degree of the polynom. */ +/* COURBE: Coefficients of the curve. */ +/* TPARAM: Parameter on the curve */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* TABVAL(NDIM): Le point resultat (ou tableau de valeurs) */ +/* TABVAL(NDIM): The resulting point (or table of values) */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 05-01-90 : JG : optimisation (supprim appel a MGENMSG) , nettoyage -*/ -/* 18-09-85 : Cree par JJM. */ /* > */ /* *********************************************************************** */ @@ -7498,53 +7103,49 @@ int mmpojac_(doublereal *tparam, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Positionnement sur les polynomes de Jacobi et leurs derives */ -/* successives par un algorithme de recurence */ +/* Positioning on Jacobi polynoms and their derivatives */ +/* successive by a recurrent algorithm */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* RESERVE, POSITIONEMENT, JACOBI */ +/* RESERVE, POSITIONING, JACOBI */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* TPARAM : Parametre pour lequel on se positionne. */ -/* IORDRE : Ordre d'hermite-?? (-1,0,1, ou 2) */ -/* NCOEFF : Nombre de coeeficients des polynomes (Nb de valeur a */ -/* calculer) */ -/* NDERIV : Nombre de derive a calculer (0<= N <=3) */ -/* 0 -> Positionement simple sur les fonctions de jacobi */ -/* N -> Positionement sur les fonctions de jacobi et leurs */ -/* derive d'ordre 1 a N. */ - -/* ARGUMENTS DE SORTIE : */ +/* TPARAM : Parameter for which positioning is done. */ +/* IORDRE : Order of hermit-?? (-1,0,1, or 2) */ +/* NCOEFF : Number of coeeficients of polynoms (Nb of value to */ +/* calculate) */ +/* NDERIV : Number of derivative to calculate (0<= N <=3) */ +/* 0 -> Position simple on jacobi functions */ +/* N -> Position on jacobi functions and their */ +/* derivatives of order 1 to N. */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* VALJAC (NCOEFF, 0:NDERIV) : les valeur calculee */ +/* VALJAC (NCOEFF, 0:NDERIV) : the calculated values */ /* i */ /* d vj(t) = VALJAC(J, I) */ /* -- i */ /* dt */ -/* IERCOD : Code d'erreur */ +/* IERCOD : Error Code */ /* 0 : Ok */ -/* 1 : Incoherance des arguments d'entre */ +/* 1 : Incoherence of input arguments */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 19-07-1995: PMN; ECRITURE VERSION ORIGINALE. */ /* > */ /* *********************************************************************** */ @@ -7553,7 +7154,7 @@ int mmpojac_(doublereal *tparam, */ -/* varaibles statiques */ +/* static varaibles */ @@ -7573,7 +7174,7 @@ int mmpojac_(doublereal *tparam, /* *********************************************************************** */ -/* TRAITEMENT */ +/* Processing */ /* *********************************************************************** */ @@ -7584,7 +7185,7 @@ int mmpojac_(doublereal *tparam, goto L9101; } -/* --- Calcul des normes */ +/* --- Calculation of norms */ /* IF (NCOEFF.GT.NBCOF) THEN */ i__1 = *ncoeff; @@ -7605,7 +7206,7 @@ int mmpojac_(doublereal *tparam, /* END IF */ -/* --- Positionements triviaux ----- */ +/* --- Trivial Positions ----- */ valjac[1] = 1.; aux1 = (doublereal) (*iordre + 1); @@ -7626,7 +7227,7 @@ int mmpojac_(doublereal *tparam, } } -/* --- Positionement par reccurence */ +/* --- Positioning by recurrence */ i__1 = *ncoeff; for (ii = 3; ii <= i__1; ++ii) { @@ -7665,7 +7266,7 @@ int mmpojac_(doublereal *tparam, } } -/* ---> Normalisation */ +/* ---> Normalization */ i__1 = *ncoeff; for (ii = 1; ii <= i__1; ++ii) { @@ -7680,7 +7281,7 @@ int mmpojac_(doublereal *tparam, /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* PROCESSING OF ERRORS */ /* *********************************************************************** */ @@ -7691,7 +7292,7 @@ L9101: /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -7725,58 +7326,49 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* REMPLISSAGE DE LA TABLE DE POSITIONNEMENT POSUIV QUI PERMET DE */ -/* PARCOURIR EN COLONNE LA PARTIE TRAINGULAIRE INFERIEUR DE LA */ -/* MATRICE SOUS FORME DE PROFIL */ +/* FILL THE TABLE OF POSITIONING POSUIV WHICH ALLOWS TO */ +/* PARSE BY COLUMN THE INFERIOR TRIANGULAR PART OF THE */ +/* MATRIX IN FORM OF PROFILE */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* RESERVE, MATRICE, PROFIL */ +/* RESERVE, MATRIX, PROFILE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* NISTOC: NOMBRE DE COEFFICIENTS DANS LE PROFILE */ -/* DIMMAT: NOMBRE DE LIGNE DE LA MATRICE CARRE SYMETRIQUE */ -/* APOSIT: TABLE DE POSITIONNEMENT DES TERMES DE STOCKAGE */ -/* APOSIT(1,I) CONTIENT LE NOMBRE DE TERMES-1 SUR LA LIGNE -*/ -/* I DANS LE PROFIL DE LA MATRICE */ -/* APOSIT(2,I) CONTIENT L'INDICE DE STOCKAGE DU TERME DIAGONA -L*/ -/* DE LA LIGNE I */ +/* NISTOC: NUMBER OF COEFFICIENTS IN THE PROFILE */ +/* DIMMAT: NUMBER OF LINE OF THE SYMMETRIC SQUARE MATRIX */ +/* APOSIT: TABLE OF POSITIONING OF STORAGE TERMS */ +/* APOSIT(1,I) CONTAINS THE NUMBER OF TERMES-1 ON LINE +/* I IN THE PROFILE OF THE MATRIX */ +/* APOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF DIAGONAL TERM +/* OF LINE I */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* POSUIV: POSUIV(K) (OU K EST L'INDICE DE STOCKAGE DE MAT(I,J)) */ -/* CONTIENT LE PLUS PETIT NUMERO IMIN>I DE LA LIGNE QUI */ -/* POSSEDE UN TERME MAT(IMIN,J) QUI EST DANS LE PROFIL. */ -/* S'IL N'Y A PAS LE TERME MAT(IMIN,J) DANS LE PROFIL */ -/* ALORS POSUIV(K)=-1 */ - +/* POSUIV: POSUIV(K) (WHERE K IS THE INDEX OF STORAGE OF MAT(I,J)) */ +/* CONTAINS THE SMALLEST NUMBER IMIN>I OF THE LINE THAT */ +/* POSSESSES A TERM MAT(IMIN,J) THAT IS IN THE PROFILE. */ +/* IF THERE IS NO TERM MAT(IMIN,J) IN THE PROFILE THEN POSUIV(K)=-1 */ - -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 23-08-95 : KHN; ECRITURE VERSION ORIGINALE. */ -/* > */ /* *********************************************************************** */ /* DECLARATIONS */ @@ -7787,7 +7379,7 @@ L*/ /* *********************************************************************** */ -/* INITIALISATIONS */ +/* INITIALIZATIONS */ /* *********************************************************************** */ @@ -7805,7 +7397,7 @@ L*/ /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ @@ -7842,7 +7434,7 @@ L*/ /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ /* *********************************************************************** */ @@ -7851,7 +7443,7 @@ L*/ /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -7911,80 +7503,68 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* RESOLUTION DU SYSTEME */ +/* SOLUTION OF THE SYSTEM */ /* H t(G) V B */ /* = */ /* G 0 L C */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* RESERVE, RESOLUTION, SYSTEME, LAGRANGIEN */ +/* RESERVE, SOLUTION, SYSTEM, LAGRANGIAN */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* HDIMEN: NOMBRE DE LIGNE(OU COLONNE) DE LA MATRICE HESSIENNE */ -/* GDIMEN: NOMBRE DE LIGNE DE LA MATRICE DES CONTRAINTES */ -/* HNSTOC: NOMBRES DE TERMES DANS LE PROFIL DE LA MATRICE HESSIENNE -*/ -/* GNSTOC: NOMBRES DE TERMES DANS LE PROFIL DE LA MATRICE DES */ -/* CONTRAINTES */ -/* MNSTOC: NOMBRES DE TERMES DANS LE PROFIL DE LA MATRICE */ -/* M= G H t(G) */ -/* ou H EST LA MATRICE HESSIENNE ET G LA MATRICE DES */ -/* CONTRAINTES */ -/* MATSYH: PARTIE TRIANGULAIRE INFERIEUR DE LA MATRICE */ -/* HESSIENNE SOUS FORME DE PROFIL */ -/* MATSYG: MATRICE DES CONTRAINTES SOUS FORME DE PROFIL */ -/* VECSYH: VECTEUR DU SECOND MEMBRE ASSOCIE A MATSYH */ -/* VECSYG: VECTEUR DU SECOND MEMBRE ASSOCIE A MATSYG */ -/* HPOSIT: TABLE DE POSITIONNEMENT DE LA MATRICE HESSIENNE */ -/* HPOSIT(1,I) CONTIENT LE NOMBRE DE TERMES -1 */ -/* QUI SONT DANS LE PROFIL A LA LIGNE I */ -/* HPOSIT(2,I) CONTIENT L'INDICE DE STOCKAGE DU TERME */ -/* DIAGNALE DE LA MATRICE A LA LIGNE I */ -/* HPOSUI: TABLE PERMETTANT DE BALAYER EN COLONNE LA MATRICE */ -/* HESSIENNE SOUS FORME DE PROFIL */ -/* HPOSUI(K) CONTIENT LE NUMERO DE LIGNE IMIN SUIVANT LA LIGN -E*/ -/* COURANT I OU H(I,J)=MATSYH(K) TEL QUE IL EXISTE DANS LA */ -/* MEME COLONNE J UN TERME DANS LE PROFIL DE LA LIGNE IMIN */ -/* SI UN TEL TERME N'EXISTE PAS IMIN=-1 */ -/* GPOSIT: TABLE DE POSITIONNEMENT DE LA MATRICE DES CONTRAINTES */ -/* GPOSIT(1,I) CONTIENT LE NOMBRE DE TERMES DE LA LIGNE I */ -/* QUI SONT DANS LE PROFIL */ -/* GPOSIT(2,I) CONTIENT L'INDICE DE STOKAGE DU DERNIER TERME -*/ -/* DE LA LIGNE I QUI EST DANS LE PROFIL */ -/* GPOSIT(3,I) CONTIENT LE NUMERO DE COLONNE CORRESPONDANT */ -/* AU PREMIER TERME DE LA LIGNE I QUI EST DANS */ -/* LE PROFIL */ -/* MMPOSUI, MPOSIT: MEME STRUCTURE QUE HPOSUI, MAIS POUR LA MATRICE -*/ +/* HDIMEN: NOMBER OF LINE (OR COLUMN) OF THE HESSIAN MATRIX */ +/* GDIMEN: NOMBER OF LINE OF THE MATRIX OF CONSTRAINTS */ +/* HNSTOC: NOMBErS OF TERMS IN THE PROFILE OF HESSIAN MATRIX +*/ +/* GNSTOC: NOMBERS OF TERMS IN THE PROFILE OF THE MATRIX OF CONSTRAINTS */ +/* MNSTOC: NOMBERS OF TERMS IN THE PROFILE OF THE MATRIX M= G H t(G) */ +/* where H IS THE HESSIAN MATRIX AND G IS THE MATRIX OF CONSTRAINTS */ +/* MATSYH: TRIANGULAR INFERIOR PART OF THE HESSIAN MATRIX +/* IN FORM OF PROFILE */ +/* MATSYG: MATRIX OF CONSTRAINTS IN FORM OF PROFILE */ +/* VECSYH: VECTOR OF THE SECOND MEMBER ASSOCIATED TO MATSYH */ +/* VECSYG: VECTOR OF THE SECOND MEMBER ASSOCIATED TO MATSYG */ +/* HPOSIT: TABLE OF POSITIONING OF THE HESSIAN MATRIX */ +/* HPOSIT(1,I) CONTAINS THE NUMBER OF TERMS -1 */ +/* WHICH ARE IN THE PROFILE AT LINE I */ +/* HPOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF TERM */ +/* DIAGONAL OF THE MATRIX AT LINE I */ +/* HPOSUI: TABLE ALLOWING TO PARSE THE HESSIAN MATRIX BY COLUMN */ +/* IN FORM OF PROFILE */ +/* HPOSUI(K) CONTAINS THE NUMBER OF LINE IMIN FOLLOWING THE CURRENT LINE*/ +/* I WHERE H(I,J)=MATSYH(K) AS IT EXISTS IN THE */ +/* SAME COLUMN J A TERM IN THE PROFILE OF LINE IMIN */ +/* IF SUCH TERM DOES NOT EXIST IMIN=-1 */ +/* GPOSIT: TABLE OF POSITIONING OF THE MATRIX OF CONSTRAINTS */ +/* GPOSIT(1,I) CONTAINS THE NUMBER OF TERMS OF LINE I */ +/* WHICH ARE IN THE PROFILE */ +/* GPOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF THE LAST TERM +/* OF LINE I WHICH IS IN THE PROFILE */ +/* GPOSIT(3,I) CONTAINS THE NUMBER OF COLUMN CORRESPONDING */ +/* TO THE FIRST TERM OF LINE I WHICH IS IN THE PROFILE */ +/* MMPOSUI, MPOSIT: SAME STRUCTURE AS HPOSUI, BUT FOR MATRIX /* M=G H t(G) */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* VECSOL: VECTEUR SOLUTION V DU SYSTEME */ -/* IERCOD: CODE D'ERREUR */ +/* VECSOL: VECTOR SOLUTION V OF THE SYSTEM */ +/* IERCOD: ERROR CODE */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 21-09-96 : KHN; ECRITURE VERSION ORIGINALE. */ /* > */ /* *********************************************************************** */ @@ -8026,11 +7606,11 @@ E*/ /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ -/* Allocation dynamique */ +/* Dynamic allocation */ AdvApp2Var_SysBase::macrar8_(hdimen, &c__100, v1, &iofv1, &ier); if (ier > 0) { @@ -8042,8 +7622,8 @@ E*/ goto L9102; } -/* RESOL DU SYST 1 H V1 = b */ -/* ou H=MATSYH et b=VECSYH */ +/* solution of system 1 H V1 = b */ +/* where H=MATSYH and b=VECSYH */ mmchole_(hnstoc, hdimen, &matsyh[1], &hposit[3], &hposui[1], &hchole[ iofhch], &ier); @@ -8056,14 +7636,14 @@ E*/ goto L9102; } -/* CAS OU IL Y A DES CONTRAINTES */ +/* Case when there are constraints */ if (*gdimen > 0) { -/* CALCUL LE VECTEUR DU SECOND MEMBRE V2=G H(-1) b -c = G v1-c */ -/* DU SYSTEME D'INCONNU LE VECTEUR MULTIP DE LAGRANGE */ -/* ou G=MATSYG */ -/* c=VECSYG */ +/* Calculate the vector of the second member V2=G H(-1) b -c = G v1-c */ +/* of system of unknown Lagrangian vector MULTIP */ +/* where G=MATSYG */ +/* c=VECSYG */ AdvApp2Var_SysBase::macrar8_(gdimen, &c__100, v2, &iofv2, &ier); if (ier > 0) { @@ -8093,12 +7673,12 @@ E*/ v2[i__ + iofv2 - 1] -= vecsyg[i__]; } -/* CALCUL de la matrice M= G H(-1) t(G) */ +/* Calculate the matrix M= G H(-1) t(G) */ /* RESOL DU SYST 2 : H qi = gi */ -/* ou gi est un vecteur colonne de t(G) */ +/* where is a vector column of t(G) */ /* qi=v3 */ -/* puis calcul G qi */ -/* puis construire M sous forme de profil */ +/* then calculate G qi */ +/* then construct M in form of profile */ @@ -8138,8 +7718,8 @@ E*/ } -/* RESOL SYST 3 M L = V2 */ -/* AVEC L=V4 */ +/* SOLVE SYST 3 M L = V2 */ +/* WITH L=V4 */ AdvApp2Var_SysBase::mvriraz_((integer *)gdimen, (char *)&v4[iofv4]); @@ -8159,7 +7739,7 @@ E*/ } -/* CALCUL LE VECTEUR DU SECOND MEMBRE DU SYSTEME Hx = b - t(G) L +/* CALCULATE THE VECTOR OF THE SECOND MEMBER OF THE SYSTEM Hx = b - t(G) L */ /* = V1 */ @@ -8193,7 +7773,7 @@ E*/ /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* PROCESSING OF ERRORS */ /* *********************************************************************** */ @@ -8203,12 +7783,12 @@ L9101: goto L9999; L9102: - AdvApp2Var_SysBase::mswrdbg_("MMRESOL : PROBLEME AVEC DIMMAT", 30L); + AdvApp2Var_SysBase::mswrdbg_("MMRESOL : PROBLEM WITH DIMMAT", 30L); *iercod = 2; /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -8276,52 +7856,48 @@ int mmrslss_(integer *,//mxcoef, /* *********************************************************************** */ -/* FONCTION : */ +/* FuNCTION : */ /* ---------- T */ -/* Resoud le systeme lineaire SS x = b ou S est une matrice */ -/* triangulaire inferieure donnee sous forme profil */ +/* Solves linear system SS x = b where S is a */ +/* triangular lower matrix given in form of profile */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* RESERVE, MATRICE_PROFILE, RESOLUTION, CHOLESKI */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* MXCOEF : Nombre maximal de coefficient non nuls dans la matrice */ -/* DIMENS : Dimension de la matrice */ -/* SMATRI(MXCOEF) : Valeurs des coefficients de la matrice */ +/* MXCOEF : Maximum number of non-null coefficient in the matrix */ +/* DIMENS : Dimension of the matrix */ +/* SMATRI(MXCOEF) : Values of coefficients of the matrix */ /* SPOSIT(2,DIMENS): */ -/* SPOSIT(1,*) : Distance diagonnal-extrimite de la ligne */ -/* SPOSIT(2,*) : Position des termes diagonnaux dans AMATRI */ -/* POSUIV(MXCOEF): premiere ligne inferieure non hors profil */ -/* MSCNMBR(DIMENS): Vecteur second membre de l'equation */ +/* SPOSIT(1,*) : Distance diagonal-extremity of the line */ +/* SPOSIT(2,*) : Position of diagonal terms in AMATRI */ +/* POSUIV(MXCOEF): first line inferior not out of profile */ +/* MSCNMBR(DIMENS): Vector second member of the equation */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* SOLUTI(NDIMEN) : Vecteur resultat */ -/* IERCOD : Code d'erreur 0 : ok */ +/* SOLUTI(NDIMEN) : Result vector */ +/* IERCOD : Error code 0 : ok */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ /* T */ -/* SS est la decomposition de choleski d'une matrice symetrique */ -/* definie postive, qui peut s'obtenir par la routine MMCHOLE. */ - -/* Pour une matrice pleine on peut utiliser MRSLMSC */ +/* SS is the decomposition of choleski of a symmetric matrix */ +/* defined postive, that can result from routine MMCHOLE. */ -/* NIVEAU DE DEBUG = 4 */ +/* For a full matrix it is possible to use MRSLMSC */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 14-02-1994: PMN; ECRITURE VERSION ORIGINALE. */ +/* LEVEL OF DEBUG = 4 */ /* > */ /* *********************************************************************** */ @@ -8353,11 +7929,11 @@ int mmrslss_(integer *,//mxcoef, /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ -/* ----- Resolution de Sw = b */ +/* ----- Solution of Sw = b */ i__1 = *dimens; for (i__ = 1; i__ <= i__1; ++i__) { @@ -8372,7 +7948,7 @@ int mmrslss_(integer *,//mxcoef, soluti[i__] = (mscnmbr[i__] - somme) / smatri[pointe]; } /* T */ -/* ----- Resolution de S u = w */ +/* ----- Solution of S u = w */ for (i__ = *dimens; i__ >= 1; --i__) { @@ -8392,14 +7968,14 @@ int mmrslss_(integer *,//mxcoef, /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ /* *********************************************************************** */ /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN PROGRAM CALLING */ /* *********************************************************************** */ @@ -8439,89 +8015,76 @@ int mmrslw_(integer *normax, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Resolution d' un systeme lineaire A.x = B de N equations a N */ -/* inconnues par la methode de Gauss (pivot partiel) ou : */ -/* A est une matrice NORDRE * NORDRE, */ -/* B est une matrice NORDRE (lignes) * NDIMEN (colonnes), */ -/* x est une matrice NORDRE (lignes) * NDIMEN (colonnes). */ -/* Dans ce programme, A et B sont stockes dans la matrice ABMATR dont */ -/* les lignes et les colonnes ont ete inversees. ABMATR(k,j) est le */ -/* terme A(j,k) si k <= NORDRE, B(j,k-NORDRE) sinon (cf. exemple). */ - -/* MOTS CLES : */ +/* Solution of a linear system A.x = B of N equations to N */ +/* unknown by Gauss method (partial pivot) or : */ +/* A is matrix NORDRE * NORDRE, */ +/* B is matrix NORDRE (lines) * NDIMEN (columns), */ +/* x is matrix NORDRE (lines) * NDIMEN (columns). */ +/* In this program, A and B are stored in matrix ABMATR */ +/* the lines and columns which of were inverted. ABMATR(k,j) is */ +/* term A(j,k) if k <= NORDRE, B(j,k-NORDRE) otherwise (see example). */ + +/* KEYWORDS : */ /* ----------- */ /* TOUS, MATH_ACCES::EQUATION&, MATRICE&, RESOLUTION, GAUSS, &SOLUTION */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NORMAX : Taille maximale du premier indice de XMATRI. Cet argument */ -/* ne sert que pour la declaration de dimension de XMATRI et */ -/* doit etre superieur ou egal a NORDRE. */ -/* NORDRE : Ordre de la matrice i.e. nombre d'equations et */ -/* d'inconnues du systeme lineaire a resoudre. */ -/* NDIMEN : Nombre de second membre. */ -/* EPSPIV : Valeur minimale d'un pivot. Si au cours du calcul la */ -/* valeur absolue du pivot est inferieure a EPSPIV, le */ -/* systeme d'equations est declare singulier. EPSPIV doit */ -/* etre un "petit" reel. */ - -/* ABMATR(NORDRE+NDIMEN,NORDRE) : Matrice auxiliaire contenant la */ -/* matrice A et la matrice B. */ - -/* ARGUMENTS DE SORTIE : */ +/* NORMAX : Max size of the first index of XMATRI. This argument */ +/* serves only for the declaration of dimension of XMATRI and should be */ +/* above or equal to NORDRE. */ +/* NORDRE : Order of the matrix i.e. number of equations and */ +/* unknown quantities of the linear system to be solved. */ +/* NDIMEN : Number of the second member. */ +/* EPSPIV : Minimal value of a pivot. If during the calculation */ +/* the absolute value of the pivot is below EPSPIV, the */ +/* system of equations is declared singular. EPSPIV should */ +/* be a "small" real. */ + +/* ABMATR(NORDRE+NDIMEN,NORDRE) : Auxiliary matrix containing */ +/* matrix A and matrix B. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* XMATRI : Matrice contenant les NORDRE*NDIMEN solutions. */ -/* IERCOD=0 indique que toutes les solutions sont calculees. */ -/* IERCOD=1 indique que la matrice est de rang inferieur a NORDRE */ -/* (le systeme est singulier). */ +/* XMATRI : Matrix containing NORDRE*NDIMEN solutions. */ +/* IERCOD=0 shows that all solutions are calculated. */ +/* IERCOD=1 shows that the matrix is of lower rank than NORDRE */ +/* (the system is singular). */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ATTENTION : les indices de ligne et de colonne sont inverses */ -/* par rapport aux indices habituels. */ -/* Le systeme : */ +/* ATTENTION : the indices of line and column are inverted */ +/* compared to usual indices. */ +/* System : */ /* a1*x + b1*y = c1 */ /* a2*x + b2*y = c2 */ -/* doit etre represente par la matrice ABMATR : */ +/* should be represented by matrix ABMATR : */ /* ABMATR(1,1) = a1 ABMATR(1,2) = a2 */ /* ABMATR(2,1) = b1 ABMATR(2,2) = b2 */ /* ABMATR(3,1) = c1 ABMATR(3,2) = c2 */ -/* Pour resoudre ce systeme, il faut poser: */ +/* To solve this system, it is necessary to set : */ -/* NORDRE = 2 (il y a 2 equations a 2 inconnues), */ -/* NDIMEN = 1 (il y a un seul second membre), */ -/* NORMAX peut etre pris quelconque >= NORDRE. */ +/* NORDRE = 2 (there are 2 equations with 2 unknown values), */ +/* NDIMEN = 1 (there is only one second member), */ +/* any NORMAX can be taken >= NORDRE. */ -/* Pour utiliser cette routine, il est conseille de se */ -/* servir de l'une des interfaces : MMRSLWI ou de MMMRSLWD. */ - -/* HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 24-11-1995 : JPI ; annulation des modifs concernant la factorisation -*/ -/* de 1/PIVOT (Pb numerique) */ -/* 08-09-1995 : JMF ; performances */ -/* 06-04-1990 : RBD ; Ajout commentaires et Implicit none. */ -/* 22-02-1988 : JJM ; Appel MFNDEB -> MNFNDEB */ -/* 22-02-1988 : JJM ; Appel GERMSG -> MAERMSG */ -/* 21-09-1987 : creation de la matrice unique ABMATR et des */ -/* interfaces MMRSLWI et MMMRSLWD (RBD). */ -/* 01-07-1987 : Cree par R. Beraud. */ +/* To use this routine, it is recommended to use one of */ +/* interfaces : MMRSLWI or MMMRSLWD. */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* INTEGER IBB,MNFNDEB */ @@ -8540,14 +8103,14 @@ int mmrslw_(integer *normax, /* ********************************************************************* */ -/* Triangulation de la matrice ABMATR. */ +/* Triangulation of matrix ABMATR. */ /* ********************************************************************* */ i__1 = *nordre; for (kk = 1; kk <= i__1; ++kk) { -/* ---------- Recherche du pivot maxi sur la colonne KK. ------------ +/* ---------- Find max pivot in column KK. ------------ --- */ pivot = *epspiv; @@ -8565,7 +8128,7 @@ int mmrslw_(integer *normax, goto L9900; } -/* --------- Permutation de la ligne KPIV et avec la ligne KK. ------ +/* --------- Swapping of line KPIV with line KK. ------ --- */ if (kpiv != kk) { @@ -8579,7 +8142,7 @@ int mmrslw_(integer *normax, } } -/* -------------------- Elimination et triangularisation. ----------- +/* ---------- Removal and triangularization. ----------- --- */ pivot = -abmatr[kk + kk * abmatr_dim1]; @@ -8601,14 +8164,14 @@ int mmrslw_(integer *normax, /* ********************************************************************* */ -/* Resolution du systeme d'equations triangulaires. */ -/* La matrice ABMATR(NORDRE+JJ,II), contient les second membres du */ -/* systeme pour 1<=j<=NDIMEN et 1<=i<=NORDRE. */ +/* Solution of the system of triangular equations. */ +/* Matrix ABMATR(NORDRE+JJ,II), contains second members */ +/* of the system for 1<=j<=NDIMEN and 1<=i<=NORDRE. */ /* ********************************************************************* */ -/* ---------------- Calcul des solutions en remontant. ----------------- +/* ---------------- Calculation of solutions by ascending. ----------------- */ for (kk = *nordre; kk >= 1; --kk) { @@ -8629,9 +8192,8 @@ int mmrslw_(integer *normax, } goto L9999; -/* ------Si la valeur absolue de l' un des pivot est plus petit -------- -*/ -/* ------------ que EPSPIV: recuperation du code d' erreur. ------------ +/* ------If the absolute value of a pivot is smaller than -------- +/* ---------- EPSPIV: return the code of error. ------------ */ L9900: @@ -8677,75 +8239,65 @@ L9999: /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Resolution d' un systeme lineaire par la methode de Gauss ou */ -/* le second membre est un tableau de vecteurs. Methode du pivot */ -/* partiel. */ +/* Solution of a linear system by Gauss method where */ +/* the second member is a table of vectors. Method of partial pivot. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS , MATH_ACCES :: */ +/* ALL, MATH_ACCES :: */ /* SYSTEME&,EQUATION&, RESOLUTION,GAUSS ,&VECTEUR */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NORMAX : Dimensionnement maxi de AMAT. */ -/* NORDRE : Ordre de la matrice. */ -/* NDIM : Nombre de colonnes de BMAT et XMAT. */ -/* AMAT(NORMAX,NORDRE) : La matrice traitee. */ -/* BMAT(NORMAX,NDIM) : La matrice des second membre. */ -/* XMAT(NORMAX,NDIM) : La matrice des solutions. */ -/* EPSPIV : Valeur minimale d'un pivot. */ - -/* ARGUMENTS DE SORTIE : */ +/* NORMAX : Max. Dimension of AMAT. */ +/* NORDRE : Order of the matrix. */ +/* NDIM : Number of columns of BMAT and XMAT. */ +/* AMAT(NORMAX,NORDRE) : The processed matrix. */ +/* BMAT(NORMAX,NDIM) : The matrix of second member. */ +/* XMAT(NORMAX,NDIM) : The matrix of solutions. */ +/* EPSPIV : Min value of a pivot. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* AAUX(NORDRE+NDIM,NORDRE) : Matrice auxiliaire. */ -/* XMAT(NORMAX,NDIM) : La matrice des solutions. */ -/* IERCOD=0 indique que les solutions dans XMAT sont valables. */ -/* IERCOD=1 indique que la matrice AMAT est de rang inferieur */ -/* a NORDRE. */ +/* AAUX(NORDRE+NDIM,NORDRE) : Auxiliary matrix. */ +/* XMAT(NORMAX,NDIM) : Matrix of solutions. */ +/* IERCOD=0 shows that solutions in XMAT are valid. */ +/* IERCOD=1 shows that matrix AMAT is of lower rank than NORDRE. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* .Neant. */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* MAERMSG MGENMSG MGSOMSG */ /* MMRSLW I*4 MNFNDEB */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ATTENTION :les lignes et les colonnes sont dans l' ordre */ -/* habituel : */ -/* 1er indice = indice ligne */ -/* 2eme indice = indice colonne */ -/* Exemple, Le systeme : */ +/* ATTENTION : lines and columns are located in usual order : */ +/* 1st index = index line */ +/* 2nd index = index column */ +/* Example, the system : */ /* a1*x + b1*y = c1 */ /* a2*x + b2*y = c2 */ -/* est represente par la matrice AMAT : */ +/* is represented by matrix AMAT : */ /* AMAT(1,1) = a1 AMAT(2,1) = a2 */ /* AMAT(1,2) = b1 AMAT(2,2) = b2 */ -/* Le premier indice est l' indice de ligne, le second indice */ -/* est l' indice des colonnes (Comparer avec MMRSLWI qui est */ -/* plus rapide). */ +/* The first index is the index of line, the second index */ +/* is the index of columns (Compare with MMRSLWI which is faster). */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 11-09-1995 : JMF ; Implicit none */ -/* 22-02-1988 : JJM ; Appel MFNDEB -> MNFNDEB */ -/* 22-02-1988 : JJM ; Appel GERMSG -> MAERMSG */ -/* 17-09-1987: Cree par RBD */ /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Name of the routine */ /* Parameter adjustments */ amat_dim1 = *normax; @@ -8767,7 +8319,7 @@ L9999: AdvApp2Var_SysBase::mgenmsg_("MMMRSLW", 7L); } -/* Initialisation de la matrice auxiliaire. */ +/* Initialization of the auxiliary matrix. */ i__1 = *nordre; for (i__ = 1; i__ <= i__1; ++i__) { @@ -8779,7 +8331,7 @@ L9999: /* L100: */ } -/* Second membre. */ +/* Second member. */ i__1 = *nordre; for (i__ = 1; i__ <= i__1; ++i__) { @@ -8791,7 +8343,7 @@ L9999: /* L300: */ } -/* Resolution du systeme d' equations. */ +/* Solution of the system of equations. */ mmrslw_(normax, nordre, ndim, epspiv, &aaux[aaux_offset], &xmat[ xmat_offset], iercod); @@ -8820,71 +8372,63 @@ L9999: /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Extrait du Common LDGRTL les racines STRICTEMENT positives du */ -/* polynome de Legendre de degre NDGLGD, pour 2 <= NDGLGD <= 61. */ +/* Extracts from Common LDGRTL the STRICTLY positive roots of the */ +/* Legendre polynom of degree NDGLGD, for 2 <= NDGLGD <= 61. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS, AB_SPECIFI::COMMON&, EXTRACTION, &RACINE, &LEGENDRE. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDGLGD : Degre mathematique du polynome de Legendre. */ -/* Ce degre doit etre superieur ou egal a 2 et */ -/* inferieur ou egal a 61. */ +/* NDGLGD : Mathematic degree of Legendre polynom. */ +/* This degree should be above or equal to 2 and */ +/* below or equal to 61. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* RTLEGD : Le tableau des racines strictement positives du */ -/* polynome de Legendre de degre NDGLGD. */ +/* RTLEGD : The table of strictly positive roots of */ +/* Legendre polynom of degree NDGLGD. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ATTENTION: La condition sur NDEGRE ( 2 <= NDEGRE <= 61) n'est */ -/* pas testee. A l'appelant de faire le test. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 23-03-1990 : RBD ; Ajout commentaires + declaration. */ -/* 15-01-1990 : NAK ; MLGDRTL PAR INCLUDE MMLGDRT */ -/* 21-04-1989 : RBD ; Creation. */ +/* ATTENTION: the condition on NDEGRE ( 2 <= NDEGRE <= 61) is not */ +/* tested. The caller should make the test. */ + /* > */ /* ********************************************************************** */ -/* Le nom de la routine */ +/* Nome of the routine */ -/* Le common MLGDRTL: */ -/* Ce common comprend les racines POSITIVES des polynomes de Legendre */ -/* ET les poids des formules de quadrature de Gauss sur toutes les */ -/* racines POSITIVES des polynomes de Legendre. */ +/* Common MLGDRTL: */ +/* This common includes POSITIVE roots of Legendre polynoms */ +/* AND the weight of Gauss quadrature formulas on all */ +/* POSITIVE roots of Legendre polynoms. */ /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Le common des racines de Legendre. */ +/* The common of Legendre roots. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* BASE LEGENDRE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 11-01-90 : NAK ; Creation version originale */ /* > */ /* *********************************************************************** */ @@ -8892,18 +8436,16 @@ L9999: -/* ROOTAB : Tableau de toutes les racines des polynomes de Legendre */ -/* comprises entre ]0,1]. Elles sont rangees pour des degres croissants -*/ -/* de 2 a 61. */ -/* HILTAB : Tableau des interpolants de Legendre concernant ROOTAB. */ -/* L' adressage est le meme. */ -/* HI0TAB : Tableau des interpolants de Legendre pour la racine x=0 */ -/* des polynomes de degre IMPAIR. */ -/* RTLTB0 : Tableau des Li(uk) ou les uk sont les racines d' un */ -/* polynome de Legendre de degre PAIR. */ -/* RTLTB1 : Tableau des Li(uk) ou les uk sont les racines d' un */ -/* polynome de Legendre de degre IMPAIR. */ +/* ROOTAB : Table of all rotts of Legendre polynoms */ +/* between [0,1]. They are ranked for degrees increasing from 2 to 61. */ +/* HILTAB : Table of Legendre interpolators concerning ROOTAB. */ +/* The address is the same. */ +/* HI0TAB : Table of Legendre interpolators for root x=0 */ +/* the polynoms of UNEVEN degree. */ +/* RTLTB0 : Table of Li(uk) where uk are roots of a */ +/* Legendre polynom of EVEN degree. */ +/* RTLTB1 : Table of Li(uk) where uk are roots of a */ +/* Legendre polynom of UNEVEN degree. */ /************************************************************************ @@ -8960,55 +8502,50 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* -------- */ -/* Recherche l'intervalle correspondant a une valeur donnee dans */ -/* une suite croissante de reels double precision. */ +/* Find the interval corresponding to a valueb given in */ +/* increasing order of real numbers with double precision. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* --------- */ /* TOUS,MATH_ACCES::TABLEAU&,POINT&,CORRESPONDANCE,&RANG */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* TPARAM : Valeur a tester. */ -/* NBRVAL : Taille de TABLEV */ -/* TABLEV : Tableau de reels. */ -/* EPSIL : Epsilon de precision */ +/* TPARAM : Value to be tested. */ +/* NBRVAL : Size of TABLEV */ +/* TABLEV : Table of reals. */ +/* EPSIL : Epsilon of precision */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* NUMINT : Numero de l'intervalle (entre 1 et NBRVAL-1). */ -/* ITYPEN : = 0 TPARAM est a l'interieur de l'intervalle NUMINT */ -/* = 1 : TPARAM correspond a la borne inferieure de */ -/* l'intervalle fourni. */ -/* = 2 : TPARAM correspond a la borne superieure de */ -/* l'intervalle fourni. */ +/* NUMINT : Number of the interval (between 1 and NBRVAL-1). */ +/* ITYPEN : = 0 TPARAM is inside the interval NUMINT */ +/* = 1 : TPARAM corresponds to the lower limit of */ +/* the provided interval. */ +/* = 2 : TPARAM corresponds to the upper limit of */ +/* the provided interval. */ -/* IERCOD : Code d'erreur */ +/* IERCOD : Error code. */ /* = 0 : OK */ -/* = 1 : TABLEV ne contient pas assez d' elements. */ -/* = 2 : TPARAM hors des bornes de TABLEV. */ +/* = 1 : TABLEV does not contain enough elements. */ +/* = 2 : TPARAM out of limits of TABLEV. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* --------------------------------- */ -/* Il y a NBRVAL valeurs dans TABLEV soit NBRVAL-1 intervalles. */ -/* On fait une recherche de l' intervalle contenant TPARAM par */ -/* dichotomie. Complexite de l' algorithme : Log(n)/Log(2).(RBD). */ - - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ---------------------------- */ -/* 13-07-93 : MCL ; Version originale (a partir de MSRREI) */ +/* There are NBRVAL values in TABLEV which stands for NBRVAL-1 intervals. */ +/* One searches the interval containing TPARAM by */ +/* dichotomy. Complexity of the algorithm : Log(n)/Log(2).(RBD). */ /* > */ /* *********************************************************************** */ @@ -9031,33 +8568,33 @@ L9999: ideb = 1; ifin = *nbrval; -/* TABLEV doit contenir au moins deux valeurs */ +/* TABLEV should contain at least two values */ if (*nbrval < 2) { *iercod = 1; goto L9999; } -/* TPARAM doit etre entre les bornes extremes de TABLEV. */ +/* TPARAM should be between extreme limits of TABLEV. */ if (*tparam < tablev[1] || *tparam > tablev[*nbrval]) { *iercod = 2; goto L9999; } -/* ----------------------- RECHERCHE DE L'INTERVALLE -------------------- +/* ----------------------- SEARCH OF THE INTERVAL -------------------- */ L1000: -/* Test de fin de boucle (on a trouve). */ +/* Test end of loop (found). */ if (ideb + 1 == ifin) { *numint = ideb; goto L2000; } -/* Recherche par dichotomie sur les valeurs croissantes de TABLEV. */ +/* Find by dichotomy on increasing values of TABLEV. */ imil = (ideb + ifin) / 2; if (*tparam >= tablev[ideb] && *tparam <= tablev[imil]) { @@ -9068,9 +8605,8 @@ L1000: goto L1000; -/* -------------- TEST POUR VOIR SI TPARAM N'EST PAS UNE VALEUR --------- -*/ -/* ------------------------ DE TABLEV A EPSIL PRES ---------------------- +/* -------------- TEST IF TPARAM IS NOT A VALUE --------- +/* ------------------------OF TABLEV UP TO EPSIL ---------------------- */ L2000: @@ -9123,55 +8659,47 @@ int mmtmave_(integer *nligne, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ /* t */ -/* EFFECUE LE PRODUIT G V */ -/* OU LA MATRICE G EST SOUS FORME DE PROFIL */ +/* CREATES PRODUCT G V */ +/* WHERE THE MATRIX IS IN FORM OF PROFILE */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* RESERVE, PRODUIT, MATRICE, PROFIL, VECTEUR */ +/* RESERVE, PRODUCT, MATRIX, PROFILE, VECTOR */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* NLIGNE : NOMBRE DE LIGNE DE LA MATRICE */ -/* NCOLON : NOMBRE DE COLONNE DE LA MATRICE */ -/* GPOSIT: TABLE DE POSITIONNEMENT DES TERMES DE STOCKAGE */ -/* GPOSIT(1,I) CONTIENT LE NOMBRE DE TERMES-1 SUR LA LIGNE -*/ -/* I DANS LE PROFIL DE LA MATRICE */ -/* GPOSIT(2,I) CONTIENT L'INDICE DE STOCKAGE DU TERME DIAGONA -L*/ -/* DE LA LIGNE I */ -/* GPOSIT(3,I) CONTIENT L'INDICE COLONE DU PREMIER TERME DU -*/ -/* PROFIL DE LA LIGNE I */ -/* GNSTOC : NOMBRE DE TERME DANS LE PROFIL DE GMATRI */ -/* GMATRI : MATRICE DES CONTRAINTES SOUS FORME DE PROFIL */ -/* VECIN : VECTEUR D'ENTRE */ - -/* ARGUMENTS DE SORTIE : */ +/* NLIGNE : NUMBER OF LINE OF THE MATRIX */ +/* NCOLON : NOMBER OF COLUMN OF THE MATRIX */ +/* GPOSIT: TABLE OF POSITIONING OF TERMS OF STORAGE */ +/* GPOSIT(1,I) CONTAINS THE NUMBER of TERMS-1 ON LINE + I IN THE PROFILE OF THE MATRIX */ +/* GPOSIT(2,I) CONTAINS THE INDEX OF STORAGE OF THE DIAGONAL TERM +/* OF LINE I */ +/* GPOSIT(3,I) CONTAINS THE INDEX COLUMN OF THE FIRST TERM OF +/* PROFILE OF LINE I */ +/* GNSTOC : NOMBER OF TERM IN THE PROFILE OF GMATRI */ +/* GMATRI : MATRIX OF CONSTRAINTS IN FORM OF PROFILE */ +/* VECIN : INPUT VECTOR */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* VECOUT :VECTEUR PRODUIT */ -/* IERCOD : CODE D'ERREUR */ +/* VECOUT : VECTOR PRODUCT */ +/* IERCOD : ERROR CODE */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 21-08-95 : KHN; ECRITURE VERSION ORIGINALE. */ /* > */ /* *********************************************************************** */ @@ -9202,7 +8730,7 @@ L*/ /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ @@ -9232,14 +8760,14 @@ L*/ /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ /* *********************************************************************** */ /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -9281,47 +8809,42 @@ int mmtrpj0_(integer *ncofmx, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Baisse le degre d' une courbe definie sur (-1,1) au sens de */ -/* Legendre a une precision donnee. */ +/* Lowers the degree of a curve defined on (-1,1) in the direction of */ +/* Legendre with a given precision. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LEGENDRE,POLYGONE,TRONCONNAGE,COURBE,LISSAGE. */ +/* LEGENDRE, POLYGON, TRUNCATION, CURVE, SMOOTHING. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Nbre maxi de coeff. de la courbe (dimensionnement). */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 du polynome. */ -/* EPSI3D : La precision demandee pour l' approximation. */ -/* CRVLGD : La courbe dont on veut baisser le degre. */ +/* NCOFMX : Max Nb of coeff. of the curve (dimensioning). */ +/* NDIMEN : Dimension of the space. */ +/* NCOEFF : Degree +1 of the polynom. */ +/* EPSI3D : Precision required for the approximation. */ +/* CRVLGD : The curve the degree which of it is required to lower. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* EPSTRC : La precision de l' approximation. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* EPSTRC : Precision of the approximation. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 17-05-1991 : RBD ; Si le degre n'est pas baisse, l'erreur est nulle */ -/* 12-12-1989 : RBD ; Creation. */ /* > */ /* *********************************************************************** */ -/* ------- Degre minimum pouvant etre atteint : Arret a 1 (RBD) --------- +/* ------- Minimum degree that can be attained : Stop at 1 (RBD) --------- */ /* Parameter adjustments */ @@ -9332,7 +8855,7 @@ int mmtrpj0_(integer *ncofmx, /* Function Body */ *ncfnew = 1; -/* ------------------- Init pour calcul d' erreur ----------------------- +/* ------------------- Init for error calculation ----------------------- */ i__1 = *ndimen; for (i__ = 1; i__ <= i__1; ++i__) { @@ -9342,14 +8865,14 @@ int mmtrpj0_(integer *ncofmx, *epstrc = 0.; error = 0.; -/* Coupure des coefficients. */ +/* Cutting of coefficients. */ ncut = 2; -/* ------ Boucle sur la serie de Legendre :NCOEFF --> 2 (RBD) ----------- +/* ------ Loop on the series of Legendre :NCOEFF --> 2 (RBD) ----------- */ i__1 = ncut; for (i__ = *ncoeff; i__ >= i__1; --i__) { -/* Facteur de renormalisation. */ +/* Factor of renormalization. */ bidon = ((i__ - 1) * 2. + 1.) / 2.; bidon = sqrt(bidon); i__2 = *ndimen; @@ -9358,21 +8881,21 @@ int mmtrpj0_(integer *ncofmx, bidon; /* L310: */ } -/* On arrete de couper si la norme devient trop grande. */ +/* Cutting is stopped if the norm becomes too great. */ error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]); if (error > *epsi3d) { *ncfnew = i__; goto L9999; } -/* --- Erreur max cumulee lorsque le I-eme coeff est ote. */ +/* --- Max error cumulee when the I-th coeff is removed. */ *epstrc = error; /* L300: */ } -/* --------------------------------- Fin -------------------------------- +/* --------------------------------- End -------------------------------- */ L9999: @@ -9467,46 +8990,38 @@ int mmtrpj2_(integer *ncofmx, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Baisse le degre d' une courbe definie sur (-1,1) au sens de */ -/* Legendre a une precision donnee. */ +/* Lower the degree of a curve defined on (-1,1) in the direction of */ +/* Legendre with a given precision. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LEGENDRE,POLYGONE,TRONCONNAGE,COURBE,LISSAGE. */ +/* LEGENDRE, POLYGON, TRUNCATION, CURVE, SMOOTHING. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Nbre maxi de coeff. de la courbe (dimensionnement). */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 du polynome. */ -/* EPSI3D : La precision demandee pour l' approximation. */ -/* CRVLGD : La courbe dont on veut baisser le degre. */ +/* NCOFMX : Max nb of coeff. of the curve (dimensioning). */ +/* NDIMEN : Dimension of the space. */ +/* NCOEFF : Degree +1 of the polynom. */ +/* EPSI3D : Precision required for the approximation. */ +/* CRVLGD : The curve the degree which of will be lowered. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* YCVMAX : Tableau auxiliaire (erreur max sur chaque dimension). +/* YCVMAX : Auxiliary table (error max on each dimension). */ -/* EPSTRC : La precision de l' approximation. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* EPSTRC : Precision of the approximation. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 17-05-1991 : RBD ; Si le degre n'est pas baisse, l'erreur est nulle */ -/* 15-01-1991 : RBD ; Correction coupure des coeff. nuls du polynome */ -/* d' interpolation. */ -/* 12-12-1989 : RBD ; Creation. */ - /* > */ /* *********************************************************************** */ @@ -9522,11 +9037,11 @@ int mmtrpj2_(integer *ncofmx, -/* Degre minimum pouvant etre atteint : Arret a IA (RBD). ------------- +/* Minimum degree that can be reached : Stop at IA (RBD). ------------- */ ia = 2; *ncfnew = ia; -/* Init pour calcul d' erreur. */ +/* Init for calculation of error. */ i__1 = *ndimen; for (i__ = 1; i__ <= i__1; ++i__) { ycvmax[i__] = 0.; @@ -9535,14 +9050,14 @@ int mmtrpj2_(integer *ncofmx, *epstrc = 0.; error = 0.; -/* Coupure des coefficients. */ +/* Cutting of coefficients. */ ncut = ia + 1; -/* ------ Boucle sur la serie de Jacobi :NCOEFF --> IA+1 (RBD) ---------- +/* ------ Loop on the series of Jacobi :NCOEFF --> IA+1 (RBD) ---------- */ i__1 = ncut; for (i__ = *ncoeff; i__ >= i__1; --i__) { -/* Facteur de renormalisation. */ +/* Factor of renormalization. */ bidon = xmaxj[i__ - ncut]; i__2 = *ndimen; for (nd = 1; nd <= i__2; ++nd) { @@ -9550,21 +9065,21 @@ int mmtrpj2_(integer *ncofmx, bidon; /* L310: */ } -/* On arrete de couper si la norme devient trop grande. */ +/* One stops to cut if the norm becomes too great. */ error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]); if (error > *epsi3d) { *ncfnew = i__; goto L400; } -/* --- Erreur max cumulee lorsque le I-eme coeff est ote. */ +/* --- Max error cumulated when the I-th coeff is removed. */ *epstrc = error; /* L300: */ } -/* ------- Coupure des coeff. nuls du pol. d' interpolation (RBD) ------- +/* ------- Cutting of zero coeffs of interpolation (RBD) ------- */ L400: @@ -9583,11 +9098,11 @@ L400: } /* L500: */ } -/* --- Si tous les coeff peuvent etre otes, c'est un point. */ +/* --- If all coeffs can be removed, this is a point. */ *ncfnew = 1; } -/* --------------------------------- Fin -------------------------------- +/* --------------------------------- End -------------------------------- */ L9999: @@ -9680,46 +9195,38 @@ int mmtrpj4_(integer *ncofmx, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Baisse le degre d' une courbe definie sur (-1,1) au sens de */ -/* Legendre a une precision donnee. */ +/* Lowers the degree of a curve defined on (-1,1) in the direction of */ +/* Legendre with a given precision. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LEGENDRE,POLYGONE,TRONCONNAGE,COURBE,LISSAGE. */ +/* LEGENDRE, POLYGON, TRONCATION, CURVE, SMOOTHING. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Nbre maxi de coeff. de la courbe (dimensionnement). */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 du polynome. */ -/* EPSI3D : La precision demandee pour l' approximation. */ -/* CRVLGD : La courbe dont on veut baisser le degre. */ +/* NCOFMX : Max nb of coeff. of the curve (dimensioning). */ +/* NDIMEN : Dimension of the space. */ +/* NCOEFF : Degree +1 of the polynom. */ +/* EPSI3D : Precision required for the approximation. */ +/* CRVLGD : The curve which wishes to lower the degree. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* YCVMAX : Tableau auxiliaire (erreur max sur chaque dimension). +/* YCVMAX : Auxiliary table (max error on each dimension). */ -/* EPSTRC : La precision de l' approximation. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* EPSTRC : Precision of the approximation. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 17-05-1991 : RBD ; Si le degre n'est pas baisse, l'erreur est nulle */ -/* 15-01-1991 : RBD ; Correction coupure des coeff. nuls du polynome */ -/* d' interpolation. */ -/* 12-12-1989 : RBD ; Creation. */ - /* > */ /* *********************************************************************** */ @@ -9735,11 +9242,11 @@ int mmtrpj4_(integer *ncofmx, -/* Degre minimum pouvant etre atteint : Arret a IA (RBD). ------------- +/* Minimum degree that can be reached : Stop at IA (RBD). ------------- */ ia = 4; *ncfnew = ia; -/* Init pour calcul d' erreur. */ +/* Init for error calculation. */ i__1 = *ndimen; for (i__ = 1; i__ <= i__1; ++i__) { ycvmax[i__] = 0.; @@ -9748,14 +9255,14 @@ int mmtrpj4_(integer *ncofmx, *epstrc = 0.; error = 0.; -/* Coupure des coefficients. */ +/* Cutting of coefficients. */ ncut = ia + 1; -/* ------ Boucle sur la serie de Jacobi :NCOEFF --> IA+1 (RBD) ---------- +/* ------ Loop on the series of Jacobi :NCOEFF --> IA+1 (RBD) ---------- */ i__1 = ncut; for (i__ = *ncoeff; i__ >= i__1; --i__) { -/* Facteur de renormalisation. */ +/* Factor of renormalization. */ bidon = xmaxj[i__ - ncut]; i__2 = *ndimen; for (nd = 1; nd <= i__2; ++nd) { @@ -9763,21 +9270,21 @@ int mmtrpj4_(integer *ncofmx, bidon; /* L310: */ } -/* On arrete de couper si la norme devient trop grande. */ +/* Stop cutting if the norm becomes too great. */ error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]); if (error > *epsi3d) { *ncfnew = i__; goto L400; } -/* --- Erreur max cumulee lorsque le I-eme coeff est ote. */ +/* -- Error max cumulated when the I-eme coeff is removed. */ *epstrc = error; /* L300: */ } -/* ------- Coupure des coeff. nuls du pol. d' interpolation (RBD) ------- +/* ------- Cutting of zero coeffs of the pole of interpolation (RBD) ------- */ L400: @@ -9796,11 +9303,11 @@ L400: } /* L500: */ } -/* --- Si tous les coeff peuvent etre otes, c'est un point. */ +/* --- If all coeffs can be removed, this is a point. */ *ncfnew = 1; } -/* --------------------------------- Fin -------------------------------- +/* --------------------------------- End -------------------------------- */ L9999: @@ -9892,46 +9399,37 @@ int mmtrpj6_(integer *ncofmx, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Baisse le degre d' une courbe definie sur (-1,1) au sens de */ -/* Legendre a une precision donnee. */ +/* Lowers the degree of a curve defined on (-1,1) in the direction of */ +/* Legendre to a given precision. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LEGENDRE,POLYGONE,TRONCONNAGE,COURBE,LISSAGE. */ +/* LEGENDRE,POLYGON,TRUNCATION,CURVE,SMOOTHING. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Nbre maxi de coeff. de la courbe (dimensionnement). */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 du polynome. */ -/* EPSI3D : La precision demandee pour l' approximation. */ -/* CRVLGD : La courbe dont on veut baisser le degre. */ +/* NCOFMX : Max nb of coeff. of the curve (dimensioning). */ +/* NDIMEN : Dimension of the space. */ +/* NCOEFF : Degree +1 of the polynom. */ +/* EPSI3D : Precision required for the approximation. */ +/* CRVLGD : The curve the degree which of will be lowered. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* YCVMAX : Tableau auxiliaire (erreur max sur chaque dimension). -*/ -/* EPSTRC : La precision de l' approximation. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* YCVMAX : Auxiliary table (max error on each dimension). +/* EPSTRC : Precision of the approximation. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 17-05-1991 : RBD ; Si le degre n'est pas baisse, l'erreur est nulle */ -/* 15-01-1991 : RBD ; Correction coupure des coeff. nuls du polynome */ -/* d' interpolation. */ -/* 12-12-1989 : RBD ; Creation. */ - /* > */ /* *********************************************************************** */ @@ -9947,11 +9445,11 @@ int mmtrpj6_(integer *ncofmx, -/* Degre minimum pouvant etre atteint : Arret a IA (RBD). ------------- +/* Minimum degree that can be reached : Stop at IA (RBD). ------------- */ ia = 6; *ncfnew = ia; -/* Init pour calcul d' erreur. */ +/* Init for error calculation. */ i__1 = *ndimen; for (i__ = 1; i__ <= i__1; ++i__) { ycvmax[i__] = 0.; @@ -9960,14 +9458,14 @@ int mmtrpj6_(integer *ncofmx, *epstrc = 0.; error = 0.; -/* Coupure des coefficients. */ +/* Cutting of coefficients. */ ncut = ia + 1; -/* ------ Boucle sur la serie de Jacobi :NCOEFF --> IA+1 (RBD) ---------- +/* ------ Loop on the series of Jacobi :NCOEFF --> IA+1 (RBD) ---------- */ i__1 = ncut; for (i__ = *ncoeff; i__ >= i__1; --i__) { -/* Facteur de renormalisation. */ +/* Factor of renormalization. */ bidon = xmaxj[i__ - ncut]; i__2 = *ndimen; for (nd = 1; nd <= i__2; ++nd) { @@ -9975,21 +9473,21 @@ int mmtrpj6_(integer *ncofmx, bidon; /* L310: */ } -/* On arrete de couper si la norme devient trop grande. */ +/* Stop cutting if the norm becomes too great. */ error = AdvApp2Var_MathBase::mzsnorm_(ndimen, &ycvmax[1]); if (error > *epsi3d) { *ncfnew = i__; goto L400; } -/* --- Erreur max cumulee lorsque le I-eme coeff est ote. */ +/* --- Max error cumulated when the I-th coeff is removed. */ *epstrc = error; /* L300: */ } -/* ------- Coupure des coeff. nuls du pol. d' interpolation (RBD) ------- +/* ------- Cutting of zero coeff. of the pole of interpolation (RBD) ------- */ L400: @@ -10008,11 +9506,11 @@ L400: } /* L500: */ } -/* --- Si tous les coeff peuvent etre otes, c'est un point. */ +/* --- If all coeffs can be removed, this is a point. */ *ncfnew = 1; } -/* --------------------------------- Fin -------------------------------- +/* --------------------------------- End -------------------------------- */ L9999: @@ -10043,43 +9541,37 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Baisse le degre d' une courbe definie sur (-1,1) au sens de */ -/* Legendre a une precision donnee. */ +/* Lower the degree of a curve defined on (-1,1) in the direction of */ +/* Legendre with a given precision. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* LEGENDRE,POLYGONE,TRONCONNAGE,COURBE,LISSAGE. */ +/* LEGENDRE, POLYGON, TRUNCATION, CURVE, SMOOTHING. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOFMX : Nbre maxi de coeff. de la courbe (dimensionnement). */ -/* NDIMEN : Dimension de l' espace. */ -/* NCOEFF : Le degre +1 du polynome. */ -/* EPSI3D : La precision demandee pour l' approximation. */ -/* IORDRE : Ordre de continuite aux extremites. */ -/* CRVLGD : La courbe dont on veut baisser le degre. */ - -/* ARGUMENTS DE SORTIE : */ +/* NCOFMX : Max Nb coeff. of the curve (dimensioning). */ +/* NDIMEN : Dimension of the space. */ +/* NCOEFF : Degree +1 of the polynom. */ +/* EPSI3D : Precision required for the approximation. */ +/* IORDRE : Order of continuity at the extremities. */ +/* CRVLGD : The curve the degree which of should be lowered. */ + +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* ERRMAX : La precision de l' approximation. */ -/* NCFNEW : Le degre +1 du polynome resultat. */ +/* ERRMAX : Precision of the approximation. */ +/* NCFNEW : Degree +1 of the resulting polynom. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 06-08-91 : RBD; Declaration de dimension de YCVMAX. */ -/* 18-01-90 : RBD; Creation. */ - /* > */ /* *********************************************************************** */ @@ -10108,7 +9600,7 @@ L9999: ycvmax[1], errmax, ncfnew); } -/* ------------------------ Fin ----------------------------------------- +/* ------------------------ End ----------------------------------------- */ return 0; @@ -10144,54 +9636,44 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* CALCUL DU VECTEUR NORME A PARTIR D'UN VECTEUR QUELCONQUE */ -/* AVEC UNE PRECISION DONNEE PAR L' UTILISATEUR. */ +/* CALCULATE THE NORMAL VECTOR BASING ON ANY VECTOR */ +/* WITH PRECISION GIVEN BY THE USER. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TOUS, MATH_ACCES :: */ +/* ALL, MATH_ACCES :: */ /* VECTEUR&, NORMALISATION, &VECTEUR */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN : DIMENSION DE L'ESPACE */ -/* VECTOR : VECTEUR A NORMER */ -/* EPSILN : L' EPSILON EN DESSOUS DUQUEL ON CONSIDERE QUE LA */ -/* NORME DU VECTEUR EST NULLE. SI EPSILN<=0, UNE VALEUR */ -/* PAR DEFAUT EST IMPOSEE (10.D-17 SUR VAX). */ +/* NDIMEN : DIMENSION OF THE SPACE */ +/* VECTOR : VECTOR TO BE NORMED */ +/* EPSILN : EPSILON BELOW WHICH IT IS CONSIDERED THAT THE */ +/* NORM OF THE VECTOR IS NULL. IF EPSILN<=0, A DEFAULT VALUE */ +/* IS IMPOSED (10.D-17 ON VAX). */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* VECNRM : VECTEUR NORME */ -/* IERCOD 101 : LE VECTEUR EST NUL A EPSILN PRES. */ +/* VECNRM : NORMED VECTOR */ +/* IERCOD 101 : THE VECTOR IS NULL UP TO EPSILN. */ /* 0 : OK. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* VECTOR et VECNRM peuvent etre identiques. */ - -/* On calcule la norme du vecteur et on divise chaque composante par -*/ -/* cette norme. Apres cela on verifie si toutes les composantes du */ -/* vecteur sauf une vaut 0 a la precision machine pres. Dans */ -/* ce cas on met les composantes quasi-nulles a 0.D0. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 14-12-90 : RBD; Correction cas ou une seule composante est */ -/* significative, appel a MAOVSR8 pour la precision */ -/* machine. */ -/* 11-01-89 : RBD; Correction precision par defaut. */ -/* 05-10-88 : RBD; Creation d' apres UNITVT. */ -/* 23-01-85 : DH ; Creation version originale de UNITVT. */ +/* VECTOR and VECNRM can be identic. */ + +/* The norm of vector is calculated and each component is divided by +/* this norm. After this it is checked if all componentes of the */ +/* vector except for one cost 0 with machine precision. In */ +/* this case the quasi-null components are set to 0.D0. */ /* > */ /* *********************************************************************** */ @@ -10204,7 +9686,7 @@ L9999: /* Function Body */ *iercod = 0; -/* -------- Precision par defaut : le zero machine 10.D-17 sur Vax ------ +/* -------- Precision by default : zero machine 10.D-17 on Vax ------ */ AdvApp2Var_SysBase::maovsr8_(&nchif); @@ -10215,7 +9697,7 @@ L9999: eps0 = *epsiln; } -/* ----------------------------- Calcul de la norme --------------------- +/* ------------------------- Calculation of the norm -------------------- */ vnorm = AdvApp2Var_MathBase::mzsnorm_(ndimen, &vector[1]); @@ -10225,7 +9707,7 @@ L9999: goto L9999; } -/* ---------------------- Calcul du vecteur norme ----------------------- +/* ---------------------- Calculation of the vector norm --------------- */ izero = 0; @@ -10242,9 +9724,9 @@ L9999: /* L20: */ } -/* ------ Cas ou toutes les coordonnees sauf une sont presque nulles ---- +/* ------ Case when all coordinates except for one are almost null ---- */ -/* ------------- alors l' une des coordonnees vaut 1.D0 ou -1.D0 -------- +/* ------------- then one of coordinates costs 1.D0 or -1.D0 -------- */ if (izero == *ndimen - 1) { @@ -10285,37 +9767,32 @@ L9999: /************************************************************************ *******/ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Extraction du EPS1 du COMMON MPRCSN. */ +/* Extraction of EPS1 from COMMON MPRCSN. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* MPRCSN,PRECISON,EPS3. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ /* Humm. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* EPS3 : Le zero spatial du denominateur (10**-9) */ -/* EPS3 devrait valoir 10**-15 */ +/* EPS3 : space zero of the denominator (10**-9) */ +/* EPS3 should value 10**-15 */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 08-01-90 : ACS ; MPRCSN REMPLACE PAR INCLUDE */ -/* 21-01-1988: JJM ; Creation. */ - /* > */ /* *********************************************************************** */ @@ -10325,49 +9802,42 @@ L9999: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* DONNE LES TOLERANCES DE NULLITE DANS STRIM */ -/* AINSI QUE LES BORNES DES PROCESSUS ITERATIFS */ +/* GIVES TOLERANCES OF NULLITY IN STRIM */ +/* AND LIMITS OF ITERATIVE PROCESSES */ -/* CONTEXTE GENERAL, MODIFIABLE PAR L'UTILISATEUR */ +/* GENERAL CONTEXT, MODIFIABLE BY THE UTILISER */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* PARAMETRE , TOLERANCE */ +/* PARAMETER , TOLERANCE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* INITIALISATION : PROFIL , **VIA MPRFTX** A L' ENTREE DANS STRI -M*/ - -/* CHARGEMENT DES VALEURS PAR DEFAUT DU PROFIL DANS MPRFTX A L'ENTRE -E*/ -/* DANS STRIM. ELLES SONT CONSERVEES DANS DES VARIABLES LOCALES */ -/* DE MPRFTX */ +/* INITIALISATION : PROFILE , **VIA MPRFTX** AT INPUT IN STRIM*/ +/* LOADING OF DEFAULT VALUES OF THE PROFILE IN MPRFTX AT INPUT*/ +/* IN STRIM. THEY ARE PRESERVED IN THE LOCAL VARIABLES OF MPRFTX */ -/* REMISE DES VALEURS PAR DEFAUT : MDFINT */ -/* MODIFICATION INTERACTIVE PAR L'UTILISATEUR : MDBINT */ +/* RESET DEFAULT VALUES : MDFINT */ +/* MODIFICATION INTERACTIVE BY THE USER : MDBINT */ -/* FONCTION D'ACCES : MMEPS1 ... EPS1 */ +/* ACCESS FUNCTION : MMEPS1 ... EPS1 */ /* MEPSPB ... EPS3,EPS4 */ /* MEPSLN ... EPS2, NITERM , NITERR */ /* MEPSNR ... EPS2 , NITERM */ /* MITERR ... NITERR */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 01-02-90 : NAK ; ENTETE */ /* > */ /* *********************************************************************** */ -/* NITERM : NB D'ITERATIONS MAXIMAL */ -/* NITERR : NB D'ITERATIONS RAPIDES */ -/* EPS1 : TOLERANCE DE DISTANCE 3D NULLE */ -/* EPS2 : TOLERANCE DE DISTANCE PARAMETRIQUE NULLE */ -/* EPS3 : TOLERANCE POUR EVITER LES DIVISIONS PAR 0.. */ -/* EPS4 : TOLERANCE ANGULAIRE */ +/* NITERM : MAX NB OF ITERATIONS */ +/* NITERR : NB OF RAPID ITERATIONS */ +/* EPS1 : TOLERANCE OF 3D NULL DISTANCE */ +/* EPS2 : TOLERANCE OF ZERO PARAMETRIC DISTANCE */ +/* EPS3 : TOLERANCE TO AVOID DIVISION BY 0.. */ +/* EPS4 : TOLERANCE ANGULAR */ @@ -10409,40 +9879,34 @@ E*/ /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* CALCUL UN VECTEUR NON COLINEAIRE A UN VECTEUR DONNEE */ -/* NON NUL */ +/* CALCULATE A VECTOR NON-COLINEAR TO A GIVEN NON-NULL VECTOR */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* PUBLIC, VECTEUR, LIBRE */ +/* PUBLIC, VECTOR, FREE */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* ndimen :dimension de l'espace */ -/* vecin :vecteur entre */ +/* ndimen : dimension of the space */ +/* vecin : input vector */ - -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* vecout : vecteur non colineaire a vecin */ -/* COMMONS UTILISES : */ +/* vecout : vector non colinear to vecin */ + +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 25-08-95 : KHN; ECRITURE VERSION ORIGINALE. */ /* > */ /* *********************************************************************** */ @@ -10471,7 +9935,7 @@ E*/ /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ @@ -10535,7 +9999,7 @@ E*/ /* *********************************************************************** */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ /* *********************************************************************** */ @@ -10547,7 +10011,7 @@ L9101: /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ @@ -10578,41 +10042,38 @@ void AdvApp2Var_MathBase::mmwprcs_(doublereal *epsil1, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* ACCES EN ECRITURE POUR LE COMMON MPRCSN */ +/* ACCESS IN WRITING FOR COMMON MPRCSN */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* ECRITURE */ +/* WRITING */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* EPSIL1 : TOLERANCE DE DISTANCE 3D NULLE */ -/* EPSIL2 : TOLERANCE DE DISTANCE PARAMETRIQUE NULLE */ -/* EPSIL3 : TOLERANCE POUR EVITER LES DIVISIONS PAR 0.. */ -/* EPSIL4 : TOLERANCE ANGULAIRE */ -/* NITER1 : NB D'ITERATIONS MAXIMAL */ -/* NITER2 : NB D'ITERATIONS RAPIDES */ - -/* ARGUMENTS DE SORTIE : */ +/* EPSIL1 : TOLERANCE OF 3D NULL DISTANCE */ +/* EPSIL2 : TOLERANCE OF PARAMETRIC NULL DISTANCE */ +/* EPSIL3 : TOLERANCE TO AVOID DIVISION BY 0.. */ +/* EPSIL4 : ANGULAR TOLERANCE */ +/* NITER1 : MAX NB OF ITERATIONS */ +/* NITER2 : NB OF RAPID ITERATIONS */ + +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* NEANT */ +/* NONE */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 13-05-96 : JPI; ECRITURE VERSION ORIGINALE. */ /* > */ /* *********************************************************************** */ @@ -10623,63 +10084,55 @@ void AdvApp2Var_MathBase::mmwprcs_(doublereal *epsil1, /* *********************************************************************** */ -/* INITIALISATIONS */ +/* INITIALIZATIONS */ /* *********************************************************************** */ /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* DONNE LES TOLERANCES DE NULLITE DANS STRIM */ -/* AINSI QUE LES BORNES DES PROCESSUS ITERATIFS */ +/* GIVES TOLERANCES OF NULLITY IN STRIM */ +/* AND LIMITS OF ITERATIVE PROCESSES */ -/* CONTEXTE GENERAL, MODIFIABLE PAR L'UTILISATEUR */ +/* GENERAL CONTEXT, MODIFIABLE BY THE UTILISER */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* PARAMETRE , TOLERANCE */ +/* PARAMETER , TOLERANCE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* INITIALISATION : PROFIL , **VIA MPRFTX** A L' ENTREE DANS STRI -M*/ - -/* CHARGEMENT DES VALEURS PAR DEFAUT DU PROFIL DANS MPRFTX A L'ENTRE -E*/ -/* DANS STRIM. ELLES SONT CONSERVEES DANS DES VARIABLES LOCALES */ -/* DE MPRFTX */ +/* INITIALISATION : PROFILE , **VIA MPRFTX** AT INPUT IN STRIM*/ +/* LOADING OF DEFAULT VALUES OF THE PROFILE IN MPRFTX AT INPUT*/ +/* IN STRIM. THEY ARE PRESERVED IN THE LOCAL VARIABLES OF MPRFTX */ -/* REMISE DES VALEURS PAR DEFAUT : MDFINT */ -/* MODIFICATION INTERACTIVE PAR L'UTILISATEUR : MDBINT */ +/* RESET DEFAULT VALUES : MDFINT */ +/* MODIFICATION INTERACTIVE BY THE USER : MDBINT */ -/* FONCTION D'ACCES : MMEPS1 ... EPS1 */ +/* ACCESS FUNCTION : MMEPS1 ... EPS1 */ /* MEPSPB ... EPS3,EPS4 */ /* MEPSLN ... EPS2, NITERM , NITERR */ /* MEPSNR ... EPS2 , NITERM */ /* MITERR ... NITERR */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 01-02-90 : NAK ; ENTETE */ /* > */ /* *********************************************************************** */ -/* NITERM : NB D'ITERATIONS MAXIMAL */ -/* NITERR : NB D'ITERATIONS RAPIDES */ -/* EPS1 : TOLERANCE DE DISTANCE 3D NULLE */ -/* EPS2 : TOLERANCE DE DISTANCE PARAMETRIQUE NULLE */ -/* EPS3 : TOLERANCE POUR EVITER LES DIVISIONS PAR 0.. */ -/* EPS4 : TOLERANCE ANGULAIRE */ - +/* NITERM : MAX NB OF ITERATIONS */ +/* NITERR : NB OF RAPID ITERATIONS */ +/* EPS1 : TOLERANCE OF 3D NULL DISTANCE */ +/* EPS2 : TOLERANCE OF ZERO PARAMETRIC DISTANCE */ +/* EPS3 : TOLERANCE TO AVOID DIVISION BY 0.. */ +/* EPS4 : TOLERANCE ANGULAR */ /* *********************************************************************** @@ -10722,37 +10175,33 @@ E*/ /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul la fonction puissance entiere pas forcement de la maniere - la plus efficace ; +/* Calculate integer function power not obligatory in the most efficient way ; */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* PUISSANCE */ +/* POWER */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* X : argument de X**N */ -/* N : puissance */ +/* X : argument of X**N */ +/* N : power */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* retourne X**N */ +/* return X**N */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 16-10-95 : XAB ; Creation */ /* > */ /* ***********************************************************************/ @@ -10781,40 +10230,38 @@ integer pow__ii(integer *x, } +/* ********************************************************************** +*/ /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul la fonction puissance entiere pas forcement de la maniere - la plus efficace ; +/* Calculate integer function power not obligatory in the most efficient way ; */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* PUISSANCE */ +/* POWER */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* X : argument de X**N */ -/* N : puissance */ +/* X : argument of X**N */ +/* N : power */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* retourne X**N */ +/* return X**N */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 16-10-95 : XAB ; Creation */ /* > */ /* ***********************************************************************/ @@ -10840,38 +10287,32 @@ integer pow__ii(integer *x, /************************************************************************ *******/ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Calcul du produit scalaire de 2 vecteurs dans l' espace */ -/* de dimension NDIMEN. */ +/* Calculate the scalar product of 2 vectors in the space */ +/* of dimension NDIMEN. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* PRODUIT MSCALAIRE. */ +/* PRODUCT MSCALAIRE. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN : Dimension de l' espace. */ -/* VECTE1,VECTE2: Les vecteurs. */ +/* NDIMEN : Dimension of the space. */ +/* VECTE1,VECTE2: Vectors. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 18-07-1988: RBD ; Changement de nom des arguments pour plus */ -/* de lisibilite. */ -/* 16-01-1987: Verification implicite NDIMEN >0 JJM. */ - /* > */ /* *********************************************************************** */ @@ -10923,47 +10364,38 @@ int mvcvin2_(integer *ncoeff, /* FONCTION : */ /* ---------- */ -/* INVERSION DU PARAMETRAGE SUR UNE CRBE 2D. */ +/* INVERSION OF THE PARAMETERS ON CURVE 2D. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* COURBE,2D,INVERSION,PARAMETRE. */ +/* CURVE,2D,INVERSION,PARAMETER. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOEFF : NBRE DE COEFF DE LA COURBE. */ -/* CRVOLD : LA COURBE D'ORIGINE */ +/* NCOEFF : NB OF COEFF OF THE CURVE. */ +/* CRVOLD : CURVE OF ORIGIN */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CRVNEW : LA CRBE RESULTAT APRES CHANGT DE T EN 1-T */ +/* CRVNEW : THE RESULTING CURVE AFTER CHANGE OF T BY 1-T */ /* IERCOD : 0 OK, */ -/* 10 NBRE DE COEFF NUL OU TROP GRAND. */ +/* 10 NB OF COEFF NULL OR TOO GREAT. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* MCCNP */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Neant */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* L' APPEL SUIVANT EST TOUT A FAIT LEGAL : */ -/* CALL MVCVIN2(NCOEFF,CURVE,CURVE,IERCOD), LE TABLEAU CURVE */ -/* DEVENANT UN ARGUMENT D' ENTREE ET DE SORTIE (RBD). */ -/* A CAUSE DE MCCNP, LE NBRE DE COEFF DE LA COURBE EST LIMITE A */ +/* THE FOLLOWING CALL IS ABSOLUTELY LEGAL : */ +/* CALL MVCVIN2(NCOEFF,CURVE,CURVE,IERCOD), THE TABLE CURVE */ +/* BECOMES INPUT AND OUTPUT ARGUMENT (RBD). */ +/* BECAUSE OF MCCNP, THE NB OF COEFF OF THE CURVE IS LIMITED TO */ /* NDGCNP+1 = 61. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 24-09-93 : MPS ; PRISE EN COMPTE NCOEFF=1 */ -/* IMPLICIT NONE */ -/* 09-01-90 : TE ; COMMON MCCNP -> MCNCNP.INC & INDICES DES CNP */ -/* 05-08-88 : RBD ; ACTIVATION DE L' IERCOD */ -/* 27-06-88 : RBD ; VERIFICATION QUE LES IDENTIFICATEURS CRVNEW ET */ -/* CRVOLD PEUVENT DESIGNER LA MEME COURBE. */ -/* 14-04-88 : NAK ; VERSION ORIGINALE */ /* > */ /* *********************************************************************** */ @@ -10972,29 +10404,24 @@ int mvcvin2_(integer *ncoeff, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a fournir les coefficients du binome (triangle de Pascal). */ +/* Serves to provide coefficients of the binome (triangle of Pascal). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* Coeff du binome de 0 a 60. read only . init par block data */ +/* Coeff of binome from 0 to 60. read only . init par block data */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Les coefficients du binome forment une matrice triangulaire. */ -/* On complete cette matrice dans le tableau CNP par sa transposee. */ -/* On a donc: CNP(I,J) = CNP(J,I) pour I et J = 0, ..., 60. */ +/* The coefficients of the binome form a triangular matrix. */ +/* This matrix is completed in table CNP by transposition. */ +/* So: CNP(I,J) = CNP(J,I) for I and J = 0, ..., 60. */ + +/* Initialization is done by block-data MMLLL09.RES, */ +/* created by program MQINICNP.FOR (see the team (AC) ). */ -/* L'initialisation est faite a partir du block-data MMLLL09.RES, */ -/* cree par le programme MQINICNP.FOR (voir l'equipe (AC) ). */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 03-07-90 : RBD; Ajout commentaires (nom du block-data). */ -/* 19-06-90 : RBD; Le commun MMCMCNP remplace MCCNP qui est obsolete. -*/ -/* 08-01-90 : TE ; CREATION */ /* > */ /* ********************************************************************** */ @@ -11016,7 +10443,7 @@ int mvcvin2_(integer *ncoeff, *iercod = 0; -/* TERME CONSTANT DE LA NOUVELLE COURBE */ +/* CONSTANT TERM OF THE NEW CURVE */ cij1 = crvold[3]; cij2 = crvold[4]; @@ -11031,7 +10458,7 @@ int mvcvin2_(integer *ncoeff, goto L9999; } -/* PUISSANCES INTERMEDIAIRES DU PARAMETRE */ +/* INTERMEDIARY POWERS OF THE PARAMETER */ ncfm1 = *ncoeff - 1; m1jm1 = 1; @@ -11050,7 +10477,7 @@ int mvcvin2_(integer *ncoeff, crvnew[(j << 1) + 2] = cij2 * m1jm1; } -/* TERME DE PLUS HAUT DEGRE */ +/* TERM OF THE HIGHEST DEGREE */ crvnew[(*ncoeff << 1) + 1] = -crvold[(*ncoeff << 1) + 1] * m1jm1; crvnew[(*ncoeff << 1) + 2] = -crvold[(*ncoeff << 1) + 2] * m1jm1; @@ -11085,50 +10512,40 @@ int mvcvinv_(integer *ncoeff, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* INVERSION DU PARAMETRAGE SUR UNE CRBE 3D (I.E. INVERSION DU */ -/* SENS DE PARCOURS). */ +/* INVERSION OF THE PARAMETER ON A CURBE 3D (I.E. INVERSION */ +/* OF THE DIRECTION OF PARSING). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* COURBE,INVERSION,PARAMETRE. */ +/* CURVE,INVERSION,PARAMETER. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOEFF : NBRE DE COEFF DE LA COURBE. */ -/* CRVOLD : lA COURBE D'ORIGINE */ +/* NCOEFF : NB OF COEFF OF THE CURVE. */ +/* CRVOLD : CURVE OF ORIGIN */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CRVNEW : LA CRBE RESULTAT APRES CHANGT DE T EN 1-T */ +/* CRVNEW : RESULTING CURVE AFTER CHANGE OF T INTO 1-T */ /* IERCOD : 0 OK, */ -/* 10 NBRE DE COEFF NUL OU TROP GRAND. */ +/* 10 NB OF COEFF NULL OR TOO GREAT. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* MCCNP */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Neant */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* L' APPEL SUIVANT EST TOUT A FAIT LEGAL : */ -/* CALL MVCVINV(NCOEFF,CURVE,CURVE,IERCOD), LE TABLEAU CURVE */ -/* DEVENANT UN ARGUMENT D' ENTREE ET DE SORTIE (RBD). */ -/* LE NOMBRE DE COEFF DE LA COURBE EST LIMITE A NDGCNP+1 = 61 */ -/* A CAUSE DE L' UTILISATION DU COMMUN MCCNP. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 10-05-90 : JG ; NCOEFF=1 n'etait pas gere */ -/* 09-01-90 : TE ; COMMON MCCNP -> MMCMCNP.INC & INDICES DES CNP */ -/* 05-08-88 : RBD ; ACTIVATION DE L' IERCOD */ -/* 27-06-88 : RBD ; VERIFICATION QUE LES IDENTIFICATEURS CRVNEW ET */ -/* CRVOLD PEUVENT DESIGNER LA MEME COURBE. */ -/* 02-03-87 : NAK ; BRSTN --> MCCNP */ -/* 01-10-86 : NAK ; PRISE EN COMPTE LES ISOS DE LA FORME 1-T */ +/* THE FOLLOWING CALL IS ABSOLUTELY LEGAL : */ +/* CALL MVCVINV(NCOEFF,CURVE,CURVE,IERCOD), TABLE CURVE */ +/* BECOMES INPUT AND OUTPUT ARGUMENT (RBD). */ +/* THE NUMBER OF COEFF OF THE CURVE IS LIMITED TO NDGCNP+1 = 61 */ +/* BECAUSE OF USE OF COMMON MCCNP. */ /* > */ /* *********************************************************************** */ @@ -11136,29 +10553,22 @@ int mvcvinv_(integer *ncoeff, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a fournir les coefficients du binome (triangle de Pascal). */ +/* Serves to provide the binomial coefficients (triangle of Pascal). */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* Coeff du binome de 0 a 60. read only . init par block data */ +/* Binomial Coeff from 0 to 60. read only . init par block data */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* Les coefficients du binome forment une matrice triangulaire. */ -/* On complete cette matrice dans le tableau CNP par sa transposee. */ -/* On a donc: CNP(I,J) = CNP(J,I) pour I et J = 0, ..., 60. */ +/* The binomial coefficients form a triangular matrix. */ +/* This matrix is completed in table CNP by its transposition. */ +/* So: CNP(I,J) = CNP(J,I) for I and J = 0, ..., 60. */ -/* L'initialisation est faite a partir du block-data MMLLL09.RES, */ -/* cree par le programme MQINICNP.FOR (voir l'equipe (AC) ). */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 03-07-90 : RBD; Ajout commentaires (nom du block-data). */ -/* 19-06-90 : RBD; Le commun MMCMCNP remplace MCCNP qui est obsolete. -*/ -/* 08-01-90 : TE ; CREATION */ +/* Initialisation is done by block-data MMLLL09.RES, */ +/* created by program MQINICNP.FOR (see the team (AC) ). */ /* > */ /* ********************************************************************** */ @@ -11179,7 +10589,7 @@ int mvcvinv_(integer *ncoeff, } *iercod = 0; -/* TERME CONSTANT DE LA NOUVELLE COURBE */ +/* CONSTANT TERM OF THE NEW CURVE */ cij1 = crvold[4]; cij2 = crvold[5]; @@ -11198,7 +10608,7 @@ int mvcvinv_(integer *ncoeff, goto L9999; } -/* PUISSANCES INTERMEDIAIRES DU PARAMETRE */ +/* INTERMEDIARY POWER OF THE PARAMETER */ ncfm1 = *ncoeff - 1; m1jm1 = 1; @@ -11222,7 +10632,7 @@ int mvcvinv_(integer *ncoeff, /* L50: */ } -/* TERME DE PLUS HAUT DEGRE */ + /* TERM OF THE HIGHEST DEGREE */ crvnew[*ncoeff * 3 + 1] = -crvold[*ncoeff * 3 + 1] * m1jm1; crvnew[*ncoeff * 3 + 2] = -crvold[*ncoeff * 3 + 2] * m1jm1; @@ -11254,75 +10664,66 @@ int mvgaus0_(integer *kindic, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* -------- */ -/* Chargement pour un degre donne des racines du polynome de LEGENDRE */ -/* DEFINI SUR [-1,1] et des poids des formules de quadrature de Gauss */ -/* (bases sur les interpolants de LAGRANGE correspondants). */ -/* La symetrie par rapport a 0 entre [-1,0] et [0,1] est utilisee. */ +/* Loading of a degree gives roots of LEGENDRE polynom */ +/* DEFINED on [-1,1] and weights of Gauss quadrature formulas */ +/* (based on corresponding LAGRANGIAN interpolators). */ +/* The symmetry relative to 0 is used between [-1,0] and [0,1]. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* --------- */ -/* . VOLUMIQUE,LEGENDRE,LAGRANGE,GAUSS */ +/* . VOLUMIC, LEGENDRE, LAGRANGE, GAUSS */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTSE : */ /* ------------------ */ -/* KINDIC : Prends les valeurs de 1 a 10 en fonction du degre du */ -/* polynome a utiliser. */ -/* Le degre du polynome est egal a 4 k, c'est a dire 4, 8, */ -/* 12, 16, 20, 24, 28, 32, 36 et 40. */ +/* KINDIC : Takes values from 1 to 10 depending of the degree */ +/* of the used polynom. */ +/* The degree of the polynom is equal to 4 k, i.e. 4, 8, */ +/* 12, 16, 20, 24, 28, 32, 36 and 40. */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* UROOTL : Racines du polynome de LEGENDRE dans le domaine [1,0] */ -/* ordonnees en decroissant. Pour le domaine [-1,0], il faut */ -/* prendre les valeurs opposees. */ -/* HILTAB : Interpolant de LAGRANGE associes aux racines. Pour les */ -/* racines opposes, les interpolants sont egaux. */ -/* NBRVAL : Nombre de coefficients. C'est egal a la moitie du degre en */ -/* raison de la symetrie (i.e. 2*KINDIC). */ +/* UROOTL : Roots of LEGENDRE polynom in domain [1,0] */ +/* given in decreasing order. For domain [-1,0], it is */ +/* necessary to take the opposite values. */ +/* HILTAB : LAGRANGE interpolators associated to roots. For */ +/* opposed roots, interpolatorsare equal. */ +/* NBRVAL : Nb of coefficients. Is equal to the half of degree */ +/* depending on the symmetry (i.e. 2*KINDIC). */ -/* IERCOD : Code d'erreur : */ +/* IERCOD : Error code: */ /* < 0 ==> Attention - Warning */ -/* =-1 ==> Valeur de KINDIC erronne. NBRVAL est force a 20 */ -/* (ordre 40) */ -/* = 0 ==> Tout est OK */ +/* =-1 ==> Value of false KINDIC. NBRVAL is forced to 20 */ +/* (order 40) */ +/* = 0 ==> Everything is OK */ -/* COMMON UTILISES : */ +/* COMMON USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* --------------------------------- */ -/* Si KINDIC n'est pas bon (i.e < 1 ou > 10), le degre est pris */ -/* a 40 directement (ATTENTION au debordement - pour l'eviter, */ -/* prevoir UROOTL et HILTAB dimensionne a 20 au moins). */ - -/* La valeur des coefficients a ete calculee en quadruple precision -*/ -/* par JJM avec l'aide de GD. */ -/* La verification des racines a ete faite par GD. */ +/* If KINDIC is not correct (i.e < 1 or > 10), the degree is set */ +/* to 40 directly (ATTENTION to overload - to avoid it, */ +/* preview UROOTL and HILTAB dimensioned at least to 20). */ -/* Voir les explications detaillees sur le listing */ +/* The value of coefficients was calculated with quadruple precision +/* by JJM with help of GD. */ +/* Checking of roots was done by GD. */ -/* $ HISTORIQUES DES MODIFICATIONS : */ -/* ----------------------------- */ -/* . 23-03-90 : RBD; Les valeurs sont extraites du commun MLGDRTL -*/ -/* via MMEXTHI et MMEXTRL. */ -/* . 28-06-88 : JP; DECLARATIONS REAL *8 MAL PLACEES */ -/* . 08-08-87 : GD; Version originale */ +/* See detailed explications on the listing */ /* > */ /* ********************************************************************** */ /* ------------------------------------ */ -/* ****** Test de validite de KINDIC ** */ +/* ****** Test validity of KINDIC ** */ /* ------------------------------------ */ /* Parameter adjustments */ @@ -11341,11 +10742,11 @@ int mvgaus0_(integer *kindic, /* ---------------------------------------------------------------------- */ -/* ****** Chargement des NBRVAL racines positives en fonction du degre ** +/* ****** Load NBRVAL positive roots depending on the degree ** */ /* ---------------------------------------------------------------------- */ -/* ATTENTION : Le signe moins (-) dans la boucle est intentionnel. */ +/* ATTENTION : Sign minus (-) in the loop is intentional. */ mmextrl_(&ndegl, tamp); i__1 = *nbrval; @@ -11355,7 +10756,7 @@ int mvgaus0_(integer *kindic, } /* ------------------------------------------------------------------- */ -/* ****** Chargement des NBRVAL poids de Gauss en fonction du degre ** */ +/* ****** Loading of NBRVAL Gauss weight depending on the degree ** */ /* ------------------------------------------------------------------- */ mmexthi_(&ndegl, tamp); @@ -11366,7 +10767,7 @@ int mvgaus0_(integer *kindic, } /* ------------------------------- */ -/* ****** Fin du sous-programme ** */ +/* ****** End of sub-program ** */ /* ------------------------------- */ return 0; @@ -11393,48 +10794,44 @@ int mvpscr2_(integer *ncoeff, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* POSITIONNEMENT SUR UNE COURBE (NCF,2) DANS L'ESPACE DE DIMENSION 2. */ +/* POSITIONING ON CURVE (NCF,2) IN SPACE OF DIMENSION 2. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS,MATH_ACCES:: COURBE&,POSITIONNEMENT,&POINT. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOEFF : NOMBRE DE COEFFICIENTS DE LA COURBE */ -/* CURVE2 : EQUATION DE LA COURBE 2D */ -/* TPARAM : VALEUR DU PARAMETRE AU POINT CONSIDERE */ +/* NCOEFF : NUMBER OF COEFFICIENTS OF THE CURVE */ +/* CURVE2 : EQUATION OF CURVE 2D */ +/* TPARAM : VALUE OF PARAMETER AT GIVEN POINT */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PNTCRB : COORDONNEES DU POINT CORRESPONDANT AU PARAMETRE */ -/* TPARAM SUR LA COURBE 2D CURVE2. */ +/* PNTCRB : COORDINATES OF POINT CORRESPONDING TO PARAMETER */ +/* TPARAM ON CURVE 2D CURVE2. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* MSCHEMA DE HORNER. */ +/* MSCHEMA OF HORNER. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 16-05-90 : RBD; Optimisation sur une idee de GD. */ -/* 12-09-86 : NAK;ECRITURE VERSION ORIGINALE */ /* > */ /* ********************************************************************** */ -/* -------- INITIALISATIONS ET TRAITEMENT DES CAS PARTICULIERS ---------- +/* -------- INITIALIZATIONS AND PROCESSING OF PARTICULAR CASES ---------- */ -/* ---> Cas ou NCOEFF > 1 (cas STANDARD). */ +/* ---> Cas when NCOEFF > 1 (case STANDARD). */ /* Parameter adjustments */ --pntcrb; curve2 -= 3; @@ -11443,7 +10840,7 @@ int mvpscr2_(integer *ncoeff, if (*ncoeff >= 2) { goto L1000; } -/* ---> Cas ou NCOEFF <= 1. */ +/* ---> Case when NCOEFF <= 1. */ if (*ncoeff <= 0) { pntcrb[1] = 0.; pntcrb[2] = 0.; @@ -11454,7 +10851,7 @@ int mvpscr2_(integer *ncoeff, goto L9999; } -/* -------------------- MSCHEMA DE HORNER (CAS PARTICULIER) -------------- +/* -------------------- MSCHEMA OF HORNER (PARTICULAR CASE) -------------- */ L1000: @@ -11475,9 +10872,9 @@ L1000: goto L9999; } -/* ---------------------------- MSCHEMA DE HORNER ------------------------ +/* ---------------------------- MSCHEMA OF HORNER ------------------------ */ -/* ---> Ici TPARAM est different de 1.D0 et de 0.D0. */ +/* ---> TPARAM is different from 1.D0 and 0.D0. */ ndeg = *ncoeff - 1; xxx = curve2[(*ncoeff << 1) + 1]; @@ -11489,7 +10886,7 @@ L1000: } goto L5000; -/* ------------------------ RECUPERATION DU POINT CALCULE --------------- +/* ------------------------ RECOVER THE CALCULATED POINT --------------- */ L5000: @@ -11525,41 +10922,35 @@ int mvpscr3_(integer *ncoeff, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* POSITIONNEMENT SUR UNE COURBE (3,NCF) DANS L'ESPACE DE DIMENSION 3. */ +/* POSITIONING ON A CURVE (3,NCF) IN THE SPACE OF DIMENSION 3. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* TOUS, MATH_ACCES:: COURBE&,POSITIONNEMENT,&POINT. */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NCOEFF : NOMBRE DE COEFFICIENTS DE LA COURBE */ -/* CURVE3 : EQUATION DE LA COURBE 3D */ -/* TPARAM : VALEUR DU PARAMETRE AU POINT CONSIDERE */ +/* NCOEFF : NB OF COEFFICIENTS OF THE CURVE */ +/* CURVE3 : EQUATION OF CURVE 3D */ +/* TPARAM : VALUE OF THE PARAMETER AT THE GIVEN POINT */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PNTCRB : COORDONNEES DU POINT CORRESPONDANT AU PARAMETRE */ -/* TPARAM SUR LA COURBE 3D CURVE3. */ +/* PNTCRB : COORDINATES OF THE POINT CORRESPONDING TO PARAMETER */ +/* TPARAM ON CURVE 3D CURVE3. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Neant */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* MSCHEMA DE HORNER. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 16-05-90 : RBD; Optimisation sur une idee de GD (gain=10 pour */ -/* cent pour des courbes de degre 10 a 20). */ -/* 12-09-86 : NAK; ECRITURE VERSION ORIGINALE */ +/* MSCHEMA OF HORNER. */ /* > */ /* ********************************************************************** */ @@ -11568,10 +10959,10 @@ int mvpscr3_(integer *ncoeff, */ -/* -------- INITIALISATIONS ET TRAITEMENT DES CAS PARTICULIERS ---------- +/* -------- INITIALISATIONS AND PROCESSING OF PARTICULAR CASES ---------- */ -/* ---> Cas ou NCOEFF > 1 (cas STANDARD). */ +/* ---> Case when NCOEFF > 1 (cas STANDARD). */ /* Parameter adjustments */ --pntcrb; curve3 -= 4; @@ -11580,7 +10971,7 @@ int mvpscr3_(integer *ncoeff, if (*ncoeff >= 2) { goto L1000; } -/* ---> Cas ou NCOEFF <= 1. */ +/* ---> Case when NCOEFF <= 1. */ if (*ncoeff <= 0) { pntcrb[1] = 0.; pntcrb[2] = 0.; @@ -11593,7 +10984,7 @@ int mvpscr3_(integer *ncoeff, goto L9999; } -/* -------------------- MSCHEMA DE HORNER (CAS PARTICULIER) -------------- +/* -------------------- MSCHEMA OF HORNER (PARTICULAR CASE) -------------- */ L1000: @@ -11617,9 +11008,9 @@ L1000: goto L9999; } -/* ---------------------------- MSCHEMA DE HORNER ------------------------ +/* ---------------------------- MSCHEMA OF HORNER ------------------------ */ -/* ---> Ici TPARAM est different de 1.D0 et de 0.D0. */ +/* ---> Here TPARAM is different from 1.D0 and 0.D0. */ ndeg = *ncoeff - 1; xxx = curve3[*ncoeff * 3 + 1]; @@ -11633,7 +11024,7 @@ L1000: } goto L5000; -/* ------------------------ RECUPERATION DU POINT CALCULE --------------- +/* ------------------------ RETURN THE CALCULATED POINT ------------------ */ L5000: @@ -11670,45 +11061,38 @@ L9999: /************************************************************************ *******/ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* TRI LES COLONNES D'UN TABLEAU DE REAL*8 SUIVANT LA METHODE DE SHE -LL*/ -/* (DANS L'ORDRE CROISSANT) */ +/* PARSING OF COLUMNS OF TABLE OF REAL*8 BY SHELL METHOD*/ +/* (IN INCREASING ORDER) */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* POINT-ENTREE, TRI, SHELL */ +/* POINT-ENTRY, PARSING, SHELL */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* N : NOMBRE DE COLONNES DU TABLEAU */ -/* IS : NOMBRE DE LIGNE DU TABLEAU */ -/* DTAB : TABLEAU DE REAL*8 A TRIER */ -/* ICLE : POSITION DE LA CLE SUR LA COLONNE */ +/* N : NUMBER OF COLUMNS OF THE TABLE */ +/* IS : NUMBER OF LINE OF THE TABLE */ +/* DTAB : TABLE OF REAL*8 TO BE PARSED */ +/* ICLE : POSITION OF THE KEY ON THE COLUMN */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* DTAB : TABLEAU TRIE */ +/* DTAB : PARSED TABLE */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Neant */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* METHODE CLASSIQUE DE SHELL : TRI PAR SERIES */ -/* La declaration DTAB(IS, 1) correspond en fait a DTAB(IS, *) */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 24-09-93 : PMN; NETTOYAGE ET CORRECTION DE L'EN-TETE */ -/* 13-07-84 : BF ; VERSION D'ORIGINE */ - +/* CLASSIC SHELL METHOD : PARSING BY SERIES */ +/* Declaration DTAB(IS, 1) corresponds to DTAB(IS, *) */ /* > */ /* *********************************************************************** */ @@ -11725,8 +11109,8 @@ LL*/ } /* ------------------------ */ -/* INITIALISATION DE LA SUITE DES INCREMENTS */ -/* RECHERCHE DU PLUS GRAND INCREMENT TEL QUE INCR < N/9 */ +/* INITIALIZATION OF THE SEQUENCE OF INCREMENTS */ +/* FIND THE GREATEST INCREMENT SO THAT INCR < N/9 */ incr = 1; L1001: @@ -11737,8 +11121,8 @@ L1001: incr = incr * 3 + 1; goto L1001; -/* BOUCLE SUR LES INCREMENTS JUSQU'A INCR = 1 */ -/* TRI PAR SERIES DISTANTES DE INCR */ +/* LOOP ON INCREMENTS TILL INCR = 1 */ +/* PARSING BY SERIES DISTANT FROM INCR */ L1002: incrp1 = incr + 1; @@ -11747,7 +11131,7 @@ L1002: for (i3 = incrp1; i3 <= i__1; ++i3) { /* ---------------------- */ -/* METTRE L'ELEMENT I3 A SA PLACE DANS SA SERIE */ +/* SET ELEMENT I3 AT ITS PLACE IN THE SERIES */ i4 = i3 - incr; L1004: @@ -11776,7 +11160,7 @@ L1003: } /* -------- */ -/* PASSAGE A L'INCREMENT SUIVANT */ +/* PASSAGE TO THE NEXT INCREMENT */ incr /= 3; if (incr >= 1) { @@ -11808,46 +11192,42 @@ L9900: /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Sert a calculer la norme euclidienne d'un vecteur : */ +/* SERVES to calculate the euclidian norm of a vector : */ /* ____________________________ */ /* Z = V V(1)**2 + V(2)**2 + ... */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* SURMFACIQUE, */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NDIMEN : Dimension du vecteur */ -/* VECTEU : vecteur de dimension NDIMEN */ +/* NDIMEN : Dimension of the vector */ +/* VECTEU : vector of dimension NDIMEN */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* MZSNORM : Valeur de la norme euclidienne du vecteur VECTEU */ +/* MZSNORM : Value of the euclidian norm of vector VECTEU */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* .Neant. */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* R*8 ABS R*8 SQRT */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTESS/LIMITATIONS : */ /* ----------------------------------- */ -/* Pour limiter les risques d'overflow, on met en facteur */ -/* le terme de plus forte valeur absolue : */ +/* To limit the risks of overflow, */ +/* the term of the strongest absolute value is factorized : */ /* _______________________ */ /* Z = !V(1)! * V 1 + (V(2)/V(1))**2 + ... */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 11-09-1995 : JMF ; implicit none */ -/* 20-03-89 : DH ; Creation version originale */ /* > */ /* *********************************************************************** */ @@ -11858,11 +11238,11 @@ L9900: /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ -/* ___ Recherche du terme de plus forte valeur absolue */ +/* ___ Find the strongest absolute value term */ /* Parameter adjustments */ --vecteu; @@ -11878,7 +11258,7 @@ L9900: /* L100: */ } -/* ___ Calcul de la norme */ +/* ___ Calculate the norme */ if ((d__1 = vecteu[irmax], abs(d__1)) < 1.) { xsom = 0.; @@ -11908,7 +11288,7 @@ L9900: /* *********************************************************************** */ -/* RETOUR PROGRAMME APPELANT */ +/* RETURN CALLING PROGRAM */ /* *********************************************************************** */ diff --git a/src/AdvApp2Var/AdvApp2Var_Patch.cxx b/src/AdvApp2Var/AdvApp2Var_Patch.cxx index 3b178a3981..aa3ba60ea8 100755 --- a/src/AdvApp2Var/AdvApp2Var_Patch.cxx +++ b/src/AdvApp2Var/AdvApp2Var_Patch.cxx @@ -96,15 +96,15 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, const AdvApp2Var_EvaluatorFunc2Var& Func) { -// les donnees stockees dans le Context +// data stored in the Context Standard_Integer NDIMEN, NBSESP, NDIMSE, ISOFAV; NDIMEN = Conditions.TotalDimension(); NBSESP = Conditions.TotalNumberSSP(); -// Attention : ne marche que pour le 3D +// Attention : works only for 3D NDIMSE = 3; ISOFAV = Conditions.FavorIso(); -// les donnees relatives au patch a discretiser +// data related to the patch to be discretized Standard_Integer NBPNTU, NBPNTV; Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV; Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots(); @@ -118,8 +118,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, NBPNTV = (Conditions.VRoots())->Length(); if (myOrdInV>-1) NBPNTV -= 2; -// les donnees stockees dans le Framework Constraints cad Noeuds et Isos -// C1, C2, C3 et C4 sont dimensionnes en FORTRAN a (NDIMEN,IORDRU+2,IORDRV+2) +// data stored in the Framework Constraints cad Nodes and Isos +// C1, C2, C3 and C4 are dimensionnes in FORTRAN with (NDIMEN,IORDRU+2,IORDRV+2) Standard_Integer SIZE=NDIMEN*(IORDRU+2)*(IORDRV+2); Handle (TColStd_HArray1OfReal) HCOINS = new TColStd_HArray1OfReal(1,SIZE*4); @@ -130,10 +130,10 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, for (iu=0;iu<=myOrdInU;iu++) { for (iv=0;iv<=myOrdInV;iv++) { -// facteur de normalisation +// factor of normalization rho = pow(du,iu)*pow(dv,iv); -// F(U0,V0) et ses derivees normalisees sur (-1,1) +// F(U0,V0) and its derivatives normalized on (-1,1) valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).X(); HCOINS->SetValue( 1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv , valnorm ); valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Y(); @@ -141,7 +141,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Z(); HCOINS->SetValue( 3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm ); -// F(U1,V0) et ses derivees normalisees sur (-1,1) +// F(U1,V0) and its derivatives normalized on (-1,1) valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).X(); HCOINS->SetValue( SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm ); valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Y(); @@ -149,7 +149,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Z(); HCOINS->SetValue( SIZE+3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm ); -// F(U0,V1) et ses derivees normalisees sur (-1,1) +// F(U0,V1) and its derivatives normalized on (-1,1) valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).X(); HCOINS->SetValue( 2*SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm ); valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Y(); @@ -157,7 +157,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Z(); HCOINS->SetValue( 2*SIZE+3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm ); -// F(U1,V1) et ses derivees normalisees sur (-1,1) +// F(U1,V1) and its derivatives normalized on (-1,1) valnorm = rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).X(); HCOINS->SetValue( 3*SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm ); valnorm = rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).Y(); @@ -172,8 +172,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, Standard_Real *C3 = C2 + SIZE; Standard_Real *C4 = C3 + SIZE; -// tableaux SomTab et Diftab de discretisation des isos U=U0 et U=U1 -// SU0, SU1, DU0 et DU1 sont dimensionnes en FORTRAN a +// tables SomTab and Diftab of discretization of isos U=U0 and U=U1 +// SU0, SU1, DU0 and DU1 are dimensioned in FORTRAN to // (1+NBPNTV/2)*NDIMEN*(IORDRU+1) SIZE = (1+NBPNTV/2)*NDIMEN; @@ -198,7 +198,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, HDU1 ->ChangeArray1() = ( (Constraints.IsoU(myU1,myV0,myV1)).DifTab() ) ->Array1(); -// normalisation +// normalization Standard_Integer ideb1,ideb2,ideb3,ideb4,jj; for (iu=1;iu<=IORDRU;iu++) { rho = pow(du,iu); @@ -223,8 +223,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, Standard_Real *DU1 = (Standard_Real *) &HDU1 ->ChangeArray1()(HDU1 ->Lower()); -// tableaux SomTab et Diftab de discretisation des isos V=V0 et V=V1 -// SU0, SU1, DU0 et DU1 sont dimensionnes en FORTRAN a +// tables SomTab and Diftab of discretization of isos V=V0 and V=V1 +// SU0, SU1, DU0 and DU1 are dimensioned in FORTRAN at // (1+NBPNTU/2)*NDIMEN*(IORDRV+1) SIZE = (1+NBPNTU/2)*NDIMEN; @@ -273,7 +273,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, Standard_Real *DV1 = (Standard_Real *) &HDV1 ->ChangeArray1()(HDV1 ->Lower()); -// SOSOTB et DIDITB sont dimensionnes en FORTRAN a +// SOSOTB and DIDITB are dimensioned in FORTRAN at // (0:NBPNTU/2,0:NBPNTV/2,NDIMEN) SIZE=(1+NBPNTU/2)*(1+NBPNTV/2)*NDIMEN; @@ -289,7 +289,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, (Standard_Real *) &HDIDI ->ChangeArray1()(HDIDI ->Lower()); HDIDI->Init(0.); -// SODITB et DISOTB sont dimensionnes en FORTRAN a +// SODITB and DISOTB are dimensioned in FORTRAN at // (1:NBPNTU/2,1:NBPNTV/2,NDIMEN) SIZE=(NBPNTU/2)*(NBPNTV/2)*NDIMEN; @@ -307,12 +307,12 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, Standard_Integer IERCOD=0; -// discretisation des polynomes d'interpolation +// discretization of polynoms of interpolation AdvApp2Var_ApproxF2var::mma2cdi_(&NDIMEN,&NBPNTU,UROOT,&NBPNTV,VROOT,&IORDRU,&IORDRV, C1,C2,C3,C4,SU0,SU1,DU0,DU1,SV0,SV1,DV0,DV1, SOSOTB,SODITB,DISOTB,DIDITB,&IERCOD); -// discretisation du carreau +// discretization of the square Standard_Real UDBFN[2],VDBFN[2]; UDBFN[0] = myU0; UDBFN[1] = myU1; @@ -350,7 +350,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions, TAB, &IERCOD); -// on stocke les resultats +// the results are stored if (IERCOD == 0) { myDiscIsDone = Standard_True; mySosoTab = HSOSO; @@ -391,24 +391,24 @@ Standard_Boolean AdvApp2Var_Patch::IsApproximated() const void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints) { -// les donnees stockees dans le Context +// data stored in the Context Standard_Integer NDIMEN, NBSESP, NDIMSE; Standard_Integer IERCOD, NCFLMU, NCFLMV, NDegU, NDegV; NDIMEN = Conditions.TotalDimension(); NBSESP = Conditions.TotalNumberSSP(); -// Attention : ne marche que pour le 3D +// Attention : works only for 3D NDIMSE = 3; NCFLMU = Conditions.ULimit(); NCFLMV = Conditions.VLimit(); NDegU = NCFLMU - 1; NDegV = NCFLMV - 1; -// les donnees relatives au patch a approcher +// data relative to the patch Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV; Standard_Real *PATCAN = (Standard_Real *) &myEquation ->ChangeArray1()(myEquation ->Lower()); -// les courbes d'approximation des Isos U +// curves of approximation of Isos U Standard_Integer SIZE = NCFLMV*NDIMEN; Handle (TColStd_HArray1OfReal) HIsoU0 = new TColStd_HArray1OfReal(1,SIZE*(IORDRU+1)); @@ -434,7 +434,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, (Standard_Integer *) &HCFU1 ->ChangeArray1()(HCFU1 ->Lower()); HCFU1->Init( (Constraints.IsoU(myU1,myV0,myV1)).NbCoeff() ); -// normalisation des Isos U +// normalization of Isos U Standard_Integer iu,iv; Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho,valnorm; Standard_Integer ideb0,ideb1,jj; @@ -449,7 +449,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, } } -// les courbes d'approximation des Isos V +// curves of approximation of Isos V SIZE = NCFLMU*NDIMEN; Handle (TColStd_HArray1OfReal) HIsoV0 = new TColStd_HArray1OfReal(1,SIZE*(IORDRV+1)); @@ -475,7 +475,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, (Standard_Integer *) &HCFV1 ->ChangeArray1()(HCFV1 ->Lower()); HCFV1->Init( (Constraints.IsoV(myU0,myU1,myV1)).NbCoeff() ); -// normalisation des Isos V +// normalization of Isos V for (iv=1;iv<=IORDRV;iv++) { rho = pow(dv,iv); ideb0 = HIsoV0->Lower() + iv*SIZE -1; @@ -486,7 +486,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, } } -// ajout des contraintes a V constant +// add constraints to constant V Handle (TColStd_HArray1OfReal) HHERMV = new TColStd_HArray1OfReal(1,(2*IORDRV+2)*(2*IORDRV+2)); Standard_Real *HermV = @@ -510,7 +510,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, PATCAN); } -// ajout des contraintes a U constant +// add constraints to constant U Handle (TColStd_HArray1OfReal) HHERMU = new TColStd_HArray1OfReal(1,(2*IORDRU+2)*(2*IORDRU+2)); Standard_Real *HermU = @@ -525,7 +525,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, NCFU0,IsoU0,NCFU1,IsoU1,HermU,PATCAN); } -// ajout des contraintes de coins +// add constraints at the corners Standard_Integer ideb; SIZE=NDIMEN*(IORDRU+2)*(IORDRV+2); Handle (TColStd_HArray1OfReal) HCOINS = @@ -535,7 +535,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, for (iv=0;iv<=myOrdInV;iv++) { rho = pow(du,iu)*pow(dv,iv); -// -F(U0,V0) et ses derivees normalisees sur (-1,1) +// -F(U0,V0) and its derivatives normalized on (-1,1) ideb = HCOINS->Lower() + NDIMEN*iu+NDIMEN*(IORDRU+2)*iv - 1; valnorm = -rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).X(); HCOINS->SetValue( 1+ideb , valnorm ); @@ -544,7 +544,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, valnorm = -rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Z(); HCOINS->SetValue( 3+ideb , valnorm ); -// -F(U1,V0) et ses derivees normalisees sur (-1,1) +// -F(U1,V0) and its derivatives normalized on (-1,1) ideb += SIZE; valnorm = -rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).X(); HCOINS->SetValue( 1+ideb , valnorm ); @@ -553,7 +553,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, valnorm = -rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Z(); HCOINS->SetValue( 3+ideb , valnorm ); -// -F(U0,V1) et ses derivees normalisees sur (-1,1) +// -F(U0,V1) and its derivatives normalized on (-1,1) ideb += SIZE; valnorm = -rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).X(); HCOINS->SetValue( 1+ideb , valnorm ); @@ -562,7 +562,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, valnorm = -rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Z(); HCOINS->SetValue( 3+ideb , valnorm ); -// -F(U1,V1) et ses derivees normalisees sur (-1,1) +// -F(U1,V1) and its derivatives normalized on (-1,1) ideb += SIZE; valnorm = -rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).X(); HCOINS->SetValue( 1+ideb , valnorm ); @@ -573,7 +573,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, } } -// tableaux necessaires pour le FORTRAN +// tables required for FORTRAN Standard_Integer IORDMX = Max(IORDRU,IORDRV); Handle (TColStd_HArray1OfReal) HEXTR = new TColStd_HArray1OfReal(1,2*IORDMX+2); @@ -587,7 +587,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, Standard_Integer idim,ncf0,ncf1,iun=1; Standard_Real *Is; -// ajout des extremites des isos U +// add extremities of isos U for (iu=1;iu<=IORDRU+1;iu++) { ncf0 = HCFU0->Value(HCFU0->Lower()+iu-1); ncf1 = HCFU1->Value(HCFU1->Lower()+iu-1); @@ -609,7 +609,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, } } -// ajout des extremites des isos V +// add extremities of isos V for (iv=1;iv<=IORDRV+1;iv++) { ncf0 = HCFV0->Value(HCFV0->Lower()+iv-1); ncf1 = HCFV1->Value(HCFV1->Lower()+iv-1); @@ -631,7 +631,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions, } } -// ajout du tout a PATCAN +// add all to PATCAN Standard_Real *C1 = (Standard_Real *) &HCOINS ->ChangeArray1()(HCOINS ->Lower()); Standard_Real *C2 = C1 + SIZE; @@ -660,7 +660,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints) hmax[3] = 1.75; for (iesp=1;iesp<=NBSESP;iesp++) { - // erreur max dans le sous-espace iesp + // error max in sub-space iesp errU=0.; for (iv=1;iv<=myOrdInV+1;iv++) { error = ((Constraints.IsoV(myU0,myU1,myV0)).MaxErrors())->Value(iesp,iv); @@ -678,7 +678,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints) myMaxErrors->ChangeValue(iesp) += errU * hmax[myOrdInV+1] + errV * hmax[myOrdInU+1]; - // erreur moyenne dans le sous-espace iesp + // average error in sub-space iesp errU=0.; for (iv=1;iv<=myOrdInV+1;iv++) { error = ((Constraints.IsoV(myU0,myU1,myV0)).MoyErrors())->Value(iesp,iv); @@ -699,7 +699,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints) + errV*hmax[myOrdInU+1] * errV*hmax[myOrdInU+1]; myMoyErrors->SetValue(iesp,Sqrt(error)); - // erreurs maxi aux iso-frontieres + // max errors at iso-borders Handle (TColStd_HArray2OfReal) HERISO = new TColStd_HArray2OfReal(1,NBSESP,1,4); HERISO->SetValue(iesp,1, @@ -711,7 +711,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints) HERISO->SetValue(iesp,4, ((Constraints.IsoU(myU1,myV0,myV1)).MaxErrors())->Value(iesp,1)); -// calcul des erreurs max aux coins +// calculate max errors at the corners Standard_Real emax1=0.,emax2=0.,emax3=0.,emax4=0.,err1,err2,err3,err4; for (iu=0;iu<=myOrdInU;iu++) { for (iv=0;iv<=myOrdInV;iv++) { @@ -726,13 +726,13 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints) } } -// calcul des erreurs max sur les bords +// calculate max errors on borders err1 = Max(emax1,emax2); err2 = Max(emax3,emax4); err3 = Max(emax1,emax3); err4 = Max(emax2,emax4); -// calcul des erreurs finales sur les isos internes +// calculate final errors on internal isos if ( (Constraints.IsoV(myU0,myU1,myV0)).Position() == 0 ) { HERISO ->ChangeValue(iesp,1) += err1*hmax[myOrdInU+1]; } @@ -759,7 +759,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions, const Standard_Integer NumDec) { -// les donnees stockees dans le Context +// data stored in the Context Standard_Integer NDIMEN, NBSESP, NDIMSE; Standard_Integer NBPNTU, NBPNTV, NCFLMU, NCFLMV, NDJACU, NDJACV; Standard_Integer NDegU, NDegV, NJacU, NJacV; @@ -779,11 +779,11 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions, NJacU = NDJACU + 1; NJacV = NDJACV + 1; -// les donnees relatives au patch a approcher +// data relative to the processed patch Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV, NDMINU = 1, NDMINV = 1, NCOEFU, NCOEFV; -// NDMINU et NDMINV dependent du nb de coeff des isos voisines -// et de l'ordre de continuite souhaite +// NDMINU and NDMINV depend on the nb of coeff of neighboring isos +// and of the required order of continuity NDMINU = Max(1,2*IORDRU+1); NCOEFU = (Constraints.IsoV(myU0,myU1,myV0)).NbCoeff()-1; NDMINU = Max(NDMINU,NCOEFU); @@ -796,7 +796,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions, NCOEFV = (Constraints.IsoU(myU1,myV0,myV1)).NbCoeff()-1; NDMINV = Max(NDMINV,NCOEFV); -// les tableaux des approximations +// tables of approximations Handle (TColStd_HArray1OfReal) HEPSAPR = new TColStd_HArray1OfReal(1,NBSESP); Handle (TColStd_HArray1OfReal) HEPSFRO = @@ -842,7 +842,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions, Standard_Real *ERRMOY = (Standard_Real *) &HERRMOY ->ChangeArray1()(HERRMOY ->Lower()); -// les tableaux de discretisation du carreau +// tables of discretization of the square Standard_Real *SOSOTB = (Standard_Real *) &mySosoTab ->ChangeArray1()(mySosoTab ->Lower()); Standard_Real *DISOTB = @@ -884,7 +884,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions, &ITYDEC, &IERCOD); -// les resultats +// results myCutSense = ITYDEC; if (ITYDEC == 0 && IERCOD<=0) { myHasResult = Standard_True; @@ -894,7 +894,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions, myMaxErrors = HERRMAX; myMoyErrors = HERRMOY; -// Passage en canonique sur [-1,1] +// Passage to canonic on [-1,1] AdvApp2Var_MathBase::mmfmca9_(&NJacU,&NJacV,&NDIMEN,&myNbCoeffInU,&myNbCoeffInV, &NDIMEN,PATJAC,PATJAC); AdvApp2Var_ApproxF2var::mma2can_(&NCFLMU,&NCFLMV,&NDIMEN, @@ -907,11 +907,11 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions, } myEquation = HPCAN; -// Ajout des contraintes et des erreurs +// Add constraints and errors AddConstraints(Conditions,Constraints); AddErrors(Constraints); -// Reduction des degres si possible +// Reduction of degrees if possible PATCAN = (Standard_Real *) &myEquation->ChangeArray1()(myEquation ->Lower()); @@ -969,7 +969,7 @@ void AdvApp2Var_Patch::ChangeDomain(const Standard_Real a, //============================================================================ //function : ResetApprox -//purpose : permet d'effacer un resultat lorsqu'il faut decouper +//purpose : allows removing a result when it is necessary to cut //============================================================================ void AdvApp2Var_Patch::ResetApprox() @@ -980,8 +980,7 @@ void AdvApp2Var_Patch::ResetApprox() //============================================================================ //function : OverwriteApprox -//purpose : permet de conserver un resultat -// meme si la precision n'est pas satisfaite +//purpose : allows preserving a result even if the precision is not satisfactory //============================================================================ void AdvApp2Var_Patch::OverwriteApprox() @@ -1052,9 +1051,9 @@ Standard_Integer AdvApp2Var_Patch::VOrder() const //============================================================================ -//function : CutSense sans Critere -//purpose : 0 : OK; 1 : decoupe necessaire en U; -// 2 : dec. nec. en V; 3 : dec. nec. en U et en V +//function : CutSense without Critere +//purpose : 0 : OK; 1 : required cut by U; +// 2 : required cut by V; 3 : required cut by U and by V //============================================================================ Standard_Integer AdvApp2Var_Patch::CutSense() const @@ -1064,9 +1063,9 @@ Standard_Integer AdvApp2Var_Patch::CutSense() const //============================================================================ -//function : CutSense avec critere -//purpose : 0 : OK; 1 : decoupe necessaire en U; -// 2 : dec. nec. en V; 3 : dec. nec. en U et en V +//function : CutSense with critere +//purpose : 0 : OK; 1 : required cut by U; +// 2 : required cut by V; 3 : required cut by U and by V //============================================================================ Standard_Integer AdvApp2Var_Patch::CutSense(const AdvApp2Var_Criterion& Crit, @@ -1109,7 +1108,7 @@ Standard_Integer AdvApp2Var_Patch::NbCoeffInV() const //============================================================================ //function : ChangeNbCoeff -//purpose : permet d'augmenter le nombre de coeff (cf Network) +//purpose : allows increasing the nb of coeff (cf Network) //============================================================================ void AdvApp2Var_Patch::ChangeNbCoeff(const Standard_Integer NbCoeffU, @@ -1121,7 +1120,7 @@ void AdvApp2Var_Patch::ChangeNbCoeff(const Standard_Integer NbCoeffU, //============================================================================ //function : MaxErrors -//purpose : retourne les erreurs max de l'approximation polynomiale +//purpose : returns max errors of polynomial approximation //============================================================================ Handle(TColStd_HArray1OfReal) @@ -1132,7 +1131,7 @@ AdvApp2Var_Patch::MaxErrors() const //============================================================================ //function : AverageErrors -//purpose : retourne les erreurs moyennes de l'approximation polynomiale +//purpose : returns average errors of polynomial approximation //============================================================================ Handle(TColStd_HArray1OfReal) @@ -1143,7 +1142,7 @@ AdvApp2Var_Patch::AverageErrors() const //============================================================================ //function : IsoErrors -//purpose : retourne les erreurs max sur les frontieres de l'approx. polyn. +//purpose : returns max errors on borders of polynomial approximation //============================================================================ Handle(TColStd_HArray2OfReal) @@ -1154,7 +1153,7 @@ AdvApp2Var_Patch::IsoErrors() const //============================================================================ //function : Poles -//purpose : retourne les poles de l'approximation polynomiale +//purpose : returns poles of the polynomial approximation //============================================================================ Handle(TColgp_HArray2OfPnt) @@ -1195,7 +1194,7 @@ AdvApp2Var_Patch::Poles(const Standard_Integer SSPIndex, //============================================================================ //function : Coefficients -//purpose : retourne les coeff. de l'equation de l'approximation polynomiale +//purpose : returns coeff. of the equation of polynomial approximation //============================================================================ Handle(TColStd_HArray1OfReal) diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx index a62378bd65..58c0f0bfaa 100755 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx @@ -144,60 +144,52 @@ int AdvApp2Var_SysBase::macinit_(integer *imode, static cilist io______1 = { 0, 0, 0, (char*) "(' --- Debug-mode : ',I10,' ---')", 0 }; /* ************************************************************************/ - /* FONCTION : */ + /* FUNCTION : */ /* ---------- */ - /* INITIALISATION DES UNITES DE LECTURE-ECRITURE, ET DE 'IBB' */ + /* INITIALIZATION OF READING WRITING UNITS AND 'IBB' */ - /* MOTS CLES : */ + /* KEYWORDS : */ /* ----------- */ - /* GESTION, CONFIGURATION, UNITES, INITIALISATION */ + /* MANAGEMENT, CONFIGURATION, UNITS, INITIALIZATION */ - /* ARGUMENTS D'ENTREE : */ + /* INPUT ARGUMENTS : */ /* -------------------- */ - /* IMODE : MODE D'INIT : 0= DEFAUT, IMP VAUDRA 6 ET IBB 0 */ - /* ET LEC 5 */ - /* 1= FORCE LA VALEUR DE IMP */ - /* 2= FORCE LA VALEUR DE IBB */ - /* 3= FORCE LA VALEUR DE LEC */ - - /* ARGUMENT UTILISE QUE LORSQUE IMODE VAUT 1 OU 2 : */ - /* IVAL : VALEUR DE IMP LORSQUE IMODE VAUT 1 */ - /* VALEUR DE IBB LORSQUE IMODE VAUT 2 */ - /* VALEUR DE LEC LORSQUE IMODE VAUT 3 */ - /* IL N'Y A PAS DE CONTROLE SUR LA VALIDITE DE LA VALEUR DE IVAL . */ - - /* ARGUMENTS DE SORTIE : */ - /* --------------------- */ - /* NEANT */ - - /* COMMONS UTILISES : */ - /* ------------------ */ - /* REFERENCES APPELEES : */ - /* --------------------- */ - /* DESCRIPTION/REMARQUES/LIMITATIONS : */ - /* ----------------------------------- */ - - /* IL NE S'AGIT QUE D'INITIALISER LE COMMON BLANK POUR TOUS LES */ - /* MODULES QUI N'ONT A PRIORI PAS BESOIN DE CONNAITRE LES COMMONS */ - /* DE T . */ - /* LORSQU'UNE MODIFICATION DE IBB EST DEMANDEE (IMODE=2) UN MESSAGE */ - /* D'INFORMATION EST EMIS SUR IMP, AVEC LA NOUVELLE VALEUR DE IBB. */ - - /* IBB : MODE DEBUG DE STRIM T : REGLES D'UTILISATION : */ - /* 0 VERSION SOBRE */ - /* >0 LA VERSION A D'AUTANT PLUS DE COMMENTAIRES */ - /* QUE IBB EST GRAND . */ - /* PAR EXEMPLE AVEC IBB=1 LES ROUTINES APPELEES */ - /* SE SIGNALENT SUR IMP ('ENTREE DANS TOTO', */ - /* ET 'SORTIE DE TOTO'), ET LES ROUTINES RENVOYANT */ - /* UN CODE ERREUR NON NUL LE SIGNALENT EGALEMENT. */ - /* (MAIS CECI N'EST PAS VRAI POUR TOUTES LES ROUTINES DE T) */ - - /* $ HISTORIQUE DES MODIFICATIONS : */ - /* ------------------------------ */ - /* 22-12-89 : DGZ; MODIFICATION EN-TETE */ - /* 30-05-88 : PP ; AJOUT DE LEC */ - /* 15-03-88 : PP ; ECRITURE VERSION ORIGINALE */ + /* IMODE : MODE of INITIALIZATION : + 0= DEFAULT, IMP IS 6, IBB 0 and LEC 5 */ + /* 1= FORCE VALUE OF IMP */ + /* 2= FORCE VALUE OF IBB */ + /* 3= FORCE VALUE OF LEC */ + + /* ARGUMENT USED ONLY WHEN IMODE IS 1 OR 2 : */ + /* IVAL : VALUE OF IMP WHEN IMODE IS 1 */ + /* VALUE OF IBB WHEN IMODE IS 2 */ + /* VALUE OF LEC WHEN IMODE IS 3 */ + /* THERE IS NO CONTROL OF VALIDITY OF VALUE OF IVAL . */ + + /* OUTPUT ARGUMENTS : */ + /* -------------------- */ + /* NONE */ + + /* COMMONS USED : */ + /* -------------- */ + /* REFERENCES CALLED : */ + /* ------------------- */ + /* DESCRIPTION/NOTES/LIMITATIONS : */ + /* ------------------------------- */ + + /* THIS IS ONLY INITIALIZATION OF THE COMMON BLANK FOR ALL */ + /* MODULES THAT A PRIORI DO NOT NEED TO KNOW THE COMMONS OF T . */ + /* WHEN A MODIFICATION OF IBB IS REQUIRED (IMODE=2) AN INFO MESSAGE */ + /* IS SUBMITTED ON IMP, WITH THE NEW VALUE OF IBB. */ + + /* IBB : MODE DEBUG OF STRIM T : RULES OF USE : */ + /* 0 RESTRAINED VERSION */ + /* >0 THE GREATER IS IBB THE MORE COMMENTS THE VERSION HAS. */ + /* FOR EXAMPLE FOR IBB=1 THE ROUTINES CALLED */ + /* INFORM ON IMP ('INPUT IN TOTO', */ + /* AND 'OUTPUT FROM TOTO'), AND THE ROUTINES THAT RETURN */ + /* NON NULL ERROR CODE INFORM IT AS WELL. */ + /* (BUT IT IS NOT TRUE FOR ALL ROUTINES OF T) */ /* > */ /* *********************************************************************** */ @@ -243,49 +235,44 @@ int AdvApp2Var_SysBase::macrai4_(integer *nbelem, /* *********************************************************************** */ - /* FONCTION : */ + /* FUNCTION : */ /* ---------- */ - /* Demande d'allocation dynamique de type INTEGER */ + /* Require dynamic allocation of type INTEGER */ - /* MOTS CLES : */ - /* ----------- */ - /* SYSTEME, ALLOCATION, MEMOIRE, REALISATION */ - - /* ARGUMENTS D'ENTREE : */ - /* -------------------- */ - /* NBELEM : Nombre d'unites demandes */ - /* MAXELM : Nombre maxi d'unites disponibles dans ITABLO */ - /* ITABLO : Adresse de reference de la zone allouee */ - - /* ARGUMENTS DE SORTIE : */ - /* --------------------- */ - /* IOFSET : Decalage */ - /* IERCOD : Code d'erreur */ + /* KEYWORDS : */ + /* ---------- */ + /* SYSTEM, ALLOCATION, MEMORY, REALISATION */ + + /* INPUT ARGUMENTS : */ + /* ----------------- */ + /* NBELEM : Number of required units */ + /* MAXELM : Max number of units available in ITABLO */ + /* ITABLO : Reference Address of the rented zone */ + + /* OUTPUT ARGUMENTS : */ + /* ------------------- */ + /* IOFSET : Offset */ + /* IERCOD : Error code */ /* = 0 : OK */ - /* = 1 : Nbre maxi d'allocs atteint */ - /* = 2 : Arguments incorrects */ - /* = 3 : Refus d'allocation dynamique */ + /* = 1 : Max nb of allocations attained */ + /* = 2 : Incorrect arguments */ + /* = 3 : Refused dynamic allocation */ - /* COMMONS UTILISES : */ + /* COMMONS USED : */ /* ------------------ */ - /* REFERENCES APPELEES : */ + /* REFERENCES CALLED : */ /* --------------------- */ /* MCRRQST */ - /* DESCRIPTION/REMARQUES/LIMITATIONS : */ + /* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - /* (Cf description dans l'entete de MCRRQST) */ + /* (Cf description in the heading of MCRRQST) */ - /* Le tableau ITABLO doit etre dimensionne a MAXELM par l'appelant. */ - /* Si la demande est inferieure ou egale a MAXELM, IOFSET rendu = 0. - */ - /* Sinon, la demande d'allocation est effective et IOFSET > 0. */ - - /* $ HISTORIQUE DES MODIFICATIONS : */ - /* ------------------------------ */ - /* 16-10-91 : DGZ ; Recuperation version FBI */ - /* > */ + /* Table ITABLO should be dimensioned to MAXELM by the caller. */ + /* If the request is lower or equal to MAXELM, IOFSET becomes = 0. */ + /* Otherwise the demand of allocation is valid and IOFSET > 0. */ + /* > */ /* *********************************************************************** */ @@ -321,48 +308,44 @@ int AdvApp2Var_SysBase::macrar8_(integer *nbelem, /* *********************************************************************** */ - /* FONCTION : */ + /* FUNCTION : */ /* ---------- */ - /* Demande d'allocation dynamique de type DOUBLE PRECISION */ + /* Demand of dynamic allocation of type DOUBLE PRECISION */ - /* MOTS CLES : */ + /* KEYWORDS : */ /* ----------- */ - /* SYSTEME, ALLOCATION, MEMOIRE, REALISATION */ + /* SYSTEM, ALLOCATION, MEMORY, REALISATION */ - /* ARGUMENTS D'ENTREE : */ - /* -------------------- */ - /* NBELEM : Nombre d'unites demandes */ - /* MAXELM : Nombre maxi d'unites disponibles dans XTABLO */ - /* XTABLO : Adresse de reference de la zone allouee */ + /* INPUT ARGUMENTS : */ + /* ------------------ */ + /* NBELEM : Nb of units required */ + /* MAXELM : Max Nb of units available in XTABLO */ + /* XTABLO : Reference address of the rented zone */ - /* ARGUMENTS DE SORTIE : */ - /* --------------------- */ - /* IOFSET : Decalage */ - /* IERCOD : Code d'erreur */ + /* OUTPUT ARGUMENTS : */ + /* ------------------ */ + /* IOFSET : Offset */ + /* IERCOD : Error code */ /* = 0 : OK */ - /* = 1 : Nbre maxi d'allocs atteint */ - /* = 2 : Arguments incorrects */ - /* = 3 : Refus d'allocation dynamique */ + /* = 1 : Max Nb of allocations reached */ + /* = 2 : Arguments incorrect */ + /* = 3 : Refuse of dynamic allocation */ - /* COMMONS UTILISES : */ + /* COMMONS USED : */ /* ------------------ */ - /* REFERENCES APPELEES : */ + /* REFERENCES CALLED : */ /* --------------------- */ /* MCRRQST */ - /* DESCRIPTION/REMARQUES/LIMITATIONS : */ + /* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - /* (Cf description dans l'entete de MCRRQST) */ + /* (Cf description in the heading of MCRRQST) */ - /* Le tableau XTABLO doit etre dimensionne a MAXELM par l'appelant. */ - /* Si la demande est inferieure ou egale a MAXELM, IOFSET rendu = 0. - */ - /* Sinon, la demande d'allocation est effective et IOFSET > 0. */ + /* Table XTABLO should be dimensioned to MAXELM by the caller. */ + /* If the request is less or equal to MAXELM, IOFSET becomes = 0. */ + /* Otherwise the demand of allocation is valid and IOFSET > 0. */ - /* $ HISTORIQUE DES MODIFICATIONS : */ - /* ------------------------------ */ - /* 16-10-91 : DGZ ; Recuperation version FBI */ /* > */ /* *********************************************************************** */ @@ -408,48 +391,33 @@ int macrchk_() /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* CONTROLE LES DEBORDEMENTS DE ZONE MEMOIRE ALLOUEES */ +/* CONTROL OF EXCESSES OF ALLOCATED MEMORY ZONE */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, ALLOCATION, MEMOIRE, CONTROLE, DEBORDEMENT */ +/* SYSTEM, ALLOCATION, MEMORY, CONTROL, EXCESS */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* NEANT */ +/* INPUT ARGUMENTS : */ +/* ----------------- */ +/* NONE */ -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* NEANT */ +/* OUTPUT ARGUMENTS : */ +/* ------------------- */ +/* NONE */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ /* MCRGENE */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ /* MACRERR, MAOSTRD */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 08-10-92 : FCR; DMSFRO131 : Modif pour DEBUG-ALLOC */ -/* 18-11-91 : DGZ; AC91118Z0000 : Resactivation */ -/* 17-10-91 : FCR; AC91118Z0000 : Desactivation */ -/* 25-09-91 : DGZ; GESTION DES FLAGS DANS MCRGENE */ -/* 31-07-90 : DGZ; AJOUT TRACE-BACK EN PHASE DE PRODUCTION */ -/* 04-11-89 : CR ; AJOUT DE OPTIONS /CHECK=NOBOUNDS . */ -/* 03-10-89 : DGZ; REMPLACE COMMON ACFLAG PAR INCLUDE ACFLAG.INC */ -/* 09-06-89 : PP ; CORRECTION DES CALCULS D'OFFSET */ -/* 31-05-89 : DGZ; APPEL MCRLOCV EN DEHORS BOUCLE DO */ -/* 25-05-89 : DGZ; CHANGE DIM ACRTAB : MALLOC PASSE DE 10000 A 200 -*/ -/* 16-05-89 : PP ; AJOUT DE MACRERR, POUR ARRET SOUS DBG */ -/* 11-05-89 : DGZ ; CREATION DE LA VERSION ORIGINALE */ /* > */ /* *********************************************************************** */ @@ -459,50 +427,39 @@ int macrchk_() /* FONCTION : */ /* ---------- */ -/* TABLE DE GESTION DES ALLOCATIONS DYNAMIQUES DE MEMOIRE */ +/* TABLE OF MANAGEMENT OF DYNAMIC MEMOTY ALLOCATIONS */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, MEMOIRE, ALLOCATION */ +/* SYSTEM, MEMORY, ALLOCATION */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 23-11-93 : FCR; AF93125U3A007 : MAXCR 200 --> 1000 */ -/* 08-10-92 : FCR; DMSFRO131 : Modif pour DEBUG-ALLOC */ -/* 25-09-91 : DGZ; AJOUT INFOs SUPPLEMENTAIREs POUR GESTION FLAGS */ -/* 18-01-91 : DGZ; MAXCR PASSE DE 100 A 200 SUR DEMANDE GDD */ -/* 18-05-90 : DGZ; DECLARATION TYPE INTEGER POUR MAXCR */ -/* 20-06-88 : PP ; MAXCR PASSE DE 50 A 100, SUR DEMANDE OG */ -/* + AJOUT DE COMMENTAIRES */ -/* 26-02-88 : PP ; MAXCR PASSE DE 40 A 50, SUR DEMANDE AB . */ -/* 15-04-85 : BF ; VERSION D'ORIGINE */ + /* > */ /* *********************************************************************** */ -/* ICORE : TABLE DES ALLOCS EXISTANTES, AVEC POUR CHACUNE : */ -/* 1 : NIVEAU DE PROTECTION (0=PAS PROTEGE, AUTRE=PROTEGE) */ -/* (PROTEGE SIGNIFIE PAS DETRUIT PAR CRRSET .) */ -/* 2 : UNITE D'ALLOCATION */ -/* 3 : NB D'UNITES ALLOUEES */ -/* 4 : ADRESSE DE REFERENCE DU TABLEAU */ +/* ICORE : TABLE OF EXISTING ALLOCATIONS, EACH HAVING : */ +/* 1 : LEVEL OF PROTECTION (0=NOT PROTECTED, OTHER=PROTECTED) */ +/* (PROTECTED MEANS NOT DESTROYED BY CRRSET .) */ +/* 2 : UNIT OF ALLOCATION */ +/* 3 : NB OF ALLOCATED UNITS */ +/* 4 : REFERENCE ADDRESS OF THE TABLE */ /* 5 : IOFSET */ -/* 6 : NUMERO ALLOCATION STATIQUE */ -/* 7 : Taille demandee en allocation */ -/* 8 : adresse du debut de l'allocation */ -/* 9 : Taille de la ZONE UTILISATEUR */ -/* 10 : ADRESSE DU FLAG DE DEBUT */ -/* 11 : ADRESSE DU FLAG DE FIN */ -/* 12 : Rang de creation de l'allocation */ - -/* NDIMCR : NBRE DE DONNEES DE CHAQUE ALLOC DANS ICORE */ -/* NCORE : NBRE D'ALLOCS EN COURS */ -/* LPROT : COMMUNICATION ENTRE CRPROT ET MCRRQST, REMIS A 0 PAR MCRRQST -*/ -/* FLAG : VALEUR DU FLAG UTILISE POUR LES DEBORDEMENTS */ +/* 6 : STATIC ALLOCATION NUMBER */ +/* 7 : Required allocation size */ +/* 8 : address of the beginning of allocation */ +/* 9 : Size of the USER ZONE */ +/* 10 : ADDRESS of the START FLAG */ +/* 11 : ADDRESS of the END FLAG */ +/* 12 : Rank of creation of the allocation */ + +/* NDIMCR : NB OF DATA OF EACH ALLOC IN ICORE */ +/* NCORE : NB OF CURRENT ALLOCS */ +/* LPROT : COMMUNICATION BETWEEN CRPROT AND MCRRQST, SET TO 0 BY MCRRQST */ +/* FLAG : VALUE OF THE FLAG USED FOR EXCESSES */ @@ -513,10 +470,10 @@ int macrchk_() /* ----------------------------------------------------------------------* */ -/* CALCUL ADRESSE DE T */ +/* CALCULATE ADDRESS OF T */ mcrlocv_((long int)t, (long int *)&loc); - /* CONTROLE DES FLAGS DANS LE TABLEAU */ + /* CONTROL OF FLAGS IN THE TABLE */ i__1 = mcrgene_.ncore; for (i__ = 1; i__ <= i__1; ++i__) { @@ -528,17 +485,16 @@ int macrchk_() if (t[ioff] != -134744073.) { - /* MSG : '*** ERREUR : ECRASEMENT DE LA MEMOIRE D''ADRESS + /* MSG : '*** ERREUR : REMOVAL FROM MEMORY OF ADDRESS E:',ICORE(J,I) */ - /* ET DE RANG ICORE(12,I) */ + /* AND OF RANK ICORE(12,I) */ macrerr_((long int *)&mcrgene_.icore[j + i__ * 12 - 13], (integer *)&mcrgene_.icore[i__ * 12 - 1]); - /* TRACE-BACK EN PHASE DE PRODUCTION */ + /* BACK-PARCING IN PHASE OF PRODUCTION */ maostrb_(); - /* SUPPRESSION DE L'ADRESSE DU FLAG POUR NE PLUS REFAIRE S - ON CONTROLE */ + /* REMOVAL OF THE ADDRESS OF FLAG TO AVOID REMAKING ITS CONTROL */ mcrgene_.icore[j + i__ * 12 - 13] = -1; } @@ -572,7 +528,7 @@ int macrclw_(long int *,//iadfld, int AdvApp2Var_SysBase::macrdi4_(integer *nbelem, integer *,//maxelm, integer *itablo, - long int *iofset, /* Offset en long (pmn) */ + long int *iofset, /* Offset long (pmn) */ integer *iercod) { @@ -580,42 +536,38 @@ int AdvApp2Var_SysBase::macrdi4_(integer *nbelem, /* *********************************************************************** */ -/* FONCTION : */ +/* FuNCTION : */ /* ---------- */ -/* Destruction d'une allocation dynamique de type INTEGER */ +/* Destruction of dynamic allocation of type INTEGER */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, ALLOCATION, MEMOIRE, DESTRUCTION */ +/* SYSTEM, ALLOCATION, MEMORY, DESTRUCTION */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* NBELEM : Nombre d'unites demandes */ -/* MAXELM : Nombre maxi d'unites disponibles dans ITABLO */ -/* ITABLO : Adresse de reference de la zone allouee */ -/* IOFSET : Decalage */ +/* INPUT ARGUMENTS : */ +/* ------------------ */ +/* NBELEM : Nb of units required */ +/* MAXELM : Max Nb of units available in ITABLO */ +/* ITABLO : Reference Address of the allocated zone */ +/* IOFSET : Offset */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* IERCOD : Code d'erreur */ +/* IERCOD : Error Code */ /* = 0 : OK */ -/* = 1 : Pb de de-allocation d'une zone allouee sur table */ -/* = 2 : Le systeme refuse la demande de de-allocation */ +/* = 1 : Pb of de-allocation of a zone allocated in table */ +/* = 2 : The system refuses the demand of de-allocation */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ /* MCRDELT */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* (Cf description dans l'entete de MCRDELT) */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 16-10-91 : DGZ ; Recuperation version FBI */ +/* (Cf description in the heading of MCRDELT) */ /* > */ /* *********************************************************************** */ @@ -653,43 +605,40 @@ int AdvApp2Var_SysBase::macrdr8_(integer *nbelem, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Destruction d'une allocation dynamique de type DOUBLE PRECISION +/* Destruction of dynamic allocation of type DOUBLE PRECISION */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, ALLOCATION, MEMOIRE, DESTRUCTION */ +/* SYSTEM, ALLOCATION, MEMORY, DESTRUCTION */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* NBELEM : Nombre d'unites demandes */ -/* MAXELM : Nombre maxi d'unites disponibles dans XTABLO */ -/* XTABLO : Adresse de reference de la zone allouee */ -/* IOFSET : Decalage */ +/* NBELEM : Nb of units required */ +/* MAXELM : Max nb of units available in XTABLO */ +/* XTABLO : Reference Address of the allocated zone */ +/* IOFSET : Offset */ -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* IERCOD : Code d'erreur */ +/* OUTPUT ARGUMENTS : */ +/* ------------------- */ +/* IERCOD : Error Code */ /* = 0 : OK */ -/* = 1 : Pb de de-allocation d'une zone allouee sur table */ -/* = 2 : Le systeme refuse la demande de de-allocation */ +/* = 1 : Pb of de-allocation of a zone allocated on table */ +/* = 2 : The system refuses the demand of de-allocation */ -/* COMMONS UTILISES : */ -/* ------------------ */ +/* COMMONS USED : */ +/* -------------- */ -/* REFERENCES APPELEES : */ -/* --------------------- */ +/* REFERENCES CALLEDS : */ +/* -------------------- */ /* MCRDELT */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* (Cf description dans l'entete de MCRDELT) */ +/* (Cf description in the heading of MCRDELT) */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 16-10-91 : DGZ ; Recuperation version FBI */ /* > */ /* *********************************************************************** */ @@ -725,37 +674,31 @@ int macrerr_(long int *,//iad, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* ECRITURE D'UNE ADRESSE ECRASEE DANS LES ALLOCS . */ +/* WRITING OF ADDRESS REMOVED IN ALLOCS . */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* ALLOC CONTROLE */ +/* ALLOC CONTROL */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* IAD : ADRESSE A SIGNALER ECRASEE */ -/* NALLOC : NUMERO DE L'ALLOCATION */ +/* INPUT ARGUMENTS : */ +/* ------------------ */ +/* IAD : ADDRESS TO INFORM OF REMOVAL */ +/* NALLOC : NUMBER OF ALLOCATION */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* NEANT */ +/* NONE */ -/* COMMONS UTILISES : */ -/* ------------------ */ +/* COMMONS USED : */ +/* -------------- */ -/* REFERENCES APPELEES : */ -/* --------------------- */ +/* REFERENCES CALLED : */ +/* ------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 30-09-91 : DGZ; AJOUT DU NUMERO DE L'ALLOCATION */ -/* 04-11-89 : CR ; AJOUT DE OPTIONS /CHECK=NOBOUNDS . */ -/* 17-05-89 : PP ; CREATION */ /* > */ /* *********************************************************************** */ @@ -798,51 +741,38 @@ int macrgfl_(long int *iadfld, /* *********************************************************************** */ - /* FONCTION : */ + /* FUNCTION : */ /* ---------- */ - /* MISE EN PLACE DES DEUX FLAGS DE DEBUT ET DE FIN DE LA ZONE */ - /* ALLOUEE ET MISE A OVERFLOW DE L'ESPACE UTILISATEUR EN PHASE */ - /* DE PRODUCTION. */ + /* IMPLEMENTATION OF TWO FLAGS START AND END OF THE ALLOCATED ZONE */ + /* AND SETTING TO OVERFLOW OF THE USER SPACE IN PHASE OF PRODUCTION. */ - /* MOTS CLES : */ + /* KEYWORDS : */ /* ----------- */ - /* ALLOCATION, CONTROLE, DEBORDEMENT */ + /* ALLOCATION, CONTROL, EXCESS */ - /* ARGUMENTS D'ENTREE : */ - /* -------------------- */ - /* IADFLD : ADRESSE DU FLAG DE DEBUT */ - /* IADFLF : ADRESSE DU FLAG DE FIN */ - /* IPHASE : TYPE DE VERSION LOGICIELLE : */ - /* 0 = VERSION OFFICIELLE */ - /* 1 = VERSION PRODUCTION */ - /* IZNUTI : TAILLE DE LA ZONE UTILISATEUR EN OCTETS */ - - /* ARGUMENTS DE SORTIE : */ - /* --------------------- */ - /* NEANT */ + /* INPUT ARGUMENTS : */ + /* ------------------ */ + /* IADFLD : ADDRESS OF THE START FLAG */ + /* IADFLF : ADDRESS OF THE END FLAG */ + /* IPHASE : TYPE OF SOFTWARE VERSION : */ + /* 0 = OFFICIAL VERSION */ + /* 1 = PRODUCTION VERSION */ + /* IZNUTI : SIZE OF THE USER ZONE IN OCTETS */ + + /* OUTPUT ARGUMENTS : */ + /* ------------------ */ + /* NONE */ - /* COMMONS UTILISES : */ + /* COMMONS USED : */ /* ------------------ */ - /* REFERENCES APPELEES : */ - /* --------------------- */ + /* REFERENCES CALLED : */ + /* ------------------- */ /* CRLOCT,MACRCHK */ - /* DESCRIPTION/REMARQUES/LIMITATIONS : */ - /* ----------------------------------- */ - - /* $ HISTORIQUE DES MODIFICATIONS : */ - /* ------------------------------ */ - /* 25-09-91 : DGZ ; GERE LES FLAGS DANS LE COMMUN MCRGENE */ - /* 21-08-90 : DGZ ; APPELS DE MACRCHK DANS LES DEUX CAS (AJOUT,SUPP) - */ - /* 04-11-89 : CR ; AJOUT DE OPTIONS /CHECK=NOBOUNDS . */ - /* 03-10-89 : DGZ ; REMPLACE COMMON ACFLAG PAR INCLUDE ACFLAG.INC */ - /* 09-06-89 : PP ; CORRECTION DU CALCUL DE L'OFFSET */ - /* 31-05-89 : DGZ ; OPTIMISATION DE LA GESTION DU TABLEAU DES FLAGS - */ - /* 23-05-89 : DGZ ; CORRECTION DEBORDEMENT DU TABLEAU ACRTAB */ - /* 11-05-89 : DGZ ; CREATION DE LA VERSION ORIGINALE */ + /* DESCRIPTION/NOTES/LIMITATIONS : */ + /* ------------------------------- */ + /* > */ /* *********************************************************************** */ @@ -852,52 +782,42 @@ int macrgfl_(long int *iadfld, /* *********************************************************************** */ - /* FONCTION : */ + /* FUNCTION : */ /* ---------- */ - /* TABLE DE GESTION DES ALLOCATIONS DYNAMIQUES DE MEMOIRE */ + /* TABLE FOR MANAGEMENT OF DYNAMIC ALLOCATIONS OF MEMORY */ - /* MOTS CLES : */ + /* KEYWORDS : */ /* ----------- */ - /* SYSTEME, MEMOIRE, ALLOCATION */ + /* SYSTEM, MEMORY, ALLOCATION */ - /* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ + /* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ - /* $ HISTORIQUE DES MODIFICATIONS : */ - /* ------------------------------ */ - /* 23-11-93 : FCR; AF93125U3A007 : MAXCR 200 --> 1000 */ - /* 08-10-92 : FCR; DMSFRO131 : Modif pour DEBUG-ALLOC */ - /* 25-09-91 : DGZ; AJOUT INFOs SUPPLEMENTAIREs POUR GESTION FLAGS */ - /* 18-01-91 : DGZ; MAXCR PASSE DE 100 A 200 SUR DEMANDE GDD */ - /* 18-05-90 : DGZ; DECLARATION TYPE INTEGER POUR MAXCR */ - /* 20-06-88 : PP ; MAXCR PASSE DE 50 A 100, SUR DEMANDE OG */ - /* + AJOUT DE COMMENTAIRES */ - /* 26-02-88 : PP ; MAXCR PASSE DE 40 A 50, SUR DEMANDE AB . */ - /* 15-04-85 : BF ; VERSION D'ORIGINE */ + /* > */ /* *********************************************************************** */ - - /* ICORE : TABLE DES ALLOCS EXISTANTES, AVEC POUR CHACUNE : */ - /* 1 : NIVEAU DE PROTECTION (0=PAS PROTEGE, AUTRE=PROTEGE) */ - /* (PROTEGE SIGNIFIE PAS DETRUIT PAR CRRSET .) */ - /* 2 : UNITE D'ALLOCATION */ - /* 3 : NB D'UNITES ALLOUEES */ - /* 4 : ADRESSE DE REFERENCE DU TABLEAU */ - /* 5 : IOFSET */ - /* 6 : NUMERO ALLOCATION STATIQUE */ - /* 7 : Taille demandee en allocation */ - /* 8 : adresse du debut de l'allocation */ - /* 9 : Taille de la ZONE UTILISATEUR */ - /* 10 : ADRESSE DU FLAG DE DEBUT */ - /* 11 : ADRESSE DU FLAG DE FIN */ - /* 12 : Rang de creation de l'allocation */ - - /* NDIMCR : NBRE DE DONNEES DE CHAQUE ALLOC DANS ICORE */ - /* NCORE : NBRE D'ALLOCS EN COURS */ - /* LPROT : COMMUNICATION ENTRE CRPROT ET MCRRQST, REMIS A 0 PAR MCRRQST - */ - /* FLAG : VALEUR DU FLAG UTILISE POUR LES DEBORDEMENTS */ + /* ICORE : TABLE OF EXISTING ALLOCATIONS, EACH HAVING : */ +/* 1 : LEVEL OF PROTECTION (0=NOT PROTECTED, OTHER=PROTECTED) */ +/* (PROTECTED MEANS NOT DESTROYED BY CRRSET .) */ +/* 2 : UNIT OF ALLOCATION */ +/* 3 : NB OF ALLOCATED UNITS */ +/* 4 : REFERENCE ADDRESS OF THE TABLE */ +/* 5 : IOFSET */ +/* 6 : STATIC ALLOCATION NUMBER */ +/* 7 : Required allocation size */ +/* 8 : address of the beginning of allocation */ +/* 9 : Size of the USER ZONE */ +/* 10 : ADDRESS of the START FLAG */ +/* 11 : ADDRESS of the END FLAG */ +/* 12 : Rank of creation of the allocation */ + +/* NDIMCR : NB OF DATA OF EACH ALLOC IN ICORE */ +/* NCORE : NB OF CURRENT ALLOCS */ +/* LPROT : COMMUNICATION BETWEEN CRPROT AND MCRRQST, SET TO 0 BY MCRRQST */ +/* FLAG : VALUE OF THE FLAG USED FOR EXCESSES */ + + @@ -910,30 +830,30 @@ int macrgfl_(long int *iadfld, ifois = 1; } - /* CALCUL DE L'ADRESSE DE T */ + /* CALCULATE THE ADDRESS OF T */ mcrlocv_((long int)t, (long int *)&iadt); - /* CALCUL DE l"OFFSET */ + /* CALCULATE THE OFFSET */ ioff = (*iadfld - iadt) / 8; - /* MISE A OVERFLOW DE LA ZONE UTILISATEUR EN CAS DE VERSION PRODUCTION */ + /* SET TO OVERFLOW OF THE USER ZONE IN CASE OF PRODUCTION VERSION */ if (*iphase == 1 && novfl == 0) { ienr = *iznuti / 8; maoverf_(&ienr, &t[ioff + 1]); } - /* MISE A JOUR DU FLAG DE DEBUT */ + /* UPDATE THE START FLAG */ t[ioff] = -134744073.; - /* APPEL BIDON POUR PERMETTRE L'ARRET AU DEBUGGER : */ + /* FAKE CALL TO STOP THE DEBUGGER : */ iadrfl = *iadfld; macrbrk_(); - /* MISE A JOUR DU FLAG DE DEBUT */ + /* UPDATE THE START FLAG */ ioff = (*iadflf - iadt) / 8; t[ioff] = -134744073.; - /* APPEL BIDON POUR PERMETTRE L'ARRET AU DEBUGGER : */ + /* FAKE CALL TO STOP THE DEBUGGER : */ iadrfl = *iadflf; macrbrk_(); @@ -967,59 +887,47 @@ int macrmsg_(const char *,//crout, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* MESSAGERIE DES ROUTINES D'ALLOC */ +/* MESSAGING OF ROUTINES OF ALLOCATION */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* ALLOC,MESSAGE */ +/* ALLOC, MESSAGE */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* CROUT : NOM DE LA ROUTINE APPELANTE : MCRRQST, MCRDELT, MCRLIST +/* INPUT ARGUMENTSEE : */ +/* ------------------- */ +/* CROUT : NAME OF THE CALLING ROUTINE : MCRRQST, MCRDELT, MCRLIST */ -/* ,CRINCR OU CRPROT */ -/* NUM : NUMERO DU MESSAGE */ -/* IT : TABLEAU DE DONNEES ENTIERES */ -/* XT : TABLEAU DE DONNEES REELLES */ +/* ,CRINCR OR CRPROT */ +/* NUM : MESSAGE NUMBER */ +/* IT : TABLE OF INTEGER DATA */ +/* XT : TABLE OF REAL DATA */ /* CT : ------------------ CHARACTER */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* --------------------- */ -/* NEANT */ +/* NONE */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ROUTINE A USAGE TEMPORAIRE, EN ATTENDANT LA 'NOUVELLE' MESSAGERIE */ -/* (STRIM 3.3 ?) , POUR RENDRE LES ROUTINES D'ALLOC UTILISABLES */ -/* AILLEURS QUE DANS STRIM T-M . */ - -/* EN FONCTION DE LA LANGUE, ECRITURE DU MESSAGE DEMANDE SUR */ -/* L'UNITE IMP . */ -/* (REPRISE DES SPECIFS DE VFORMA) */ - -/* LE MESSAGE EST INITIALISE A 'IL MANQUE LE MESSAGE', ET CELUI-LA */ -/* EST REMPLACE PAR LE MESSAGE DEMANDE S'IL EXISTE . */ - +/* ROUTINE FOR TEMPORARY USE, WAITING FOR THE 'NEW' MESSAGE */ +/* (STRIM 3.3 ?), TO MAKE THE ROUTINES OF ALLOC USABLE */ +/* IN STRIM T-M . */ -/* LES MESSAGES FRANCAIS ONT ETE PRIS DANS LA 3.2 LE 26.2.88, ALORS */ -/* QUE LES ANGLAIS ONT ETE PRIS DANS ENGUS, ET QUE LES */ -/* ALLEMANDS VIENNENT DE LA 312 . */ +/* DEPENDING ON THE LANGUAGE, WRITING OF THE REQUIRED MESSAGE ON */ +/* UNIT IMP . */ +/* (REUSE OF SPECIFS OF VFORMA) */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 4-09-1991 : FCR ; MENAGE */ -/* 02-05-88 : PP ; CORRECTION DE SYNTAXE DE FORMAT */ -/* 26.2.88 : PP ECRITURE VERSION ORIGINALE . */ +/* THE MESSAGE IS INITIALIZED AT 'MESSAGE MISSING', AND IT IS */ +/* REPLACED BY THE REQUIRED MESSAGE IF EXISTS. */ /* > */ /* *********************************************************************** */ @@ -1028,10 +936,10 @@ int macrmsg_(const char *,//crout, /* ----------------------------------------------------------------------* */ -/* RECHERCHE DU MESSAGE EN FONCTION DE LA LANGUE , DE LA ROUTINE */ -/* CONCERNEE, ET DU NUMERO DE MESSAGE */ +/* FIND MESSAGE DEPENDING ON THE LANGUAGE , THE ROUTINE */ +/* AND THE MESSAGE NUMBER */ -/* LECTURE DE LA LANGUE : */ +/* READING OF THE LANGUAGE : */ /* Parameter adjustments */ ct -= ct_len; --xt; @@ -1040,8 +948,8 @@ int macrmsg_(const char *,//crout, /* Function Body */ mamdlng_(cln, 3L); -/* INUM : TYPE DE MESSAGE : 0 QUE DU TEXTE, 1 1 ENTIER A ECRIRE */ -/* -1 MESSAGE INEXISTANT (1 ENTIER ET 1 CHAINE) */ +/* INUM : TYPE OF MESSAGE : 0 AS TEXT, 1 1 INTEGER TO BE WRITTEN */ +/* -1 MESSAGE INEXISTING (1 INTEGER AND 1 CHAIN) */ inum = -1; /* @@ -1208,7 +1116,7 @@ t !! ')", 80L, 54L); */ /* ----------------------------------------------------------------------* */ - /* REALISATION DU WRITE , AVEC OU SANS DONNEES : */ + /* iMPLEMENTATION OF WRITE , WITH OR WITHOUT DATA : */ iunite = AdvApp2Var_SysBase::mnfnimp_(); if (inum == 0) { @@ -1227,7 +1135,7 @@ t !! ')", 80L, 54L); */ AdvApp2Var_SysBase::e__wsfe(); } else { - /* LE MESSAGE N'EXISTE PAS ... */ + /* MESSAGE DOES NOT EXIST ... */ io___7.ciunit = iunite; /* s__wsfe(&io___7); @@ -1296,73 +1204,55 @@ int magtlog_(const char *cnmlog, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* RENVOIE LA TRADUCTION D'UN "NOM LOGIQUE STRIM" DANS LA */ -/* "SYNTAXE INTERNE" CORRESPONDANT A UN "LIEU DE RANGEMENT" */ +/* RETURN TRANSLATION OF "NAME LOGIC STRIM" IN */ +/* "INTERNAL SYNTAX" CORRESPONDING TO "PLACE OF RANKING" */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ /* NOM LOGIQUE STRIM , TRADUCTION */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* CNMLOG : NOM DU "NOM LOGIQUE STRIM" A TRADUIRE */ +/* CNMLOG : NAME OF "NAME LOGIC STRIM" TO TRANSLATE */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* CHAINE : ADRESSE DU "LIEU DE RANGEMENT" */ -/* LONG : LONGUEUR UTILE DU "LIEU DE RANGEMENT" */ -/* IERCOD : CODE D'ERREUR */ +/* CHAINE : ADDRESS OF "PLACE OF RANKING" */ +/* LONG : USEFUL LENGTH OF "PLACE OF RANKING" */ +/* IERCOD : ERROR CODE */ /* IERCOD = 0 : OK */ -/* IERCOD = 5 : LIEU DE RANGEMENT CORRESPONDANT AU NOM LOGIQUE */ -/* INEXISTANT */ -/* IERCOD = 6 : TRADUCTION TROP LONGUE POUR LA VARIABLE 'CHAINE' */ -/* IERCOD = 7 : ERREUR SEVERE */ +/* IERCOD = 5 : PLACE OF RANKING CORRESPONDING TO INEXISTING LOGIC NAME */ + +/* IERCOD = 6 : TRANSLATION TOO LONG FOR THE 'CHAIN' VARIABLE */ +/* IERCOD = 7 : CRITICAL ERROR */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* NEANT */ +/* NONE */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ /* GNMLOG, MACHDIM */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ +/* ------------------------------- */ -/* ROUTINE SPECIFIQUE SGI */ +/* SPECIFIC SGI ROUTINE */ -/* DANS TOUS LES CAS OU IERCOD EST >0,AUCUN RESULTAT N'EST RENVOYE -*/ - -/* NOTION DE "SYNTAXE UTILISATEUR' ET "SYNTAXE INTERNE" */ +/* IN ALL CASES WHEN IERCOD IS >0, NO RESULT IS RETURNED*/ +/* NOTION OF "USER SYNTAX' AND "INTERNAL SYNTAX" */ /* --------------------------------------------------- */ -/* LA "SYNTAXE UTILISATEUR" EST LA SYNTAXE DANS LAQUELLE L'UTILISATE -UR*/ -/* VISUALISE OU DESIGNE UN NOM DE FICHIER OU LE NOM REPERTOIRE AU -*/ -/* COURS D'UNE SESSION DE STRIM100 */ +/* THE "USER SYNTAX" IS THE SYNTAX WHERE THE USER*/ +/* VISUALIZES OR INDICATES THE FILE OR DIRECTORY NAME */ +/* DURING A SESSION OF STRIM100 */ -/* LA "SYNTAXE INTERNE" EST LA SYNTAXE UTILISEE POUR EFFECTUER DES -*/ -/* OPERATIONS DE TRAITEMENTS DE FICHIERS A L'INTERIEUR DU CODE */ +/* "INTERNAL SYNTAX" IS SYNTAX USED TO CARRY OUT */ +/* OPERATIONS OF FILE PROCESSING INSIDE THE CODE */ /* (OPEN,INQUIRE,...ETC) */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ - -/* 08-01-91 : B. Achispon ; Mise en forme et suppresion appel a MACHDIM -*/ -/* 26-10-88 : C. Guinamard ; Adaptation UNIX Traduction effective */ -/* du nom logique */ -/* 10-08-88 : DGZ ; CHANGE BNMLOG PAR MATRLOG */ -/* 05-02-88 : DGZ ; MODIF D'ENTETE */ -/* 26-08-87 : DGZ ; APPEL DE BNMLOG */ -/* 25-08-87 : BJ ; MODIF ENTETE */ -/* 24-12-86 : DGZ ; CREATION VERSION ORIGINALE */ - /* > */ /* *********************************************************************** */ @@ -1373,14 +1263,14 @@ UR*/ /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ *long__ = 0; *iercod = 0; - /* CONTROLE DE L'EXISTENCE DU NOM LOGIQUE */ + /* CONTROL OF EXISTENCE OF THE LOGIC NAME */ matrlog_(cnmlog, cbid, &ibid, &ier, cnmlog_len, 255L); if (ier == 1) { @@ -1390,7 +1280,7 @@ UR*/ goto L9700; } - /* CONTROLE DE LA LONGUEUR DE CHAINE */ + /* CONTROL OF THE LENGTH OF CHAIN */ if (ibid > __i__len()/*chaine, chaine_len)*/) { goto L9600; @@ -1403,7 +1293,7 @@ UR*/ /* *********************************************************************** */ - /* TRAITEMENT DES ERREURS */ + /* ERROR PROCESSING */ /* *********************************************************************** */ @@ -1423,7 +1313,7 @@ UR*/ /* *********************************************************************** */ - /* RETOUR AU PROGRAMME APPELANT */ + /* RETURN TO THE CALLING PROGRAM */ /* *********************************************************************** */ @@ -1472,48 +1362,43 @@ int AdvApp2Var_SysBase::maitbr8_(integer *itaill, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* INITIALISATION A UNE VALEUR DONNEE D'UN TABLEAU DE REEL *8 */ +/* INITIALIZATION TO A GIVEN VALUE OF A TABLE OF REAL *8 */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* MANIPULATIONS, MEMOIRE, INITIALISATION, DOUBLE-PRECISION */ +/* MANIPULATIONS, MEMORY, INITIALIZATION, DOUBLE-PRECISION */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* ITAILL : TAILLE DU TABLEAU */ -/* XTAB : TABLEAU A INITIALISER AVEC XVAL */ -/* XVAL : VALEUR A METTRE DANS XTAB(1 A ITAILL) */ - -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* XTAB : TABLEAU INITIALISE */ +/* INPUT ARGUMENTS : */ +/* ----------------- */ +/* ITAILL : SIZE OF THE TABLE */ +/* XTAB : TABLE TO INITIALIZE WITH XVAL */ +/* XVAL : VALUE TO SET IN XTAB(FROM 1 TO ITAILL) */ -/* COMMONS UTILISES : */ +/* OUTPUT ARGUMENTS : */ /* ------------------ */ +/* XTAB : INITIALIZED TABLE */ -/* REFERENCES APPELEES : */ -/* --------------------- */ +/* COMMONS USED : */ +/* -------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* REFERENCES CALLED : */ +/* ------------------- */ + +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ON APPELLE MCRFILL QUI FAIT DES MOVE PAR PAQUETS DE 63 REELS */ +/* ONE CALLS MCRFILL WHICH MOVES BY PACKS OF 63 REALS */ + +/* THE INITIAL PACK IS BUFF0 INITIATED BY DATA IF THE VALUE IS 0 */ +/* OR OTHERWISE BUFFX INITIATED BY XVAL (LOOP). */ -/* LE PAQUET INITIAL EST BUFF0 INITE PAR DATA SI LA VALEUR EST 0 */ -/* OU BUFFX INITE PAR XVAL (BOUCLE) SINON . */ +/* PORTABILITY : YES */ +/* ACCESS : FREE */ -/* PORTABILITE : OUI */ -/* ACCES : LIBRE */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 13-11-1991 : FCR ; VERFOR : Menage */ -/* 06-05-91 : DGZ; MODIFICATION EN-TETE */ -/* 05-07-88 : PP ; OPTIMISATION PAR POMPAGE SUR MVRMIRAZ */ -/* 28-04-88 : PP ; CREATION */ /* > */ /* *********************************************************************** */ @@ -1582,45 +1467,38 @@ int mamdlng_(char *,//cmdlng, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* RENVOIE LA LANGUE COURANTE */ +/* RETURN THE CURRENT LANGUAGE */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* GESTION, CONFIGURATION, LANGUE, LECTURE */ +/* MANAGEMENT, CONFIGURATION, LANGUAGE, READING */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* CMDLNG : LANGUE */ +/* CMDLNG : LANGUAGE */ -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* NEANT */ +/* OUTPUT ARGUMENTS : */ +/* ------------------- */ +/* NONE */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ /* MACETAT */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ -/* NEANT */ +/* NONE */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* DROIT D'UTILISATION : TOUTES APPLICATIONS */ - -/* ATTENTION : CETTE ROUTINE DEPEND D'UNE INITIALISATION */ -/* ---------- PREALABLE FAITE AVEC AMDGEN. */ -/* IL CONVIENT DONC DE S'ASSURER QUE CETTE INIT EST */ -/* BIEN REALISEE DANS LE OU LES PROGRAMMES CONCERNES */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 25-01-93 : JMB ; NETTOYAGE DE MAMDLNG */ -/* 23-03-90 : DGZ ; CORRECTION DE L'EN-TETE */ -/* 22-12-89 : DGZ ; CORRECTION DE L'EN-TETE */ -/* 22-02-88 : DGZ ; CREATION VERSION ORIGINALE */ +/* RIGHT OF USAGE : ANY APPLICATION */ + +/* ATTENTION : THIS ROUTINE DEPENDS ON PRELIMINARY INITIALISATION */ +/* ---------- WITH AMDGEN. */ +/* SO IT IS ENOUGH TO PROVIDE THAT THIS INIT IS */ +/* CORRECTLY IMPLEMENTED IN THE RESPECTIVE PROGRAMS */ /* > */ /* *********************************************************************** */ @@ -1632,86 +1510,73 @@ int mamdlng_(char *,//cmdlng, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* CONTIENT LES INFORMATIONS RELATIVES A LA COMPOSITION DE */ -/* L'EXECUTABLE ET A SON ENVIRONNEMENT : */ -/* - LANGUES */ -/* - APPLICATIONS PRESENTES */ -/* - TYPES D'ENTITES AUORISEES (NON UTILISE) */ -/* AINSI QUE DES INFORMATIONS DECRIVANTS L'ETAT COURANT : */ -/* - APPLICATION EN COURS */ -/* - MODE D'UTILISATION (NON UTILISE) */ - -/* MOTS CLES : */ +/* CONTAINS INFORMATIONS ABOUT THE COMPOSITION OF */ +/* THE EXECUTABLE AND ITS ENVIRONMENT : */ +/* - LANGUAGES */ +/* - PRESENT APPLICATIONS */ +/* - AUTHORIZED TYPES OF ENTITIES (NON USED) */ +/* AND INFORMATION DESCRIBING THE CURRENT STATE : */ +/* - CURRENT APPLICATION */ +/* - MODE OF USAGE (NOT USED) */ + +/* KEYWORDS : */ /* ----------- */ -/* APPLICATION, LANGUE */ +/* APPLICATION, LANGUAGE */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* A) CHLANG*4 : LISTE DES VALEURS POSSIBLES DE LA LANGUE : */ +/* A) CHLANG*4 : LIST OF POSSIBLE VALUES OF THE LANGUAGE : */ /* 'FRA ','DEU ','ENG ' */ -/* CHL10N*4 : LISTE DES VALEURS POSSIBLES DE LA LOCALISATION : */ +/* CHL10N*4 : LIST OF POSSIBLE VALUES OF THE LOCALIZATION : */ /* 'FRA ','DEU ','ENG ', 'JIS ' */ -/* B) CHCOUR*4, CHPREC*4, CHSUIV*4 : APPLICATION COURANTE, PRECEDENTE -*/ -/* ET SUIVANTE */ +/* B) CHCOUR*4, CHPREC*4, CHSUIV*4 : CURRENT, PREVIOUS AND NEXT APPLICATION -/* C) CHMODE*4 : MODE COURANT (NON UTILISE) */ +/* C) CHMODE*4 : CURRENT MODE (NOT USED) */ -/* D) CHPRES*2 (1:NBRMOD) : LISTE DES APPLICATIONS PRISES EN COMPTE */ +/* D) CHPRES*2 (1:NBRMOD) : LIST OF APPLICATIONS TAKEN INTO ACCOUNT */ /* Rang ! Code interne ! Application */ /* ---------------------------------------------------------- */ -/* 1 ! CD ! Modelisation 2D */ -/* 2 ! CA ! Modelisation 2D par apprentissage */ -/* 3 ! CP ! Modelisation 2D parametree */ -/* 4 ! PC ! Modelisation rheologique 2D */ -/* 5 ! CU ! Fraisage 2 Axes 1/2 */ -/* 6 ! CT ! Tournage */ -/* 7 ! TS ! Modelisation 3D surfacique */ -/* 8 ! TV ! Modelisation 3D volumique */ -/* 9 ! MC ! Maillage coque */ -/* 10 ! MV ! Maillage volumique */ -/* 11 ! TU ! Usinage 3 axes continus */ -/* 12 ! T5 ! Usinage 3-5 axes */ -/* 13 ! TR ! Usinage 5 axes de surfaces reglees */ +/* 1 ! CD ! Modeling 2D */ +/* 2 ! CA ! Modeling 2D by learning */ +/* 3 ! CP ! Parameterized 2D modelization */ +/* 4 ! PC ! Rheological 2D modelization */ +/* 5 ! CU ! Milling 2 Axes 1/2 */ +/* 6 ! CT ! Turning */ +/* 7 ! TS ! 3D surface modeling */ +/* 8 ! TV ! 3D volume modeling */ +/* 9 ! MC ! Surface Meshing */ +/* 10 ! MV ! Volume Meshing */ +/* 11 ! TU ! Machining by 3 axes */ +/* 12 ! T5 ! Machining by 3-5 axes */ +/* 13 ! TR ! Machinning by 5 axes of regular surfaces */ /* 14 ! IG ! Interface IGES */ /* 15 ! ST ! Interface SET */ /* 16 ! VD ! Interface VDA */ -/* 17 ! IM ! Interface de modelisation */ -/* 18 ! GA ! Generateur APT/IFAPT */ -/* 19 ! GC ! Generateur COMPACT II */ -/* 20 ! GP ! Generateur PROMO */ -/* 21 ! TN ! Usinage par copiage numerique */ -/* 22 ! GM ! Gestion des modeles */ -/* 23 ! GT ! Gestion de trace */ +/* 17 ! IM ! Interface of modeling */ +/* 18 ! GA ! Generator APT/IFAPT */ +/* 19 ! GC ! Generator COMPACT II */ +/* 20 ! GP ! Generator PROMO */ +/* 21 ! TN ! Machining by numerical copying */ +/* 22 ! GM ! Management of models */ +/* 23 ! GT ! Management of trace */ /* ---------------------------------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 05-05-93 : JMB ; Livraison GI93033FGR019 */ -/* 8-03-1993: STT ; AJOUT CHL10N */ -/* 31-07-92 : FCR ; GI91050G0348 : Suppression de CHTYPE */ -/* 18-06-90 : DGZ ; AJOUT EXTENSION PAR COPIAGE NUMERIQUE */ -/* 15-03-89 : DGZ ; MODIF DES APPLICATIONS POUR STANDARDS METIERS -*/ -/* 13-09-88 : DGZ ; AJOUT DES MODULES CC (TVCC) ET CG (CA GLOBAL) -*/ -/* 13-09-88 : DGZ ; AJOUT DES MODULES SET, IGES, VDA */ -/* 22-02-88 : DGZ ; CREATION VERSION ORIGINALE */ + /* > */ /* *********************************************************************** */ -/* NOMBRE D'APPLICATIONS PRISES EN COMPTE */ +/* NUMBER OF APPLICATIONS TAKEN INTO ACCOUNT */ -/* NOMBRES DE TYPES D'ENTITE GERES PAR STRIM 100 */ +/* NUMBER OF ENTITY TYPES MANAGED BY STRIM 100 */ //__s__copy(cmdlng, macetat_.chlang, cmdlng_len, 4L); return 0 ; @@ -1737,43 +1602,41 @@ int maostrd_() /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* AFFICHAGE DU TRACE-BACK EN PHASE DE PRODUCTION */ +/* REFINE TRACE-BACK IN PRODUCTION PHASE */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* FONCTION, SYSTEME, TRACE-BACK, AFFICHAGE, DEBUGGAGE */ +/* FUNCTION, SYSTEM, TRACE-BACK, REFINING, DEBUG */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* NEANT */ +/* INPUT ARGUMENTS : */ +/* ----------------- */ +/* NONE */ -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* NEANT */ +/* OUTPUT ARGUMENTS E : */ +/* -------------------- */ +/* NONE */ -/* COMMONS UTILISES : */ -/* ------------------ */ -/* NEANT */ +/* COMMONS USED : */ +/* -------------- */ +/* NONE */ -/* REFERENCES APPELEES : */ -/* --------------------- */ +/* REFERENCES CALLED : */ +/* ------------------- */ /* MADBTBK */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* CETTE ROUTINE DOIT ETRE APPELE POUR REALISER UN AFFICHAGE */ -/* DE TRACE-BACK EN PHASE DE PRODUCTION ET LAISSER QUAND MEME */ -/* LA POSSIBILITE AUX TESTEURS D'OBTENIR CES TRACE-BACK DANS */ -/* LES VERSIONS CLIENTS SI UNE DES CONTIONS SUIVANTES EST */ -/* VERIFIEE : */ -/* - EXISTENCE DU SYMBOLE 'STRMTRBK' */ -/* - EXISTENCE DU FICHIER 'STRMINIT:STRMTRBK.DAT' */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 26-07-90 : DGZ ; CREATION DE LA VERSION ORIGINALE */ +/* THIS ROUTINE SHOULD BE CALLED TO REFINE */ +/* TRACE-BACK IN PRODUCTION PHASE AND LEAVE TO TESTERS THE */ +/* POSSIBILITY TO GET TRACE-BACK IN */ +/* CLIENT VERSIONS IF ONE OF THE FOLLOWING CONDITIONS IS */ +/* VERIFIED : */ +/* - EXISTENCE OF SYMBOL 'STRMTRBK' */ +/* - EXISTENCE OF FILE 'STRMINIT:STRMTRBK.DAT' */ + + /* > */ /* *********************************************************************** */ @@ -1807,146 +1670,134 @@ int maoverf_(integer *nbentr, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Initialisation en overflow d'un tableau en DOUBLE PRECISION */ +/* Initialisation in overflow of a tableau with DOUBLE PRECISION */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* MANIPULATION, MEMOIRE, INITIALISATION, OVERFLOW */ +/* MANIPULATION, MEMORY, INITIALISATION, OVERFLOW */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* NBENTR : Nombre d'entrees du tableau */ +/* INPUT ARGUMENTS : */ +/* ----------------- */ +/* NBENTR : Number of entries in the table */ -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* DATBLE : Tableau double precision initialise en overflow */ +/* OUTPUT ARGUMENTS : */ +/* ------------------ */ +/* DATBLE : Table double precision initialized in overflow */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* R8OVR contenu dans l'include MAOVPAR.INC */ +/* R8OVR contained in the include MAOVPAR.INC */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ /* MCRFILL */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* 1) Doc. programmeur : */ +/* 1) Doc. programmer : */ -/* Cette routine initialise a l'overflow positif un tableau en */ +/* This routine initialized to positive overflow a table with */ /* DOUBLE PRECISION. */ -/* Les autres types de tableaux (INTEGER*2, INTEGER, REAL, ...) */ -/* ne sont pas geres par la routine. */ +/* Other types of tables (INTEGER*2, INTEGER, REAL, ...) */ +/* are not managed by the routine. */ -/* Elle est utilisable en phase de developpement pour deceler les */ -/* erreurs d'initialisation. */ +/* It is usable in phase of developpement to detect the */ +/* errors of initialization. */ -/* En version officielle, ses appels seront desactives. */ +/* In official version, these calls will be inactive. */ -/* ACCES : Sur accord avec AC. */ +/* ACCESs : Agreed with AC. */ -/* La routine ne renvoie pas de code d'erreur. */ +/* The routine does not return error code. */ -/* L'argument NBELEM doit etre positif. */ -/* S'il est negatif ou nul, affichage du message "MAOVERF : NBELEM = - */ -/* valeur_de_NBELEM" et d'un Trace Back par l'appel a la routine */ -/* MAOSTRB. */ +/* Argument NBELEM should be positive. */ +/* If it is negative or null, display message "MAOVERF : NBELEM = */ +/* valeur_de_NBELEM" and a Trace Back by the call of routine MAOSTRB. */ -/* 2) Doc. concepteur : */ +/* 2) Doc. designer : */ -/* L'idee est de minimiser le nombre d'appels a */ -/* la routine de transfert de zones numeriques, */ -/* ---------- pour des raisons de performances. */ -/* ! buffer ! Pour cela, on se reserve un tableau de NLONGR */ -/* !__________! DOUBLE PRECISIONs. Ce buffer est initialise par */ -/* <----------> l'instruction DATA. L'overflow est accede dans un */ -/* NLONGR*8 COMMON specifique et non par une routine car */ -/* l'initialisation se fait par DATA. */ +/* The idea is to minimize the number of calls */ +/* to the routine of transfer of numeric zones, */ +/* ---------- for the reason of performance. */ +/* ! buffer ! For this a table of NLONGR +/* !__________! DOUBLE PRECISIONs is reserved. This buffer is initialized by */ +/* <----------> the instruction DATA. The overflow is accessed in a */ +/* NLONGR*8 specific COMMON not by a routine as */ +/* the initialisation is done by DATA. */ -/* * Si NBENTR */ /* *********************************************************************** */ -/* Inclusion de MAOVPAR.INC */ +/* Inclusion of MAOVPAR.INC */ -/* CONSTANTES */ +/* CONSTANTS */ /* INCLUDE MAOVPAR */ /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* DEFINIT LES VALEURS LIMITES SPECIFIQUES MACHINE. */ +/* DEFINES SPECIFIC LIMITED VALUES. */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, LIMITES, VALEURS, SPECIFIQUE */ +/* SYSTEM, LIMITS, VALUES, SPECIFIC */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* *** ELLES NE PEUVENT PAS ETRE ECRASEES EN COURS D'EXECUTION. */ - -/* *** LES VALEURS D'UNDERFLOW ET D'OVERFLOW NE PEUVENT PAS ETRE */ -/* DEFINIES EN VALEUR DECIMALES (ERREUR A LA COMPILATION D_FLOAT) */ -/* ON LES DEFINIT DONC EN VALEUR HEXADECIMALES */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 02-02-1993 : JMB ; SUPPRESSION DE LA SPECIFICITE DE L'INCLUDE */ -/* 29-08-1990 : DGZ ; AJOUT DES REELS X4OVR ET X4UND */ -/* 10-08-1990 : DGZ ; AJOUT DES FORMATS FRMR4,FRMR8,FRMR8G */ -/* 18-06-1990 : CS/DGZ ; CREATION VERSION ORIGINALE */ +/* *** THEY CAN'T BE REMOVED DURING EXECUTION. */ + +/* *** THE VALUES OF UNDERFLOW AND OVERFLOW CAN'T BE */ +/* DEFINED IN DECIMAL VALUES (ERROR OF COMPILATION D_FLOAT) */ +/* THEY ARE DEFINED AS HEXADECIMAL VALUES */ + + /* > */ /* *********************************************************************** */ -/* DECLARATION DU COMMON POUR LES TYPES NUMERIQUES */ +/* DECLARATION OF THE COMMON FOR NUMERIC TYPES */ -/* DECLARATION DU COMMON POUR LES TYPES CARACTERES */ +/* DECLARATION OF THE COMMON FOR CHARACTER TYPES*/ -/* VARIABLES LOCALES */ +/* LOCAL VARIABLES */ -/* TABLEAUX */ +/* TABLES */ /* DATAS */ /* Parameter adjustments */ @@ -1954,11 +1805,11 @@ int maoverf_(integer *nbentr, /* Function Body */ - /* vJMB R8OVR n est pas encore initialise, donc impossible d utiliser DATA + /* vJMB R8OVR IS NOT YET initialized, so impossible to use DATA */ /* DATA BUFF / NLONGR * R8OVR / */ - /* l init de BUFF n est faite qu'une fois */ + /* init of BUFF is done only once */ if (ifois == 0) { for (icompt = 1; icompt <= 63; ++icompt) { @@ -1975,14 +1826,14 @@ int maoverf_(integer *nbentr, AdvApp2Var_SysBase::mcrfill_(&nrest, (char *)buff, (char *)&dtable[1]); } else { - /* Amorce & initialisations */ + /* Start & initialization */ ioct = 504; AdvApp2Var_SysBase::mcrfill_(&ioct, (char *)buff, (char *)&dtable[1]); indic = 63; - /* Boucle. La borne sup. est la valeur entiere du logarithme de base 2 + /* Loop. The upper limit is the integer value of the logarithm of base 2 */ - /* de NBENTR/NLONGR. */ + /* of NBENTR/NLONGR. */ i__1 = (integer) (log((real) (*nbentr) / (float)63.) / log((float)2.)) ; for (ibid = 1; ibid <= i__1; ++ibid) { @@ -2050,53 +1901,41 @@ int matrsym_(const char *cnmsym, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* RECUPERE LA VALEUR D'UN SYMBOLE DEFINI AU MOMENT DE */ -/* L'INITIALISATION D'UN UTILISATEUR */ +/* RETURN THE VALUE OF A SYMBOL DEFINED DURING THE */ +/* INITIALISATION OF A USER */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TRADUCTION, SYMBOLE */ +/* TRANSLATION, SYMBOL */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* -------------------- */ -/* CNMSYM : NOM DU SYMBOLE */ +/* CNMSYM : NAME OF THE SYMBOL */ -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* CHAINE : TRADUCTION DU SYMBOLE */ -/* LENGTH : LONGUEUR UTILE DE LA CHAINE */ -/* IERCOD : CODE D'ERREUR */ +/* OUTPUT ARGUMENTS : */ +/* ------------------ */ +/* CHAINE : TRANSLATION OF THE SYMBOL */ +/* LENGTH : USEFUL LENGTH OF THE CHAIN */ +/* IERCOD : ERROR CODE */ /* = 0 : OK */ -/* = 1 : SYMBOLE INEXISTANT */ -/* = 2 : AUTRE ERREUR */ +/* = 1 : INEXISTING SYMBOL */ +/* = 2 : OTHER ERROR */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ------------------ */ -/* NEANT */ +/* NONE */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* --------------------- */ /* LIB$GET_SYMBOL,MACHDIM */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* - CETTE ROUTINE EST SPECIFIQUE VAX */ -/* - EN CAS D'ERREUR (IERCOD>0), CHAINE = ' ' ET LENGTH = 0 */ -/* - SI LA VARIABLE D'ENTREE CNMSYM EST VIDE, LA ROUTINE RENVOIE IERC -OD=1*/ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* SGI_H 16-04-91 : CSO ; CORRECTION CAS SYMBOLE INEXISTANT ==> IERCOD=1 -*/ -/* SGI_ 07-01-91 : SVN ; MODIF IERCOD NE DOIT PAS DEPASSER 2 */ -/* CHAINEVIDE VAUT CARACTERE BLANC */ -/* 22-02-88 : DGZ ; CREATION DE LA VERSION ORIGINALE */ -/* 07-09-88 : SGI_H : CS; SOUS UNIX SYMBOLE=NOM LOGIQUE = VARIABLE -*/ -/* ==> idem MAGTLOG */ +/* - THIS ROUTINE IS VAX SPECIFIC */ +/* - IN CASE OF ERROR (IERCOD>0), CHAIN = ' ' AND LENGTH = 0 */ +/* - IF THE INPUT VARIABLE CNMSYM IS EMPTY, THE ROUTINE RETURNS IERCOD=1*/ /* > */ /* *********************************************************************** */ @@ -2125,7 +1964,7 @@ OD=1*/ /* *********************************************************************** */ - /* TRAITEMENT DES ERREURS */ + /* ERROR PROCESSING */ /* *********************************************************************** */ @@ -2161,70 +2000,60 @@ int mcrcomm_(integer *kop, /************************************************************************ *******/ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* ALLOCATION DYNAMIQUE SUR COMMON */ +/* DYNAMIC ALLOCATION ON COMMON */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* . ALLOCDYNAMIQUE,MEMOIRE,COMMON,ALLOC */ +/* . ALLOCDYNAMIQUE, MEMORY, COMMON, ALLOC */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ /* KOP : (1,2) = (ALLOCATION,DESTRUCTION) */ -/* NOCT : NOMBRE D'OCTETS */ +/* NOCT : NUMBER OF OCTETS */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* IADR : ADRESSE EN MEMOIRE DU PREMIER OCTET */ +/* IADR : ADDRESS IN MEMORY OF THE FIRST OCTET */ /* * : */ /* * : */ -/* IERCOD : CODE D'ERREUR */ +/* IERCOD : ERROR CODE */ /* IERCOD = 0 : OK */ -/* IERCOD > 0 : ERREUR GRAVE */ +/* IERCOD > 0 : CRITICAL ERROR */ /* IERCOD < 0 : WARNING */ -/* IERCOD = 1 : DESCRIPTION DE L'ERREUR */ -/* IERCOD = 2 : DESCRIPTION DE L'ERREUR */ +/* IERCOD = 1 : ERROR DESCRIPTION */ +/* IERCOD = 2 : ERROR DESCRIPTION */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* CRGEN2 */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* MCRLOCV */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* ATTENTION .... ITAB ET NTAB NE SONT PAS SAUVEGARDES ENTRE 2 APPELS.. +/* ATTENTION .... ITAB ARE NTAB NOT SAVED BETWEEN 2 CALLS.. */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 04-11-89 : CR ; AJOUT DE OPTIONS /CHECK=NOBOUNDS. */ -/* 16-05-89 : DGZ; SUPPRESSION DU COMMON CRGEN2 */ -/* 02-05-88 : PP ; AJOUT DE COMMENTAIRES */ -/* 20-01-88 : JPF; MAXCOM DE 500 --> 250 */ -/* 09-12-85 : BF ; UTILISE LES ROUTINES STANDARDS */ -/* 08-11-85 : BF ; BUG SUR DEPLACEMENT TROU */ -/* 07-11-85 : BF ; VERSION D'ORIGINE */ - /* > */ /* *********************************************************************** */ /* JPF PARAMETER ( MAXNUM = 40 , MAXCOM = 500 * 1024 ) */ -/* ITAB : TABLE DE GESTION DE DTAB, ZONE DE MEMOIRE ALLOUABLE . */ -/* NTAB : NOMBRE D'ALLOCS REALISEES . */ -/* FORMAT DE ITAB : NOMBRE DE REAL*8 ALLOUES , ADRESSE DU 1ER REAL*8 +/* ITAB : TABLE OF MANAGEMENT OF DTAB, ALLOCATED MEMORY ZONE . */ +/* NTAB : NUMBER OF COMPLETED ALLOCATIONS. */ +/* FORMAT OF ITAB : NUMBER OF ALLOCATED REAL*8, ADDRESS OF THE 1ST REAL*8 */ -/* , NOCT , ADRESSE VIRTUELLE */ +/* , NOCT , VIRTUAL ADDRESS */ /* PP COMMON / CRGEN2 / DTAB */ @@ -2234,7 +2063,7 @@ int mcrcomm_(integer *kop, *ier = 0; - /* ALLOCATION : RECHERCHE D'UN TROU */ + /* ALLOCATION : FIND A HOLE */ if (*kop == 1) { *iadr = 0; @@ -2260,7 +2089,7 @@ int mcrcomm_(integer *kop, ideb = 32001; } if ((ideb - ipre) << 3 >= *noct) { - /* ON A TROUVE UN TROU */ + /* A HOLE WAS FOUND */ i__2 = i__; for (j = ntab; j >= i__2; --j) { for (k = 1; k <= 4; ++k) { @@ -2280,13 +2109,13 @@ int mcrcomm_(integer *kop, /* L1001: */ } - /* PAS DE TROU */ + /* NO HOLE */ *ier = 3; goto L9900; /* ----------------------------------- */ - /* DESTRUCTION DE L'ALLOCATION NUM : */ + /* DESTRUCTION OF THE ALLOCATION NUM : */ } else { i__1 = ntab; @@ -2297,7 +2126,7 @@ int mcrcomm_(integer *kop, if (*iadr != itab[(i__ << 2) - 1]) { goto L2001; } - /* ON A TROUVE L'ALLOCATION A SUPPRIMER */ + /* THE ALLOCATION TO BE REMOVED WAS FOUND */ i__2 = ntab; for (j = i__ + 1; j <= i__2; ++j) { for (k = 1; k <= 4; ++k) { @@ -2312,7 +2141,7 @@ int mcrcomm_(integer *kop, ; } - /* L'ALLOCATION N'EXISTE PAS */ + /* THE ALLOCATION DOES NOT EXIST */ *ier = 4; /* PP GOTO 9900 */ @@ -2337,161 +2166,115 @@ int AdvApp2Var_SysBase::mcrdelt_(integer *iunit, static doublereal xbid; static integer noct, iver, ksys, i__, n, nrang, ibyte, ier; - static long int iadfd, iadff, iaddr, loc; /* Les adrresses en long*/ + static long int iadfd, iadff, iaddr, loc; /* Long adDresses*/ static integer kop; /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* DESTRUCTION D'UNE ALLOCATION DYNAMIQUE */ +/* DESTRUCTION OF A DYNAMIC ALLOCATION */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, ALLOCATION, MEMOIRE, DESTRUCTION */ +/* SYSTEM, ALLOCATION, MEMORY, DESTRUCTION */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* IUNIT : NOMBRE D'OCTETS DE L'UNITE D'ALLOCATION */ -/* ISIZE : NOMBRE D'UNITES DEMANDEES */ -/* T : ADRESSE DE REFERENCE */ -/* IOFSET : DECALAGE */ +/* IUNIT : NUMBER OF OCTETS OF THE ALLOCATION UNIT */ +/* ISIZE : NUMBER OF UNITS REQUIRED */ +/* T : REFERENCE ADDRESS */ +/* IOFSET : OFFSET */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* IERCOD : CODE D'ERREUR */ +/* IERCOD : ERROR CODE */ /* = 0 : OK */ -/* = 1 : PB DE DE-ALLOCATION D'UNE ZONE ALLOUEE EN COMMON */ -/* = 2 : LE SYSTEME REFUSE LA DEMANDE DE DE-ALLOCATION */ -/* = 3 : L'ALLOCATION A DETRUIRE N'EXISTE PAS. */ +/* = 1 : PB OF DE-ALLOCATION OF A ZONE ALLOCATED IN COMMON */ +/* = 2 : THE SYSTEM REFUSES TO DEMAND DE-ALLOCATION */ +/* = 3 : THE ALLOCATION TO BE DESTROYED DOES NOT EXIST. */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ---------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ /* 1) UTILISATEUR */ /* ----------- */ -/* MCRDELT FAIT UNE LIBERATION DE ZONE MEMOIRE ALLOUEE */ -/* PAR LA ROUTINE MCRRQST (OU CRINCR) */ +/* MCRDELT FREES ALLOCATED MEMORY ZONE */ +/* BY ROUTINE MCRRQST (OR CRINCR) */ -/* LA SIGNIFICATION DES ARGUMENTS EST LA MEME QUE MCRRQST */ +/* THE MEANING OF ARGUMENTS IS THE SAME AS MCRRQST */ /* *** ATTENTION : */ /* ----------- */ -/* IERCOD=2 : CAS OU LE SYSTEME NE PEUT LIBERER LA MEMOIRE ALLOUEE, */ -/* LE MESSAGE SUIVANT APPARAIT SYSTEMATIQUEMENT SUR LA CONSOLE */ -/* ALPHA : */ -/* "Le systeme refuse une destruction d'allocation de memoire" */ +/* IERCOD=2 : CASE WHEN THE SYSTEM CANNOT FREE THE ALLOCATED MEMORY, */ +/* THE FOLLOWING MESSAGE APPEARS SYSTEMATICALLY ON CONSOLE ALPHA : */ +/* "THe system refuseS destruction of memory allocation" */ -/* IERCOD=3 CORRESPOND AU CAS OU LES ARGUMENTS SONT MAUVAIS */ -/* (ILS NE PERMETTENT PAS DE RECONNAITRE L'ALLOCATION DANS LA TABLE) +/* IERCOD=3 CORRESPONDS TO THE CASE WHEN THE ARGUMENTS ARE NOT CORRECT */ +/* (THEY DO NOT ALLOW TO RECOGNIZE THE ALLOCATION IN THE TABLE) */ -/* Lorsque l'allocation est detruite, l'IOFSET correspondant est mis -*/ -/* a 2 147 483 647. Ainsi, si on accede au tableau via l'IOFSET, un */ -/* trap se produira. Ceci permet de verifier qu'on ne se sert plus */ -/* d'une zone de memoire qu'on a liberee. Cette verification n'est */ -/* valable que si c'est le meme sous-programme qui utilise et qui */ -/* detruit l'allocation. */ - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 05-03-93 : FCR : DMSF52088 : On prend les memes et on recommence ... -*/ -/* IERCOD = 3 et I4UND. */ -/* 22-02-93 : FCR : Pour TOYOTA : Desactivation de l'affectation de */ -/* l'IOFSET a I4UND et suppression de IERCOD = 3. */ -/* 10-02-93 : FCR ; DMSFRO253 : Ajout d'un appel a MAERMSG si IERCOD -*/ -/* = 3 */ -/* 22-01-93 : FCR ; DMSF52088 : Ajout de l'IERCOD 3. */ -/* Ajout de l'IOFSET mis a I4UND lorsque */ -/* l'allocation est detruite. */ -/* 08-10-92 : FCR ; DMSFRO131 : Modif pour DEBUG-ALLOC */ -/* 08-09-92 : FCR ; Optimisation */ -/* 18-11-91 : DGZ ; APPEL MACRCHK EN PHASE DE DEVELOPPEMENT */ -/* 23-09-91 : DGZ ; RENOMME EN .FOR ET MODIFS DE COMMENTAIRES */ -/* 14-05-91 : DGZ ; SUPPRIME L'OPTION /CHECK=NBOUNDS */ -/* 21-08-90 : DGZ ; AFFICHAGE DU TRACE-BACK EN PHASE DE PRODUCTION */ -/* ET RENOMME EN .VAX */ -/* 22-12-89 : DGZ ; CORRECTION DE L'EN-TETE */ -/* 04-11-89 : CR ; AJOUT DE OPTIONS /CHECK=NOBOUNDS. */ -/* 11-05-89 : DGZ; CONTROLE DEBORDEMENT DE MEMOIRE */ -/* 27-06-88 : PP ; VIRE 9001 INUTILISE */ -/* PP 26.2.88 CHANGE LE VFORMA EN MACRMSG, POUR USAGE DANS C */ -/* 09-01-87 : BF ; ALLOCATIONS SYSTEME */ -/* 03-11-86 : BF ; RAJOUTE STATISTIQUES */ -/* 09-12-85 : BF ; UTILISE LES ROUTINES STANDARDS */ -/* 09-12-85 : BF ; PLUS D'ERREUR SI L'ALLOCATION N'EXISTE PAS */ -/* 07-11-85 : BF ; VERSION D'ORIGINE */ +/* When the allocation is destroyed, the corresponding IOFSET is set to */ +/* 2 147 483 647. So, if one gets access to the table via IOFSET, there is */ +/* a trap. This allows to check that the freed memory zone is not usede. This verification is */ +/* valid only if the same sub-program uses and destroys the allocation. */ + /* > */ /* *********************************************************************** */ -/* COMMON DES PARAMETRES */ +/* COMMON OF PARAMETERS */ -/* COMMON DES STATISTIQUES */ +/* COMMON OF STATISTICS */ /* INCLUDE MCRGENE */ /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* TABLE DE GESTION DES ALLOCATIONS DYNAMIQUES DE MEMOIRE */ +/* TABLE OF MANAGEMENT OF DYNAMIC ALLOCATIONS IN MEMORY */ -/* MOTS CLES : */ +/* KEYWORS : */ /* ----------- */ -/* SYSTEME, MEMOIRE, ALLOCATION */ +/* SYSTEM, MEMORY, ALLOCATION */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 23-11-93 : FCR; AF93125U3A007 : MAXCR 200 --> 1000 */ -/* 08-10-92 : FCR; DMSFRO131 : Modif pour DEBUG-ALLOC */ -/* 25-09-91 : DGZ; AJOUT INFOs SUPPLEMENTAIREs POUR GESTION FLAGS */ -/* 18-01-91 : DGZ; MAXCR PASSE DE 100 A 200 SUR DEMANDE GDD */ -/* 18-05-90 : DGZ; DECLARATION TYPE INTEGER POUR MAXCR */ -/* 20-06-88 : PP ; MAXCR PASSE DE 50 A 100, SUR DEMANDE OG */ -/* + AJOUT DE COMMENTAIRES */ -/* 26-02-88 : PP ; MAXCR PASSE DE 40 A 50, SUR DEMANDE AB . */ -/* 15-04-85 : BF ; VERSION D'ORIGINE */ + /* > */ /* *********************************************************************** */ - -/* ICORE : TABLE DES ALLOCS EXISTANTES, AVEC POUR CHACUNE : */ -/* 1 : NIVEAU DE PROTECTION (0=PAS PROTEGE, AUTRE=PROTEGE) */ -/* (PROTEGE SIGNIFIE PAS DETRUIT PAR CRRSET .) */ -/* 2 : UNITE D'ALLOCATION */ -/* 3 : NB D'UNITES ALLOUEES */ -/* 4 : ADRESSE DE REFERENCE DU TABLEAU */ +/* ICORE : TABLE OF EXISTING ALLOCATIONS, EACH HAVING : */ +/* 1 : LEVEL OF PROTECTION (0=NOT PROTECTED, OTHER=PROTECTED) */ +/* (PROTECTED MEANS NOT DESTROYED BY CRRSET .) */ +/* 2 : UNIT OF ALLOCATION */ +/* 3 : NB OF ALLOCATED UNITS */ +/* 4 : REFERENCE ADDRESS OF THE TABLE */ /* 5 : IOFSET */ -/* 6 : NUMERO ALLOCATION STATIQUE */ -/* 7 : Taille demandee en allocation */ -/* 8 : adresse du debut de l'allocation */ -/* 9 : Taille de la ZONE UTILISATEUR */ -/* 10 : ADRESSE DU FLAG DE DEBUT */ -/* 11 : ADRESSE DU FLAG DE FIN */ -/* 12 : Rang de creation de l'allocation */ - -/* NDIMCR : NBRE DE DONNEES DE CHAQUE ALLOC DANS ICORE */ -/* NCORE : NBRE D'ALLOCS EN COURS */ -/* LPROT : COMMUNICATION ENTRE CRPROT ET MCRRQST, REMIS A 0 PAR MCRRQST -*/ -/* FLAG : VALEUR DU FLAG UTILISE POUR LES DEBORDEMENTS */ +/* 6 : STATIC ALLOCATION NUMBER */ +/* 7 : Required allocation size */ +/* 8 : address of the beginning of allocation */ +/* 9 : Size of the USER ZONE */ +/* 10 : ADDRESS of the START FLAG */ +/* 11 : ADDRESS of the END FLAG */ +/* 12 : Rank of creation of the allocation */ + +/* NDIMCR : NB OF DATA OF EACH ALLOC IN ICORE */ +/* NCORE : NB OF CURRENT ALLOCS */ +/* LPROT : COMMUNICATION BETWEEN CRPROT AND MCRRQST, SET TO 0 BY MCRRQST */ +/* FLAG : VALUE OF THE FLAG USED FOR EXCESSES */ @@ -2499,13 +2282,13 @@ int AdvApp2Var_SysBase::mcrdelt_(integer *iunit, */ -/* 20-10-86 : BF ; VERSION D'ORIGINE */ +/* 20-10-86 : BF ; INITIAL VERSION */ -/* NRQST : NOMBRE D'ALLOCATIONS EFFECTUEES */ -/* NDELT : NOMBRE DE LIBERATIONS EFFECTUEES */ -/* NBYTE : NOMBRE TOTAL D'OCTETS DES ALLOCATIONS */ -/* MBYTE : NOMBRE MAXI D'OCTETS */ +/* NRQST : NUMBER OF ALLOCATIONS */ +/* NDELT : NUMBER OF LIBERATIONS */ +/* NBYTE : TOTAL NUMBER OF OCTETS OF ALLOCATIONS */ +/* MBYTE : MAX NUMBER OF OCTETS */ /* Parameter adjustments */ --t; @@ -2513,7 +2296,7 @@ int AdvApp2Var_SysBase::mcrdelt_(integer *iunit, /* Function Body */ *iercod = 0; -/* RECHERCHE DANS MCRGENE */ +/* SEARCH IN MCRGENE */ n = 0; mcrlocv_((long int)&t[1], (long int *)&loc); @@ -2529,13 +2312,13 @@ int AdvApp2Var_SysBase::mcrdelt_(integer *iunit, } L1100: -/* SI L'ALLOCATION N'EXISTE PAS , ON SORT */ +/* IF THE ALLOCATION DOES NOT EXIST, LEAVE */ if (n <= 0) { goto L9003; } -/* ALLOCATION RECONNUE : ON RECUPERE LES AUTRES INFOS */ +/* ALLOCATION RECOGNIZED : RETURN OTHER INFOS */ ksys = mcrgene_.icore[n * 12 - 7]; ibyte = mcrgene_.icore[n * 12 - 6]; @@ -2544,7 +2327,7 @@ L1100: iadff = mcrgene_.icore[n * 12 - 2]; nrang = mcrgene_.icore[n * 12 - 1]; -/* Controle des flags */ +/* Control of flags */ madbtbk_(&iver); if (iver == 1) { @@ -2552,25 +2335,25 @@ L1100: } if (ksys <= 1) { -/* DE-ALLOCATION SUR COMMON */ +/* DE-ALLOCATION ON COMMON */ kop = 2; mcrcomm_(&kop, &ibyte, &iaddr, &ier); if (ier != 0) { goto L9001; } } else { -/* DE-ALLOCATION SYSTEME */ +/* DE-ALLOCATION SYSTEM */ mcrfree_((integer *)&ibyte, (uinteger *)&iaddr, (integer *)&ier); if (ier != 0) { goto L9002; } } -/* APPEL PERMETTANT LE CANCEL WATCH AUTOMATQUE PAR LE DEBUGGER */ +/* CALL ALLOWING TO CANCEL AUTOMATIC WATCH BY THE DEBUGGER */ macrclw_(&iadfd, &iadff, &nrang); -/* MISE A JOUR DES STATISTIQUES */ +/* UPDATE OF STATISTICS */ if (ksys <= 1) { i__ = 1; } else { @@ -2580,7 +2363,7 @@ L1100: mcrstac_.nbyte[i__ - 1] -= mcrgene_.icore[n * 12 - 11] * mcrgene_.icore[n * 12 - 10]; -/* SUPPRESSION DES PARAMETRES DANS MCRGENE */ +/* REMOVAL OF PARAMETERS IN MCRGENE */ if (n < 1000) { /* noct = (mcrgene_1.ncore - n) * 48; */ noct = (mcrgene_.ncore - n) * 12 * sizeof(long int); @@ -2590,22 +2373,22 @@ L1100: } --mcrgene_.ncore; -/* *** Mise a l'overflow de l'IOFSET */ +/* *** Set to overflow of IOFSET */ *iofset = 2147483647; goto L9900; /* ----------------------------------------------------------------------* */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ L9001: -/* REFUS DE DE-ALLOCATION PAR LA ROUTINE 'MCRCOMM' (ALLOC DS COMMON) */ +/* REFUSE DE-ALLOCATION BY ROUTINE 'MCRCOMM' (ALLOC DS COMMON) */ *iercod = 1; AdvApp2Var_SysBase::maermsg_("MCRDELT", iercod, 7L); maostrd_(); goto L9900; -/* REFUS DE DE-ALLOCATION PAR LE SYSTEME */ +/* REFUSE DE-ALLOCATION BY THE SYSTEM */ L9002: *iercod = 2; AdvApp2Var_SysBase::maermsg_("MCRDELT", iercod, 7L); @@ -2613,7 +2396,7 @@ L9002: maostrd_(); goto L9900; -/* ALLOCATION INEXISTANTE */ +/* ALLOCATION DOES NOT EXIST */ L9003: *iercod = 3; AdvApp2Var_SysBase::maermsg_("MCRDELT", iercod, 7L); @@ -2630,37 +2413,34 @@ L9900: /* C********************************************************************* C -C FONCTION : +C FUNCTION : C ---------- -C Transfert une zone memoire dans une autre en gerant les -C recouvrements +C Transfer a memory zone in another by managing intersections C -C MOTS CLES : +C KEYWORDS : C ----------- -C MANIPULATION, MEMOIRE, TRANSFERT, CARACTERE +C MANIPULATION, MEMORY, TRANSFER, CHARACTER C -C ARGUMENTS D'ENTREE : -C ------------------ -C nb_car : integer*4 nombre de caracteres a transferer. -C source : zone memoire source. +C INPUT ARGUMENTS : +C ----------------- +C nb_car : integer*4 number of characters to transfer. +C source : source memory zone. C -C ARGUMENTS DE SORTIE : +C OUTPUT ARGUMENTS : C ------------------- -C dest : zone memeoire destination. +C dest : zone memory destination. C -C COMMONS UTILISES : +C COMMONS USED : C ---------------- C -C REFERENCES APPELEES : +C REFERENCES CALLED : C ------------------- C -C DEMSCRIPTION/REMARQUES/LIMITATIONS : +C DEMSCRIPTION/NOTES/LIMITATIONS : C ----------------------------------- C Routine portable UNIX (SGI, ULTRIX, BULL) C -C$ HISTORIQUE DES MODIFICATIONS : -C ---------------------------- -C 24/01/92 : DGZ ; Recuperation de la version BULL + C> C********************************************************************** */ @@ -2697,51 +2477,23 @@ int AdvApp2Var_SysBase::mcrfill_(integer *size, /*........................................................................*/ /* */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Routines de gestion de la memoire dynamique. */ +/* Routines for management of the dynamic memory. */ /* */ -/* Routine mcrfree */ +/* Routine mcrfree */ /* -------------- */ /* */ -/* Desallocation d'une zone memoire. */ -/* */ -/* CALL MCRFREE (IBYTE,IADR,IER) */ -/* */ -/* IBYTE INTEGER*4 : Nombre d'Octetes a Liberer */ -/* */ -/* IADR POINTEUR : Adresse de Depart */ -/* */ -/* IER INTEGER*4 : Code de Retour */ -/* */ -/* */ -/* MOTS CLES : */ -/* ----------- */ -/* */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* */ -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* */ -/* COMMONS UTILISES : */ -/* ------------------ */ +/* Desallocation of a memory zone . */ /* */ -/* REFERENCES APPELEES : */ -/* --------------------- */ +/* CALL MCRFREE (IBYTE,IADR,IER) */ /* */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ +/* IBYTE INTEGER*4 : Nb of Octets to free */ /* */ -/* ** SPECIFIQUE SPS9 ** */ +/* IADR POINTEUR : Start Address */ /* */ +/* IER INTEGER*4 : Return Code */ /* */ -/* HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* */ -/* 07-03-86 : FS; INSERTION DE L'ENTETE STANDARD C */ -/* 16-09-86 : FS; MODIFICATIONS PASSAGE NIVEAU INFERIEUR */ -/* SGI_H 05-04-90 : ACT ; ECLATEMENT DU PACKAGE CRALOC */ /* */ /*........................................................................*/ /* */ @@ -2765,53 +2517,26 @@ int mcrfree_(integer *,//ibyte, /* */ /* FONCTION : */ /* ---------- */ -/* Routines de gestion de la memoire dynamique. */ +/* Routines for management of the dynamic memory. */ /* */ -/* Routine mcrgetv */ +/* Routine mcrgetv */ /* -------------- */ /* */ -/* Demande d'allocation de memoire. */ +/* Demand of memory allocation. */ /* */ -/* CALL MCRGETV(IBYTE,IADR,IER) */ +/* CALL MCRGETV(IBYTE,IADR,IER) */ /* */ -/* IBYTE (INTEGER*4) Nombre de Bytes d'allocation */ -/* demandee */ +/* IBYTE (INTEGER*4) Nb of Bytes of allocation required */ /* */ -/* IADR (INTEGER*4) : Resultat. */ +/* IADR (INTEGER*4) : Result. */ /* */ -/* IER (INTEGER*4) : Code d'erreur : */ +/* IER (INTEGER*4) : Error Code : */ /* */ /* = 0 ==> OK */ /* = 1 ==> Allocation impossible */ /* = -1 ==> Ofset > 2**31 - 1 */ /* */ -/* MOTS CLES : */ -/* ----------- */ -/* */ -/* ARGUMENTS D'ENTREE : */ -/* -------------------- */ -/* */ -/* ARGUMENTS DE SORTIE : */ -/* --------------------- */ -/* */ -/* COMMONS UTILISES : */ -/* ------------------ */ -/* */ -/* REFERENCES APPELEES : */ -/* --------------------- */ -/* */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ -/* ----------------------------------- */ -/* */ -/* ** SPECIFIQUE SPS9 ** */ -/* */ -/* */ -/* HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* */ -/* 07-03-86 : FS; INSERTION DE L'ENTETE STANDARD C */ -/* 16-09-86 : FS; MODIFICATIONS PASSAGE NIVEAU INFERIEUR */ -/*SGI_H 05-04-90 : ACT ; ECLATEMENT DU PACKAGE CRALOC */ + /* */ /*........................................................................*/ @@ -2854,53 +2579,46 @@ int mcrlist_(integer *ier) /************************************************************************ *******/ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* IMPRESSION DU TABLEAU DES ALLOCATIONS DYNAMIQUES EN COURS */ +/* PRINT TABLE OF CURRENT DYNAMIC ALLOCATIONS */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, ALLOCATION, MEMOIRE, LISTE */ +/* SYSTEM, ALLOCATION, MEMORY, LIST */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* . NEANT */ +/* . NONE */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ /* * : */ /* * : */ -/* IERCOD : CODE D'ERREUR */ +/* IERCOD : ERROR CODE */ /* IERCOD = 0 : OK */ -/* IERCOD > 0 : ERREUR GRAVE */ +/* IERCOD > 0 : SERIOUS ERROR */ /* IERCOD < 0 : WARNING */ -/* IERCOD = 1 : DESCRIPTION DE L'ERREUR */ -/* IERCOD = 2 : DESCRIPTION DE L'ERREUR */ +/* IERCOD = 1 : ERROR DESCRIPTION */ +/* IERCOD = 2 : ERROR DESCRIPTION */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* MCRGENE VFORMT */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ---------------------- */ /* Type Name */ /* VFORMA */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* . NEANT */ +/* . NONE */ + -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 04-08-92 : HCE ; CORRECTION CTLCODE */ -/* 10-06-92 : FCR ; CORRECTION CTLCODE */ -/* 16-09-1991: FCR ; Suppression INCLUDE VFORMT */ -/* 22-12-89 : DGZ ; CORRECTION DE L'EN-TETE */ -/* PP 26.2.88 MIS VFORMA A LA PLACE DE MCRLIST */ -/* 04-11-85 : BF ; VERSION D'ORIGINE */ /* > */ /* *********************************************************************** @@ -2910,52 +2628,41 @@ int mcrlist_(integer *ier) /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* TABLE DE GESTION DES ALLOCATIONS DYNAMIQUES DE MEMOIRE */ +/* TABLE FOR MANAGEMENT OF DYNAMIC MEMORY ALLOCATIONS */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, MEMOIRE, ALLOCATION */ +/* SYSTEM, MEMORY, ALLOCATION */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 23-11-93 : FCR; AF93125U3A007 : MAXCR 200 --> 1000 */ -/* 08-10-92 : FCR; DMSFRO131 : Modif pour DEBUG-ALLOC */ -/* 25-09-91 : DGZ; AJOUT INFOs SUPPLEMENTAIREs POUR GESTION FLAGS */ -/* 18-01-91 : DGZ; MAXCR PASSE DE 100 A 200 SUR DEMANDE GDD */ -/* 18-05-90 : DGZ; DECLARATION TYPE INTEGER POUR MAXCR */ -/* 20-06-88 : PP ; MAXCR PASSE DE 50 A 100, SUR DEMANDE OG */ -/* + AJOUT DE COMMENTAIRES */ -/* 26-02-88 : PP ; MAXCR PASSE DE 40 A 50, SUR DEMANDE AB . */ -/* 15-04-85 : BF ; VERSION D'ORIGINE */ + /* > */ /* *********************************************************************** */ -/* ICORE : TABLE DES ALLOCS EXISTANTES, AVEC POUR CHACUNE : */ -/* 1 : NIVEAU DE PROTECTION (0=PAS PROTEGE, AUTRE=PROTEGE) */ -/* (PROTEGE SIGNIFIE PAS DETRUIT PAR CRRSET .) */ -/* 2 : UNITE D'ALLOCATION */ -/* 3 : NB D'UNITES ALLOUEES */ -/* 4 : ADRESSE DE REFERENCE DU TABLEAU */ +/* ICORE : TABLE OF EXISTING ALLOCATIONS, EACH HAVING : */ +/* 1 : LEVEL OF PROTECTION (0=NOT PROTECTED, OTHER=PROTECTED) */ +/* (PROTECTED MEANS NOT DESTROYED BY CRRSET .) */ +/* 2 : UNIT OF ALLOCATION */ +/* 3 : NB OF ALLOCATED UNITS */ +/* 4 : REFERENCE ADDRESS OF THE TABLE */ /* 5 : IOFSET */ -/* 6 : NUMERO ALLOCATION STATIQUE */ -/* 7 : Taille demandee en allocation */ -/* 8 : adresse du debut de l'allocation */ -/* 9 : Taille de la ZONE UTILISATEUR */ -/* 10 : ADRESSE DU FLAG DE DEBUT */ -/* 11 : ADRESSE DU FLAG DE FIN */ -/* 12 : Rang de creation de l'allocation */ - -/* NDIMCR : NBRE DE DONNEES DE CHAQUE ALLOC DANS ICORE */ -/* NCORE : NBRE D'ALLOCS EN COURS */ -/* LPROT : COMMUNICATION ENTRE CRPROT ET MCRRQST, REMIS A 0 PAR MCRRQST -*/ -/* FLAG : VALEUR DU FLAG UTILISE POUR LES DEBORDEMENTS */ +/* 6 : STATIC ALLOCATION NUMBER */ +/* 7 : Required allocation size */ +/* 8 : address of the beginning of allocation */ +/* 9 : Size of the USER ZONE */ +/* 10 : ADDRESS of the START FLAG */ +/* 11 : ADDRESS of the END FLAG */ +/* 12 : Rank of creation of the allocation */ + +/* NDIMCR : NB OF DATA OF EACH ALLOC IN ICORE */ +/* NCORE : NB OF CURRENT ALLOCS */ +/* LPROT : COMMUNICATION BETWEEN CRPROT AND MCRRQST, SET TO 0 BY MCRRQST */ +/* FLAG : VALUE OF THE FLAG USED FOR EXCESSES */ @@ -2969,7 +2676,7 @@ int mcrlist_(integer *ier) *ier = 0; //__s__copy(subrou, "MCRLIST", 7L, 7L); -/* ECRITURE DE L'EN TETE */ +/* WRITE HEADING */ nufmt = 1; ifmt = mcrgene_.ncore; @@ -3033,184 +2740,145 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, /* ********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* REALISATION D'UNE ALLOCATION DYNAMIQUE DE MEMOIRE */ +/* IMPLEMENTATION OF DYNAMIC MEMORY ALLOCATION */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, ALLOCATION, MEMOIRE, REALISATION */ +/* SYSTEM, ALLOCATION, MEMORY, REALISATION */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* IUNIT : NOMBRE D'OCTEST DE L'UNITE D'ALLOCATION */ -/* ISIZE : NOMBRE D'UNITES DEMANDEES */ -/* T : ADRESSE DE REFERENCE */ +/* IUNIT : NUMBER OF OCTET OF THE UNIT OF ALLOCATION */ +/* ISIZE : NUMBER OF UNITS REQUIRED */ +/* T : REFERENCE ADDRESS */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* IOFSET : DECALAGE */ -/* IERCOD : CODE D'ERREUR, */ +/* IOFSET : OFFSET */ +/* IERCOD : ERROR CODE, */ /* = 0 : OK */ -/* = 1 : NBRE MAXI D'ALLOCS ATTEINT */ -/* = 2 : ARGUMENTS INCORRECTS */ -/* = 3 : REFUS D'ALLOCATION DYNAMIQUE */ +/* = 1 : MAX NB OF ALLOCS REACHED */ +/* = 2 : ARGUMENTS INCORRECT */ +/* = 3 : REFUSED DYNAMIC ALLOCATION */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ /* MCRGENE, MCRSTAC */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ /* MACRCHK, MACRGFL, MACRMSG, MCRLOCV,MCRCOMM, MCRGETV */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* 1) UTILISATEUR */ +/* 1) USER */ /* -------------- */ -/* T EST L'ADRESSE D'UN TABLEAU BANAL,IOFSET REPRESENTE LE DEPLACEMENT EN -*/ -/* UNITES DE IUNIT OCTETS ENTRE LA ZONE ALLOUEE ET LE TABLEAU T */ -/* IERCOD=0 SIGNALE QUE L'ALLOCATION S'EST BIEN DEROULEE ,TOUTE AUTRE */ -/* VALEUR INDIQUE UNE ANOMALIE. */ - -/* EXEMPLE : */ -/* SOIT LA DECLARATION REAL*4 T(1), DONC IUNIT=4 . */ -/* L'APPEL A MCRRQST FAIT UNE ALLOCATION DYNAMIQUE */ -/* ET DONNE UNE VALEUR A LA VARIABLE IOFSET, */ -/* SI L'ON VEUT ECRIRE 1. DANS LA CINQUIEME ZONE REAL*4 */ -/* AINSI ALLOUEE ,FAIRE: */ +/* T IS THE ADDRESS OF A TABLE, IOFSET REPRESENTS THE DEPLACEMENT IN */ +/* UNITS OF IUNIT OCTETS BETWEEN THE ALLOCATED ZONE AND TABLE T */ +/* IERCOD=0 SIGNALS THAT THE ALLOCATION WORKS WELL, ANY OTHER */ +/* VALUE INDICATES A BUG. */ + +/* EXAMPLE : */ +/* LET THE DECLARATION REAL*4 T(1), SO IUNIT=4 . */ +/* CALL TO MCRRQST PORODUCES DYNAMIC ALLOCATION */ +/* AND GIVES VALUE TO VARIABLE IOFSET, */ +/* IF IT IS REQUIRED TO WRITE 1. IN THE 5TH ZONE REAL*4 */ +/* ALLOCATED IN THIS WAY, MAKE: */ /* T(5+IOFSET)=1. */ -/* CAS D'ERREURS : */ +/* CASE OF ERRORS : */ /* --------------- */ -/* IERCOD=1 : NOMBRE MAXI D'ALLOCATION ATTEINT (ACTUELLEMENT 200) */ -/* ET LE MESSAGE SUIVANT APPARAIT SUR LA CONSOLE ALPHA : */ -/* "Le nombre maxi d'allocation de memoire est atteint : ,N" */ +/* IERCOD=1 : MAX NB OF ALLOCATION REACHED (ACTUALLY 200) */ +/* AND THE FOLLOWING MESSAGE APPEARS IN THE CONSOLE ALPHA : */ +/* "The max number of memory allocation is reached : ,N" */ -/* IERCOD=2 : ARGUMENT IUNIT INCORRECT CAR DIFFERENT DE 1,2,4 OU 8 */ -/* ET LE MESSAGE SUIVANT APPARAIT SUR LA CONSOLE ALPHA : */ -/* "Unite d'allocation invalide : ,IUNIT" */ +/* IERCOD=2 : ARGUMENT IUNIT INCORRECT AS IT IS DIFFERENT FROM 1,2,4 OR 8 */ +/* AND THE FOLLOWING MESSAGE APPEARS IN THE CONSOLE ALPHA : */ +/* "Unit OF allocation invalid : ,IUNIT" */ -/* IERCOD=3 : REFUS D'ALLOCATION DYNAMIQUE (PLUS DE PLACE MEMOIRE) */ -/* ET LE MESSAGE SUIVANT APPARAIT SUR LA CONSOLE ALPHA : */ -/* "Le systeme refuse une allocation dynamique de memoire de N octets" +/* IERCOD=3 : REFUSED DYNAMIC ALLOCATION (MORE PLACE IN MEMORY) */ +/* AND THE FOLLOWING MESSAGE APPEARS IN THE CONSOLE ALPHA : */ +/* "The system refuses dynamic allocation of memory of N octets" */ -/* AVEC UN AFFICHAGE COMPLET DE TOUTES LES ALLOCATIONS EFFECTUEES */ -/* JUSQU'A PRESENT. */ +/* with completev display of all allocations carried out till now */ -/* 2) CONCEPTEUR */ +/* 2) DESIGNER */ /* -------------- */ -/* MCRRQST FAIT UNE ALLOCATION DYNAMIQUE DE MEMOIRE VIRTUELLE SUR LA BASE -*/ -/* D'ENTITES DE 8 OCTETS (QUADWORDS) ,BIEN QUE L'ALLOCATION SOIT DEMANDEE -*/ -/* PAR UNITES DE IUNIT OCTETS (1,2,4,8). */ +/* MCRRQST MAKES DYNAMIC ALLOCATION OF VIRTUAL MEMORY ON THE BASE */ +/* OF ENTITIES OF 8 OCTETS (QUADWORDS), WHILE THE ALLOCATION IS REQUIRED BY */ +/* UNITS OF IUNIT OCTETS (1,2,4,8). */ + +/* THE REQUIRED QUANTITY IS IUNIT*ISIZE OCTETS, THIS VALUE IS ROUNDED */ +/* SO THAT THE ALLOCATION WAS AN INTEGER NUMBER OF QUADWORDS. */ + -/* LA QUANTITE DEMANDEE EST IUNIT*ISIZE OCTETS,CETTE VALEUR EST ARRONDIE -*/ -/* POUR QUE L'ALLOCATION SOIT UN NOMBRE ENTIER DE QUADWORDS. */ - - -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 14-04-94 : JMB; Suppression message ALLOC < 16 octets */ -/* 08-10-92 : FCR; DMSFRO131 : Modif pour DEBUG-ALLOC */ -/* 23-09-91 : DGZ; REND LA ROUTINE PORTABLE */ -/* 22-08-90 : DGZ; CORRECTION DE L'EN-TETE */ -/* 21-08-90 : DGZ; AFFICHAGE DU TRACE_BACK EN PHASE DE PRODUCTION */ -/* 22-12-89 : DGZ; CORRECTION DE L'EN-TETE */ -/* 19-05-89 : DGZ; AJOUT DOUBLE MOT SI DECALAGE ET SUPP APPEL ACRVRF -*/ -/* 17-05-89 : DGZ; CALCUL DE IOFSET DANS LE CAS OU IL EST NEGATIF */ -/* 11-05-89 : DGZ; CONTROLE DES ECRASEMENTS DE ZONE MEMOIRE */ -/* 04-05-88 : PP ; CHANGE MOVFLW EN MAOVERF */ -/* 23-03-88 : PP ; CORR DE PASSAGES D'ARGUMENTS DANS MACRMSG ET MOVFLW - */ -/* 26.2.88 PP VIRE VFORMA, ET MIS MACRMSG */ -/* 22.2.88 : PP : CHANGE I*4 EN I ET R*8 EN D P, AJOUT DE ISYST */ -/* ,ET VIRE LE TEST SUR IBB, A REMETTRE AVANT LIVRAISON -*/ -/* 09-10-1987 : Initialisation a OVERFLOW si IBB <> 0 JJM */ -/* 10-04-87 : BF ; ALLOCATIONS CADREES SUR DOUBLES MOTS */ -/* 07-11-85 : BF ; VERSION D'ORIGINE */ /* > */ /* *********************************************************************** */ -/* COMMON DES PARAMETRES */ -/* COMMON DES INFORMATIONS SUR LES STATISTIQUES */ +/* COMMON OF PARAMETRES */ +/* COMMON OF INFORMATION ON STATISTICS */ /* INCLUDE MCRGENE */ /* *********************************************************************** */ - -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* TABLE DE GESTION DES ALLOCATIONS DYNAMIQUES DE MEMOIRE */ +/* TABLE FOR MANAGEMENT OF DYNAMIC MEMORY ALLOCATIONS */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* SYSTEME, MEMOIRE, ALLOCATION */ +/* SYSTEM, MEMORY, ALLOCATION */ -/* DEMSCRIPTION/REMARQUES/LIMITATIONS : */ +/* DEMSCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* ------------------------------ */ -/* 23-11-93 : FCR; AF93125U3A007 : MAXCR 200 --> 1000 */ -/* 08-10-92 : FCR; DMSFRO131 : Modif pour DEBUG-ALLOC */ -/* 25-09-91 : DGZ; AJOUT INFOs SUPPLEMENTAIREs POUR GESTION FLAGS */ -/* 18-01-91 : DGZ; MAXCR PASSE DE 100 A 200 SUR DEMANDE GDD */ -/* 18-05-90 : DGZ; DECLARATION TYPE INTEGER POUR MAXCR */ -/* 20-06-88 : PP ; MAXCR PASSE DE 50 A 100, SUR DEMANDE OG */ -/* + AJOUT DE COMMENTAIRES */ -/* 26-02-88 : PP ; MAXCR PASSE DE 40 A 50, SUR DEMANDE AB . */ -/* 15-04-85 : BF ; VERSION D'ORIGINE */ + /* > */ /* *********************************************************************** */ -/* ICORE : TABLE DES ALLOCS EXISTANTES, AVEC POUR CHACUNE : */ -/* 1 : NIVEAU DE PROTECTION (0=PAS PROTEGE, AUTRE=PROTEGE) */ -/* (PROTEGE SIGNIFIE PAS DETRUIT PAR CRRSET .) */ -/* 2 : UNITE D'ALLOCATION */ -/* 3 : NB D'UNITES ALLOUEES */ -/* 4 : ADRESSE DE REFERENCE DU TABLEAU */ +/* ICORE : TABLE OF EXISTING ALLOCATIONS, EACH HAVING : */ +/* 1 : LEVEL OF PROTECTION (0=NOT PROTECTED, OTHER=PROTECTED) */ +/* (PROTECTED MEANS NOT DESTROYED BY CRRSET .) */ +/* 2 : UNIT OF ALLOCATION */ +/* 3 : NB OF ALLOCATED UNITS */ +/* 4 : REFERENCE ADDRESS OF THE TABLE */ /* 5 : IOFSET */ -/* 6 : NUMERO ALLOCATION STATIQUE */ -/* 7 : Taille demandee en allocation */ -/* 8 : adresse du debut de l'allocation */ -/* 9 : Taille de la ZONE UTILISATEUR */ -/* 10 : ADRESSE DU FLAG DE DEBUT */ -/* 11 : ADRESSE DU FLAG DE FIN */ -/* 12 : Rang de creation de l'allocation */ - -/* NDIMCR : NBRE DE DONNEES DE CHAQUE ALLOC DANS ICORE */ -/* NCORE : NBRE D'ALLOCS EN COURS */ -/* LPROT : COMMUNICATION ENTRE CRPROT ET MCRRQST, REMIS A 0 PAR MCRRQST -*/ -/* FLAG : VALEUR DU FLAG UTILISE POUR LES DEBORDEMENTS */ +/* 6 : STATIC ALLOCATION NUMBER */ +/* 7 : Required allocation size */ +/* 8 : address of the beginning of allocation */ +/* 9 : Size of the USER ZONE */ +/* 10 : ADDRESS of the START FLAG */ +/* 11 : ADDRESS of the END FLAG */ +/* 12 : Rank of creation of the allocation */ + +/* NDIMCR : NB OF DATA OF EACH ALLOC IN ICORE */ +/* NCORE : NB OF CURRENT ALLOCS */ +/* LPROT : COMMUNICATION BETWEEN CRPROT AND MCRRQST, SET TO 0 BY MCRRQST */ +/* FLAG : VALUE OF THE FLAG USED FOR EXCESSES */ + /* ----------------------------------------------------------------------* */ +/* 20-10-86 : BF ; INITIAL VERSION */ -/* 20-10-86 : BF ; VERSION D'ORIGINE */ - +/* NRQST : NUMBER OF ALLOCATIONS */ +/* NDELT : NUMBER OF LIBERATIONS */ +/* NBYTE : TOTAL NUMBER OF OCTETS OF ALLOCATIONS */ +/* MBYTE : MAX NUMBER OF OCTETS */ -/* NRQST : NOMBRE D'ALLOCATIONS EFFECTUEES */ -/* NDELT : NOMBRE DE LIBERATIONS EFFECTUEES */ -/* NBYTE : NOMBRE TOTAL D'OCTETS DES ALLOCATIONS */ -/* MBYTE : NOMBRE MAXI D'OCTETS */ /* ----------------------------------------------------------------------* */ @@ -3228,24 +2896,24 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, goto L9002; } -/* Calcul de la taille demandee par l'utilsateur */ +/* Calculate the size required by the user */ ibyte = *iunit * *isize; -/* Recheche le type de version (Phase de Production ou Version Client) */ +/* Find the type of version (Phase of Production or Version Client) */ madbtbk_(&iver); -/* Controle sur la taille allouee en phase de Production */ +/* Control allocated size in Production phase */ if (iver == 1) { if (ibyte == 0) { //s__wsle(&io___3); - //do__lio(&c__9, &c__1, "Demande d'allocation nulle", 26L); + //do__lio(&c__9, &c__1, "Require zero allocation", 26L); AdvApp2Var_SysBase::e__wsle(); maostrb_(); } else if (ibyte >= 4096000) { //s__wsle(&io___4); - //do__lio(&c__9, &c__1, "Demande d'allocation superieure a 4 Mega-Octets : ", 50L); + //do__lio(&c__9, &c__1, "Require allocation above 4 Mega-Octets : ", 50L); //do__lio(&c__3, &c__1, (char *)&ibyte, (ftnlen)sizeof(integer)); AdvApp2Var_SysBase::e__wsle(); maostrb_(); @@ -3253,10 +2921,10 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, } -/* ON CALCUL LA TAILLE DE LA ZONE UTILSATEUR (IZU) */ -/* . ajout taille demandee par l'utilisateur (IBYTE) */ -/* . ajout d'un delta pour alignement avec la base */ -/* . on arrondit au multiple de 8 superieur */ +/* CALCULATE THE SIZE OF THE USER ZONE (IZU) */ +/* . add size required by the user (IBYTE) */ +/* . add delta for alinement with the base */ +/* . round to multiple of 8 above */ mcrlocv_((long int)&t[1], (long int *)&loc); izu = ibyte + loc % *iunit; @@ -3265,16 +2933,16 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, izu = izu + 8 - irest; } -/* ON CALCUL LA TAILLE QUI VA ETRE DEMANDEE A LA PRIMITIVE D'ALLOC */ -/* . ajout de la taille de la zone utilisateur */ -/* . ajout de 8 pour un alignement de l'adresse de debut */ -/* d'allocation sur un multiple de 8 de facon a pouvoir */ -/* poser des flags en Double Precision sans pb d'alignement */ -/* . ajout de 16 octets pour les deux flags */ +/* CALCULATE THE SIZE REQUIRED FROM THE PRIMITIVE OF ALLOC */ +/* . add size of the user zone */ +/* . add 8 for alinement of start address of */ +/* allocation on multiple of 8 so that to be able to */ +/* set flags with Double Precision without other pb than alignement */ +/* . add 16 octets for two flags */ ibyte = izu + 24; -/* DEMANDE D'ALLOCATION */ +/* DEMAND OF ALLOCATION */ isyst = 0; /* L1001: */ @@ -3296,30 +2964,30 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, } /* ENDIF */ -/* CALCUL DES ADRESSES DES FLAGS */ +/* CALCULATE THE ADDRESSES OF FLAGS */ iadfd = iaddr + 8 - iaddr % 8; iadff = iadfd + 8 + izu; -/* CALCUL DE L'OFFSET UTILISATEUR : */ -/* . difference entre l'adresse de depart utilisateur et */ -/* l'adresse de la base */ -/* . convertit cette difference dans l'unite utilisateur */ +/* CALCULATE USER OFFSET : */ +/* . difference between the user start address and the */ +/* base address */ +/* . converts this difference in the user unit */ lofset = iadfd + 8 + loc % *iunit - loc; *iofset = lofset / *iunit; -/* Si phase de production alors controle des flags */ +/* If phase of production control flags */ if (iver == 1) { macrchk_(); } -/* MISE EN PLACE DES FLAGS */ -/* . le premier flag est mis en IADFD et le second en IADFF */ -/* . Si phase de production alors on met a overflow la ZU */ +/* SET FLAGS */ +/* . the first flag is set by IADFD and the second by IADFF */ +/* . if phase of production, set to overflow the ZU */ macrgfl_(&iadfd, &iadff, &iver, &izu); -/* RANGEMENT DES PARAMETRES DANS MCRGENE */ +/* RANGING OF PARAMETERS IN MCRGENE */ ++mcrgene_.ncore; mcrgene_.icore[mcrgene_.ncore * 12 - 12] = mcrgene_.lprot; @@ -3337,11 +3005,11 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, mcrgene_.lprot = 0; -/* APPEL PERMETTANT UNE MISE EN PLACE AUTO DU SET WATCH PAR LE DEBUGGER */ +/* CALL ALLOWING AUTOIMPLEMENTATION OF THE SET WATCH BY THE DEBUGGER */ macrstw_((integer *)&iadfd, (integer *)&iadff, (integer *)&mcrgene_.ncore); -/* STATISTIQUES */ +/* STATISTICS */ ++mcrstac_.nrqst[ksys - 1]; mcrstac_.nbyte[ksys - 1] += mcrgene_.icore[mcrgene_.ncore * 12 - 11] * @@ -3354,9 +3022,9 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, /* ----------------------------------------------------------------------* */ -/* TRAITEMENT DES ERREURS */ +/* ERROR PROCESSING */ -/* NBRE MAXI D'ALLOC ATTEINT : */ +/* MAX NB OF ALLOC REACHED : */ L9001: *iercod = 1; ifmt = 1000; @@ -3365,7 +3033,7 @@ L9001: maostrd_(); goto L9900; -/* AURGUMENTS INCORRECTS */ +/* INCORRECT ARGUMENTS */ L9002: *iercod = 2; ifmt = *iunit; @@ -3373,7 +3041,7 @@ L9002: macrmsg_(subr, iercod, &ifmt, &dfmt, " ", 7L, 1L); goto L9900; -/* LE SYSTEME REFUSE L'ALLOCATION */ +/* SYSTEM REFUSES ALLOCATION */ L9003: *iercod = 3; ifmt = ibyte; @@ -3418,42 +3086,35 @@ int AdvApp2Var_SysBase::mgsomsg_(const char *,//nomprg, C C***************************************************************************** C -C FONCTION : CALL MIRAZ(LENGTH,ITAB) +C FUNCTION : CALL MIRAZ(LENGTH,ITAB) C ---------- C -C EFFECTUE UNE REMISE A ZERO D'UN TABLEAU DE LOGICAL OU D'INTEGER. +C RESET TO ZERO A TABLE OF LOGIC OR INTEGER. C -C MOTS CLES : +C KEYWORDS : C ----------- C RAZ INTEGER C -C ARGUMENTS D'ENTREE : +C INPUT ARGUMENTS : C ------------------ -C LENGTH : NOMBRE D'OCTETS A TRANSFERER -C ITAB : NOM DU TABLEAU +C LENGTH : NUMBER OF OCTETS TO TRANSFER +C ITAB : NAME OF THE TABLE C -C ARGUMENTS DE SORTIE : -C -------------------- -C ITAB : NOM DU TABLEAU REMIS A ZERO +C OUTPUT ARGUMENTS : +C ------------------- +C ITAB : NAME OF THE TABLE SET TO ZERO C -C COMMONS UTILISES : +C COMMONS USED : C ---------------- C -C REFERENCES APPELEES : -C ----------------------- +C REFERENCES CALLED : +C --------------------- C -C DEMSCRIPTION/REMARQUES/LIMITATIONS : +C DEMSCRIPTION/NOTES/LIMITATIONS : C ----------------------------------- C C Portable VAX-SGI -C -C$ HISTORIQUE DES MODIFICATIONS : -C -------------------------------- -C -C 05-04-93 : JMB ; portabilite VAX SGI -C 06-01-86 : FS,GFa; CREATION (ADAPTATION VAX) -CSGI_H 16-02-89 : FS ; Optimisation en C en utilisant memset -C + C> C*********************************************************************** */ @@ -3504,42 +3165,37 @@ int AdvApp2Var_SysBase::msifill_(integer *nbintg, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Effectue le transfert d'Integer d'une zone dans une autre */ +/* transfer Integer from one zone to another */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TRANSFERT , ENTIER , MEMOIRE */ +/* TRANSFER , INTEGER , MEMORY */ -/* ARGUMENTS D'ENTREE : */ +/* INPUT ARGUMENTS : */ /* ------------------ */ -/* NBINTG : Nombre d'entiers */ -/* IVECIN : vecteur d'entree */ +/* NBINTG : Nb of integers */ +/* IVECIN : Input vector */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* IVECOU : vecteur de sortie */ +/* IVECOU : Output vector */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ -/* ----------------------- */ +/* REFERENCES CALLED : */ +/* --------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 26-07-89 : PCR; Declaration en * pour transfert long. nulle */ -/* (trap sinon). */ -/* 17-10-88 : HK ; Ecriture version originale. */ /* > */ /* *********************************************************************** */ -/* ___ NOCTE : Nombre d'octets a transferer */ +/* ___ NOCTE : Number of octets to transfer */ /* Parameter adjustments */ --ivecou; @@ -3567,41 +3223,35 @@ int AdvApp2Var_SysBase::msrfill_(integer *nbreel, /* FONCTION : */ /* ---------- */ -/* Effectue le transfert de reel d'une zone dans une autre */ +/* Transfer real from one zone to another */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* TRANSFERT , REEL , MEMOIRE */ +/* TRANSFER , REAL , MEMORY */ -/* ARGUMENTS D'ENTREE : */ -/* ------------------ */ -/* NBREEL : Nombre de reels */ -/* VECENT : vecteur d'entree */ +/* INPUT ARGUMENTS : */ +/* ----------------- */ +/* NBREEL : Number of reals */ +/* VECENT : Input vector */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* VECSOR : vecteur de sortie */ +/* VECSOR : Output vector */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 26-07-89 : PCR; Declaration en * pour transfert long. nulle */ -/* (trap sinon). */ -/* 06-06-89 : HK ; Nettoyages. */ -/* 17-10-88 : HK ; Ecriture version originale */ /* > */ /* *********************************************************************** */ -/* ___ NOCTE : Nombre d'octets a transferer */ +/* ___ NOCTE : Nb of octets to transfer */ /* Parameter adjustments */ --vecsor; @@ -3628,34 +3278,32 @@ int AdvApp2Var_SysBase::mswrdbg_(const char *,//ctexte, /* *********************************************************************** */ -/* FONCTION : */ +/* FUNCTION : */ /* ---------- */ -/* Ecrit un message sur la console alpha si IBB>0 */ +/* Write message on console alpha if IBB>0 */ -/* MOTS CLES : */ +/* KEYWORDS : */ /* ----------- */ -/* MESSAGE,DEBUG */ +/* MESSAGE, DEBUG */ -/* ARGUMENTS D'ENTREE : */ -/* ------------------ */ -/* CTEXTE : Texte a ecrire */ +/* INPUT ARGUMENTS : */ +/* ----------------- */ +/* CTEXTE : Text to be written */ -/* ARGUMENTS DE SORTIE : */ +/* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* Neant */ +/* None */ -/* COMMONS UTILISES : */ +/* COMMONS USED : */ /* ---------------- */ -/* REFERENCES APPELEES : */ +/* REFERENCES CALLED : */ /* ----------------------- */ -/* DESCRIPTION/REMARQUES/LIMITATIONS : */ +/* DESCRIPTION/NOTES/LIMITATIONS : */ /* ----------------------------------- */ -/* $ HISTORIQUE DES MODIFICATIONS : */ -/* -------------------------------- */ -/* 21-11-90 : DHU; Mise au propre avant transfert a AC */ + /* > */ /* *********************************************************************** */ @@ -3666,7 +3314,7 @@ int AdvApp2Var_SysBase::mswrdbg_(const char *,//ctexte, /* *********************************************************************** */ -/* TRAITEMENT */ +/* PROCESSING */ /* *********************************************************************** */ @@ -3745,37 +3393,32 @@ int AdvApp2Var_SysBase::s__wsle () /* C***************************************************************************** C -C FONCTION : CALL MVRIRAZ(NBELT,DTAB) +C FUNCTION : CALL MVRIRAZ(NBELT,DTAB) C ---------- -C Effectue une remise a zero d'un tableau de DOUBLE PRECISION +C Reset to zero a table with DOUBLE PRECISION C -C MOTS CLES : +C KEYWORDS : C ----------- C MVRMIRAZ DOUBLE C -C ARGUMENTS D'ENTREE : +C INPUT ARGUMENTS : C ------------------ -C NBELT : Nombre d'elements du tableau -C DTAB : Tableau a initialiser a zero +C NBELT : Number of elements of the table +C DTAB : Table to initializer to zero C -C ARGUMENTS DE SORTIE : +C OUTPUT ARGUMENTS : C -------------------- -C DTAB : Tableau remis a zero +C DTAB : Table reset to zero C -C COMMONS UTILISES : +C COMMONS USED : C ---------------- C -C REFERENCES APPELEES : +C REFERENCES CALLED : C ----------------------- C -C DEMSCRIPTION/REMARQUES/LIMITATIONS : +C DEMSCRIPTION/NOTES/LIMITATIONS : C ----------------------------------- -C -C -C -C$ HISTORIQUE DES MODIFICATIONS : -C -------------------------------- -C 21-11-95 : JMF ; Creation a partir de miraz +C C C> C*********************************************************************** diff --git a/src/AppBlend/AppBlend_Debug.cxx b/src/AppBlend/AppBlend_Debug.cxx index 1025a93096..d6ae67d752 100755 --- a/src/AppBlend/AppBlend_Debug.cxx +++ b/src/AppBlend/AppBlend_Debug.cxx @@ -19,7 +19,7 @@ #endif /*__AppBlend_API*/ //**************************************************** -// Fonctions permettant de changer le type des approx. +// Functions to change the type of approx. //**************************************************** static Standard_Boolean AppBlend_ContextSplineApprox = Standard_False; diff --git a/src/AppDef/AppDef_MyLineTool.cxx b/src/AppDef/AppDef_MyLineTool.cxx index b35286e4f6..8f428113cc 100755 --- a/src/AppDef/AppDef_MyLineTool.cxx +++ b/src/AppDef/AppDef_MyLineTool.cxx @@ -1,6 +1,4 @@ // AppDef_MyLineTool.cxx -// 24-06-96 : JPI : implementation des methodes AppDef_MyLineTool::Curvature -// pour le lissage variationnel #include #include diff --git a/src/AppParCurves/AppParCurves_MultiCurve.cxx b/src/AppParCurves/AppParCurves_MultiCurve.cxx index 4c749e1afd..3a6e9be777 100755 --- a/src/AppParCurves/AppParCurves_MultiCurve.cxx +++ b/src/AppParCurves/AppParCurves_MultiCurve.cxx @@ -1,5 +1,5 @@ //File AppParCurves_MultiCurve.cxx -//Lpa, le 3/12/91 + #include #include diff --git a/src/AppParCurves/AppParCurves_MultiPoint.cxx b/src/AppParCurves/AppParCurves_MultiPoint.cxx index 2eae03d2c8..1d9024026e 100755 --- a/src/AppParCurves/AppParCurves_MultiPoint.cxx +++ b/src/AppParCurves/AppParCurves_MultiPoint.cxx @@ -1,5 +1,4 @@ //File AppParCurves_MultiPoint.cxx -//Lpa, le 3/12/91 #include diff --git a/src/Approx/Approx_SameParameter.cxx b/src/Approx/Approx_SameParameter.cxx index 2ff4c18980..fd1077595b 100755 --- a/src/Approx/Approx_SameParameter.cxx +++ b/src/Approx/Approx_SameParameter.cxx @@ -35,8 +35,7 @@ static Standard_Boolean AffichFw = Standard_False; static Standard_Integer NbCurve = 0; #endif // -// sert a tester si Extrema raconte pas des betises -// +// allows testing if Extrema produces correct results/ static void ProjectPointOnCurve(const Standard_Real InitValue, @@ -204,9 +203,9 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots, #ifdef DEB if (Voir) { cout< 0.8 * oldtol)); } @@ -359,9 +358,9 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) if(Continuity > GeomAbs_C1) Continuity = GeomAbs_C1; - //On controle les tangentes aux extremites pour savoir si le - //reparametrage est possible et on calcule les tangentes aux - //extremites de la fonction de changement de variable. + //Control tangents at the extremities to know if the + //reparametring is possible and calculate the tangents + //at the extremities of the function of change of variable. Standard_Real tangent[2]; gp_Pnt Pcons,Pc3d; gp_Vec Vcons,Vc3d; @@ -399,8 +398,8 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) if(dmax2 > besttol2) besttol2 = dmax2; - //On prend un multiple de l echantillon du CheckShape, - //au moins les points de controle seront bons. No comment!!! + //Take a multiple of the sample pof CheckShape, + //at least the control points will be correct. No comment!!! Standard_Integer NCONTROL = 22; #ifdef DEB @@ -409,8 +408,8 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) Standard_Boolean interpolok = 0; Standard_Real tolsov = 1.e200; - //On prend des parametres a pas constant sur la curve on surface - //et sur la courbe 3d. + //Take parameters with constant step on the curve on surface + //and on curve 3d. Standard_Real deltacons = lcons - fcons; deltacons /= (NCONTROL); Standard_Real deltac3d = lc3d - fc3d; @@ -530,10 +529,10 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) return; } - if(!extrok) { // Si pas deja SameP et tgte aux fraise, on abandonne. + if(!extrok) { // If not already SameP and tangent to mill, abandon. mySameParameter = Standard_False; #ifdef DEB - cout<<"SameParameter probleme : tangente nulle aux extremites"< besttol){ - cout<<"SameParameter : Tol non atteinte avant approx"<SectionShape(NbPolSect, NbKnotSect, udeg); Num2DSS = myFunc->Nb2dCurves(); tabUKnots = new (TColStd_HArray1OfReal) (1, NbKnotSect); @@ -87,11 +87,11 @@ void Approx_SweepApproximation::Perform(const Standard_Real First, myFunc->Knots(tabUKnots->ChangeArray1()); myFunc->Mults(tabUMults->ChangeArray1()); -// (2) Decompositition en sous espaces +// (2) Decompositition into sub-spaces Handle(TColStd_HArray1OfReal) OneDTol, TwoDTol, ThreeDTol; Num3DSS = NbPolSect; -// (2.1) Tolerance 3d et 1d +// (2.1) Tolerance 3d and 1d OneDTol = new (TColStd_HArray1OfReal) (1, Num3DSS); ThreeDTol = new (TColStd_HArray1OfReal) (1, Num3DSS); @@ -110,24 +110,24 @@ void Approx_SweepApproximation::Perform(const Standard_Real First, Translation.SetXYZ (myFunc->BarycentreOfSurf().XYZ()); for (ii=1; ii<=Num3DSS; ii++) { - Tol = ThreeDTol->Value(ii)/2; //Afin de respecter l'erreur sur le resultat final. + Tol = ThreeDTol->Value(ii)/2; // To take accout of the error on the final result. OneDTol->SetValue(ii, Tol * Wmin(ii) / Size); - Tol *= Wmin(ii); //Facteur de projection + Tol *= Wmin(ii); //Factor of projection ThreeDTol->SetValue(ii, Max(Tol, 1.e-20) ); } } else { Num1DSS = 0; } -// (2.2) Tolerance et Transformation 2d. +// (2.2) Tolerance and Transformation 2d. if (Num2DSS == 0) {TwoDTol.Nullify();} else { - // pour le 2d on definit une affinite a partir des resolutions, afin - // d'avoir une tolerance d'approximation homogene (u/v et 2d/3d) + // for 2d define affinity using resolutions, to + // avoid homogenuous tolerance of approximation (u/v and 2d/3d) Standard_Real res, tolu, tolv; TwoDTol = new (TColStd_HArray1OfReal) (1, Num2DSS); AAffin = new (Approx_HArray1OfGTrsf2d) (1, Num2DSS); - The3D2DTol= 0.9*BoundTol; // 10% de securite + The3D2DTol= 0.9*BoundTol; // 10% of security for (ii=1; ii<=Num2DSS; ii++) { myFunc->Resolution(ii, The3D2DTol, tolu, tolv); if ( tolu> tolv ) { @@ -159,7 +159,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First, myD2Poles2d = new (TColgp_HArray1OfVec2d)(1, Num2DSS); COnSurfErr = new (TColStd_HArray1OfReal)(1, Num2DSS); } -// Controle que myFunc->D2 est implemente +// Checks if myFunc->D2 is implemented if (continuity >= GeomAbs_C2) { Standard_Boolean B; B = myFunc->D2(First, First, Last, @@ -171,7 +171,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First, myD2Weigths->ChangeArray1()); if (!B) continuity = GeomAbs_C1; } -// Controle que myFunc->D1 est implemente +// Checks if myFunc->D1 is implemented if (continuity == GeomAbs_C1) { Standard_Boolean B; B = myFunc->D1(First, First, Last, @@ -181,14 +181,14 @@ void Approx_SweepApproximation::Perform(const Standard_Real First, if (!B) continuity = GeomAbs_C0; } -//Pour que F soit au moins 20 fois plus precise que son approx +// So that F was at least 20 times more exact than its approx myFunc->SetTolerance(Tol3dMin/20, Tol2d/20); Standard_Integer NbIntervalC2 = myFunc->NbIntervals(GeomAbs_C2); Standard_Integer NbIntervalC3 = myFunc->NbIntervals(GeomAbs_C3); if (NbIntervalC3 > 1) { -// (3.1) Approximation avec decoupe preferentiel +// (3.1) Approximation with preferential cut TColStd_Array1OfReal Param_de_decoupeC2 (1, NbIntervalC2+1); myFunc->Intervals(Param_de_decoupeC2, GeomAbs_C2); TColStd_Array1OfReal Param_de_decoupeC3 (1, NbIntervalC3+1); @@ -208,7 +208,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First, Preferentiel); } else { -// (3.2) Approximation sans decoupe preferentiel +// (3.2) Approximation without preferential cut AdvApprox_DichoCutting Dichotomie; Approx_SweepApproximation_Eval ev (*this); Approximation(OneDTol, TwoDTol, ThreeDTol, @@ -223,7 +223,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First, //======================================================================== //function : Approximation -//purpose : Appel F(t) et stocke les resultats +//purpose : Call F(t) and store the results //======================================================================== void Approx_SweepApproximation:: Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol, @@ -252,14 +252,13 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol, done = Approx.HasResult(); if (done) { - // --> Remplissage des Champs de la surface ---- + // --> Fill Champs of the surface ---- Standard_Integer ii, jj; vdeg = Approx.Degree(); - // Malheureusement Adv_Approx stock la transpose de - // ce que l'on souhaite, donc l'ecriture - // tabPoles = Approx.Poles() donnerait un resultat errone - // Il n'y a plus qu'a allouer et recopier termes a termes... + // Unfortunately Adv_Approx stores the transposition of the required + // so, writing tabPoles = Approx.Poles() will give an erroneous result + // It is only possible to allocate and recopy term by term... tabPoles = new (TColgp_HArray2OfPnt) (1, Num3DSS, 1, Approx.NbPoles()); tabWeights = new (TColStd_HArray2OfReal) @@ -272,7 +271,7 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol, for (jj=1; jj <=Approx.NbPoles() ; jj++) { P = Approx.Poles()->Value(jj,ii); wpoid = Approx.Poles1d()->Value(jj,ii); - P.ChangeCoord() /= wpoid; // Il faut diviser les poles par les poids + P.ChangeCoord() /= wpoid; // It is necessary to divide poles by weight P.Translate(Translation); tabPoles->SetValue (ii, jj, P); tabWeights->SetValue(ii, jj, wpoid ); @@ -288,13 +287,13 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol, } } - // ici cela va mieux + // this is better tabVKnots = Approx.Knots(); tabVMults = Approx.Multiplicities(); - // --> Remplissage des courbes 2d ---------- + // --> Filling of curves 2D ---------- if (Num2DSS>0) { gp_GTrsf2d TrsfInv; deg2d = vdeg; @@ -306,14 +305,14 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol, Handle(TColgp_HArray1OfPnt2d) P2d = new (TColgp_HArray1OfPnt2d) (1, Approx.NbPoles()); Approx.Poles2d( ii, P2d->ChangeArray1() ); - // On n'oublie pas d'appliquer l'homothetie inverse. + // do not forget to apply inverted homothety. for (jj=1; jj<=Approx.NbPoles(); jj++) { TrsfInv.Transforms(P2d->ChangeValue(jj).ChangeCoord()); } seqPoles2d.Append(P2d); } } - // ---> Remplissage des erreurs + // ---> Filling of errors MError3d = new (TColStd_HArray1OfReal) (1,Num3DSS); AError3d = new (TColStd_HArray1OfReal) (1,Num3DSS); for (ii=1; ii<=Num3DSS; ii++) { @@ -375,21 +374,20 @@ Standard_Boolean Approx_SweepApproximation::D0(const Standard_Real Param, Standard_Boolean Ok=Standard_True; Standard_Real * LocalResult = &Result; - // Gestion des Bornes + // Management of limits if ((first!=First) || (Last!=last)) { myFunc->SetInterval(First, Last); } if (! ( (Param==myParam) && (myOrder>=0) && (first==First) && (Last==last)) ) { - // Positionement dans le cas ou l'on ne repete pas - // la derniere operation + // Positioning in case when the last operation is not repeated. Ok = myFunc->D0(Param, First, Last, myPoles->ChangeArray1(), myPoles2d->ChangeArray1(), myWeigths->ChangeArray1()); - // On multiplie les poles3d par les poids apres tranlations. + // poles3d are multiplied by weight after tranlation. for (ii=1; ii<=Num1DSS; ii++) { myPoles->ChangeValue(ii).ChangeCoord() -= Translation.XYZ(); @@ -397,19 +395,19 @@ Standard_Boolean Approx_SweepApproximation::D0(const Standard_Real Param, *= myWeigths->Value(ii); } - // On applique la transformation aux poles 2d. + // The transformation is applied to poles 2d. for (ii=1; ii<=Num2DSS; ii++) { AAffin->Value(ii).Transforms(myPoles2d->ChangeValue(ii).ChangeCoord()); } - // Mise a jour des variable de controles et retour + // Update variables of controle and return first = First; last = Last; myOrder = 0; myParam = Param; } - // Extraction des resultats + // Extraction of results index = 0; for (ii=1; ii<=Num1DSS; ii++) { LocalResult[index] = myWeigths->Value(ii); @@ -448,7 +446,7 @@ Standard_Boolean Approx_SweepApproximation::D1(const Standard_Real Param, if (! ( (Param==myParam) && (myOrder>=1) && (first==First) && (Last==last)) ){ - // Positionement + // Positioning Ok = myFunc->D1(Param, First, Last, myPoles->ChangeArray1(), myDPoles->ChangeArray1(), @@ -457,22 +455,22 @@ Standard_Boolean Approx_SweepApproximation::D1(const Standard_Real Param, myWeigths->ChangeArray1(), myDWeigths->ChangeArray1()); - // On tient compte de la multiplication des poles3d par les poids. - // et de la translation. + // Take into account the multiplication of poles3d by weights. + // and the translation. for ( ii=1; ii<=Num1DSS; ii++) { - //Translation sur la section + //Translation on the section myPoles->ChangeValue(ii).ChangeCoord() -= Translation.XYZ(); - // Homothetie sur tout + // Homothety on all. myDPoles->ChangeValue(ii) *= myWeigths->Value(ii); Vaux.SetXYZ( myPoles->Value(ii).Coord()); myDPoles->ChangeValue(ii) += myDWeigths->Value(ii)*Vaux; myPoles->ChangeValue(ii).ChangeCoord() - *= myWeigths->Value(ii); // Pour le cache + *= myWeigths->Value(ii); // for the cash } - // On applique les transformation 2d aux vecteurs idoines + // Apply transformation 2d to suitable vectors for (ii=1; ii<=Num2DSS; ii++) { Vcoord = myDPoles2d->Value(ii).XY(); AAffin->Value(ii).Transforms(Vcoord); @@ -480,14 +478,14 @@ Standard_Boolean Approx_SweepApproximation::D1(const Standard_Real Param, AAffin->Value(ii).Transforms(myPoles2d->ChangeValue(ii).ChangeCoord()); } - // Mise a jour des variable de controles et retour + // Update control variables and return first = First; last = Last; myOrder = 1; myParam = Param; } - // Extraction des resultats + // Extraction of results index = 0; for (ii=1; ii<=Num1DSS; ii++) { LocalResult[index] = myDWeigths->Value(ii); @@ -517,15 +515,14 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param, Standard_Boolean Ok=Standard_True; Standard_Real * LocalResult = &Result; - // Gestion des Bornes + // management of limits if ((first!=First) || (Last!=last)) { myFunc->SetInterval(First, Last); } if (! ( (Param==myParam) && (myOrder>=2) && (first==First) && (Last==last)) ) { - // Positionement dans le cas ou l'on ne repete pas - // la derniere operation + // Positioning in case when the last operation is not repeated Ok = myFunc->D2(Param, First, Last, myPoles->ChangeArray1(), myDPoles->ChangeArray1(), @@ -537,20 +534,20 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param, myDWeigths->ChangeArray1(), myD2Weigths->ChangeArray1()); - // On multiplie les poles3d par les poids apres tranlations. + // Multiply poles3d by the weight after tranlations. for (ii=1; ii<=Num1DSS; ii++) { - // D'abord on translate + // First translate myPoles->ChangeValue(ii).ChangeCoord() -= Translation.XYZ(); - //On calcul la derive seconde + //Calculate the second derivative myD2Poles->ChangeValue(ii) *= myWeigths->Value(ii); Vaux.SetXYZ( myDPoles->Value(ii).XYZ()); myD2Poles->ChangeValue(ii) += (2*myDWeigths->Value(ii))*Vaux; Vaux.SetXYZ( myPoles->Value(ii).Coord()); myD2Poles->ChangeValue(ii) += myD2Weigths->Value(ii)*Vaux; - //Puis le reste pour le cache + //Then the remainder for the cash myDPoles->ChangeValue(ii) *= myWeigths->Value(ii); Vaux.SetXYZ( myPoles->Value(ii).Coord()); myDPoles->ChangeValue(ii) += myDWeigths->Value(ii)*Vaux; @@ -558,7 +555,7 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param, *= myWeigths->Value(ii); } - // On applique la transformation aux poles 2d. + // Apply transformation to poles 2d. for (ii=1; ii<=Num2DSS; ii++) { Vcoord = myD2Poles2d->Value(ii).XY(); AAffin->Value(ii).Transforms(Vcoord); @@ -569,14 +566,14 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param, AAffin->Value(ii).Transforms(myPoles2d->ChangeValue(ii).ChangeCoord()); } - // Mise a jour des variable de controles et retour + // Update variables of control and return first = First; last = Last; myOrder = 2; myParam = Param; } - // Extraction des resultats + // Extraction of results index = 0; for (ii=1; ii<=Num1DSS; ii++) { LocalResult[index] = myD2Weigths->Value(ii); diff --git a/src/Aspect/Aspect_AspectFillArea.cxx b/src/Aspect/Aspect_AspectFillArea.cxx index 72041a0f4e..2663336290 100755 --- a/src/Aspect/Aspect_AspectFillArea.cxx +++ b/src/Aspect/Aspect_AspectFillArea.cxx @@ -8,13 +8,13 @@ //-Version -//-Design Declaration des variables specifiques au contexte -// de trace des facettes +//-Design Declaration of variables specific to the context +// of tracing facets -//-Warning Un contexte de trace de facette est defini par : -// - le style de l'interieur de la facette -// - le style du bord de la facette -// - la couleur +//-Warning Context of tracing facets id defined by: +// - the style of the interior of the facet +// - the style of the border of the facet +// - the color //-References @@ -29,16 +29,16 @@ //-Global data definitions -// -- l'interieur +// -- interior // MyInteriorStyle : InteriorStyle; // MyInteriorColor : Color; -// -- le bord +// -- border // MyEdgeColor : Color; // MyEdgeType : TypeOfLine; // MyEdgeWidth : Standard_Real; -// -- les hachures +// -- shading // MyHatchStyle : HatchStyle; diff --git a/src/Aspect/Aspect_AspectLine.cxx b/src/Aspect/Aspect_AspectLine.cxx index ce8c57bb4d..64b20b0164 100755 --- a/src/Aspect/Aspect_AspectLine.cxx +++ b/src/Aspect/Aspect_AspectLine.cxx @@ -7,13 +7,13 @@ //-Version -//-Design Declaration des variables specifiques au contexte -// de trace de lignes +//-Design Declaration of variables specific to the context +// of line tracing -//-Warning Un contexte de trace de ligne est defini par : -// - la couleur -// - le type de trait -// - l'epaisseur +//-Warning A context of line tracing is defined by : +// - the color +// - the type of line +// - the thickness //-References @@ -28,13 +28,13 @@ //-Global data definitions -// -- la couleur +// -- color // MyColor : Color; -// -- le type de trait +// -- type of line // MyType : TypeOfLine; -// -- l'epaisseur +// -- thickness // MyWidth : Standard_Real; //-Constructors diff --git a/src/Aspect/Aspect_AspectMarker.cxx b/src/Aspect/Aspect_AspectMarker.cxx index b38ab5c9af..9ea3ca473b 100755 --- a/src/Aspect/Aspect_AspectMarker.cxx +++ b/src/Aspect/Aspect_AspectMarker.cxx @@ -7,13 +7,13 @@ //-Version -//-Design Declaration des variables specifiques au contexte -// de trace de markers +//-Design Declaration of variables specific to the context +// of tracing of markers -//-Warning Un contexte de trace de marker est defini par : -// - la couleur -// - le type -// - l'echelle +//-Warning Context of tracing of markers is defined by : +// - the color +// - the type +// - the scale //-References @@ -28,13 +28,13 @@ //-Global data definitions -// -- la couleur +// -- color // MyColor : Color; -// -- le type +// -- type // MyType : TypeOfMarker; -// -- l'echelle +// -- scale // MyScale : Standard_Real; //-Constructors diff --git a/src/Aspect/Aspect_Driver.cxx b/src/Aspect/Aspect_Driver.cxx index 46597e435b..1863c2337f 100755 --- a/src/Aspect/Aspect_Driver.cxx +++ b/src/Aspect/Aspect_Driver.cxx @@ -1,10 +1,10 @@ /*********************************************************************** - FONCTION : + FUNCTION : ---------- - Classe Aspect_Driver : + Class Aspect_Driver : - HISTORIQUE DES MODIFICATIONS : + HISTORY OF MODIFICATIONS : -------------------------------- 14-05-98 : GG ; Disable using MFT when the symbol @@ -12,13 +12,13 @@ See dirMFTisDefined changes. 30-01-98 : GG ; SPEC_MFT - L'utilisation des polices MFT devient parametrable. - Le driver doit utiliser la methode UseMFT() pour - savoir s'il doit utiliser ou non les polices - MDTV a la place des polices system. + Use of polices MFT becomes parameterized. + The driver should use method UseMFT() to + know if it is necessary or not to use MDTV policies + instead of system policies. - -> Modifications dans SetFontMap() - -> Nouvelle methode UseMFT() + -> Modifications in SetFontMap() + -> New method UseMFT() ***********************************************************************/ diff --git a/src/BRep/BRep_Tool.cxx b/src/BRep/BRep_Tool.cxx index f5f3f0a166..ce3375eb4d 100755 --- a/src/BRep/BRep_Tool.cxx +++ b/src/BRep/BRep_Tool.cxx @@ -314,7 +314,7 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E, TopLoc_Location LC; - Standard_Real f, l;// pour les malins qui appellent avec (u,u). + Standard_Real f, l;// for those who call with (u,u). Handle(Geom_Curve) C3d = BRep_Tool::Curve(E,/*LC,*/f,l); // transforming plane instead of curve // we can loose scale factor of Curve transformation (eap 13 May 2002) @@ -418,9 +418,9 @@ void BRep_Tool::CurveOnSurface(const TopoDS_Edge& E, if (i > Index) break; if (i == Index) { // JMB le 21 Mai 1999 - // on fait comme dans les autres methodes CurveOnSurface. c.a.d on tient - // compte de l'orientation dans le cas des aretes de coutures (renvoi de PCurve2) - // sinon on risque de louper des curves ou de ne pas obtenir la bonne. + // it is done as in the other CurveOnSurface methods, ie. take into account + // the orientation in case of cut edges (return PCurve2) + // otherwise there is a risk to loop curves or to not get the prover one. if (GC->IsCurveOnClosedSurface() && Eisreversed) C = GC->PCurve2(); else @@ -1372,7 +1372,7 @@ gp_Pnt2d BRep_Tool::Parameters(const TopoDS_Vertex& V, L = L.Predivided(V.Location()); BRep_ListIteratorOfListOfPointRepresentation itpr ((*((Handle(BRep_TVertex)*) &V.TShape()))->Points()); - // On regarde dabord si il y des PointRepresentation (cas non Manifold) + // It is checked if there is PointRepresentation (case non Manifold) while (itpr.More()) { if (itpr.Value()->IsPointOnSurface(S,L)) { @@ -1384,8 +1384,8 @@ gp_Pnt2d BRep_Tool::Parameters(const TopoDS_Vertex& V, TopoDS_Vertex Vf,Vl; TopoDS_Edge E; - // Sinon on explore les aretes (PMN 4/06/97) On ne peut pas faire un raise 999/1000! - // meme si souvent il y a moyen de faire plus economique au dessus... + // Otherwise the edges are searched (PMN 4/06/97) It is not possible to succeed 999/1000! + // even if often there is a way to make more economically than above... TopExp_Explorer exp; for (exp.Init(F, TopAbs_EDGE); exp.More(); exp.Next()) { E = TopoDS::Edge(exp.Current()); @@ -1394,7 +1394,7 @@ gp_Pnt2d BRep_Tool::Parameters(const TopoDS_Vertex& V, gp_Pnt2d Pf, Pl; UVPoints(E, F, Pf, Pl); if (V.IsSame(Vf)) return Pf; - else return Pl;//Ambiguite (naturelle) pour les edges degenerees. + else return Pl;//Ambiguity (natural) for degenerated edges. } } Standard_NoSuchObject::Raise("BRep_Tool:: no parameters on surface"); diff --git a/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx b/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx index bd358ed825..46181422fb 100755 --- a/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx +++ b/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx @@ -73,8 +73,7 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& W, } } - Forward = Standard_True; // Defaut ; Les Edge Reverse seront parcourue - // a rebourt. + Forward = Standard_True; // Defaut ; The Reverse Edges are parsed. if((NbEdge > 2) || ((NbEdge==2) && (!myWire.Closed())) ) { TopAbs_Orientation Or = myCurves->Value(1).Edge().Orientation(); Standard_Boolean B; @@ -83,11 +82,11 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& W, myCurves->Value(2).Edge(), VI); VL = TopExp::LastVertex(myCurves->Value(1).Edge()); - if (VI.IsSame(VL)) { // On Garde toujours le sens de parcout + if (VI.IsSame(VL)) { // The direction of parsing is always preserved if (Or == TopAbs_REVERSED) Forward = Standard_False; } - else {// On renverse toujours le sens de parcout + else {// The direction of parsing is always reversed if (Or != TopAbs_REVERSED) Forward = Standard_False; } @@ -115,14 +114,14 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& W, TLast = Last; PTol = Tol; - // Trim des courbes extremes. + // Trim the extremal curves. Handle (BRepAdaptor_HCurve) HC; Standard_Integer i1, i2; Standard_Real f=TFirst, l=TLast, d; i1 = i2 = CurIndex; Prepare(f, d, i1); Prepare(l, d, i2); - CurIndex = (i1+i2)/2; // Petite optimisation + CurIndex = (i1+i2)/2; // Small optimization if (i1==i2) { if (l > f) HC = Handle(BRepAdaptor_HCurve)::DownCast(myCurves->Value(i1).Trim(f, l, PTol)); @@ -207,14 +206,14 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const Standard_Integer ii, jj, kk, n; Standard_Real f, F, delta; - // Premiere courbe (sens de parcourt de le edge) + // First curve (direction of parsing of the edge) n = myCurves->ChangeValue(1).NbIntervals(S); Handle(TColStd_HArray1OfReal) Ti = new (TColStd_HArray1OfReal) (1, n+1); myCurves->ChangeValue(1).Intervals(Ti->ChangeArray1(), S); InvPrepare(1, f, delta); F = myKnots->Value(1); if (delta < 0) { - //sens de parcourt inverser + // invert the direction of parsing for (kk=1,jj=Ti->Length(); jj>0; kk++, jj--) T(kk) = F + (Ti->Value(jj)-f)*delta; } @@ -223,7 +222,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const T(kk) = F + (Ti->Value(kk)-f)*delta; } - // et les suivante + // and the next for (ii=2; ii<=myCurves->Length(); ii++) { n = myCurves->ChangeValue(ii).NbIntervals(S); if (n != Ti->Length()-1) Ti = new (TColStd_HArray1OfReal) (1, n+1); @@ -231,7 +230,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const InvPrepare(ii, f, delta); F = myKnots->Value(ii); if (delta < 0) { - //sens de parcourt inverser + // invert the direction of parcing for (jj=Ti->Length()-1; jj>0; kk++, jj--) T(kk) = F + (Ti->Value(jj)-f)*delta; } @@ -346,7 +345,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const GeomAbs_CurveType BRepAdaptor_CompCurve::GetType() const { - return GeomAbs_OtherCurve; //temporaire + return GeomAbs_OtherCurve; //temporary // if ( myCurves->Length() > 1) return GeomAbs_OtherCurve; // return myCurves->Value(1).GetType(); } @@ -409,10 +408,10 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const //======================================================================= //function : Prepare //purpose : -// Lorsque le parametre est pres de un "noeud" on determine la loi en -// fonction du signe de tol: -// - negatif -> Loi precedente au noeud. -// - positif -> Loi consecutive au noeud. +// When the parameter is close to "node" the rule is determined +// depending on the sign of tol: +// - negative -> Rule preceding to the node. +// - positive -> Rule following after the node. //======================================================================= void BRepAdaptor_CompCurve::Prepare(Standard_Real& W, @@ -425,7 +424,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const else { Eps = -PTol;} - Wtest = W+Eps; //Decalage pour discriminer les noeuds + Wtest = W+Eps; //Offset to discriminate the nodes if(Periodic){ Wtest = ElCLib::InPeriod(Wtest, 0, @@ -433,7 +432,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const W = Wtest-Eps; } - // Recheche de le index + // Find the index Standard_Boolean Trouve = Standard_False; if (myKnots->Value(CurIndex) > Wtest) { for (ii=CurIndex-1; ii>0 && !Trouve; ii--) @@ -441,7 +440,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const CurIndex = ii; Trouve = Standard_True; } - if (!Trouve) CurIndex = 1; // En dehors des bornes ... + if (!Trouve) CurIndex = 1; // Out of limits... } else if (myKnots->Value(CurIndex+1) <= Wtest) { @@ -450,17 +449,17 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const CurIndex = ii; Trouve = Standard_True; } - if (!Trouve) CurIndex = myCurves->Length(); // En dehors des bornes ... + if (!Trouve) CurIndex = myCurves->Length(); // Out of limits... } - // Reverse ? + // Invert ? const TopoDS_Edge& E = myCurves->Value(CurIndex).Edge(); TopAbs_Orientation Or = E.Orientation(); Standard_Boolean Reverse; Reverse = (Forward && (Or == TopAbs_REVERSED)) || (!Forward && (Or != TopAbs_REVERSED)); - // Calcul du parametre local + // Calculate the local parameter BRep_Tool::Range(E, f, l); Delta = myKnots->Value(CurIndex+1) - myKnots->Value(CurIndex); if (Delta > PTol*1.e-9) Delta = (l-f)/Delta; @@ -478,15 +477,15 @@ void BRepAdaptor_CompCurve::InvPrepare(const Standard_Integer index, Standard_Real& First, Standard_Real& Delta) const { - // Reverse ? + // Invert? const TopoDS_Edge& E = myCurves->Value(index).Edge(); TopAbs_Orientation Or = E.Orientation(); Standard_Boolean Reverse; Reverse = (Forward && (Or == TopAbs_REVERSED)) || (!Forward && (Or != TopAbs_REVERSED)); - // Calcul des parametres de reparametrisation - // tel que : T = Ti + (t-First)*Delta + // Calculate the parameters of reparametrisation + // such as : T = Ti + (t-First)*Delta Standard_Real f, l; BRep_Tool::Range(E, f, l); Delta = myKnots->Value(index+1) - myKnots->Value(index); diff --git a/src/BRepAlgo/BRepAlgo_1.cxx b/src/BRepAlgo/BRepAlgo_1.cxx index 99a94a977c..164b70a8aa 100755 --- a/src/BRepAlgo/BRepAlgo_1.cxx +++ b/src/BRepAlgo/BRepAlgo_1.cxx @@ -86,14 +86,14 @@ BRepCheck_Analyzer ana(toCheck, Standard_True); if (!ana.IsValid()) { -// On verifie que le probleme ne soit pas juste BRepCheck_InvalidSameParameterFlag +// Check if the problem is not just BRepCheck_InvalidSameParameterFlag BRepCheck_ListIteratorOfListOfStatus itl; BRepCheck_Status sta; for (tEx.Init(toCheck, TopAbs_FACE); tEx.More(); tEx.Next()) { if (!ana.Result(tEx.Current()).IsNull()) { for (itl.Initialize(ana.Result(tEx.Current())->Status()); itl.More(); itl.Next()) { sta=itl.Value(); -// Si une face est en erreur +// If a face is incorrect if (sta != BRepCheck_NoError) { BRepCheck_ListIteratorOfListOfStatus ilt; TopExp_Explorer exp; @@ -103,7 +103,7 @@ if (res->ContextualShape().IsSame(tEx.Current())) { for (ilt.Initialize(res->StatusOnShape()); ilt.More(); ilt.Next()) { sta=ilt.Value(); -// Si une edge est BRepCheck_InvalidSameParameterFlag ou BRepCheck_InvalidSameRangeFlag on force +// If an edge is BRepCheck_InvalidSameParameterFlag or BRepCheck_InvalidSameRangeFlag, it is forced if (sta == BRepCheck_InvalidSameParameterFlag || sta == BRepCheck_InvalidSameRangeFlag) { bB.SameRange(TopoDS::Edge(exp.Current()), Standard_False); @@ -121,7 +121,7 @@ } } } -// On refait un controle (il pourrait y avoir un probleme d'un autre type ou non rectifiable. +// Remake control (there can be a problem of another type orb the one that cannot be corrected ana.Init(toCheck, Standard_True); if (!ana.IsValid()) return Standard_False; } @@ -151,10 +151,6 @@ { // -// pour permettre a Moliner de travailler jusqu'au 18/10/96 le temps que -// l'on trouve une solution reflechie au probleme de performance de BRepCheck -// -//POP ON n'utilise plus la varaible d'environnement // if (getenv("DONT_SWITCH_IS_VALID") != NULL) { // return Standard_True ; // } diff --git a/src/BRepAlgo/BRepAlgo_BooleanOperation.cxx b/src/BRepAlgo/BRepAlgo_BooleanOperation.cxx index a254686eee..b1e2aaff7e 100755 --- a/src/BRepAlgo/BRepAlgo_BooleanOperation.cxx +++ b/src/BRepAlgo/BRepAlgo_BooleanOperation.cxx @@ -21,7 +21,7 @@ #include #include -// couture +// sewing #include #include #include @@ -127,8 +127,8 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx } DSFiller.Insert(myS1,myS2,HDS); - // 020499 : JYL : rejet si il existe une arete de la SD - // codee non sameparameter et non degeneree + // 020499 : JYL : reject if there is an edge of the SD + // not coded sameparameter and not degenerated Standard_Boolean esp = HDS->EdgesSameParameter(); Standard_Boolean tede = Standard_True; if (!esp) { @@ -204,10 +204,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx #if MODIF //====================================================================== - //== Exploration des shapes en entree - //== Creation de la liste des solides - //== Creation de la liste des faces HORS solide - //== Creation de la liste des edges HORS face + //== Exploration of input shapes + //== Creation of the list of solids + //== Creation of the list of faces OUT OF solid + //== Creation of the list of edges OUT OF face Standard_Integer nbs1,nbs2,nbf1,nbf2,nbe1,nbe2,nbv1,nbv2; TopTools_ListOfShape Solids1,Solids2,Faces1,Faces2,Edges1,Edges2,Vertex1,Vertex2; @@ -218,21 +218,21 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx for(Ex.Init(myS2,TopAbs_SOLID),nbs2=0; Ex.More(); Ex.Next()) { Solids2.Append(Ex.Current()); nbs2++; } - //== Les faces non ds un solide + //== Faces not in a solid for(Ex.Init(myS1,TopAbs_FACE,TopAbs_SOLID),nbf1=0; Ex.More(); Ex.Next()) { Faces1.Append(Ex.Current()); nbf1++; } for(Ex.Init(myS2,TopAbs_FACE,TopAbs_SOLID),nbf2=0; Ex.More(); Ex.Next()) { Faces2.Append(Ex.Current()); nbf2++; } - //== Les Edges non ds un solide + //== Edges not in a solid for(Ex.Init(myS1,TopAbs_EDGE,TopAbs_FACE),nbe1=0; Ex.More(); Ex.Next()) { Edges1.Append(Ex.Current()); nbe1++; } for(Ex.Init(myS2,TopAbs_EDGE,TopAbs_FACE),nbe2=0; Ex.More(); Ex.Next()) { Edges2.Append(Ex.Current()); nbe2++; } - //== Les Vertex non ds un edge + //== Vertices not in an edge for(Ex.Init(myS1,TopAbs_VERTEX,TopAbs_EDGE),nbv1=0; Ex.More(); Ex.Next()) { Vertex1.Append(Ex.Current()); nbv1++; } @@ -245,10 +245,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx //== - //== Rejet des orerations sans sens + //== Reject operations without direction - //-- Coupe Solide par Edge + //-- Cut Solid by Edge // Standard_Boolean Correct = Standard_True; if( (nbs1 && nbs2==0 && St1==TopAbs_OUT && St2==TopAbs_IN) || (nbs2 && nbs1==0 && St2==TopAbs_OUT && St1==TopAbs_IN)) { @@ -302,10 +302,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx BB.Add(myShape,LV); } else { - //-- On classifie : + //-- Classify : Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape); } - //-- Fin Classification + //-- End Classification } } } // nbf1 @@ -326,10 +326,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx BB.Add(myShape,LV); } else { - //-- On classifie : + //-- Classify : Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape); } - //-- Fin Classification + //-- End Classification } } } // nbf2 @@ -371,10 +371,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx BB.Add(myShape,LV); } else { - //-- On classifie : + //-- Classify : Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape); } - //-- Fin Classification + //-- End Classification } } } @@ -411,10 +411,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx BB.Add(myShape,LV); } else { - //-- On classifie : + //-- Classify : Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape); } - //-- Fin Classification + //-- End Classification } } } @@ -440,10 +440,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx BB.Add(myShape,LV); } else { - //-- On classifie : + //-- Classify : Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape); } - //-- Fin Classification + //-- End Classification } } } @@ -465,16 +465,16 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx BB.Add(myShape,LV); } else { - //-- On classifie : + //-- Classify : Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape); } - //-- Fin Classification + //-- End Classification } } } //---------------------------------------------------------------------- - //-- V1:Vertex1 state1 = OUT -> On garde V1 si V1 est Out Tous les S2 - //-- V1:Vertex1 state1 = IN -> On garde V1 si V1 est In un des S2 + //-- V1:Vertex1 state1 = OUT -> Preserve V1 if V1 is Out all S2 + //-- V1:Vertex1 state1 = IN -> Preserve V1 if V1 is In one of S2 if(nbv1 && nbs2) { if(St1 == TopAbs_IN) { for(LIter.Initialize(Vertex1);LIter.More();LIter.Next()) { @@ -610,10 +610,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx TopExp_Explorer ex; ex.Init(myShape,TopAbs_FACE); for (; ex.More(); ex.Next()) myMap.Add(ex.Current()); - ex.Init(myShape,TopAbs_EDGE); // pour le FRIKO + ex.Init(myShape,TopAbs_EDGE); // for FRIKO for (; ex.More(); ex.Next()) myMap.Add(ex.Current()); - // Verification same parameter des nouvelles edges de section + // Checking same parameter of new edges of section Standard_Real eTol,cTol; for (myHBuilder->InitSection(1); myHBuilder->MoreSection(); @@ -628,8 +628,8 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx for (ex.Init(cur, TopAbs_VERTEX); ex.More(); ex.Next()) { eTol = BRep_Tool::Tolerance(TopoDS::Vertex(ex.Current())); if (eTolGetDSCurveFromSectEdge(Edge); if (!iC) { #if DEB - cout << "Warning DSAccess:Modifs d'une Edge non implemente" << endl; + cout << "Warning DSAccess: Modifications of Edge are not implemented" << endl; #endif } else { - // Complement on the interferences Curve/Face + // Complete the interferences Curve/Face Standard_Integer iF; Handle(TopOpeBRepDS_Interference) interf; @@ -573,7 +573,7 @@ void BRepAlgo_DSAccess::ChangeEdgeSet } - // Netoyage + // Cleaning Suppress(C, New); // Is it necessary to invert the Interferences "Edge on Fa" @@ -639,7 +639,7 @@ void BRepAlgo_DSAccess::Suppress(const TopoDS_Shape& C, // during the parsing the Edges which come from Edge are found // (= MapOfInteger : ESE) - // En premier, les interferences de support 1d. + // First, the interferences of support 1d. TopExp_Explorer exp(C, TopAbs_EDGE); for(; exp.More(); exp.Next()) { const TopoDS_Shape& SectEdge = exp.Current(); @@ -855,7 +855,7 @@ const TopoDS_Shape& BRepAlgo_DSAccess::Propagate // myHB->MergeShapes(myS1,t1,myS2,t2); - //POP pour NT; + //POP for NT; static TopoDS_Shape bid; return bid; } @@ -951,9 +951,9 @@ const TopTools_ListOfShape& BRepAlgo_DSAccess::Modified (const TopoDS_Shape& Sha BRepAlgo_CheckStatus BRepAlgo_DSAccess::Check() { // TopOpeBRepDS_Check Ck(HDS); - // to be precised : in Ck, there is a possibility to know - // exactly the n*n of shapes/points/curves/surfaces, - // which are not correct in the DS. +// to be precised : in Ck, there is a possibility to know +// exactly the n*n of shapes/points/curves/surfaces, +// which are not correct in the DS. // Standard_Boolean IsOK = Ck.ChkIntgSamDom() ; // IsOK = IsOK && Ck.OneVertexOnPnt(); // IsOK = IsOK && Ck.ChkIntg(); @@ -975,7 +975,7 @@ BRepAlgo_CheckStatus BRepAlgo_DSAccess::Check() // // if iE1 and iE2 are Faces : // for each of faces F1 and F2, explode into Edges -// for each Edge : +// for each Edge : // remove the interferences of a SectEdge vertex // on geometry. If there is no other interferences attached to // these Edges, and if these Edges are not SameDomain, @@ -1063,8 +1063,8 @@ void BRepAlgo_DSAccess::RemoveEdgeInterferences //======================================================================= //function : RemoveEdgeInterferences //purpose : case of SectEdge coming from Curve -// for each of faces F1 and F2, explode into Edges -// for each Edge : +// for each of faces F1 and F2, explode into Edges +// for each Edge : // remove the interferences that have a vertex of SectEdge // as a geometry. If no other interferences are attached to // these Edges, and if the Edges are not SameDomain, @@ -1097,8 +1097,8 @@ void BRepAlgo_DSAccess::RemoveEdgeInterferences // DSEdge (= E1 or E2) : // a) if DSEdge is not SameDomain -> the edge is Removed // b) if among other interferences of DSEdge of -// GeomtryType == VERTEX, il n'en existe pas qui soient -// avec une Edge de DSFace(= F1 ou F2) +// GeomtryType == VERTEX, there is none +// with Edge of DSFace(= F1 or F2) // if DSFace has no more interferences and is not SameDomain, // make unkeep DSFace. //======================================================================= diff --git a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx index 2979313233..3e0bf63131 100755 --- a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx +++ b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx @@ -127,14 +127,14 @@ void BRepAlgo_FaceRestrictor::Perform() TopTools_ListIteratorOfListOfShape it(wires); //-------------------------------------------------------------------- - // recuperation la geometrie de la face de reference. + // return geometry of the reference face. //-------------------------------------------------------------------- TopLoc_Location L; const Handle(Geom_Surface)& S = BRep_Tool::Surface(myFace,L); //----------------------------------------------------------------------- - // test si les edges sont sur S. sinon ajout de S sur la premiere pcurve. - // ou projection de l edge sur F. + // test if edges are on S. otherwise add S to the first pcurve. + // or projection of the edge on F. //---------------------------------------------------------------------- TopExp_Explorer Exp; // BRep_Builder BB; @@ -143,7 +143,7 @@ void BRepAlgo_FaceRestrictor::Perform() TopOpeBRepBuild_WireToFace WTF; for ( ; it.More(); it.Next()) { - // mise a jour de la surface sur les edges. + // update the surface on edges. const TopoDS_Wire& W = TopoDS::Wire(it.Value()); for (Exp.Init(W,TopAbs_EDGE); Exp.More(); Exp.Next()) { @@ -152,13 +152,13 @@ void BRepAlgo_FaceRestrictor::Perform() Handle(Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E,S,L,f,l); if (C2.IsNull()) { - // pas de pcurve sur la surface de reference. + // no pcurve on the reference surface. if (modeProj) { - // Projection de la courbe 3d sur la surface. + // Projection of the 3D curve on surface. ProjCurve3d ( E, S, L); } else { - // recuperation de la premiere pcurve qui est colle sur + // return the first pcurve glued on Standard_Boolean YaPCurve = ChangePCurve (E, S, L); if (!YaPCurve) { ProjCurve3d (E, S, L); @@ -315,7 +315,7 @@ static void BuildFaceIn( TopoDS_Face& F, if (!KeyContains.IsBound(W) || KeyContains(W).IsEmpty()) return; - // Suppression de W dans les KeyIsIn. +// Removal of W in KeyIsIn. // for (TopTools_ListIteratorOfListOfShape it(KeyContains(W)); it.More(); it.Next()) { TopTools_ListIteratorOfListOfShape it; @@ -377,7 +377,7 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection() myDone = Standard_False; TopTools_ListIteratorOfListOfShape it(wires); //--------------------------------------------------------- - // Reorientation de tous les wires fermes matiere a gauche. + // Reorientation of all closed wires to the left. //--------------------------------------------------------- for (; it.More(); it.Next()) { TopoDS_Wire& W = TopoDS::Wire(it.Value()); @@ -395,7 +395,7 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection() } } //--------------------------------------------------------- - // Classification des wires les uns par rapport aux autres. + // Classification of wires ones compared to the others. //--------------------------------------------------------- Standard_Integer j,i = 1; @@ -442,7 +442,7 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection() B.Add (NewFace,W); faces.Append(NewFace); //-------------------------------------------- - // Construction d une face par wire exterieur. + // Construction of a face by exterior wire. //-------------------------------------------- BuildFaceIn(NewFace,W, keyContains, keyIsIn, TopAbs_FORWARD, faces); } diff --git a/src/BRepAlgo/BRepAlgo_Loop.cxx b/src/BRepAlgo/BRepAlgo_Loop.cxx index 02aac8c490..295cf2fcc6 100755 --- a/src/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/BRepAlgo/BRepAlgo_Loop.cxx @@ -69,7 +69,7 @@ void BRepAlgo_Loop::Init(const TopoDS_Face& F) //======================================================================= //function : Bubble -//purpose : Ordonne la sequence de vertex en parametre croissant. +//purpose : Orders the sequence of vertices by increasing parameter. //======================================================================= static void Bubble(const TopoDS_Edge& E, @@ -140,9 +140,9 @@ void BRepAlgo_Loop::AddConstEdges(const TopTools_ListOfShape& LE) //======================================================================= //function : UpdateClosedEdge -//purpose : Si le premier ou dernier vertex d intersection -// coincide avec le vertex de fermeture il est supprime de SV. -// il sera ajoute au debut et a la fin de SV par l appelant. +//purpose : If the first or the last vertex of intersection +// coincides with the closing vertex, it is removed from SV. +// it will be added at the beginning and the end of SV by the caller. //======================================================================= static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E, @@ -175,7 +175,7 @@ static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E, if (!VB[0].IsSame(VB[1])) { #ifdef DEB if (AffichLoop) - cout <<" Deux vertex different sur vertex de fermeture"< connexe a par le vertex dans -// la liste . est supprime de la liste. Si est -// aussi dans la liste avec la meme orientation, il est -// supprime de la liste. +//purpose : Find edge connected to by vertex in the +// list . is removed from the list. If is +// also in the list with the same orientation, it is +// removed from the list. //======================================================================= static Standard_Boolean SelectEdge(const TopoDS_Face& F, @@ -293,7 +293,7 @@ static Standard_Boolean SelectEdge(const TopoDS_Face& F, #ifdef DEB if (AffichLoop) { if ( LE.Extent() > 2) { - cout <<"vertex sur plus de 2 edges dans une face."< 1) { //-------------------------------------------------------------- - // Plusieurs edges possibles. - // - Test les edges differentes de CE , Selection de l edge - // pour lequel CV a les U,V les plus proches dans la face - // que ceux correspondant a CE. - // - Si plusieurs edge donne des representation < la tolerance. - // discrimination sur les tangentes. + // Several edges possible. + // - Test edges different from CE , Selection of edge + // for which CV has U,V closer to the face + // than corresponding to CE. + // - If several edges give representation less than the tolerance. + // discrimination on tangents. //-------------------------------------------------------------- TopLoc_Location L; Standard_Real f,l; @@ -518,7 +518,7 @@ void BRepAlgo_Loop::Perform() #endif //------------------------------------------------ - // Decoupe des edges + // Cut edges //------------------------------------------------ for (Mapit.Initialize(myVerOnEdges); Mapit.More(); Mapit.Next()) { TopTools_ListOfShape LCE; @@ -532,7 +532,7 @@ void BRepAlgo_Loop::Perform() //----------------------------------- TopTools_DataMapOfShapeListOfShape MVE; - // ajout des edges decoupees. + // add cut edges. for (Mapit.Initialize(myNewEdges); Mapit.More(); Mapit.Next()) { for (itl.Initialize(myNewEdges(Mapit.Key())); itl.More(); itl.Next()) { TopoDS_Edge& E = TopoDS::Edge(itl.Value()); @@ -540,9 +540,9 @@ void BRepAlgo_Loop::Perform() } } - // ajout des edges const - // Les edges de couture peuvent etre doubles ou non dans myConstEdges - // => appel une seule fois StoreInMVE qui se charge de les doubler + // add const edges + // Sewn edges can be doubled or not in myConstEdges + // => call only once StoreInMVE which should double them TopTools_MapOfShape DejaVu; for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) { TopoDS_Edge& E = TopoDS::Edge(itl.Value()); @@ -568,7 +568,7 @@ void BRepAlgo_Loop::Perform() #endif //----------------------------------------------- - // Construction des wires et des nouvelles faces. + // Construction of wires and new faces. //---------------------------------------------- TopoDS_Vertex VF,VL,CV; TopoDS_Edge CE,NE,EF; @@ -581,19 +581,19 @@ void BRepAlgo_Loop::Perform() while (!MVE.IsEmpty()) { B.MakeWire(NW); //-------------------------------- - // Suppression des edges pendants. + // Removal of hanging edges. //-------------------------------- RemovePendingEdges(MVE); if (MVE.IsEmpty()) break; //-------------------------------- - // Edge de depart. + // Start edge. //-------------------------------- Mapit.Initialize(MVE); EF = CE = TopoDS::Edge(Mapit.Value().First()); TopExp::Vertices(CE,V1,V2); //-------------------------------- - // VF vertex debut du nouveau wire + // VF vertex start of new wire //-------------------------------- if (CE.Orientation() == TopAbs_FORWARD) { CV = VF = V1;} else { CV = VF = V2;} @@ -608,7 +608,7 @@ void BRepAlgo_Loop::Perform() while (!End) { //------------------------------- - // Construction d un wire. + // Construction of a wire. //------------------------------- TopExp::Vertices(CE,V1,V2); if (!CV.IsSame(V1)) CV = V1; else CV = V2; @@ -628,7 +628,7 @@ void BRepAlgo_Loop::Perform() } } //-------------------------------------------------- - // Ajout du nouveau wire dans l ensemble des wires + // Add new wire to the set of wires //------------------------------------------------ Standard_Real Tol = 0.001; //5.e-05; //5.e-07; TopExp_Explorer explo( NW, TopAbs_VERTEX ); @@ -690,15 +690,15 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E, SV.Append(it.Value()); } //-------------------------------- - // Tri des vertex sur l edge. + // Parse vertices on the edge. //-------------------------------- Bubble (WE,SV); Standard_Integer NbVer = SV.Length(); //---------------------------------------------------------------- - // Construction des nouvelles edges. - // Remarque : les vertex extremites de l edges ne sont pas - // forcement dans la liste des vertex + // Construction of new edges. + // Note : vertices at the extremities of edges are not + // onligatorily in the list of vertices //---------------------------------------------------------------- if (SV.IsEmpty()) { NE.Append(E); @@ -721,9 +721,9 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E, } } //---------------------------------------------------- - // Traitement des edges fermes - // Si un vertex d intersection est sur le vertex - // commun il doit apparaitre eb debut et en fin de SV. + // Processing of closed edges + // If a vertex of intersection is on the common vertex + // it should appear at the beginning and end of SV. //---------------------------------------------------- TopoDS_Vertex VCEI; if (!VF.IsNull() && VF.IsSame(VL)) { @@ -741,7 +741,7 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E, } else { //----------------------------------------- - // Ajout eventuel des extremites de l edge. + // Eventually all extremities of the edge. //----------------------------------------- if (!VF.IsNull() && !VF.IsSame(SV.First())) SV.Prepend(VF); if (!VL.IsNull() && !VL.IsSame(SV.Last ())) SV.Append (VL); @@ -762,7 +762,7 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E, V2 = TopoDS::Vertex(SV.First()); SV.Remove(1); //------------------------------------------- - // Copie de l edge et restriction par V1 V2. + // Copy the edge and restriction by V1 V2. //------------------------------------------- TopoDS_Shape NewEdge = WE.EmptyCopied(); TopoDS_Shape aLocalEdge = V1.Oriented(TopAbs_FORWARD); diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx index 7c13bb67c0..66a59a9bc5 100755 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx @@ -375,17 +375,17 @@ void BRepAlgo_NormalProjection::SetDefaultParams() prj = MKed.Edge(); } else { - // On teste si la solution n'est pas degeneree pour mettre le - // flag a l'edge, on prend quelques points, on regarde si le nuage de - // points a un diametre inferieur a la tolerance 3D + // It is tested if the solution is not degenerated to set the + // flag on edge, one takes several points, checks if the cloud of + // points has less diameter than the tolerance 3D Degenerated = Standard_True; Standard_Real Dist; Handle(Geom_BSplineCurve) BS3d = Handle(Geom_BSplineCurve)::DownCast( appr.Curve3d()); gp_Pnt P1(0.,0.,0.),PP; // skl : I change "P" to "PP" Standard_Integer NbPoint,ii ; // skl : I change "i" to "ii" Standard_Real Par,DPar; - // on commence avec 3 points pour rejeter les aretes non degenerees - // tres rapidement + // start from 3 points to reject non degenerated edges + // very fast NbPoint =3; DPar = (BS3d->LastParameter()-BS3d->FirstParameter())/(NbPoint-1); for (ii=0;iiValue(j)), @@ -544,9 +542,9 @@ void BRepAlgo_NormalProjection::SetDefaultParams() } myDescendants.Bind(Edges->Value(i), DescenList); } -// JPI : la creation eventuelle d'un wire est reportee dans une methode specifique -// BuilWire qui pourra etre appelee par l'utilisateur. Sinon, on perdait les -// relations des map myAncestorMap, myCorresp. +// JPI : eventual wire creation is reported in a specific method +// BuilWire that can be called by the user. Otherwise, the +// relations of map myAncestorMap, myCorresp will be lost. if(YaVertexRes) BB.Add(myRes, VertexRes); @@ -675,8 +673,8 @@ void BRepAlgo_NormalProjection::SetDefaultParams() if (MW.IsDone()) { const TopoDS_Shape& Wire = MW.Shape(); - // Si le wire resultat contient le meme d'arete qu'au depart OK - // sinon le resultat est vraisemblablement constitue de plusieurs wires. + // If the resulting wire contains the same edge as at the beginning OK + // otherwise the result really consists of several wires. TopExp_Explorer exp2(Wire,TopAbs_EDGE); Standard_Integer NbEdges = 0; for (;exp2.More(); exp2.Next()) NbEdges++; diff --git a/src/BRepAlgo/BRepAlgo_Tool.cxx b/src/BRepAlgo/BRepAlgo_Tool.cxx index 1f0b4a1fca..583e211126 100755 --- a/src/BRepAlgo/BRepAlgo_Tool.cxx +++ b/src/BRepAlgo/BRepAlgo_Tool.cxx @@ -35,8 +35,8 @@ TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S, break; case TopAbs_SHELL: { - // si le shell contient des bords libres qui n'appartiennent pas aux - // bord libres des bouchons ( Boundary) on l'enleve. + // if the shell contains free borders that do not belong to the + // free borders of caps ( Boundary) it is removed. TopTools_IndexedDataMapOfShapeListOfShape Map; TopExp::MapShapesAndAncestors(S,TopAbs_EDGE,TopAbs_FACE,Map); @@ -55,7 +55,7 @@ TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S, case TopAbs_COMPOUND: case TopAbs_SOLID: { - // on itere sur les sous-shape et on ajoute les non vides. + // iterate on sub-shapes and add non-empty. TopoDS_Iterator it(S); TopoDS_Shape SubShape; Standard_Boolean NbSub = 0; diff --git a/src/BRepBlend/BRepBlend_RstRstConstRad.cxx b/src/BRepBlend/BRepBlend_RstRstConstRad.cxx index 1d56a46d64..cd0c3d7b2f 100755 --- a/src/BRepBlend/BRepBlend_RstRstConstRad.cxx +++ b/src/BRepBlend/BRepBlend_RstRstConstRad.cxx @@ -3,8 +3,7 @@ // Author: Laurent BOURESCHE // Author: Jacques GOUSSARD // -// Modif : jlr le 28/07/97 modif de section pour Edge/Face -// modif de set (courbe bornee) + #include #include #include diff --git a/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx b/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx index 0200511224..4a973e9172 100755 --- a/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx +++ b/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx @@ -3,8 +3,7 @@ // Author: Laurent BOURESCHE // Author: Jacques GOUSSARD // -// Modif : jlr le 28/07/97 modif de section pour Edge/Face -// modif de set (courbe bornee) + #include #include #include @@ -357,7 +356,7 @@ Standard_Boolean BRepBlend_RstRstEvolRad::IsSolution(const math_Vector& Sol, Sina = nplan.Dot(n1.Crossed(n2)); if (choix%2 != 0) { - Sina = -Sina; //nplan est change en -nplan + Sina = -Sina; //nplan is changed into -nplan } Angle = ACos(Cosa); @@ -1013,10 +1012,10 @@ Standard_Boolean BRepBlend_RstRstEvolRad::Section(const Blend_Point& P, } else { d1rst1rst2 *= 0.5; - // Normale a la courbe en P1 + // Normal to the curve in P1 d1n1 = - (d1rst1rst2 + Invdray * n1) / ray; - // Normale a la courbe en P2 + // Normal to the curve in P2 d1n2 = (d1rst1rst2 - Invdray * n2) / ray; } } diff --git a/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx b/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx index 461e9f0d49..aa28229574 100755 --- a/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx @@ -3,8 +3,7 @@ // Author: Laurent BOURESCHE // Author: Jacques GOUSSARD // -// Modif : jlr le 28/07/97 modif de section pour Edge/Face -// modif de set (courbe bornee) + #include #include #include diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx index c167c5869f..7a0db28fa1 100755 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx @@ -1287,7 +1287,7 @@ Blend_Status BRepBlend_SurfRstLineBuilder::CheckDeflectionOnSurf(const Blend_Poi { //Controls 3d of Blend_CSWalking. - // rule by tests in U4 corresponds to 11.478 d + //rule by tests in U4 corresponds to 11.478 d const Standard_Real CosRef3D = 0.98; Standard_Real Cosi=0, Cosi2=0; Standard_Boolean curpointistangent = CurPoint.IsTangencyPoint(); diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx index f3db24b8fc..6c142dd71b 100755 --- a/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx @@ -138,7 +138,7 @@ void BRepBuilderAPI_FindPlane::Init(const TopoDS_Shape& S, Standard_Real dist = p0.SquareDistance(points(i)); if (dist > disMax) { disMax = dist; - p1 = points(i); // ca va plus vite de stocker le point, sinon il faut chercher une valeur dans une sequence + p1 = points(i); // it will be faster to store the point, otherwise it is necessary to find a value in a sequence } } diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx index f7616e56d7..d2484e9805 100755 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx @@ -21,8 +21,8 @@ // Add of SameParameter call -//-- lbr le 1er avril 97 -//-- dpf le 10 decembre 1997 Traitement des collections de pcurve +//-- lbr April 1 97 +//-- dpf December 10 1997 Processing of pcurve collections //rln 02.02.99 BUC60449 Making compilable on NT in DEB mode //rln 02.02.99 BUC60449 Protection against exception on NT @@ -146,7 +146,7 @@ Handle(Geom2d_Curve) BRepBuilderAPI_Sewing::SameRange(const Handle(Geom2d_Curve) //======================================================================= //function : WhichFace -//purpose : Give the face dont ledge est le bord +//purpose : Give the face whose edge is the border //======================================================================= TopoDS_Face BRepBuilderAPI_Sewing::WhichFace(const TopoDS_Edge& theEdg, const Standard_Integer index) const diff --git a/src/BRepCheck/BRepCheck_Face.cxx b/src/BRepCheck/BRepCheck_Face.cxx index 5291bb5d72..0ba73dd3ea 100755 --- a/src/BRepCheck/BRepCheck_Face.cxx +++ b/src/BRepCheck/BRepCheck_Face.cxx @@ -147,7 +147,7 @@ void BRepCheck_Face::InContext(const TopoDS_Shape& S) void BRepCheck_Face::Blind() { if (!myBlind) { - // rien de plus que dans le minimum + // nothing more than in the minimum myBlind = Standard_True; } } @@ -174,14 +174,14 @@ BRepCheck_Status BRepCheck_Face::IntersectWires(const Standard_Boolean Update) TopExp_Explorer exp1,exp2; - // on mape les wires + // the wires are mapped exp1.Init(myShape.Oriented(TopAbs_FORWARD),TopAbs_WIRE); TopTools_ListOfShape theListOfShape; while (exp1.More()) { if (!myMapImb.IsBound(exp1.Current())) { myMapImb.Bind(exp1.Current(), theListOfShape); } - else { // on a 2 fois le meme wire... + else { // the same wire is met twice... myIntres = BRepCheck_RedundantWire; if (Update) { BRepCheck::Add(myMap(myShape),myIntres); @@ -277,7 +277,7 @@ BRepCheck_Status BRepCheck_Face::ClassifyWires(const Standard_Boolean Update) Standard_Boolean WireBienOriente = Standard_False; if(FClass2d.PerformInfinitePoint() != TopAbs_OUT) { WireBienOriente=Standard_True; - //le wire donne definit un trou + // the given wire defines a hole myMapImb.UnBind(wir1); myMapImb.Bind(wir1.Reversed(), theListOfShape); } @@ -293,10 +293,10 @@ BRepCheck_Status BRepCheck_Face::ClassifyWires(const Standard_Boolean Update) } } } - // On doit avoir 1 wire qui contient tous les autres, et les autres - // ne contenant rien (cas solide fini) ou - // que des wires ne contenant rien : dans ce cas les wires doivent etre - // des trous dans une face infinie. + // It is required to have 1 wire that contains all others, and the others should not + // contain anything (case solid ended) or + // the wires do not contain anything : in this case the wires should be + // holes in an infinite face. TopoDS_Wire Wext; for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(myMapImb); itm.More(); @@ -325,7 +325,7 @@ BRepCheck_Status BRepCheck_Face::ClassifyWires(const Standard_Boolean Update) return myImbres; } } - // sortie sans erreurs + // quit without errors if (Update) { BRepCheck::Add(myMap(myShape),myImbres); } @@ -393,7 +393,7 @@ BRepCheck_Status BRepCheck_Face::OrientationOfWires const TopoDS_Wire& wir = TopoDS::Wire(exp.Current()); if (!Wext.IsNull() && wir.IsSame(Wext)) { if (wir.Orientation() != Wext.Orientation()) { - //le wire exterieur definit un trou + //the exterior wire defines a hole if( CheckThin(wir,myShape.Oriented(TopAbs_FORWARD)) ) return myOrires; myOrires = BRepCheck_BadOrientationOfSubshape; @@ -409,9 +409,9 @@ BRepCheck_Status BRepCheck_Face::OrientationOfWires break; } } - // Pas de controle sur More() + // No control on More() if (itm.Key().Orientation() == wir.Orientation()) { - //le wire donne ne definit pas un trou + // the given wire does not define a hole myOrires = BRepCheck_BadOrientationOfSubshape; if (Update) { BRepCheck::Add(myMap(myShape),myOrires); @@ -420,7 +420,7 @@ BRepCheck_Status BRepCheck_Face::OrientationOfWires } } } - // sortie sans erreur + // quit withour error if (Update) { BRepCheck::Add(myMap(myShape),myOrires); } diff --git a/src/BRepCheck/BRepCheck_Result.cxx b/src/BRepCheck/BRepCheck_Result.cxx index c017d5c35e..ca21eb0e67 100755 --- a/src/BRepCheck/BRepCheck_Result.cxx +++ b/src/BRepCheck/BRepCheck_Result.cxx @@ -70,7 +70,7 @@ const BRepCheck_ListOfStatus& BRepCheck_Result::StatusOnShape void BRepCheck_Result::InitContextIterator() { myIter.Initialize(myMap); - // Au minimum 1 element : le Shape lui meme + // At least 1 element : the Shape itself if (myIter.Key().IsSame(myShape)) { myIter.Next(); } diff --git a/src/BRepCheck/BRepCheck_Vertex.cxx b/src/BRepCheck/BRepCheck_Vertex.cxx index ea78c7f74e..6b5ca47d98 100755 --- a/src/BRepCheck/BRepCheck_Vertex.cxx +++ b/src/BRepCheck/BRepCheck_Vertex.cxx @@ -54,7 +54,7 @@ BRepCheck_Vertex::BRepCheck_Vertex(const TopoDS_Vertex& V) void BRepCheck_Vertex::Minimum() { if (!myMin) { - // consisterait a verifier l`existence d`un point 3D + // checks the existence of a point 3D BRepCheck_ListOfStatus thelist; myMap.Bind(myShape, thelist); myMap(myShape).Append(BRepCheck_NoError); @@ -85,7 +85,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S) } if (!exp.More()) { BRepCheck::Add(myMap(S),BRepCheck_SubshapeNotInShape); - return; // on sort + return; // leaves } @@ -98,7 +98,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S) case TopAbs_EDGE: { - // On essaie de retrouver le vertex sur l`edge + // Try to find the vertex on the edge const TopoDS_Edge& E = TopoDS::Edge(S); TopoDS_Iterator itv(E.Oriented(TopAbs_FORWARD)); @@ -115,7 +115,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S) VF.Orientation() == TopAbs_REVERSED) || (VFind.Orientation() == TopAbs_REVERSED && VF.Orientation() == TopAbs_FORWARD)) { - // on a le vertex a la fois F et R sur l`edge + // the vertex on the edge is at once F and R multiple = Standard_True; } if (VFind.Orientation() != TopAbs_FORWARD && @@ -130,11 +130,11 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S) itv.Next(); } - // on est sur que VFind n`est pas nul + // VFind is not null for sure TopAbs_Orientation orv = VFind.Orientation(); Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Vertex(myShape)); - Tol = Max(Tol,BRep_Tool::Tolerance(E)); // a voir + Tol = Max(Tol,BRep_Tool::Tolerance(E)); // to check Tol *= Tol; Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&E.TShape()); @@ -143,14 +143,14 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S) BRep_ListIteratorOfListOfPointRepresentation itpr; while (itcr.More()) { - // Pour chaque CurveRepresentation, on verifie le parametre fourni + // For each CurveRepresentation, the provided parameter is checked const Handle(BRep_CurveRepresentation)& cr = itcr.Value(); const TopLoc_Location& loc = cr->Location(); TopLoc_Location L = (Eloc * loc).Predivided(myShape.Location()); if (cr->IsCurve3D()) { const Handle(Geom_Curve)& C = cr->Curve3D(); - if (!C.IsNull()) { // edge non degenere + if (!C.IsNull()) { // edge non degenerated itpr.Initialize(TV->Points()); while (itpr.More()) { const Handle(BRep_PointRepresentation)& pr = itpr.Value(); @@ -232,7 +232,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S) TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location()); Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Vertex(myShape)); - Tol = Max(Tol,BRep_Tool::Tolerance(TopoDS::Face(S))); // a voir + Tol = Max(Tol,BRep_Tool::Tolerance(TopoDS::Face(S))); // to check Tol *= Tol; BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points()); @@ -270,11 +270,11 @@ void BRepCheck_Vertex::Blind() if (myBlind) { return; } -// modified by NIZHNY-MKK Fri May 7 16:43:38 2004.BEGIN -// The body of this function is removed because of its useless -// (see specification "Substitution existing set of evaluation DRAW commands to one"). +// modified by NIZHNY-MKK Fri May 7 16:43:38 2004.BEGIN +// The body of this function is removed because of its useless +// (see specification "Substitution existing set of evaluation DRAW commands to one"). - // Check all the representations of the vertex. (i-e checks the TVertex +// Check all the representations of the vertex. (i-e checks the TVertex // BRepCheck_ListOfStatus& lst = myMap(myShape); // lst.Clear(); // there was NoError... diff --git a/src/BRepCheck/BRepCheck_Wire.cxx b/src/BRepCheck/BRepCheck_Wire.cxx index 8c1be90516..c2b8f4717a 100755 --- a/src/BRepCheck/BRepCheck_Wire.cxx +++ b/src/BRepCheck/BRepCheck_Wire.cxx @@ -3,7 +3,7 @@ // Author: Jacques GOUSSARD // // Modified by dpf, Fri Dec 19 15:31:03 1997 -// Taitement de la fermeture en 2d. +// Processing of closing in 2d. // // modified by eap Tue Dec 18 14:14:25 2001 (bug OCC23) // Check self-intersection in case of closed edge @@ -137,7 +137,7 @@ void BRepCheck_Wire::Minimum() myMap.Bind(myShape, thelist); BRepCheck_ListOfStatus& lst = myMap(myShape); - // on verifie que le wire est "connexe" == check that the wire is "connex" + // check that the wire is "connex" TopExp_Explorer exp(myShape,TopAbs_EDGE); Standard_Integer nbedge = 0; myMapVE.Clear(); @@ -212,7 +212,7 @@ void BRepCheck_Wire::InContext(const TopoDS_Shape& S) case TopAbs_FACE: { - TopoDS_Edge ed1,ed2; // bidon + TopoDS_Edge ed1,ed2; if (myGctrl) st = SelfIntersect(TopoDS::Face(S),ed1,ed2,Standard_True); if (st != BRepCheck_NoError) break; @@ -240,7 +240,7 @@ void BRepCheck_Wire::InContext(const TopoDS_Shape& S) void BRepCheck_Wire::Blind() { if (!myBlind) { - // rien de plus que dans le minimum + // nothing more that the minimum myBlind = Standard_True; } } @@ -258,12 +258,12 @@ BRepCheck_Status BRepCheck_Wire::Closed(const Standard_Boolean Update) return myCstat; } - myCdone = Standard_True; // ce sera fait... + myCdone = Standard_True; BRepCheck_ListIteratorOfListOfStatus itl(myMap(myShape)); if (itl.Value() != BRepCheck_NoError) { myCstat = itl.Value(); - return myCstat; // deja enregistre + return myCstat; // already saved } myCstat = BRepCheck_NoError; @@ -583,8 +583,8 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F, while (Index < nbOriNoDegen) { ledge.Clear(); ListOfPassedEdge.Clear(); - // on cherche les edges qui s`enchainent sur VL si !VL.IsNull - // sinon sur VF. + // find edges that make a chain on VL if !VL.IsNull + // otherwise on VF. Standard_Integer ind; if (!VL.IsNull()) { @@ -633,17 +633,17 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F, TopAbs_Orientation vto = vte.Current().Orientation(); if (!VL.IsNull()) { if (vto == TopAbs_FORWARD && VL.IsSame(vte.Current())) { - // Si on travaille en 2d (face non nulle) ou - // si l'edge n'est pas degenere on l'ajoute + // If the processing is in 2d (face not null) or + // if the edge is not degenerated it is added if (!F.IsNull() || !BRep_Tool::Degenerated(edg)) ledge.Append(edg); break; } } - else { // VF n`est pas nul + else { // VF is not null if (vto == TopAbs_REVERSED && VF.IsSame(vte.Current())) { - // Si on travaille en 2d (face non nulle) ou - // si l'edge n'est pas degenere on l'ajoute + // // If the processing is in 2d (face not null) or + // if the edge is not degenerated it is added if (!F.IsNull() || !BRep_Tool::Degenerated(edg)) ledge.Append(edg); break; @@ -660,11 +660,11 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F, if (Update) { BRepCheck::Add(myMap(myShape),theOstat); } - return theOstat; // on sort + return theOstat; // leave } else { - Index--; // parce que apres Index++ et on n`a pas enchaine - VL.Nullify(); // on force a enchainer sur VF + Index--; // because after Index++ and if there is no chain, + VL.Nullify(); // chain on VF is forced theEdge = theRef; Changedesens = Standard_True; } @@ -678,8 +678,8 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F, } } - // JAG 03/07 else if (nbconnex >= 2 && !F.IsNull()) // On essaie de voir en 2d - else if (!F.IsNull()) { // On essaie de voir en 2d + // JAG 03/07 else if (nbconnex >= 2 && !F.IsNull()) // Try to see in 2d + else if (!F.IsNull()) { // Try to see in 2d TopoDS_Vertex pivot; if (!VL.IsNull()) { pivot = VL; @@ -710,7 +710,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F, return theOstat; } else if (nbconnex == 1) { - // decaler le vertex + // offset the vertex for (vte.Init(ledge.First(),TopAbs_VERTEX);vte.More(); vte.Next()) { TopAbs_Orientation vto = vte.Current().Orientation(); if (!VL.IsNull()) { @@ -719,7 +719,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F, break; } } - else { // VF n`est pas nul + else { // VF is not null if (vto == TopAbs_FORWARD) { VF = TopoDS::Vertex(vte.Current()); break; @@ -745,7 +745,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F, return theOstat; } - // On verifie la fermeture du wire en 2d (pas fait dans Closed()) + // Check the closure of the wire in 2d (not done in Closed()) TopoDS_Vertex aVRef; Standard_Boolean isCheckClose = Standard_False; @@ -790,7 +790,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F, return theOstat; } } - // Fin controle fermeture 2d + // End control closure 2d Index ++; } @@ -824,8 +824,8 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F, TopTools_MapOfOrientedShape auxmape; // ok=Standard_True; - //-- on verifie plus loin avec les bonnes tolerances si on n a - //-- pas un point dans la tolerance d un vertex. + //-- check with proper tolerances if there is no + //-- point in the tolerance of a vertex. tolint = 1.e-10; HS = new BRepAdaptor_HSurface(); HS->ChangeSurface().Initialize(F,Standard_False); @@ -895,15 +895,15 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F, const IntRes2d_Transition& Tr2 = IP.TransitionOfSecond(); if( Tr1.PositionOnCurve() == IntRes2d_Middle || Tr2.PositionOnCurve() == IntRes2d_Middle) { - //-- Verification des points avec les vraies tolerances (ie Tol en 3d) - //-- Si le point d intersection est dans la tolearnce d un des vertex - //-- on considere que cette intersection est bonne (pas d erreur) + //-- Checking of points with true tolerances (ie Tol in 3d) + //-- If the point of intersection is within the tolearnce of a vertex + //-- this intersection is considered correct (no error) Standard_Boolean localok = Standard_False; Standard_Real f,l; TopLoc_Location L; const Handle(Geom_Curve) ConS = BRep_Tool::Curve(E1,L,f,l); if(!ConS.IsNull()) { - //-- on va tester en 3d. (ParamOnSecond donne le m resultat) + //-- try to test in 3d. (ParamOnSecond gives the same result) P3d = ConS->Value(IP.ParamOnFirst()); P3d.Transform(L.Transformation()); // Modified by Sergey KHROMOV - Mon Apr 15 12:34:22 2002 Begin @@ -992,7 +992,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F, //modified by NIZNHY-PKV Fri Oct 29 10:09:02 2010t // //-- ************************************************************ - //-- ******* I n t e r s e c t i o n C 1 e t C 2 ******** + //-- ******* I n t e r s e c t i o n C 1 and C 2 ******** //-- ************************************************************ Inter.Perform(C1,myDomain1,C2,tabDom[j-1],tolint,tolint); // @@ -1031,9 +1031,9 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F, Tr2 = IP.TransitionOfSecond(); if( Tr1.PositionOnCurve() == IntRes2d_Middle || Tr2.PositionOnCurve() == IntRes2d_Middle) { - //-- Verification des points avec les vraies tolerances (ie Tol en 3d) - //-- Si le point d intersection est dans la tolearnce d un des vertex - //-- on considere que cette intersection est bonne (pas d erreur) + //-- Checking of points with true tolerances (ie Tol in 3d) + //-- If the point of intersection is within the tolerance of a vertex + //-- this intersection is considered correct (no error) Standard_Boolean localok = Standard_False; Standard_Real f1,l1, f2, l2; TopLoc_Location L, L2; @@ -1086,10 +1086,10 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F, } //-- -------------------------------------------------------- - //-- Verification sur le baillement maximum entre les 2 edges + //-- Check maximum yawn between 2 edges //-- - //-- On verifie la distance des edges a la courbe joignant - //-- le point d intersection au vertex (s il existe) + //-- Check distance from edges to the curve joining + //-- the point of intersection with vertex (if exists) if (localok == Standard_False && !CommonVertices.IsEmpty()) { #ifdef DEB cout << "\n------------------------------------------------------\n" < must // be FORWARD or REVERSED. That is not checked. @@ -1425,7 +1425,7 @@ static void Propagate(const TopTools_IndexedDataMapOfShapeListOfShape& mapVE, TopExp_Explorer ex; for (ex.Init(edg,TopAbs_VERTEX); ex.More(); ex.Next()) { const TopoDS_Vertex& vtx = TopoDS::Vertex(ex.Current()); - // debug jag sur vertex + // debug on vertex Standard_Integer indv = mapVE.FindIndex(vtx); if (indv != 0) { for (TopTools_ListIteratorOfListOfShape itl(mapVE(indv)); itl.More(); itl.Next()) { @@ -1491,12 +1491,12 @@ static TopAbs_Orientation GetOrientation(const TopTools_MapOfShape& mapE, Standard_Real tol = Max(ures,vres); if(tol<=0.0) { #ifdef DEB - //-- lbr le 29 jan 98 - cout<<"BRepCheck_Wire : UResolution et VResolution = 0.0 (Face trop petite ?)"< tol) { #ifdef DEB - cout<<"BRepCheckWire : controle fermeture en 2d --> faux"< false"< ok"< ok"< faux"< false"< -// Modifed: Portage NT 7-5-97 DPF (stdio.h) +// Modifed: Porting NT 7-5-97 DPF (stdio.h) // Apr 16 2002 eap, classification against infinite solid (occ299) // Modified by skv - Thu Sep 4 12:29:30 2003 OCC578 -//-- Traiter le cas d un trou !! +//-- Process the case of a hole!! #define REJECTION 1 -//-- Pour printf sur NT +//-- To printf on NT #include #include @@ -48,7 +48,7 @@ static gp_Vec staticd1v_gp_vec; //======================================================================= //function : FindAPointInTheFace -//purpose : compute a point P in the face F. Param is a Real in +//purpose : Compute a point P in the face F. Param is a Real in // ]0,1[ and is used to initialise the algorithm. For // different values , different points are returned. //======================================================================= @@ -111,7 +111,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::FindAPointInTheFace T.Normalize(); P.SetCoord(P.X()+TolInit*T.X(),P.Y()+TolInit*T.Y()); - FClassifier.Reset(gp_Lin2d(P,T),ParamInit,RealEpsilon()); //-- Longueur et Tolerance ####### + FClassifier.Reset(gp_Lin2d(P,T),ParamInit,RealEpsilon()); //-- Length and Tolerance ####### TopExp_Explorer otherfaceexplorer; // Modified by Sergey KHROMOV - Tue Apr 1 11:32:51 2003 Begin @@ -191,14 +191,14 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace void *ptr = (void*)(myMapOfInter.Find(Face)); if(ptr) { const IntCurvesFace_Intersector& TheIntersector = (*((IntCurvesFace_Intersector *)ptr)); - //-- On prend les 4 points dans chaque Quart de surface + //-- Take 4 points in each Quarter of surface //-- -> Index : 1 -> 16 //-- //-- - //-- Puis on prend une matrice de points sur une grille serree + //-- Then take a matrix of points on a tight grid //-- - for(u=du+(U1+U2)*0.5; u=IndexPoint) { if(TheIntersector.ClassifyUVPoint(gp_Pnt2d(u,v))==TopAbs_IN) { u_=u; v_=v; @@ -210,8 +210,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace } } - for(u=-du+(U1+U2)*0.5; u>U1; u-=du) { //-- 0 0 u decroit - for(v=-dv+(V1+V2)*0.5; v>V1; v-=dv) { //-- X 0 v decroit + for(u=-du+(U1+U2)*0.5; u>U1; u-=du) { //-- 0 0 u decreases + for(v=-dv+(V1+V2)*0.5; v>V1; v-=dv) { //-- X 0 v decreases if(++NbPntCalc>=IndexPoint) { if(TheIntersector.ClassifyUVPoint(gp_Pnt2d(u,v))==TopAbs_IN) { u_=u; v_=v; @@ -222,8 +222,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace } } } - for(u=-du+(U1+U2)*0.5; u>U1; u-=du) { //-- X 0 u decroit - for(v=dv+(V1+V2)*0.5; vU1; u-=du) { //-- X 0 u decreases + for(v=dv+(V1+V2)*0.5; v=IndexPoint) { if(TheIntersector.ClassifyUVPoint(gp_Pnt2d(u,v))==TopAbs_IN) { u_=u; v_=v; @@ -234,8 +234,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace } } } - for(u=du+(U1+U2)*0.5; uV1; v-=dv) { //-- 0 X v decroit + for(u=du+(U1+U2)*0.5; uV1; v-=dv) { //-- 0 X v decreases if(++NbPntCalc>=IndexPoint) { if(TheIntersector.ClassifyUVPoint(gp_Pnt2d(u,v))==TopAbs_IN) { u_=u; v_=v; @@ -246,7 +246,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace } } } - //-- le reste + //-- the remainder du = (U2-U1)/37.0; dv = (V2-V1)/37.0; if(du<1e-12) du=1e-12; @@ -278,7 +278,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace IndexPoint = NbPntCalc; } else { - //printf("BRepClass3d_SolidExplorer Face non trouvee ds la map \n"); + //printf("BRepClass3d_SolidExplorer Face not found ds the map \n"); } return(BRepClass3d_SolidExplorer::FindAPointInTheFace(Face,APoint_,u_,v_,param_)); @@ -508,8 +508,8 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1, Standard_Boolean encoreuneface = faceexplorer.More(); if(ptfound==Standard_False && encoreuneface==Standard_False) { if(myParamOnEdge < 0.0001) { - //-- Ce cas se produit lorsque le point est sur le solide - //-- et ce solide est reduit a une face + //-- This case takes place when the point is on the solid + //-- and this solid is reduced to a face gp_Pnt PBidon(P.X()+1.0,P.Y(),P.Z()); gp_Vec V(P,PBidon); Par= 1.0; @@ -528,7 +528,7 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1, _Par=0.0; myReject=Standard_True; #if DEB - cout<<"\nWARNING : BRepClass3d_SolidExplorer.cxx (Solid sans face)"< Mf || mf > Mu)) { //chevauchement des intervales + if (! (mu > Mf || mf > Mu)) { //overlapping intervals sens = 1; kf = 1; ku = ASI2.NbPoints(jj); @@ -304,8 +304,8 @@ static void Descendants(const TopoDS_Shape&, if (ASI2.NbPoints(jj) <= 0) continue; -// pour cas base prism a cheval sur mySUntil -> sens ambigu -// -> on privilegie sens = 1 +// for base case prism on mySUntil -> ambivalent direction +// -> preferrable direction = 1 if(sens != 1) { if (ASI2.Point(jj,1).Parameter()* ASI2.Point(jj,ASI2.NbPoints(jj)).Parameter()<=0) @@ -346,9 +346,9 @@ static void Descendants(const TopoDS_Shape&, } -// Mise a jour LShape par ajout des faces du Shape de base -// qui sont OK pour (sens, locmin et locmax) -// qui ne sont pas deja dans la map (Shape From Until et faces collage) +// Update LShape by adding faces of the base Shape +// that are OK (sens, locmin and locmax) +// that are not yet in the map (Shape From Until and glue faces) #ifndef VREF if (theOpe == 2) { for (Standard_Integer i=1; i<=ASI3.NbPoints(jj); i++) { @@ -399,7 +399,7 @@ static void Descendants(const TopoDS_Shape&, #ifndef VREF -//--- 2) par section avec la boite englobante +//--- 2) by section with the bounding box Bnd_Box prbox; BRepBndLib::Add(myGShape,prbox); @@ -421,14 +421,14 @@ static void Descendants(const TopoDS_Shape&, Standard_Integer counter = 0; -// On ne traite pas : la face de collage -// les faces du Shape From -// les faces du Shape Until -// les faces deja dans LShape -// les faces de myGluedF -// Si la face n'a pas ete eliminee ... on la garde si boite enblobante -// est en collision avec celle de myGShape = outil -// ou celle des faces limites (mySFrom mySUntil mySkface) +// Are not processed: the face of gluing +// the faces of Shape From +// the faces of Shape Until +// the faces already in LShape +// the faces of myGluedF +// If the face was not eliminated ... it is preserved if bounding box +// collides with the box of myGShape = outil +// or the box of limit faces (mySFrom mySUntil mySkface) for(; exx1.More(); exx1.Next()) { const TopoDS_Face& sh = TopoDS::Face(exx1.Current()); counter++; @@ -479,8 +479,8 @@ static void Descendants(const TopoDS_Shape&, #endif #ifdef VREF -// test de performance : ajout de toutes les faces du Shape de base dans LShape -// (pas de phase de tri mais plus de faces) -> pas concluant +// test of performance : add all faces of the base Shape in LShape +// (no phase of parsing, but more faces) -> no concluant TopExp_Explorer exx1; for (exx1.Init(mySbase, TopAbs_FACE); exx1.More(); exx1.Next()) { @@ -494,14 +494,14 @@ static void Descendants(const TopoDS_Shape&, LocOpe_Gluer theGlue; -//--- cas de collage +//--- case of gluing if (theOpe == 1) { #ifdef DEB if (trc) cout << " Gluer" << endl; #endif Standard_Boolean Collage = Standard_True; - // on coupe par FFrom && FUntil + // cut by FFrom && FUntil TopoDS_Shape Comp; BRep_Builder B; B.MakeCompound(TopoDS::Compound(Comp)); @@ -533,7 +533,7 @@ static void Descendants(const TopoDS_Shape&, Collage = Standard_False; } else {// else X0 - // On ne garde que les solides + // Only solids are preserved TopoDS_Shape theGShape; BRep_Builder B; B.MakeCompound(TopoDS::Compound(theGShape)); @@ -662,7 +662,7 @@ static void Descendants(const TopoDS_Shape&, } } - // On rajoute le collage sur face de depart et fin , si necessaire !!! + // Add gluing on start and end face if necessary !!! if (FromInShape && Collage) { TopExp_Explorer ex(mySFrom,TopAbs_FACE); for(; ex.More(); ex.Next()) { @@ -693,8 +693,8 @@ static void Descendants(const TopoDS_Shape&, theGlue.Bind(theFE.EdgeFrom(),theFE.EdgeTo()); } } - //myMap.UnBind(fac2); // pour ne pas avoir fac2 dans la Map quand - // on .appelle UpdateDescendants(theGlue) + //myMap.UnBind(fac2); // to avoid fac2 in Map when + // UpdateDescendants(theGlue) is called } } @@ -708,7 +708,7 @@ static void Descendants(const TopoDS_Shape&, } } -//--- si le collage est toujours applicable +//--- if the gluing is always applicable if (theOpe == 1) { #ifdef DEB @@ -842,7 +842,7 @@ static void Descendants(const TopoDS_Shape&, } -//--- cas sans collage + Outil aux bonnes dimensions +//--- case without gluing + Tool with proper dimensions if (theOpe == 2 && ChangeOpe && myJustGluer) { #ifdef DEB @@ -854,7 +854,7 @@ static void Descendants(const TopoDS_Shape&, // return; } -//--- cas sans collage +//--- case without gluing if (theOpe == 2) { #ifdef DEB @@ -863,7 +863,7 @@ static void Descendants(const TopoDS_Shape&, TopoDS_Shape theGShape = myGShape; if (ChangeOpe) { #ifdef DEB - if (trc) cout << " Passage en ope. topologique" << endl; + if (trc) cout << " Passage to topological operations" << endl; #endif for (itm.Initialize(myGluedF); itm.More();itm.Next()) { const TopoDS_Face& fac = TopoDS::Face(itm.Value()); @@ -877,7 +877,7 @@ static void Descendants(const TopoDS_Shape&, if(found) break; } if(!found) { -// echec collage -> on remet les faces de collage dans LShape +// failed gluing -> reset faces of gluing in LShape LShape.Append(fac); } } @@ -911,7 +911,7 @@ static void Descendants(const TopoDS_Shape&, } } -// mise a jour type de selection +// update type of selection if(myPerfSelection == BRepFeat_SelectionU && !UntilInShape) { myPerfSelection = BRepFeat_NoSelection; } @@ -930,14 +930,14 @@ static void Descendants(const TopoDS_Shape&, //BRepAlgo_Cut trP(myGShape,Comp); BRepAlgoAPI_Cut trP(myGShape, Comp); //modified by NIZNHY-PKV Thu Mar 21 17:24:56 2002 t - // le resultat est necessairement un compound. + // the result is necessarily a compound. exp.Init(trP.Shape(),TopAbs_SOLID); if (!exp.More()) { myStatusError = BRepFeat_EmptyCutResult; NotDone(); return; } - // On ne garde que les solides + // Only solids are preserved theGShape.Nullify(); BRep_Builder B; B.MakeCompound(TopoDS::Compound(theGShape)); @@ -1063,7 +1063,7 @@ static void Descendants(const TopoDS_Shape&, } -//--- generation de "just feature" pour assemblage = Parties d'outil +//--- generation of "just feature" for assembly = Parts of tool TopTools_ListOfShape lshape; LocOpe_Builder theTOpe; Standard_Real pbmin, pbmax, prmin, prmax; @@ -1082,9 +1082,9 @@ static void Descendants(const TopoDS_Shape&, theTOpe.PerformResult(); if (theTOpe.IsDone()) { myShape = theTOpe.ResultingShape(); -// UpdateDescendants(theTOpe.Builder(),myShape); // a priori bug de mise a jour - UpdateDescendants(theTOpe.History(),myShape); // a priori bug de mise a jour - // a faire apres selection des parties a garder +// UpdateDescendants(theTOpe.Builder(),myShape); // a priori bug of update + UpdateDescendants(theTOpe.History(),myShape); // a priori bug of update + // to be done after selection of parts to be preserved myNewEdges = theTOpe.Edges(); myTgtEdges = theTOpe.TgtEdges(); TopExp_Explorer explo(theTOpe.ResultingShape(), TopAbs_SOLID); @@ -1099,12 +1099,12 @@ static void Descendants(const TopoDS_Shape&, } } -//--- Selection des morceaux d'outil a garder +//--- Selection of pieces of tool to be preserved TopoDS_Solid thePartsOfTool; if(!lshape.IsEmpty() && myPerfSelection != BRepFeat_NoSelection) { -//Recherche ParametricMinMax en fonction contraintes des Shape From et Until -// -> prmin, prmax, pbmin et pbmax +// Find ParametricMinMax depending on the constraints of Shape From and Until +// -> prmin, prmax, pbmin and pbmax C = BarycCurve(); if (C.IsNull()) { myStatusError = BRepFeat_EmptyBaryCurve; @@ -1125,7 +1125,7 @@ static void Descendants(const TopoDS_Shape&, BRepFeat::ParametricMinMax(mySUntil,C, prmin2, prmax2, prbmin2, prbmax2, flag1); -// cas des revol +// case of revolutions if (C->IsPeriodic()) { Standard_Real period = C->Period(); prmax = prmax2; @@ -1182,8 +1182,7 @@ static void Descendants(const TopoDS_Shape&, return; } - // On cherche les parties de l`outil contenant les descendants du - // Shape Until + // Find parts of the tool containing descendants of Shape Until BRepFeat::ParametricMinMax(mySUntil,C, prmin1, prmax1, prbmin1, prbmax1, flag1); if (sens == 1) { @@ -1201,15 +1200,15 @@ static void Descendants(const TopoDS_Shape&, } -// Choix plus fin des ParametricMinMax dans le cas ou l'outil -// intersecte les Shapes From et Until -// cas de plusieurs intersections (retenir PartsOfTool en accord avec selection) -// position de la face d`intersection dans PartsOfTool (avant ou arriere) +// Finer choice of ParametricMinMax in case when the tool +// intersects Shapes From and Until +// case of several intersections (keep PartsOfTool according to the selection) +// position of the face of intersection in PartsOfTool (before or after) Standard_Real delta = Precision::Confusion(); if (myPerfSelection != BRepFeat_NoSelection) { -// modif du test pour cts21181 : (prbmax2 et prnmin2) -> (prbmin1 et prbmax1) -// correction prise en compte de flag2 pour pro15323 et de flag3 pour pro16060 +// modif of the test for cts21181 : (prbmax2 and prnmin2) -> (prbmin1 and prbmax1) +// correction take into account flag2 for pro15323 and flag3 for pro16060 if (!mySUntil.IsNull()) { TopTools_MapOfShape mapFuntil; Descendants(mySUntil,theTOpe,mapFuntil); @@ -1335,7 +1334,7 @@ static void Descendants(const TopoDS_Shape&, } -// Tri des PartsOfTool a garder ou non en fonction des ParametricMinMax +// Parse PartsOfTool to preserve or not depending on ParametricMinMax if (!myJustFeat) { Standard_Boolean KeepParts = Standard_False; BRep_Builder BB; @@ -1384,7 +1383,7 @@ static void Descendants(const TopoDS_Shape&, } } -// Cas ou on ne garde aucune partie d`outil +// Case when no part of the tool is preserved if (!KeepParts) { #ifdef DEB if (trc) cout << " No parts of tool kept" << endl; @@ -1395,7 +1394,7 @@ static void Descendants(const TopoDS_Shape&, } } else { -// cas JustFeature -> on garde tous les PartsOfTool +// case JustFeature -> all PartsOfTool are preserved Standard_Real prmin1, prmax1, prbmin1, prbmax1; Standard_Real min, max, pmin, pmax; Standard_Boolean flag2; @@ -1429,11 +1428,11 @@ static void Descendants(const TopoDS_Shape&, } -//--- Generation du resultat myShape +//--- Generation of result myShape if (!myJustFeat) { -// suppression des edges de section qui n'ont aucun vertex commun -// avec les PartsOfTool converves +// removal of edges of section that have no common vertices +// with PartsOfTool preserved theTOpe.PerformResult(); if (theTOpe.IsDone()) { Done(); @@ -1441,7 +1440,7 @@ static void Descendants(const TopoDS_Shape&, // BRepLib::SameParameter(myShape, 1.e-7, Standard_True); // -// mise a jour des new et tangent edges +// update new and tangent edges // UpdateDescendants(theTOpe.Builder(),myShape); UpdateDescendants(theTOpe.History(),myShape); myNewEdges = theTOpe.Edges(); @@ -1450,7 +1449,7 @@ static void Descendants(const TopoDS_Shape&, } // else myTgtEdges.Clear(); } - else {// dernier recours (attention new et tangent edges) + else {// last recourse (attention new and tangent edges) if (!thePartsOfTool.IsNull()) { #ifdef DEB if (trc) cout << " Parts of Tool : direct Ope. Top." << endl; @@ -1493,7 +1492,7 @@ static void Descendants(const TopoDS_Shape&, } } else { - // tout est deja fait + // all is already done Done(); } } @@ -1523,7 +1522,7 @@ const TopTools_ListOfShape& BRepFeat_Form::Modified { if (myMap.IsBound(F)) { static TopTools_ListOfShape list; - list.Clear(); // Pour le second passage DPF + list.Clear(); // For the second passage DPF TopTools_ListIteratorOfListOfShape ite(myMap(F)); for(; ite.More(); ite.Next()) { const TopoDS_Shape& sh = ite.Value(); @@ -1544,9 +1543,9 @@ const TopTools_ListOfShape& BRepFeat_Form::Generated (const TopoDS_Shape& S) { if (myMap.IsBound(S) && - S.ShapeType() != TopAbs_FACE) { // voir si on filtre sur face ou pas + S.ShapeType() != TopAbs_FACE) { // check if filter on face or not static TopTools_ListOfShape list; - list.Clear(); // Pour le second passage DPF + list.Clear(); // For the second passage DPF TopTools_ListIteratorOfListOfShape ite(myMap(S)); for(; ite.More(); ite.Next()) { const TopoDS_Shape& sh = ite.Value(); @@ -1644,7 +1643,7 @@ const TopTools_ListOfShape& BRepFeat_Form::TgtEdges() const //======================================================================= //function : TransformSUntil -//purpose : Limitation du shape until dans le cas des faces infinies +//purpose : Limitation of the shape until the case of infinite faces //======================================================================= Standard_Boolean BRepFeat_Form::TransformShapeFU(const Standard_Integer flag) @@ -1663,7 +1662,7 @@ Standard_Boolean BRepFeat_Form::TransformShapeFU(const Standard_Integer flag) return Trf; TopExp_Explorer exp(shapefu, TopAbs_FACE); - if (!exp.More()) { // pas de faces... Il faudrait renvoyer une erreur + if (!exp.More()) { // no faces... It is necessary to return an error #ifdef DEB if (trc) cout << " BRepFeat_Form::TransformShapeFU : invalid Shape" << endl; #endif @@ -1671,7 +1670,7 @@ Standard_Boolean BRepFeat_Form::TransformShapeFU(const Standard_Integer flag) } exp.Next(); - if (!exp.More()) { // une seule face. Est-elle infinie?? + if (!exp.More()) { // the only face. Is it infinite? exp.ReInit(); TopoDS_Face fac = TopoDS::Face(exp.Current()); @@ -1895,7 +1894,7 @@ static void Descendants(const TopoDS_Shape& S, } myMap.ChangeFind(orig).Clear(); for (itm.Initialize(newdsc); itm.More(); itm.Next()) { - // on verifie l`appartenance au shape... + // check the appartenance to the shape... for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) { if (exp.Current().IsSame(itm.Key())) { // const TopoDS_Shape& sh = itm.Key(); @@ -1952,7 +1951,7 @@ static void Descendants(const TopoDS_Shape& S, } myMap.ChangeFind(orig).Clear(); for (itm.Initialize(newdsc); itm.More(); itm.Next()) { - // on verifie l`appartenance au shape... + // check the appartenance to the shape... for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) { if (exp.Current().IsSame(itm.Key())) { // const TopoDS_Shape& sh = itm.Key(); @@ -2008,7 +2007,7 @@ static void Descendants(const TopoDS_Shape& S, } myMap.ChangeFind(orig).Clear(); for (itm.Initialize(newdsc); itm.More(); itm.Next()) { - // on verifie l`appartenance au shape... + // check the appartenance to the shape... for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) { if (exp.Current().IsSame(itm.Key())) { // const TopoDS_Shape& sh = itm.Key(); diff --git a/src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx b/src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx index 3833416022..3c89088a78 100755 --- a/src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx +++ b/src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx @@ -64,7 +64,7 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius) theList.Append(theASI.Point(i).Face()); } - // On ne peut pas utiliser de cylindre infini pour les ope topologiques... + // It is not possible to use infinite cylinder for topological operations. Standard_Real PMin,PMax; BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax); Standard_Real Heigth = 2.*(PMax-PMin); @@ -75,7 +75,7 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius) Radius, Heigth); - // Peut-etre vaudrait-il mieux faire directement une coupe + // Probably it is better to make cut directly BRep_Builder B; TopoDS_Solid theTool; @@ -164,7 +164,7 @@ void BRepFeat_MakeCylindricalHole::PerformThruNext(const Standard_Real Radius, } } - // On ne peut pas utiliser de cylindre infini pour les ope topologiques... + // It is not possible to use infinite cylinder for topological operations. Standard_Real PMin,PMax; BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax); Standard_Real Heigth = 2.*(PMax-PMin); @@ -200,8 +200,8 @@ void BRepFeat_MakeCylindricalHole::PerformThruNext(const Standard_Real Radius, return; } - if (nbparts >= 2) { // on garde la plus petite en parametre - // le long de l`axe + if (nbparts >= 2) { // preserve the smallest as parameter + // along the axis TopoDS_Shape tokeep; Standard_Real parbar,parmin = Last; gp_Pnt Barycentre; @@ -214,7 +214,7 @@ void BRepFeat_MakeCylindricalHole::PerformThruNext(const Standard_Real Radius, } } - if (tokeep.IsNull()) { // on garde le plus proche de l`intervalle + if (tokeep.IsNull()) { // preserve the closest interval Standard_Real dmin = RealLast(); for (its.Initialize(myBuilder.PartsOfTool()); its.More(); its.Next()) { @@ -273,8 +273,8 @@ void BRepFeat_MakeCylindricalHole::PerformUntilEnd(const Standard_Real Radius, if (ok) { if (theOr == TopAbs_REVERSED) { - ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // on remonte - // On pourrait aller chercher la suivante... + ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // on reset + // It is possible to search for the next. } if ( ok && theOr == TopAbs_FORWARD) { First = theASI.Point(IndFrom).Parameter(); @@ -305,7 +305,7 @@ void BRepFeat_MakeCylindricalHole::PerformUntilEnd(const Standard_Real Radius, } } - // On ne peut pas utiliser de cylindre infini pour les ope topologiques... + // It is not possible to use infinite cylinder for topological operations. Standard_Real PMin,PMax; BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax); Standard_Real Heigth = 2.*(PMax-PMin); @@ -341,7 +341,7 @@ void BRepFeat_MakeCylindricalHole::PerformUntilEnd(const Standard_Real Radius, return; } - if (nbparts >= 2) { // on garde tout ce qui est au dessus de First + if (nbparts >= 2) { // preserve everything above the First Standard_Real parbar; gp_Pnt Barycentre; for (its.Initialize(myBuilder.PartsOfTool()); its.More(); its.Next()) { @@ -397,8 +397,8 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius, Standard_Boolean ok = theASI.LocalizeAfter(thePFrom,theOr,IndFrom,IndTo); if (ok) { if (theOr == TopAbs_REVERSED) { - ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // on remonte - // On pourrait aller chercher la suivante... + ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // reset + // It is possible to find the next. } if ( ok && theOr == TopAbs_FORWARD) { First = theASI.Point(IndFrom).Parameter(); @@ -430,7 +430,7 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius, } } - // On ne peut pas utiliser de cylindre infini pour les ope topologiques... + // // It is not possible to use infinite cylinder for topological operations. Standard_Real PMin,PMax; BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax); Standard_Real Heigth = 2.*(PMax-PMin); @@ -467,7 +467,7 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius, return; } - if (nbparts >= 2) { // on garde les parties entre First et Last + if (nbparts >= 2) { // preserve parts between First and Last TopoDS_Shape tokeep; Standard_Real parbar; @@ -516,8 +516,8 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius, if (ok) { if (theOr == TopAbs_REVERSED) { - ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // on remonte - // on pourrait aller chercher la suivante... + ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // reset + // it is possible to find the next } ok = ok && theOr == TopAbs_FORWARD; } @@ -526,7 +526,7 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius, return; } - // on verifie a priori la longueur du trou + // check a priori the length of the hole Standard_Integer IFNext,ITNext; ok = theASI.LocalizeAfter(IndTo,theOr,IFNext,ITNext); if (!ok) { @@ -544,14 +544,14 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius, theList.Append(theASI.Point(i).Face()); } */ - // version pour plus de controle + // version for advanced control for (Standard_Integer i=IndFrom; i<= ITNext; i++) { theList.Append(theASI.Point(i).Face()); } First = theASI.Point(IndFrom).Parameter(); - // On ne peut pas utiliser de cylindre infini pour les ope topologiques... + //// It is not possible to use infinite cylinder for topological operations. Standard_Real PMin,PMax; BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax); if (PMin > Length) { @@ -592,8 +592,7 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius, return; } - if (nbparts >= 2) { // on garde la plus petite en parametre - // le long de l`axe + if (nbparts >= 2) { // preserve the smallest as parameter along the axis TopoDS_Shape tokeep; Standard_Real parbar,parmin = RealLast(); gp_Pnt Barycentre; @@ -606,7 +605,7 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius, } } - if (tokeep.IsNull()) { // on garde le plus proche de l`intervalle + if (tokeep.IsNull()) { // preserve the closest interval Standard_Real dmin = RealLast(); for (its.Initialize(myBuilder.PartsOfTool()); its.More(); its.Next()) { @@ -675,7 +674,7 @@ BRepFeat_Status BRepFeat_MakeCylindricalHole::Validate () { BRepFeat_Status thestat = BRepFeat_NoError; TopExp_Explorer ex(myBuilder.ResultingShape(),TopAbs_FACE); - if (myIsBlind) { // trou borgne + if (myIsBlind) { // limit of the hole for (; ex.More(); ex.Next()) { if (ex.Current().IsSame(myTopFace) ) { break; @@ -712,7 +711,7 @@ void Baryc(const TopoDS_Shape& S, gp_Pnt& B) Standard_Integer i, nbp= 0; for (; exp.More(); exp.Next()) { - // On calcule 11 points par edges no degenerees + // Calculate points by non-degenerated edges const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); if (!BRep_Tool::Degenerated(E)) { C = BRep_Tool::Curve(E,L,First,Last); @@ -735,7 +734,7 @@ void BoxParameters(const TopoDS_Shape& S, Standard_Real& parmax) { - // calcul des parametres d`une boite englobante selon l`axe du trou + // calculate the parameters of a bounding box in the direction of the axis of the hole Bnd_Box B; BRepBndLib::Add(S,B); Standard_Real c[6]; diff --git a/src/BRepFeat/BRepFeat_MakeDPrism.cxx b/src/BRepFeat/BRepFeat_MakeDPrism.cxx index 8a77308c21..475980b871 100755 --- a/src/BRepFeat/BRepFeat_MakeDPrism.cxx +++ b/src/BRepFeat/BRepFeat_MakeDPrism.cxx @@ -181,7 +181,7 @@ void BRepFeat_MakeDPrism::Init(const TopoDS_Shape& Sbase, //======================================================================= //function : Add -//purpose : add faces et edges de glissement +//purpose : add sliding faces and edges //======================================================================= void BRepFeat_MakeDPrism::Add(const TopoDS_Edge& E, @@ -228,7 +228,7 @@ void BRepFeat_MakeDPrism::Add(const TopoDS_Edge& E, //======================================================================= //function : Perform -//purpose : feature de la hauteur Height +//purpose : feature of Height //======================================================================= void BRepFeat_MakeDPrism::Perform(const Standard_Real Height) @@ -296,20 +296,20 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height) } } -// gestion des faces de collage +// management of gluing faces //SetGluedFaces(mySkface, mySbase, theBase, mySlface, theDPrism, myGluedF); GluedFacesValid(); // VerifGluedFaces(mySkface, theBase, myBCurve, myCurves, theDPrism, myGluedF); - if(!myGluedF.IsEmpty()) { // cas collage + if(!myGluedF.IsEmpty()) { // case gluing myJustGluer = Standard_True; theDPrism.Curves(myCurves); myBCurve = theDPrism.BarycCurve(); GlobalPerform(); } -// si il n'y a pas de collage -> appel des ope topo +// if there is no gluing -> call topological operations if(!myJustGluer) { if(myFuse == 1) { //modified by NIZNHY-PKV Thu Mar 21 17:32:17 2002 f @@ -342,7 +342,7 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height) //======================================================================= //function : Perform -//purpose : feature limitee par le shape Until +//purpose : feature limited by the shape Until //======================================================================= void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until) @@ -481,7 +481,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until) //======================================================================= //function : Perform -//purpose : feature limitee par les deux shapes +//purpose : feature limited by two shapes //======================================================================= void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From, @@ -550,22 +550,22 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From, if(!Trff) { MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); - // On fait systematiquement le dprism + // Make systematically dprism myGShape = VraiDPrism; GeneratedShapeValid(); - // gestion des faces de collage + // management of gluing faces //SetGluedFaces(TopoDS_Face(), // on ne veut pas binder mySkface // mySbase, myPbase, mySlface, theDPrism, myGluedF); GluedFacesValid(); theDPrism.Curves(myCurves); myBCurve = theDPrism.BarycCurve(); - // reconstruction topologique + // topologic reconstruction GlobalPerform(); } else { - // gestion des descendants + // management of descendants MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); Handle(Geom_Curve) C1; if(sens == -1) { @@ -583,7 +583,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From, ASI2.Perform(scur); TopAbs_Orientation OrU, OrF; TopoDS_Face FFrom, FUntil; - //sens du dprism + //direction of dprism if (ASI1.IsDone() && ASI1.NbPoints(1) >=1) { if (myFuse == 1) { OrU = ASI1.Point(1,1).Orientation(); @@ -701,7 +701,7 @@ void BRepFeat_MakeDPrism::PerformUntilEnd() //======================================================================= //function : PerformFromEnd -//purpose : feature mi-infinie limitee par le shape Until de l'autre cote +//purpose : feature semiinfinite limited by the shape Until from the other side //======================================================================= void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until) @@ -743,7 +743,7 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until) return; } - if(!Trf) { // cas face finie + if(!Trf) { // case finite face MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); myGShape = VraiDPrism; GeneratedShapeValid(); @@ -753,7 +753,7 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until) myBCurve = theDPrism.BarycCurve(); GlobalPerform(); } - else { // cas support + else { // case support MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); Handle(Geom_Curve) C2; if(sens == -1) { @@ -864,7 +864,7 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until) //======================================================================= //function : PerformThruAll -//purpose : feature a travers tout le shape initial +//purpose : feature throughout the entire initial shape //======================================================================= void BRepFeat_MakeDPrism::PerformThruAll() @@ -921,7 +921,7 @@ void BRepFeat_MakeDPrism::PerformThruAll() //======================================================================= //function : PerformUntilHeight -//purpose : feature jusqu'un shape de la hauteur donnee +//purpose : feature until the shape is of the given height //======================================================================= void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until, @@ -956,7 +956,7 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until, LocOpe_DPrism theDPrism(myPbase,sens*Height,myAngle); TopoDS_Shape VraiDPrism = theDPrism.Shape(); - if(!Trf) { // cas face finie + if(!Trf) { // case face finished MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); myGShape = VraiDPrism; GeneratedShapeValid(); @@ -978,7 +978,7 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until, myBCurve = theDPrism.BarycCurve(); GlobalPerform(); } - else { // cas support + else { // case support MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); Handle(Geom_Curve) C1; if(sens == -1) { @@ -1045,7 +1045,7 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until, //======================================================================= //function : Curves -//purpose : courbes paralleles a l'axe du prism +//purpose : curves parallel to the axis of the prism //======================================================================= void BRepFeat_MakeDPrism::Curves(TColGeom_SequenceOfCurve& scur) @@ -1090,7 +1090,7 @@ void BRepFeat_MakeDPrism::BossEdges (const Standard_Integer signature) // Edges Bottom if (signature < 0) { -// Attention voir si TgtEdges est important +// Attention check if TgtEdges is important myLatEdges = NewEdges(); } else if (signature > 0) { @@ -1180,7 +1180,7 @@ Handle(Geom_Curve) BRepFeat_MakeDPrism::BarycCurve() //======================================================================= //function : HeightMax -//purpose : Calcul de la hauteur du prisme selon les parametres d`une boite englobante +//purpose : Calculate the height of the prism following the parameters of the bounding box //======================================================================= static Standard_Real HeightMax(const TopoDS_Shape& theSbase, // shape initial @@ -1224,7 +1224,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase, // shape initial //======================================================================= //function : SensOfPrism -//purpose : determiner la direction de generation du prism +//purpose : determine the direction of prism generation //======================================================================= Standard_Integer SensOfPrism(const Handle(Geom_Curve) C, const TopoDS_Shape& Until) @@ -1284,7 +1284,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface, } } - // Glissements + // Sliding TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap); if(!theSlmap.IsEmpty()) { for (; itm.More(); itm.Next()) { @@ -1307,8 +1307,8 @@ static void SetGluedFaces(const TopoDS_Face& theSkface, //======================================================================= //function : VerifGluedFaces -//purpose : Verification intersection Outil/theSkface = thePbase -// Si oui -> OK si non -> cas sans collage +//purpose : Checking intersection Tool/theSkface = thePbase +// if yes -> OK if no -> case without gluing //======================================================================= #ifdef DEB static void VerifGluedFaces(const TopoDS_Face& theSkface, @@ -1360,7 +1360,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface, if (!GluedFaces) { #ifdef DEB Standard_Boolean trc = BRepFeat_GettraceFEAT(); - if (trc) cout << " Intersection DPrism/skface : pas de collage" << endl; + if (trc) cout << " Intersection DPrism/skface : no gluing" << endl; #endif theMap.Clear(); } @@ -1492,7 +1492,7 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1, Standard_Boolean ValRet = Standard_False; if (typS1 == STANDARD_TYPE(Geom_Plane)) { - S1 = BRep_Tool::Surface(F1); // pour appliquer la location. + S1 = BRep_Tool::Surface(F1); // to apply the location. S2 = BRep_Tool::Surface(F2); gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln()); gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln()); diff --git a/src/BRepFeat/BRepFeat_MakeLinearForm.cxx b/src/BRepFeat/BRepFeat_MakeLinearForm.cxx index b120de348e..3333096a87 100755 --- a/src/BRepFeat/BRepFeat_MakeLinearForm.cxx +++ b/src/BRepFeat/BRepFeat_MakeLinearForm.cxx @@ -139,8 +139,8 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, Done(); myGenerated.Clear(); -// modify = 0 si on ne veut pas faire de glissement -// = 1 si on veut essayer de faire un glissement +// modify = 0 if there is no intention to make sliding +// = 1 if one tries to make sliding Standard_Boolean Sliding = Modify; myLFMap.Clear(); @@ -176,7 +176,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, #endif -// ---Determination Tolerance : tolerance max sur les parametres +// ---Determine Tolerance : max tolerance on parameters myTol = Precision::Confusion(); TopExp_Explorer exx; @@ -194,8 +194,8 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, if(tol > myTol) myTol = tol; } -// ---Controle des directions -// le wire doit etre dans la nervure +// ---Control of directions +// the wire should be in the rib gp_Vec nulldir(0, 0, 0); if(!myDir1.IsEqual(nulldir, myTol, myTol)) { Standard_Real ang = myDir1.Angle(myDir); @@ -225,7 +225,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, myPln->Transform(T); } -// ---Calcul boite englobante +// ---Calculate bounding box BRep_Builder BB; TopTools_ListOfShape theList; @@ -240,7 +240,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, TopoDS_Solid BndBox = Bndbox.Solid(); -// ---Construction de la face plan de travail (section boite englobante) +// ---Construction of the face workplane (section bounding box) BRepLib_MakeFace PlaneF(myPln->Pln(), -6.*myBnd, 6.*myBnd, -6.*myBnd, 6.*myBnd); TopoDS_Face PlaneFace = TopoDS::Face(PlaneF.Shape()); @@ -257,7 +257,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, TopoDS_Face BndFace = TopoDS::Face(Bndface.Shape()); -// ---Recherche des faces d'appui de la nervure +// ---Find support faces of the rib TopoDS_Edge FirstEdge, LastEdge; TopoDS_Face FirstFace, LastFace; TopoDS_Vertex FirstVertex, LastVertex; @@ -286,23 +286,23 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, } -// ---Point detrompeur pour le cote du wire a remplir - cote matiere +// ---Proofing Point for the side of the wire to be filled - side material gp_Pnt CheckPnt = CheckPoint(FirstEdge, bnd/10., myPln); // Standard_Real f, l; -// ---Controle glissement valable -// Plein de cas ou on sort du glissement - Standard_Integer Concavite = 3; // a priori le profile n'est pas concave +// ---Control sliding valuable +// Many cases when the sliding is abandoned + Standard_Integer Concavite = 3; // a priori the profile is not concave myFirstPnt = BRep_Tool::Pnt(FirstVertex); myLastPnt = BRep_Tool::Pnt(LastVertex); -// SliList : liste des faces concernees par la nervure +// SliList : list of faces concerned by the rib TopTools_ListOfShape SliList; SliList.Append(FirstFace); - if(Sliding) { // glissement + if(Sliding) { // sliding #ifdef DEB if (trc) cout << " Sliding" << endl; #endif @@ -315,15 +315,15 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, } if(s->DynamicType() == STANDARD_TYPE(Geom_Plane) || s->DynamicType() == STANDARD_TYPE(Geom_CylindricalSurface)) { -// si plan ou cylindre : glissement possible +// if plane or cylinder : sliding is possible Sliding = Standard_True; } } -// Controle uniquement points de depart et d'arrivee -// -> pas de controle au milieu - a ameliorer -// Si on faisait un controle entre Surface et sgement entre les 2 points limite -// -> tres cher - a ameliorer +// Control only start and end points +// -> no control at the middle - improve +// Controle between Surface and segment between 2 limit points +// is too expensive - improve if(Sliding) { gp_Pnt p1(myFirstPnt.X()+myDir.X(),myFirstPnt.Y()+myDir.Y(), myFirstPnt.Z()+myDir.Z()); @@ -333,7 +333,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, gp_Pnt p2(myLastPnt.X()+myDir.X(),myLastPnt.Y()+myDir.Y(), myLastPnt.Z()+myDir.Z()); BRepLib_MakeEdge ee2(myLastPnt, p2); - BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : courbes et surfaces + BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : curves and surfaces if(ext2.NbExt() == 1 && ext2.SquareDistance(1)<=BRep_Tool::Tolerance(LastFace) * BRep_Tool::Tolerance(LastFace)) { Sliding = Standard_True; } @@ -371,13 +371,13 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, } -// On construit un gros profil qui va jusqu`a la boite englobante -// -> par tangence avec premier et dernier edge du Wire -// -> par normales aux faces d'appui : statistiquement meilleur -// On intersecte le tout pour trouver le profil final +// Construct a great profile that goes till the bounding box +// -> by tangency with the first and the last edge of the Wire +// -> by normals to the support faces : statistically better +// Intersect everything to find the final profile -// ---cas de glissement : construction de la face profil +// ---case of sliding : construction of the profile face if(Sliding) { #ifdef DEB if (trc) cout << " still Sliding" << endl; @@ -399,11 +399,11 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, } -// ---Propagation sur les faces du shape initial -// pour trouver les faces concernees par la nervure +// ---Propagation on faces of the initial shape +// to find the faces concerned by the rib Standard_Boolean falseside = Standard_True; Sliding = Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside); -// Controle si on a ce qu`il faut pour avoir la matiere du bon cote +// Control if there is everything required to have the material at the proper side if(falseside == Standard_False) { #ifdef DEB cout << "Verify plane and wire orientation" << endl; @@ -415,7 +415,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, } -// ---Generation du profile de base de la nervure +// ---Generation of the base of the rib profile TopoDS_Wire w; BB.MakeWire(w); @@ -423,10 +423,10 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, TopoDS_Vertex theFV; thePreviousEdge.Nullify(); -// compteur du nombre d`edges pour remplir la map +// calculate the number of edges to fill the map Standard_Integer counter = 1; -// ---cas de glissement +// ---case of sliding if(Sliding && !myListOfEdges.IsEmpty()) { BRepTools_WireExplorer EX1(myWire); for(; EX1.More(); EX1.Next()) { @@ -480,7 +480,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, } } -// Cas plusieurs edges +// Case of several edges if(!FirstEdge.IsSame(LastEdge)) { for(; EX1.More(); EX1.Next()) { const TopoDS_Edge& E = EX1.Current(); @@ -698,8 +698,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, mySlface = SlidMap; } -// ---Arguments de LocOpe_LinearForm : arguments du prism -// glissement +// ---Arguments of LocOpe_LinearForm : arguments of the prism sliding if(Sliding) { TopoDS_Face F; BB.MakeFace(F, myPln, myTol); @@ -711,7 +710,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, } -// ---Cas sans glissement : construction de la face profil +// ---Case without sliding : construction of the profile face if(!Sliding) { #ifdef DEB if (trc) { @@ -737,11 +736,11 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, } -// ---Propagation sur les faces du shape initial -// pour trouver les faces concernees par la nervure +// ---Propagation on faces of the initial shape +// to find the faces concerned by the rib Standard_Boolean falseside = Standard_True; Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside); -// Controle si on a ce qu`il faut pour avoir la matiere du bon cote +// Control if there is everything required to have the material at the proper side if(falseside == Standard_False) { #ifdef DEB cout << "Verify plane and wire orientation" << endl; @@ -825,7 +824,7 @@ void BRepFeat_MakeLinearForm::Add(const TopoDS_Edge& E, //======================================================================= //function : Perform -//purpose : construction de nervure a partir d'un profile et du shape init +//purpose : construction of rib from a profile and the initial shape //======================================================================= void BRepFeat_MakeLinearForm::Perform() @@ -864,11 +863,11 @@ void BRepFeat_MakeLinearForm::Perform() else theForm.Perform(myPbase, V, myDir1, myFirstPnt, myLastPnt); - TopoDS_Shape VraiForm = theForm.Shape(); // primitive de la nervure + TopoDS_Shape VraiForm = theForm.Shape(); // primitive of the rib myFacesForDraft.Append(theForm.FirstShape()); myFacesForDraft.Append(theForm.LastShape()); - MajMap(myPbase,theForm,myMap,myFShape,myLShape); // gestion de descendants + MajMap(myPbase,theForm,myMap,myFShape,myLShape); // management of descendants TopExp_Explorer exx(myPbase, TopAbs_EDGE); for(; exx.More(); exx.Next()) { @@ -884,7 +883,7 @@ void BRepFeat_MakeLinearForm::Perform() } myGShape = VraiForm; - SetGluedFaces(mySlface, theForm, myGluedF); // gestion des faces de glissement + SetGluedFaces(mySlface, theForm, myGluedF); // management of sliding faces if(!myGluedF.IsEmpty() && !mySUntil.IsNull()) { #ifdef DEB @@ -937,8 +936,8 @@ void BRepFeat_MakeLinearForm::Perform() //======================================================================= //function : Propagate -//purpose : propagation sur les faces du shape initial, recherche -// des faces concernees par la nervure +//purpose : propagation on faces of the initial shape, find +// faces concerned by the rib //======================================================================= Standard_Boolean BRepFeat_MakeLinearForm::Propagate(TopTools_ListOfShape& SliList, const TopoDS_Face& fac, @@ -1013,7 +1012,7 @@ void BRepFeat_MakeLinearForm::Perform() myListOfEdges.Clear(); myListOfEdges.Append(eb); - // Les deux points sont sur la meme face. + // two points are on the same face. if(LastOK && FirstOK) { return result; } @@ -1040,7 +1039,7 @@ void BRepFeat_MakeLinearForm::Perform() tvp=t1; } - // retrouver l'edge connexe a v1 ou v2: + // find edge connected to v1 or v2: for (ex.Init(CurrentFace, TopAbs_EDGE); ex.More(); ex.Next()) { const TopoDS_Edge& rfe = TopoDS::Edge(ex.Current()); @@ -1058,8 +1057,8 @@ void BRepFeat_MakeLinearForm::Perform() if (index != 0) { if (dist2min <= BRep_Tool::Tolerance(rfe) * BRep_Tool::Tolerance(rfe)) { FirstEdge = rfe; - // Si l'edge n'est pas perpendiculaire au plan de la nervure il - // faut mettre Sliding(result) a faux. + // If the edge is not perpendicular to the plane of the rib + // it is required to set Sliding(result) to false. if (result) { result=Standard_False; ve1 = TopExp::FirstVertex(rfe,Standard_True); @@ -1146,7 +1145,7 @@ void BRepFeat_MakeLinearForm::Perform() } } else { - // on arrive pas a chainer la section + // end by chaining the section return Standard_False; } // #ifdef DEB @@ -1167,7 +1166,7 @@ void BRepFeat_MakeLinearForm::Perform() //======================================================================= //function : MajMap -//purpose : gestion de descendants +//purpose : management of descendants //======================================================================= static void MajMap(const TopoDS_Shape& theB, @@ -1211,14 +1210,14 @@ static void MajMap(const TopoDS_Shape& theB, //======================================================================= //function : SetGluedFaces -//purpose : gestion des faces de collage +//purpose : management of faces of gluing //======================================================================= static void SetGluedFaces(const TopTools_DataMapOfShapeListOfShape& theSlmap, LocOpe_LinearForm& thePrism, TopTools_DataMapOfShapeShape& theMap) { - // Glissements + // Slidings TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap); if(!theSlmap.IsEmpty()) { for (; itm.More(); itm.Next()) { diff --git a/src/BRepFeat/BRepFeat_MakePipe.cxx b/src/BRepFeat/BRepFeat_MakePipe.cxx index 5d1add3ed8..a441e06eca 100755 --- a/src/BRepFeat/BRepFeat_MakePipe.cxx +++ b/src/BRepFeat/BRepFeat_MakePipe.cxx @@ -131,7 +131,7 @@ void BRepFeat_MakePipe::Init(const TopoDS_Shape& Sbase, //======================================================================= //function : Add -//purpose : add faces de collage +//purpose : add faces of gluing //======================================================================= void BRepFeat_MakePipe::Add(const TopoDS_Edge& E, @@ -245,7 +245,7 @@ void BRepFeat_MakePipe::Perform() //======================================================================= //function : Perform -//purpose : jusqu'au shape Until +//purpose : till shape Until //======================================================================= void BRepFeat_MakePipe::Perform(const TopoDS_Shape& Until) @@ -289,7 +289,7 @@ void BRepFeat_MakePipe::Perform(const TopoDS_Shape& Until) //======================================================================= //function : Perform -//purpose : entre From et Until +//purpose : between From and Until //======================================================================= void BRepFeat_MakePipe::Perform(const TopoDS_Shape& From, @@ -350,7 +350,7 @@ void BRepFeat_MakePipe::Perform(const TopoDS_Shape& From, //======================================================================= //function : Curves -//purpose : courbes paralleles au wire-generarice du pipe +//purpose : curves parallel to the generating wire of the pipe //======================================================================= void BRepFeat_MakePipe::Curves(TColGeom_SequenceOfCurve& scur) @@ -360,7 +360,7 @@ void BRepFeat_MakePipe::Curves(TColGeom_SequenceOfCurve& scur) //======================================================================= //function : BarycCurve -//purpose : passe par le centre des masses +//purpose : pass through the center of mass //======================================================================= Handle(Geom_Curve) BRepFeat_MakePipe::BarycCurve() @@ -371,7 +371,7 @@ Handle(Geom_Curve) BRepFeat_MakePipe::BarycCurve() //======================================================================= //function : SetGluedFaces -//purpose : gestion des faces de collage et glissement +//purpose : management of faces of gluing and sliding //======================================================================= static void SetGluedFaces(const TopoDS_Face& theSkface, @@ -403,7 +403,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface, } } - // Glissements + // Sliding TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap); if(!theSlmap.IsEmpty()) { for (; itm.More(); itm.Next()) { @@ -427,7 +427,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface, //======================================================================= //function : MajMap -//purpose : gestion de descendants +//purpose : management of descendants //======================================================================= static void MajMap(const TopoDS_Shape& theB, diff --git a/src/BRepFeat/BRepFeat_MakePrism.cxx b/src/BRepFeat/BRepFeat_MakePrism.cxx index 3318eba5fd..701e74b97e 100755 --- a/src/BRepFeat/BRepFeat_MakePrism.cxx +++ b/src/BRepFeat/BRepFeat_MakePrism.cxx @@ -178,7 +178,7 @@ void BRepFeat_MakePrism::Init(const TopoDS_Shape& Sbase, //======================================================================= //function : Add -//purpose : add elements de glissemant (edge sur face) +//purpose : add elements of sliding (edge on face) //======================================================================= void BRepFeat_MakePrism::Add(const TopoDS_Edge& E, @@ -225,8 +225,8 @@ void BRepFeat_MakePrism::Add(const TopoDS_Edge& E, //======================================================================= //function : Perform -//purpose : construction du prism de longueur Length et -// appel de reconstruction topo +//purpose : construction of prism of length Length and +// call of reconstruction topo //======================================================================= void BRepFeat_MakePrism::Perform(const Standard_Real Length) @@ -244,24 +244,24 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length) PerfSelectionValid(); gp_Vec V(Length*myDir); - //construction de prism de hauteur Length +//construction of prism of height Length LocOpe_Prism thePrism(myPbase,V); TopoDS_Shape VraiPrism = thePrism.Shape(); -// gestion des descendants +// management of descendants MajMap(myPbase,thePrism,myMap,myFShape,myLShape); - myGShape = VraiPrism; // la primitive + myGShape = VraiPrism; // the primitive GeneratedShapeValid(); TopoDS_Face FFace; Standard_Boolean found = Standard_False; -// essai de detecter des faces de collage -//cas le top du prism est tgt au shape initial +// try to detect the faces of gluing +// in case if the top of the prism is tangent to the initial shape if(!mySkface.IsNull() || !mySlface.IsEmpty()) { if(myLShape.ShapeType() == TopAbs_WIRE) { @@ -291,20 +291,20 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length) } } -// gestion des faces de collage donnees par l'utilisateur +// management of faces of gluing given by the user // SetGluedFaces(mySkface, mySbase, myPbase, mySlface, thePrism, myGluedF); GluedFacesValid(); // VerifGluedFaces(mySkface, myPbase, myBCurve, myCurves, thePrism, myGluedF); - if(!myGluedF.IsEmpty()) { // cas collage + if(!myGluedF.IsEmpty()) { // case gluing myJustGluer = Standard_True; thePrism.Curves(myCurves); myBCurve = thePrism.BarycCurve(); - GlobalPerform(); // reconstruction topologique + GlobalPerform(); // topological reconstruction } -// si il n'y a pas de collage -> appel des ope topo +// if there is no gluing -> call of ope topo if(!myJustGluer) { if(myFuse == 1 && !myJustFeat) { //modified by NIZNHY-PKV Thu Mar 21 17:55:30 2002 f @@ -338,8 +338,8 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length) //======================================================================= //function : Perform -//purpose : construction de prism oriente vers la face Until, suffisemment -// long; appel de reconstruction topo +//purpose : construction of prism oriented at the face Until, sufficiently +// long; call of topological reconstruction //======================================================================= void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until) @@ -368,11 +368,11 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until) Standard_Real Height = HeightMax(mySbase, mySkface, mySFrom, mySUntil); gp_Vec V(2*sens*Height*myDir); -// construction du prism long +// construction of long prism LocOpe_Prism thePrism(myPbase,V); TopoDS_Shape VraiPrism = thePrism.Shape(); -// dans le cas de support de face Until +// in case of support of face Until if(!Trf) { MajMap(myPbase,thePrism,myMap,myFShape,myLShape); myGShape = VraiPrism; @@ -386,13 +386,13 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until) myBCurve = thePrism.BarycCurve(); GlobalPerform(); } - else { // until support -> passage en ope topo + else { // until support -> passage to topological operations MajMap(myPbase,thePrism,myMap,myFShape,myLShape); TColGeom_SequenceOfCurve scur; scur.Clear(); scur.Append(C); -// sens du prism en fonction de Until +// direction of the prism depending on Until LocOpe_CSIntersector ASI(mySUntil); ASI.Perform(scur); @@ -447,7 +447,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until) } } } -/* // boucle de controle de descendance +/* // loop of control of descendance TopExp_Explorer expr(mySbase, TopAbs_FACE); char nom1[20], nom2[20]; @@ -487,8 +487,8 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until) //======================================================================= //function : Perform -//purpose : construction d'un prisme suffisemment long et bien oriente -// appel de reconstruction topo +//purpose : construction of a sufficiently long and properly oriented prism +// call of topological reconstruction //======================================================================= void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From, @@ -539,12 +539,12 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From, return; } -// longueur en fonction des boites englobantes +// length depending on bounding boxes Standard_Real Height = HeightMax(mySbase, mySkface, mySFrom, mySUntil); Handle(Geom_Curve) C = TestCurve(myPbase,myDir); - Standard_Integer sens; // sens de prism - Standard_Integer tran; // transfert de prism + Standard_Integer sens; // direction of prism + Standard_Integer tran; // transfer of prism if(From.IsSame(Until)) { sens = 1; tran = -1; @@ -578,7 +578,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From, myBCurve = thePrism.BarycCurve(); GlobalPerform(); } - else { // cas until support -> ope topo + else { // case until support -> topological operation MajMap(myPbase,thePrism,myMap,myFShape,myLShape); TColGeom_SequenceOfCurve scur; scur.Clear(); @@ -668,7 +668,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From, Done(); } } -// controle historique +// control history /* TopExp_Explorer expr(mySbase, TopAbs_FACE); char nom1[20], nom2[20]; @@ -709,7 +709,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From, //======================================================================= //function : PerformUntilEnd -//purpose : construction d'un prism et reconstruction +//purpose : construction of a prism and reconstruction //======================================================================= void BRepFeat_MakePrism::PerformUntilEnd() @@ -797,7 +797,7 @@ void BRepFeat_MakePrism::PerformFromEnd(const TopoDS_Shape& Until) LocOpe_Prism thePrism(myPbase,Vect,Vtra); TopoDS_Shape VraiPrism = thePrism.Shape(); - if(!Trf) { // cas face until + if(!Trf) { // case face until MajMap(myPbase,thePrism,myMap,myFShape,myLShape); myGShape = VraiPrism; GeneratedShapeValid(); @@ -807,7 +807,7 @@ void BRepFeat_MakePrism::PerformFromEnd(const TopoDS_Shape& Until) myBCurve = thePrism.BarycCurve(); GlobalPerform(); } - else { // cas support + else { // case support MajMap(myPbase,thePrism,myMap,myFShape,myLShape); TColGeom_SequenceOfCurve scur; scur.Clear(); @@ -1075,7 +1075,7 @@ void BRepFeat_MakePrism::PerformUntilHeight(const TopoDS_Shape& Until, //======================================================================= //function : Curves -//purpose : sequence de courbes paralleles a l'axe de prism +//purpose : sequence of curves parallel to the axis of prism //======================================================================= void BRepFeat_MakePrism::Curves(TColGeom_SequenceOfCurve& scur) @@ -1085,8 +1085,8 @@ void BRepFeat_MakePrism::Curves(TColGeom_SequenceOfCurve& scur) //======================================================================= //function : BarycCurve -//purpose : courbe parallele a l'axe du prisme passant par le centre des -// masses +//purpose : curve parallel to the axis of the prism passing through the center +// of masses //======================================================================= Handle(Geom_Curve) BRepFeat_MakePrism::BarycCurve() @@ -1097,8 +1097,8 @@ Handle(Geom_Curve) BRepFeat_MakePrism::BarycCurve() //======================================================================= //function : HeightMax -//purpose : Calcul de la hauteur du prisme selon les parametres de -// boite englobante +//purpose : Calculate the height of the prism following the parameters of +// bounding box //======================================================================= static Standard_Real HeightMax(const TopoDS_Shape& theSbase, @@ -1167,7 +1167,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase, //======================================================================= //function : SensOfPrism -//purpose : sens de prism en fonction du shape Until +//purpose : Direction of the prism depending on the shape Until //======================================================================= Standard_Integer SensOfPrism(const Handle(Geom_Curve) C, const TopoDS_Shape& Until) @@ -1193,7 +1193,7 @@ Standard_Integer SensOfPrism(const Handle(Geom_Curve) C, //======================================================================= //function : SetGluedFaces -//purpose : gestion de faces de collage +//purpose : management of gluing faces //======================================================================= static void SetGluedFaces(const TopoDS_Face& theSkface, @@ -1224,7 +1224,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface, } } - // Glissements + // Sliding TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap); if(!theSlmap.IsEmpty()) { for (; itm.More(); itm.Next()) { @@ -1248,8 +1248,8 @@ static void SetGluedFaces(const TopoDS_Face& theSkface, //======================================================================= //function : VerifGluedFaces -//purpose : Verification intersection Outil/theSkface = thePbase -// Si oui -> OK si non -> cas sans collage +//purpose : Verification intersection Tool/theSkface = thePbase +// If yes -> OK otherwise -> case without gluing //======================================================================= #ifdef DEB static void VerifGluedFaces(const TopoDS_Face& theSkface, @@ -1301,7 +1301,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface, if (!GluedFaces) { #ifdef DEB Standard_Boolean trc = BRepFeat_GettraceFEAT(); - if (trc) cout << " Intersection Prism/skface : pas de collage" << endl; + if (trc) cout << " Intersection Prism/skface : no gluing" << endl; #endif theMap.Clear(); } @@ -1311,7 +1311,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface, //======================================================================= //function : MajMap -//purpose : gestion des descendants +//purpose : management of descendants //======================================================================= static void MajMap(const TopoDS_Shape& theB, @@ -1352,7 +1352,7 @@ static void MajMap(const TopoDS_Shape& theB, //======================================================================= //function : MajMap -//purpose : gestion des descendants +//purpose : management of descendants //======================================================================= static Handle(Geom_Curve) TestCurve(const TopoDS_Shape& Base, @@ -1376,7 +1376,7 @@ static Handle(Geom_Curve) TestCurve(const TopoDS_Shape& Base, //======================================================================= //function : ToFuse -//purpose : face SameDomaine ou pas +//purpose : face SameDomaine or not //======================================================================= Standard_Boolean ToFuse(const TopoDS_Face& F1, @@ -1415,7 +1415,7 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1, Standard_Boolean ValRet = Standard_False; if (typS1 == STANDARD_TYPE(Geom_Plane)) { - S1 = BRep_Tool::Surface(F1); // pour appliquer la location. + S1 = BRep_Tool::Surface(F1); // to apply the location. S2 = BRep_Tool::Surface(F2); gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln()); gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln()); diff --git a/src/BRepFeat/BRepFeat_MakeRevol.cxx b/src/BRepFeat/BRepFeat_MakeRevol.cxx index ddd32018d1..83dbf759eb 100755 --- a/src/BRepFeat/BRepFeat_MakeRevol.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevol.cxx @@ -166,7 +166,7 @@ void BRepFeat_MakeRevol::Init(const TopoDS_Shape& Sbase, //======================================================================= //function : Add -//purpose : add faces et edges de glissement +//purpose : add faces add edges of sliding //======================================================================= void BRepFeat_MakeRevol::Add(const TopoDS_Edge& E, @@ -342,7 +342,7 @@ void BRepFeat_MakeRevol::Perform(const Standard_Real Angle) //======================================================================= //function : Perform -//purpose : feature jusqu'au shape Until +//purpose : feature till shape Until //======================================================================= void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until) @@ -374,13 +374,13 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until) Standard_Boolean Trf = TransformShapeFU(1); ShapeUntilValid(); - // On fait systematiquement un revol quasi-complet -// BRepSweep_Revol theRevol(myPbase,myAxis,2.*PI-10.*Precision::Angular()); +// Do systematically almost complete revolution +// BRepSweep_Revol theRevol(myPbase,myAxis,2.*PI-10.*Precision::Angular()); LocOpe_Revol theRevol; if(!TourComplet) { Angle = 2.*PI- 3*PI/180.; #ifdef DEB - if (trc) cout << " No complete Revol" << endl; + if (trc) cout << " No complete Revolution" << endl; #endif } theRevol.Perform(myPbase, myAxis, Angle); @@ -471,7 +471,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until) } } } - // boucle de controle de descendance + // Loop of control of descendance /* TopExp_Explorer expr(mySbase, TopAbs_FACE); char nom1[20], nom2[20]; @@ -511,7 +511,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until) //======================================================================= //function : Perform -//purpose : feature limitee par les deux shapes +//purpose : feature limited by two shapes //======================================================================= void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& From, @@ -680,7 +680,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& From, //======================================================================= //function : PerformThruAll -//purpose : feature a travers tout le shape initial +//purpose : feature throughout the initial shape //======================================================================= void BRepFeat_MakeRevol::PerformThruAll() @@ -694,7 +694,7 @@ void BRepFeat_MakeRevol::PerformThruAll() //======================================================================= //function : PerformUntilAngle -//purpose : feature jusqu'au shape Until definie avec l'angle +//purpose : feature till shape Until defined with the angle //======================================================================= void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until, @@ -727,7 +727,7 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until, Standard_Boolean Trf = TransformShapeFU(1); ShapeUntilValid(); - // On fait systematiquement un revol quasi-complet +// Produce systematicallt an almost complete revolution // BRepSweep_Revol theRevol(myPbase,myAxis,2.*PI-10.*Precision::Angular()); LocOpe_Revol theRevol; theRevol.Perform(myPbase, myAxis, Angle); @@ -821,7 +821,7 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until, } //======================================================================= //function : Curves -//purpose : cercles parallels a la generatrice du revol +//purpose : circles parallel to the generating edge of revolution //======================================================================= void BRepFeat_MakeRevol::Curves(TColGeom_SequenceOfCurve& scur) @@ -831,7 +831,7 @@ void BRepFeat_MakeRevol::Curves(TColGeom_SequenceOfCurve& scur) //======================================================================= //function : BarycCurve -//purpose : passe par le centre des masses de la primitive +//purpose : pass through the center of mass of the primitive //======================================================================= Handle(Geom_Curve) BRepFeat_MakeRevol::BarycCurve() @@ -842,7 +842,7 @@ Handle(Geom_Curve) BRepFeat_MakeRevol::BarycCurve() //======================================================================= //function : SetGluedFaces -//purpose : gestion des faces de collage +//purpose : management of gluing faces //======================================================================= static void SetGluedFaces(const TopoDS_Face& theSkface, @@ -874,7 +874,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface, } } - // Glissements + // Sliding TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap); if(!theSlmap.IsEmpty()) { for (; itm.More(); itm.Next()) { @@ -897,8 +897,8 @@ static void SetGluedFaces(const TopoDS_Face& theSkface, //======================================================================= //function : VerifGluedFaces -//purpose : Verification intersection Outil/theSkface = thePbase -// Si oui -> OK si non -> cas sans collage +//purpose : Check intersection Tool/theSkface = thePbase +// if yes -> OK otherwise -> case without gluing //======================================================================= static void VerifGluedFaces(const TopoDS_Face& theSkface, @@ -950,7 +950,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface, if (!GluedFaces) { #ifdef DEB Standard_Boolean trc = BRepFeat_GettraceFEAT(); - if (trc) cout << " Intersection Revol/skface : pas de collage" << endl; + if (trc) cout << " Intersection Revol/skface : no gluing" << endl; #endif theMap.Clear(); } @@ -959,7 +959,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface, //======================================================================= //function : MajMap -//purpose : gestion de descendants +//purpose : management of descendants //======================================================================= static void MajMap(const TopoDS_Shape& theB, @@ -1001,7 +1001,7 @@ static void MajMap(const TopoDS_Shape& theB, //======================================================================= //function : ToFuse -//purpose : deux faces samedomaine ou pas +//purpose : two faces samedomaine or not //======================================================================= Standard_Boolean ToFuse(const TopoDS_Face& F1, @@ -1040,7 +1040,7 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1, Standard_Boolean ValRet = Standard_False; if (typS1 == STANDARD_TYPE(Geom_Plane)) { - S1 = BRep_Tool::Surface(F1); // pour appliquer la location. + S1 = BRep_Tool::Surface(F1); // to apply the location. S2 = BRep_Tool::Surface(F2); gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln()); gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln()); diff --git a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx index 321f0d0456..4cac84ab7f 100755 --- a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx @@ -160,8 +160,8 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, Standard_Boolean RevolRib = Standard_True; Done(); -// modify = 0 si on ne veut pas faire de glissement -// = 1 si on veut essayer de faire un glissement +// modify = 0 if it is not required to make sliding +// = 1 if it is intended to try to make sliding Standard_Boolean Sliding = Modify; myAxe = Axis; @@ -243,7 +243,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, } #endif -// ---Determination Tolerance : tolerance max sur les parametres +// ---Determination Tolerance : tolerance max on parameters myTol = Precision::Confusion(); exx.Init(W, TopAbs_VERTEX); @@ -274,7 +274,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, myFShape.Nullify(); myLShape.Nullify(); -// ---Calcul boite englobante +// ---Calculate bounding box BRep_Builder BB; TopTools_ListOfShape theList; @@ -289,7 +289,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, TopoDS_Solid BndBox = Bndbox.Solid(); -// ---Construction de la face plan de travail (section boite englobante) +// ---Construction of the working plane face (section bounding box) BRepLib_MakeFace PlaneF(myPln->Pln(), -6.*myBnd, 6.*myBnd, -6.*myBnd, 6.*myBnd); TopoDS_Face PlaneFace = TopoDS::Face(PlaneF.Shape()); @@ -306,7 +306,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, TopoDS_Face BndFace = TopoDS::Face(Bndface.Shape()); -// ---Recherche des faces d'appui de la nervure +// ---Find base faces of the rib TopoDS_Edge FirstEdge, LastEdge; TopoDS_Face FirstFace, LastFace; TopoDS_Vertex FirstVertex, LastVertex; @@ -335,23 +335,23 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, } -// ---Point detrompeur pour le cote du wire a remplir - cote matiere +// ---Proofing Point for the side of the wire to be filled - material side gp_Pnt CheckPnt = CheckPoint(FirstEdge, bnd/10., myPln); // Standard_Real f, l; -// ---Controle glissement valable -// Plein de cas ou on sort du glissement - Standard_Integer Concavite = 3; // a priori le profile n'est pas concave +// ---Control sliding valid +// Many cases when the sliding is abandoned + Standard_Integer Concavite = 3; // a priori the profile is not concave myFirstPnt = BRep_Tool::Pnt(FirstVertex); myLastPnt = BRep_Tool::Pnt(LastVertex); -// SliList : liste des faces concernees par la nervure +// SliList : list of faces concerned by the rib TopTools_ListOfShape SliList; SliList.Append(FirstFace); - if(Sliding) { // glissement + if(Sliding) { // sliding #ifdef DEB if (trc) cout << " Sliding" << endl; #endif @@ -368,7 +368,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, Sliding = Standard_False; } - if(Sliding) { // glissement + if(Sliding) { // sliding Handle(Geom_Surface) ss = BRep_Tool::Surface(LastFace); if (ss->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) { @@ -382,15 +382,14 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, Sliding = Standard_False; } -// Controle uniquement points de depart et d'arrivee -// -> pas de controle au milieu - a ameliorer -// Si on faisait un controle entre Surface et sgement entre les 2 points limite -// -> tres cher - a ameliorer +// Control only start and end points no control at the middle to improve +// If make a control between Surface and segment 2 points limited +// -> too expensive - to improve //gp_Pnt FirstCenter, LastCenter; gp_Circ FirstCircle, LastCircle; Handle(Geom_Curve) FirstCrv, LastCrv; - if(Sliding) { // glissement + if(Sliding) { // sliding GeomAPI_ProjectPointOnCurve proj(myFirstPnt, Line); if(proj.NbPoints() < 1) { #ifdef DEB @@ -450,7 +449,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, Sliding = Standard_False; } if(Sliding && !PtOnLastEdge) { - BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : courbes et surfaces + BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : curves and surfaces if(ext2.NbExt() < 1 || ext2.SquareDistance(1) > Precision::Confusion() * Precision::Confusion()) Sliding = Standard_False; } @@ -507,13 +506,13 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, } -// On construit un gros profil qui va jusqu`a la boite englobante -// -> par tangence avec premier et dernier edge du Wire -// -> par normales aux faces d'appui : statistiquement meilleur -// On intersecte le tout pour trouver le profil final +// Construct a great profile that goes till the bounding box +// -> by tangency with first and last edge of the Wire +// -> by normals to base faces : statistically better +// Intersect everythin to find the final profile -// ---cas de glissement : construction de la face profil +// ---case of sliding : construction of the face profile if(Sliding) { #ifdef DEB if (trc) cout << " still Sliding" << endl; @@ -535,11 +534,11 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, } -// ---Propagation sur les faces du shape initial -// pour trouver les faces concernees par la nervure +// ---Propagation on faces of the initial shape +// to find the faces concerned by the rib Standard_Boolean falseside = Standard_True; Sliding = Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside); -// Controle si on a ce qu`il faut pour avoir la matiere du bon cote +// Control if there is everything required to have the material at the proper side if(falseside == Standard_False) { #ifdef DEB cout << " Verify plane and wire orientation" << endl; @@ -551,7 +550,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, } -// ---Generation du profile de base de la nervure +// ---Generation of the base profile of the rib TopoDS_Wire w; BB.MakeWire(w); @@ -559,10 +558,10 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, TopoDS_Vertex theFV; thePreviousEdge.Nullify(); -// compteur du nombre d`edges pour remplir la map +// counter of the number of edges to fill the map Standard_Integer counter = 1; -// ---cas de glissement +// ---case of sliding if(Sliding && !myListOfEdges.IsEmpty()) { BRepTools_WireExplorer EX1(myWire); for(; EX1.More(); EX1.Next()) { @@ -615,7 +614,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, } } -// Cas plusieurs edges +// Case of several edges if(!FirstEdge.IsSame(LastEdge)) { for(; EX1.More(); EX1.Next()) { const TopoDS_Edge& E = EX1.Current(); @@ -829,8 +828,8 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, mySlface = SlidMap; } -// ---Arguments de LocOpe_LinearForm : arguments du prism -// glissement +// ---Arguments of LocOpe_LinearForm : arguments of the prism +// sliding if(Sliding) { TopoDS_Face F; BB.MakeFace(F, myPln, myTol); @@ -841,7 +840,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, } -// ---Cas sans glissement : construction de la face profil +// ---Case without sliding : construction of the face profile if(!Sliding) { #ifdef DEB if (trc) { @@ -969,11 +968,11 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, } -// ---Propagation sur les faces du shape initial -// pour trouver les faces concernees par la nervure +// ---Propagation on the faces of the initial shape +// to find the faces concerned by the rib Standard_Boolean falseside = Standard_True; Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside); -// Controle si on a ce qu`il faut pour avoir la matiere du bon cote +// Control if there is everything required to have the material at the proper side if(falseside == Standard_False) { #ifdef DEB cout << " Verify plane and wire orientation" << endl; @@ -1017,7 +1016,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, //======================================================================= //function : Add -//purpose : add elements de collage +//purpose : add elements of gluing //======================================================================= void BRepFeat_MakeRevolutionForm::Add(const TopoDS_Edge& E, @@ -1125,16 +1124,16 @@ void BRepFeat_MakeRevolutionForm::Perform() } myPbase = Pbase; trsf.Perform(mySkface, Standard_False); -// flo : verif si il faut bien reaffecter le champ mySkface +// flo : check if it is required to reattributr the field mySkface // TopoDS_Face mySkface = TopoDS::Face(trsf.Shape()); mySkface = TopoDS::Face(trsf.Shape()); } LocOpe_RevolutionForm theForm; theForm.Perform(myPbase, myAxe, (myAngle1+myAngle2)); - TopoDS_Shape VraiForm = theForm.Shape(); // la primitive non-coupe + TopoDS_Shape VraiForm = theForm.Shape(); // uncut primitive -// gestion de descendants +// management of descendants MajMap(myPbase,theForm,myMap,myFShape,myLShape); myGluedF.Clear(); @@ -1198,7 +1197,7 @@ void BRepFeat_MakeRevolutionForm::Perform() // coupe de la nervure par deux plans parallels TopTools_DataMapOfShapeListOfShape SlidingMap; -// gestion de descendants +// management of descendants TopTools_DataMapIteratorOfDataMapOfShapeListOfShape it1; it1.Initialize(myMap); @@ -1252,10 +1251,10 @@ void BRepFeat_MakeRevolutionForm::Perform() } -// gestion des faces de glissement +// gestion of faces of sliding SetGluedFaces(mySlface, theForm, SlidingMap, myGluedF); - VraiForm = trP.Shape(); // primitive coupee + VraiForm = trP.Shape(); // primitive cut if(!myGluedF.IsEmpty()) myPerfSelection = BRepFeat_NoSelection; @@ -1287,14 +1286,14 @@ void BRepFeat_MakeRevolutionForm::Perform() return; } - LFPerform(); // reconstruction topologique + LFPerform(); // topological reconstruction } //======================================================================= //function : Propagate -//purpose : propagation sur les faces du shape inital, rechrche des faces -// concernees par la nervure +//purpose : propagation on the faces of the inital shape, find faces +// concerned by the rib //======================================================================= Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& SliList, @@ -1496,7 +1495,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl TopoDS_Vertex Vpreprevious; Vpreprevious.Nullify(); while(!FirstOK) { - // retrouver l'edge connexe a v1: + // find edge connected to v1: gp_Pnt pt; if(!v1.IsNull()) pt= BRep_Tool::Pnt(v1); gp_Pnt ptprev; @@ -1600,7 +1599,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl Vpreprevious.Nullify(); while(!LastOK) { - // retrouver l'edge connexe a v2: + // find edge connected to v2: gp_Pnt pt; if(!v2.IsNull()) pt= BRep_Tool::Pnt(v2); gp_Pnt ptprev; @@ -1700,7 +1699,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl //======================================================================= //function : MajMap -//purpose : gestion de descendants +//purpose : management of descendants //======================================================================= static void MajMap(const TopoDS_Shape& theB, @@ -1747,7 +1746,7 @@ static void MajMap(const TopoDS_Shape& theB, //======================================================================= //function : SetGluedFaces -//purpose : gestion des faces de glissement +//purpose : managemnet of sliding faces //======================================================================= static void SetGluedFaces(const TopTools_DataMapOfShapeListOfShape& theSlmap, @@ -1755,7 +1754,7 @@ static void SetGluedFaces(const TopTools_DataMapOfShapeListOfShape& theSlmap, const TopTools_DataMapOfShapeListOfShape& SlidingMap, TopTools_DataMapOfShapeShape& theMap) { - // Glissements + // Slidings TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap); if(!theSlmap.IsEmpty()) { for (; itm.More(); itm.Next()) { diff --git a/src/BRepFeat/BRepFeat_RibSlot.cxx b/src/BRepFeat/BRepFeat_RibSlot.cxx index 6228f6e4dd..f13bf3643a 100755 --- a/src/BRepFeat/BRepFeat_RibSlot.cxx +++ b/src/BRepFeat/BRepFeat_RibSlot.cxx @@ -99,7 +99,7 @@ Standard_IMPORT Standard_Boolean BRepFeat_GettraceFEATRIB(); //======================================================================= //function : LFPerform -//purpose : reconstruction topologique des nervures +//purpose : topological reconstruction of ribs //======================================================================= void BRepFeat_RibSlot::LFPerform() @@ -127,7 +127,7 @@ void BRepFeat_RibSlot::LFPerform() } Standard_Boolean ChangeOpe = Standard_False; - // On espere qu`il n`y a qu`un solide dans le resultat + // Hope that there is just a solid in the result Standard_Boolean UntilInShape = Standard_False; TopTools_MapOfShape M; @@ -174,7 +174,7 @@ void BRepFeat_RibSlot::LFPerform() LocOpe_Gluer theGlue; - //cas de collage + //case of gluing if (theOpe == 1) { Standard_Boolean Collage = Standard_True; @@ -216,12 +216,12 @@ void BRepFeat_RibSlot::LFPerform() theOpe = 2; ChangeOpe = Standard_True; #ifdef DEB - cout << "Passage en ope. topologique" << endl; + cout << "Passage to topological operations" << endl; #endif } } -// collage est toujours applicable +// gluing is always applicable if (theOpe == 1) { theGlue.Perform(); @@ -232,7 +232,7 @@ void BRepFeat_RibSlot::LFPerform() //TopTools_ListIteratorOfListOfShape itt1; if (!LShape.IsEmpty()) { LocOpe_Builder theTOpe(theGlue.ResultingShape()); - // On utilise LTool en temporaire + // Use of LTool is temporary for (it2.Initialize(LShape);it2.More();it2.Next()) { const TopTools_ListOfShape& ldf = myMap(it2.Value()); if (ldf.Extent() == 1 && ldf.First().IsSame(it2.Value())) { @@ -318,7 +318,7 @@ void BRepFeat_RibSlot::LFPerform() theOpe = 2; ChangeOpe = Standard_True; #ifdef DEB - cout << "Passage en ope. topologique" << endl; + cout << "Passage to. topologic operation" << endl; #endif } @@ -340,16 +340,16 @@ void BRepFeat_RibSlot::LFPerform() theOpe = 2; ChangeOpe = Standard_True; #ifdef DEB - cout << "Passage en ope. topologique" << endl; + cout << "Passage to topologic operation" << endl; #endif } } -// cas sans collage +// case without gluing if (theOpe == 2) { -// Attention si echec de collage, myGShape avec collage n'est pas correct +// Attention, if gluing fails, myGShape with gluing is not correct if (ChangeOpe) { myStatusError = BRepFeat_NoGluer; NotDone(); @@ -504,7 +504,7 @@ void BRepFeat_RibSlot::LFPerform() // myStatusError = BRepFeat_LocOpeNotDone; // } // else { - myStatusError = BRepFeat_LocOpeInvNotDone;// dernier recours (attention new et tangent edges) + myStatusError = BRepFeat_LocOpeInvNotDone;// last resort (attention to new and tangent edges) #ifdef DEB if (trc) cout << " Parts of Tool : direct Ope. Top." << endl; #endif @@ -594,7 +594,7 @@ const TopTools_ListOfShape& BRepFeat_RibSlot::Generated if(S.ShapeType() != TopAbs_FACE) { myGenerated.Clear(); if(myLFMap.IsEmpty() || !myLFMap.IsBound(S)) { - if (myMap.IsBound(S)) { // voir si on filtre sur face ou pas + if (myMap.IsBound(S)) { // check if filter on face or not static TopTools_ListOfShape list; list.Clear(); TopTools_ListIteratorOfListOfShape ite(myMap(S)); @@ -727,7 +727,7 @@ void BRepFeat_RibSlot::UpdateDescendants(const LocOpe_Gluer& G) } myMap.ChangeFind(orig).Clear(); for (itm.Initialize(newdsc); itm.More(); itm.Next()) { - // on verifie l`appartenance au shape... + // check the belonging to the shape... for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) { if (exp.Current().IsSame(itm.Key())) { myMap.ChangeFind(orig).Append(itm.Key()); @@ -812,7 +812,7 @@ BRepFeat_StatusError BRepFeat_RibSlot::CurrentStatusError() const //======================================================================= //function : CheckPoint -//purpose : point detrompeur cote matiere (cote d'extrusion) +//purpose : Proofing point material side (side of extrusion) //======================================================================= gp_Pnt BRepFeat_RibSlot::CheckPoint(const TopoDS_Edge& e, @@ -824,9 +824,9 @@ gp_Pnt BRepFeat_RibSlot::CheckPoint(const TopoDS_Edge& e, Standard_Boolean trc = BRepFeat_GettraceFEATRIB(); if (trc) cout << "BRepFeat_RibSlot::CheckPoint" << endl; #endif -// Produit vectoriel : normale au plan X direction Wire -// -> donne le cote matiere -// point detrompeur legerement a l'interieur cote matiere +// Vector product : normal to plane X direction Wire +// -> gives the material side +// Proofing point somewhat inside the material side Standard_Real f, l; Handle(Geom_Curve) cc = BRep_Tool::Curve(e, f, l); @@ -847,7 +847,7 @@ gp_Pnt BRepFeat_RibSlot::CheckPoint(const TopoDS_Edge& e, //======================================================================= //function : Normal -//purpose : calcul de la normale a une face dans un point +//purpose : calculate the normal to a face in a point //======================================================================= gp_Dir BRepFeat_RibSlot::Normal(const TopoDS_Face& F,const gp_Pnt& P) @@ -894,7 +894,7 @@ gp_Dir BRepFeat_RibSlot::Normal(const TopoDS_Face& F,const gp_Pnt& P) //======================================================================= //function : IntPar -//purpose : calcul du parametre d'un point sur une courbe +//purpose : calculate the parameter of a point on a curve //======================================================================= Standard_Real BRepFeat_RibSlot::IntPar(const Handle(Geom_Curve)& C, @@ -933,7 +933,7 @@ Standard_Real BRepFeat_RibSlot::IntPar(const Handle(Geom_Curve)& C, //======================================================================= //function : EdgeExtention -//purpose : extention d'un edge en tangence +//purpose : extention of a edge by tangence //======================================================================= void BRepFeat_RibSlot::EdgeExtention(TopoDS_Edge& e, @@ -993,7 +993,7 @@ void BRepFeat_RibSlot::EdgeExtention(TopoDS_Edge& e, //======================================================================= //function : ChoiceOfFaces -//purpose : choix de la face d'appui dans le cas d'appui sur un edge +//purpose : choose face of support in case of support on an edge //======================================================================= TopoDS_Face BRepFeat_RibSlot::ChoiceOfFaces(TopTools_ListOfShape& faces, @@ -1053,7 +1053,7 @@ TopoDS_Face BRepFeat_RibSlot::ChoiceOfFaces(TopTools_ListOfShape& faces, //======================================================================= //function : HeightMax -//purpose : Calcul de la hauteur du prisme selon les parametres d`une boite englobante +//purpose : Calculate the height of the prism following the parameters of a bounding box //======================================================================= Standard_Real BRepFeat_RibSlot::HeightMax(const TopoDS_Shape& theSbase, @@ -1083,7 +1083,7 @@ Standard_Real BRepFeat_RibSlot::HeightMax(const TopoDS_Shape& theSbase, //======================================================================= //function : ExtremeFaces -//purpose : Calcul des faces d'appui de la nervure +//purpose : Calculate the base faces of the rib //======================================================================= Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, @@ -1130,7 +1130,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, NumberOfEdges++; } -// ---Le wire comporte 1 seul edge +// ---the wire includes only one edge if(NumberOfEdges == 1) { #ifdef DEB if (trc) cout << " One Edge" << endl; @@ -1139,7 +1139,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, Standard_Real f, l;//, f1, l1, temp; gp_Pnt firstpoint, lastpoint; -// Points limite de l`unique edge +// Points limit the unique edge const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); Handle(Geom_Curve) cc = BRep_Tool::Curve(E, f, l); gp_Pnt p1 = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True)); @@ -1148,8 +1148,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, Standard_Real FirstPar = f; Standard_Real LastPar = l; -// ---Recherche si les 2 points limites de l`unique edge du wire -// sont sur un edge ou un vertex du shape de base +// ---Find if 2 points limiting the unique edge of the wire +// are on an edge or a vertex of the base shape Standard_Boolean PtOnFirstVertex = Standard_False; Standard_Boolean PtOnLastVertex = Standard_False; TopoDS_Vertex OnFirstVertex, OnLastVertex; @@ -1162,8 +1162,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, if(PtOnFirstEdge) { if (!PtOnFirstVertex) { -// Recherche de FirstFace : face du shape de base contenant OnFirstEdge -// satisfaisant ChoiceOfFaces +// Find FirstFace : face of the base shape containing OnFirstEdge +// meeting ChoiceOfFaces TopExp_Explorer ex4, ex5; ex4.Init(mySbase, TopAbs_FACE); TopTools_ListOfShape faces; @@ -1186,8 +1186,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, } } else if(PtOnFirstVertex) { -// Recherche de FirstFace : face du shape de base contenant OnFirstVertex -// satisfaisant ChoiceOfFaces +// Find FirstFace : face of the base shape containing OnFirstVertex +// meeting ChoiceOfFaces TopExp_Explorer ex4, ex5; ex4.Init(mySbase, TopAbs_FACE); TopTools_ListOfShape faces; @@ -1218,8 +1218,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, if(PtOnLastEdge) { if (!PtOnLastVertex) { -// Recherche de LastFace : face du shape de base contenant OnLastEdge -// satisfaisant ChoiceOfFaces +// Find LastFace : face of the base shape containing OnLastEdge +// meeting ChoiceOfFaces TopExp_Explorer ex4, ex5; ex4.Init(mySbase, TopAbs_FACE); TopTools_ListOfShape faces; @@ -1243,8 +1243,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, } } else if(PtOnLastEdge && PtOnLastVertex) { -// Recherche de LastFace : face du shape de base contenant OnLastVertex -// satisfaisant ChoiceOfFaces +// Find LastFace : face of the base shape containing OnLastVertex +// meeting ChoiceOfFaces TopExp_Explorer ex4, ex5; ex4.Init(mySbase, TopAbs_FACE); TopTools_ListOfShape faces; @@ -1277,7 +1277,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, return Standard_True; } -//--- On n'a pas trouve FirstFace ou LastFace +//--- FirstFace or LastFace was not found #ifdef DEB if (trc) cout << " FirstFace or LastFace null" << endl; #endif @@ -1354,7 +1354,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, return Data; } -// ---Le wire comporte plusieurs edges +// ---The wire consists of several edges else { #ifdef DEB if (trc) cout << " Multiple Edges" << endl; @@ -1403,7 +1403,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, } } -// ---Recherche thepoint est sur un edge ou un vertex de la face f +// ---Find thepoint on an edge or a vertex of face f PtOnEdgeVertex(RevolRib, f, thePoint, FirstVertex, LastVertex, PtOnEdge,OnEdge,PtOnVertex,OnVertex); @@ -1547,8 +1547,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, //======================================================================= //function : PtOnEdgeVertex -//purpose : Recherche si les 2 points limites de l`unique edge du wire -// sont sur un edge ou un vertex du shape de base +//purpose : Find if 2 limit points of the unique edge of a wire +// are on an edge or a vertex of the base shape //======================================================================= void BRepFeat_RibSlot::PtOnEdgeVertex(const Standard_Boolean RevolRib, @@ -1619,7 +1619,7 @@ void BRepFeat_RibSlot::PtOnEdgeVertex(const Standard_Boolean RevolRib, //======================================================================= //function : SlidingProfile -//purpose : construction de la face profil en cas de glissement +//purpose : construction of the profile face in case of sliding //======================================================================= Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, @@ -1642,9 +1642,9 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, if (trc) cout << "BRepFeat_RibSlot::SlidingProfile" << endl; #endif Standard_Boolean ProfileOK = Standard_True; -// --cas de glissement : construction du wire du profil -// -> 1 partie boite englobante + 1 partie wire -// attention a la compatibilite des orientations +// --case of sliding : construction of the wire of the profile +// --> 1 part bounding box + 1 part wire +// attention to the compatibility of orientations gp_Dir FN, LN; BRepLib_MakeWire WW; @@ -1652,9 +1652,9 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, FN = Normal(FirstFace, myFirstPnt); LN = Normal(LastFace, myLastPnt); -// Cas de la rainure (cut) <> nervure (fuse) -// -> on est dans la matiere -// -> on fait tout en 2d dans le plan de travail : plus facile +// Case of the groove (cut) <> rib (fuse) +// -> we are in the material +// -> make everything in 2d in the working plane : easier if(!myFuse) { FN = -FN; LN = -LN; @@ -1681,7 +1681,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, Standard_Real par1 = ElCLib::Parameter(ln1->Lin(), myFirstPnt); Standard_Real par2 = ElCLib::Parameter(ln2->Lin(), myLastPnt); if(par1 >= myTol || par2 >= myTol) { - Concavite = 2; //paralelle et concave + Concavite = 2; //paralel and concave BRepLib_MakeEdge e1(myLastPnt, myFirstPnt); WW.Add(e1); } @@ -1700,19 +1700,19 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, } } -// ---Construction de la face profil +// ---Construction of the profile face if(Concavite == 1) { -// Si concave : on peut prolonger les premiers et dernier edges du wire -// jusque boite englobante +// if concave : it is possible to extend first and last edges of the wire +// to the bounding box BRepLib_MakeEdge e1(myLastPnt, Pt); WW.Add(e1); BRepLib_MakeEdge e2(Pt, myFirstPnt); WW.Add(e2); } else if(Concavite == 3) { -// BndEdge : edges d'intersection avce la boite englobante +// BndEdge : edges of intersection with the bounding box TopoDS_Edge BndEdge1, BndEdge2; -// Points d'intersection boite englobante / Profil recherche +// Points of intersection with the bounding box / Find Profile gp_Pnt BndPnt1, BndPnt2, LastPnt; TopExp_Explorer expl; expl.Init(BndFace, TopAbs_WIRE); @@ -1767,7 +1767,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, WW.Add(e1); if(BndEdge1.IsSame(BndEdge2)) { -// Cas particulier : meme edge -> cheminement simple a determiner +// Particular case : same edge -> simply determined path BRepLib_MakeEdge e2(BndPnt1, BndPnt2); WW.Add(e2); BRepLib_MakeEdge e3(BndPnt2, myFirstPnt); @@ -1799,9 +1799,9 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, } else explo.Init(BndWire); -// On controle si on est dans BndEdge2 -// -> si oui : il faut tourner pour rejoindre FirstPnt -// -> si non : on ajoute les edges +// Check if this is BndEdge2 +// -> if yes : it is required to turn to join FirstPnt +// -> if no : add edges Standard_Boolean Fin = Standard_False; while(!Fin) { const TopoDS_Edge& e = TopoDS::Edge(explo.Current()); @@ -1813,8 +1813,8 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, LastPnt = pp; } else { -// le chemin est ferme -// -> des que l'on recontre BndEdge2, fin des bords sur BndFace +// the path is closed +// -> since met BndEdge2, end of borders on BndFace Fin = Standard_True; BRepLib_MakeEdge ee(LastPnt, BndPnt2); WW.Add(ee); @@ -1834,10 +1834,10 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, } } -// ---Construction du profil +// ---Construction of the profile -// On explore le wire fourni par l'utilisateur -// BRepTools_WireExplorer : bon ordre - sans repetition <> TopExp : non ordonne +// Explore the wire provided by the user +// BRepTools_WireExplorer : correct order - without repetition <> TopExp : non ordered BRepTools_WireExplorer EX(myWire); Standard_Real ff, ll; @@ -1867,7 +1867,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, WW.Add(el); } else { -// 1 seul edge : traitement particulier +// only one edge : particular processing Standard_Real fpar = IntPar(FirstCurve, myFirstPnt); Standard_Real lpar = IntPar(FirstCurve, myLastPnt); Handle(Geom_Curve) c; @@ -1892,19 +1892,19 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, } if(Concavite != 3) { -// Si concave : fac est OK +// if concave : face is OK Prof = fac; } else { -// Si non concave -// CheckPnt : point legerement a l'interieur cote matiere -// Bndface : face/coupe de la boite englobante dans le plen du profil +// if not concave +// CheckPnt : point slightly inside the material side +// Bndface : face/cut of the bounding box in the plane of the profile BRepTopAdaptor_FClass2d Cl(fac, BRep_Tool::Tolerance(fac)); Standard_Real u, v; ElSLib::Parameters(myPln->Pln(), CheckPnt, u, v); gp_Pnt2d checkpnt2d(u, v); if(Cl.Perform(checkpnt2d, Standard_True) == TopAbs_OUT) { -// Si fac n'est pas le bon morceau de BndFace on prend le complementaire +// If face is not the correct part of BndFace take the complementary //modified by NIZNHY-PKV Fri Mar 22 16:46:20 2002 f //BRepAlgo_Cut c(BndFace, fac); BRepAlgoAPI_Cut c(BndFace, fac); @@ -1915,7 +1915,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, Prof = TopoDS::Face(ffx.Shape()); } else { -// Si fac est le bon morceau de BndFace : fac est OK +// If face is the correct part of BndFace : face is OK Prof = fac; } } @@ -1931,7 +1931,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof, } //======================================================================= //function : NoSlidingProfile -//purpose : construction de la face profil en cas de glissement +//purpose : construction of the face profile in case of sliding //======================================================================= Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof, @@ -1995,7 +1995,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof, Standard_Real par1 = ElCLib::Parameter(firstln->Lin(), myFirstPnt); Standard_Real par2 = ElCLib::Parameter(lastln->Lin(), myLastPnt); if(par1 >= myTol || par2 >= myTol) - Concavite = 2; //paralelle et concave + Concavite = 2; //parallel and concave } if(d1.IsEqual(d2, myTol)) { if(Concavite == 3) TestOK = Standard_False; @@ -2011,7 +2011,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof, } } -// ---Construction de la face profil +// ---Construction of the face profile if(Concavite == 3) { if(OnFirstFace) { Standard_Real f, l; @@ -2327,7 +2327,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof, if(!theLastEdge.IsNull()) { const TopoDS_Vertex& v1 = TopExp::LastVertex(theLastEdge,Standard_True); TopoDS_Vertex v2; -// Attention cas Wire Reversed -> LastVertex sans Standard_True +// Attention case Wire Reversed -> LastVertex without Standard_True const gp_Pnt& pp = BRep_Tool::Pnt(TopExp::LastVertex(FirstEdge)); if(!theFV.IsNull() && theFirstpoint.Distance(pp) <= myTol) { v2 = theFV; @@ -2670,7 +2670,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof, } myMap.ChangeFind(orig).Clear(); for (itm.Initialize(newdsc); itm.More(); itm.Next()) { - // on verifie l`appartenance au shape... + // check the belonging to the shape... for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) { if (exp.Current().IsSame(itm.Key())) { // const TopoDS_Shape& sh = itm.Key(); @@ -2727,7 +2727,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof, } myMap.ChangeFind(orig).Clear(); for (itm.Initialize(newdsc); itm.More(); itm.Next()) { - // on verifie l`appartenance au shape... + // check the belonging to the shape... for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) { if (exp.Current().IsSame(itm.Key())) { // const TopoDS_Shape& sh = itm.Key(); diff --git a/src/BRepFeat/BRepFeat_SplitShape.cxx b/src/BRepFeat/BRepFeat_SplitShape.cxx index 6ca12a581f..151218ee7b 100755 --- a/src/BRepFeat/BRepFeat_SplitShape.cxx +++ b/src/BRepFeat/BRepFeat_SplitShape.cxx @@ -55,7 +55,7 @@ Standard_Boolean BRepFeat_SplitShape::IsDeleted(const TopoDS_Shape& F) { TopTools_ListIteratorOfListOfShape itl (((LocOpe_Spliter*) &mySShape)->DescendantShapes(F)); - // tout ceci pour truander le const + // all that to swindle the constant return (!itl.More());// a priori impossible diff --git a/src/BRepFill/BRepFill.cxx b/src/BRepFill/BRepFill.cxx index 591af7955e..ca64d26d14 100755 --- a/src/BRepFill/BRepFill.cxx +++ b/src/BRepFill/BRepFill.cxx @@ -5,28 +5,28 @@ // Modified: Mon Jan 12 10:50:10 1998 // Author: Joelle CHAUVET // -// gestion automatique de l'origine et de l'orientation -// avec la methode Organize +// automatic management of origin and orientation +// with method Organize // Modified: Mon Feb 23 09:28:46 1998 // Author: Joelle CHAUVET // -// methode Organize avec option de projection pour les wires fermes -// nouvelle methode SameNumber avec option de report des decoupes -// + utilitaires ComputeACR et InsertACR -// + traitement du cas derniere section ponctuelle +// method Organize with option of projection for closed wires +// new method SameNumber with option to report cuts +// + utilities ComputeACR and InsertACR +// + processing of the case of last point section // Modified: Thu Apr 30 15:24:17 1998 // Author: Joelle CHAUVET // -// separation sections fermees / sections ouvertes + debug -// Organize devient ComputeOrigin et SearchOrigin +// separation closed / open sections + debug +// Organize becomes ComputeOrigin and SearchOrigin // Modified: Tue Jul 21 16:48:35 1998 // Author: Joelle CHAUVET // -// cas limite pour Pnext d'ou vrillage (BUC60281) +// limited case for Pnext of a twist (BUC60281) // Modified: Thu Jul 23 11:38:36 1998 // Author: Joelle CHAUVET // -// calcul de l'angle de la rotation dans SearchOrigin +// calculate the angle of rotation in SearchOrigin // Modified: Fri Jul 31 15:14:19 1998 // Author: Joelle CHAUVET // @@ -34,7 +34,7 @@ // Modified: Mon Oct 12 09:42:33 1998 // Author: Joelle CHAUVET // -// numero des aretes dans EdgesFromVertex (CTS21570) +// number of edges in EdgesFromVertex (CTS21570) #include @@ -167,11 +167,11 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge, Vbid.Nullify(); if (SeqOrder) { - // de first vers last + // from first to last m0 = first; V0 = Vf; for (j=1; j<=ndec; j++) { - // morceau d'edge + // piece of edge m1 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first; TopoDS_Edge CutE = BRepLib_MakeEdge(C,V0,Vbid,m0,m1); CutE.Orientation(CurrentOrient); @@ -179,7 +179,7 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge, m0 = m1; V0 = TopExp::LastVertex(CutE); if (j==ndec) { - // dernier morceau + // last piece TopoDS_Edge LastE = BRepLib_MakeEdge(C,V0,Vl,m0,last); LastE.Orientation(CurrentOrient); S.Append(LastE); @@ -187,11 +187,11 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge, } } else { - // de last vers first + // from last to first m1 = last; V1 = Vl; for (j=ndec; j>=1; j--) { - // morceau d'edge + // piece of edge m0 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first; TopoDS_Edge CutE = BRepLib_MakeEdge(C,Vbid,V1,m0,m1); CutE.Orientation(CurrentOrient); @@ -199,7 +199,7 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge, m1 = m0; V1 = TopExp::FirstVertex(CutE); if (j==1) { - // dernier morceau + // last piece TopoDS_Edge LastE = BRepLib_MakeEdge(C,Vf,V1,first,m1); LastE.Orientation(CurrentOrient); S.Append(LastE); @@ -243,7 +243,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1, TopoDS_Vertex V1f,V1l,V2f,V2l; - // on cree un new Handle + // create a new Handle if (Abs(f1 - C1->FirstParameter()) > Precision::PConfusion() || Abs(l1 - C1->LastParameter()) > Precision::PConfusion() ) { C1 = new Geom_TrimmedCurve(C1,f1,l1); @@ -251,11 +251,11 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1, else { C1 = Handle(Geom_Curve)::DownCast(C1->Copy()); } - // eventuellement on bouge la courbe + // eventually the curve is concerned if ( !SameLoc) { C1->Transform(L1.Transformation()); } - // on la met dans le bon sens et on prend ses vertex + // it is set in the proper direction and its vertices are taken if (Edge1.Orientation() == TopAbs_REVERSED) { TopExp::Vertices(Edge1,V1l,V1f); C1->Reverse(); @@ -264,7 +264,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1, TopExp::Vertices(Edge1,V1f,V1l); } - // on cree un new Handle + // a new Handle is created if (Abs(f2 - C2->FirstParameter()) > Precision::PConfusion() || Abs(l2 - C2->LastParameter()) > Precision::PConfusion() ) { C2 = new Geom_TrimmedCurve(C2,f2,l2); @@ -272,11 +272,11 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1, else { C2 = Handle(Geom_Curve)::DownCast(C2->Copy()); } - // eventuellement on bouge la courbe + // eventually the curve is concerned if ( !SameLoc) { C2->Transform(L2.Transformation()); } - // on la met dans le bon sens et on prend ses vertex + // it is set in the proper direction and its vertices are taken if (Edge2.Orientation() == TopAbs_REVERSED) { TopExp::Vertices(Edge2,V2l,V2f); C2->Reverse(); @@ -285,7 +285,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1, TopExp::Vertices(Edge2,V2f,V2l); } - // Sont-ce des edges fermes + // Are they closed edges? Standard_Boolean Closed = V1f.IsSame(V1l) && V2f.IsSame(V2l); @@ -642,7 +642,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine, TopoDS_Face aFace; - // normale au Spine. + // normal to the Spine. if (Spine.ShapeType() == TopAbs_FACE) { aFace = TopoDS::Face(Spine); S = BRep_Tool::Surface(TopoDS::Face(Spine), L); @@ -670,7 +670,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine, Normal = Handle(Geom_Plane)::DownCast(S)->Pln().Axis().Direction(); - // Recherche du vertex du profil le plus proche du spine. + // Find vertex of the profile closest to the spine. Standard_Real DistMin = Precision::Infinite(); Standard_Real Dist; // Standard_Real Tol2 = Tol*Tol; @@ -681,7 +681,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine, // Standard_Real D1,D2; gp_Pnt P1,P2; - // On cherche d'abord si il y a contact Vertex Vertex. + // First check if there is contact Vertex Vertex. Standard_Boolean IsOnVertex = Standard_False; SE.Init(aFace.Oriented(TopAbs_FORWARD),TopAbs_VERTEX); // modified by NIZHNY-EAP Wed Feb 23 12:31:52 2000 ___BEGIN___ @@ -780,7 +780,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine, } } } - // sauvegarde minimum. + // save minimum. if (Dist < DistMin) { DistMin = Dist; BRepAdaptor_Curve BAC(E); @@ -800,7 +800,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine, //======================================================================= //function : SearchOrigin -//purpose : Decoupe et oriente un wire ferme. +//purpose : Cut and orientate a closed wire. //======================================================================= void BRepFill::SearchOrigin(TopoDS_Wire & W, @@ -821,9 +821,9 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W, // Class BRep_Tool without fields and without Constructor : // BRep_Tool BT; - W.Orientation(TopAbs_FORWARD); //pour ne pas composer les orientations + W.Orientation(TopAbs_FORWARD); //to avoid composing the orientations - // Calcul la distance + // Calculate the distance B.MakeVertex(V, P, Tol); BRepExtrema_DistShapeShape DSS(V, W); if (DSS.IsDone()) { @@ -870,14 +870,14 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W, Standard_Boolean forward; BRepTools_WireExplorer exp; - // Calcul le nombre d'edges + // Calculate the number of edges for(exp.Init(W); exp.More(); exp.Next()) NbEdges++; if (NewVertex) { NbEdges++; Eref = E; } - // Construit la Table et calcul rangdeb + // Construct the Table and calculate rangdeb TopTools_Array1OfShape Edges(1, NbEdges); for(exp.Init(W), ii=1; exp.More(); exp.Next(), ii++) { E = exp.Current(); @@ -898,7 +898,7 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W, } if (rangdeb == 0) rangdeb = NbEdges; - // Calcul du sens de parcourt + // Calculate the direction of parsing E = TopoDS::Edge(Edges(rangdeb)); if (!NewVertex) { // theparam = BT.Parameter(V, E); @@ -930,11 +930,11 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W, void BRepFill::ComputeACR(const TopoDS_Wire& wire, TColStd_Array1OfReal& ACR) { - // calcul des abscisses curvilignes reduites et de la longueur du wire + // calculate the reduced curvilinear abscisses and the length of the wire BRepTools_WireExplorer anExp; Standard_Integer nbEdges=0, i; - // longueurs cumulees + // cumulated lengths ACR.Init(0); for(anExp.Init(wire); anExp.More(); anExp.Next()) { nbEdges++; @@ -946,17 +946,17 @@ void BRepFill::ComputeACR(const TopoDS_Wire& wire, } } - // longueur totale du wire + // total length of the wire ACR(0) = ACR(nbEdges); - // abscisses curvilignes reduites + // reduced curvilinear abscisses if (ACR(0)>Precision::Confusion()) { for (i=1; i<=nbEdges; i++) { ACR(i) /= ACR(0); } } else { - // wire ponctuel + // punctual wire ACR(nbEdges) = 1; } @@ -971,7 +971,7 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire, const TColStd_Array1OfReal& ACRcuts, const Standard_Real prec) { - // calcul des ACR du wire a decouper + // calculate ACR of the wire to be cut BRepTools_WireExplorer anExp; Standard_Integer nbEdges=0; for(anExp.Init(wire); anExp.More(); anExp.Next()) { @@ -987,13 +987,13 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire, Standard_Real t0,t1=0; nbEdges=0; - // traitement edge par edge + // processing edge by edge for(anExp.Init(wire); anExp.More(); anExp.Next()) { nbEdges++; t0 = t1; t1 = ACRwire(nbEdges); - // parametres de decoupe sur cette edge + // parameters of cut on this edge Standard_Integer ndec=0; for (i=1; i<=ACRcuts.Length(); i++ ) { if (t0+precSetValue(0,0); for (ipath=1;ipath<=NbEdge;ipath++) OrigParam->SetValue(ipath, Orig(ipath)); -// on traite chaque edge de la trajectoire +// process each edge of the trajectory for (ipath=0, wexp.Init(myPath); wexp.More(); wexp.Next()) { E = wexp.Current(); @@ -64,14 +64,14 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path, if (Or == TopAbs_REVERSED) { Handle(Geom_TrimmedCurve) CBis = new (Geom_TrimmedCurve) (C, First, Last); - CBis->Reverse(); // Pour eviter de deteriorer la topologie + CBis->Reverse(); // To avoid damaging the topology C = CBis; First = C->FirstParameter(); Last = C->LastParameter(); } AC = new (GeomAdaptor_HCurve) (C, First, Last); - // on Set les parametres pour le cas multi-edges + // Set the parameters for the case multi-edges Standard_Real t1 = OrigParam->Value(ipath-1); Standard_Real t2 = OrigParam->Value(ipath); Handle(GeomFill_LocationGuide) Loc; diff --git a/src/BRepFill/BRepFill_Draft.cxx b/src/BRepFill/BRepFill_Draft.cxx index eeb4740f62..5b24081547 100755 --- a/src/BRepFill/BRepFill_Draft.cxx +++ b/src/BRepFill/BRepFill_Draft.cxx @@ -87,7 +87,7 @@ static void ComputeTrsf(const TopoDS_Wire& W, Bnd_Box& Box, gp_Trsf& Tf) { - // Calcul d'un barycentre approximatif + // Calculate approximate barycenter BRepTools_WireExplorer Exp(W); // Class BRep_Tool without fields and without Constructor : // BRep_Tool BT; @@ -101,19 +101,19 @@ static void ComputeTrsf(const TopoDS_Wire& W, } Bary /= nb; - // Calcul la Transfo + // Calculate the Transformation gp_Ax3 N(Bary, D); Tf.SetTransformation(N); BRepAdaptor_Curve AC; // BndLib_Add3dCurve BC; - // transfo du wire + // transformation to the wire TopoDS_Wire TheW = W; TopLoc_Location Loc(Tf); TheW.Location(Loc); - // Calcul la boite + // Calculate the box Box.SetVoid(); for (Exp.Init(TheW); Exp.More(); Exp.Next()) { AC.Initialize(Exp.Current()); @@ -123,7 +123,7 @@ static void ComputeTrsf(const TopoDS_Wire& W, } //======================================================================= -//function : Longueur +//function : Length //purpose : //====================================================================== static Standard_Real Longueur(const Bnd_Box& WBox, @@ -131,11 +131,11 @@ static Standard_Real Longueur(const Bnd_Box& WBox, gp_Dir& D, gp_Pnt& P) { - // face de la boite la plus eloignee de la face entree dans - //la direction de depouille + // face of the box most remoted from the face input in + // the direction of skin Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,WZmin,WZmax,L; - //"coord" de la boite + //"coord" of the box WBox.Get(Xmin,Ymin,Zmin,Xmax,Ymax,Zmax); WZmin = Zmin; WZmax = Zmax; @@ -144,7 +144,7 @@ static Standard_Real Longueur(const Bnd_Box& WBox, P.SetCoord( (Xmin+Xmax)/2, (Ymin+Ymax)/2, Zmax); if (Zmax < WZmin) { - // Depouille dans le mauvais sens. On inverse... + // Skin in the wrong direction. Invert... D.Reverse(); L = WZmax - Zmin; P.SetZ(Zmin); @@ -157,8 +157,7 @@ static Standard_Real Longueur(const Bnd_Box& WBox, //======================================================================= //function : GoodOrientation -//purpose : Regarde si la loi est oriente de maniere a avoir une depouille -// "exterieur" +//purpose : Check if the law is oriented to have an exterior skin //====================================================================== static Standard_Boolean GoodOrientation(const Bnd_Box& B, const Handle(BRepFill_LocationLaw)& Law, @@ -182,7 +181,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //#endif r = l/Nb; - Nb++; // Nombre de points + Nb++; // Number of points TColgp_Array1OfPnt Pnts(1, Nb); Handle(Adaptor3d_HCurve) AC; @@ -266,7 +265,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, } else { #if DEB - cout << "Pas de Bords Libre !" << endl; + cout << "No Free Borders !" << endl; #endif Standard_ConstructionError::Raise("BRepFill_Draft"); } @@ -276,7 +275,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, Standard_ConstructionError::Raise("BRepFill_Draft"); } - // Attention aux wire closed non declare ! + // Attention to closed non declared wires ! if (!myWire.Closed()) { TopoDS_Vertex Vf, Vl; TopExp::Vertices(myWire, Vf, Vl); @@ -300,7 +299,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //======================================================================= //function :SetOptions -//purpose : Definit le style +//purpose : Defines the style //====================================================================== void BRepFill_Draft::SetOptions(const BRepFill_TransitionStyle Style, const Standard_Real Min, @@ -323,7 +322,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //======================================================================= //function :Perform -//purpose : calcul d'une surface de depouille +//purpose : calculate a surface of skinning //====================================================================== void BRepFill_Draft::Perform(const Standard_Real LengthMax) { @@ -341,7 +340,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //======================================================================= //function :Perform -//purpose : calcul d'une surface de depouille +//purpose : calculate a surface of skinning //====================================================================== void BRepFill_Draft::Perform(const Handle(Geom_Surface)& Surface, const Standard_Boolean KeepInsideSurface) @@ -353,7 +352,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, ComputeTrsf(myWire, myDir, WBox, Trsf); - // boite englobant la surface d'arret + // box with bounds of the stop surface Handle(Geom_Surface) Surf; Surf = Handle(Geom_Surface)::DownCast(Surface->Transformed(Trsf)); GeomAdaptor_Surface S1 (Surf); @@ -361,20 +360,20 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, // AS.Add(S1, 0.1, SBox); BndLib_AddSurface::Add(S1, 0.1, SBox); - // on calcule la longueur maximum de la regle. + // calculate the maximum length of the rule. L = Longueur(WBox, SBox, myDir, Pt); L /= Abs(Cos(myAngle)); - // Constructuion + // Construction Init(Surface, L, WBox); BuildShell(Surface, !KeepInsideSurface); Sewing(); } -//======================================================================= +//================================================================ //function :Perform -//purpose : calcul de la surface de depouille, arretee par une shape -//====================================================================== +//purpose : calculate the surface of skinning, stopped by a shape +//================================================================ void BRepFill_Draft::Perform(const TopoDS_Shape& StopShape, const Standard_Boolean KeepOutSide) { @@ -385,7 +384,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, ComputeTrsf(myWire, myDir, WBox, Trsf); -// boite englobant la shape d'arret +// bounding box of the stop shape Bnd_Box BSurf;//, TheBox; Standard_Real Umin, Umax, Vmin, Vmax; #ifdef DEB @@ -400,28 +399,28 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, TopExp_Explorer Ex (StopShape, TopAbs_FACE); SBox.SetVoid(); - while (Ex.More()) { // on parcourt les faces de la shape d'arret + while (Ex.More()) { // parse faces of the stop shape // B.UVBounds(TopoDS::Face(Ex.Current()), Umin,Umax,Vmin,Vmax); BRepTools::UVBounds(TopoDS::Face(Ex.Current()), Umin,Umax,Vmin,Vmax); Surf = Handle(Geom_Surface)::DownCast( // BT.Surface(TopoDS::Face(Ex.Current()))->Transformed(Trsf) ); BRep_Tool::Surface(TopoDS::Face(Ex.Current()))->Transformed(Trsf) ); GeomAdaptor_Surface S1 (Surf); - // boite englobant la face courante +// bounding box of the current face // AS.Add(S1, Umin, Umax, Vmin, Vmax, 0.1, BSurf); BndLib_AddSurface::Add(S1, Umin, Umax, Vmin, Vmax, 0.1, BSurf); - SBox.Add(BSurf); // on regroupe les boites + SBox.Add(BSurf); // group boxes Ex.Next(); }// while_Ex - // on calcule la longueur maximum de la regle. + // calculate the maximum length of the rule. L = Longueur(WBox, SBox, myDir, Pt); L /= Abs(Cos(myAngle)); -// surface d'arret +// surface of stop gp_Trsf Inv; - Inv = Trsf.Inverted(); // transfo inverse - Pt.Transform(Inv); // coord dans le repere absolu + Inv = Trsf.Inverted(); // inverted transformation + Pt.Transform(Inv); // coordinate in the absolute reference Handle(Geom_Plane) Plan = new (Geom_Plane)(Pt, myDir); Surf = new (Geom_RectangularTrimmedSurface) (Plan,-L, L, -L, L); @@ -433,7 +432,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, } #endif -// Balayage et restriction +// Sweeping and restriction Init(Plan, L*1.01, WBox); BuildShell(Surf, Standard_False); Fuse(StopShape, KeepOutSide); @@ -442,7 +441,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //======================================================================= //function : Init -//purpose : Construction des lois. +//purpose : Construction of laws. //====================================================================== void BRepFill_Draft::Init(const Handle(Geom_Surface)& , const Standard_Real Length, @@ -450,7 +449,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, { Standard_Boolean B; -// loi de positionnement +// law of positioning Handle(GeomFill_LocationDraft) Loc = new (GeomFill_LocationDraft) (myDir, myAngle); myLoc = new (BRepFill_DraftLaw) (myWire, Loc); @@ -463,14 +462,14 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, myLoc = new (BRepFill_DraftLaw) (myWire, Loc); } - myLoc->CleanLaw(angmin); // Nettoie les petites discontinuites. + myLoc->CleanLaw(angmin); // Clean small discontinuities. -// loi de section -// generatrice est une droite // a la binormal. +// law of section +// generating line is straight and parallel to binormal. gp_Pnt P(0, 0, 0); gp_Vec D (0., 1., 0.); -// Controle de l'orientation +// Control of the orientation Standard_Real f,l; myLoc->Law(1)->GetDomain(f,l); gp_Mat M; @@ -504,12 +503,12 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //======================================================================= //function : BuildShell -//purpose : Construction de la surface de depouille +//purpose : Construction of the skinning surface //====================================================================== void BRepFill_Draft::BuildShell(const Handle(Geom_Surface)& Surf, const Standard_Boolean KeepOutSide) { -// construction de la surface +// construction of the surface BRepFill_Sweep Sweep(mySec, myLoc, Standard_True); Sweep.SetTolerance(myTol); Sweep.SetAngularControl(angmin, angmax); @@ -520,7 +519,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, myFaces = Sweep.SubShape(); mySections = Sweep.Sections(); myDone = Standard_True; - // Controle de l'orientation + // Control of the orientation Standard_Boolean out=Standard_True; TopExp_Explorer ex(myShell,TopAbs_FACE); TopoDS_Face F; @@ -547,10 +546,10 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, return; } - if (!Surf.IsNull()) { // On ajoute la face en bout + if (!Surf.IsNull()) { // Add the face at end - // En attendant une utilisation des traces & retriction dans BRepFill_Sweep - // On fait un Fuse. + // Waiting the use of traces & retriction in BRepFill_Sweep + // Make Fuse. BRepLib_MakeFace MkF; MkF.Init(Surf, Standard_True, Precision::Confusion()); Fuse(MkF.Face(), KeepOutSide); @@ -560,8 +559,8 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //======================================================================= //function : Fuse -//purpose : Operation booleenne entre la depouille et -// la shape d'arret +//purpose : Boolean operation between the skin and the +// stop shape //====================================================================== Standard_Boolean BRepFill_Draft::Fuse(const TopoDS_Shape& StopShape, const Standard_Boolean KeepOutSide) @@ -578,7 +577,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, } else { B.MakeSolid(Sol1); - B.Add(Sol1, myShape); // shell => solid (pour fusion) + B.Add(Sol1, myShape); // shell => solid (for fusion) } @@ -596,7 +595,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, case TopAbs_SHELL : { B.MakeSolid(Sol2); - B.Add(Sol2, StopShape); // shell => solid (pour fusion) + B.Add(Sol2, StopShape); // shell => solid (for fusion) break; } @@ -606,32 +605,32 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, B.MakeShell(S); B.Add(S, StopShape); B.MakeSolid(Sol2); - B.Add(Sol2, S); // shell => solid (pour fusion) + B.Add(Sol2, S); // shell => solid (for fusion) break; } default : { - return Standard_False; // On ne sait pas faire + return Standard_False; // Impossible to do } } BRepAlgo_DSAccess DSA; DSA.Load(Sol1, Sol2); - DSA.Intersect(Sol1, Sol2); // intersection des 2 solids + DSA.Intersect(Sol1, Sol2); // intersection of 2 solids -// suppression des aretes correspondant aux intersections "inutiles" +// removal of edges corresponding to "unused" intersections Standard_Integer NbPaquet; // gp_Pnt P1,P2; TopoDS_Vertex V,V1; TopTools_ListOfShape List; - List = DSA.GetSectionEdgeSet();// liste des aretes + List = DSA.GetSectionEdgeSet();// list of edges NbPaquet = List.Extent(); if (NbPaquet == 0) { #if DRAW - cout << "Pas de fusion" << endl; + cout << "No fusion" << endl; DBRep::Set("DepPart", Sol1); DBRep::Set("StopPart", Sol2); #endif @@ -639,13 +638,13 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, } if (NbPaquet > 1) { - // Il faut selectioner les paquets. + // It is required to select packs. TColStd_Array1OfReal Dist(1, NbPaquet); TopTools_ListIteratorOfListOfShape it(List); Standard_Real D, Dmin = 1.e10; Standard_Integer ii; - //On classe les paquets par eloignement. + //Classify the packs by distance. BRepExtrema_DistShapeShape Dist2; Dist2.LoadS1( myWire ); for (ii=1; it.More();it.Next(),ii++){ @@ -660,7 +659,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, Dist(ii) = 1.e10; } - // on supprime les edges "plus loin" que Dmin + // remove edges "farther" than Dmin for (ii=1, it.Initialize(List); it.More();it.Next(), ii++){ if (Dist(ii) > Dmin) { DSA.SuppressEdgeSet(it.Value()); @@ -674,15 +673,15 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, } if (StopShape.ShapeType() != TopAbs_SOLID) { - // Il faut choisir le state par la geometrie + // It is required to choose the state by the geometry - //(1) On recupere une edge de section - List = DSA.GetSectionEdgeSet();// liste des aretes + //(1) Return an edge of section + List = DSA.GetSectionEdgeSet();// list of edges TopTools_ListIteratorOfListOfShape it(List); TopoDS_Iterator iter(it.Value()); TopoDS_Edge E = TopoDS::Edge(iter.Value()); - // (2) On recupere sa geometrie sur StopShape + //(2) Return geometry on StopShape // Class BRep_Tool without fields and without Constructor : // BRep_Tool BT; Handle(Geom_Surface) S; @@ -693,7 +692,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, // BT.CurveOnSurface(E, C2d, S, L, f, l, 2); BRep_Tool::CurveOnSurface(E, C2d, S, L, f, l, 2); - // On Trouve une normale. + // Find a normal. C2d->D0((f+l)/2,P2d); GeomLProp_SLProps SP(S, P2d.X(), P2d.Y(), 1, 1.e-12); if (! SP.IsNormalDefined()) { @@ -705,17 +704,17 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, } } - // On en deduit State1 + // Subtract State1 if (myDir.Angle(SP.Normal()) < PI/2) State1 = TopAbs_IN; else State1 = TopAbs_OUT; } - if (! KeepOutSide) { // On inverse State2; + if (! KeepOutSide) { // Invert State2; if (State2 == TopAbs_IN) State2 = TopAbs_OUT; else State2 = TopAbs_IN; } -//recalcul de la shape finale +//recalculate the final shape TopoDS_Shape result = DSA.Merge(State1, State2); if (issolid) myShape = result; @@ -725,7 +724,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, if (Exp.More()) myShape = Exp.Current(); } -// Mise a jour de l'Historique +// Update the History Standard_Integer ii; for (ii=1; ii<=myLoc->NbLaw(); ii++) { const TopTools_ListOfShape& L = DSA.Modified(myFaces->Value(1,ii)); @@ -743,7 +742,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //======================================================================= //function : Sewing -//purpose : Assemble la depouille avec la face du dessus +//purpose : Assemble the skin with the above face //====================================================================== Standard_Boolean BRepFill_Draft::Sewing() { @@ -753,8 +752,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, if ((!ToAss) || (!myDone)) return Standard_False; - // Assemblage - // on fait un shell a partir des faces de la shape + la shape en entree + // Assembly make a shell from the faces of the shape + the input shape Handle(BRepBuilderAPI_Sewing) Ass = new BRepBuilderAPI_Sewing(5*myTol, Standard_True, Standard_True, Standard_False); Ass->Add(myShape); @@ -765,7 +763,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, Standard_Integer NbCE; Ass->Perform(); - // On verifie que l'assemblage est effectif. + // Check if the assembly is real. NbCE = Ass->NbContigousEdges(); if (NbCE > 0) { @@ -780,7 +778,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, TopoDS_Iterator It(res); res = It.Value(); It.Next(); - if (!It.More()) {//Une seule partie => c'est bon + if (!It.More()) {//Only one part => this is correct myShape = res; Ok = Standard_True; } @@ -788,7 +786,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, } if (Ok) { - // Mise a jour de l'Historique + // Update the History Standard_Integer ii; for (ii=1; ii<=myLoc->NbLaw(); ii++) { if (Ass->IsModified(myFaces->Value(1,ii))) @@ -801,7 +799,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, Ass->Modified(mySections->Value(1,ii))); } - if (myShape.Closed()) { // On fait un Solid + if (myShape.Closed()) { // Make a Solid TopoDS_Solid solid; BRep_Builder BS; BS.MakeSolid(solid); @@ -818,14 +816,14 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, } } #if DEB - else cout << "Draft : Pas d'assemblage !" << endl; + else cout << "Draft : No assembly !" << endl; #endif return Ok; } //======================================================================= //function : Generated -//purpose : retourne une sous partie partie generes par balayage +//purpose : return a sub-part generated by sweeping //====================================================================== const TopTools_ListOfShape& BRepFill_Draft::Generated(const TopoDS_Shape& S) @@ -854,17 +852,17 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, //======================================================================= //function : Shape -//purpose : retourne la shape complete +//purpose : return the complete shape //====================================================================== TopoDS_Shape BRepFill_Draft::Shape()const { return myShape; } -//======================================================================= +//===================================================================== //function : Shell -//purpose : surface de depouille avec la face entree (=>shell) -//====================================================================== +//purpose : surface of skinning with the input face (=>shell) +//===================================================================== TopoDS_Shell BRepFill_Draft::Shell()const { return myShell; diff --git a/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx b/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx index 4bea9b9b91..92b58054c9 100755 --- a/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx +++ b/src/BRepFill/BRepFill_EdgeOnSurfLaw.cxx @@ -65,7 +65,7 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path, AS = new (BRepAdaptor_HSurface) (F); } } - if (!Trouve) { // Impossible de construire la loi. + if (!Trouve) { // Impossible to construct the law. hasresult = Standard_False; myLaws.Nullify(); return; @@ -75,7 +75,7 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path, if (Or == TopAbs_REVERSED) { Handle(Geom2d_TrimmedCurve) CBis = new (Geom2d_TrimmedCurve) (C, First, Last); - CBis->Reverse(); // Pour eviter de deteriorer la topologie + CBis->Reverse(); // To avoid spoiling the topology C = CBis; First = C->FirstParameter(); Last = C->LastParameter(); diff --git a/src/BRepFill/BRepFill_Evolved.cdl b/src/BRepFill/BRepFill_Evolved.cdl index 3f66e6a57d..1645271fb3 100755 --- a/src/BRepFill/BRepFill_Evolved.cdl +++ b/src/BRepFill/BRepFill_Evolved.cdl @@ -7,7 +7,7 @@ class Evolved from BRepFill - ---Purpose: Constructs a evolved volume from a spine (wire or face) + ---Purpose: Constructs an evolved volume from a spine (wire or face) -- and a profile ( wire). uses @@ -45,10 +45,10 @@ is returns Evolved from BRepFill ---Purpose: Creates an evolved shape by sweeping the -- along the . is used to set the - -- position of along as follow: - -- l glisse sur le profil avec sa - -- direction colineaire a la normale au , et sa - -- confondue avec la tangente au . + -- position of along as follows: + -- slides on the profile with direction + -- colinear to the normal to , and its + -- mixed with the tangent to . -- raises ConstructionError from Standard; diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index 34652f17a2..60a7fc7415 100755 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -124,7 +124,7 @@ static Standard_Integer NbTRIMFACES = 0; static Standard_Integer NbVEVOS = 0; static Standard_Integer NbPROFILS = 0; static Standard_Integer NbEDGES = 0; -// POP pour NT +// POP for NT #ifndef WNT static char name[100]; #endif @@ -315,7 +315,7 @@ static Standard_Boolean IsPlanar(const TopoDS_Edge& E) //======================================================================= //function : Side -//purpose : determine la position du profil par rapport au plan XOZ. +//purpose : determine the position of the profil correspondingly to plane XOZ. // Return 1 : MAT_Left. // Return 2 : MAT_Left and Planar. // Return 3 : MAT_Left and Vertical. @@ -332,8 +332,8 @@ static Standard_Integer Side(const TopoDS_Wire& Profil, Standard_Boolean OnRight = Standard_False; #endif TopoDS_Vertex V1,V2; - // Rem : il suffit de tester sur le premier edge du Wire. - // ( Correctement decoupe dans PrepareProfil) + // Rem : it is enough to test the first edge of the Wire. + // ( Correctly cut in PrepareProfil) TopExp_Explorer Explo(Profil,TopAbs_EDGE); Standard_Integer TheSide; @@ -411,7 +411,7 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, TopTools_ListIteratorOfListOfShape WPIte; //------------------------------------------------------------------- - // Positionnement de mySpine et de myProfil dans le repere de travail. + // Positioning of mySpine and myProfil in the workspace. //------------------------------------------------------------------- TopLoc_Location LSpine = FindLocation(mySpine); gp_Trsf T; @@ -422,7 +422,7 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, TransformInitWork(LSpine,LProfile); //------------------------------------------------------------------ - // projection du profil et decoupe du spine. + // projection of the profile and cut of the spine. //------------------------------------------------------------------ TopTools_DataMapOfShapeShape MapProf, MapSpine; @@ -445,9 +445,8 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, BRepMAT2d_BisectingLocus Locus; //---------------------------------------------------------- - // Initialisation du volevo decoupe. - // Pour chaque portion du profile on cree en volevo qui est - // additionner a CutVevo + // Initialisation of cut volevo. + // For each part of the profile create a volevo added to CutVevo //---------------------------------------------------------- BRepFill_Evolved CutVevo; TopoDS_Wire WP; @@ -467,12 +466,12 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, Standard_Integer CSide; //--------------------------------- - // Construction des vevos a gauche. + // Construction of vevos to the left. //--------------------------------- if (YaLeft) { //----------------------------------------------------- - // Calcul de la carte des lieux bissecteurs a gauche. - // et des Liens Topologie -> elements de base de la carte. + // Calculate the map of bisector locations at the left. + // and links Topology -> base elements of the map. //----------------------------------------------------- BRepMAT2d_Explorer Exp(WorkSpine); Locus.Compute(Exp,1,MAT_Left); @@ -482,7 +481,7 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, SP = TopoDS::Wire(WPIte.Value()); CSide = Side(SP,Tol); //----------------------------------------------- - // Construction et ajout d un volevo elementaire. + // Construction and adding of elementary volevo. //----------------------------------------------- BRepFill_Evolved Vevo; if ( CSide == 1) { @@ -499,16 +498,16 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, } //--------------------------------- - // Construction des vevos a droite. + // Construction of vevos to the right. //--------------------------------- if (YaRight) { //----------------------------------- - // Decomposition de la face en wires. + // Decomposition of the face into wires. //----------------------------------- TopExp_Explorer SpineExp (WorkSpine, TopAbs_WIRE); for ( ; SpineExp.More(); SpineExp.Next()) { //---------------------------------------------- - // Calcul de la carte a droite du wire courant. + // Calculate the map to the right of the current wire. //---------------------------------------------- BRepLib_MakeFace B(gp_Pln(0.,0.,1.,0.)); TopoDS_Shape aLocalShape = SpineExp.Current().Reversed(); @@ -523,7 +522,7 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, SP = TopoDS::Wire(WPIte.Value()); CSide = Side(SP,Tol); //----------------------------------------------- - // Construction et ajout d un volevo elementaire. + // Construction and adding of an elementary volevo //----------------------------------------------- BRepFill_Evolved Vevo; if ( CSide == 4) { @@ -543,25 +542,25 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, if (Solid) CutVevo.AddTopAndBottom(Glue); //------------------------------------------------------------------------- - // Codage des regularites sur les edges paralleles generes par les vertex - // de la decoupe du profil. + // Gluing of regularites on parallel edges generate4d by vertices of the + // cut of the profile. //------------------------------------------------------------------------- CutVevo.ContinuityOnOffsetEdge(WorkProf); //----------------------------------------------------------------- - // construction du shape via le quilt, ie: - // - partage des topologies des volevos elementaires additionnes. - // - Orientation des faces les unes par rapport aux autres. + // construction of the shape via the quilt, ie: + // - sharing of topologies of elementary added volevos. + // - Orientation of faces correspondingly to each other. //----------------------------------------------------------------- TopoDS_Shape& SCV = CutVevo.ChangeShape(); SCV = Glue.Shells(); //------------------------------------------------------------------------ - // Transfert de la map des elements generes et du shape de Cutvevo dans - // myMap et Repositionnement dans l espace initial. + // Transfer of the map of generated elements and of the shape of Cutvevo + // in myMap and repositioning in the initial space. //------------------------------------------------------------------------ Transfert (CutVevo, MapProf, MapSpine, LSpine.Inverted(), InitLS, InitLP); - //Orientation du solid. + //Orientation of the solid. if (Solid) MakeSolid(); // modified by NIZHNY-EAP Mon Jan 24 11:26:48 2000 ___BEGIN___ @@ -639,9 +638,9 @@ void BRepFill_Evolved::SetWork(const TopoDS_Face& Sp, //======================================================================= //function : ConcaveSide -//purpose : Determine si les pipes ont ete construits du cote de la -// concavite. Dans ce cas il peuvent etre boucles. -// WARNING: Pas fini... Seulement fait pour les cercles. +//purpose : Determine if the pipes were at the side of the +// concavity. In this case they can be closed. +// WARNING: Not finished. Done only for circles. //======================================================================= static Standard_Boolean ConcaveSide(const TopoDS_Shape& S, @@ -694,15 +693,15 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, myBuilder.MakeCompound(TopoDS::Compound(myShape)); //--------------------------------------------------------------------- - // MapNodeVertex : associe a chaque noeud de la carte (key1) et - // a chaque element du profil (key2) un vertex (item). - // MapBis : ensemble des edges ou vertex (item) generes par - // une bisectrice sur une face ou un edge (key)des - // tuyaux ou revol. - // MapVerPar : Map des parametres des vertex sur les edges paralleles - // la liste contenue dans MapVerPar (E) correspond aux - // parametres sur E des vertex contenu dans MapBis(E); - // MapBS : liens BasicElt de la carte => Topologie du spine. + // MapNodeVertex : associate to each node of the map (key1) and + // to each element of the profile (key2) a vertex (item). + // MapBis : a set of edges or vertexes (item) generated by + // a bisectrice on a face or an edge (key) of + // tubes or revolutions. + // MapVerPar : Map of parameters of vertices on parallel edges + // the list contained in MapVerPar (E) corresponds + // to parameters on E of vertices contained in MapBis(E); + // MapBS : links BasicElt of the map => Topology of the spine. //--------------------------------------------------------------------- @@ -715,13 +714,13 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, TopTools_ListOfShape EmptyList; TColStd_SequenceOfReal EmptySeqOfReal; - // Repere du profile. + // mark of the profile. gp_Ax3 AxeRef(gp_Pnt(0.,0.,0.), gp_Dir(0.,0.,1.), gp_Dir(1.,0.,0.)); //--------------------------------------------------------------- - // Construction des revols et des tuyaux. + // Construction of revolutions and tubes. //--------------------------------------------------------------- BRepTools_WireExplorer ProfExp; TopExp_Explorer FaceExp; @@ -737,15 +736,15 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, EdgeVertices(CurrentEdge,VFirst,VLast); for (Link.Init(VLast); Link.More(); Link.Next()) { - //------------------------. - //Construction d un Revol - //------------------------. + //----------------------------. + //Construction of a Revolution + //----------------------------. MakeRevol (CurrentEdge, VLast, AxeRef); } for (Link.Init(CurrentEdge); Link.More(); Link.Next()) { //------------------------. - //Construction d un Tuyau + //Construction of a Tube //------------------------- MakePipe (CurrentEdge, AxeRef); } @@ -754,14 +753,14 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, #ifdef DRAW if (AffichEdge) { - cout << " Fin Construction des primitives geometriques"<Arc(i); SimpleExpression(Locus.GeomBis(CurrentArc,Reverse), Bis); - //----------------------------------------------------------------------- - // Recuperation des elements du spine correspondant aux basicElts separes. - //----------------------------------------------------------------------- + //------------------------------------------------------------------ + // Return elements of the spine corresponding to separate basicElts. + //------------------------------------------------------------------ S [0] = Link.GeneratingShape(CurrentArc->FirstElement()); S [1] = Link.GeneratingShape(CurrentArc->SecondElement()); @@ -796,15 +795,15 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, Standard_Integer vv = 0; for(ProfExp.Init(myProfile); ProfExp.More(); ProfExp.Next()) { vv++; - //------------------------------------------------------- - // Recuperation des deux faces separees par la bissectrice. - //------------------------------------------------------- + //----------------------------------------------- + // Return two faces separated by the bissectrice. + //----------------------------------------------- F [0] = TopoDS::Face(myMap(S[0])(ProfExp.Current()).First()); F [1] = TopoDS::Face(myMap(S[1])(ProfExp.Current()).First()); - //----------------------------------------------------------- - // Recuperation des edges paralleles sur chaque face. - //----------------------------------------------------------- + //------------------------------------ + // Return parallel edges on each face. + //------------------------------------ TopoDS_Vertex VF,VL; EdgeVertices(ProfExp.Current(),VF,VL); @@ -822,12 +821,12 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, if (Concave1) IsInversed(S[1],E[2],E[3],Inv1); //--------------------------------------------- - // Construction des geometries. + // Construction of geometries. //--------------------------------------------- BRepFill_TrimSurfaceTool Trim (Bis,F[0],F[1], E[0],E[2],Inv0[0],Inv1[0]); //----------------------------------------------------------- - //Construction des vertex correspondant au noeud de la carte. + //Construction of vertices corresponding to the node of the map //----------------------------------------------------------- TopoDS_Vertex VS,VE; Handle(MAT_Node) Node1, Node2; @@ -841,7 +840,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, Node2 = CurrentArc->SecondNode(); } //-------------------------------------------------------- - // Cas Particulier ou le noeud est sur un vertex du spine. + // Particular case when the node is on a vertex of the spine. //-------------------------------------------------------- if (Node1->OnBasicElt()) { if (S[0].ShapeType() == TopAbs_VERTEX) { @@ -851,7 +850,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, Node1 = CurrentArc->SecondElement()->StartArc()->FirstNode(); } } - // Fin cas particulier. + // End of particular case. Standard_Integer StartOnF = VertexFromNode(Node1, @@ -866,7 +865,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, MapNodeVertex,VE); //----------------------------------------------------------- - // Construction des vertex sur les edges paralleles au spine. + // Construction of vertices on edges parallel to the spine. //----------------------------------------------------------- if (!MapSeqVer.IsBound(VF)) { if (Inv0 [0] || Inv1 [0]) { @@ -920,23 +919,23 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, VOnL = MapSeqVer(VL); } - //---------------------------------------------------------- - // Test si la Bissectrice ne se projette pas sur la face - //---------------------------------------------------------- + //------------------------------------------------------ + // Test if the Bissectrice is not projected on the face + //------------------------------------------------------ if ((StartOnF == 0) && (EndOnF == 0) && VOnL.IsEmpty() && VOnF.IsEmpty()) - // Aucune trace de la bisectrice sur la face. + // No trace of the bisectrice on the face. continue; if ((StartOnF == 0) && (EndOnF == 0) && (VOnL.Length() + VOnF.Length() == 1)) - // le premier ou dernier noeud de l arc est sur une edge - // mais l arc n est pas sur la face. + // the first or last node of the arc is on the edge + // but the arc is not on the face. continue; //--------------------------------------------------------- - // determination des intervalles de la bissectrice qui se - // projettent sur F[0] et F[1]. + // determine the intervals of the bissectrice that are + // projected on F[0] and F[1]. //--------------------------------------------------------- TColStd_SequenceOfReal LastPar,FirstPar; TopTools_SequenceOfShape FirstV,LastV; @@ -954,7 +953,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, CBis,PCurve1,PCurve2,Continuity); //------------------------------------- - // Codage de l edge. + // Coding of the edge. //------------------------------------- myBuilder.MakeEdge(CurrentEdge, CBis, BRepFill_Confusion()); @@ -982,7 +981,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, } #endif //------------------------------------------- - // Stockage de l edge pour chacune des faces. + // Storage of the edge for each of faces. //------------------------------------------- for (k = 0; k <= 1;k++) { if (!MapBis.IsBound(F[k])) { @@ -990,21 +989,21 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, } } //--------------------------------------------------------------- - // l orientation de l edge depend du sens de la depouille. - // depouille => meme orientation E[0] , inverse orientation E[2] - // si contredepouille c est l inverse. + // orientation of the edge depends on the direction of the skin. + // skin => same orientation E[0] , inverted orientation E[2] + // if contreskin it is inverted. //-------------------------------------------------------------- E[0].Orientation(OriEdgeInFace(E[0],F[0])); E[2].Orientation(OriEdgeInFace(E[2],F[1])); if (DistanceToOZ(VF) < DistanceToOZ(VL) ) { - // Depouille + // Skin MapBis(F[0]).Append(CurrentEdge.Oriented (E[0].Orientation())); CurrentEdge.Orientation(TopAbs::Complement(E[2].Orientation())); MapBis(F[1]).Append(CurrentEdge); } else { - //Contre Depouille + //Contreskin MapBis(F[1]).Append(CurrentEdge.Oriented (E[2].Orientation())); CurrentEdge.Orientation(TopAbs::Complement(E[0].Orientation())); MapBis(F[0]).Append(CurrentEdge); @@ -1012,10 +1011,10 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, } //---------------------------------------------- - // Stockage des vertex sur les edges paralleles. - // on remplit MapBis et MapVerPar. - // VOnF pour E[0] et E[2]. - // VOnL pour E[1] et E[3]. + // Storage of vertices on parallel edges. + // fill MapBis and MapVerPar. + // VOnF for E[0] and E[2]. + // VOnL for E[1] and E[3]. //---------------------------------------------- for (k = 0; k <= 2; k = k+2) { if ( !MapSeqVer.IsBound(VF)) { @@ -1050,9 +1049,8 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, } //---------------------------------------------------------------- - // Edge [1] de la face courante sera Edge [0] de la face suivante. - // => copie de VonL dans VonF. Pour ne pas creer deux fois les memes - // vertex. + // Edge [1] of the current face will be Edge [0] of the next face. + // => copy of VonL in VonF. To avoid creating the same vertices twice. //----------------------------------------------------------------- MapSeqPar.Bind(VF,ParOnF); @@ -1065,12 +1063,12 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, #ifdef DEB if (AffichEdge) { - cout << " Fin Construction des edges et vertex sur les bissectrices"< pas d edge parallele. + // No connected face in the volevo => no parallel edge. //------------------------------------------------------------ TopTools_SequenceOfShape S; TrimEdge (CurrentEdge, @@ -1139,7 +1137,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, } //------------------------------------------------------------ - // Construction edge parallele du dernier vertex de myProfile. + // Construction of the parallel edge from the last vertex of myProfile. //------------------------------------------------------------ CurrentEdge = TopoDS::Edge(myMap(CurrentSpine)(VCL).First()); @@ -1151,8 +1149,8 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, if (!MapBis.IsBound(FaceControle)){ YaFace = Standard_False; } - // le nombre d element de la liste permet de savoir - // si les edges ont deja ete faite (profile ferme) . + // the number of element of the list allows to know + // if the edges have already been done (closed profile) . if (YaFace && myMap(CurrentSpine)(VCL).Extent()<= 1) { TopTools_SequenceOfShape S; TrimEdge (CurrentEdge, @@ -1176,12 +1174,12 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, #ifdef DRAW if (AffichEdge) { - cout <<" Fin Construction des edges paralleles"< sont toujours du -// meme cote de l axe OZ ou sont confondus avec celui-ci +//purpose : - Projection of the profile on the working plane. +// - Cut of the profile at the extrema of distance from profile to axis Oz. +// - Isolate vertical and horizontal parts. +// - Reconstruction of wires starting from cut edges. +// New wires stored in are always at the same +// side of axis OZ or mixed with it. //======================================================================= void BRepFill_Evolved::PrepareProfile(TopTools_ListOfShape& WorkProf, TopTools_DataMapOfShapeShape& MapProf ) const { - // Le profil est suppose place de telle sorte que la seule transformation - // a effectuer soit une projection dans le plan yOz. + // Supposedly the profile is located so that the only transformation + // to be carried out is a projection on plane yOz. // initialise the projection Plane and the Line to evaluate the extrema. Handle(Geom_Plane) Plane = new Geom_Plane(gp_Ax3(gp::YOZ())); Handle(Geom2d_Line) Line = new Geom2d_Line(gp::OY2d()); - // Map vertex initiaux -> vertex projete. + // Map initial vertex -> projected vertex. TopTools_DataMapOfShapeShape MapVerRefMoved; TopoDS_Vertex V1,V2,VRef1,VRef2; @@ -1564,13 +1560,13 @@ const Standard_Boolean NewWire = Standard_False; const TopoDS_Edge& E = TopoDS::Edge(Exp.Current()); - // Decoupe de l edge. + // Cut of the edge. CutEdgeProf (E ,Plane ,Line ,Cuts ,MapVerRefMoved); EdgeVertices(E,VRef1,VRef2); if ( Cuts.IsEmpty()) { - // Pas d extrema ni d intersections ni de vertex sur l axe. + // Neither extrema nor intersections nor vertices on the axis. B.Add(W,E); MapProf.Bind(E,E); } @@ -1587,15 +1583,15 @@ const if (DistanceToOZ(V2) < BRepFill_Confusion() && DistanceToOZ(V1) > BRepFill_Confusion()) { - // NE se termine sur l axe OZ => nouveau wire + // NE ends on axis OZ => new wire if (Cuts.IsEmpty()) { - // derniere portion de l edge courante - // Si ce n est pas le dernier edge de myProfile - // on creera un nouveau wire. + // last part of the current edge + // If it is not the last edge of myProfile + // create a new wire. NewWire = Standard_True; } else { - // Nouveau wire. + // New wire. B.MakeWire(W); WP.Append(W); } @@ -1609,8 +1605,7 @@ const } } - // Dans la liste des Wires, on cherche les edges generant des vevo plans - // ou verticaux. + // In the list of Wires, find edges generating plane or vertical vevo. TopTools_ListIteratorOfListOfShape ite; TopoDS_Wire CurW,NW; TopExp_Explorer EW; @@ -1663,7 +1658,7 @@ const } } - //bind des vertex modifies dans MapProf; + //connect vertices modified in MapProf; TopTools_DataMapIteratorOfDataMapOfShapeShape gilbert(MapVerRefMoved); for ( ;gilbert.More() ;gilbert.Next()) { MapProf.Bind(gilbert.Value(),gilbert.Key()); @@ -1703,7 +1698,7 @@ const MapSpine.Bind(V2,V2); Cuts.Clear(); - // Decoupe + // Cut CutEdge (E, mySpine, Cuts); if (Cuts.IsEmpty()) { @@ -1724,7 +1719,7 @@ const B.Add(WorkSpine, NW); } - // On construit les courbes 3d de la spine Sinon aux fraise + // Construct curves 3D of the spine BRepLib::BuildCurves3d(WorkSpine); #ifdef DRAW @@ -1823,21 +1818,21 @@ void BRepFill_Evolved::Add( BRepFill_Evolved& Vevo, if (Vevo.Shape().IsNull()) return; //------------------------------------------------- - // Recherche des wires communs a et a . + // Find wires common to and . //------------------------------------------------- TopExp_Explorer ExProf; for (ExProf.Init(Prof,TopAbs_VERTEX); ExProf.More(); ExProf.Next()) { const TopoDS_Shape& VV = ExProf.Current(); //--------------------------------------------------------------- - // Parcours des edge generes par VV dans myMap si elles existent - // et Bind dans Glue + // Parse edges generated by VV in myMap if they existent + // and Bind in Glue //--------------------------------------------------------------- //------------------------------------------------- ------------- - // Remarque les courbes des edges a bindes sont dans le meme sens. - // si on reste du meme cote. - // si on passe de gauche a droite elles sont inversees. + // Note: the curves of of reinforced edges are in the same direction + // if one remains on the same edge. + // if one passes from left to the right they are inverted. //------------------------------------------------- ------------- #ifndef DEB Standard_Boolean Commun = Standard_False; @@ -1878,7 +1873,7 @@ void BRepFill_Evolved::Add( BRepFill_Evolved& Vevo, Glue.Add(Vevo.Shape()); //---------------------------------------------------------- - // Ajout de la map des elements generes dans Vevo dans myMap. + // Add map of elements generate in Vevo in myMap. //---------------------------------------------------------- TopTools_DataMapOfShapeListOfShape EmptyMap; TopTools_ListOfShape EmptyList; @@ -1889,8 +1884,8 @@ void BRepFill_Evolved::Add( BRepFill_Evolved& Vevo, CurrentProf = iteP.Key(); if (!myMap.IsBound(CurrentSpine)) { //------------------------------------------------ - // L element du spine n etait pas encore present . - // => profil precedent pas sur le bord. + // The element of spine is not yet present . + // => previous profile not on the border. //------------------------------------------------- myMap.Bind(CurrentSpine,EmptyMap); } @@ -1900,7 +1895,7 @@ void BRepFill_Evolved::Add( BRepFill_Evolved& Vevo, = MapVevo (CurrentSpine)(CurrentProf); TopTools_ListIteratorOfListOfShape itl (GenShapes); for (; itl.More(); itl.Next()) { - // lors de Glue.Add les shapes partages son recrees. + // during Glue.Add the shared shapes are recreated. if (Glue.IsCopied(itl.Value())) myMap(CurrentSpine)(CurrentProf).Append(Glue.Copy(itl.Value())); else @@ -1933,18 +1928,17 @@ void BRepFill_Evolved::Transfert( BRepFill_Evolved& Vevo, const TopLoc_Location& InitLS, const TopLoc_Location& InitLP) { - //-------------------------------------------------------------- - // Transfert du shape de Vevo dans myShape et Repositionnement - // des shapes. - //-------------------------------------------------------------- + //---------------------------------------------------------------- + // Transfer the shape from Vevo in myShape and Reposition shapes. + //---------------------------------------------------------------- myShape = Vevo.Shape(); mySpine .Location(InitLS); myProfile.Location(InitLP); myShape .Move (LS); // - // En attendant mieux, on force le Same Parameter ici - // ( Pb Sameparameter entre YaPlanar et Tuyaux + // Expecting for better, the Same Parameter is forced here + // ( Pb Sameparameter between YaPlanar and Tuyaux // BRep_Builder B; TopExp_Explorer ex(myShape,TopAbs_EDGE); @@ -1957,7 +1951,7 @@ void BRepFill_Evolved::Transfert( BRepFill_Evolved& Vevo, //-------------------------------------------------------------- - // Transfert de myMap de Vevo dans myMap. + // Transfer of myMap of Vevo into myMap. //-------------------------------------------------------------- BRepFill_DataMapIteratorOfDataMapOfShapeDataMapOfShapeListOfShape iteS; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape iteP; @@ -1995,7 +1989,7 @@ void BRepFill_Evolved::Transfert( BRepFill_Evolved& Vevo, } } //-------------------------------------------------------------- - // Transfert de Top et Bottom de Vevo dans myTop et myBottom. + // Transfer of Top and Bottom of Vevo in myTop and myBottom. //-------------------------------------------------------------- myTop = Vevo.Top() ; myTop.Move(LS); myBottom = Vevo.Bottom(); myBottom.Move(LS); @@ -2038,7 +2032,7 @@ GeomAbs_JoinType BRepFill_Evolved::JoinType() const void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue) { -// recuperation premier et dernier vertex du profil. +// return first and last vertex of the profile. TopoDS_Vertex V[2]; TopExp::Vertices (myProfile,V[0],V[1]); if (V[0].IsSame(V[1])) return; @@ -2048,7 +2042,7 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue) for (Standard_Integer i = 0; i<=1; i++) { BRepAlgo_Loop Loop; - // Construction des supports. + // Construction of supports. gp_Pln S (0.,0.,1.,- Altitud(V[i])); TopoDS_Face F = BRepLib_MakeFace(S); Loop.Init(F); @@ -2097,8 +2091,8 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue) for (itL.Initialize(L); itL.More(); itL.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itL.Value()); if (!BRep_Tool::Degenerated(E)){ - // le centre du cercle (ie le vertex) est IN le bouchon si vertex IsOut - // OUT !IsOut + // the center of circle (ie vertex) is IN the cap if vertex IsOut + // OUT !IsOut BRepAdaptor_Curve C(E); Standard_Real f,l; BRep_Tool::Range(E,f,l); @@ -2130,8 +2124,8 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue) const TopTools_ListOfShape& L = Loop.NewFaces(); TopTools_ListIteratorOfListOfShape itL(L); - // Maj de myTop et myBottom pour l historique - // et addition des faces construites. + // Maj of myTop and myBottom for the history + // and addition of constructed faces. TopoDS_Compound Bouchon; BRep_Builder B; B.MakeCompound(Bouchon); @@ -2208,8 +2202,8 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE, // AxeRef,SE, // mySpine,Standard_True); - // Copie du profil pour eviter l accumulation des - // locations sur les Edges de myProfile! + // Copy of the profile to avoid the accumulation of + // locations on the Edges of myProfile! Handle(BRepTools_TrsfModification) TrsfMod = new BRepTools_TrsfModification(gp_Trsf()); @@ -2236,7 +2230,7 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE, } #endif //--------------------------------------------- - // Rangement du Tuyau dans myMap. + // Arrangement of Tubes in myMap. //--------------------------------------------- BRepTools_WireExplorer GenProfExp; @@ -2297,8 +2291,8 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE, gp_Ax1 AxeRev( BRep_Tool::Pnt(VLast), -gp::DZ()); - // Positionnement de la couture sur l edge du spine - // pour que les bissectrices ne traversent pas les coutures. + // Position of the sewing on the edge of the spine + // so that the bissectrices didn't cross the sewings. gp_Trsf dummy; dummy.SetRotation(AxeRev, 1.5*PI); TopLoc_Location DummyLoc(dummy); @@ -2320,7 +2314,7 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE, } #endif //-------------------------------------------- - // Rangement du revol dans myMap. + // Arrangement of revolutions in myMap. //--------------------------------------------- BRepTools_WireExplorer GenProfExp; TopTools_ListOfShape L; @@ -2425,8 +2419,8 @@ void BRepFill_Evolved::TransformInitWork(const TopLoc_Location& LS, //======================================================================= //function : ContinuityOnOffsetEdge -//purpose : Codage des regularites sur les edges paralleles de CutVevo -// communes aux parties gauches et droites du volevo. +//purpose : Coding of regularities on edges parallel to CutVevo +// common to left and right parts of volevo. //======================================================================= void BRepFill_Evolved::ContinuityOnOffsetEdge (const TopTools_ListOfShape& WorkProf) { @@ -2448,7 +2442,7 @@ void BRepFill_Evolved::ContinuityOnOffsetEdge (const TopTools_ListOfShape& Work V = WExp.CurrentVertex(); if (DistanceToOZ(V) <= BRepFill_Confusion()) { - // les regularites sont deja codes sur les edges des volevos elementaires + // the regularities are already coded on the edges of elementary volevos Standard_Real U1 = BRep_Tool::Parameter(V,CurE); Standard_Real U2 = BRep_Tool::Parameter(V,PrecE); BRepAdaptor_Curve Curve1(CurE); @@ -2457,7 +2451,7 @@ void BRepFill_Evolved::ContinuityOnOffsetEdge (const TopTools_ListOfShape& Work if (Continuity >=1) { //----------------------------------------------------- - //Code continuite pour toutes les edges generes par V. + //Code continuity for all edges generated by V. //----------------------------------------------------- for (iteS.Initialize(myMap); iteS.More(); iteS.Next()) { const TopoDS_Shape& SP = iteS.Key(); @@ -2480,7 +2474,7 @@ void BRepFill_Evolved::ContinuityOnOffsetEdge (const TopTools_ListOfShape& Work EdgeVertices (PrecE, V, VL); if (VF.IsSame(VL)) { - //Profil ferme. + //Closed profile. Standard_Real U1 = BRep_Tool::Parameter(VF,CurE); Standard_Real U2 = BRep_Tool::Parameter(VF,FirstE); BRepAdaptor_Curve Curve1(CurE); @@ -2488,9 +2482,9 @@ void BRepFill_Evolved::ContinuityOnOffsetEdge (const TopTools_ListOfShape& Work GeomAbs_Shape Continuity = BRepLProp::Continuity(Curve1,Curve2,U1,U2); if (Continuity >=1) { - //----------------------------------------------------- - //Code continuite pour toutes les edges generes par V. - //----------------------------------------------------- + //--------------------------------------------- + //Code continuity for all edges generated by V. + //--------------------------------------------- for (iteS.Initialize(myMap); iteS.More(); iteS.Next()) { const TopoDS_Shape& SP = iteS.Key(); if (myMap (SP).IsBound(VF) @@ -2510,11 +2504,11 @@ void BRepFill_Evolved::ContinuityOnOffsetEdge (const TopTools_ListOfShape& Work //======================================================================= //function : AddDegeneratedEdge -//purpose : il peut manquer des edges degeneres dans certaine face -// les edges degeneres manquantes ont des vertex correspondant -// aux node de la carte. -// Aujourd hui on se contente de comparer les points UV des vertex -// sur les edges a une certaine tolerance. +//purpose : degenerated edges can be missing in some face +// the missing degenerated edges have vertices corresponding +// to node of the map. +// Now it is enough to compare points UV of vertices +// on edges with a certain tolerance. //======================================================================= static void AddDegeneratedEdge(TopoDS_Face& F, @@ -2558,7 +2552,7 @@ static void AddDegeneratedEdge(TopoDS_Face& F, } else { if (!P1.IsEqual(PrevP,TolConf)) { - // edge degenere a inserer. + // degenerated edge to be inserted. Change = Standard_True; gp_Vec2d V(PrevP,P1); Handle(Geom2d_Line) C2d = new Geom2d_Line(PrevP,gp_Dir2d(V)); @@ -2575,9 +2569,9 @@ static void AddDegeneratedEdge(TopoDS_Face& F, } PrevP = P2; } - if (!Change && VF.IsSame(V2)) { // ferme + if (!Change && VF.IsSame(V2)) { // closed if (!PF.IsEqual(P2,TolConf)) { - // edge degenere a inserer. + // Degenerated edge to be inserted. Change = Standard_True; gp_Vec2d V(P2,PF); Handle(Geom2d_Line) C2d = new Geom2d_Line(P2,gp_Dir2d(V)); @@ -2609,7 +2603,7 @@ void TrimFace(const TopoDS_Face& Face, if ( AffichEdge) { char name[100]; cout << " TrimFace " << ++NbTRIMFACES; - cout << " : " << NB << " edges dans la restriction" << endl; + cout << " : " << NB << " edges within the restriction" << endl; for ( Standard_Integer j = 1; j <= NB; j++) { sprintf(name,"TRIMEDGE_%d_%d",NbTRIMFACES,j); DBRep::Set(name,TopoDS::Edge(TheEdges.Value(j))); @@ -2619,7 +2613,7 @@ void TrimFace(const TopoDS_Face& Face, //-------------------------------------- - // Creation des wires limitant les faces. + // Creation of wires limiting faces. //-------------------------------------- BRep_Builder TheBuilder; @@ -2651,8 +2645,8 @@ void TrimFace(const TopoDS_Face& Face, else { MWire.Add(E); if ( MWire.Error() == BRepLib_WireDone) { - // on a reussi la connection - // on l`enleve dans la sequence et on recommence au debut. + // the connection is successful + // it is removed from the sequence and one restarts from the beginning. TheEdges.Remove(i); AddEdge = Standard_True; NbEdges = TheEdges.Length(); @@ -2732,9 +2726,9 @@ void TrimEdge (const TopoDS_Edge& Edge, Standard_Boolean Change = Standard_True; BRep_Builder TheBuilder; S.Clear(); - //----------------------------------------------------------- - // Tri des deux sequence en fonction du parametre sur l edge. - //----------------------------------------------------------- + //------------------------------------------------------------ + // Parse two sequences depending on the parameter on the edge. + //------------------------------------------------------------ while (Change) { Change = Standard_False; for (Standard_Integer i = 1; i < ThePar.Length(); i++) { @@ -2747,7 +2741,7 @@ void TrimEdge (const TopoDS_Edge& Edge, } //---------------------------------------------------------- - // Si un vertex n est pas dans le detrompeur il est elimine. + // If a vertex is not in the proofing point, it is removed. //---------------------------------------------------------- if (!BRep_Tool::Degenerated(Edge)) { for (Standard_Integer k = 1; k <= TheVer.Length(); k ++) { @@ -2761,10 +2755,10 @@ void TrimEdge (const TopoDS_Edge& Edge, } //------------------------------------------------------------------- - // Traitement des vertex doubles pour les edges non degeneres. - // Si un vertex_double apparait deux fois dans les edges de contole - // le vertex est elimine . - // sinon on garde une seule de ces representations. + // Processing of double vertices for non-degenerated edges. + // If a vertex_double appears twice in the edges of control, + // the vertex is eliminated . + // otherwise its only representation is preserved. //------------------------------------------------------------------- if (!BRep_Tool::Degenerated(Edge)) { for (Standard_Integer k = 1; k < TheVer.Length(); k ++) { @@ -2783,9 +2777,9 @@ void TrimEdge (const TopoDS_Edge& Edge, } //----------------------------------------------------------- - // Creation des edges. - // le nombre de vertex doit etre pair les edges a creer vont - // d un vertex d indice impair i au vertex i+1; + // Creation of edges. + // the number of vertices should be even. The edges to be created leave + // from a vertex with uneven index i to vertex i+1; //----------------------------------------------------------- for (Standard_Integer k = 1; k < TheVer.Length(); k = k+2) { TopoDS_Shape aLocalShape = Edge.EmptyCopied(); @@ -2836,8 +2830,8 @@ void ComputeIntervals (const TopTools_SequenceOfShape& VOnF, } while ( IOnF <= VOnF.Length() || IOnL <= VOnL.Length()) { //--------------------------------------------------------- - // Recuperation du plus petit parametre sur la bissectrice - // par rapport aux positions courrantes IOnF,IOnL. + // Return the smallest parameter on the bissectrice + // correponding to the current positions IOnF,IOnL. //--------------------------------------------------------- if ( IOnL > VOnL.Length() || (IOnF <= VOnF.Length() && @@ -2853,9 +2847,9 @@ void ComputeIntervals (const TopTools_SequenceOfShape& VOnF, IOnL++; } //--------------------------------------------------------------------- - // Quand V2 et V1 sont differents on teste le point milieu P de - // l intervalle par rapport a la face. Si P est dans la face l interval - // est valide. + // When V2 and V1 are different the medium point P of the + // interval is tested compared to the face. If P is in the face the interval + // is valid. //--------------------------------------------------------------------- if (!V1.IsNull() && !V2.IsSame(V1)) { gp_Pnt2d P = Bis->Value((U2 + U1)*0.5); @@ -2884,9 +2878,9 @@ void ComputeIntervals (const TopTools_SequenceOfShape& VOnF, //======================================================================= //function : Relative -//purpose : Commun est vrai si les deux wires ont V en commun -// return FORWARD si les wires au voisinage du vertex sont -// du meme cote. REVERSED sinon. +//purpose : Commun is true if two wires have V in common +// return FORWARD if the wires near the vertex are at +// the same side. otherwise REVERSED. //======================================================================= static TopAbs_Orientation Relative (const TopoDS_Wire& W1, const TopoDS_Wire& W2, @@ -2923,9 +2917,9 @@ static TopAbs_Orientation Relative (const TopoDS_Wire& W1, TopoDS_Wire WW1 = BRepLib_MakeWire(E1); TopoDS_Wire WW2 = BRepLib_MakeWire(E2); Standard_Real Tol = BRepFill_Confusion(); - if (Side(WW1,Tol) < 4 && Side(WW2,Tol) < 4) // les deux a gauche + if (Side(WW1,Tol) < 4 && Side(WW2,Tol) < 4) // two to the left return TopAbs_FORWARD; - if (Side(WW1,Tol) > 4 && Side(WW2,Tol) > 4) // les deux a droite + if (Side(WW1,Tol) > 4 && Side(WW2,Tol) > 4) // two to the right return TopAbs_FORWARD; return TopAbs_REVERSED; @@ -2959,13 +2953,13 @@ TopAbs_Orientation OriEdgeInFace (const TopoDS_Edge& E, //======================================================================= //function : IsOnFace -//purpose : Retourne la position du point defini par d1 -// dans la face defini Par d2 d3. +//purpose : Return the position of the point defined by d1 +// in the face defined by d2 d3. // -// 0 : le point est en dehors de la face. -// 1 : le point est sur ledge correspondant a d2. -// 2 : le point est a l interieur de la face. -// 3 : le point est sur ledge correspondant a d3. +// 0 : the point is out of the face. +// 1 : the point is on edge corresponding to d2. +// 2 : the point is inside the face. +// 3 : the point is on edge corresponding to d3. //======================================================================= Standard_Integer PosOnFace (Standard_Real d1, @@ -2992,8 +2986,8 @@ Standard_Integer PosOnFace (Standard_Real d1, //======================================================================= //function : DoubleOrNotInFace -//purpose : Return True if V apparait 0 ou deux fois dans la sequence -// d edges EC +//purpose : Return True if V appears zero or two times in the sequence +// of edges EC //======================================================================= Standard_Boolean DoubleOrNotInFace(const TopTools_SequenceOfShape& EC, @@ -3067,8 +3061,7 @@ void SimpleExpression (const Bisector_Bisec& B, //======================================================================= //function : CutEdgeProf -//purpose : Projection et Decoupe d une edge aux extrema de distance a -// l axe OZ. +//purpose : Projection and Cut of an edge at extrema of distance to axis OZ. //======================================================================= void CutEdgeProf (const TopoDS_Edge& E, @@ -3085,12 +3078,12 @@ void CutEdgeProf (const TopoDS_Edge& E, Handle(Geom2d_Curve) C2d; TopLoc_Location L; - // On recupere la courbe associee a chaque Edge + // Return the curve associated to each Edge C = BRep_Tool::Curve(E,L,f,l); CT = new Geom_TrimmedCurve(C,f,l); CT->Transform(L.Transformation()); - // on la projete dans le plan et on recupere la PCurve associee + // project it in the plane and return the associated PCurve gp_Dir Normal = Plane->Pln().Axis().Direction(); C = Handle(Geom_Curve)::DownCast(GeomProjLib::ProjectOnPlane(CT,Plane, @@ -3098,7 +3091,7 @@ void CutEdgeProf (const TopoDS_Edge& E, Standard_False)); C2d = GeomProjLib::Curve2d(C,Plane); - // On calcule les extrema avec la droite + // Calculate the extrema with the straight line TColStd_SequenceOfReal Seq; Standard_Real U1 = -Precision::Infinite(); @@ -3183,7 +3176,7 @@ void CutEdgeProf (const TopoDS_Edge& E, else Cuts.Prepend(EE); - // on reinitialise + // reinitialize CurParam = Param; Vf = VV; } @@ -3200,13 +3193,11 @@ void CutEdgeProf (const TopoDS_Edge& E, //======================================================================= //function : CutEdge -//purpose : Decoupe d une edge aux extrema de courbures et aux points -// d inflexion. -// Les cercles fermes sont aussi decoupes en deux. -// Si est vide l edge n est pas modifie. -// Le premier et le dernier vertex de l edge originale -// appartiennent respectivement a la premiere et derniere -// portions. +//purpose : Cut an edge at thw extrema of curves and at points of inflexion. +// Closed circles are also cut in two. +// If are empty the edge is not modified. +// The first and the last vertex of the original edge +// belong to the first and last parts respectively. //======================================================================= void CutEdge (const TopoDS_Edge& E, const TopoDS_Face& F, @@ -3228,7 +3219,7 @@ void CutEdge (const TopoDS_Edge& E, if (CT2d->BasisCurve()->IsKind(STANDARD_TYPE(Geom2d_Circle)) && E.Closed()) { //--------------------------- - // Decoupe cercle ferme. + // Cut closed circle. //--------------------------- Standard_Real m1 = (2*f + l)/3.; Standard_Real m2 = ( f + 2*l)/3.; @@ -3267,26 +3258,26 @@ void CutEdge (const TopoDS_Edge& E, Cuts.Append(ME.Oriented(E.Orientation())); Cuts.Append(LE.Oriented(E.Orientation())); //-------- - // Retour. + // Return. //-------- return; } //------------------------- - // Decoupe de la courbe. + // Cut of the curve. //------------------------- Cuter.Perform(CT2d); if (Cuter.UnModified()) { //----------------------------- - // edge non modifiee => retour. + // edge not modified => return. //----------------------------- return; } else { - //-------------------------------------- - // Creation des edges decoupees. - //-------------------------------------- + //------------------------ + // Creation of cut edges. + //------------------------ VF = V1; for ( Standard_Integer k = 1; k <= Cuter.NbCurves(); k++) { @@ -3311,10 +3302,10 @@ void CutEdge (const TopoDS_Edge& E, //======================================================================= //function : VertexFromNode -//purpose : Test si la position de aNode par rapport aux distance to OZ -// des vertex VF et VL. retourne Status. -// si Status est different de 0 Recupere ou cree le vertex -// correspondant a aNode. +//purpose : Test if the position of aNode correspondingly to the distance to OZ +// of vertices VF and VL. returns Status. +// if Status is different from 0 Returned +// the vertex corresponding to aNode is created. //======================================================================= Standard_Integer VertexFromNode @@ -3339,9 +3330,9 @@ Standard_Integer VertexFromNode else if (Status == 3) ShapeOnNode = VL; if (!ShapeOnNode.IsNull()) { - //------------------------------------------------ - // le vertex correspondra a un noeud de la carte - //------------------------------------------------ + //------------------------------------------------- + // the vertex will correspond to a node of the map + //------------------------------------------------- if (MapNodeVertex.IsBound(aNode) && MapNodeVertex(aNode).IsBound(ShapeOnNode)) { VN = TopoDS::Vertex diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index baa25a9b16..2a3299710d 100755 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -2,33 +2,6 @@ // Created: Mon Mar 7 10:01:42 1994 // Author: Bruno DUMORTIER // -// Modified: Mon Feb 23 09:28:46 1998 -// Author: Joelle CHAUVET -// -// traitement des wires ponctuels -// Modified: Tue Mar 10 17:08:58 1998 -// Author: Joelle CHAUVET -// -// suite traitement des KPart, calcul d'une BezierCurve -// au lieu d'une extraction d'iso pour Edge3 et Edge4 -// Modified: Mon Apr 6 15:47:44 1998 -// Author: Joelle CHAUVET -// -// correction KPart (PRO12929) -// Modified: Thu Apr 30 15:24:17 1998 -// Author: Joelle CHAUVET -// -// debug KPart -// Modified: Fri Jul 31 15:14:19 1998 -// Author: Joelle CHAUVET -// -// KPart semi-cone pointe en bas : calcul de Edge4 -// -// ajout des methodes Generated et GeneratedShapes -// Modified: Mon Nov 23 12:22:04 1998 -// Author: Joelle CHAUVET -// -// CTS21701 : orientation de l'edge dans DetectKPart #include @@ -88,10 +61,10 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2) { - // initialisations + // initializations Standard_Integer IType = 0; - // caracteristiques de la premiere edge + // characteristics of the first edge Standard_Real first1, last1, first2, last2, ff, ll; TopLoc_Location loc; TopoDS_Vertex V1, V2; @@ -99,7 +72,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, GeomAdaptor_Curve AdC1; Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1); - // recherche de cas particulier + // find the particular case gp_Pnt pos1, pos; Standard_Real dist; #ifndef DEB @@ -127,14 +100,14 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, } AdC1.Load(curv1); if (AdC1.GetType() == GeomAbs_Circle) { - // premiere section circulaire + // first circular section IType = 1; pos1 = AdC1.Circle().Location(); dist1 = AdC1.Circle().Radius(); axe1 = AdC1.Circle().Axis(); } else if (AdC1.GetType() == GeomAbs_Line) { - // premiere section rectiligne + // first straight line section IType = 4; pos1 = AdC1.Line().Location(); dist1 = AdC1.Value(first1).Distance(AdC1.Value(last1)); @@ -143,7 +116,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, axe1 = gp_Ax1(AdC1.Value(first1),dir); } else { - // premiere section quelconque + // first section of any type IType = 0; } } @@ -155,9 +128,9 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, TopExp::Vertices(Edge2,V1,V2); pos = BRep_Tool::Pnt(V1); if (IType==1) { - // seul cas particulier avec une edge degeneree en bout : le cone + // the only particular case with degenerated edge at end : the cone if (pos.IsEqual(pos1,Precision::Confusion())) { - // le sommet est confondu avec le centre du cercle + // the top is mixed with the center of the circle IType = 0; } else { @@ -165,17 +138,17 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, gp_Dir dir(vec); axe = gp_Ax1(pos1,dir); if (axe.IsParallel(axe1,Precision::Angular())) { - // le sommet est bien sur l'axe du cercle + // the top is on the axis of the circle IType = 2; } else { - // sommet incorrect --> pas de cas particulier + // incorrect top --> no particular case IType = 0; } } } - else if (IType != 4) { //not plane - // pas de cas particulier + else if (IType != 4) { //not a plane + // no particular case IType = 0; } } @@ -194,15 +167,15 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, if (IType>0 && IType<4) { if (AdC.GetType() != GeomAbs_Circle) { - // section non circulaire --> pas de cas particulier + // section not circular --> no particular case IType = 0; } else { if (AdC.Circle().Axis() .IsCoaxial(axe1,Precision::Angular(),Precision::Confusion())) { - // meme axe + // same axis if (Abs(AdC.Circle().Radius()-dist1)< Precision::Confusion()) { - // possibilite de cylindre ou de morceau de cylindre + // possibility of cylinder or a piece of cylinder Standard_Real h1 = Abs(last1-first1), h2 = Abs(last2-first2); Standard_Boolean Same, SameParametricLength = ( Abs(h1-h2) < Precision::PConfusion() ); @@ -214,16 +187,16 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, Same = SameParametricLength && ( gp_Vec(P1,P2).IsNormal(DU,Precision::Angular()) ) ; if (Same) { - // cylindre ou morceau de cylindre + // cylinder or piece of cylinder IType = 1; } else { - // l'intervalle de definition n'est pas correct + // the interval of definition is not correct IType = 0; } } else { - // possibilite de tronc de cone + // possibility of cone truncation Standard_Real h1 = Abs(last1-first1), h2 = Abs(last2-first2); Standard_Boolean Same, SameParametricLength = ( Abs(h1-h2) < Precision::PConfusion() ); @@ -235,27 +208,27 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, Same = SameParametricLength && ( gp_Vec(P1,P2).IsNormal(DU,Precision::Angular()) ) ; if (Same) { - // tronc de cone + // truncation of cone IType = 2; } else { - // l'intervalle de definition n'est pas correct + // the interval of definition is not correct IType = 0; } } if (AdC.Circle().Location().IsEqual(pos1,Precision::Confusion())) { - // les centres sont confondus + // the centers are mixed IType = 0; } } else { - // axe different + // different axis if (AdC.Circle().Radius()==dist1) { - // tore ? + // torus ? IType = 3; } else { - // rayon different --> pas de cas particulier + // different radius --> no particular case IType = 0; } } @@ -263,7 +236,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, } else if (IType>=4) { if (AdC.GetType() != GeomAbs_Line) { - // section non rectiligne --> pas de cas particulier + // not a straight line section --> no particular case IType = 0; } else { @@ -273,11 +246,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, gp_Dir dir(vec); axe = gp_Ax1(AdC.Value(first2),dir); if (axe.IsParallel(axe1,Precision::Angular())) { - // droite parallele + // parallel straight line if (Abs(dist-dist1) pas de cas particulier + // different length --> no particular case IType = 0; } } else { - // droite non parallele --> pas de cas particulier + // not parallel straight line --> no particular case IType = 0; } } @@ -301,11 +274,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, IType = 4; //plane else if (AdC.GetType() == GeomAbs_Circle) { - // seul cas particulier avec une edge degeneree au debut : le cone + // the only particular case with degenerated edge at the beginning the cone pos = AdC.Circle().Location(); axe = AdC.Circle().Axis(); if (pos1.IsEqual(pos,Precision::Confusion())) { - // le sommet est confondu avec le centre du cercle + // the top is mixed with the center of the circle IType = 0; } else { @@ -313,11 +286,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, gp_Dir dir(vec); axe1 = gp_Ax1(pos1,dir); if (axe.IsParallel(axe1,Precision::Angular())) { - // le sommet est bien sur l'axe du cercle + // the top is on the axis of the circle IType = -2; } else { - // sommet incorrect --> pas de cas particulier + // incorrect top --> no particular case IType = 0; } } @@ -328,7 +301,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, } } - // tore et extrusion ne sont pas des cas part. + // torus and extrusion are not particular cases. if (IType == 3 || IType == 5) IType = 0; return IType; } @@ -354,7 +327,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, Handle(Geom_Curve) C1; Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1); if(degen1) { - // cone avec arete degeneree au sommet + // cone with degenerated edge at the top TopExp::Vertices(Edge1,v1f,v1l); } else { @@ -377,7 +350,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, Handle(Geom_Curve) C2; Standard_Boolean degen2 = BRep_Tool::Degenerated(Edge2); if(degen2) { - // cone avec arete degeneree au sommet + // cone with degenerated edge at the top TopExp::Vertices(Edge2,v2f,v2l); } else { @@ -419,7 +392,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, Handle(Geom_Surface) surface; Standard_Real V, Rad; if (IType==1) { - // surface cylindrique + // cylindrical surface gp_Circ c1 = (Handle(Geom_Circle)::DownCast(C1))->Circ(); gp_Circ c2 = (Handle(Geom_Circle)::DownCast(C2))->Circ(); gp_Ax3 Ac1 = c1.Position(); @@ -434,7 +407,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, ( Cyl, aa, bb, Min(0.,V), Max(0.,V) ); } else if (IType==2) { - // surface conique + // conical surface gp_Circ k1 = (Handle(Geom_Circle)::DownCast(C1))->Circ(); gp_Ax3 Ak1 = k1.Position(); if (degen2) { @@ -460,7 +433,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, ( Cone, aa, bb, Min(0.,V), Max(0.,V) ); } else if (IType==-2) { - // surface conique avec le sommet au debut (degen1 est vrai) + // conical surface with the top at the beginning (degen1 is true) gp_Circ k2 = (Handle(Geom_Circle)::DownCast(C2))->Circ(); gp_Ax3 Ak2 = k2.Position(); Ak2.SetLocation(BRep_Tool::Pnt(v1f)); @@ -479,7 +452,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, ( Cone, aa, bb, Min(0.,V), Max(0.,V) ); } else if (IType==3) { - // surface torique ? + // torus surface ? } else if (IType==4) { // surface plane @@ -508,7 +481,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, //( Plan, aa, bb, Min(0.,V), Max(0.,V) ); } else if (IType==5) { - // surface d'extrusion ? + // surface of extrusion ? } else { // IType incorrect @@ -638,12 +611,12 @@ void BRepFill_Generator::Perform() Standard_Boolean Periodic = (Edge1.Closed() || degen1) && (Edge2.Closed() || degen2); - // ATTENTION : un wire non ponctuel ne doit pas - // contenir une edge ponctuelle + // ATTENTION : a non-punctual wire should not + // contain a punctual edge if (!wPoint1) ex1.Next(); if (!wPoint2) ex2.Next(); - // initialisation des vertices + // initialization of vertices Handle(Geom_Surface) Surf; Standard_Real f1=0, l1=1, f2=0, l2=1; if (Edge1.Orientation() == TopAbs_REVERSED) @@ -671,10 +644,10 @@ void BRepFill_Generator::Perform() Periodic = (E1IsReallyClosed || degen1) && (E2IsReallyClosed || degen2); } - // traitement des KPart + // processing of KPart Standard_Integer IType = DetectKPart(Edge1,Edge2); if (IType==0) { - // pas de cas part + // no part cases TopLoc_Location L,L1,L2; Handle(Geom_Curve) C1, C2; @@ -735,7 +708,7 @@ void BRepFill_Generator::Perform() B.MakeFace(Face,Surf,Precision::Confusion()); } else { - // cas particulier + // particular case CreateKPart(Edge1,Edge2,IType,Surf); B.MakeFace(Face,Surf,Precision::Confusion()); } @@ -753,13 +726,13 @@ void BRepFill_Generator::Perform() Handle(Geom_Curve) CC; TColgp_Array1OfPnt Extremities(1,2); if (IType==0) { - // cas general : Edge3 correspond a l'iso U=f1 + // general case : Edge3 corresponds to iso U=f1 CC = Surf->UIso(f1); first=f2; last=l2; } else { - // cas particulier : il faut calculer la courbe 3d + // particular case : it is required to calculate the curve 3d Extremities(1) = BRep_Tool::Pnt(V1f); Extremities(2) = BRep_Tool::Pnt(V2f); CC = new Geom_BezierCurve(Extremities); @@ -794,13 +767,13 @@ void BRepFill_Generator::Perform() Handle(Geom_Curve) CC; TColgp_Array1OfPnt Extremities(1,2); if (IType==0) { - // cas general : Edge4 correspond a l'iso U=l1 + // general case : Edge4 corresponds to iso U=l1 CC = Surf->UIso(l1); first=f2; last=l2; } else { - // cas particulier : il faut calculer la courbe 3d + // particular case : it is required to calculate the curve 3d Extremities(1) = BRep_Tool::Pnt(V1l); Extremities(2) = BRep_Tool::Pnt(V2l); CC = new Geom_BezierCurve(Extremities); diff --git a/src/BRepFill/BRepFill_LocationLaw.cxx b/src/BRepFill/BRepFill_LocationLaw.cxx index abc15b1876..18ad1edd96 100755 --- a/src/BRepFill/BRepFill_LocationLaw.cxx +++ b/src/BRepFill/BRepFill_LocationLaw.cxx @@ -30,7 +30,7 @@ //======================================================================= //function : Norm -//purpose : Norme d'une Matrice +//purpose : Norm of a Matrix //======================================================================= static Standard_Real Norm(const gp_Mat& M) { @@ -50,7 +50,7 @@ static Standard_Real Norm(const gp_Mat& M) { //======================================================================= //function : ToG0 -//purpose : Cacul une tranformation T tq T.M2 = M1 +//purpose : Calculate tranformation T such as T.M2 = M1 //======================================================================= static void ToG0(const gp_Mat& M1, const gp_Mat& M2, gp_Mat& T) { @@ -133,7 +133,7 @@ void BRepFill_LocationLaw::BiNormalIsMain() //======================================================================= //function : TransformInCompatibleLaw -//purpose : Mise en continuite des loi +//purpose : Set in continuity of laws //======================================================================= void BRepFill_LocationLaw::TransformInCompatibleLaw(const Standard_Real TolAngular) { @@ -168,7 +168,7 @@ void BRepFill_LocationLaw::BiNormalIsMain() #if DEB if (N2.Dot(T1) > 1.e-9) { - cout << "Imprecision dans TransformInCompatibleLaw" << endl; + cout << "Inprecision in TransformInCompatibleLaw" << endl; cout << "--- T1.R(N2) = " << N2.Dot(T1) << endl; gp_Vec tt; tt = T1; @@ -186,7 +186,7 @@ void BRepFill_LocationLaw::BiNormalIsMain() //======================================================================= //function : TransformInG0Law -//purpose : Mise en continuite des loi +//purpose : Set in continuity of laws //======================================================================= void BRepFill_LocationLaw::TransformInG0Law() { @@ -204,7 +204,7 @@ void BRepFill_LocationLaw::BiNormalIsMain() myLaws->Value(ipath)->SetTrsf(aux); } - // La loi est elle periodique ? + // Is the law periodical ? if (myPath.Closed()) { myLaws->Value(myLaws->Length())->D0(Last, M1, V); myLaws->Value(1)->GetDomain(First, Last); @@ -214,7 +214,7 @@ void BRepFill_LocationLaw::BiNormalIsMain() //======================================================================= //function : DeleteTransform -//purpose : Supprime la Mise en continuite des loi +//purpose : Remove the setting in continuity of law. //======================================================================= void BRepFill_LocationLaw::DeleteTransform() { @@ -228,7 +228,7 @@ void BRepFill_LocationLaw::BiNormalIsMain() //======================================================================= //function : NbHoles -//purpose : Rechecherche des "Trous" +//purpose : Find "Holes" //======================================================================= Standard_Integer BRepFill_LocationLaw::NbHoles(const Standard_Real Tol) { @@ -324,11 +324,11 @@ const TopoDS_Edge& BRepFill_LocationLaw::Edge(const Standard_Integer Index) cons return V; } -//======================================================================= +//=================================================================== //function : PerformVertex -//purpose : Calcul un vertex du balayage a partir d'un vertex d'une section -// et de l'indice de l'edge dans la trajectoire -//======================================================================= +//purpose : Calculate a vertex of sweeping from a vertex of section +// and the index of the edge in the trajectory +//=================================================================== void BRepFill_LocationLaw::PerformVertex(const Standard_Integer Index, const TopoDS_Vertex& Input, const Standard_Real TolMin, @@ -418,7 +418,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, { First = myLength->Value(Index); Last = myLength->Value(Index+1); - if (Last<0) { //Il faut effectuer le calcul + if (Last<0) { //It is required to carry out the calculation Standard_Integer ii, NbE = myEdges->Length(); Standard_Real Length, f, l; GCPnts_AbscissaPoint AbsC; @@ -441,7 +441,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, //======================================================================= //function : IsG1 -//purpose : Evalue la continuite de la loi en un vertex +//purpose : Evaluate the continuity of the law by a vertex //======================================================================= Standard_Integer BRepFill_LocationLaw::IsG1(const Standard_Integer Index, @@ -506,23 +506,23 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, if (Norm(M1-M2) > SpatialTolerance) isG0 = Standard_False; if (!isG0) return -1; - if (!Ok_D1) return 0; // Pas de controle de la derive + if (!Ok_D1) return 0; // No control of the derivative if ( (DV1.Magnitude()>EpsNul) && (DV2.Magnitude()>EpsNul) && (DV1.Angle(DV2) > AngularTolerance) ) isG1 = Standard_False; - // Pour la suite, les test sont plutot empirique + // For the next, the tests are mostly empirical Standard_Real Norm1 = Norm(DM1); Standard_Real Norm2 = Norm(DM2); - // Si les 2 normes sont nulle c'est bon + // It two 2 norms are null, it is good if ((Norm1 > EpsNul) || (Norm2 > EpsNul)) { - // sinon on compare les matrice normalise + // otherwise the normalized matrices are compared if ((Norm1 > EpsNul) && (Norm2 > EpsNul)) { DM1 /= Norm1; DM2 /= Norm2; if (Norm(DM1 - DM2) > AngularTolerance) isG1 = Standard_False; } - else isG1 = Standard_False; // 1 Null l'autre pas + else isG1 = Standard_False; // 1 Null the other is not } if (isG1) return 1; @@ -541,13 +541,13 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, Standard_Integer iedge, NbE=myEdges->Length(); Standard_Boolean Trouve = Standard_False; - //Controle que les longueurs sont calcules + //Control that the lengths are calculated if (myLength->Value(NbE+1) < 0) { Standard_Real f, l; CurvilinearBounds(NbE, f, l); } - // Recherche de l'interval + // Find the interval for (iedge=1; iedge<=NbE && !Trouve; ) { if (myLength->Value(iedge+1) >= Abcissa) { Trouve = Standard_True; @@ -581,10 +581,10 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, } -//======================================================================= +//=================================================================== //function : D0 -//purpose : Positionement d'une section, a une abscisse curviligne donnee -//======================================================================= +//purpose : Position of a section, with a given curviline abscissa +//=================================================================== void BRepFill_LocationLaw::D0(const Standard_Real Abcissa, TopoDS_Shape& W) { @@ -608,7 +608,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, else { W.Nullify(); #if DEB - cout << "BRepFill_LocationLaw::D0 : Attention positionement hors borne" + cout << "BRepFill_LocationLaw::D0 : Attention position out of limits" << endl; #endif } @@ -616,7 +616,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index, //======================================================================= //function : Abscissa -//purpose : Calcul l'abscisse d'un point +//purpose : Calculate the abscissa of a point //======================================================================= Standard_Real BRepFill_LocationLaw::Abscissa(const Standard_Integer Index, const Standard_Real Param) diff --git a/src/BRepFill/BRepFill_MultiLine.cxx b/src/BRepFill/BRepFill_MultiLine.cxx index 1624331c6c..5d852b2c94 100755 --- a/src/BRepFill/BRepFill_MultiLine.cxx +++ b/src/BRepFill/BRepFill_MultiLine.cxx @@ -143,7 +143,7 @@ myKPart(0) } - // recuperons les isos dans leur domaine de restriction. + // return isos in their domain of restriction. Handle(Geom_Curve) UU1, UU2, VV1, VV2; Handle(Geom_Surface) S; S = BRep_Tool::Surface(myFace1,L); @@ -197,7 +197,7 @@ myKPart(0) Vmax = dummyUmax; } - // essai dub + // try duplication GeomAdaptor_Surface GAS1(S); GeomAbs_SurfaceType Type1 = GAS1.GetType(); @@ -223,7 +223,7 @@ myKPart(0) Precision::PConfusion(), Vmin, Vmax); } - // fin essai dub + // end try duplication myU1 = Geom2dAdaptor_Curve(GeomProjLib::Curve2d(UU1, BasisPlane), Umin, Umax); @@ -260,7 +260,7 @@ myKPart(0) } } - // recuperons les isos dans leur domaine de restriction. + // return isos in their domain of restriction. S = BRep_Tool::Surface(myFace2,L); if (!L.IsIdentity()) @@ -313,7 +313,7 @@ myKPart(0) Vmax = dummyUmax; } - // essai dub + // try duplication GeomAdaptor_Surface GAS2(S); GeomAbs_SurfaceType Type2 = GAS2.GetType(); @@ -339,7 +339,7 @@ myKPart(0) Precision::PConfusion(), Vmin, Vmax); } - // fin essai dub + // end try duplication myU2 = Geom2dAdaptor_Curve(GeomProjLib::Curve2d(UU2, BasisPlane), Umin, Umax); @@ -350,12 +350,12 @@ myKPart(0) Vmin, Vmax); // eval if in a particular case. - // Cas Particulier si : - // 1) - Bissec droite - // - Bissec orthogonale a l`element de la base. - // ==> Iso sur les 2 faces. - // 2) - Bissec droite - // - les 2 surfaces sont des plans. + // Particular case if : + // 1) - Straight Bissectrice + // - Bissectrice orthogonal to the base element. + // ==> Iso on 2 faces. + // 2) - Straight Bissectrice + // - 2 surfaces are planes. myCont = GeomAbs_C0; if ( myBis.GetType() == GeomAbs_Line) { @@ -408,8 +408,8 @@ void BRepFill_MultiLine::Curves(Handle(Geom_Curve)& Curve, P1 = ValueOnF1(myBis.FirstParameter()); P2 = ValueOnF1(myBis.LastParameter()); - // on recherche la valeur de l iso avec le point milieu - // les bouts pouvant etre des points degeneres. + // find value of the with medium point + // the ends can be degenerated points. PMil = ValueOnF1(0.5*(myBis.FirstParameter() + myBis.LastParameter())); @@ -600,7 +600,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U, UU = Ext.LowerDistanceParameter(); Dist = Ext.LowerDistance(); } - // Controle avec les `bouts` + // Control with `ends` D1 = P.Distance(TheU.Value(TheU.FirstParameter())); D2 = P.Distance(TheU.Value(TheU.LastParameter())); @@ -646,7 +646,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U, VV = TheV.LastParameter(); } else { - // test si la courbe est du cote `Y negatif`. + // test if the curve is at the side `negative Y`. if ( Min( PF.Y(),PL.Y()) < -Tol) Dist = -Dist; Handle(Geom2d_Line) Line diff --git a/src/BRepFill/BRepFill_NSections.cxx b/src/BRepFill/BRepFill_NSections.cxx index e5112c2bc6..4b0fc629b8 100755 --- a/src/BRepFill/BRepFill_NSections.cxx +++ b/src/BRepFill/BRepFill_NSections.cxx @@ -109,7 +109,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape for (j=jdeb; j<=jfin; j++) { - // cas des sections bouclantes + // case of looping sections if (j==jfin && vClosed) { section.AddCurve(BS1); } @@ -118,7 +118,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape // read the first edge to initialise CompBS; edge = TopoDS::Edge(shapes.Value(1,j)); if (BRep_Tool::Degenerated(edge)) { - // edge degeneree : construction d'une courbe ponctuelle + // degenerated edge : construction of a point curve TopExp::Vertices(edge,vl,vf); TColgp_Array1OfPnt Extremities(1,2); Extremities(1) = BRep_Tool::Pnt(vf); @@ -129,7 +129,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape curv->LastParameter()); } else { - // recuperation de la courbe sur l'edge + // return the curve on the edge Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last); curvTrim = new Geom_TrimmedCurve(curv, first, last); curvTrim->Transform(loc.Transformation()); @@ -138,7 +138,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape curvTrim->Reverse(); } - // transformation en BSpline reparametree sur [i-1,i] + // transformation into BSpline reparameterized on [i-1,i] curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim); if (curvBS.IsNull()) { Handle(Geom_Curve) theCurve = curvTrim->BasisCurve(); @@ -156,14 +156,14 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape BSplCLib::Reparametrize(0.,1.,BSK); curvBS->SetKnots(BSK); - // initialisation + // initialization GeomConvert_CompCurveToBSplineCurve CompBS(curvBS); for (i=2; i<=NbEdges; i++) { // read the edge edge = TopoDS::Edge(shapes.Value(i,j)); if (BRep_Tool::Degenerated(edge)) { - // edge degeneree : construction d'une courbe ponctuelle + // degenerated edge : construction of a point curve TopExp::Vertices(edge,vl,vf); TColgp_Array1OfPnt Extremities(1,2); Extremities(1) = BRep_Tool::Pnt(vf); @@ -174,7 +174,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape curv->LastParameter()); } else { - // recuperation de la courbe sur l'edge + // return the curve on the edge Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last); curvTrim = new Geom_TrimmedCurve(curv, first, last); curvTrim->Transform(loc.Transformation()); @@ -183,7 +183,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape curvTrim->Reverse(); } - // transformation en BSpline reparametree sur [i-1,i] + // transformation into BSpline reparameterized on [i-1,i] curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim); if (curvBS.IsNull()) { Handle(Geom_Curve) theCurve = curvTrim->BasisCurve(); @@ -213,11 +213,11 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape Standard_True, Standard_False, 1); } - // recuperation de la section finale + // return the final section BS = CompBS.BSplineCurve(); section.AddCurve(BS); - // cas des sections bouclantes + // case of looping sections if (j==jdeb && vClosed) { BS1 = BS; } @@ -399,7 +399,7 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S, //======================================================================= //function : Init -//purpose : On cree une table de GeomFill_SectionLaw +//purpose : Create a table of GeomFill_SectionLaw //======================================================================= void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, const Standard_Boolean Build) @@ -415,7 +415,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, Standard_Real First, Last; TopoDS_Wire W; - // On regarde si les wires debut et fin sont ponctuels + // Check if the start and end wires are punctual W = TopoDS::Wire(myShapes(1)); for (wexp.Init(W); wexp.More(); wexp.Next()) // w1Point = w1Point && B.Degenerated(wexp.Current()); @@ -427,10 +427,10 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, w2Point = w2Point && BRep_Tool::Degenerated(wexp.Current()); if (w2Point) ifin--; - // On regarde si les wires debut et fin sont identiques + // Check if the start and end wires are identical vclosed = myShapes(1).IsSame(myShapes(NbSects)); - // On compte le nombre d'aretes non degenerees + // Count the number of non-degenerated edges W = TopoDS::Wire(myShapes(ideb)); for (NbEdge=0, wexp.Init(W); wexp.More(); wexp.Next()) // if (! B.Degenerated(wexp.Current())) NbEdge++; @@ -438,7 +438,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, myEdges = new (TopTools_HArray2OfShape) (1, NbEdge, 1, NbSects); - // On Remplit les tables + // Fill tables uclosed = Standard_True; for (jj=ideb;jj<=ifin;jj++){ @@ -453,11 +453,11 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, } } - // La loi est elle fermee en U ? + // Is the law closed by U ? wClosed = W.Closed(); if (!wClosed) { - // le flag n'etant pas tres sur, on fait une verif + // if unsure about the flag, make check TopoDS_Edge Edge1, Edge2; TopoDS_Vertex V1,V2; Edge1 = TopoDS::Edge (myEdges->Value(NbEdge,jj)); @@ -492,7 +492,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, if (!wClosed) uclosed = Standard_False; } - // sections en bout ponctuelles + // point sections at end if (w1Point) { W = TopoDS::Wire(myShapes(1)); wexp.Init(W); @@ -518,9 +518,9 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, mySurface = totalsurf(myEdges->Array2(),myShapes.Length(),NbEdge, myParams,w1Point,w2Point,uclosed,vclosed,tol); - // On augmente le degre pour que le positionnement D2 - // sur les GeomFill_NSections soit correct - // cf commentaires dans GeomFill_NSections + // Increase the degree so that the position D2 + // on GeomFill_NSections could be correct + // see comments in GeomFill_NSections if (mySurface->VDegree()<2) { mySurface->IncreaseDegree(mySurface->UDegree(),2); } @@ -532,7 +532,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, } #endif - // On Remplit les tables + // Fill tables if (Build) { for (ii=1; ii<=NbEdge ; ii++) { TColGeom_SequenceOfCurve NC; @@ -563,18 +563,18 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, if (E.Orientation() == TopAbs_REVERSED) { Standard_Real aux; Handle(Geom_Curve) CBis; - CBis = C->Reversed(); // Pour eviter de deteriorer la topologie + CBis = C->Reversed(); // To avoid the spoiling of the topology aux = C->ReversedParameter(First); First = C->ReversedParameter(Last); Last = aux; C = CBis; } - if ((ii>1) || (!E.Closed()) ) { // On trimme C + if ((ii>1) || (!E.Closed()) ) { // Cut C Handle(Geom_TrimmedCurve) TC = new (Geom_TrimmedCurve) (C,First, Last); C = TC; } - // sinon On garde l'integrite de la courbe + // otherwise preserve the integrity of the curve } NC.Append(C); } @@ -646,7 +646,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, ///======================================================================= //function : VertexTol -//purpose : Evalue le trou entre 2 edges de la section +//purpose : Evaluate the hole between 2 edges of the section //======================================================================= Standard_Real BRepFill_NSections::VertexTol(const Standard_Integer Index, const Standard_Real Param) const @@ -654,7 +654,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, Standard_Real Tol = Precision::Confusion(); Standard_Integer I1, I2; if ( (Index==0) || (Index==myEdges->ColLength()) ) { - if (!uclosed) return Tol; //Le moins faux possible + if (!uclosed) return Tol; //The least possible error I1 = myEdges->ColLength(); I2 = 1; } @@ -753,7 +753,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, TopoDS_Edge Edge1, Edge2; if ( (Index==0) || (Index==myEdges->ColLength()) ) { - if (!uclosed) return GeomAbs_C0; //Le moins faux possible + if (!uclosed) return GeomAbs_C0; //The least possible error Edge1 = TopoDS::Edge (myEdges->Value(myEdges->ColLength(),jj)); Edge2 = TopoDS::Edge (myEdges->Value(1,jj)); diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index 22272a7ac9..dfb7fb1c2e 100755 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -224,7 +224,7 @@ static Standard_Boolean KPartCircle BRepFill_IndexedDataMapOfOrientedShapeListOfShape& myMap, Standard_Boolean& myIsDone) { - // Un seul contour qui est un cercle ferme + // The only contour which is a closed circle TopExp_Explorer exp(mySpine,TopAbs_EDGE); Standard_Integer NbEdges = 0; TopoDS_Edge E; @@ -319,7 +319,7 @@ void BRepFill_OffsetWire::Init(const TopoDS_Face& Spine, myMap.Clear(); myMapSpine.Clear(); //------------------------------------------------------------------ - // decoupe du spine pour les lieux bissecteurs. + // cut the spine for bissectors. //------------------------------------------------------------------ // Modified by Sergey KHROMOV - Tue Nov 26 17:39:03 2002 Begin static BRepMAT2d_Explorer Exp; @@ -339,8 +339,8 @@ void BRepFill_OffsetWire::Init(const TopoDS_Face& Spine, //----------------------------------------------------- - // Calcul de la carte des lieux bissecteurs a gauche. - // et des Liens Topologie -> elements de base de la carte. + // Calculate the map of bissectors to the left. + // and Links Topology -> base elements of the map. //----------------------------------------------------- // Modified by Sergey KHROMOV - Tue Nov 26 17:39:03 2002 Begin @@ -395,7 +395,7 @@ const TopTools_ListOfShape& BRepFill_OffsetWire::GeneratedShapes { if (!myCallGen) { if (!myMapSpine.IsEmpty()) { - // myMapSpine peut etre vide si on est passe par PerformWithBilo. + // myMapSpine can be empty if passed by PerformWithBilo. TopTools_DataMapIteratorOfDataMapOfShapeShape it(myMapSpine); for (; it.More(); it.Next()) { if (myMap.Contains(it.Key())) { @@ -632,7 +632,7 @@ void Compute (const TopoDS_Face& Spine, TopoDS_Wire NewW = TopoDS::Wire(aLocalShape); // TopoDS_Wire NewW = TopoDS::Wire(CurW.Moved(L)); B.Add(aShape,NewW); - // mise a jour de la Map. + // update Map. TopoDS_Iterator it1( CurW); TopoDS_Iterator it2( NewW); for ( ; it1.More(); it1.Next(), it2.Next()) { @@ -675,32 +675,28 @@ void BRepFill_OffsetWire::PerformWithBiLo } myMap.Clear(); - //***************************************** - // si myOffset = 0, on ne s'emmerde pas !! - //***************************************** if ( Abs(myOffset) < Precision::Confusion()) { Compute(mySpine,myShape,myMap,Alt); myIsDone = Standard_True; return; } - //****************************** - // Calcul pour un offset non nul - //****************************** + //******************************** + // Calculate for a non null offset + //******************************** if (KPartCircle(mySpine,Offset,Alt,myShape,myMap,myIsDone)) return; BRep_Builder myBuilder; myBuilder.MakeCompound(TopoDS::Compound(myShape)); //--------------------------------------------------------------------- - // MapNodeVertex : associe a chaque noeud de la carte (key1) et - // a chaque element du profil (key2) un vertex (item). - // MapBis : ensemble des edges ou vertex (item) generes par - // une bisectrice sur une face ou un edge (key)des - // tuyaux ou revol. - // MapVerPar : Map des parametres des vertex sur les edges paralleles - // la liste contenue dans MapVerPar (E) correspond aux - // parametres sur E des vertex contenu dans MapBis(E); + // MapNodeVertex : associate to each node of the map (key1) and to + // each element of the profile (key2) a vertex (item). + // MapBis : all edges or vertices (item) generated by + // a bisectrice on a face or an edge (key) of revolution tubes. + // MapVerPar : Map of parameters of vertices on parallel edges + // the list contained in MapVerPar (E) corresponds to + // parameters on E of vertices contained in MapBis(E); //--------------------------------------------------------------------- @@ -721,7 +717,7 @@ void BRepFill_OffsetWire::PerformWithBiLo (RefPlane->Translated( ALT * gp_Vec(RefPlane->Axis().Direction() ))); //--------------------------------------------------------------- - // Construction des Cercles et des OffsetCurves + // Construction of Circles and OffsetCurves //--------------------------------------------------------------- for (Standard_Integer ic = 1; ic <= Locus.NumberOfContours(); ic++) { @@ -743,13 +739,13 @@ void BRepFill_OffsetWire::PerformWithBiLo #ifdef DEB if (AffichEdge) { - cout << " Fin Construction des primitives geometriques"<FirstElement()); S [1] = Link.GeneratingShape(CurrentArc->SecondElement()); @@ -787,8 +783,8 @@ void BRepFill_OffsetWire::PerformWithBiLo BRepFill_DataMapOfShapeSequenceOfPnt MapSeqPar; //----------------------------------------------------------- - // Recuperation des edges paralleles sur chaque face. - // Si pas d offset generees => saut a la bissectrice suivante. + // Return parallel edges on each face. + // If no offset generated => move to the next bissectrice. //-------------------------------------------------------------- if (myMap.Contains(S[0]) && myMap.Contains(S[1])) { E [0] = TopoDS::Edge(myMap.FindFromKey(S[0]).First()); @@ -797,8 +793,8 @@ void BRepFill_OffsetWire::PerformWithBiLo else continue; //----------------------------------------------------------- - // Construction des vertex correspondant au noeud de la carte. - // si ils sont sur l offset. + // Construction of vertices corresponding to the node of the map. + // if they are on the offset. //----------------------------------------------------------- TopoDS_Vertex VS,VE; Handle(MAT_Node) Node1, Node2; @@ -828,7 +824,7 @@ void BRepFill_OffsetWire::PerformWithBiLo } //--------------------------------------------- - // Construction des geometries. + // Construction of geometries. //--------------------------------------------- BRepFill_TrimEdgeTool Trim (Bisec, Locus.GeomElt(CurrentArc->FirstElement()), @@ -836,7 +832,7 @@ void BRepFill_OffsetWire::PerformWithBiLo myOffset); //----------------------------------------------------------- - // Construction des vertex sur les edges paralleles au spine. + // Construction of vertices on edges parallel to the spine. //----------------------------------------------------------- Trim.IntersectWith(E [0], E [1], Params); @@ -857,7 +853,7 @@ void BRepFill_OffsetWire::PerformWithBiLo Vertices.SetValue(1,VS); else - // le point n avait pas ete trouve par IntersectWith + // the point was not found by IntersectWith Vertices.Prepend(VS); } if (EndOnEdge) { @@ -867,17 +863,17 @@ void BRepFill_OffsetWire::PerformWithBiLo Vertices.SetValue(Params.Length(),VE); else - // le point n avait pas ete trouve par IntersectWith + // the point was not found by IntersectWith Vertices.Append(VE); } //------------------------------------------------------------ - // Mise a jour Detromp. - // Detromp permetra de supprimer les vertex sur l offset - // correspondant a des zones de tangences - // dans Detromp sont ranges les vertex qui limitent - // les portions de la bissectrices situes entre le spine et - // l offset. + // Update Detromp. + // Detromp allows to remove vertices on the offset + // corresponding to tangency zones + // Detromp ranks the vertices that limit + // the parts of the bissectrices located between the spine and the + // offset. //------------------------------------------------------------ if (!Detromp.IsBound(S[0])) Detromp.Bind(S[0],EmptyList); if (!Detromp.IsBound(S[1])) Detromp.Bind(S[1],EmptyList); @@ -886,8 +882,8 @@ void BRepFill_OffsetWire::PerformWithBiLo UpdateDetromp (Detromp(S[0]), Detromp(S[1]), Vertices, Params, Bisec, StartOnEdge, EndOnEdge, Trim); //---------------------------------------------- - // Stockage des vertex sur les edges paralleles. - // on remplit MapBis et MapVerPar. + // Storage of vertices on parallel edges. + // fill MapBis and MapVerPar. //---------------------------------------------- if (!Vertices.IsEmpty()) { for (k = 0; k <= 1; k++) { @@ -904,11 +900,10 @@ void BRepFill_OffsetWire::PerformWithBiLo } else { //------------------------------------------------------------ - //POUR LES CERCLES COMPLETS . la parallele peut etre contenue - // dans la zone sans intersection avec la frontiere - // pas d intersection - // si myoffset est < distance des noeuds la parallele peut etre - // valide. + // FOR COMPLETE CIRCLES. the parallel line can be contained + // in the zone without intersection with the border + // no intersection + // if myoffset is < distance of nodes the parallel can be valid. //------------------------------------------------------------- for (k = 0; k <= 1; k++) { if (!MapBis.IsBound(E[k])) { @@ -923,12 +918,12 @@ void BRepFill_OffsetWire::PerformWithBiLo #ifdef DEB if (AffichEdge) { - cout << " Fin Construction des vertex sur les offsets"< 2) { - //cout <<"vertex sur plus de 2 edges dans une face."< est vide l edge n est pas modifie. -// Le premier et le dernier vertex de l edge originale -// appartiennent respectivement a la premiere et derniere -// portions. +//purpose : Cut edge at the extrema of curvatures and points of inflexion. +// So, closed circles are cut in two. +// If is empty, the edge is not modified. +// The first and the last vertex of the initial edge +// belong to the first and the last parts respectively. //======================================================================= Standard_Integer CutEdge (const TopoDS_Edge& E, const TopoDS_Face& F, @@ -1611,7 +1604,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E, ( Abs(f-l) >= PI) ) { return 0; //--------------------------- - // Decoupe cercle ferme. + // Cut closed circle. //--------------------------- Standard_Real m = (f + l)*0.5; // Modified by Sergey KHROMOV - Wed Mar 6 17:37:28 2002 Begin @@ -1636,13 +1629,13 @@ Standard_Integer CutEdge (const TopoDS_Edge& E, Cuts.Append(FE.Oriented(E.Orientation())); Cuts.Append(LE.Oriented(E.Orientation())); //-------- - // Retour. + // Return. //-------- return 2; } //------------------------- - // Decoupe de la courbe. + // Cut curve. //------------------------- Cuter.Perform(CT2d); @@ -1650,7 +1643,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E, if (ForceCut == 0) { if (Cuter.UnModified()) { //----------------------------- - // edge non modifiee => retour. + // edge not modified => return. //----------------------------- return 0; } else { @@ -1687,7 +1680,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E, // Modified by Sergey KHROMOV - Thu Nov 16 17:28:37 2000 End //-------------------------------------- - // Creation des edges decoupees. + // Creation of cut edges. //-------------------------------------- VF = V1; @@ -1779,7 +1772,7 @@ void MakeCircle (const TopoDS_Edge& E, BRepFill_IndexedDataMapOfOrientedShapeListOfShape& Map, const Handle(Geom_Plane)& RefPlane) { - // eval the Axis of the Circle. + // evaluate the Axis of the Circle. Standard_Real f,l; Handle(Geom2d_Curve) GC = BRep_Tool::CurveOnSurface(E,F,f,l); gp_Vec2d DX; @@ -1831,8 +1824,8 @@ void MakeOffset (const TopoDS_Edge& E, Geom2dAdaptor_Curve AC(G2d,f,l); if ( AC.GetType() == GeomAbs_Circle) { - // si l offset est superieur ou egal au rayon et du cote de la - // concavite du cercle => edge null. + // if the offset is greater otr equal to the radius and the side of the + // concavity of the circle => edge null. gp_Circ2d C1(AC.Circle()); #ifdef DEB Standard_Real radius = @@ -1845,7 +1838,7 @@ void MakeOffset (const TopoDS_Edge& E, Standard_Real Signe = ( Crossed > 0.) ? 1. : -1.; if (anOffset*Signe < AC.Circle().Radius()) { - // -anOffset vient d une Etrangete adaptoresque! + Handle(Geom2dAdaptor_HCurve) AHC = new Geom2dAdaptor_HCurve(G2d); Adaptor3d_OffsetCurve Off(AHC,-anOffset); @@ -1895,12 +1888,12 @@ void MakeOffset (const TopoDS_Edge& E, //======================================================================= //function : UpdateDetromp -//purpose : Pour chaque interval sur la bissectrice defini par params -// test si le point milieu est a une distance > offset -// dans ce cas les vertex correspondants aux extremites de l interval -// sont ranges dans le detrompeur. -// => Si un meme vertex apparait deux fois dans le detrompeur la -// frontiere de la zone de proximitee est tangente a l offset . +//purpose : For each interval on bissectrice defined by parameters +// test if the medium point is at a distance > offset +// in this case vertices corresponding to the extremities of the interval +// are ranked in the proofing. +// => If the same vertex appears in the proofing, the +// border of the zone of proximity is tangent to the offset . //======================================================================= void UpdateDetromp (TopTools_ListOfShape& Detromp1, @@ -1921,7 +1914,7 @@ void UpdateDetromp (TopTools_ListOfShape& Detromp1, U1 = Bis->FirstParameter(); if (SOnE) { - // le premier point de la bissectrice est sur l offset + // the first point of the bissectrice is on the offset V1 = TopoDS::Vertex(Vertices.Value(ii)); ii++; } @@ -1944,7 +1937,7 @@ void UpdateDetromp (TopTools_ListOfShape& Detromp1, ii ++; } - // test point milieu entre le dernier params et la fin de la bissectrice. + // test medium point between the last parameter and the end of the bissectrice. U2 = Bis->LastParameter(); if (!EOnE) { if (!Precision::IsInfinite(U2)) { @@ -1982,7 +1975,7 @@ Standard_Boolean VertexFromNode (const Handle(MAT_Node)& aNode, if (!aNode->Infinite() && Abs(aNode->Distance()-Offset) < Tol) { //------------------------------------------------ - // le Noeud donne un vertex sur l offset + // the Node gives a vertex on the offset //------------------------------------------------ if (MapNodeVertex.IsBound(aNode)) { VN = TopoDS::Vertex(MapNodeVertex(aNode)); @@ -2043,7 +2036,7 @@ void TrimEdge (const TopoDS_Edge& E, S.Clear(); //----------------------------------------------------------- - // Tri des deux sequences en fonction du parametre sur l edge. + // Parse two sequences depending on the parameter on the edge. //----------------------------------------------------------- while (Change) { Change = Standard_False; @@ -2057,7 +2050,7 @@ void TrimEdge (const TopoDS_Edge& E, } //---------------------------------------------------------- - // Si un vertex n est pas dans le detrompeur il est elimine. + // If a vertex is not in the proofing, it is eliminated. //---------------------------------------------------------- if (!BRep_Tool::Degenerated(E)) { for (Standard_Integer k = 1; k <= TheVer.Length(); k ++) { @@ -2071,9 +2064,9 @@ void TrimEdge (const TopoDS_Edge& E, } //---------------------------------------------------------- - // Si un vertex_double apparait deux fois dans le detrompeur - // le vertex est elimine . - // sinon on garde une seule de ces representations. + // If a vertex_double appears twice in the proofing + // the vertex is removed. + // otherwise preserve only one of its representations. //---------------------------------------------------------- if (!BRep_Tool::Degenerated(E)) { for (Standard_Integer k = 1; k < TheVer.Length(); k ++) { @@ -2103,9 +2096,9 @@ void TrimEdge (const TopoDS_Edge& E, } } //----------------------------------------------------------- - // Creation des edges. - // le nombre de vertex doit etre pair les edges a creer vont - // d un vertex d indice impair i au vertex i+1; + // Creation of edges. + // the number of vertices should be even. The created edges + // go from a vertex with uneven index i to vertex i+1; //----------------------------------------------------------- for (Standard_Integer k = 1; k < TheVer.Length(); k = k+2) { TopoDS_Shape aLocalShape = E.EmptyCopied(); @@ -2150,7 +2143,7 @@ void TrimEdge (const TopoDS_Edge& E, //======================================================================= //function : DoubleOrNotInside -//purpose : return True si V apparait 2 fois dans LV ou n est pas dedans. +//purpose : return True if V appears twice in LV or is not inside. //======================================================================= Standard_Boolean DoubleOrNotInside (const TopTools_ListOfShape& LV, @@ -2369,7 +2362,7 @@ static void QuasiFleche(const Adaptor3d_Curve& C, Standard_Real theFleche=0; Standard_Boolean flecheok = Standard_False; if (Norme > Eps) { - // Evaluation de la fleche par interpolation . Voir IntWalk_IWalking_5.gxx + // Evaluation of the arrow by interpolation. See IntWalk_IWalking_5.gxx Standard_Real N1 = Vdeb.SquareMagnitude(); Standard_Real N2 = Vdelta.SquareMagnitude(); if (N1 > Eps && N2 > Eps) { diff --git a/src/BRepFill/BRepFill_Pipe.cxx b/src/BRepFill/BRepFill_Pipe.cxx index 9cb871276d..f986e5343d 100755 --- a/src/BRepFill/BRepFill_Pipe.cxx +++ b/src/BRepFill/BRepFill_Pipe.cxx @@ -98,9 +98,9 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine, new (GeomFill_CurveAndTrihedron) (TLaw); myLoc = new (BRepFill_Edge3DLaw) (mySpine, Loc); if (myLoc->NbLaw() == 0) { - return; // Cas degenere + return; // Degenerated case } - myLoc->TransformInG0Law(); // Mise en continuite + myLoc->TransformInG0Law(); // Set into continuity BRepFill_SectionPlacement Place(myLoc, Profile); myTrsf = Place.Transformation(); @@ -111,7 +111,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine, TheProf = myProfile; TheProf.Location(Loc2.Multiplied(Loc1)); - // Construit les Shape First && Last + // Construct First && Last Shape Handle(GeomFill_LocationLaw) law; gp_Mat M; @@ -134,7 +134,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine, myLoc->Law(myLoc->NbLaw())->GetDomain(first, last); myLoc->Law(myLoc->NbLaw())->D0(last,M, V); -// try { // Pas joli mais il n'y as pas d'autre moyens de tester SetValues +// try { // Not good, but there are no other means to test SetValues fila.SetValues(M(1,1), M(1,2), M(1,3), V.X(), M(2,1), M(2,2), M(2,3), V.Y(), M(3,1), M(3,2), M(3,3), V.Z(), @@ -330,12 +330,12 @@ TopoDS_Shape BRepFill_Pipe::Section(const TopoDS_Vertex& VSpine) const //======================================================================= //function : PipeLine -//purpose : Construit un wire par balayage d'un point +//purpose : Construct a wire by sweeping of a point //======================================================================= TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point) const { - // Postionnement + // Postioning gp_Pnt P; P = Point; P.Transform(myTrsf); @@ -344,7 +344,7 @@ TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point) const Handle(BRepFill_ShapeLaw) Section = new (BRepFill_ShapeLaw) (MkV.Vertex()); - // Balayage + // Sweeping BRepFill_Sweep MkSw(Section, myLoc, Standard_True); MkSw.Build( BRepFill_Modified, GeomFill_Location, GeomAbs_C2, myDegmax, mySegmax ); TopoDS_Shape aLocalShape = MkSw.Shape(); @@ -486,7 +486,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S, MkSw.Build( BRepFill_Modified, GeomFill_Location, GeomAbs_C2, myDegmax, mySegmax ); result = MkSw.Shape(); - // Reperage des elements + // Labeling of elements if (mySections.IsNull()) { myFaces = MkSw.SubShape(); mySections = MkSw.Sections(); @@ -582,11 +582,10 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S, return result; } -//======================================================================= +//============================================================================ //function : FindEdge -//purpose : Recherche le numero de bande correspondant a une edge du -// profil. -//======================================================================= +//purpose : Find the number of edge corresponding to the edge of the profile. +//============================================================================ Standard_Integer BRepFill_Pipe::FindEdge(const TopoDS_Shape& S, const TopoDS_Edge& E, @@ -640,8 +639,7 @@ Standard_Integer BRepFill_Pipe::FindEdge(const TopoDS_Shape& S, //======================================================================= //function : FindVertex -//purpose : Recherche le numero de bande correspondant a une edge du -// profil. +//purpose : Find the number of edge corresponding to an edge of the profile. //======================================================================= Standard_Integer BRepFill_Pipe::FindVertex(const TopoDS_Shape& S, diff --git a/src/BRepFill/BRepFill_PipeShell.cxx b/src/BRepFill/BRepFill_PipeShell.cxx index 0829e8a8ca..c2a92cf608 100755 --- a/src/BRepFill/BRepFill_PipeShell.cxx +++ b/src/BRepFill/BRepFill_PipeShell.cxx @@ -44,7 +44,7 @@ #include #include -//Specif Guide +//Specification Guide #include #include @@ -80,7 +80,7 @@ static Standard_Boolean BuildBoundaries(const BRepFill_Sweep& theS //======================================================================= //function : ComputeSection -//purpose : Construit une section intermediaire +//purpose : Construct an intermediary section //======================================================================= static Standard_Boolean ComputeSection(const TopoDS_Wire& W1, @@ -112,7 +112,7 @@ static Standard_Boolean ComputeSection(const TopoDS_Wire& W1, //======================================================================= //function : PerformTransition -//purpose : Modifie une loi de loc en fonction de Transition +//purpose : Modify a law of location depending on Transition //======================================================================= static void PerformTransition(const BRepFill_TransitionStyle Mode, @@ -127,7 +127,7 @@ static void PerformTransition(const BRepFill_TransitionStyle Mode, } //======================================================================= //function : PerformPlan -//purpose : Construit s'il existe un plan de remplissage +//purpose : Construct a plane of filling if exists //======================================================================= static Standard_Boolean PerformPlan(TopoDS_Shape& S) @@ -202,7 +202,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) myLaw.Nullify(); SetTolerance(); - // Attention aux wire closed non declare ! + // Attention to closed non-declared wire ! if (!mySpine.Closed()) { TopoDS_Vertex Vf, Vl; TopExp::Vertices(mySpine, Vf, Vl); @@ -212,7 +212,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : Set -//purpose : Definie une loi de Frenet (Corrige) +//purpose : Define a law of Frenet (Correct) //======================================================================= void BRepFill_PipeShell::Set(const Standard_Boolean IsFrenet) { @@ -228,12 +228,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) Handle(GeomFill_CurveAndTrihedron) Loc = new (GeomFill_CurveAndTrihedron) (TLaw); myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc); - mySection.Nullify(); //Il faut relocaliser les sections. + mySection.Nullify(); //It is required to relocalize sections. } //======================================================================= //function : Set -//purpose : Definie une loi Constante +//purpose : Define a law Constant //======================================================================= void BRepFill_PipeShell::Set(const gp_Ax2& Axe) { @@ -245,12 +245,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) Handle(GeomFill_CurveAndTrihedron) Loc = new (GeomFill_CurveAndTrihedron) (TLaw); myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc); - mySection.Nullify(); //Il faut relocaliser les sections. + mySection.Nullify(); //It is required to relocalize sections. } //======================================================================= //function : Set -//purpose : Construit une loi de location de type binormal fixe +//purpose : Construct a law of location of binormal fixed type //======================================================================= void BRepFill_PipeShell::Set(const gp_Dir& BiNormal) { @@ -266,40 +266,40 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : Set -//purpose : Construit une loi de location de type Darboux +//purpose : Construct a law of location of Darboux type //======================================================================= Standard_Boolean BRepFill_PipeShell::Set(const TopoDS_Shape& SpineSupport) { Standard_Boolean B; - // Il faut une loi de location speciale + // A special law of location is required Handle(BRepFill_EdgeOnSurfLaw) loc = new (BRepFill_EdgeOnSurfLaw) (mySpine, SpineSupport); B = loc->HasResult(); if (B) { myLocation = loc; myTrihedron = GeomFill_IsDarboux; - mySection.Nullify(); //Il faut relocaliser les sections. + mySection.Nullify(); //It is required to relocalize the sections. } return B; } //======================================================================= //function : Set -//purpose : Definit une loi a l'aide d'un contour guide +//purpose : Defines a lawv with help of a guided contour //======================================================================= void BRepFill_PipeShell::Set(const TopoDS_Wire& AuxiliarySpine, const Standard_Boolean CurvilinearEquivalence, const Standard_Boolean KeepContact) { - // Reorganisation du guide (pb d'orientation et d'origine) + // Reorganization of the guide (pb of orientation and origin) TopoDS_Wire TheGuide; TheGuide = AuxiliarySpine; Standard_Boolean SpClose = mySpine.Closed(), GuideClose = AuxiliarySpine.Closed(); if (!SpClose && !GuideClose) { - // Cas ouvert reorientation du guide + // Case open reorientation of the guide TopoDS_Wire sp = mySpine; TopTools_SequenceOfShape Seq; Seq.Append(sp); @@ -311,8 +311,8 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) TheGuide = TopoDS::Wire(CW.Shape().Value(2)); } else if (GuideClose) { - // Cas guide ferme : Determination de l'origine - // & reorientation du guide + // Case guide closed : Determination of the origin + // & reorientation of the guide gp_Vec Dir; gp_Pnt SpOr; if (!SpClose) { @@ -336,16 +336,16 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) if (Affich) DBRep::Set("theguide", TheGuide); #endif - // on transforme le guide en 1 seule courbe (periodic si posssible) + // transform the guide in a single curve (periodic if posssible) Handle(BRepAdaptor_HCompCurve) Guide = new (BRepAdaptor_HCompCurve) (TheGuide); Guide->ChangeCurve().SetPeriodic(Standard_True); - if (CurvilinearEquivalence) { // triedre par abscisse curviligne reduite + if (CurvilinearEquivalence) { // trihedron by curvilinear reduced abscissa if (KeepContact) - myTrihedron = GeomFill_IsGuideACWithContact; // avec rotation + myTrihedron = GeomFill_IsGuideACWithContact; // with rotation else - myTrihedron = GeomFill_IsGuideAC; // sans rotation + myTrihedron = GeomFill_IsGuideAC; // without rotation Handle(GeomFill_GuideTrihedronAC) TLaw = new (GeomFill_GuideTrihedronAC) (Guide); @@ -353,11 +353,11 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) new (GeomFill_LocationGuide) (TLaw); myLocation = new (BRepFill_ACRLaw) (mySpine, Loc); } - else {// triedre par plan + else {// trihedron by plane if (KeepContact) - myTrihedron = GeomFill_IsGuidePlanWithContact; // avec rotation + myTrihedron = GeomFill_IsGuidePlanWithContact; // with rotation else - myTrihedron = GeomFill_IsGuidePlan; // sans rotation + myTrihedron = GeomFill_IsGuidePlan; // without rotation Handle(GeomFill_GuideTrihedronPlan) TLaw = new (GeomFill_GuideTrihedronPlan) (Guide); @@ -365,12 +365,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) new (GeomFill_LocationGuide) (TLaw); myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc); } - mySection.Nullify(); //Il faut relocaliser les sections. + mySection.Nullify(); //It is required to relocalize the sections. } //======================================================================= //function : Add -//purpose : Ajoute une Section +//purpose : Add a Section //======================================================================= void BRepFill_PipeShell::Add(const TopoDS_Shape& Profile, const Standard_Boolean WithContact, @@ -384,14 +384,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : Add -//purpose : Ajoute une Section +//purpose : Add a Section //======================================================================= void BRepFill_PipeShell::Add(const TopoDS_Shape& Profile, const TopoDS_Vertex& Location, const Standard_Boolean WithContact, const Standard_Boolean WithCorrection) { - Delete(Profile); // Pas de duplication + Delete(Profile); // No duplication BRepFill_Section S (Profile, Location, WithContact, WithCorrection); mySeq.Append(S); mySection.Nullify(); @@ -400,7 +400,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : SetLaw -//purpose : Section + Loi d'homothetie +//purpose : Section + law of homothety //======================================================================= void BRepFill_PipeShell::SetLaw(const TopoDS_Shape& Profile, const Handle(Law_Function)& L, @@ -415,7 +415,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : SetLaw -//purpose : Section + Loi d'homothetie +//purpose : Section + Law of homothety //======================================================================= void BRepFill_PipeShell::SetLaw(const TopoDS_Shape& Profile, const Handle(Law_Function)& L, @@ -434,7 +434,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : Delete -//purpose : Supprime une section +//purpose : Delete a section //======================================================================= void BRepFill_PipeShell::Delete(const TopoDS_Shape& Profile) { @@ -500,14 +500,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : SetTransition -//purpose : Definit le mode de traitement des coins +//purpose : Defines the mode of processing of corners //======================================================================= void BRepFill_PipeShell::SetTransition(const BRepFill_TransitionStyle Mode, const Standard_Real Angmin, const Standard_Real Angmax) { if (myTransition != Mode) - mySection.Nullify(); //Il faut relocaliser les sections. + mySection.Nullify(); //It is required to relocalize the sections. myTransition = Mode; angmin = Angmin; angmax = Angmax; @@ -515,7 +515,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : Simulate -//purpose : Calcul N Sections +//purpose : Calculate N Sections //======================================================================= void BRepFill_PipeShell::Simulate(const Standard_Integer N, TopTools_ListOfShape& List) @@ -530,14 +530,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) Standard_Boolean Finis=Standard_False; TopoDS_Shape W; - // Calcul des parametres de digitalisation + // Calculate the parameters of digitalization mySection->Law(1)->GetDomain(FirstS, Last); DeltaS = Last - FirstS; myLocation->CurvilinearBounds(NbL,First, Length); Delta = Length; if (N>1) Delta /= (N-1); - myLocation->CurvilinearBounds(1,First, Last); // Init de Last + myLocation->CurvilinearBounds(1,First, Last); // Initiation of Last for (U=0.0, ii=1; !Finis ; U+=Delta) { if (U >= Length) { U = Length; @@ -545,7 +545,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) } else { if (ii < NbL) myLocation->CurvilinearBounds(NbL,First, Last); - if (U > Last) U = (Last+First)/2; // On ne saute pas une arete + if (U > Last) U = (Last+First)/2; // The edge is not skipped if (U> First) ii++; } US = FirstS + (U/Length)*DeltaS; @@ -558,7 +558,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : Build -//purpose : Construit le Shell et l'historique +//purpose : Construct the Shell and the history //======================================================================= Standard_Boolean BRepFill_PipeShell::Build() { @@ -575,7 +575,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) return Standard_False; } - // 2) Calcul de myFirst et myLast + // 2) Calculate myFirst and myLast mySection->Law(1)->GetDomain(FirstS, LastS); mySection->D0(FirstS, myFirst); myLocation->D0(0, myFirst); @@ -671,7 +671,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) Standard_Boolean BRepFill_PipeShell::MakeSolid() { if (myShape.IsNull()) - StdFail_NotDone::Raise("PipeShell is not build"); + StdFail_NotDone::Raise("PipeShell is not built"); Standard_Boolean B = myShape.Closed(); BRep_Builder BS; @@ -681,7 +681,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) B = (myFirst.Closed() && myLast.Closed()); } if (B) { - // Il faut boucher les extremites + // It is necessary to block the extremities B = PerformPlan(myFirst); if (B) { B = PerformPlan(myLast); @@ -721,7 +721,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine) //======================================================================= //function : Shape -//purpose : Renvoi le resultat +//purpose : Return the result //======================================================================= const TopoDS_Shape& BRepFill_PipeShell::Shape() const { @@ -730,7 +730,7 @@ const TopoDS_Shape& BRepFill_PipeShell::Shape() const //======================================================================= //function : FirstShape -//purpose : Renvoi la section du debut +//purpose : Return the start section //======================================================================= const TopoDS_Shape& BRepFill_PipeShell::FirstShape() const { @@ -739,7 +739,7 @@ const TopoDS_Shape& BRepFill_PipeShell::FirstShape() const //======================================================================= //function : LastShape -//purpose : Renvoi la section de fin +//purpose : Return the end section //======================================================================= const TopoDS_Shape& BRepFill_PipeShell::LastShape() const { @@ -765,16 +765,16 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, //======================================================================= //function : Prepare -//purpose : - Verifie que tout est pret -// - Construit la loi de section -// - Construit la loi de location si necessaire -// - Calcul First & Last +//purpose : - Check that everything is ready +// - Construct the law of section +// - Construct the law of location if required +// - Calculate First & Last //======================================================================= void BRepFill_PipeShell::Prepare() { TopoDS_Wire theSect; if (!IsReady()) StdFail_NotDone::Raise("PipeShell"); - if (!myLocation.IsNull() && !mySection.IsNull()) return; // C'est deja pret + if (!myLocation.IsNull() && !mySection.IsNull()) return; // It is ready //Check set of section for right configuration of punctual sections Standard_Integer i; @@ -803,7 +803,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, Standard_Failure::Raise("Wrong usage of punctual sections"); } - // Construction de la loi de location + // Construction of the law of location if(myLocation.IsNull()) { switch(myTrihedron) @@ -818,17 +818,17 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, break; } default : - { // Pas prevu ! + { // Not planned! Standard_ConstructionError::Raise("PipeShell"); } } } - //Transformation de la loi (Gestion Transition) + //Transformation of the law (Transition Management) PerformTransition(myTransition, myLocation, angmin); - // Construction de la loi de section + // Construction of the section law if (mySeq.Length() == 1) { Standard_Real p1; gp_Trsf aTrsf; @@ -867,20 +867,20 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, } - // sections bouclantes ? + // looping sections ? if (myLocation->IsClosed()) { if (ideb>0) { - // on place la section initiale en position finale + // place the initial section at the final position Param.Append(V2); WSeq.Append(WSeq(ideb)); } else if (ifin>0) { - // on place la section finale en position initiale + // place the final section at the initial position Param.Append(V1); WSeq.Append(WSeq(ifin)); } else { - // il faut trouver une section moyenne a imposer en V1 et en V2 + // it is necessary to find a medium section to impose by V1 and by V2 Standard_Real pmin = Param.Value(1), pmax = Param.Value(1); TopoDS_Wire Wmin = TopoDS::Wire(WSeq.Value(1)), Wmax; for (iseq=2;iseq<=WSeq.Length();iseq++) { @@ -893,12 +893,12 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, Wmax = TopoDS::Wire(WSeq.Value(iseq)); } } - // section moyenne entre Wmin et Wmax + // medium section between Wmin and Wmax TopoDS_Wire Wres; Standard_Real dmin = Abs(pmin-V1); Standard_Real dmax = Abs(pmax-V2); if (ComputeSection(Wmin,Wmax,dmin,dmax,Wres)) { - // on impose la section Wres au debut et a la fin + // impose section Wres at the beginning and the end Param.Append(V1); WSeq.Append(Wres); Param.Append(V2); @@ -909,7 +909,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, } } - // tri des sections par parametre croissant + // parse sections by increasing parameter Standard_Boolean play_again = Standard_True; while (play_again) { play_again = Standard_False; @@ -938,7 +938,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, - // Calcul des sections de travail + // Calculate work sections TopTools_SequenceOfShape WorkingSections; WorkingSections.Clear(); TopTools_DataMapOfShapeListOfShape WorkingMap; @@ -957,7 +957,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, }// else - // on modifie la loi de location si contact + // modify the law of location if contact if ( (myTrihedron == GeomFill_IsGuidePlanWithContact) || (myTrihedron == GeomFill_IsGuideACWithContact) ) { Standard_Real fs, f, l, Delta, Length; @@ -972,7 +972,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, myLocation->CurvilinearBounds(ipath, f, l); Loc = Handle(GeomFill_LocationGuide)::DownCast(myLocation->Law(ipath)); Loc->Set(Sec, Standard_True, fs + f*Delta, fs + l*Delta, - old_angle, angle); // on force la rotation + old_angle, angle); // force the rotation old_angle = angle; } } @@ -982,8 +982,8 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, //======================================================================= //function : Place -//purpose : Met en Place une Section dans le repere local -// et retourne son parametre sur la trajectoire +//purpose : Implement a Section in the local refernce frame +// and return its parameter on the trajectory //======================================================================= void BRepFill_PipeShell::Place(const BRepFill_Section& Sec, TopoDS_Wire& W, @@ -1006,7 +1006,7 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec, //======================================================================= //function : ResetLoc -//purpose : Supprime les references aux sections dans les loi de location +//purpose : Remove references to the sections in the laws of location //======================================================================= void BRepFill_PipeShell::ResetLoc() { @@ -1015,7 +1015,7 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec, Handle(GeomFill_LocationGuide) Loc; for (Standard_Integer isec=1; isec<=myLocation->NbLaw(); isec++) { Loc = Handle(GeomFill_LocationGuide)::DownCast(myLocation->Law(isec)); - Loc->EraseRotation();// on supprime la rotation + Loc->EraseRotation();// remove the rotation } } } diff --git a/src/BRepFill/BRepFill_SectionLaw.cxx b/src/BRepFill/BRepFill_SectionLaw.cxx index dc10805796..4e06694b19 100755 --- a/src/BRepFill/BRepFill_SectionLaw.cxx +++ b/src/BRepFill/BRepFill_SectionLaw.cxx @@ -30,7 +30,7 @@ //======================================================================= //function : NbLaw -//purpose : Donne le nombre de loi elementaire (ou Geometrique) +//purpose : Gives the number of elementary (or Geometric) law //======================================================================= Standard_Integer BRepFill_SectionLaw::NbLaw() const { @@ -68,7 +68,7 @@ //======================================================================= //function : Init -//purpose : Prepare le parcour d'un wire +//purpose : Prepare the parsing of a wire //======================================================================= void BRepFill_SectionLaw::Init(const TopoDS_Wire& W) { @@ -77,7 +77,7 @@ //======================================================================= //function : -//purpose : Parcourt d'un wire en sautant les Edges degenere +//purpose : Parses the wire omitting the degenerated Edges //======================================================================= TopoDS_Edge BRepFill_SectionLaw::CurrentEdge() { @@ -87,14 +87,14 @@ Standard_Boolean Suivant = Standard_False; if (myIterator.More()) { E = myIterator.Current(); -// Suivant = (B.Degenerated(E)); +// Next = (B.Degenerated(E)); Suivant = (BRep_Tool::Degenerated(E)); } while (Suivant) { myIterator.Next(); E = myIterator.Current(); -// Suivant = (B.Degenerated(E) && myIterator.More()); +// Next = (B.Degenerated(E) && myIterator.More()); Suivant = (BRep_Tool::Degenerated(E) && myIterator.More()); } diff --git a/src/BRepFill/BRepFill_SectionPlacement.cxx b/src/BRepFill/BRepFill_SectionPlacement.cxx index e754105b57..375e2aa979 100755 --- a/src/BRepFill/BRepFill_SectionPlacement.cxx +++ b/src/BRepFill/BRepFill_SectionPlacement.cxx @@ -144,7 +144,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, // modified by NIZHNY-629 Fri Jul 25 11:10:27 2003 b -// // section ponctuelle +// // punctual section // Ex.Init(mySection, TopAbs_EDGE); // Standard_Boolean isPonctual = Standard_False; // if (Ex.More()) { @@ -270,7 +270,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, GeomFill_SectionPlacement Place(myLaw->Law(1), theSection); - // Dans le cas generale : Localisation via une concatenation de la spine + // In the general case : Localisation via concatenation of the spine TColStd_Array1OfReal SuperKnot(1, myLaw->NbLaw()+1); TColStd_Array1OfInteger Index(1, myLaw->NbLaw()); for (ii=1; ii<=myLaw->NbLaw(); ii++) { @@ -310,7 +310,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, Ind1 = Index(Ind1); if (Ind2) Ind2 = Index(Ind2); - // Positionnement sur l'edge (ou les 2 Edges) localisee(s) + // Positioning on the localized edge (or 2 Edges) Standard_Real Angle; Place.SetLocation(myLaw->Law(Ind1)); if(TheV.IsNull()) diff --git a/src/BRepFill/BRepFill_ShapeLaw.cxx b/src/BRepFill/BRepFill_ShapeLaw.cxx index d10ac17594..d5addb69dc 100755 --- a/src/BRepFill/BRepFill_ShapeLaw.cxx +++ b/src/BRepFill/BRepFill_ShapeLaw.cxx @@ -33,8 +33,8 @@ //======================================================================= //function : Create -//purpose : On traite le cas du Vertex en construisant, une line, -// ayant le vertex pour origine +//purpose : Process the case of Vertex by constructing a line +// with the vertex in the origin //======================================================================= BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V, const Standard_Boolean Build) @@ -43,14 +43,14 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V, { TheLaw.Nullify(); uclosed = Standard_False; - vclosed = Standard_True; // loi constante + vclosed = Standard_True; // constant law myEdges = new (TopTools_HArray1OfShape) (1, 1); myEdges->SetValue(1, V); if (Build) { myLaws = new (GeomFill_HArray1OfSectionLaw) (1, 1); // gp_Pnt Origine; - gp_Dir D(1,0,0); //Suivant la normal + gp_Dir D(1,0,0); //Following the normal Handle(Geom_Line) L = new (Geom_Line)(BRep_Tool::Pnt(V), D); Standard_Real Last = 2*BRep_Tool::Tolerance(V)+Precision::PConfusion(); Handle(Geom_TrimmedCurve) TC = new (Geom_TrimmedCurve) (L, 0, Last); @@ -78,7 +78,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W, //======================================================================= //function : Create -//purpose : Wire evolutif +//purpose : Evolutive Wire //======================================================================= BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W, @@ -94,7 +94,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W, //======================================================================= //function : Init -//purpose : Cas du wire : On cree une table de GeomFill_SectionLaw +//purpose : Case of the wire : Create a table of GeomFill_SectionLaw //======================================================================= void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) { @@ -132,7 +132,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) if (E.Orientation() == TopAbs_REVERSED) { Standard_Real aux; Handle(Geom_Curve) CBis; - CBis = C->Reversed(); // Pour eviter de deteriorer la topologie + CBis = C->Reversed(); // To avoid the deterioration of the topology aux = C->ReversedParameter(First); First = C->ReversedParameter(Last); Last = aux; @@ -152,11 +152,11 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) } } - if ((ii>1) || !IsReallyClosed ) { // On trimme C + if ((ii>1) || !IsReallyClosed ) { // Trim C Handle(Geom_TrimmedCurve) TC = new Geom_TrimmedCurve(C,First, Last); C = TC; } - // sinon On garde l'integrite de la courbe + // otherwise preserve the integrity of the curve if (TheLaw.IsNull()) { myLaws->ChangeValue(ii) = new GeomFill_UniformSection(C); } @@ -171,10 +171,10 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) // cout << "new law" << endl; - // La loi est elle ferme en U ? + // Is the law closed by U ? uclosed = W.Closed(); if (!uclosed) { - // le flag n'etant pas tres sur, on fait une verif + // if not sure about the flag, make check TopoDS_Edge Edge1, Edge2; TopoDS_Vertex V1,V2; Edge1 = TopoDS::Edge (myEdges->Value(myEdges->Length())); @@ -263,7 +263,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) ///======================================================================= //function : VertexTol -//purpose : Evalue le trou entre 2 edges de la section +//purpose : Evaluate the hole between 2 edges of the section //======================================================================= Standard_Real BRepFill_ShapeLaw::VertexTol(const Standard_Integer Index, const Standard_Real Param) const @@ -271,7 +271,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) Standard_Real Tol = Precision::Confusion(); Standard_Integer I1, I2; if ( (Index==0) || (Index==myEdges->Length()) ) { - if (!uclosed) return Tol; //Le moins faux possible + if (!uclosed) return Tol; //The least possible error I1 = myEdges->Length(); I2 = 1; } @@ -339,7 +339,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) TopoDS_Vertex V; W = TopoDS::Wire(myShape); if(!W.IsNull()) { - // Concatenation des aretes + // Concatenation of edges Standard_Integer ii; Standard_Real epsV, f, l; Standard_Boolean Bof; @@ -388,7 +388,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) TopoDS_Edge Edge1, Edge2; if ( (Index==0) || (Index==myEdges->Length()) ) { - if (!uclosed) return GeomAbs_C0; //Le moins faux possible + if (!uclosed) return GeomAbs_C0; //The least possible error Edge1 = TopoDS::Edge (myEdges->Value(myEdges->Length())); Edge2 = TopoDS::Edge (myEdges->Value(1)); diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index a181acb852..7076eec922 100755 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -192,7 +192,7 @@ static Standard_Boolean HasPCurves(const TopoDS_Edge& E) //======================================================================= //function : Translate -//purpose : Copy une colonne d'un tableau dans un autre. +//purpose : Copy a column from one table to another. //======================================================================= static void Translate(const Handle(TopTools_HArray2OfShape)& ArrayIn, const Standard_Integer In, @@ -209,7 +209,7 @@ static void Translate(const Handle(TopTools_HArray2OfShape)& ArrayIn, //======================================================================= //function : Box -//purpose : Boite d'encombrement d'une section. +//purpose : Bounding box of a section. //======================================================================= static void Box(Handle(GeomFill_SectionLaw)& Sec, const Standard_Real U, @@ -229,8 +229,8 @@ static void Box(Handle(GeomFill_SectionLaw)& Sec, //======================================================================= //function : Couture -//purpose : Controle si E est une arete de couture sur S -// et rend la representation HadHoc +//purpose : Check if E is an edge of sewing on S +// and make the representation HadHoc //======================================================================= static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E, const Handle(Geom_Surface)& S, @@ -261,7 +261,7 @@ static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E, //======================================================================= //function : CheckSameParameter -//purpose : Controle a posteriori que sameparameter a bien fait son boulot +//purpose : Check a posteriori that sameparameter has worked correctly //======================================================================= static Standard_Boolean CheckSameParameter @@ -298,9 +298,9 @@ static Standard_Boolean CheckSameParameter //======================================================================= //function : SameParameter -//purpose : Encapsulation de Sameparameter -// Le boolean dit si l'on a calcule la pcurve ou non... -// La tolerance est toujours Ok. +//purpose : Encapsulation of Sameparameter +// Boolean informs if the pcurve was computed or not... +// The tolerance is always OK. //======================================================================= static Standard_Boolean SameParameter(TopoDS_Edge& E, @@ -348,8 +348,8 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E, ResTol = sp.TolReached(); if(ResTol > tolreached ){ #ifdef DEB - cout<<"SameParameter : Tol non atteinte!!!"<D0(f, P2d); S->D0(P2d.X(), P2d.Y(), P); @@ -705,7 +705,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d, B.UpdateVertex(VL, d); BRepLib_MakeEdge MkE (C3d, VF, VL, f, l); - if (!MkE.IsDone()) { // Erreur de construction !! + if (!MkE.IsDone()) { // Error of construction !! #ifdef DRAW char name[100]; sprintf(name,"firstvertex_error"); @@ -730,7 +730,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d, //======================================================================= //Fonction : Filling -//Objet : Construit les faces de remplisage +//Objet : Construct the faces of filling //======================================================================= static Standard_Boolean Filling(const TopoDS_Shape& EF, const TopoDS_Shape& F1, @@ -751,7 +751,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, // Standard_Real Tol3d = Tol; Standard_Boolean WithE3, WithE4; -// Recuperation des contraintes +// Return constraints TopoDS_Vertex V1, V2, Vf, Vl; TopoDS_Edge E1, E2, E3, E4; E1 = TopoDS::Edge(EF); @@ -798,7 +798,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, } #endif -// Construction d'une surface de revolution +// Construction of a surface of revolution Handle(Geom_Curve) Prof1, Prof2; //Standard_Integer ii, jj;//, Nb; Standard_Real f1, f2, l1, l2,/*d1, d2,*/ Angle;//, Eps = 1.e-9; @@ -811,7 +811,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, gp_Trsf Tf; Tf.SetTransformation(Axe); -// Choix d'un angle d'ouverture +// Choose the angle of opening P1 = Prof1->Value((f1+l1)/2); P2 = Prof2->Value((f2+l2)/2); P1.Transform(Tf); @@ -838,11 +838,11 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, Handle(Geom_Surface) Surf = new (Geom_RectangularTrimmedSurface) (Rev, 0, Angle, f1, l1); - // Controle le sens de la rotation + // Control the direction of the rotation Standard_Boolean ToReverseResult = Standard_False; gp_Vec d1u; d1u = Surf->DN(0, (f1+l1)/2, 1, 0); - if (d1u.Angle(TangentOnPart1) > PI/2) { //On inverse tout + if (d1u.Angle(TangentOnPart1) > PI/2) { //Invert everything ToReverseResult = Standard_True; /* axe.Reverse(); @@ -862,7 +862,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, Handle(Geom2d_Curve) C1, C2, C3, C4; /* -// Deformation de la surface de revolution. +// Deform the surface of revolution. GeomPlate_BuildPlateSurface BPS; Handle(BRepAdaptor_HSurface) AS; @@ -879,7 +879,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, L = new (Geom2d_Line) (P2d, gp::DY2d()); C2 = new (Geom2d_TrimmedCurve) (L, f1, l1); - // Ici il faut controler le sens et le range. + // It is required to control the direction and the range. C2->D0(f1, P2d); Surf->D0(P2d.X(), P2d.Y(), P1); C2->D0(l1, P2d); @@ -887,7 +887,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, // P = BT.Pnt(V1); P = BRep_Tool::Pnt(V1); if (P.Distance(P2)+Tol < P.Distance(P1)) { - // E2 est (sans doute!) parcourue dans le sens inverse de E1 + // E2 is parsed in the direction opposite to E1 C2->Reverse(); TopoDS_Vertex aux; aux = V2; @@ -924,8 +924,8 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, L = new (Geom2d_Line) (P2d, gp::DX2d()); C4 = new (Geom2d_TrimmedCurve) (L, 0, Angle); /* - // Determination des contraintes et - // de leur localisation parametrique. + // Determine the constraints and + // their parametric localisation. if (!E1.IsNull()) { AS = new BRepAdaptor_HSurface(TopoDS::Face(F1)); AC2d = new BRepAdaptor_HCurve2d(); @@ -1113,16 +1113,16 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, } } -//Construction de la face +//Construct face BuildFace(Surf,E1, E3, E2, E4, EEmap, Standard_False, Standard_False, Result); -// Set Les continuites. +// Set the continuities. B.Continuity(E1, TopoDS::Face(F1), Result, GeomAbs_G1); B.Continuity(E2, TopoDS::Face(F2), Result, GeomAbs_G1); -// Rend les bords calcules. +// Render the calculated borders. // if (!BT.Degenerated(E3)) if (!BRep_Tool::Degenerated(E3)) Aux1 = E3; @@ -1135,7 +1135,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, else B.MakeEdge(Aux2); - // Set de l'orientation + // Set the orientation gp_Vec D1U, D1V, N1, N2; C1->D0( (f1+l1)/2, P2d); Surf->D1(P2d.X(), P2d.Y(), P, D1U, D1V); @@ -1197,7 +1197,7 @@ static void Substitute(BRepTools_Substitution& aSubstitute, //======================================================================= //Function : SetCommonEdgeInFace -//Purpose : Replace an edge of the face by correspondent edge from +//Purpose : Replace an edge of the face by the corresponding edge from // myUEdges //======================================================================= /* @@ -1236,7 +1236,7 @@ static void SetCommonEdgeInFace(BRepTools_Substitution& aSubstitute, //======================================================================= //Fonction : KeepEdge -//Objet : Recheche les edges de la face supporte par la meme Courbe. +//Objet : Find edges of the face supported by the same Curve. //======================================================================= static void KeepEdge(const TopoDS_Shape& Face, const TopoDS_Shape& Edge, @@ -1263,7 +1263,7 @@ static void KeepEdge(const TopoDS_Shape& Face, //======================================================================= //Function : -//Objet : Construire un vertex via, une iso +//Objet : Construct a vertex via an iso //======================================================================= static void BuildVertex(const Handle(Geom_Curve)& Iso, const Standard_Boolean isfirst, @@ -1283,7 +1283,7 @@ static void BuildVertex(const Handle(Geom_Curve)& Iso, //======================================================================= //Function : -//Objet : Construire une arete vide +//Objet : Construct an empty edge //======================================================================= static TopoDS_Edge NullEdge(TopoDS_Shape& Vertex) { @@ -1300,7 +1300,7 @@ static TopoDS_Edge NullEdge(TopoDS_Shape& Vertex) //======================================================================= //Function : -//Objet : Construire une arete via, une iso +//Objet : Construct an edge via an iso //======================================================================= static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S, const Standard_Boolean isUiso, @@ -1320,7 +1320,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S, Iso = S->VIso(ValIso); } - if (VFirst.IsSame(VLast)) { // Cas Singulier ? + if (VFirst.IsSame(VLast)) { // Singular case ? gp_Pnt P; // Class BRep_Tool without fields and without Constructor : // BRep_Tool BT; @@ -1337,7 +1337,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S, } - if (sing) { // Cas Singulier + if (sing) { // Singular case TopoDS_Shape V; V = VFirst; E = NullEdge(V); @@ -1347,7 +1347,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S, } else { - // Construction Via le 3d + // Construction Via 3d // if (isUiso) { // Iso = S->UIso(ValIso); gp_Pnt P1,P2; @@ -1426,7 +1426,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S, E = MkE.Edge(); } - // On associe le 2d + // Associate 2d Handle(Geom2d_Line) L; TopLoc_Location Loc; if (isUiso) { @@ -1450,7 +1450,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S, //======================================================================= //Function : -//Objet : Completer une arete via, une iso +//Objet : Complete an edge via an iso //======================================================================= static void UpdateEdge(TopoDS_Edge& E, const Handle(Geom_Surface)& S, @@ -1475,7 +1475,7 @@ static void UpdateEdge(TopoDS_Edge& E, TopoDS_Vertex Vf, Vl; TopExp::Vertices(E, Vf, Vl); - if (Vf.IsSame(Vl)) { // Cas Singulier ? + if (Vf.IsSame(Vl)) { // Singular case ? gp_Pnt Pmid; Standard_Real tol = BRep_Tool::Tolerance(Vf); Iso->D0((Iso->FirstParameter()+Iso->LastParameter())/2, Pmid); @@ -1501,7 +1501,7 @@ static void UpdateEdge(TopoDS_Edge& E, } CL = new (Geom2d_TrimmedCurve) (L, F2d, L2d); - // Controle sens & Range + // Control direction & Range Standard_Real R, First, Last, Tol=1.e-4; Standard_Boolean reverse = Standard_False;; @@ -1514,14 +1514,14 @@ static void UpdateEdge(TopoDS_Edge& E, BRep_Tool::Range(E, First, Last); if (!Vf.IsSame(Vl)) { - // On test les distance entre le "FirstPoint et les Vertex" + // Test distances between "FirstPoint" and "Vertex" P2d = CL->Value(F2d); POnS = S->Value(P2d.X(), P2d.Y()); // reverse = POnS.Distance(BT.Pnt(Vl)) < POnS.Distance(BT.Pnt(Vf)); reverse = POnS.Distance(BRep_Tool::Pnt(Vl)) < POnS.Distance(BRep_Tool::Pnt(Vf)); } else if (!sing) { - // On test l'angle entre les "First Tangente" + // Test angle between "First Tangente" gp_Vec2d V2d; gp_Vec V3d, du, dv, dC3d; BRepAdaptor_Curve C3d(E); @@ -1532,7 +1532,7 @@ static void UpdateEdge(TopoDS_Edge& E, V3d.SetLinearForm(V2d.X(), du, V2d.Y(), dv); reverse = ( dC3d.Angle(V3d) > Tol); } - if (reverse ) { // On retourne la courbe 2d + if (reverse ) { // Return curve 2d CL = new (Geom2d_TrimmedCurve)(L, F2d, L2d); CL->Reverse(); F2d = CL->FirstParameter(); @@ -1575,7 +1575,7 @@ static void UpdateEdge(TopoDS_Edge& E, R = POnS.Distance(BRep_Tool::Pnt(V)); B.UpdateVertex(V, R); - // Update de l'Edge + // Update Edge if (!sing && SameParameter(E, CL, S, Tol, R)) { B.UpdateEdge(E, R); } @@ -1583,7 +1583,7 @@ static void UpdateEdge(TopoDS_Edge& E, PCurve = Couture(E, S, Loc); if (PCurve.IsNull()) B.UpdateEdge(E, CL, S, Loc, Precision::Confusion()); - else { // Arete de couture + else { // Sewing edge TopoDS_Edge e = E; Oriente(S, e); if (e.Orientation() == TopAbs_REVERSED) @@ -1592,13 +1592,13 @@ static void UpdateEdge(TopoDS_Edge& E, B.UpdateEdge(E, PCurve, CL, S, Loc, Precision::Confusion()); } - // Attention au cas non SameRange sur ces shapes (PRO13551) + // Attention to case not SameRange on its shapes (PRO13551) // if (!BT.SameRange(E)) B.Range(E, S, Loc, First, Last); if (!BRep_Tool::SameRange(E)) B.Range(E, S, Loc, First, Last); } //======================================================================= -//Objet : Voir si une surface est degenere +// Object : Check if a surface is degenerated //======================================================================= static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S, const Standard_Real Tol) @@ -1613,7 +1613,7 @@ static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S, S->Bounds(Umin, Umax, Vmin, Vmax); - // Controle la longeur des Iso-U + // Check the length of Iso-U t = (Umin + Umax)/2; S->D0(t, Vmin, P1); S->D0(t, (Vmin+Vmax)/2, P2); @@ -1630,7 +1630,7 @@ static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S, if (B) return Standard_True; - // Controle la longeur des Iso-V + // Check the length of Iso-V t = (Vmin + Vmax)/2; S->D0(Umin, t, P1); S->D0((Umin+Umax)/2, t, P2); @@ -1676,7 +1676,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //======================================================================= //function : SetBounds -//purpose : Definit les shapes de debut et fin +//purpose : Define start and end shapes //====================================================================== void BRepFill_Sweep::SetBounds(const TopoDS_Wire& First, const TopoDS_Wire& Last) @@ -1684,7 +1684,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, FirstShape = First; LastShape = Last; - // Il faut verifier le SameRange sur ces shapes (PRO13551) + // It is necessary to check the SameRange on its (PRO13551) Standard_Boolean issame = Standard_True; BRep_Builder B; BRepTools_WireExplorer wexp; @@ -1710,7 +1710,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, #if DEB if (!issame) - cout<<"Sweep Warning : Edge non SameRange dans les bornes"<Law(ipath), KPart); Sweep.SetTolerance(myTol3d, myBoundTol, myTol2d, myTolAngular); Sweep.Build(mySec->Law(isec), myApproxStyle, myContinuity, myDegmax, mySegmax); @@ -1821,7 +1821,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, else S->Bounds(val, bid, First, Last); Iso = S->UIso(val); } - // Vertex par positionement + // Vertex by position if (ipath < NbPath) BuildVertex(Iso, Standard_False, First, Last, myVEdges->ChangeValue(1, ipath+1)); @@ -1854,14 +1854,14 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, myVEdges->ChangeValue(1, 1)); } - // Construction de l'arete + // Construction of the edge BRepLib_MakeEdge MkE; MkE.Init(Iso, TopoDS::Vertex(myVEdges->Value(1, ipath)), TopoDS::Vertex(myVEdges->Value(1, ipath+1)), Iso->FirstParameter(), Iso->LastParameter()); - if (!MkE.IsDone()) { // Erreur de construction !! + if (!MkE.IsDone()) { // Error of construction !! #ifdef DRAW char name[100]; sprintf(name,"firstvertex_error"); @@ -1897,7 +1897,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //======================================================================= //function : BuildShell -//purpose : Construit une Shell par balayage +//purpose : Construct a Shell by sweeping //====================================================================== Standard_Boolean BRepFill_Sweep:: BuildShell(const BRepFill_TransitionStyle /*Transition*/, @@ -1920,15 +1920,15 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, (NbPath == myLoc->NbLaw()) && (myLoc->IsG1(0, myTol3d)>= 0); Error = 0.; - // (1) Construction de toutes les surfaces + // (1) Construction of all surfaces - // (1.1) Construction des Tables + // (1.1) Construction of Tables TColStd_Array2OfInteger ExchUV(1, NbLaw, 1, NbPath); TColStd_Array2OfInteger UReverse(1, NbLaw, 1, NbPath); TColStd_Array2OfInteger Degenerated(1, NbLaw, 1, NbPath); Degenerated.Init(0); - // Pas de VReverse pour le moment... + // No VReverse for the moment... TColStd_Array2OfReal TabErr(1, NbLaw , 1, NbPath); TColGeom_Array2OfSurface TabS(1, NbLaw , 1, NbPath); @@ -1944,8 +1944,8 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, TColStd_Array1OfReal VError(1, NbLaw+1); TColStd_Array1OfReal Vi(1, NbPath+1); -//Initialisation de la gestion des intervalles parametrique -//(Cas des sections evolutive) +//Initialization of management of parametric intervals +//(Case of evolutionary sections) Standard_Real Length, SecDom, SecDeb; myLoc->CurvilinearBounds(myLoc->NbLaw(), SecDom, Length); mySec->Law(1)->GetDomain(SecDeb, SecDom); @@ -1958,7 +1958,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, else Vi(1) = SecDeb; - // Erreur a priori sur les vertex + // Error a priori on vertices if (constSection) { for (isec=1; isec<=NbLaw+1; isec++) { VError(isec) = mySec->VertexTol(isec-1, 0.); @@ -1967,13 +1967,13 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } - // (1.2) Calcul des surfaces + // (1.2) Calculate surfaces for (ipath=1, IPath=IFirst; ipath <=NbPath; ipath++, IPath++) { GeomFill_Sweep Sweep(myLoc->Law(IPath), KPart); Sweep.SetTolerance(myTol3d, myBoundTol, myTol2d, myTolAngular); - // Cas des section evolutive, definition de la correspondance parametrique + // Case of evolutionary section, definition of parametric correspondence if (!constSection) { Standard_Real lf, ll, Lf, Ll; myLoc->Law(IPath)->GetDomain(lf, ll); @@ -2024,13 +2024,13 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } } - // (2) Construction des Edges + // (2) Construction of Edges Standard_Real UFirst, ULast, VFirst, VLast; Standard_Boolean exuv, singu, singv; Handle(Geom_Surface) S; if (! vclose) { - // (2.0) recuperation des Edges et vertex prexistant + // (2.0) return preexisting Edges and vertices TopoDS_Edge E; if (! FirstShape.IsNull() && (IFirst==1)) { mySec->Init(FirstShape); @@ -2051,11 +2051,11 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, UpdateVertex(IFirst-1, 1, TabErr(1, 1), Vi(1), Vertex(1, 1)); } - else { // Sinon on construit quand meme les vertex + else { // Otherwise construct vertices Standard_Real u, v, aux; Standard_Boolean ureverse; for (isec=1; isec<=NbLaw+1; isec++) { - // Recuperation des donne + // Return data if (isec >NbLaw) { S = TabS(NbLaw, 1); ureverse = UReverse(NbLaw, 1); @@ -2068,7 +2068,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } S->Bounds(UFirst, ULast, VFirst, VLast); - // Choix des parametres + // Choice of parameters if (ureverse) { if (exuv) { aux = VFirst; VFirst = VLast; VLast = aux; @@ -2092,7 +2092,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } } - // construction du vertex + // construction of vertices B.MakeVertex(TopoDS::Vertex(Vertex(isec, 1)), S->Value(u,v), mySec->VertexTol(isec-1,Vi(1))); @@ -2124,7 +2124,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, Standard_Real u, v, aux; Standard_Boolean ureverse; for (isec=1; isec<=NbLaw+1; isec++) { - // Recuperation des donne + // Return data if (isec >NbLaw) { S = TabS(NbLaw, NbPath); ureverse = UReverse(NbLaw, NbPath); @@ -2137,7 +2137,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } S->Bounds(UFirst, ULast, VFirst, VLast); - // Choix des parametres + // Choice of parametres if (ureverse) { if (exuv) { aux = VFirst; VFirst = VLast; VLast = aux; @@ -2161,7 +2161,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } } - // construction du vertex + // construction of vertex B.MakeVertex(TopoDS::Vertex(Vertex(isec, NbPath+1)), S->Value(u,v), mySec->VertexTol(isec-1, Vi(NbPath+1))); @@ -2170,7 +2170,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } - // ---------- Creation de Vertex et edge ------------ + // ---------- Creation of Vertex and edge ------------ for (ipath=1, IPath=IFirst; ipath<=NbPath; ipath++, IPath++) { for (isec=1; isec <=NbLaw; isec++) { @@ -2187,10 +2187,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } } - // (2.1) Construction des nouveaux vertex + // (2.1) Construction of new vertices if (isec == 1) { if (ipath == 1 && Vertex(1, 1).IsNull()) { - // Le tout premier + // All first if (constSection) myLoc->PerformVertex(IPath-1, TopoDS::Vertex(SecVertex(1)), @@ -2202,7 +2202,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, mySec->VertexTol(0,Vi(1)), TopoDS::Vertex(Vertex(1, 1))); } - // le premier de la colonne suivante + // the first and the next column if (vclose &&(ipath == NbPath) ) { Vertex(1, ipath+1) = Vertex(1, 1); } @@ -2266,7 +2266,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, TopoDS::Vertex(Vertex(isec+1, ipath+1)) ); } - // Cas Singuliers + // Singular cases singv = MergeVertex(Vertex(isec,ipath+1), Vertex(isec+1,ipath+1)); singu = MergeVertex(Vertex(isec+1,ipath), Vertex(isec+1,ipath+1)); @@ -2278,30 +2278,30 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } if (Degenerated(isec, ipath)) { #if DEB - cout << "Sweep : Cas degenere" << endl; + cout << "Sweep : Degenerated case" << endl; #endif hasdegen = Standard_True; - // Construction particuliere des edge + // Particular construction of edges if (UEdge(isec+1, ipath).IsNull()) { if (singu) { - // Edge degenere + // Degenerated edge UEdge(isec+1, ipath) = NullEdge(Vertex(isec+1,ipath)); } - else { // Copie de l'edge precedente + else { // Copy the previous edge UEdge(isec+1, ipath) = UEdge(isec, ipath); } } if (VEdge(isec, ipath+1).IsNull()) { if (singv) { - // Edge degenere + // Degenerated Edge VEdge(isec, ipath+1) = NullEdge(Vertex(isec,ipath+1)); } - else { // Copie de l'edge precedente + else { // Copy the previous edge VEdge(isec, ipath+1) = VEdge(isec, ipath); } } } - else { // Construction des edges par les isos + else { // Construction of edges by isos if (exuv) { Standard_Real UV; UV = UFirst; UFirst = VFirst; VFirst = UV; @@ -2360,10 +2360,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, S, exuv, VLast); } - }//Fin de contruction des edges + }// End of construction of edges } - // (3) Construction des Faces + // (3) Construction of Faces TopoDS_Face face; #ifdef DRAW @@ -2413,10 +2413,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } - // (4) Historique et Continuity + // (4) History and Continuity if (hasdegen) { - //(4.1) // Cas degenere => Marteau Pilon + //(4.1) // Degenerated case => Sledgehammer TopoDS_Compound Comp; B.MakeCompound(Comp); for (isec=1; isec <= NbLaw+1; isec++) @@ -2430,7 +2430,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, BRepLib::EncodeRegularity(Comp, myTolAngular); } else { - //(4.2) // Cas generale => Pince a epiler + //(4.2) // General case => Tweezers Standard_Boolean isG1; TopoDS_Face FF; TopoDS_Edge E; @@ -2452,7 +2452,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } Standard_Integer nbpath = NbPath; - if (vclose) nbpath++; //Un test G1 en plus + if (vclose) nbpath++; //Another test G1 for (ipath=1, IPath=IFirst; ipath<= NbPath+1; ipath++, IPath++) { if ((ipath > 1) && (ipath <=nbpath)) isG1 = (myLoc->IsG1(IPath-1, myTol3d, myTolAngular) >= 0); @@ -2475,7 +2475,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //======================================================================= //function : Build -//purpose : Construit le resultat d'un balayage +//purpose : Construt the result of sweeping //====================================================================== void BRepFill_Sweep::Build(const BRepFill_TransitionStyle Transition, const GeomFill_ApproxStyle Approx, @@ -2507,20 +2507,20 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, Handle(TColStd_HArray1OfInteger) Trous; - if (NbTrous>0) { // Combien de sous parties ? + if (NbTrous>0) { // How many sub-parts ? Trous = new (TColStd_HArray1OfInteger) (1, NbTrous); myLoc->Holes(Trous->ChangeArray1()); NbPart += NbTrous; if (Trous->Value(NbTrous) == NbPath+1) NbPart--; } - if (NbPart == 1) { // On le fait en un coup + if (NbPart == 1) { // This is done at once Standard_Real Extend = 0.0; if (NbTrous==1) Extend = EvalExtrapol(1, Transition); isDone = BuildShell(Transition, 1, NbPath+1, Extend, Extend); } - else { // On le fait bout par bout + else { // This is done piece by piece Standard_Integer IFirst = 1, ILast; for (ii=1, isDone=Standard_True; ii<=NbPart && isDone; ii++) { @@ -2539,7 +2539,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, Translate(myVEdges, IFirst, Bounds, 1); } } - // Gestion des terminaisons bouclantes + // Management of looping ends if ( (NbTrous>0) && (myLoc->IsClosed()) && (Trous->Value(NbTrous) == NbPath+1) ) { Translate(myVEdges, NbPath+1, Bounds, 1); @@ -2547,7 +2547,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, PerformCorner(1, Transition, Bounds); } - // Construction de la shell + // Construction of the shell TopoDS_Shell shell; B.MakeShell(shell); for (ipath=1; ipath<=NbPath; ipath++) @@ -2634,9 +2634,9 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } } - // Est ce Ferme ? + // Is it Closed ? if (myLoc->IsClosed() && mySec->IsUClosed()) { - //On verifie + //Check Standard_Boolean closed = Standard_True; Standard_Integer iedge; TopTools_IndexedDataMapOfShapeListOfShape EFmap; @@ -2684,7 +2684,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //======================================================================= //function : SubShape -//purpose : Les faces obtenues par balayage +//purpose : Faces obtained by sweeping //======================================================================= Handle(TopTools_HArray2OfShape) BRepFill_Sweep::SubShape() const { @@ -2693,7 +2693,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //======================================================================= //function : InterFaces -//purpose : les Edges obtenues par balayage +//purpose : Edges obtained by sweeping //======================================================================= Handle(TopTools_HArray2OfShape) BRepFill_Sweep::InterFaces() const { @@ -2702,7 +2702,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //======================================================================= //function : Sections -//purpose : Les Edges ou Face (ou compound des 2) Transition entre 2 balayages. +//purpose : Edges or Face (or compound of 2) Transition between 2 sweepings //======================================================================= Handle(TopTools_HArray2OfShape) BRepFill_Sweep::Sections() const { @@ -2711,14 +2711,14 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //======================================================================= //function : PerformCorner -//purpose : Trim et/ou bouche un coin +//purpose : Trim and/or loop a corner //====================================================================== void BRepFill_Sweep::PerformCorner(const Standard_Integer Index, const BRepFill_TransitionStyle Transition, const Handle(TopTools_HArray2OfShape)& Bounds) { - if (Transition == BRepFill_Modified) return; // On ne fait rien. + if (Transition == BRepFill_Modified) return; // Do nothing. BRepFill_TransitionStyle TheTransition = Transition; Standard_Boolean isTangent=Standard_False; @@ -2740,7 +2740,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, I2 = 1; } - // On Construit un axe supporte par la bissectrice + // Construct an axis supported by the bissectrice myLoc->Law(I1)->GetDomain(F, L); myLoc->Law(I1)->GetCurve()->D1(L, P1, T1); T1.Normalize(); @@ -2762,7 +2762,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, if (t1.Angle(t2) < myAngMin) { #if DEB - cout << "BRepFill_Sweep::PerformCorner : Ce n'est pas un coin !" << endl; + cout << "BRepFill_Sweep::PerformCorner : This is not a corner !" << endl; #endif return; } @@ -2774,15 +2774,15 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, TheTransition = BRepFill_Round; } - Tang = T1 + T2; //Direction moyenne + Tang = T1 + T2; //Average direction gp_Dir NormalOfBisPlane = Tang; if (isTangent) { Sortant -= Tang.Dot(Tang)*Tang; } else { - Sortant = T2-T1; //Direction rentrente - Sortant *= -1; // " " sortante + Sortant = T2-T1; //Direction input + Sortant *= -1; // " " output Tang -= (Tang.Dot(T2))*T2; } @@ -2793,7 +2793,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, gp_Ax2 Axe (P1, N, Dx); gp_Ax2 AxeOfBisPlane( P1, NormalOfBisPlane ); - // On construit les 2 Shell a intersecter + // Construct 2 intersecting Shells Handle (TopTools_HArray2OfShape) UEdges = new TopTools_HArray2OfShape( 1, mySec->NbLaw()+1, 1, myLoc->NbLaw() ); UEdges->ChangeArray2() = myUEdges->Array2(); @@ -2855,9 +2855,9 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, else if ((TheTransition == BRepFill_Right) || aTrim.HasSection() ) { #if DEB - cout << "Echec de TrimCorner" << endl; + cout << "Fail of TrimCorner" << endl; #endif - return; // On ne touche a rien + return; // Nothing is touched } if (mySec->IsUClosed()) @@ -2867,7 +2867,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } if (TheTransition == BRepFill_Round) { - // Remplissage + // Filling TopTools_ListOfShape list1, list2; TopoDS_Edge Bord1, Bord2, BordFirst; BordFirst.Nullify(); @@ -2883,7 +2883,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, TopTools_ListIteratorOfListOfShape It2(list2); Standard_Boolean B; for (; It1.More(); It1.Next(), It2.Next()) { - if (HasFilling) { // Choix des contraintes transversale + if (HasFilling) { // Transversal choice of constraints TopoDS_Vertex VF, VL, VC; TopoDS_Edge E = TopoDS::Edge(It1.Value()); TopoDS_Edge E1, E2; @@ -2909,7 +2909,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, Bord2 = E2; } - // Remplissage + // Filling B = Filling(It1.Value(), myFaces->Value(ii, I1), It2.Value(), myFaces->Value(ii, I2), myVEdgesModified, myTol3d, Axe, T1, Bord1, Bord2, FF); @@ -2923,7 +2923,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, } } #if DEB - else cout << "PerformCorner : Disymetrie de bord libre" << endl; + else cout << "PerformCorner : Unsymmetry of free border" << endl; #endif } } @@ -2979,8 +2979,8 @@ Standard_Real BRepFill_Sweep:: Standard_Real alpha = T1.Angle(T2); if ((alpha > myAngMax) || (alpha < myAngMin)) { - //Angle trop grand => Pas de raccord "droit" - //Angle trop petit => Pas de raccord + //Angle too great => No "straight" connection + //Angle too small => No connection return Extrap; // = 0.0 } @@ -3014,7 +3014,7 @@ Standard_Real BRepFill_Sweep:: //======================================================================= //function : MergeVertex -//purpose : Fait V2 = V1 si V2 est trop proche de V1 +//purpose : Make V2 = V1 if V2 is too close to V1 //====================================================================== Standard_Boolean BRepFill_Sweep::MergeVertex(const TopoDS_Shape& V1, TopoDS_Shape& V2) const @@ -3038,7 +3038,7 @@ Standard_Boolean BRepFill_Sweep::MergeVertex(const TopoDS_Shape& V1, //======================================================================= //function : UpdateVertex -//purpose : Update la Tolerance des Vertexs en Fonction des Lois. +//purpose : Update the Tolerance of Vertices depending on Laws. //====================================================================== void BRepFill_Sweep::UpdateVertex(const Standard_Integer ipath, const Standard_Integer isec, diff --git a/src/BRepFill/BRepFill_TrimEdgeTool.cxx b/src/BRepFill/BRepFill_TrimEdgeTool.cxx index a51e77cb7f..9ef8d06225 100755 --- a/src/BRepFill/BRepFill_TrimEdgeTool.cxx +++ b/src/BRepFill/BRepFill_TrimEdgeTool.cxx @@ -83,7 +83,7 @@ myBisec(Bisec) isPoint1 = (S1->DynamicType() == STANDARD_TYPE(Geom2d_CartesianPoint)); isPoint2 = (S2->DynamicType() == STANDARD_TYPE(Geom2d_CartesianPoint)); - // recuperation des geometries des shapes. +// return geometries of shapes. // Standard_Real f,l; if (isPoint1) { myP1 = Handle(Geom2d_Point)::DownCast(S1)->Pnt2d(); @@ -112,7 +112,7 @@ myBisec(Bisec) } #endif } - // recuperer l expression simple de la bisectrice + // return the simple expression of the bissectrice Handle(Geom2d_Curve) Bis; SimpleExpression(myBisec, Bis); myBis = Geom2dAdaptor_Curve(Bis); @@ -127,7 +127,7 @@ myBisec(Bisec) //======================================================================= //function : Bubble -//purpose : Ordonne la sequence de point en x croissant. +//purpose : Order the sequence of points by increasing x. //======================================================================= static void Bubble(TColgp_SequenceOfPnt& Seq) @@ -149,7 +149,7 @@ static void Bubble(TColgp_SequenceOfPnt& Seq) //======================================================================= -//function : EvalParameters (lbr le 8 juillet, je duplique pour modifier) +//function : EvalParameters //purpose : //======================================================================= @@ -218,7 +218,7 @@ static void EvalParameters(const Geom2dAdaptor_Curve& Bis, } } - // Ordonne la sequence en param croissant sur la bissectrice. + // Order the sequence by growing parameter on the bissectrice. Bubble( Params); } @@ -282,7 +282,7 @@ static void EvalParametersBis(const Geom2dAdaptor_Curve& Bis, } } - // Ordonne la sequence en param croissant sur la bissectrice. + // Order the sequence by parameter growing on the bissectrice. Bubble( Params); } @@ -298,7 +298,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, { Params.Clear(); - // recuperer les courbes associees aux edges. + // return curves associated to edges. TopLoc_Location L; Standard_Real f,l; Handle(Geom_Surface) Surf; @@ -333,7 +333,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, } #endif - // Calcul intersection + // Calculate intersection TColgp_SequenceOfPnt Points2; gp_Pnt PSeq; @@ -359,7 +359,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, (Points2.Length() == 0 && Params.Length() == 0) ) ) { #ifdef DEB - cout << "BRepFill_TrimEdgeTool: incoherent intersection. On essaie avec une tol plus grande" << endl; + cout << "BRepFill_TrimEdgeTool: incoherent intersection. Try with a greater tolerance" << endl; #endif Params.Clear(); @@ -421,10 +421,10 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, } } - // petite manip destinee a eliminer les intersections incoherentes: - // on ne renvoie que les intersections communes ( meme parametre sur - // la bissectrice.). - // La tolerance pourra eventuellement etre reglee. + // small manipulation to remove incorrect intersections: + // return only common intersections (same parameter + // on the bissectrice.). + // The tolerance can be eventually changed. gp_Pnt P1,P2; Standard_Real Tol = 4 * 100 * Precision::PConfusion(); @@ -449,11 +449,11 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, if ( P1xP2x > Tol ) { #ifdef DEB - cout << "BRepFill_TrimEdgeTool: Pas le meme parametre sur la bissectrice" << endl; + cout << "BRepFill_TrimEdgeTool: no same parameter on the bissectrice" << endl; #endif if(P1xP2x>TolInit) { #ifdef DEB - cout << "BRepFill_TrimEdgeTool: On continue quand meme" << endl; + cout << "BRepFill_TrimEdgeTool: Continue somehow" << endl; #endif i++; } @@ -482,9 +482,9 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, //======================================================================= //function : AddOrConfuse -//purpose : le premier ou le dernier point de la bissectrice est sur la -// parallele si on ne l a pas trouve dans les intersections on -// le projette sur les paralleles et on l ajoute dans les params +//purpose : the first or the last point of the bissectrice is on the +// parallel if it was not found in the intersections, +// it is projected on parallel lines and added in the parameters //======================================================================= void BRepFill_TrimEdgeTool::AddOrConfuse(const Standard_Boolean Start, @@ -497,7 +497,7 @@ const gp_Pnt2d PBis; Standard_Real Tol = 10*Precision::Confusion(); - // recuperer les courbes associees aux edges. + // return curves associated to edges. TopLoc_Location L; Standard_Real f,l; Handle(Geom_Surface) Surf; @@ -510,7 +510,7 @@ const if (Start) PBis = myBis.Value(myBis.FirstParameter()); else PBis = myBis.Value(myBis.LastParameter ()); - // Test si le bout de la bissectrice est dans l ensemble des points d intersection. + // Test if the end of the bissectrice is in the set of intersection points. if (!Params.IsEmpty()) { gp_Pnt2d P; if (Start) P = AC1.Value(Params.First().Y()); @@ -520,10 +520,10 @@ const if (ToProj) { #ifdef DEB - cout << " projection extremite bissectrice sur parallele."<Transform(L.Transformation()); - // projection de ces courbes 3d dans le plan xOy + // projection of 3d curves in the plane xOy Handle(Geom2d_Curve) C2d = GeomProjLib::Curve2d(CT,Plane); Geom2dAdaptor_Curve AC(C2d); @@ -268,7 +268,7 @@ static void EvalParameters(const TopoDS_Edge& Edge, if (NbSegments > 0) { #ifdef DEB cout << " IntersectWith : " << NbSegments - << " Segments d`intersection" << endl; + << " Segments of intersection" << endl; #endif IntRes2d_IntersectionSegment Seg; for ( Standard_Integer i = 1; i <= NbSegments; i++) { @@ -283,7 +283,7 @@ static void EvalParameters(const TopoDS_Edge& Edge, Seq.Append(P); } } - // Ordonne la sequence en param croissant sur la bissectrice. + // Order the sequence by increasing parameter on the bissectrice. Bubble( Seq); // modified by NIZHNY-EAP Fri Dec 24 18:47:24 1999 ___BEGIN___ @@ -301,8 +301,8 @@ static void EvalParameters(const TopoDS_Edge& Edge, // modified by NIZHNY-EAP Fri Dec 24 18:47:28 1999 ___END___ } else { - // l`edge est degenere : on recupere le point et on cherche s`il est sur - // la bissectrice. + // the edge is degenerated : the point and it is found if it is + // on the bissectrice. gp_Pnt P3d = BRep_Tool::Pnt( TopExp::FirstVertex(Edge)); gp_Pnt2d P2d( P3d.X(), P3d.Y()); @@ -325,7 +325,7 @@ static void EvalParameters(const TopoDS_Edge& Edge, if ( PBis.Distance(P2d) > Tol) return; } - // eval parametre intersection. + // evaluate parameter intersection. Handle(Geom_Surface) GS = BRep_Tool::Surface(Face); GeomAdaptor_Surface GAS(GS); @@ -338,8 +338,8 @@ static void EvalParameters(const TopoDS_Edge& Edge, Axis = GAS.Sphere().Position(); break; case GeomAbs_Cone: { //---------------------------------------------------------- - // si myFace1 n est pas du meme cote de l apex que le point - // de parametre 0 0 sur le cone => phase = PI. + // if myFace1 is not at the same side of the apex as the point + // of parameter 0 0 on the cone => phase = PI. //---------------------------------------------------------- Axis = GAS.Cone().Position(); Phase = EvalPhase(Edge,Face,GAS,Axis); @@ -351,8 +351,8 @@ static void EvalParameters(const TopoDS_Edge& Edge, Axis = GAS.Cylinder().Position(); break; case GeomAbs_SurfaceOfRevolution: { //---------------------------------------------------------- - // si myFace1 n est pas du meme cote de l apex que le point - // de parametre 0 0 sur le cone => phase = PI. + // if myFace1 is not at the same side of the apex as the point + // of parameter 0 0 on the cone => phase = PI. //---------------------------------------------------------- Handle(Geom_SurfaceOfRevolution) GSRev = Handle(Geom_SurfaceOfRevolution)::DownCast(GS); @@ -455,11 +455,11 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point, Handle(Geom_TrimmedCurve) CT = new Geom_TrimmedCurve(C1,f,l); CT->Transform(L.Transformation()); - // projection de ces courbes 3d dans le plan xOy + // projection of curves 3d in the plane xOy Handle(Geom_Plane) Plane = new Geom_Plane(0,0,1,0); Handle(Geom2d_Curve) C2d = GeomProjLib::Curve2d(CT,Plane); - // eval the projection of the point on the curve. + // evaluate the projection of the point on the curve. Geom2dAPI_ProjectPointOnCurve Projector(Point, C2d); #ifdef DEB Standard_Real Dist = @@ -468,7 +468,7 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point, #ifdef DEB if ( Dist > Precision::Confusion() ) { cout << " *** WARNING TrimSurfaceTool: *** " << endl; - cout << " --> le point n'est pas sur l'edge" < the point is not on the edge" < Curve du contour IndC. + // Construction Links BasicElt => Curve of contour IndC. //----------------------------------------------------- LinkToContour(Explo,IndC,BiLo,LinkBECont); //--------------------------------------------------------------- - // Iteration sur les BasicElts. L indice associe est le meme pour - // les courbes du contour et les edges. . + // Iteration on BasicElts. The associated index is the same for + // the curves of the contour and the edges. . //--------------------------------------------------------------- for (Ite.Initialize(LinkBECont); Ite.More(); Ite.Next()) { BE = BiLo.Graph()->BasicElt(Ite.Key()); @@ -210,8 +210,8 @@ void BRepMAT2d_LinkTopoBilo::LinkToWire(const TopoDS_Wire& W, //======================================================================= //function : LinkToContour -//purpose : Association a chaque basicElt de la courbe du contour initial -// dont il provient. +//purpose : Association to each basicElt of the curre of the initial +// contour from which it comes. //======================================================================= void LinkToContour (const BRepMAT2d_Explorer& Explo, @@ -227,14 +227,14 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo, Standard_Integer NbSect,ISect; //--------------------------------------------------- - // NbSect : nombre de sections sur la courbe courrant. - // ISect : Compteur sur les sections. + // NbSect : number of sections on the current curve. + // ISect : Counter on sections. //--------------------------------------------------- const TColGeom2d_SequenceOfCurve& Cont = Explo.Contour(IndC); //------------------------------------------------------------------ - //Initialisation de l explorateur sur la premiere courbe du contour. + //Initialization of the explorer on the first curve of the contour. //------------------------------------------------------------------ Standard_Integer IndOnCont = 1; Standard_Integer PrecIndOnCont = -1; @@ -242,8 +242,8 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo, ISect = 0; //------------------------------------------------------------------ - // Parcours des elements de base associes au contour IndC. - // Rq : les elements de base sont ordonnes. + // Parsing of base elements associated to contour IndC. + // Rq : the base elements are ordered. //------------------------------------------------------------------ for (Standard_Integer i = 1; i <= BiLo.NumberOfElts(IndC); i++) { @@ -253,9 +253,9 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo, if (Type != STANDARD_TYPE(Geom2d_CartesianPoint)) { ISect++; - //-------------------------------------------------------------------- - // l element de base est une courbe on lui associe la courbe courante. - //-------------------------------------------------------------------- + //---------------------------------------------------------------- + // The base element is a curve associated with the current curve. + //---------------------------------------------------------------- if (DirectSense) { Link.Bind(BE->Index(), IndOnCont); } @@ -264,9 +264,9 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo, } } else { - //-------------------------------------------------------------------- - // l element de base est un point on lui associe la courbe precedente - //-------------------------------------------------------------------- + //----------------------------------------------------------------- + // The base element is a point associated with the previous curve. + //----------------------------------------------------------------- if (DirectSense || LastPoint) { Link.Bind(BE->Index(), PrecIndOnCont); } @@ -277,8 +277,8 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo, PrecIndOnCont = IndOnCont; //---------------------------------------------------------------------- - // Passage a la courbe suivante dans Explo, lorsqu on a parcouru toutes - // les portions de courbes correspondante a la courbe initiale. + // Passage to the next curve in Explo, when all parts + // of curves corresponding to the initial curve have been parsed. //--------------------------------------------------------------------- if (Type != STANDARD_TYPE(Geom2d_CartesianPoint) && ISect == NbSect) { if (IndOnCont < Cont.Length() && DirectSense) { @@ -288,7 +288,7 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo, } else { //----------------------------------------------------- - // Pour les lignes ouvertes on repart dans l autre sens. + // For open lines restart in the other direction. //----------------------------------------------------- if (!DirectSense) { IndOnCont--; diff --git a/src/BRepMesh/BRepMesh_FastDiscretFace.cxx b/src/BRepMesh/BRepMesh_FastDiscretFace.cxx index befdaba948..27bf026d70 100755 --- a/src/BRepMesh/BRepMesh_FastDiscretFace.cxx +++ b/src/BRepMesh/BRepMesh_FastDiscretFace.cxx @@ -540,7 +540,7 @@ static void filterParameters(const TColStd_IndexedMapOfReal& theParams, TCollection_CompareOfReal aCompare; SortTools_ShellSortOfReal::Sort(aParamArray, aCompare); - // mandadory pre filtering using the first (minimal) filter value + // mandadory pre-filtering using the first (minimal) filter value Standard_Real aP1, aP2; aP1 = aParamArray(1); aParamTmp.Append(aP1); @@ -625,7 +625,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac gp_Pnt2d p2d; gp_Pnt p3d; - // travail suivant le type de surface + // work following the type of surface const BRepAdaptor_Surface& BS = *(BRepAdaptor_Surface*)&(theCaro->Surface()); GeomAbs_SurfaceType thetype = theCaro->GetType(); @@ -792,12 +792,11 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac if (R < r) { - // comme on recupere les points des edges. - // dans ce cas, les points ne sont pas representatifs. + // As the points of edges are returned. + // in this case, the points are not representative. - //-- On choisit DeltaX et DeltaY de facon a ce qu on ne saute pas - //-- de points sur la grille - for (i = 0; i <= nbU; i++) ParamU.Append(umin + i* Du); + //-- Choose DeltaX and DeltaY so that to avoid skipping points on the grid + for (i = 0; i <= nbU; i++) ParamU.Append(umin + i* Du); }//R r { @@ -808,7 +807,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac TColStd_Array1OfReal Up(1,LenU); for (j = 1; j <= LenU; j++) Up(j) = myUParam(j); - // Calculate DU, sort array of parameters + // Calculate DU, leave array of parameters Standard_Real aDU = FUN_CalcAverageDUV(Up,LenU); aDU = Max(aDU, Abs(umax - umin) / (Standard_Real) nbU / 2.); Standard_Real dUstd = Abs(umax - umin) / (Standard_Real) LenU; @@ -1071,7 +1070,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac } } - // recuperation du tableau de parametres V: + // return table of parameters V: Standard_Integer NV = tabGU[imax].NbPoints(); for (i = 1; i <= NV; i++) { ParamV.Append(tabGU[imax].Parameter(i)); @@ -1094,7 +1093,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac } } - // recuperation du tableau de parametres U: + // return table of parameters U: Standard_Integer NU = tabGV[imax].NbPoints(); for (i = 1; i <= NU; i++) { ParamU.Append(tabGV[imax].Parameter(i)); @@ -1597,7 +1596,7 @@ void BRepMesh_FastDiscretFace::AddInShape(const TopoDS_Face& theFace, T->Deflection(theDefFace); - // stockage de la triangulation dans la BRep. + // storage of triangulation in BRep. BRep_Builder B1; //TopLoc_Location loc = theFace.Location(); if (!loc.IsIdentity()) { @@ -1608,7 +1607,7 @@ void BRepMesh_FastDiscretFace::AddInShape(const TopoDS_Face& theFace, } B1.UpdateFace(theFace, T); - // mise en place des polygones sur triangulation dans la face: + // implement polygons on triangulation in the face: BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon It(myInternaledges); for (; It.More(); It.Next()) { @@ -1754,7 +1753,7 @@ static Standard_Boolean GetVertexParameters(const TopoDS_Vertex& theVert, L = L.Predivided(theVert.Location()); BRep_ListIteratorOfListOfPointRepresentation itpr = ((*((Handle(BRep_TVertex)*) &theVert.TShape()))->Points()); - // On regarde dabord si il y des PointRepresentation (cas non Manifold) + // Check first if there are PointRepresentation (case non Manifold) while (itpr.More()) { if (itpr.Value()->IsPointOnSurface(S,L)) { @@ -1769,7 +1768,7 @@ static Standard_Boolean GetVertexParameters(const TopoDS_Vertex& theVert, //======================================================================= //function : Add -//purpose : method intended to addition internal myVertices in triangulation. +//purpose : method intended to add internal myVertices in triangulation. //======================================================================= void BRepMesh_FastDiscretFace::Add(const TopoDS_Vertex& theVert, const TopoDS_Face& theFace, diff --git a/src/BRepOffset/BRepOffset_Analyse.cxx b/src/BRepOffset/BRepOffset_Analyse.cxx index fe88c0ad67..d340587040 100755 --- a/src/BRepOffset/BRepOffset_Analyse.cxx +++ b/src/BRepOffset/BRepOffset_Analyse.cxx @@ -85,7 +85,7 @@ static void EdgeAnalyse(const TopoDS_Edge& E, f = C.FirstParameter(); l = C.LastParameter(); - // Tangent si la regularite estaum moins G1. + // Tangent if the regularity is at least G1. if (BRep_Tool::HasContinuity(E,F1,F2)) { if (BRep_Tool::Continuity(E,F1,F2) > GeomAbs_C0) { BRepOffset_Interval I; @@ -95,9 +95,9 @@ static void EdgeAnalyse(const TopoDS_Edge& E, return; } } - // Premiere etape : Type determine par un des bout. - // Calcul des normales et tangentes sur les courbes et surface. - // normales sont dirigees vers l exterieur. + // First stage : Type determined by one of ends. + // Calculate normals and tangents on the curves and surface. + // normals are oriented outwards. Standard_Real ParOnC = 0.5*(f+l); gp_Vec T1 = C.DN(ParOnC,1).Transformed(L.Transformation()); @@ -133,15 +133,15 @@ static void EdgeAnalyse(const TopoDS_Edge& E, I.First(f); I.Last(l); if (Abs(NormProVec) < SinTol) { - // plat + // plane if (DN1.Dot(DN2) > 0) { //Tangent I.Type(BRepOffset_Tangent); } else { - //Confondu pas fini! + //Mixed not finished! #ifdef DEB - cout <<" face localement confondues"< 0.) { - //Saillant + // I.Type(BRepOffset_Convex); } else { - //rentrant + //reenters I.Type(BRepOffset_Concave); } } @@ -174,7 +174,7 @@ static void BuildAncestors (const TopoDS_Shape& S, TopExp::MapShapesAndAncestors(S,TopAbs_VERTEX,TopAbs_EDGE,MA); TopExp::MapShapesAndAncestors(S,TopAbs_EDGE ,TopAbs_FACE,MA); - // Purge des ancetres. + // Purge ancestors. TopTools_MapOfShape Map; for (Standard_Integer i = 1; i <= MA.Extent(); i++) { Map.Clear(); @@ -420,8 +420,8 @@ void BRepOffset_Analyse::Explode( TopTools_ListOfShape& List, TopoDS_Compound Co; B.MakeCompound(Co); B.Add(Co,Face); - // on ajoute a Co toutes les faces constituant la nappe de faces - // G1 creee a partir de + // add to Co all faces from the cloud of faces + // G1 created from AddFaces(Face,Co,Map,T); List.Append(Co); } @@ -448,8 +448,8 @@ void BRepOffset_Analyse::Explode( TopTools_ListOfShape& List, TopoDS_Compound Co; B.MakeCompound(Co); B.Add(Co,Face); - // on ajoute a Co toutes les faces constituant la nappe de faces - // G1 creee a partir de + // add to Co all faces from the cloud of faces + // G1 created from AddFaces(Face,Co,Map,T1,T2); List.Append(Co); } @@ -473,7 +473,7 @@ void BRepOffset_Analyse::AddFaces (const TopoDS_Face& Face, const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); const BRepOffset_ListOfInterval& LI = Type(E); if (!LI.IsEmpty() && LI.First().Type() == T) { - // alors ca y est est raccordee G1 a + // so is attached to G1 by const TopTools_ListOfShape& L = Ancestors(E); if (L.Extent() == 2) { TopoDS_Face F1 = TopoDS::Face(L.First()); @@ -505,7 +505,7 @@ void BRepOffset_Analyse::AddFaces (const TopoDS_Face& Face, const BRepOffset_ListOfInterval& LI = Type(E); if (!LI.IsEmpty() && (LI.First().Type() == T1 || LI.First().Type() == T2)) { - // alors ca y est est raccordee G1 a + // so is attached to G1 by const TopTools_ListOfShape& L = Ancestors(E); if (L.Extent() == 2) { TopoDS_Face F1 = TopoDS::Face(L.First()); diff --git a/src/BRepOffset/BRepOffset_Inter2d.cxx b/src/BRepOffset/BRepOffset_Inter2d.cxx index 5920c69028..e38a524ce6 100755 --- a/src/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/BRepOffset/BRepOffset_Inter2d.cxx @@ -122,10 +122,9 @@ static void Store (const TopoDS_Edge& E1, Standard_Real Tol) { //------------------------------------------------------------- - // Test si les points d intersection correspondent a des vertex - // existants.Sinon ajout dans les descendants des edges. - // Remarque a ce stade seulement les vertex d intersection sont - // dans les descendants. + // Test if the points of intersection correspond to existing + // vertices. Otherwise add edges in the descendants. + // Note: at this stage only vertices of intersection are in the descendants. //------------------------------------------------------------- const TopTools_ListOfShape& VOnE1 = AsDes->Descendant(E1); const TopTools_ListOfShape& VOnE2 = AsDes->Descendant(E2); @@ -154,7 +153,7 @@ static void Store (const TopoDS_Edge& E1, if (!VOnE1.IsEmpty()) { //----------------------------------------------------------------- - // Recherche si le point d intersection correspond a un vertex de E1. + // Find if the point of intersection corresponds to a vertex of E1. //----------------------------------------------------------------- for (it.Initialize(VOnE1); it.More(); it.Next()) { P1 = BRep_Tool::Pnt(TopoDS::Vertex(it.Value())); @@ -169,7 +168,7 @@ static void Store (const TopoDS_Edge& E1, if (!VOnE2.IsEmpty()) { if (OnE1) { //----------------------------------------------------------------- - // Recherche si le vertex trouve sur E1 n est pas deja sur E2. + // Find if the vertex found on E1 is not already on E2. //----------------------------------------------------------------- for (it.Initialize(VOnE2); it.More(); it.Next()) { if (it.Value().IsSame(V)) { @@ -181,7 +180,7 @@ static void Store (const TopoDS_Edge& E1, } for (it.Initialize(VOnE2); it.More(); it.Next()) { //----------------------------------------------------------------- - // Recherche si le point d intersection correspond a un vertex de E2. + // Find if the point of intersection corresponds to a vertex of E2. //----------------------------------------------------------------- P2 = BRep_Tool::Pnt(TopoDS::Vertex(it.Value())); if (P.IsEqual(P2,Tol)) { @@ -195,9 +194,9 @@ static void Store (const TopoDS_Edge& E1, if (OnE1 && OnE2) { if (!V1.IsSame(V2)) { //--------------------------------------------------------------- - // Les deux vertex sont en fait les memes. - // on va remplacer V2 par V1. - // mis a jour des parametres des vertex sur les edges. + // Two vertices are actually the same. + // V2 will be replaced by V1. + // update the parameters of vertex on edges. //--------------------------------------------------------------- Standard_Real UV2; TopoDS_Edge EWE2; @@ -280,7 +279,7 @@ static void EdgeInter(const TopoDS_Face& F, Standard_Real f[3],l[3]; Standard_Real MilTol2 = 1000*Tol*Tol; - Standard_Real TolDub = 1.e-7; // Faire un calcul plus malin !!! NYI + Standard_Real TolDub = 1.e-7; Standard_Integer i; BRep_Tool::Range(E1, f[1], l[1]); @@ -373,17 +372,17 @@ static void EdgeInter(const TopoDS_Face& F, #ifdef DEB if (aT1 < f[1]-Tol || aT1 > l[1]+Tol) { - cout << "hors borne"< l[1]+Tol) { - cout << "hors borne"< 1) { @@ -931,8 +930,8 @@ static void ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge& NE, const Standard_Real BRep_Tool::Range(E, anEf, anEl); NE = TopoDS::Edge(aLocalShape); // NE = TopoDS::Edge(E.EmptyCopied()); - // Suffit pour les edges analytiques, pour le cas general reconstruire la - // la geometrie de l edge en recalculant l intersection des surfaces. + // Enough for analytic edges, for general case reconstruct the + // geometry of the edge recalculating the intersection of surfaces. //BRepLib::BuildCurve3d(E); @@ -1412,14 +1411,14 @@ void BRepOffset_Inter2d::Compute (const Handle(BRepAlgo_AsDes)& AsDes, EdgesOfFace.Add( Explo.Current() ); //----------------------------------------------------------- - // calcul des intersections2d sur les faces touchees par les + // calculate intersections2d on faces touched by // intersection3d //--------------------------------------------------------- TopTools_ListIteratorOfListOfShape it1LE ; TopTools_ListIteratorOfListOfShape it2LE ; //----------------------------------------------- - // Intersection des edges 2 a 2. + // Intersection of edges 2*2. //----------------------------------------------- const TopTools_ListOfShape& LE = AsDes->Descendant(F); TopoDS_Vertex V1,V2; @@ -1433,8 +1432,8 @@ void BRepOffset_Inter2d::Compute (const Handle(BRepAlgo_AsDes)& AsDes, while (j < i && it2LE.More()) { const TopoDS_Edge& E2 = TopoDS::Edge(it2LE.Value()); //-------------------------------------------------------------- - // Intersectionns des Nouvelles edges obtenues par intersection - // entre elles et avec les edges de restictions + // Intersections of New edges obtained by intersection + // between them and with edges of restrictions //------------------------------------------------------ if ( (!EdgesOfFace.Contains(E1) || !EdgesOfFace.Contains(E2)) && (NewEdges.Contains(E1) || NewEdges.Contains(E2)) ) { @@ -1471,7 +1470,7 @@ void BRepOffset_Inter2d::ConnexIntByInt BRepOffset_Tool::MapVertexEdges(FI,MVE); //--------------------- - // Extension des edges. + // Extension of edges. //--------------------- TopoDS_Edge NE; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape it(MVE); @@ -1538,7 +1537,7 @@ void BRepOffset_Inter2d::ConnexIntByInt // TopoDS_Edge CEO = TopoDS::Edge(OFI.Generated(CurE)); // TopoDS_Edge NEO = TopoDS::Edge(OFI.Generated(NextE)); //------------------------------------------ - //traitement Inter des images de CurE NextE. + // Inter processing of images of CurE NextE. //------------------------------------------ TopTools_ListOfShape LV1,LV2; Standard_Boolean DoInter = 1; diff --git a/src/BRepOffset/BRepOffset_Inter3d.cxx b/src/BRepOffset/BRepOffset_Inter3d.cxx index 3611ecab90..e4a2fcbbba 100755 --- a/src/BRepOffset/BRepOffset_Inter3d.cxx +++ b/src/BRepOffset/BRepOffset_Inter3d.cxx @@ -60,8 +60,8 @@ static void ExtentEdge(const TopoDS_Face& F, // NE = TopoDS::Edge(E.EmptyCopied()); - // Suffit pour les edges analytiques, pour le cas general reconstruire la - // la geometrie de l edge en recalculant l intersection des surfaces. + // Enough for analytic edges, in general case reconstruct the + // geometry of the edge recalculating the intersection of surfaces. NE.Orientation(TopAbs_FORWARD); Standard_Real f,l; @@ -92,7 +92,7 @@ static void SelectEdge (const TopoDS_Face& F, TopTools_ListOfShape& LInt) { //------------------------------------------------------------ - // detrompeur sur les intersections sur les faces periodiques + // Proofing on the intersections on periodical faces //------------------------------------------------------------ TopTools_ListIteratorOfListOfShape it(LInt); // Modified by Sergey KHROMOV - Wed Jun 5 11:43:04 2002 Begin @@ -112,7 +112,7 @@ static void SelectEdge (const TopoDS_Face& F, Extrema_ExtPC anExt; // Modified by Sergey KHROMOV - Wed Jun 5 11:23:11 2002 End //---------------------------------------------------------------------- - // Selection de l edge qui couvre le plus le domaine de l edge initiale. + // Selection of edge that coversmost of the domain of the initial edge. //---------------------------------------------------------------------- for (; it.More(); it.Next()) { const TopoDS_Edge& EI = TopoDS::Edge(it.Value()); @@ -198,14 +198,14 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces, const BRepAlgo_Image& InitOffsetFace) { //--------------------------------------------------------------- - // Calcul des intersections des offsetfaces entre elles - // Distinction des intersection entre faces // tangentes. + // Calculate the intersections of offset faces + // Distinction of intersection between faces // tangents. //--------------------------------------------------------------- TopoDS_Face F1,F2; TopTools_ListIteratorOfListOfShape it; //--------------------------------------------------------------- - // Construction des boites englobantes. + // Construction of bounding boxes //--------------------------------------------------------------- TopOpeBRepTool_BoxSort BOS; BRep_Builder B; @@ -219,7 +219,7 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces, BOS.AddBoxesMakeCOB(CompOS,TopAbs_FACE); //--------------------------- - // Intersection des faces // + // Intersection of faces // //--------------------------- for (it.Initialize(SetOfFaces); it.More(); it.Next()) { const TopoDS_Face& F1 = TopoDS::Face(it.Value()); @@ -257,13 +257,13 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1, if (BRepOffset_Tool::HasCommonShapes(F1,F2,LE,LV) || myAsDes->HasCommonDescendant(F1,F2,LE)) { //------------------------------------------------- - // F1 et F2 partagent des shapes. + // F1 and F2 share shapes. //------------------------------------------------- if ( LE.IsEmpty() && !LV.IsEmpty()) { if (InterPipes) { - //---------------------------- - // tuyaux partageant un vertex. - //---------------------------- + //---------------------- + // tubes share a vertex. + //---------------------- const TopoDS_Edge& EE1 = TopoDS::Edge(InitF1); const TopoDS_Edge& EE2 = TopoDS::Edge(InitF2); TopoDS_Vertex VE1[2],VE2[2]; @@ -277,16 +277,16 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1, } } } - if (!InitOffsetFace.HasImage(V)) { //pas de sphere + if (!InitOffsetFace.HasImage(V)) { //no sphere BRepOffset_Tool::PipeInter(F1,F2,LInt1,LInt2,mySide); } } else { //-------------------------------------------------------- - // Intersection de faces n ayant que des vertex en communs. - // et dont les supports avaient des edges en commun. - // INSUFFISANT mais critere plus large secoue trop - // les sections et le reste pour l instant. + // Intersection having only common vertices + // and supports having common edges. + // UNSUFFICIENT, but a larger criterion shakes too + // many sections. //-------------------------------------------------------- if (InterFaces && BRepOffset_Tool::HasCommonShapes(TopoDS::Face(InitF1), @@ -326,16 +326,15 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces, TopoDS_Edge NullEdge; //--------------------------------------------------------------------- - // etape 1 : Intersections des face // correspondant a des faces - // initiales separees par une edge concave si offset > 0, - // convexe sinon. + // etape 1 : Intersection of faces // corresponding to the initial faces + // separated by a concave edge if offset > 0, otherwise convex. //--------------------------------------------------------------------- for (; Exp.More(); Exp.Next()) { const TopoDS_Edge& E = TopoDS::Edge(Exp.Current()); const BRepOffset_ListOfInterval& L = Analyse.Type(E); if (!L.IsEmpty() && L.First().Type() == OT) { //----------------------------------------------------------- - // l edge est du bon type , recuperation des faces adjacentes. + // edge is of the proper type , return adjacent faces. //----------------------------------------------------------- const TopTools_ListOfShape& Anc = Analyse.Ancestors(E); if (Anc.Extent() == 2) { @@ -349,11 +348,9 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces, } } //--------------------------------------------------------------------- - // etape 2 : Intersections des tuyaux partageant un vertex sans - // sphere avec: - // - Soit les tuyaux sur chaque autre edge partageant le vertex - // - Soit avec les faces contenant une edge connexe au vertex - // qui n a pas de tuyaux. + // etape 2 : Intersections of tubes sharing a vertex without sphere with: + // - tubes on each other edge sharing the vertex + // - faces containing an edge connected to vertex that has no tubes. //--------------------------------------------------------------------- TopoDS_Vertex V[2]; TopTools_ListIteratorOfListOfShape it; @@ -362,7 +359,7 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces, const TopoDS_Edge& E1 = TopoDS::Edge(Exp.Current()); if (InitOffsetFace.HasImage(E1)) { //--------------------------- - // E1 a genere un tuyau. + // E1 generated a tube. //--------------------------- F1 = TopoDS::Face(InitOffsetFace.Image(E1).First());; TopExp::Vertices(E1,V[0],V[1]); @@ -371,7 +368,7 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces, for (Standard_Integer i = 0; i < 2; i++) { if (!InitOffsetFace.HasImage(V[i])) { //----------------------------- - // le vertex n a pas de sphere. + // the vertex has no sphere. //----------------------------- const TopTools_ListOfShape& Anc = Analyse.Ancestors(V[i]); TopTools_ListOfShape TangOnV; @@ -399,12 +396,12 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces, // Modified by skv - Fri Jan 16 16:27:54 2004 OCC4455 End if (InitOffsetFace.HasImage(E2)) { //----------------------------- - // E2 a genere un tuyau. + // E2 generated a tube. //----------------------------- F2 = TopoDS::Face(InitOffsetFace.Image(E2).First()); if (!IsDone(F1,F2)) { //--------------------------------------------------------------------- - // Intersection tuyau/tuyau si les edges ne sont pas tangentes (AFINIR). + // Intersection tube/tube if the edges are not tangent (AFINIR). //---------------------------------------------------------------------- BRepOffset_Tool::PipeInter (F1,F2,LInt1,LInt2,mySide); Store (F1,F2,LInt1,LInt2); @@ -412,9 +409,9 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces, } else { //------------------------------------------------------- - // Intersection du tuyau de E1 avec les faces // - // aux face contenant E2 si elles ne sont pas tangentes - // au tuyau. ou si E2 n est pas une edge tangente. + // Intersection of the tube of E1 with faces // + // to face containing E2 if they are not tangent + // to the tube or if E2 is not a tangent edge. //------------------------------------------------------- const BRepOffset_ListOfInterval& L = Analyse.Type(E2); if (!L.IsEmpty() && L.First().Type() == BRepOffset_Tangent) { @@ -485,7 +482,7 @@ void BRepOffset_Inter3d::ConnexIntByInt if (OT == BRepOffset_Concave) CurSide = TopAbs_IN; else CurSide = TopAbs_OUT; //----------------------------------------------------------- - // l edge est du bon type , recuperation des faces adjacentes. + // edge is of the proper type, return adjacent faces. //----------------------------------------------------------- const TopTools_ListOfShape& Anc = Analyse.Ancestors(E); if (Anc.Extent() != 2) continue; @@ -517,7 +514,7 @@ void BRepOffset_Inter3d::ConnexIntByInt BRepOffset_Tool::Inter3D (NF1,NF2,LInt1,LInt2,CurSide,E,Standard_True); if (LInt1.Extent() > 1) { - // l intersection est en plusieurs edges (franchissement de couture) + // intersection is in seceral edges (free sewing) SelectEdge( NF1, NF2, E, LInt1 ); SelectEdge( NF1, NF2, E, LInt2 ); } @@ -610,8 +607,8 @@ void BRepOffset_Inter3d::ContextIntByInt const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); if (!Analyse.HasAncestor(E)) { //---------------------------------------------------------------- - // Les edges des faces de contexte qui ne sont pas dans le shape - // initiales peuvent apparaitre dans le resultat. + // the edges of faces of context that are not in the initial shape + // can appear in the result. //---------------------------------------------------------------- if (!ExtentContext) { myAsDes->Add(CF,E); @@ -753,14 +750,14 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces continue; } OE.Nullify(); - //---------------------------------------------- - // OF1 face parallele genere par l ancetre de E. - //---------------------------------------------- + //--------------------------------------------------- + // OF1 parallel facee generated by the ancestor of E. + //--------------------------------------------------- const TopoDS_Shape SI = Analyse.Ancestors(E).First(); OF1 = TopoDS::Face(InitOffsetFace.Image(SI).First()); OE = TopoDS::Edge(InitOffsetEdge.Image(E).First()); //-------------------------------------------------- - // MAJ de OE sur bouchon CF. + // MAJ of OE on cap CF. //-------------------------------------------------- // TopTools_ListOfShape LOE; LOE.Append(OE); // BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide); @@ -777,7 +774,7 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces Store(CF,OF1,LInt1,LInt2); //------------------------------------------------------ - // Traitement des offsets sur les ancetres des vertices. + // Processing of offsets on the ancestors of vertices. //------------------------------------------------------ TopoDS_Vertex V[2]; TopExp::Vertices (E,V[0],V[1]); @@ -790,12 +787,12 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces const TopoDS_Edge& EV = TopoDS::Edge(itLE.Value()); if (InitOffsetFace.HasImage(EV)) { //------------------------------------------------- - // OF1 face parallele genere par une edge ancetre de V[i]. + // OF1 parallel face generated by an ancester edge of V[i]. //------------------------------------------------- OF1 = TopoDS::Face(InitOffsetFace.Image(EV).First()); OE = TopoDS::Edge(InitOffsetEdge.Image(V[i]).First()); //-------------------------------------------------- - // MAj de OE sur bouchon CF. + // MAj of OE on cap CF. //-------------------------------------------------- // LOE.Clear(); LOE.Append(OE); // BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide); @@ -830,13 +827,12 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces for ( ; itLF.More(); itLF.Next()) { const TopoDS_Face& FEV = TopoDS::Face(itLF.Value()); //------------------------------------------------- - // OF1 face parallele genere par uneFace ancetre de V[i]. + // OF1 parallel face generated by uneFace ancestor of V[i]. //------------------------------------------------- OF1 = TopoDS::Face(InitOffsetFace.Image(FEV).First()); if (!IsDone(OF1,CF)) { //------------------------------------------------------- - //Recherche si une des edges de OF1 n a pas de trace dans - // CF. + // Find if one of edges of OF1 has no trace in CF. //------------------------------------------------------- TopTools_ListOfShape LOE; TopExp_Explorer exp2(OF1.Oriented(TopAbs_FORWARD),TopAbs_EDGE); @@ -845,7 +841,7 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces } BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide,myTol); //------------------------------------------------------- - // Si pas de trace essai intersection. + // If no trace try intersection. //------------------------------------------------------- if (LInt1.IsEmpty()) { BRepOffset_Tool::Inter3D (CF,OF1,LInt1,LInt2,mySide,NullEdge); diff --git a/src/BRepOffset/BRepOffset_MakeLoops.cxx b/src/BRepOffset/BRepOffset_MakeLoops.cxx index bdafdc0d97..c4b8892691 100755 --- a/src/BRepOffset/BRepOffset_MakeLoops.cxx +++ b/src/BRepOffset/BRepOffset_MakeLoops.cxx @@ -54,11 +54,11 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF, for (; it.More(); it.Next()) { const TopoDS_Face& F = TopoDS::Face(it.Value()); //--------------------------- - // Initialisation de Loops. + // Initialization of Loops. //--------------------------- Loops.Init(F); //----------------------------- - // recuperation des edges de F. + // return edges of F. //----------------------------- const TopTools_ListOfShape& LE = AsDes->Descendant(F); TopTools_ListOfShape AddedEdges; @@ -67,10 +67,9 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF, TopoDS_Edge E = TopoDS::Edge(itl.Value()); if (Image.HasImage(E)) { //------------------------------------------- - // E a deja ete decoupeee dans une autre face. - // Recuperation des edges decoupees et reorientation - // de ces edges comme E. - // Voir pb pour les edges qui ont disparu? + // E was already cut in another face. + // Return the cut edges reorientate them as E. + // See pb for the edges that have disappeared? //------------------------------------------- const TopTools_ListOfShape& LCE = Image.Image(E); for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) { @@ -84,7 +83,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF, } } //------------------------ - // Debouclage. + // Unwind. //------------------------ Loops.Perform(); Loops.WiresToFaces(); @@ -93,7 +92,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF, //------------------------ const TopTools_ListOfShape& NF = Loops.NewFaces(); //----------------------- - // F => Nouvelles faces; + // F => New faces; //----------------------- Image.Bind(F,NF); @@ -101,7 +100,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF, for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value()); //----------------------- - // E => Nouvelles edges; + // E => New edges; //----------------------- const TopTools_ListOfShape& LoopNE = Loops.NewEdges(E); if (Image.HasImage(E)) { @@ -194,7 +193,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext const Standard_Boolean InSide) { //----------------------------------------- - // debouclage des bouchons. + // unwinding of caps. //----------------------------------------- TopTools_ListIteratorOfListOfShape it(LContext); TopTools_ListIteratorOfListOfShape itl,itLCE; @@ -207,16 +206,16 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext const TopoDS_Face& F = TopoDS::Face(it.Value()); TopTools_MapOfShape MBound; //----------------------------------------------- - // Initialisation de Loops. - // F est reversed elle sera ajoute dans myOffC. - // et myOffC sera reversed dans le resultat final. + // Initialisation of Loops. + // F is reversed it will be added in myOffC. + // and myOffC will be reversed in the final result. //----------------------------------------------- TopoDS_Shape aLocalShape = F.Reversed(); if (InSide) Loops.Init(TopoDS::Face(aLocalShape)); // if (InSide) Loops.Init(TopoDS::Face(F.Reversed())); else Loops.Init(F); //-------------------------------------------------------- - // recuperation des edges de F non modifie par definition. + // return edges of F not modified by definition. //-------------------------------------------------------- for (exp.Init(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE); exp.More(); @@ -224,7 +223,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext TopoDS_Edge CE = TopoDS::Edge(exp.Current()); MBound.Add(CE); if (Analyse.HasAncestor(CE)) { - // les arretes des bouchons sauf les arretes de conexite entre bouchons. + // the stop of cups except for the connectivity stops between caps. // if (!AsDes->HasAscendant(CE)) { aLocalShape = CE.Reversed(); if (InSide) Loops.AddConstEdge(CE); @@ -233,7 +232,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext } } //------------------------------------------------------ - // Trace des offsets + edge de connexite entre bouchons. + // Trace of offsets + connectivity edge between caps. //------------------------------------------------------ const TopTools_ListOfShape& LE = AsDes->Descendant(F); TopTools_ListOfShape AddedEdges; @@ -242,10 +241,9 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext TopoDS_Edge E = TopoDS::Edge(itl.Value()); if (Image.HasImage(E)) { //------------------------------------------- - // E a deja ete decoupeee dans une autre face. - // Recuperation des edges decoupees et reorientation - // de ces edges comme E. - // Voir pb pour les edges qui ont disparu? + // E was already cut in another face. + // Return cut edges and orientate them as E. + // See pb for the edges that have disappeared? //------------------------------------------- const TopTools_ListOfShape& LCE = Image.Image(E); for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) { @@ -266,7 +264,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext } else { if (IsBetweenCorks(E,AsDes,LContext) && AsDes->HasDescendant(E)) { - //conexite entre 2 bouchons + //connection between 2 caps MapExtent.Add(E); TopTools_ListOfShape LV; if (InSide) { @@ -297,7 +295,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext } } //------------------------ - // Debouclage. + // Unwind. //------------------------ Loops.Perform(); Loops.WiresToFaces(); @@ -306,7 +304,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext //------------------------ const TopTools_ListOfShape& NF = Loops.NewFaces(); //----------------------- - // F => Nouvelles faces; + // F => New faces; //----------------------- Image.Bind(F,NF); @@ -314,7 +312,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value()); //----------------------- - // E => Nouvelles edges; + // E => New edges; //----------------------- if (Image.HasImage(E)) { Image.Add(E,Loops.NewEdges(E)); @@ -385,7 +383,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, BRep_Builder B; //---------------------------------- - // Boucle sur toutes les faces //. + // Loop on all faces //. //---------------------------------- for (itr.Initialize(LF); itr.More(); itr.Next()) { TopoDS_Face F = TopoDS::Face(itr.Value()); @@ -395,14 +393,13 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, if (!Image.HasImage(F)) { //---------------------------------- - // Face F non deja reconstruite. + // Face F not yet reconstructed. //---------------------------------- const TopTools_ListOfShape& LE = AsDes->Descendant(F); //---------------------------------------------------------------- - // premiere boucle pour determiner si des edges de la face ont ete - // reconstruite. - // - maj de la map MONV. certains vertex sur les edges reconstruites - // coincide geometriquement avec les anciens mais ne sont pas IsSame. + // first loop to find if the edges of the face were reconstructed. + // - maj on map MONV. Some vertices on reconstructed edges + // coincide geometrically with old but are not IsSame. //---------------------------------------------------------------- TopTools_DataMapOfShapeShape MONV; TopoDS_Vertex OV1,OV2,NV1,NV2; @@ -419,7 +416,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, continue; } //---------------------------------- - // F doit etre reconstruite. + // F should be reconstructed. //---------------------------------- ToRebuild = Standard_True; for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) { @@ -436,7 +433,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, } if (ToRebuild) { #ifdef DRAW -//POP pour NT +//POP for NT if ( Affich) { char* name = new char[100]; sprintf(name,"CF_%d",NbF++); @@ -445,9 +442,8 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, #endif //----------------------------------------------------------- - // les edges non reconstruites dans d autre faces sont - // ajoutees .si leurs vertex ont ete reconstruits elles - // seront reconstruites. + // Non-reconstructed edges on other faces are added. + // If their vertices were reconstructed they are reconstructed. //----------------------------------------------------------- for (itl.Initialize(LE); itl.More(); itl.Next()) { Standard_Real f,l; @@ -494,7 +490,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, //------------------------ const TopTools_ListOfShape& NF = Loops.NewFaces(); //----------------------- - // F => Nouvelles faces; + // F => New faces; //----------------------- Image.Bind(F,NF); @@ -502,7 +498,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value()); //----------------------- - // E => Nouvelles edges; + // E => New edges; //----------------------- if (Image.HasImage(E)) { Image.Add(E,Loops.NewEdges(E)); diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index 437ad0a71e..20b2ef7637 100755 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -101,7 +101,7 @@ #include -// POP pour NT +// POP for NT #include #ifdef DRAW @@ -145,7 +145,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges, for (it1LE.Initialize(AsDes->Descendant(NE)); it1LE.More(); it1LE.Next()) { if (AsDes->Ascendant(it1LE.Value()).Extent() < 3) { LVP.Append(it1LE.Value()); - cout <<"Vertex sur moins de 3 edges."<Ascendant(it1LE.Value()).Extent() > 3) { - cout <<"Vertex sur plus de 3 edges."< 0.)? Standard_True : Standard_False; //-------------------------------------------------------- - // Construction des faces paralleles a des faces initiales + // Construction of faces parallel to initial faces //-------------------------------------------------------- TopExp_Explorer Exp; TopTools_ListOfShape LF; @@ -980,20 +980,20 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() Handle(BRepAlgo_AsDes) AsDes = new BRepAlgo_AsDes(); //------------------------------------------------------------------- - // Extension des faces et calcul des nouvelles edges d intersection. + // Extension of faces and calculation of new edges of intersection. //------------------------------------------------------------------- Standard_Boolean ExtentContext = 0; if (myOffset > 0) ExtentContext = 1; BRepOffset_Inter3d Inter3 (AsDes,Side,myTol); - // Intersection entre faces paralleles + // Intersection between parallel faces Inter3.ConnexIntByInt(myShape,MapSF,myAnalyse,MES,Build,Failed ); - // Intersection avec les bouchons. + // Intersection with caps. Inter3.ContextIntByInt(myFaces,ExtentContext,MapSF,myAnalyse,MES,Build,Failed ); //--------------------------------------------------------------------------------- - // Extension des edges voisines des nouvelles edges.et intersection entre les voisins. + // Extension of neighbor edges of new edges and intersection between neighbors. //-------------------------------------------------------------------------------- Handle(BRepAlgo_AsDes) AsDes2d = new BRepAlgo_AsDes(); for (Exp.Init(myShape,TopAbs_FACE) ; Exp.More(); Exp.Next()) { @@ -1004,7 +1004,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() // Modified by skv - Mon Jan 12 11:50:03 2004 OCC4455 End } //----------------------------------------------------------- - // Restriction large des nouvelles edges et mise a jour AsDes. + // Great restriction of new edges and update of AsDes. //------------------------------------------ ---------------- TopTools_MapOfShape NewEdges; TopExp_Explorer Exp2,ExpC; @@ -1030,9 +1030,9 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() } else { //------------------------------------------------------------ - // Les Intersections sont en plusieurs edges. - // Les morceaux sans intersections avec les voisins - // sont supprimes de AsDes. + // The Intersections are on several edges. + // The pieces without intersections with neighbors + // are removed from AsDes. //------------------------------------------------------------ for (ExpC.Init(NE,TopAbs_EDGE); ExpC.More(); ExpC.Next()) { if (NewEdges.Add(ExpC.Current())) { @@ -1065,7 +1065,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() } //--------------------------------- - // Intersection2d sur les // + // Intersection 2D on // //--------------------------------- TopTools_ListOfShape LFE; BRepAlgo_Image IMOE; @@ -1085,7 +1085,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() BRepOffset_Inter2d::Compute(AsDes,NEF,NewEdges,myTol); } //---------------------------------------------- - // Intersections 2d sur les bouchons. + // Intersections 2d on caps. //---------------------------------------------- TopTools_MapIteratorOfMapOfShape itCork(myFaces); for (; itCork.More(); itCork.Next()) { @@ -1094,7 +1094,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() } //------------------------------- - // Debouclage des Faces etendues. + // Unwinding of extended Faces. //------------------------------- myMakeLoops.Build(LFE ,AsDes,IMOE); @@ -1102,7 +1102,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() TopTools_MapOfShape COES; #endif //--------------------------- - // MAJ SD. pour les faces // + // MAJ SD. for faces // //--------------------------- for (Exp.Init(myShape,TopAbs_FACE) ; Exp.More(); Exp.Next()) { const TopoDS_Shape& FI = Exp.Current(); @@ -1288,7 +1288,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() // Modified by skv - Tue Mar 15 16:20:43 2005 //--------------------------- - // MAJ SD. pour les bouchons + // MAJ SD. for caps //--------------------------- TopTools_MapOfShape View; for (itCork.Initialize(myFaces); itCork.More(); itCork.Next()) { @@ -1349,7 +1349,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() { #ifdef DEB if ( ChronBuild) { - cout << " CONSTRUCTION DES OFFSETS :" << endl; + cout << " CONSTRUCTION OF OFFSETS :" << endl; Clock.Reset(); Clock.Start(); } @@ -1359,7 +1359,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() TopTools_MapOfShape Done; Standard_Boolean OffsetOutside = (myOffset > 0.)? Standard_True : Standard_False; //-------------------------------------------------------- - // Construction des faces paralleles a des faces initiales + // Construction of faces parallel to initial faces //-------------------------------------------------------- TopExp_Explorer Exp; TopTools_ListOfShape LF; @@ -1406,7 +1406,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() MapSF.Bind(F,OF); } //-------------------------------------------------------- - // Construction des tuyaux sur arete. + // Construction of tubes on edge. //-------------------------------------------------------- BRepOffset_Type OT = BRepOffset_Convex; if (myOffset < 0.) OT = BRepOffset_Concave; @@ -1463,7 +1463,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() } else { // ---------------------- - // bord libre. + // free border. // ---------------------- TopoDS_Shape aLocalShape = MapSF(Anc.First()).Generated(E); TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShape); @@ -1475,7 +1475,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() } //-------------------------------------------------------- - // Construction des shperes sur vertex. + // Construction of spheres on vertex. //-------------------------------------------------------- Done.Clear(); TopTools_ListIteratorOfListOfShape it; @@ -1490,7 +1490,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() if (LE.Extent() >= 3 && LE.Extent() == LA.Extent()) { TopTools_ListOfShape LOE; //-------------------------------------------------------- - // Recuperation des edges connexes sur les tuyaux. + // Return connected edges on tubes. //-------------------------------------------------------- for (it.Initialize(LE) ; it.More(); it.Next()) { LOE.Append(MapSF(it.Value()).Generated(V).Reversed()); @@ -1508,7 +1508,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() MapSF.Bind(V,OF); } //-------------------------------------------------------------- - // Traitemnet particulier si V est sur au moins un bord libre. + // Particular processing if V is at least a free border. //------------------------------------------------------------- TopTools_ListOfShape LBF; myAnalyse.Edges(V,BRepOffset_FreeBoundary,LBF); @@ -1529,8 +1529,8 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() } //------------------------------------------------------------ - // Extension des faces paralleles jusq au contexte. - // Les faces etendues sont rangees en SD et Supprime de MapSF. + // Extension of parallel faces to the context. + // Extended faces are ordered in DS and removed from MapSF. //------------------------------------------------------------ if (!myFaces.IsEmpty()) ToContext (MapSF); @@ -1549,8 +1549,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() if (SF.Status() == BRepOffset_Reversed || SF.Status() == BRepOffset_Degenerated ) { //------------------------------------------------ - // Les faces degenerees ou retournees ne sont pas - // stockes. + // Degenerated or returned faces are not stored. //------------------------------------------------ continue; } @@ -1558,15 +1557,15 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() const TopoDS_Face& OF = It.Value().Face(); myInitOffsetFace.Bind (SI,OF); myInitOffsetFace.SetRoot (SI); // Initial<-> Offset - myImageOffset.SetRoot (OF); // FaceOffset racine des images + myImageOffset.SetRoot (OF); // FaceOffset root of images if (SI.ShapeType() == TopAbs_FACE) { for (Exp.Init(SI.Oriented(TopAbs_FORWARD),TopAbs_EDGE); Exp.More(); Exp.Next()) { //-------------------------------------------------------------------- - // A chaque face // on associe les edges qui la restreignent - // Les edges qui ne genere pas de tuyaux ou qui ne sont pas tangentes - // a deux faces sont supprimees. + // To each face are associatedthe edges that restrict that + // The edges that do not generate tubes or are not tangent + // to two faces are removed. //-------------------------------------------------------------------- const TopoDS_Edge& E = TopoDS::Edge(Exp.Current()); const BRepOffset_ListOfInterval& L = myAnalyse.Type(E); @@ -1643,15 +1642,15 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF) const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); if (!myAnalyse.HasAncestor(E)) { //---------------------------------------------------------------- - // Les edges des faces de contexte qui ne sont pas dans le shape - // initiales peuvent apparaitre dans le resultat. + // The edges of context faces that are not in the initial shape + // can appear in the result. //---------------------------------------------------------------- //myAsDes->Add(CF,E); } } } - //-------------------------------------------------------- - // Determination des edges et des faces a reconstruire par + //------------------------------------------------------- + // Determine the edges and faces reconstructed by // intersection. //--------------------------------------------------------- for ( it.Initialize(myFaces); it.More(); it.Next()) { @@ -1683,7 +1682,7 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF) } } //--------------------------- - // Reconstruction des faces. + // Reconstruction of faces. //--------------------------- TopoDS_Face F,NF; BRepOffset_Type RT = BRepOffset_Concave; @@ -1731,7 +1730,7 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF) } else { //------------------ - // Tuyau + // Tube //--------------------- for (exp.Init(NF.Oriented(TopAbs_FORWARD),TopAbs_EDGE); exp.More(); exp.Next()) { @@ -1741,9 +1740,9 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF) MapSF.UnBind(S); } - //---------------- - // MAJ bords libre - //---------------- + //------------------ + // MAJ free borders + //------------------ TopTools_DataMapIteratorOfDataMapOfShapeShape itc; for (itc.Initialize(Created); itc.More(); itc.Next()) { OE = itc.Key(); @@ -1838,7 +1837,7 @@ void BRepOffset_MakeOffset::CorrectConicalFaces() //Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &anEdge.TShape()); if (BRep_Tool::Degenerated(anEdge)) { - //Check wether anEdge is a really degenerated edge or not + //Check if anEdge is a really degenerated edge or not BRepAdaptor_Curve BACurve(anEdge, aFace); gp_Pnt Pfirst, Plast, Pmid; Pfirst = BACurve.Value(BACurve.FirstParameter()); @@ -2550,20 +2549,20 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter) Clock.Start(); } #endif - TopTools_ListOfShape OffsetFaces; // liste des faces // crees. + TopTools_ListOfShape OffsetFaces; // list of faces // created. MakeList (OffsetFaces,myInitOffsetFace,myFaces); if (!myFaces.IsEmpty()) { - Standard_Boolean InSide = (myOffset < 0.); // PROVISOIRE - // il faut calculer Inside en tenant compte de la concavite ou convexite des arretes - // entre le bouchon et la piece. + Standard_Boolean InSide = (myOffset < 0.); // Temporary + // it is necessary to calculate Inside taking account of the concavity or convexity of edges + // between the cap and the part. if (myJoin == GeomAbs_Arc) Inter.ContextIntByArc (myFaces,InSide,myAnalyse,myInitOffsetFace,myInitOffsetEdge); } if (myInter) { //------------- - //Complet. + //Complete. //------------- Inter.CompletInt (OffsetFaces,myInitOffsetFace); TopTools_MapOfShape& NewEdges = Inter.NewEdges(); @@ -2573,7 +2572,7 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter) } else { //-------------------------------- - // Seulememt entre face voisines. + // Only between neighbor faces. //-------------------------------- Inter.ConnexIntByArc(OffsetFaces,myShape,myAnalyse,myInitOffsetFace); } @@ -2597,13 +2596,13 @@ void BRepOffset_MakeOffset::Intersection2D(const TopTools_MapOfShape& Modif, Clock.Start(); } #endif - //----------------------------------------------------------- - // calcul des intersections2d sur les faces touchees par les + //-------------------------------------------------------- + // calculate intersections2d on faces concerned by // intersection3d - //--------------------------------------------------------- + //-------------------------------------------------------- TopTools_MapIteratorOfMapOfShape it(Modif); //----------------------------------------------- - // Intersection des edges 2 a 2. + // Intersection of edges 2 by 2. //----------------------------------------------- for ( it.Initialize(Modif); it.More(); it.Next()) { const TopoDS_Face& F = TopoDS::Face(it.Key()); @@ -2636,7 +2635,7 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif) TopTools_MapIteratorOfMapOfShape it(Modif); TopTools_ListOfShape LF,LC; //----------------------------------------- - // debouclage des faces // modifiees. + // unwinding of faces // modified. //----------------------------------------- for (; it.More(); it.Next()) { if (!myFaces.Contains(it.Key())) LF.Append(it.Key()); @@ -2644,7 +2643,7 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif) myMakeLoops.Build(LF,myAsDes,myImageOffset); //----------------------------------------- - // debouclage des bouchons. + // unwinding of caps. //----------------------------------------- for (it.Initialize(myFaces); it.More(); it.Next()) { LC.Append(it.Key()); @@ -2660,15 +2659,15 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif) //======================================================================= //function : MakeFaces -//purpose : Reconstruction des faces topologiquement inchangees qui -// partage des edges qui ont ete reconstruites. +//purpose : Reconstruction of topologically unchanged faces that +// share edges that were reconstructed. //======================================================================= void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif) { #ifdef DEb if (ChronBuild) { - cout << " RECONSTRUCTION DES FACES:" << endl; + cout << " RECONSTRUCTION OF FACES:" << endl; Clock.Reset(); Clock.Start(); } @@ -2677,7 +2676,7 @@ void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif) const TopTools_ListOfShape& Roots = myInitOffsetFace.Roots(); TopTools_ListOfShape LOF; //---------------------------------- - // Boucle sur toutes les faces //. + // Loop on all faces //. //---------------------------------- for (itr.Initialize(Roots); itr.More(); itr.Next()) { TopoDS_Face F = TopoDS::Face(myInitOffsetFace.Image(itr.Value()).First()); @@ -2692,7 +2691,7 @@ void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif) //======================================================================= //function : UpdateInitOffset -//purpose : mis a jour et purge de myInitOffset +//purpose : Update and cleaning of myInitOffset //======================================================================= static void UpdateInitOffset (BRepAlgo_Image& myInitOffset, @@ -3059,7 +3058,7 @@ void BRepOffset_MakeOffset::MakeShells () { #ifdef DEB if (ChronBuild) { - cout << " RECONSTRUCTION DES SHELLS:" << endl; + cout << " RECONSTRUCTION OF SHELLS:" << endl; Clock.Reset(); Clock.Start(); } @@ -3143,9 +3142,9 @@ void BRepOffset_MakeOffset::SelectShells () TopTools_MapOfShape FreeEdges; TopExp_Explorer exp(myShape,TopAbs_EDGE); //------------------------------------------------------------- - // FreeEdges ensemble des edges qui peuvent etre bord libre dans - // le shell parallele - // 1 - les bord libres de myShape . + // FreeEdges all edges that can have free border in the + // parallel shell + // 1 - free borders of myShape . //------------------------------------------------------------- for ( ; exp.More(); exp.Next()) { const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); @@ -3156,8 +3155,8 @@ void BRepOffset_MakeOffset::SelectShells () } } } - // myShape a des bords libres et il n y a pas de bouchons. - // pas de debouclage3d. + // myShape has free borders and there are no caps + // no unwinding 3d. if (!FreeEdges.IsEmpty() && myFaces.IsEmpty()) return; myOffsetShape = BRepOffset_Tool::Deboucle3D(myOffsetShape,FreeEdges); @@ -3218,14 +3217,14 @@ void BRepOffset_MakeOffset::EncodeRegularity () { #ifdef DEB if (ChronBuild) { - cout << " CODAGE DES REGULARITES:" << endl; + cout << " CODING OF REGULARITIES:" << endl; Clock.Reset(); Clock.Start(); } #endif if (myOffsetShape.IsNull()) return; - // recherche des edges G1 dans le resultat + // find edges G1 in the result TopExp_Explorer exp(myOffsetShape,TopAbs_EDGE); BRep_Builder B; @@ -3246,7 +3245,7 @@ void BRepOffset_MakeOffset::EncodeRegularity () if (LofOF.Extent() != 2) { #ifdef DEB if ( Standard_False) - cout << " Edge partage par " << LofOF.Extent() << " Faces" << endl; + cout << " Edge shared by " << LofOF.Extent() << " Faces" << endl; #endif continue; } @@ -3265,12 +3264,12 @@ void BRepOffset_MakeOffset::EncodeRegularity () if (F1.IsSame(F2)) { if (BRep_Tool::IsClosed(OE,F1)) { - // Debug provisoire pour le Bench. - // Voir avec YFR. - // En mode intersection, les aretes ne sont pas codees dans myInitOffsetEdge - // on gere donc au cas par cas. - // Remarque DUB; Pour les parties cachees, il FAUT coder CN - // les Surf Analytiques. + // Temporary Debug for the Bench. + // Check with YFR. + // In mode intersection, the edges are not coded in myInitOffsetEdge + // so, manage case by case + // Note DUB; for Hidden parts, it is NECESSARY to code CN + // Analytic Surfaces. if (myJoin == GeomAbs_Intersection) { BRepAdaptor_Surface BS(F1,Standard_False); GeomAbs_SurfaceType SType = BS.GetType(); @@ -3281,7 +3280,7 @@ void BRepOffset_MakeOffset::EncodeRegularity () B.Continuity(OE,F1,F1,GeomAbs_CN); } else { - // Voir YFR : MaJ de myInitOffsetFace + // See YFR : MaJ of myInitOffsetFace } } else if (myInitOffsetEdge.IsImage(ROE)) { @@ -3302,16 +3301,15 @@ void BRepOffset_MakeOffset::EncodeRegularity () } - // on code les regularites G1 entre : - // - sphere et tuyau : une root est un vertex, l'autre un edge - // et le vertex est inclus dans l'edge - // - face et tuyau : une root est une face, l'autre un edge - // et l'edge est inclus dans la face - // - face et face : si les 2 faces root sont tangentes dans - // le shape initial, elles le seront dans - // le shape offset - // - tuyau et tuyau : si les 2 edges generant les tuyaux sont - // tangents, les 2 tuyaux le seront. + // code regularities G1 between : + // - sphere and tube : one root is a vertex, the other is an edge + // and the vertex is included in the edge + // - face and tube : one root is a face, the other an edge + // and the edge is included in the face + // - face and face : if two root faces are tangent in + // the initial shape, they will be tangent in the offset shape + // - tube and tube : if 2 edges generating tubes are + // tangents, the 2 will be tangent either. if ( Type1 == TopAbs_EDGE && Type2 == TopAbs_VERTEX) { TopoDS_Vertex V1,V2; TopExp::Vertices(TopoDS::Edge(Root1), V1, V2); @@ -3345,8 +3343,8 @@ void BRepOffset_MakeOffset::EncodeRegularity () } } else if ( Type1 == TopAbs_FACE && Type2 == TopAbs_FACE) { - // si les 2 faces root sont tangentes dans le shape initial, - // elles le seront dans le shape offset + // if two root faces are tangent in + // the initial shape, they will be tangent in the offset shape TopTools_ListOfShape LE,LV; BRepOffset_Tool::HasCommonShapes(TopoDS::Face(Root1), TopoDS::Face(Root2), @@ -3408,7 +3406,7 @@ static void UpdateTolerance (TopoDS_Shape& S, TopTools_MapOfShape View; TopoDS_Vertex V[2]; - // Les edges des bouchons ne sont pas modifiees. + // The edges of caps are not modified. TopTools_MapIteratorOfMapOfShape it; for (it.Initialize(Faces); it.More(); it.Next()) { const TopoDS_Shape& F = it.Key(); @@ -3435,7 +3433,7 @@ static void UpdateTolerance (TopoDS_Shape& S, TV->Tolerance(0.); Handle(BRepCheck_Vertex) VertexCorrector = new BRepCheck_Vertex(V[i]); B.UpdateVertex (V[i],VertexCorrector->Tolerance()); - // on profite de l occasion pour purger le vertex. + // use the occasion to clean the vertices. (TV->ChangePoints()).Clear(); } B.UpdateVertex(V[i],Tol); diff --git a/src/BRepOffset/BRepOffset_Offset.cxx b/src/BRepOffset/BRepOffset_Offset.cxx index 9152386373..54bb683572 100755 --- a/src/BRepOffset/BRepOffset_Offset.cxx +++ b/src/BRepOffset/BRepOffset_Offset.cxx @@ -83,8 +83,7 @@ static void UpdateEdge(const TopoDS_Edge& E, const TopLoc_Location& L, const Standard_Real Tol) { - // Detrime les courbes pour eviter des copies dans - //les extensions. + // Cut curves to avoid copies in the extensions. BRep_Builder B; Handle(Geom_TrimmedCurve) BC = Handle(Geom_TrimmedCurve)::DownCast(C); if (!BC.IsNull()) { @@ -105,8 +104,7 @@ static void UpdateEdge(const TopoDS_Edge& E, const TopoDS_Face& F, const Standard_Real Tol) { - // Detrime les courbes pour eviter des copies dans - //les extensions. + // Cut curves to avoid copies in the extensions. BRep_Builder B; Handle(Geom2d_TrimmedCurve) BC = Handle(Geom2d_TrimmedCurve)::DownCast(C); if (!BC.IsNull()) { @@ -128,8 +126,7 @@ static void UpdateEdge (const TopoDS_Edge& E, const TopoDS_Face& F, const Standard_Real Tol) { - // Detrime les courbes pour eviter des copies dans - //les extensions. + // Cut curves to avoid copies in the extensions. BRep_Builder B; Handle(Geom2d_Curve) NC1,NC2; Handle(Geom2d_TrimmedCurve) BC1 = Handle(Geom2d_TrimmedCurve)::DownCast(C1); @@ -142,7 +139,7 @@ static void UpdateEdge (const TopoDS_Edge& E, //======================================================================= //function : Range3d //purpose : Set the range only on the 3d curve -// en attendant que le BRep_Builder le fasse !! +// waitint that BRep_Builder does it !! //======================================================================= static void Range3d (const TopoDS_Edge& E, @@ -193,14 +190,14 @@ static void ComputeCurve3d(TopoDS_Edge Edge, Standard_Boolean IsComputed = Standard_False; - // Seach only isos on analytiques surfaces. + // Search only isos on analytic surfaces. Geom2dAdaptor_Curve C(Curve); GeomAdaptor_Surface S(Surf); GeomAbs_CurveType CTy = C.GetType(); GeomAbs_SurfaceType STy = S.GetType(); BRep_Builder TheBuilder; - if ( STy != GeomAbs_Plane) { // if plane buildcurve3d gere KPart + if ( STy != GeomAbs_Plane) { // if plane buildcurve3d manage KPart if ( CTy == GeomAbs_Line) { gp_Dir2d D = C.Line().Direction(); if ( D.IsParallel(gp::DX2d(),Precision::Angular())) { // Iso V. @@ -281,10 +278,10 @@ static void ComputeCurve3d(TopoDS_Edge Edge, gp_Sphere Sph = S.Sphere(); gp_Pnt2d P = C.Line().Location(); gp_Ax3 Axis = Sph.Position(); - // calculde l'iso 0. + // calculate iso 0. gp_Circ Ci = ElSLib::SphereUIso(Axis, Sph.Radius(),0.); - // mise a sameparameter (rotation du cercle - decalage du Y) + // set to sameparameter (rotation of circle - offset of Y) gp_Dir DRev = Axis.XDirection().Crossed(Axis. Direction()); gp_Ax1 AxeRev(Axis.Location(),DRev); Ci.Rotate(AxeRev, P.Y()); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index 815f486d83..65c7bd1510 100755 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -143,7 +143,7 @@ static void BuildDomains(TopoDS_Face& myFace, // Modified by Sergey KHROMOV - Thu Apr 26 16:04:44 2001 End FR.Init(myFace,Standard_True); //==================================================== - // Construction des faces limites par les wires fermes. + // Construction of faces limited by closed wires. //==================================================== TopTools_ListIteratorOfListOfShape itl(WorkWires); for (; itl.More(); itl.Next()) { @@ -170,7 +170,7 @@ static void BuildDomains(TopoDS_Face& myFace, } //=========================================== - // Pas de wire ferme => un seul domaine + // No closed wire => only one domain //=========================================== if (Faces.IsEmpty()) { TopoDS_Shape aLocalShape = myFace.EmptyCopied(); @@ -186,7 +186,7 @@ static void BuildDomains(TopoDS_Face& myFace, } //==================================================== - // Classification des wires ouverts. + // Classification of open wires. //==================================================== // for (TopTools_ListIteratorOfListOfShape itF(Faces); itF.More(); itF.Next()) { TopTools_ListIteratorOfListOfShape itF; @@ -201,7 +201,7 @@ static void BuildDomains(TopoDS_Face& myFace, while (itW.More()) { TopoDS_Wire& W = TopoDS::Wire(itW.Value()); //======================================================= - // Choix d un point sur le wire. + projection sur la face. + // Choice of a point on the wire. + projection on the face. //======================================================= TopExp_Explorer exp(W,TopAbs_VERTEX); TopoDS_Vertex V = TopoDS::Vertex(exp.Current()); @@ -220,7 +220,7 @@ static void BuildDomains(TopoDS_Face& myFace, } } if ( Found && (CL.Perform(PV) == TopAbs_IN)) { - // On a trouve la face qui contient le wire on l enleve de la liste + // The face that contains a wire is found and it is removed from the list B.Add(F,W); LOW.Remove(itW); } @@ -230,7 +230,7 @@ static void BuildDomains(TopoDS_Face& myFace, } } //======================================== - // Creation des algos sur chaque domaine. + // Creation of algorithms on each domain. //======================================== for (itF.Initialize(Faces); itF.More(); itF.Next()) { BRepFill_OffsetWire Algo(TopoDS::Face(itF.Value()), myJoin); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx index f9f420bcb6..4c0b3e4846 100755 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx @@ -79,8 +79,8 @@ const TopTools_ListOfShape& BRepOffsetAPI_MakeOffsetShape::Generated (const Topo myOffsetShape.OffsetFacesFromShapes ().LastImage (S, myGenerated); if (!myOffsetShape.ClosingFaces().IsEmpty()) { - // Reverse les Shape generes dans le cas des solides minces. - // Utile seulement pour les faces mais sans incidence sur les autres. + // Reverse generated shapes in case of small solids. + // Useful only for faces without influence on others. TopTools_ListIteratorOfListOfShape it(myGenerated); for (; it.More(); it.Next()) it.Value().Reverse(); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index 951c185253..028f1f00b1 100755 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -110,7 +110,7 @@ //======================================================================= //function : PerformPlan -//purpose : Construit s'il existe un plan de remplissage +//purpose : Construct a plane of filling if exists //======================================================================= static Standard_Boolean PerformPlan(const TopoDS_Wire& W, @@ -196,7 +196,7 @@ static TopoDS_Solid MakeSolid(TopoDS_Shell& shell, const TopoDS_Wire& wire1, if (!B) { - // Il faut boucher les extremites + // It is necessary to close the extremities B = PerformPlan(wire1, presPln, face1); if (B) { B = PerformPlan(wire2, presPln, face2); @@ -363,13 +363,13 @@ void BRepOffsetAPI_ThruSections::Build() // compute origin and orientation on wires to avoid twisted results // and update wires to have same number of edges - // on utilise BRepFill_CompatibleWires + // use BRepFill_CompatibleWires TopTools_SequenceOfShape WorkingSections; WorkingSections.Clear(); TopTools_DataMapOfShapeListOfShape WorkingMap; WorkingMap.Clear(); - // Calcul des sections de travail + // Calculate the working sections BRepFill_CompatibleWires Georges(myWires); Georges.Perform(); if (Georges.IsDone()) { @@ -379,7 +379,7 @@ void BRepOffsetAPI_ThruSections::Build() myWires = WorkingSections; } - // Calcul de la shape resultat + // Calculate the resulting shape if (myWires.Length() == 2 || myIsRuled) { // create a ruled shell CreateRuled(); @@ -413,7 +413,7 @@ void BRepOffsetAPI_ThruSections::CreateRuled() if (myIsSolid) { - // on regarde si le premier wire est identique au dernier + // check if the first wire is the same as the last Standard_Boolean vClosed = (myWires(1).IsSame(myWires(nbSects))) ; if (vClosed) { @@ -423,7 +423,7 @@ void BRepOffsetAPI_ThruSections::CreateRuled() B.MakeSolid(solid); B.Add(solid, shell); - // verify the orientation the solid + // verify the orientation of the solid BRepClass3d_SolidClassifier clas3d(solid); clas3d.PerformInfinitePoint(Precision::Confusion()); if (clas3d.State() == TopAbs_IN) { @@ -536,19 +536,19 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() BRepTools_WireExplorer anExp; Standard_Boolean w1Point = Standard_True; - // on regarde si le premier wire est ponctuel + // check if the first wire is punctual for(anExp.Init(TopoDS::Wire(myWires(1))); anExp.More(); anExp.Next()) { w1Point = w1Point && (BRep_Tool::Degenerated(anExp.Current())); } Standard_Boolean w2Point = Standard_True; - // on regarde si le dernier wire est ponctuel + // check if the last wire is punctual for(anExp.Init(TopoDS::Wire(myWires(nbSects))); anExp.More(); anExp.Next()) { w2Point = w2Point && (BRep_Tool::Degenerated(anExp.Current())); } Standard_Boolean vClosed = Standard_False; - // on regarde si le premier wire est identique au dernier + // check if the first wire is the same as last if (myWires(1).IsSame(myWires(myWires.Length()))) vClosed = Standard_True; // find the dimension @@ -572,13 +572,13 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() for (i=1; i<=nbSects; i++) { const TopoDS_Wire& wire = TopoDS::Wire(myWires(i)); if (!wire.Closed()) { - // on regarde quand meme si les vertex sont les memes. + // check if the vertices are the same TopoDS_Vertex V1, V2; TopExp::Vertices(wire,V1,V2); if ( !V1.IsSame(V2)) uClosed = Standard_False; } if ( (i==1 && w1Point) || (i==nbSects && w2Point) ) { - // si le wire est ponctuel + // if the wire is punctual anExp.Init(TopoDS::Wire(wire)); for(j=1; j<=nbEdges; j++) { nb++; @@ -586,7 +586,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() } } else { - // sinon + // otherwise for(anExp.Init(TopoDS::Wire(wire)); anExp.More(); anExp.Next()) { nb++; shapes(nb) = anExp.Current(); @@ -616,8 +616,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() Standard_Integer nbPnts = 21; TColgp_Array2OfPnt points(1, nbPnts, 1, nbSects); - // on concatene chaque section pour obtenir une surface totale que - // l'on va segmenter + // concatenate each section to get a total surface that will be segmented Handle(Geom_BSplineSurface) TS; TS = TotalSurf(shapes,nbSects,nbEdges,w1Point,w2Point,vClosed); @@ -628,7 +627,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() TopoDS_Shape firstEdge; for (i=1; i<=nbEdges; i++) { - // segmentation de TS + // segmentation of TS Handle(Geom_BSplineSurface) surface; surface = Handle(Geom_BSplineSurface)::DownCast(TS->Copy()); Standard_Real Ui1,Ui2,V0,V1; @@ -638,7 +637,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() V1 = surface->VKnot(surface->LastVKnotIndex()); surface->Segment(Ui1,Ui2,V0,V1); - // recuperation des vertices + // return vertices edge = TopoDS::Edge(shapes(i)); TopExp::Vertices(edge,v1f,v1l); if (edge.Orientation() == TopAbs_REVERSED) @@ -662,7 +661,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() // --- edge 1 if ( w1Point ) { - // copie de l'edge degeneree + // copy the degenerated edge TopoDS_Shape aLocalShape = shapes(1).EmptyCopied(); edge1 = TopoDS::Edge(aLocalShape); // edge1 = TopoDS::Edge(shapes(1).EmptyCopied()); @@ -676,8 +675,8 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() v1l.Orientation(TopAbs_REVERSED); B.Add(edge1, v1l); B.Range(edge1, f1, l1); - // traitement des sections bouclantes - // on stocke les edges de la 1ere section + // processing of looping sections + // store edges of the 1st section if (vClosed) vcouture(i) = edge1; @@ -687,7 +686,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() edge2 = TopoDS::Edge(vcouture(i)); else { if ( w2Point ) { - // copie de l'edge degeneree + // copy of the degenerated edge TopoDS_Shape aLocalShape = shapes(nbSects*nbEdges).EmptyCopied(); edge2 = TopoDS::Edge(aLocalShape); // edge2 = TopoDS::Edge(shapes(nbSects*nbEdges).EmptyCopied()); @@ -886,7 +885,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: for (j=jdeb; j<=jfin; j++) { - // cas des sections bouclantes + // case of looping sections if (j==jfin && vClosed) { section.AddCurve(BS1); } @@ -895,7 +894,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: // read the first edge to initialise CompBS; edge = TopoDS::Edge(shapes((j-1)*NbEdges+1)); if (BRep_Tool::Degenerated(edge)) { - // edge degeneree : construction d'une courbe ponctuelle + // degenerated edge : construction of a punctual curve TopExp::Vertices(edge,vl,vf); TColgp_Array1OfPnt Extremities(1,2); Extremities(1) = BRep_Tool::Pnt(vf); @@ -906,7 +905,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: curv->LastParameter()); } else { - // recuperation de la courbe sur l'edge + // recover the curve on the edge Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last); curvTrim = new Geom_TrimmedCurve(curv, first, last); curvTrim->Transform(loc.Transformation()); @@ -915,7 +914,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: curvTrim->Reverse(); } - // transformation en BSpline reparametree sur [i-1,i] + // transformation into BSpline reparameterized on [i-1,i] curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim); if (curvBS.IsNull()) { Handle(Geom_Curve) theCurve = curvTrim->BasisCurve(); @@ -933,14 +932,14 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: BSplCLib::Reparametrize(0.,1.,BSK); curvBS->SetKnots(BSK); - // initialisation + // initialization GeomConvert_CompCurveToBSplineCurve CompBS(curvBS); for (i=2; i<=NbEdges; i++) { // read the edge edge = TopoDS::Edge(shapes((j-1)*NbEdges+i)); if (BRep_Tool::Degenerated(edge)) { - // edge degeneree : construction d'une courbe ponctuelle + // degenerated edge : construction of a punctual curve TopExp::Vertices(edge,vl,vf); TColgp_Array1OfPnt Extremities(1,2); Extremities(1) = BRep_Tool::Pnt(vf); @@ -951,7 +950,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: curv->LastParameter()); } else { - // recuperation de la courbe sur l'edge + // return the curve on the edge Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last); curvTrim = new Geom_TrimmedCurve(curv, first, last); curvTrim->Transform(loc.Transformation()); @@ -960,7 +959,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: curvTrim->Reverse(); } - // transformation en BSpline reparametree sur [i-1,i] + // transformation into BSpline reparameterized on [i-1,i] curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim); if (curvBS.IsNull()) { Handle(Geom_Curve) theCurve = curvTrim->BasisCurve(); @@ -986,11 +985,11 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: 1); } - // recuperation de la section finale + // return the final section BS = CompBS.BSplineCurve(); section.AddCurve(BS); - // cas des sections bouclantes + // case of looping sections if (j==jdeb && vClosed) { BS1 = BS; } @@ -1088,7 +1087,7 @@ TopoDS_Shape BRepOffsetAPI_ThruSections::GeneratedFace(const TopoDS_Shape& edge) //======================================================================= //function : CriteriumWeight -//purpose : returns the Weights associed to the criterium used in +//purpose : returns the Weights associated to the criterium used in // the optimization. //======================================================================= // diff --git a/src/BRepPrim/BRepPrim_Sphere.cxx b/src/BRepPrim/BRepPrim_Sphere.cxx index 575b2706aa..066a6b8bbd 100755 --- a/src/BRepPrim/BRepPrim_Sphere.cxx +++ b/src/BRepPrim/BRepPrim_Sphere.cxx @@ -14,7 +14,7 @@ #include #include -// parametres sur le meridien +// parameters on the meridian #define PMIN (-0.5*PI) #define PMAX (0.5*PI) diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx index 7ea495ec8c..7bc443f0c6 100755 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx @@ -14,7 +14,7 @@ #include -//-- lbr le 13 decembre 95 + static gp_Ax2 ConeComputeAxes() { static Standard_Integer firsttime=1; static Standard_Integer modif=0; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx index 2ae375464f..36ab2b05cc 100755 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx @@ -12,7 +12,7 @@ #include #include -//-- lbr le 13 decembre 95 + static gp_Ax2 CylinderComputeAxes() { static Standard_Integer firsttime=1; static Standard_Integer modif=0; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.cxx index 4091e7b37e..e99dd6c3f6 100755 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.cxx @@ -24,7 +24,7 @@ // 1) return true if extrema are found. // 2) Set in: // - Dist : The lower distance found. -// - anOppositePnt : The corresponding point laying on the face +// - anOppositePnt : The corresponding point lying on the face // - U,V : The parameters of on the face //======================================================================= @@ -102,7 +102,7 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Face& Face, myBuilder.MakeShell(Shell); myBuilder.Add(Shell,Face); - // Normale, produit scalaire et sens. + // Normal, scalair product and direction. Standard_Real Prec = gp::Resolution(); // BRepLProp_SLProps Props(BRepAdaptor_Surface(Face),U,V,2,Prec); BRepLProp_SLProps Props = BRepLProp_SLProps(BRepAdaptor_Surface(Face),U,V,2,Prec); @@ -110,10 +110,10 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Face& Face, gp_Dir OppRef(RefPnt.XYZ()-MinPnt.XYZ()); Standard_Real Sca = Normale*OppRef; - // Construction du solide ouvert. + // Construction of the open solid. myBuilder.MakeSolid(mySolid); if (Sca > 0.) { - // Directions identiques: cas inverse. + // Same directions: inverted case. Shell.Reverse(); } @@ -139,7 +139,7 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Shell& Shell, Standard_Real MinDist = RealLast(); Standard_Real CurDist, U, V, MinU=0, MinV=0; - // Chercher le point de la peau le plus proche du point de reference. + // Find the point of the skin closest to the reference point. Standard_Boolean YaExt = Standard_False; TopoDS_Shell aShell = Shell; @@ -160,7 +160,7 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Shell& Shell, } if ( YaExt) { - // Normale, produit scalaire et sens. + // Normal, scalar product and direction. BRep_Builder myBuilder; Standard_Real Prec = gp::Resolution(); // BRepLProp_SLProps Props(BRepAdaptor_Surface(MinFace),MinU,MinV,2,Prec); @@ -169,10 +169,10 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Shell& Shell, gp_Dir OppRef(RefPnt.XYZ()-MinPnt.XYZ()); Standard_Real Sca = Normale*OppRef; - // Construction du solide ouvert. + // Construction of the open solid. myBuilder.MakeSolid(mySolid); if (Sca > 0.) { - // Directions identiques: cas inverse. + // Same directions: inverted case. aShell.Reverse(); } myBuilder.Add(mySolid,aShell); diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx index a0edb711cc..845f0de6de 100755 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx @@ -13,7 +13,6 @@ #include -//-- lbr le 13 decembre 95 static gp_Ax2 SphereComputeAxes() { static Standard_Integer firsttime=1; static Standard_Integer modif=0; diff --git a/src/BRepSweep/BRepSweep_Rotation.cxx b/src/BRepSweep/BRepSweep_Rotation.cxx index 8389d3c1e0..20848760ae 100755 --- a/src/BRepSweep/BRepSweep_Rotation.cxx +++ b/src/BRepSweep/BRepSweep_Rotation.cxx @@ -139,7 +139,7 @@ TopoDS_Shape BRepSweep_Rotation::MakeEmptyVertex (const TopoDS_Shape& aGenV, const Sweep_NumShape& aDirV) { - //appele uniquement en mode de construction avec copie. + //call only in construction mode with copy. Standard_ConstructionError_Raise_if (!myCopy,"BRepSweep_Translation::MakeEmptyVertex"); gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(aGenV)); @@ -176,8 +176,8 @@ TopoDS_Shape BRepSweep_Rotation::MakeEmptyDirectingEdge O.Translate(V.Dot(gp_Vec(O,P)) * V); if (O.IsEqual(P,Precision::Confusion())) { // make a degenerated edge - // temporairement on fout une courbe 3d nulle pour que les - // parametres soient enregistres. + // temporary make 3D curve null so that + // parameters should be registered. // myBuilder.Builder().MakeEdge(E); gp_Ax2 Axis(O,Dirz); Handle(Geom_Circle) GC = new Geom_Circle(Axis,0.); @@ -211,8 +211,7 @@ TopoDS_Shape BRepSweep_Rotation::MakeEmptyGeneratingEdge (const TopoDS_Shape& aGenE, const Sweep_NumShape& aDirV) { - //appele dans le cas de construction avec copie, ou exceptionnellement - //lorsque le meridien touche myaxe. + //call in case of construction with copy, or only when meridian touches myaxe. Standard_Real First,Last; TopLoc_Location Loc; Handle(Geom_Curve) C = Handle(Geom_Curve)::DownCast @@ -243,8 +242,7 @@ void BRepSweep_Rotation::SetParameters const TopoDS_Shape& aGenV, const Sweep_NumShape&) { - //Colle le parametre des vertex directement inclus dans les faces - //bouchons. + //Glue the parameter of vertices directly included in cap faces. gp_Pnt2d pnt2d = BRep_Tool::Parameters(TopoDS::Vertex(aGenV), TopoDS::Face(aGenF)); myBuilder.Builder().UpdateVertex @@ -402,8 +400,8 @@ void BRepSweep_Rotation::SetPCurve const Sweep_NumShape&, const TopAbs_Orientation orien) { - //Met sur edges des faces bouchons des pcurves identiques a celles - //des edges de la face generatrice. + //Set on edges of cap faces the same pcurves as + //on edges of the generator face. Standard_Real First,Last; SetThePCurve(myBuilder.Builder(), TopoDS::Edge(aNewEdge), diff --git a/src/BRepSweep/BRepSweep_Translation.cxx b/src/BRepSweep/BRepSweep_Translation.cxx index c243612bdb..5d577595ec 100755 --- a/src/BRepSweep/BRepSweep_Translation.cxx +++ b/src/BRepSweep/BRepSweep_Translation.cxx @@ -138,7 +138,7 @@ TopoDS_Shape BRepSweep_Translation::MakeEmptyGeneratingEdge (const TopoDS_Shape& aGenE, const Sweep_NumShape& aDirV) { - //Appele uniquement dans le cas de construction avec copie. + //Call only in case of construction with copy. Standard_ConstructionError_Raise_if (!myCopy,"BRepSweep_Translation::MakeEmptyVertex"); TopLoc_Location L; @@ -166,8 +166,7 @@ void BRepSweep_Translation::SetParameters const TopoDS_Shape& aGenV, const Sweep_NumShape&) { - //Colle le parametre des vertex directement inclus dans les faces - //bouchons. + //Glue the parameter of vertices directly included in cap faces. gp_Pnt2d pnt2d = BRep_Tool::Parameters(TopoDS::Vertex(aGenV), TopoDS::Face(aGenF)); myBuilder.Builder().UpdateVertex @@ -236,8 +235,7 @@ TopoDS_Shape BRepSweep_Translation::MakeEmptyFace toler = BRep_Tool::Tolerance(TopoDS::Edge(aGenS)); gp_Trsf Tr = L.Transformation(); C = Handle(Geom_Curve)::DownCast(C->Copy()); - //les surfaces extrudees sont inverses par rapport a la topologie, donc - //on reverse. + //extruded surfaces are inverted correspondingly to the topology, so reverse. C->Transform(Tr); gp_Dir D(myVec); D.Reverse(); @@ -289,8 +287,8 @@ void BRepSweep_Translation::SetPCurve const Sweep_NumShape&, const TopAbs_Orientation) { - //Met sur edges des faces bouchons des pcurves identiques a celles - //des edges de la face generatrice. + //Set on edges of cap faces the same pcurves as + //edges of the generating face. Standard_Real First,Last; myBuilder.Builder().UpdateEdge (TopoDS::Edge(aNewEdge), @@ -321,12 +319,11 @@ void BRepSweep_Translation::SetGeneratingPCurve aNewOrientedEdge.Orientation(orien); if (AS.GetType()==GeomAbs_Plane){ -/* on ne fait rien JAG +/* nothing is done JAG gp_Pln pln = AS.Plane(); gp_Ax3 ax3 = pln.Position(); -// JYL : l'ecriture suivante est bugatoire sur une arete construite avec une -// courbe 3d trimmee. : +// JYL : the following produces bugs on an edge constructed from a trimmed 3D curve : // // Handle(Geom_Line) // GL = Handle(Geom_Line)::DownCast(BRep_Tool::Curve(TopoDS::Edge(aGenE), diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index c2f4264c38..3d1e00fcd6 100755 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -730,7 +730,7 @@ static Standard_Integer vecdc(Draw_Interpretor& di,Standard_Integer ,const char* //========================================================================== //function : wexplo -// exploration d un wire +// exploration of a wire //========================================================================== static Standard_Integer wexplo (Draw_Interpretor&, Standard_Integer argc, const char** argv) @@ -823,7 +823,7 @@ void BRepTest::BasicCommands(Draw_Interpretor& theCommands) mkedgecurve,g); theCommands.Add("fsameparameter", - "fsameparameter shapename [tol (default 1.e-7)], \nforce le sameparameter sur toutes les aretes du shape", + "fsameparameter shapename [tol (default 1.e-7)], \nforce sameparameter on all edges of the shape", __FILE__, sameparameter,g); diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index d7f441f458..f4a3eed06b 100755 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -987,8 +987,8 @@ static Standard_Integer bsplineprof(Draw_Interpretor& di, } } // -// reste a faire : fermer le profil avec le premier point du contour -// et le point pris avec mouse button 3 +// to be done : close the profile using the first point of the contour +// and the point taken with mouse button 3 // Handle(Geom2d_BSplineCurve) C ; Handle(Geom_Curve) curve3d_ptr ; @@ -1559,7 +1559,7 @@ Standard_Integer edgeintersector(Draw_Interpretor& di, TopOpeBRep_EdgesIntersector EInter; char name[100]; //------------------------------------------------------ - // Calcul des point d intersection en 2d + // Calculate point of intersection 2D //----------------------------------------------------- EInter.SetFaces(F,F); Standard_Real TolInter = 1.e-7; @@ -1569,8 +1569,8 @@ Standard_Integer edgeintersector(Draw_Interpretor& di, EInter.Perform (E[0],E[1],reducesegments); if (EInter.IsEmpty()) { - //cout << " Pas d'intersection trouvee" << endl; - di << " Pas d'intersection trouvee" << "\n"; + //cout << " No intersection found" << endl; + di << " No intersection found" << "\n"; return 0; } @@ -1590,8 +1590,8 @@ Standard_Integer edgeintersector(Draw_Interpretor& di, DBRep::Set(name,V); for (Standard_Integer i = 1; i <= 2; i++) { //--------------------------------------------------------------- - // pour pouvoir ranger le parametre sur l edge - // il faut le coder interne.... + // to be able to rank parameter on edge + // it is necessary to code it internally //--------------------------------------------------------------- Standard_Real U = P2D.Parameter(i); @@ -1600,7 +1600,7 @@ Standard_Integer edgeintersector(Draw_Interpretor& di, // B.UpdateVertex(TopoDS::Vertex(V.Oriented(TopAbs_INTERNAL)), // U,E[i-1],Tol); //--------------------------------------------------------------- - // Orientation du vertex en fct de la transition. + // Orientation of vertex in the transition. //--------------------------------------------------------------- TopAbs_Orientation OO = TopAbs_REVERSED; if (P2D.IsVertex(i)) { @@ -1609,8 +1609,8 @@ Standard_Integer edgeintersector(Draw_Interpretor& di, else if (P2D.Transition(i).Before() == TopAbs_OUT) { OO = TopAbs_FORWARD; } - //cout << " Orientation du vertex " << NbV << " sur " << a[i+1] << ": "; - di << " Orientation du vertex " << NbV << " sur " << a[i+1] << ": "; + //cout << " Orientation of vertex " << NbV << " on " << a[i+1] << ": "; + di << " Orientation of vertex " << NbV << " on " << a[i+1] << ": "; if (OO == TopAbs_FORWARD) { //cout << "FORWARD" << endl; di << "FORWARD" << "\n"; @@ -1647,7 +1647,7 @@ static Standard_Integer concatwire(Draw_Interpretor&, Standard_Integer n, const TopoDS_Wire res; - res=BRepAlgo::ConcatenateWire(W,Option); //treatment + res=BRepAlgo::ConcatenateWire(W,Option); //processing DBRep::Set(c[1],res); return 0; } @@ -1662,8 +1662,8 @@ Standard_Integer build3d(Draw_Interpretor& di, { if ( (n <2) || (n>3) ) { - //cout << " 1 ou 2 arguments attendus" << endl; - di << " 1 ou 2 arguments attendus" << "\n"; + //cout << " 1 or 2 arguments expected" << endl; + di << " 1 or 2 arguments expected" << "\n"; return 1; } diff --git a/src/BRepTest/BRepTest_FilletCommands.cxx b/src/BRepTest/BRepTest_FilletCommands.cxx index 0f6f03586f..571d3e75c9 100755 --- a/src/BRepTest/BRepTest_FilletCommands.cxx +++ b/src/BRepTest/BRepTest_FilletCommands.cxx @@ -212,13 +212,13 @@ static Standard_Integer CheckHist(Draw_Interpretor& di, const char** ) { if(Rakk == 0) { - //cout<<"Pas de Builder actif"<IsDone()) { - //cout<<"Builder actif Not Done"<NbContours(); @@ -274,8 +274,8 @@ static Standard_Integer UPDATEVOL(Draw_Interpretor& di, const char** a) { if(Rake == 0){ - //cout << "MakeFillet non initialise"<Build(); @@ -317,7 +317,7 @@ static Standard_Integer BUILDEVOL(Draw_Interpretor& di, //********************************************** -// commande des fusions et coupes avec conges * +// command fuse and cut with fillets * //********************************************** Standard_Integer topoblend(Draw_Interpretor& di, Standard_Integer narg, const char** a) @@ -497,7 +497,7 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons else if (err==FilletSurf_PbFilletCompute) di <<"StatusError=PBFillet"<<"\n"; } else { - if (Rakk.IsDone()==FilletSurf_IsPartial) di <<"resultat partiel"<<"\n"; + if (Rakk.IsDone()==FilletSurf_IsPartial) di <<"partial result"<<"\n"; nb=Rakk.NbSurface(); char localname [100]; @@ -514,11 +514,11 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons //else if (Rakk.StartSectionStatus()==FilletSurf_TwoExtremityOnEdge) // {cout<<" type deb conges = WLBLEND"< calcul a gauche du contour. -// side = right => calcul a droite du contour. +// side = left => calculation to the left of the contour. +// side = right => calculation to the right of the contour. //========================================================================== static Standard_Integer side(Draw_Interpretor& , Standard_Integer, const char** argv) @@ -148,7 +148,7 @@ static Standard_Integer side(Draw_Interpretor& , Standard_Integer, const char** //========================================================================== //function : result -// Affichage complet de la carte calculee. +// Complete display of the calculated map. //========================================================================== static Standard_Integer result(Draw_Interpretor& , Standard_Integer, const char**) { @@ -165,12 +165,11 @@ static Standard_Integer result(Draw_Interpretor& , Standard_Integer, const char* //========================================================================== //function : DrawCurve -// Affichage d une courbe de Geom2d. dans une couleur -// definie par . -// Indice = 1 jaune, -// Indice = 2 bleu, -// Indice = 3 rouge, -// Indice = 4 vert. +// Display of curve of Geom2d in a color defined by . +// Indice = 1 yellow, +// Indice = 2 blue, +// Indice = 3 red, +// Indice = 4 green. //========================================================================== void DrawCurve(const Handle(Geom2d_Curve)& aCurve, const Standard_Integer Indice) @@ -187,14 +186,14 @@ void DrawCurve(const Handle(Geom2d_Curve)& aCurve, curve =(*(Handle_Bisector_BisecAna*)&curve)->Geom2dCurve(); type = curve->DynamicType(); } - // PB de representation des courbes semi_infinies. + // PB of representation of semi_infinite curves. gp_Parab2d gpParabola; gp_Hypr2d gpHyperbola; Standard_Real Focus; Standard_Real Limit = 50000.; Standard_Real delta = 400; - // PB de representation des courbes semi_infinies. + // PB of representation of semi_infinite curves. if (aCurve->LastParameter() == Precision::Infinite()) { if (type == STANDARD_TYPE(Geom2d_Parabola)) { @@ -224,7 +223,7 @@ void DrawCurve(const Handle(Geom2d_Curve)& aCurve, else { CurveDraw = aCurve; } - // fin PB. + // end PB. } else { CurveDraw = aCurve; diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index 9b657e4f5e..93a16765f1 100755 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -543,7 +543,7 @@ static Standard_Integer addsweep(Draw_Interpretor& di, if (n > 2) { Standard_Integer cur = 2; - // Lecture du Vertex + // Reading of Vertex TopoDS_Shape InputVertex(DBRep::Get(a[cur],TopAbs_VERTEX)); Vertex = TopoDS::Vertex(InputVertex); // Vertex = TopoDS::Vertex(DBRep::Get(a[cur],TopAbs_VERTEX)); @@ -552,25 +552,25 @@ static Standard_Integer addsweep(Draw_Interpretor& di, HasVertex = Standard_True; } - // Lecture de l'option de translation + // Reading of the translation option if ((n>cur) && !strcmp(a[cur],"-T")) { cur++; isT = Standard_True; } - // Lecture de l'option de rotation + // Reading of the rotation option if ((n>cur) && !strcmp(a[cur],"-R")) { cur++; isR = Standard_True; } - // loi ? + // law ? if (n>cur) { Standard_Integer nbreal = n-cur; if ( (nbreal < 4) || (nbreal % 2 != 0) ) { //cout << "bad arguments ! :" <cur) { BRepBuilderAPI_TransitionMode Transition = BRepBuilderAPI_Transformed; - // Lecture Transition + // Reading Transition if (!strcmp(a[cur],"-C")) { Transition = BRepBuilderAPI_RightCorner; cur++; @@ -675,7 +675,7 @@ static Standard_Integer buildsweep(Draw_Interpretor& di, } Sweep->SetTransitionMode(Transition); } - // Lecture solide ? + // Reading solid ? if ((n>cur) && (!strcmp(a[cur],"-S")) ) mksolid = Standard_True; // Calcul le resultat @@ -746,7 +746,7 @@ static Standard_Integer simulsweep(Draw_Interpretor& di, Sweep->SetTransitionMode(Transition); } - // Calcul le resultat + // Calculate the result Sweep->Simulate(N, List); for (ii=1, it.Initialize(List); it.More(); it.Next(), ii++) { sprintf(name,"%s_%d",a[1],ii); diff --git a/src/BRepToIGES/BRepToIGES_BRSolid.cxx b/src/BRepToIGES/BRepToIGES_BRSolid.cxx index f1f93c8311..bd04af1f89 100755 --- a/src/BRepToIGES/BRepToIGES_BRSolid.cxx +++ b/src/BRepToIGES/BRepToIGES_BRSolid.cxx @@ -37,7 +37,7 @@ #include -// Dans un premier temps on ne transfere que la geometrie ( point,courbe...) +// At first only the geometry is translated (point, curve...) //============================================================================= // BRepToIGES_BRSolid @@ -82,7 +82,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferSolid(const TopoDS_Shap res = TransferCompound(C); } else { - // message d`erreur + // error message } return res; } @@ -206,7 +206,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferCompound(const TopoDS_C BRepToIGES_BRWire BW(*this); Handle(TColStd_HSequenceOfTransient) Seq = new TColStd_HSequenceOfTransient(); - // on prend tous les Solids + // take all Solids for (Ex.Init(start, TopAbs_SOLID); Ex.More(); Ex.Next()) { TopoDS_Solid S = TopoDS::Solid(Ex.Current()); if (S.IsNull()) { @@ -218,7 +218,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferCompound(const TopoDS_C } } - // on prend tous les Shells isoles + // take all isolated Shells for (Ex.Init(start, TopAbs_SHELL, TopAbs_SOLID); Ex.More(); Ex.Next()) { TopoDS_Shell S = TopoDS::Shell(Ex.Current()); if (S.IsNull()) { @@ -231,7 +231,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferCompound(const TopoDS_C } - // on prend toutes les Faces isoles + // take all isolated Faces for (Ex.Init(start, TopAbs_FACE, TopAbs_SHELL); Ex.More(); Ex.Next()) { TopoDS_Face S = TopoDS::Face(Ex.Current()); if (S.IsNull()) { @@ -244,7 +244,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferCompound(const TopoDS_C } - // on prend tous les Wires isoles + // take all isolated Wires for (Ex.Init(start, TopAbs_WIRE, TopAbs_FACE); Ex.More(); Ex.Next()) { TopoDS_Wire S = TopoDS::Wire(Ex.Current()); if (S.IsNull()) { @@ -257,7 +257,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferCompound(const TopoDS_C } - // on prend tous les Edges isoles + // take all isolated Edges for (Ex.Init(start, TopAbs_EDGE, TopAbs_WIRE); Ex.More(); Ex.Next()) { TopoDS_Edge S = TopoDS::Edge(Ex.Current()); if (S.IsNull()) { @@ -270,7 +270,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferCompound(const TopoDS_C } - // on prend tous les Vertices isoles + // take all isolated Vertices for (Ex.Init(start, TopAbs_VERTEX, TopAbs_EDGE); Ex.More(); Ex.Next()) { TopoDS_Vertex S = TopoDS::Vertex(Ex.Current()); if (S.IsNull()) { @@ -282,7 +282,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferCompound(const TopoDS_C } } - // on construit le groupe + // construct the group Standard_Integer nbshapes = Seq->Length(); Handle(IGESData_HArray1OfIGESEntity) Tab; if (nbshapes >=1) { diff --git a/src/BRepToIGES/BRepToIGES_BRWire.cxx b/src/BRepToIGES/BRepToIGES_BRWire.cxx index e331ff1ed3..ad7aefe7ac 100755 --- a/src/BRepToIGES/BRepToIGES_BRWire.cxx +++ b/src/BRepToIGES/BRepToIGES_BRWire.cxx @@ -114,7 +114,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire res = TransferWire(W); } else { - // message d`erreur + // error message } return res; } @@ -324,11 +324,11 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge& //#29 rln 19.10.98 if (!Curve2d.IsNull()) { - // Pour les surfaces "de revolution" et "LinearExtrusion", il faut - // appliquer une translation des courbes 2d pour etre en accord - // sur l`origine (U,V) entre IGES et BRep (pour Cylindrical, - // Conical et SurfaceOfLinearExtrusion) - // Il faut inverser (u,v) surfaces de revol. + // For "revolution" and "LinearExtrusion" surfaces, it is necessary + // to apply a translation of 2D curves to agree on the + // origin (U,V) between IGES and BRep (for Cylindrical, + // Conical and SurfaceOfLinearExtrusion) + // It is necessary to invert (u,v) surfaces of revolution. TopLoc_Location L; Handle(Geom_Surface) st = BRep_Tool::Surface(myface, L); @@ -454,7 +454,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge& ShapeBuild_Edge sbe; Curve2d = sbe.TransformPCurve(Curve2d,trans,uFact,First,Last); // (Curve2d, Surf, First, Last, myLen, isBRepMode); - // si l`edge est REVERSED, il faut "REVERSER" la courbe 2d. + // if the edge is REVERSED, it is necessary to "REVERSE" the curve 2d. // added by skl 18.07.2005 for OCC9490 if(Surf->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) { @@ -564,7 +564,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire Handle(TColStd_HSequenceOfTransient) Seq2d = new TColStd_HSequenceOfTransient(); - // on cree une 3d CompositeCurve et une 2d CompositeCurve + // create a 3d CompositeCurve and a 2d CompositeCurve TopExp_Explorer TE(mywire, TopAbs_VERTEX); if ( TE.More()) { // PTV OCC908 workaround for KAS:dev version diff --git a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx index 3a6e11c112..e3297c32e6 100755 --- a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx +++ b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx @@ -6,8 +6,7 @@ // modif le 25/03/96 mjm -// mise en place de ShapeCustom::DirectModification pour les surfaces -// indirectes (hors norme IGES) +// implement ShapeCustom::DirectModification for indirect surfaces (out of norm IGES) //:l4 abv 12 Jan 99: CTS22022-2: correct writing reversed shells //:n3 abv 8 Feb 99: PRO17820: BRepTools::OuterWire() -> ShapeAnalysis::OuterWire //szv#4 S4163 @@ -242,7 +241,7 @@ void BRepToIGESBRep_Entity::TransferEdgeList() Curves->SetValue(iedge, amycurve); TopoDS_Vertex V1, V2; TopExp::Vertices(myedge, V1, V2); - // les vertex suivent l`orientation de la courbe 3d + // vertices follow the orientation of curve 3d mystartindex = IndexVertex(V1); myendindex = IndexVertex(V2); startVertexIndex->SetValue(iedge, mystartindex); @@ -347,7 +346,7 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferShape res = TransferCompound(C); } else { - // message d`erreur + // error message } } @@ -385,10 +384,9 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferEdge (const TopoDS_Ed BR.SetModel(GetModel()); ICurve2d = BR.TransferEdge (myedge, myface, Length, Standard_True); - // la courbe 3d est obligatoire . Si elle n`existe pas on la cree et on - // la stocke dans "myCurves". - // Si l`edge est degenere , il n`y a pas de 3d associe.Alors l"edge-tuple" - // sera un Vertex. + // curve 3d is obligatory. If it does not exist it is created and stored in "myCurves". + // If the edge is degenerated, there is no associated 3d. So "edge-tuple" + // will be a Vertex. if (!BRep_Tool::Degenerated(myedge)) { ICurve3d = TransferEdge(myedge); @@ -435,7 +433,7 @@ Handle(IGESSolid_Loop) BRepToIGESBRep_Entity::TransferWire (const TopoDS_Wire& m Seq2d->Append(ent2d); Standard_Integer myindex; - // on ajoute les Vertex dans la Map "myVertices" + // add Vertices in the Map "myVertices" TopoDS_Vertex V1, V2; TopExp::Vertices(E, V1, V2); //Standard_Integer Ivertex1, Ivertex2; //szv#4:S4163:12Mar99 not needed @@ -538,7 +536,7 @@ Handle(IGESSolid_Face) BRepToIGESBRep_Entity ::TransferFace(const TopoDS_Face& s Handle(Geom_Surface) Surf = BRep_Tool::Surface(start); if (!Surf.IsNull()) { Standard_Real U1, U2, V1, V2; - BRepTools::UVBounds(start, U1, U2, V1, V2); // pour limiter les surfaces de base + BRepTools::UVBounds(start, U1, U2, V1, V2); // to limit the base surfaces GeomToIGES_GeomSurface GS; //S4181 pdn 17.04.99 Boolean flags in order to define write of elementary surfaces added. GS.SetBRepMode(Standard_True); @@ -566,7 +564,7 @@ Handle(IGESSolid_Face) BRepToIGESBRep_Entity ::TransferFace(const TopoDS_Face& s // returns the wires of start // -------------------------- - // pour explorer la face , il faut la mettre fORWARD. + // to explore the face , it is required to set it FORWARD. TopoDS_Face myface = start; Standard_Boolean IsReversed = Standard_False; if (start.Orientation() == TopAbs_REVERSED) { @@ -584,7 +582,7 @@ Handle(IGESSolid_Face) BRepToIGESBRep_Entity ::TransferFace(const TopoDS_Face& s OuterLoop = TransferWire(Outer, myface, Length); } - // inners wires + // inner wires TopExp_Explorer Ex; Handle(TColStd_HSequenceOfTransient) Seq = new TColStd_HSequenceOfTransient(); @@ -592,7 +590,7 @@ Handle(IGESSolid_Face) BRepToIGESBRep_Entity ::TransferFace(const TopoDS_Face& s TopoDS_Wire W = TopoDS::Wire(Ex.Current()); Handle(IGESSolid_Loop) InnerLoop = new IGESSolid_Loop; if (W.IsNull()) { - AddWarning(start," an Wire is a null entity"); + AddWarning(start," a Wire is a null entity"); } else if (!W.IsSame(Outer)) { InnerLoop = TransferWire(W, myface, Length); @@ -600,7 +598,7 @@ Handle(IGESSolid_Face) BRepToIGESBRep_Entity ::TransferFace(const TopoDS_Face& s } } - // all inners edges not in a wire + // all inner edges not in a wire for (Ex.Init(myface,TopAbs_EDGE,TopAbs_WIRE); Ex.More(); Ex.Next()) { TopoDS_Edge E = TopoDS::Edge(Ex.Current()); AddWarning ( E, "An edge alone is not transfer as an IGESBRep Entity"); @@ -697,7 +695,7 @@ Handle(IGESSolid_ManifoldSolid) BRepToIGESBRep_Entity ::TransferSolid (const Top for (Ex.Init(start,TopAbs_SHELL); Ex.More(); Ex.Next()) { TopoDS_Shell S = TopoDS::Shell(Ex.Current()); if (S.IsNull()) { - AddWarning(start," an Shell is a null entity"); + AddWarning(start," a Shell is a null entity"); } else { IShell = TransferShell(S); @@ -814,7 +812,7 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferCompound (const TopoD Handle(IGESData_IGESEntity) IShape; Handle(TColStd_HSequenceOfTransient) Seq = new TColStd_HSequenceOfTransient(); - // on prend tous les Solids + // take all Solids for (Ex.Init(start, TopAbs_SOLID); Ex.More(); Ex.Next()) { TopoDS_Solid S = TopoDS::Solid(Ex.Current()); if (S.IsNull()) { @@ -826,7 +824,7 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferCompound (const TopoD } } - // on prend tous les Shells isoles + // take all isolated Shells for (Ex.Init(start, TopAbs_SHELL, TopAbs_SOLID); Ex.More(); Ex.Next()) { TopoDS_Shell S = TopoDS::Shell(Ex.Current()); if (S.IsNull()) { @@ -839,7 +837,7 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferCompound (const TopoD } - // on prend toutes les Faces isoles + // take all isolated Faces for (Ex.Init(start, TopAbs_FACE, TopAbs_SHELL); Ex.More(); Ex.Next()) { TopoDS_Face S = TopoDS::Face(Ex.Current()); if (S.IsNull()) { @@ -852,27 +850,27 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferCompound (const TopoD } - // on prend tous les Wires isoles + // take all isolated Wires for (Ex.Init(start, TopAbs_WIRE, TopAbs_FACE); Ex.More(); Ex.Next()) { TopoDS_Wire S = TopoDS::Wire(Ex.Current()); AddWarning(S," a Wire alone is not an IGESBRep entity : no Transfer"); } - // on prend tous les Edges isoles + // take all isolated Edges for (Ex.Init(start, TopAbs_EDGE, TopAbs_WIRE); Ex.More(); Ex.Next()) { TopoDS_Edge S = TopoDS::Edge(Ex.Current()); AddWarning(S," a Edge alone is not an IGESBRep entity : no Transfer"); } - // on prend tous les Vertices isoles + // take all isolated Vertices for (Ex.Init(start, TopAbs_VERTEX, TopAbs_EDGE); Ex.More(); Ex.Next()) { TopoDS_Vertex S = TopoDS::Vertex(Ex.Current()); AddWarning(S," a Vertex alone is not an IGESBRep entity : no Transfer"); } - // on construit le groupe + // construct the group Standard_Integer nbshapes = Seq->Length(); Handle(IGESData_HArray1OfIGESEntity) Tab; if (nbshapes > 1) { diff --git a/src/BRepTools/BRepTools_Modifier.cxx b/src/BRepTools/BRepTools_Modifier.cxx index 60680ce41b..ead36fd10d 100755 --- a/src/BRepTools/BRepTools_Modifier.cxx +++ b/src/BRepTools/BRepTools_Modifier.cxx @@ -3,7 +3,7 @@ // Author: Jacques GOUSSARD // -// IFV 04.06.99 - PRO18974 - treatment of INTERNAL shapes. +// IFV 04.06.99 - PRO18974 - processing of INTERNAL shapes. #include @@ -104,8 +104,7 @@ void BRepTools_Modifier::Perform(const Handle(BRepTools_Modification)& M) } TopTools_DataMapIteratorOfDataMapOfShapeShape theIter(myMap); - // Remise a Null des shapes value, dans le cas ou on applique une autre - // modification au shape de depart. + // Set to Null the value of shapes, in case when another modification is applied to the start shape. if (!theIter.Value().IsNull()) { while (theIter.More()) { @@ -136,7 +135,7 @@ void BRepTools_Modifier::Perform(const Handle(BRepTools_Modification)& M) myMap(myShape).Orientation(myShape.Orientation()); } - // Mise a jour des continuites + // Update the continuities TopTools_IndexedDataMapOfShapeListOfShape theEFMap; TopExp::MapShapesAndAncestors(myShape,TopAbs_EDGE,TopAbs_FACE,theEFMap); @@ -236,7 +235,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild BRep_Builder B; Standard_Real tol; Standard_Boolean No3DCurve = Standard_False; // en fait, si on n`a pas de - //modif de geometrie 3d , il faudrait tester l`existence d`une courbe 3d. + //modif geometry 3d , it is necessary to test the existence of a curve 3d. // new geometry ? @@ -355,11 +354,10 @@ Standard_Boolean BRepTools_Modifier::Rebuild if (M->NewCurve2d(edge, face,TopoDS::Edge(myMap(ex.Current())), TopoDS::Face(result),curve2d, tol)) { - // rem dub 16/09/97 : On fait de la topologie constante ou on - // n'en fait pas. - // On n'en fait pas si CopySurface = 1 - // Atention, les VRAIES aretes de couture (RealyClosed) le - // restent meme si CopySurface est vrai. + // rem dub 16/09/97 : Make constant topology or not make at all. + // Do not make if CopySurface = 1 + // Atention, TRUE sewing edges (RealyClosed) + // stay even if CopySurface is true. // check that edge contains two pcurves on this surface: // either it is true seam on the current face, or belongs to two faces diff --git a/src/BRepTools/BRepTools_WireExplorer.cxx b/src/BRepTools/BRepTools_WireExplorer.cxx index 7c5d4d5e87..37b291192b 100755 --- a/src/BRepTools/BRepTools_WireExplorer.cxx +++ b/src/BRepTools/BRepTools_WireExplorer.cxx @@ -212,7 +212,7 @@ void BRepTools_WireExplorer::Init(const TopoDS_Wire& W, it.Next(); } - //Construction de l ensemble des aretes doubles. + //Construction of the set of double edges. TopoDS_Iterator it2(W); TopTools_MapOfShape emap; while (it2.More()) { @@ -261,8 +261,8 @@ void BRepTools_WireExplorer::Init(const TopoDS_Wire& W, const TopoDS_Edge& E = TopoDS::Edge(it.Value()); TopAbs_Orientation Eori = E.Orientation(); if (Eori == TopAbs_INTERNAL || Eori == TopAbs_EXTERNAL) { - // JYL 10-03-97 : en attendant un traitement correct - // des aretes INTERNAL/EXTERNAL + // JYL 10-03-97 : waiting for correct processing + // of INTERNAL/EXTERNAL edges it.Next(); continue; } @@ -369,15 +369,15 @@ void BRepTools_WireExplorer::Next() } else { if (myFace.IsNull()) { - // Sans la Face On essait qd meme de renvoyer les aretes - // le plus logiquement possible - // En premier choix les aretes degenerees. + // Without Face - try to return edges + // as logically as possible + // At first degenerated edges. TopoDS_Edge E = myEdge; if (SelectDegenerated(l,E)) { myEdge = E; return; } - // En deuxieme choix les aretes doubles. + // At second double edges. E = myEdge; if (SelectDouble(myDoubles,l,E)) { myEdge = E; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx index b68f5036bc..324e2340c0 100755 --- a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.cxx @@ -78,7 +78,7 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const STAT.NbConstrShape++; #endif - //-- impasse sur les surfs definies sur plus d une periode + //-- dead end on surfaces defined on more than one period Face.Orientation(TopAbs_FORWARD); Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface(); @@ -141,7 +141,7 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const //if(degenerated==Standard_False) // C3d.Initialize(edge,Face); - //-- Verification des cas ou on a oublie de coder degenereted : PRO17410 (janv 99) + //-- Check cases when it was forgotten to code degenerated : PRO17410 (janv 99) if(degenerated == Standard_False) { C3d.Initialize(edge,Face); @@ -168,7 +168,7 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const //Standard_Integer nbs = 1 + Geom2dInt_Geom2dCurveTool::NbSamples(C); Standard_Integer nbs = Geom2dInt_Geom2dCurveTool::NbSamples(C); - //-- Attention aux bsplines rationnelles de degree 3. (bouts de cercles entre autres) + //-- Attention to rational bsplines of degree 3. (ends of circles among others) if (nbs > 2) nbs*=4; du = (plbid-pfbid)/(Standard_Real)(nbs-1); @@ -176,10 +176,10 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const else { u = plbid; du=-du; } //-- ------------------------------------------------------------ - //-- On regarde la distance uv entre le point de debut de l edge - //-- et le dernier point enregistre dans SeqPnt2d - //-- On cherche a eloigner le premier point de l edge courant - //-- du dernier point enregistre + //-- Check distance uv between the start point of the edge + //-- and the last point registered in SeqPnt2d + //-- Try to remote the first point of the current edge + //-- from the last saved point #ifdef DEB gp_Pnt2d Pnt2dDebutEdgeCourant= #endif @@ -247,14 +247,14 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const } //-- Edges -> for(Ware.Explorer if(NbEdges) - { //-- on compte ++ avec un explorateur normal et -- avec le Wire Exploreur + { //-- on compte ++ with a normal explorer and with the Wire Explorer /* #ifdef DEB cout << endl; cout << "*** BRepTopAdaptor_Fclass2d ** Wire Probablement FAUX **" << endl; - cout << "*** WireExplorer ne trouve pas tous les edges " << endl; - cout << "*** On Branche l ancien classifieur" << endl; + cout << "*** WireExplorer does not find all edges " << endl; + cout << "*** Connect old classifier" << endl; #endif */ TColgp_Array1OfPnt2d PClass(1,2); @@ -272,12 +272,12 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const Standard_Real angle = 0.0, square = 0.0; //------------------------------------------------------------------- - //-- ** Le mode de calcul a ete un peu change - //-- Avant le 31 oct 97 , on evaluait l'angle total de - //-- rotation du wire sur tous les angles sauf le dernier - //-- ** Maintenant , on evalue exactement l'angle de rotation - //-- Si trouve une valeur eloignee de 2PI ou -2PI, c'est qu il - //-- y a eu un nombre impair de boucles + //-- ** The mode of calculation was somewhat changed + //-- Before Oct 31 97 , the total angle of + //-- rotation of the wire was evaluated on all angles except for the last + //-- ** Now, exactly the angle of rotation is evaluated + //-- If a value remote from 2PI or -2PI is found, it means that there is + //-- an uneven number of loops if(nbpnts>3) { @@ -318,9 +318,9 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const // TabOrien.Append(-1); //#ifdef DEB // cout << endl; -// cout << "*** BRepTopAdaptor_Fclass2d ** Wire Probablement FAUX **" << endl; -// cout << "*** Angle de rotation cumule du wire : " << angle << endl; -// cout << "*** On Branche l ancien classifieur" << endl; +// cout << "*** BRepTopAdaptor_Fclass2d ** Wire Probably FALSE **" << endl; +// cout << "*** Total rotation angle of the wire : " << angle << endl; +// cout << "*** Connect the old classifier" << endl; //#endif // } // else TabOrien.Append(((angle>0.0)? 1 : 0)); @@ -330,9 +330,9 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const { #ifdef DEB cout << endl; - cout << "*** BRepTopAdaptor_Fclass2d ** Wire Probablement FAUX **" << endl; - cout << "*** Le wire echantillonne comporte moins de 3 points" << endl; - cout << "*** On Branche l ancien classifieur" << endl; + cout << "*** BRepTopAdaptor_Fclass2d ** Wire Probably FALSE **" << endl; + cout << "*** The sample wire contains less than 3 points" << endl; + cout << "*** Connect the old classifier" << endl; #endif BadWire=1; TabOrien.Append(-1); @@ -348,7 +348,7 @@ BRepTopAdaptor_FClass2d::BRepTopAdaptor_FClass2d(const TopoDS_Face& aFace,const if(nbtabclass>0) { - //-- Si une erreur sur un wire a ete detecte : On met tous les TabOrien a -1 + //-- If an error was detected on a wire: set all TabOrien to -1 if(BadWire) TabOrien(1)=-1; if( surf->GetType()==GeomAbs_Cone @@ -402,7 +402,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::Perform(const gp_Pnt2d& _Puv, return(TopAbs_IN); } - //-- U1 est le First Param et U2 ds ce cas est U1+Period + //-- U1 is the First Param and U2 in this case is U1+Period Standard_Real u=_Puv.X(); Standard_Real v=_Puv.Y(); Standard_Real uu = u, vv = v; @@ -485,7 +485,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::Perform(const gp_Pnt2d& _Puv, Status = TopAbs_OUT; } } - else { //-- TabOrien(1)=-1 Wire Faux + else { //-- TabOrien(1)=-1 False Wire BRepClass_FaceClassifier aClassifier; aClassifier.Perform(Face,Puv,Toluv); Status = aClassifier.State(); @@ -538,7 +538,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::TestOnRestriction(const gp_Pnt2d& _Puv, return(TopAbs_IN); } - //-- U1 est le First Param et U2 ds ce cas est U1+Period + //-- U1 is the First Param and U2 in this case is U1+Period Standard_Real u=_Puv.X(); Standard_Real v=_Puv.Y(); Standard_Real uu = u, vv = v; @@ -617,7 +617,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::TestOnRestriction(const gp_Pnt2d& _Puv, Status = TopAbs_OUT; } } - else { //-- TabOrien(1)=-1 Wire Faux + else { //-- TabOrien(1)=-1 False Wire BRepClass_FaceClassifier aClassifier; aClassifier.Perform(Face,Puv,Tol); Status = aClassifier.State(); diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx index 7dfef9ecd5..aa53093ef4 100755 --- a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx @@ -18,7 +18,7 @@ BRepTopAdaptor_HVertex::BRepTopAdaptor_HVertex gp_Pnt2d BRepTopAdaptor_HVertex::Value () { // return myCurve->Value(Parameter(myCurve)); - return gp_Pnt2d(RealFirst(),RealFirst()); // rien a faire + return gp_Pnt2d(RealFirst(),RealFirst()); // do nothing } Standard_Real BRepTopAdaptor_HVertex::Parameter @@ -65,13 +65,13 @@ Standard_Real BRepTopAdaptor_HVertex::Resolution } - // a defaut de mieux on borne la resolution parametrique a - // 10 million*la tolerance du point + // for lack of better options limit the parametric solution to + // 10 million*tolerance of the point if(tv > 1.e7*mag) ResUV = 1.e7; else ResUV = tv/mag; - // Controle + // Control if (Or == TopAbs_REVERSED) pp = p+ResUV; else pp = p-ResUV; @@ -85,7 +85,7 @@ Standard_Real BRepTopAdaptor_HVertex::Resolution Standard_Real Dist=P.Distance(P1); if ((Dist>1e-12) && ((Dist > 1.1*tv) || (Dist< 0.8*tv))) { - // Raffinement si possible + // Refine if possible Standard_Real Dist1; if (Or == TopAbs_REVERSED) pp = p+tv/Dist; else pp = p-tv/Dist; @@ -98,7 +98,7 @@ Standard_Real BRepTopAdaptor_HVertex::Resolution DC.SetLinearForm(v2d.X(),DU,v2d.Y(),DV); Dist1 = P.Distance(P1); if (Abs(Dist1-tv) < Abs(Dist-tv)) { - // On prend le resultat d'interpolation + // Take the result of interpolation ResUV = tv/Dist; Dist = Dist1; } @@ -115,7 +115,7 @@ Standard_Real BRepTopAdaptor_HVertex::Resolution S.D0(p2d.X(),p2d.Y(),P1); Dist1 = P.Distance(P1); if (Abs(Dist1-tv) < Abs(Dist-tv)) { - // On prend la nouvelle estimation + // Take the new estimation ResUV = tv/mag; Dist = Dist1; } diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx index 50a6983c65..e8309503ac 100755 --- a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx @@ -224,8 +224,7 @@ static return Adaptor3d_TopolTool::Orientation(C); } //-- ============================================================ -//-- m e t h o d e s u t i l i s e e s p o u r l e s -//-- s a m p l e s +//-- methods used for samples //-- ============================================================ //======================================================================= @@ -252,7 +251,7 @@ void Analyse(const TColgp_Array2OfPnt& array2, C.Y()-B.Y()-B.Y()+A.Y(), C.Z()-B.Z()-B.Z()+A.Z()); Standard_Integer locnbch=0; - for(j=3; j25 pour 2pi + //-- Set 15 for 2pi + //-- Not enough ->25 for 2pi nbsu = (Standard_Integer)(8*(usup-uinf)); nbsv = (Standard_Integer)(7*(vsup-vinf)); if(nbsu<5) nbsu=5; @@ -355,7 +354,7 @@ void Analyse(const TColgp_Array2OfPnt& array2, default: { nbsu = 10; nbsv=10; } break; } - //-- Si le nb de points est trop grand on analyse + //-- If the number of points is too great, analyze //-- //-- diff --git a/src/BSplCLib/BSplCLib.cxx b/src/BSplCLib/BSplCLib.cxx index afb5ddd571..6fbfa550bd 100755 --- a/src/BSplCLib/BSplCLib.cxx +++ b/src/BSplCLib/BSplCLib.cxx @@ -181,8 +181,8 @@ Standard_Integer BSplCLib::FlatIndex //======================================================================= //function : LocateParameter -//purpose : Traitement des noeuds avec multiplicites -//pmn 28-01-97 -> calcule eventuel de la periode. +//purpose : Processing of nodes with multiplicities +//pmn 28-01-97 -> compute eventual of the period. //======================================================================= void BSplCLib::LocateParameter @@ -207,9 +207,9 @@ void BSplCLib::LocateParameter //======================================================================= //function : LocateParameter -//purpose : Pour des noeuds plats -// pmn 28-01-97 -> On a bel est bien besoin du degree pour calculer -// la periode eventuelle +//purpose : For plane nodes +// pmn 28-01-97 -> There is a need of the degre to calculate +// the eventual period //======================================================================= void BSplCLib::LocateParameter @@ -236,9 +236,9 @@ void BSplCLib::LocateParameter //======================================================================= //function : LocateParameter -//purpose : Claculs effectifs -// pmn 28-01-97 : Ajoute les bornes de la periode en argument d'entree, car il est -// car il est imposible de les inventer a ce niveaux. +//purpose : Effective computation +// pmn 28-01-97 : Add limits of the period as input argument, +// as it is imposible to produce them at this level. //======================================================================= void BSplCLib::LocateParameter @@ -284,7 +284,7 @@ void BSplCLib::LocateParameter if ( KnotIndex < Knots.Upper()) { val = NewU - knots[KnotIndex + 1]; if (val < 0) val = - val; - // <= pour etre coherant avec les Segment ou Eps correspond a un bit d'erreur. + // <= to be coherent with Segment where Eps corresponds to a bit of error. if (val <= Eps) KnotIndex++; } if (KnotIndex < First) KnotIndex = First; @@ -309,7 +309,7 @@ void BSplCLib::LocateParameter //======================================================================= //function : LocateParameter //purpose : the index is recomputed only if out of range -//pmn 28-01-97 -> calcule eventuel de la periode. +//pmn 28-01-97 -> eventual computation of the period. //======================================================================= void BSplCLib::LocateParameter @@ -3456,26 +3456,26 @@ void BSplCLib::TangExtendToConstraint //////////////////////////////////////////////////////////////////////// // -// 1. calcul du prolongement nD +// 1. calculation of extension nD // //////////////////////////////////////////////////////////////////////// -// matrice d'Hermite +// Hermite matrix Standard_Integer Csize = Continuity + 2; math_Matrix MatCoefs(1,Csize, 1,Csize); if (After) { - PLib::HermiteCoefficients(0, 1, // Les Bornes - Continuity, 0, // Les Ordres de contraintes + PLib::HermiteCoefficients(0, 1, // Limits + Continuity, 0, // Orders of constraints MatCoefs); } else { - PLib::HermiteCoefficients(0, 1, // Les Bornes - 0, Continuity, // Les Ordres de contraintes + PLib::HermiteCoefficients(0, 1, // Limits + 0, Continuity, // Orders of constraints MatCoefs); } -// positionnement au noeud de raccord +// position at the node of connection Standard_Real Tbord ; if (After) { Tbord = FlatKnots(FlatKnots.Upper()-CDegree); @@ -3491,7 +3491,7 @@ void BSplCLib::TangExtendToConstraint BSplCLib::Eval(Tbord,periodic_flag,derivative_request,extrap_mode[0], CDegree,FlatKnots,CDimension,Poles,*Eadr); -// norme de la tangente au noeud de raccord +// norm of the tangent at the node of connection math_Vector Tgte(1,CDimension); for (ipos=1;ipos<=CDimension;ipos++) { @@ -3500,7 +3500,7 @@ void BSplCLib::TangExtendToConstraint Standard_Real L1=Tgte.Norm(); -// matrice de contraintes +// matrix of constraints math_Matrix Contraintes(1,Csize,1,CDimension); if (After) { @@ -3523,7 +3523,7 @@ void BSplCLib::TangExtendToConstraint } } -// calcul des coefficients du prolongement +// calculate the coefficients of extension Standard_Integer ii, jj, kk; TColStd_Array1OfReal ExtraCoeffs(1,Csize*CDimension); ExtraCoeffs.Init(0.); @@ -3538,14 +3538,14 @@ void BSplCLib::TangExtendToConstraint } } -// calcul des poles du prolongement +// calculate the poles of extension TColStd_Array1OfReal ExtrapPoles(1,Csize*CDimension); Standard_Real * EPadr = &ExtrapPoles(1) ; PLib::CoefficientsPoles(CDimension, ExtraCoeffs, PLib::NoWeights(), ExtrapPoles, PLib::NoWeights()); -// calcul des noeuds du prolongement avec leurs multiplicites +// calculate the nodes of extension with multiplicities TColStd_Array1OfReal ExtrapNoeuds(1,2); ExtrapNoeuds(1) = 0.; ExtrapNoeuds(2) = 1.; @@ -3553,11 +3553,11 @@ void BSplCLib::TangExtendToConstraint ExtrapMults(1) = Csize; ExtrapMults(2) = Csize; -// noeuds plats du prolongement +// flat nodes of extension TColStd_Array1OfReal FK2(1, Csize*2); BSplCLib::KnotSequence(ExtrapNoeuds,ExtrapMults,FK2); -// norme de la tangente au point de raccord +// norm of the tangent at the connection point if (After) { BSplCLib::Eval(0.,periodic_flag,1,extrap_mode[0], Csize-1,FK2,CDimension,*EPadr,*Eadr); @@ -3572,7 +3572,7 @@ void BSplCLib::TangExtendToConstraint } Standard_Real L2 = Tgte.Norm(); -// harmonisation des degres +// harmonisation of degrees TColStd_Array1OfReal NewP2(1, (CDegree+1)*CDimension); TColStd_Array1OfReal NewK2(1, 2); TColStd_Array1OfInteger NewM2(1, 2); @@ -3587,7 +3587,7 @@ void BSplCLib::TangExtendToConstraint NewM2 = ExtrapMults; } -// noeuds plats du prolongement apres harmonisation des degres +// flat nodes of extension after harmonization of degrees TColStd_Array1OfReal NewFK2(1, (CDegree+1)*2); BSplCLib::KnotSequence(NewK2,NewM2,NewFK2); @@ -3598,7 +3598,7 @@ void BSplCLib::TangExtendToConstraint // //////////////////////////////////////////////////////////////////////// -// ratio de reparametrisation +// ratio of reparametrization Standard_Real Ratio=1, Delta; if ( (L1 > Precision::Confusion()) && (L2 > Precision::Confusion()) ) { Ratio = L2 / L1; @@ -3606,21 +3606,21 @@ void BSplCLib::TangExtendToConstraint if ( (Ratio < 1.e-5) || (Ratio > 1.e5) ) Ratio = 1; if (After) { -// on ne bouge pas la premiere BSpline +// do not touch the first BSpline Delta = Ratio*NewFK2(NewFK2.Lower()) - FlatKnots(FlatKnots.Upper()); } else { -// on ne bouge pas la seconde BSpline +// do not touch the second BSpline Delta = Ratio*NewFK2(NewFK2.Upper()) - FlatKnots(FlatKnots.Lower()); } -// resultat de la concatenation +// result of the concatenation Standard_Integer NbP1 = NumPoles, NbP2 = CDegree+1; Standard_Integer NbK1 = FlatKnots.Length(), NbK2 = 2*(CDegree+1); TColStd_Array1OfReal NewPoles (1, (NbP1+ NbP2-1)*CDimension); TColStd_Array1OfReal NewFlats (1, NbK1+NbK2-CDegree-2); -// les poles +// poles Standard_Integer indNP, indP, indEP; if (After) { @@ -3649,26 +3649,26 @@ void BSplCLib::TangExtendToConstraint } } -// les noeuds plats +// flat nodes if (After) { -// on commence avec les noeuds de la surface initiale +// start with the nodes of the initial surface for (ii=1; ii noeuds + multiplicites +// flat nodes --> nodes + multiplicities TColStd_Array1OfReal NewKnots (1, KLength); TColStd_Array1OfInteger NewMults (1, KLength); NewMults.Init(1); @@ -3704,7 +3704,7 @@ void BSplCLib::TangExtendToConstraint } } -// reduction de la multiplicite au second ou a l'avant-dernier noeud +// reduction of multiplicity at the second or the last but one node Standard_Integer Index = 2, M = CDegree; if (After) Index = KLength-1; TColStd_Array1OfReal ResultPoles (1, (NbP1+ NbP2-1)*CDimension); @@ -3721,16 +3721,16 @@ void BSplCLib::TangExtendToConstraint } if (M == CDegree) { -// le nombre de poles de la concatenation +// number of poles of the concatenation NbPolesResult = NbP1 + NbP2 - 1; -// les poles de la concatenation +// the poles of the concatenation Standard_Integer PLength = NbPolesResult*CDimension; for (jj=1; jj<=PLength; jj++) { PRadr[jj-1] = NewPoles(jj); } -// les noeuds plats de la concatenation +// flat nodes of the concatenation Standard_Integer ideb = 0; for (jj=0; jj= 0 de l'unite dont le support -// est tj, tj+d+1. Par suite si Rj = {j-d, ...., j+d+d+1} -// obtient un majorant de la derivee de C en prenant : +// Betaj(t) form a partition >= 0 of the entity with support +// tj, tj+d+1. Consequently if Rj = {j-d, ...., j+d+d+1} +// obtain an upper bound of the derivative of C by taking : // // // diff --git a/src/BSplSLib/BSplSLib.cxx b/src/BSplSLib/BSplSLib.cxx index 9f54082a78..120e6b16ef 100755 --- a/src/BSplSLib/BSplSLib.cxx +++ b/src/BSplSLib/BSplSLib.cxx @@ -207,7 +207,7 @@ void BSplSLib::RationalDerivative(const Standard_Integer UDeg, } } - // --------------- Calcul ---------------- + // --------------- Calculation ---------------- iiM1 = - M1; iiM3 = - M3; @@ -278,7 +278,7 @@ void BSplSLib::RationalDerivative(const Standard_Integer UDeg, // // PrepareEval : // -// Pepare all data for computing points : +// Prepare all data for computing points : // local arrays of knots // local array of poles (multiplied by the weights if rational) // @@ -2770,17 +2770,16 @@ void BSplSLib::MovePoint (const Standard_Real U, } //======================================================================= -//function : Resolution -//purpose : this computes an estimate for the maximum of the +// function : Resolution +// purpose : this computes an estimate for the maximum of the // partial derivatives both in U and in V // // -//le calcul est en tout point semblable a celui des courbes avec un -//indice de plus pour les point de controles. Soient Si,j les -//points de controle pour ls surface et Di,j les poids le cas -//echeant. La preuve des majorants pour les derivees partielles -//sera omise et on a pour Su le majorant suivant dans le cas poly- -//nomial : +// The calculation resembles at the calculation of curves with +// additional index for the control point. Let Si,j be the +// control points for ls surface and Di,j the weights. +// The checking of upper bounds for the partial derivatives +// will be omitted and Su is the next upper bound in the polynomial case : // // // @@ -2790,7 +2789,7 @@ void BSplSLib::MovePoint (const Standard_Real U, // i=1.m // // -// et dans le cas rationel : +// and in the rational case : // // // @@ -2806,7 +2805,7 @@ void BSplSLib::MovePoint (const Standard_Real U, // // // -// avec Rj = {j-d, ...., j+d+d+1}. +// with Rj = {j-d, ...., j+d+d+1}. // // //======================================================================= @@ -3090,7 +3089,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, Standard_Integer VLength = VParameters.Length(); Standard_Real * poles_array; - // extraction des iso u + // extraction of iso u dimension = 4*ULength; TColStd_Array2OfReal Points(1, VLength, 1, dimension); @@ -3109,7 +3108,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, } } - // interpolation des iso u + // interpolation of iso u poles_array = (Standard_Real *) &Points.ChangeValue(1,1) ; BSplCLib::Interpolate(VDegree, VFlatKnots, @@ -3120,7 +3119,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, InversionProblem) ; if (InversionProblem != 0) return; - // extraction des iso v + // extraction of iso v dimension = VLength*4; TColStd_Array2OfReal IsoPoles(1, ULength, @@ -3139,7 +3138,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, IsoPoles (ii,ll+3) = Points(jj, kk+3); } } - // interpolation des iso v + // interpolation of iso v BSplCLib::Interpolate(UDegree, UFlatKnots, UParameters, @@ -3148,7 +3147,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, poles_array[0], InversionProblem); - // recuperation des resultats + // return results for (ii=1; ii <= ULength; ii++) { @@ -3179,7 +3178,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, Standard_Integer VLength = VParameters.Length(); Standard_Real * poles_array; - // extraction des iso u + // extraction of iso u dimension = 3*ULength; TColStd_Array2OfReal Points(1, VLength, 1, dimension); @@ -3197,7 +3196,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, } } - // interpolation des iso u + // interpolation of iso u poles_array = (Standard_Real *) &Points.ChangeValue(1,1) ; BSplCLib::Interpolate(VDegree, VFlatKnots, @@ -3208,7 +3207,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, InversionProblem) ; if (InversionProblem != 0) return; - // extraction des iso v + // extraction of iso v dimension = VLength*3; TColStd_Array2OfReal IsoPoles(1, ULength, @@ -3226,7 +3225,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, IsoPoles (ii,ll+2) = Points(jj, kk+2); } } - // interpolation des iso v + // interpolation of iso v BSplCLib::Interpolate(UDegree, UFlatKnots, UParameters, @@ -3235,7 +3234,7 @@ void BSplSLib::Interpolate(const Standard_Integer UDegree, poles_array[0], InversionProblem); - // recuperation des resultats + // return results for (ii=1; ii <= ULength; ii++) { diff --git a/src/BiTgte/BiTgte_Blend.cxx b/src/BiTgte/BiTgte_Blend.cxx index 72229376f8..1e5daa0efe 100755 --- a/src/BiTgte/BiTgte_Blend.cxx +++ b/src/BiTgte/BiTgte_Blend.cxx @@ -7,10 +7,10 @@ #include -// include - de tous les hxx, -// - de toutes les petites fonctions statiques. +// include - all hxx, +// - all small static functions. -//======================== DEBUT DES FUNCTIONS STATIQUES ============ +//======================== START STATIC FUNCTIONS ============ #include #include @@ -84,7 +84,7 @@ #include #include -// variables pour les performances +// variables for performance Standard_Real t_mkcurve; //Standard_IMPORT extern void ChFi3d_InitChron(OSD_Chronometer& ch); Standard_EXPORT void ChFi3d_InitChron(OSD_Chronometer& ch); @@ -107,12 +107,12 @@ static Standard_Boolean IsOnRestriction(const TopoDS_Vertex& V, const TopoDS_Face& F, TopoDS_Edge& E) { - // on cherche si le Vertex V de CurE est sur une restriction de F. - // si oui, on stocke dans E cette restriction. + // find if Vertex V of CurE is on a restriction of F. + // if yes, store this restriction in E. // dub - 03 01 97 - // Methode un peu brutale : on peut vraisemblablement optimiser par - // un appel direct a la SD des intersections -> Voir LBR + // Method somewhat brutal : possible to really optimize by a + // direct call the SD of intersections -> See LBR Standard_Real f,l; Handle(Geom2d_Curve) CurC = BRep_Tool::CurveOnSurface(CurE,F,f,l); @@ -121,8 +121,8 @@ static Standard_Boolean IsOnRestriction(const TopoDS_Vertex& V, Geom2dAPI_ProjectPointOnCurve Proj; - // On gonfle la tolerance : il vaut mieux construire trop de tuyaux - // que de rater des intersections. + // The tolerance is exaggerated : it is better to construct too many + // tubes than to miss intersections. // Standard_Real Tol = 100 * BRep_Tool::Tolerance(V); Standard_Real Tol = BRep_Tool::Tolerance(V); TopExp_Explorer exp(F,TopAbs_EDGE); @@ -150,7 +150,7 @@ static void Add(const TopoDS_Edge& E, const BRepOffset_Offset& OF, const BRepOffset_Analyse& Analyse, const Standard_Boolean WarningSurBordLibre) -// Si WarningSurBordLibre = TRUE, pas de propagation si l'arete est verte +// If WarningSurBordLibre = TRUE, no propagation if the edge is open. { TopAbs_ShapeEnum Type = S.ShapeType(); @@ -163,9 +163,9 @@ static void Add(const TopoDS_Edge& E, // const TopoDS_Edge& IE = TopoDS::Edge(OF.Generated(OriE)); if ( E.IsEqual(IE)) { if (WarningSurBordLibre) { - // On s'assure alors que ce n'est pas un bord libre. + // It is checked that the border is not free. const TopTools_ListOfShape& L = Analyse.Ancestors(OriE); - if (L.Extent() == 1) break; // On ne fait rien. + if (L.Extent() == 1) break; // Nothing is done. } Map.Add(exp.Current()); break; @@ -223,14 +223,14 @@ static void KPartCurve3d(TopoDS_Edge Edge, Standard_Boolean IsComputed = Standard_False; - // Seach only isos on analytiques surfaces. + // Seach only isos on analytical surfaces. Geom2dAdaptor_Curve C(Curve); GeomAdaptor_Surface S(Surf); GeomAbs_CurveType CTy = C.GetType(); GeomAbs_SurfaceType STy = S.GetType(); BRep_Builder TheBuilder; - if ( STy != GeomAbs_Plane) { // if plane buildcurve3d gere KPart + if ( STy != GeomAbs_Plane) { // if plane buildcurve3d manage KPart if ( CTy == GeomAbs_Line) { gp_Dir2d D = C.Line().Direction(); if ( D.IsParallel(gp::DX2d(),Precision::Angular())) { // Iso V. @@ -311,15 +311,15 @@ static void KPartCurve3d(TopoDS_Edge Edge, gp_Sphere Sph = S.Sphere(); gp_Pnt2d P = C.Line().Location(); gp_Ax3 Axis = Sph.Position(); - // calculde l'iso 0. + // calculate iso 0. gp_Circ Ci = ElSLib::SphereUIso(Axis, Sph.Radius(),0.); - // mise a sameparameter (rotation du cercle - decalage du Y) + // set to sameparameter (rotation of the circle - offset from Y) gp_Dir DRev = Axis.XDirection().Crossed(Axis. Direction()); gp_Ax1 AxeRev(Axis.Location(),DRev); Ci.Rotate(AxeRev, P.Y()); - // transformation en iso U ( = P.X()) + // transformation by iso U ( = P.X()) DRev = Axis.XDirection().Crossed(Axis.YDirection()); AxeRev = gp_Ax1(Axis.Location(), DRev); Ci.Rotate(AxeRev, P.X()); @@ -365,7 +365,7 @@ static void KPartCurve3d(TopoDS_Edge Edge, } } } - else { // Cas Plan + else { // Case Plane Handle(Geom_Curve) C3d = GeomAPI::To3d(Curve,S.Plane()); TheBuilder.UpdateEdge(Edge, C3d, Loc, Tol); IsComputed = Standard_True; @@ -413,7 +413,7 @@ Handle(Geom_Curve) MakeCurve (const BiTgte_CurveOnEdge& HC) C = new Geom_Circle(HC.Circle()); C = new Geom_TrimmedCurve(C,HC.FirstParameter(),HC.LastParameter()); } - else { // on fait l'approx + else { // the approximation is done MakeCurve_Function F(HC); Standard_Integer Deg1, Deg2; Deg1 = Deg2 = 8; @@ -421,12 +421,12 @@ Handle(Geom_Curve) MakeCurve (const BiTgte_CurveOnEdge& HC) Approx_FitAndDivide Fit(F,Deg1,Deg2,Tol,Tol,Standard_True); Standard_Integer i; Standard_Integer NbCurves = Fit.NbMultiCurves(); - // on essaie de rendre la courbe au moins C1 + // it is attempted to make the curve at least C1 Convert_CompBezierCurvesToBSplineCurve Conv; for (i = 1; i <= NbCurves; i++) { - AppParCurves_MultiCurve MC = Fit.Value( i); //Charge la Ieme Curve - TColgp_Array1OfPnt Poles( 1, MC.Degree() + 1); //Recupere les poles + AppParCurves_MultiCurve MC = Fit.Value( i); //Load the Ith Curve + TColgp_Array1OfPnt Poles( 1, MC.Degree() + 1); //Return poles MC.Curve(1, Poles); Conv.AddCurve(Poles); @@ -463,7 +463,7 @@ Handle(Geom_Curve) MakeCurve (const BiTgte_CurveOnEdge& HC) //======================================================================= //function : Touched -//purpose : On ne donne que les faces connexes aux bouchons +//purpose : Only the faces connected with caps are given //======================================================================= static void Touched(const BRepOffset_Analyse& Analyse, @@ -471,8 +471,7 @@ static void Touched(const BRepOffset_Analyse& Analyse, const TopoDS_Shape& Shape, TopTools_MapOfShape& TouchedByCork) { - // pour l'instant on ne fait rien !! - // Le traitement merde !! + // currently nothing is done !! if ( Standard_True) { return; } @@ -509,16 +508,16 @@ static TopoDS_Vertex FindVertex(const gp_Pnt& P, TopExp::Vertices(E,VV[0],VV[1]); for (Standard_Integer i = 0; i < 2 ; i++) { - // si OK dans la Tolerance du Vertex + // if OK la Tolerance du Vertex Tol2 = BRep_Tool::Tolerance(VV[i]); Tol2 *= Tol2; gp_Pnt P1 = BRep_Tool::Pnt(VV[i]); Dist = P.SquareDistance(P1); if ( Dist <= Tol2) return VV[i]; - // sinon dans la tolerance demandee. + // otherwise with the required tolerance. if (TolCarre > Tol2) { if ( Dist <= TolCarre) { - // il faut alors updater la tolerance du Vertex. + // so it is necessary to update the tolerance of Vertex. B.UpdateVertex(VV[i],Tol); return VV[i]; } @@ -630,9 +629,8 @@ static TopoDS_Edge FindCreatedEdge Find = Standard_True; } else { - // On cherche le partage des vertex dans le cas de 3 edges - // tgts consecutifs dont le deuxieme est un edge qui degenere - // le tuyau. + // Find the sharing of vertices in case of tangent consecutive 3 edges + // the second of which is the edge that degenerates the tube. TopLoc_Location CLoc; Standard_Real ff,ll; Handle(Geom_Curve) CET = @@ -679,7 +677,7 @@ static TopoDS_Edge FindCreatedEdge //======================================================================= //function : Bubble -//purpose : Ordonne la sequence de vertex en parametre croissant. +//purpose : Sets in increasing order the sequence of vertices. //======================================================================= static void Bubble(const TopoDS_Edge& E, @@ -733,15 +731,15 @@ static void CutEdge (const TopoDS_Edge& E, SV.Append(it.Value()); } //-------------------------------- - // Tri des vertex sur l edge. + // Parse vertices on the edge. //-------------------------------- Bubble (WE,SV); Standard_Integer NbVer = SV.Length(); //---------------------------------------------------------------- - // Construction des nouvelles edges. - // Remarque : les vertex extremites de l edges ne sont pas - // forcement dans la liste des vertex + // Construction of new edges. + // The vertices at the extremities of edges are not + // necessarily in the list of vertices //---------------------------------------------------------------- if (SV.IsEmpty()) { NE.Append(E); @@ -759,9 +757,9 @@ static void CutEdge (const TopoDS_Edge& E, } } //---------------------------------------------------- - // Traitement des edges fermes - // Si un vertex d intersection est sur le vertex - // commun il doit apparaitre eb debut et en fin de SV. + // Processing of closed edges + // If a vertex of intersection is on the common vertex, + // it should appear at the beginning and the end of SV. //---------------------------------------------------- TopoDS_Vertex VCEI; @@ -781,7 +779,7 @@ static void CutEdge (const TopoDS_Edge& E, continue; } //------------------------------------------- - // Copie de l edge et restriction par V1 V2. + // Copy the edge and restriction by V1 V2. //------------------------------------------- TopoDS_Shape aLocalShape =WE.EmptyCopied(); TopoDS_Edge NewEdge = TopoDS::Edge(aLocalShape); @@ -810,7 +808,7 @@ static void CutEdge (const TopoDS_Edge& E, V1 = V2; } } -//======================== FIN DES FUNCTIONS STATIQUES ============ +//======================== END OF STATIC FUNCTIONS ============ @@ -889,7 +887,7 @@ void BiTgte_Blend::SetStoppingFace(const TopoDS_Face& Face) { myStopFaces.Add(Face); //------------- - // MAJ SD. -> Pour le debouclage, on met les faces d'arrets + // MAJ SD. -> To end loop, set faces of edges //------------- // myInitOffsetFace.SetRoot(Face); // myInitOffsetFace.Bind (Face,Face); @@ -929,8 +927,8 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) { myBuildShape = BuildShape; - // On essaie la couture pour eviter des tuyaux sur bords libres - // qui n en sont pas vraiment. + // Try cutting to avoid tubes on free borders + // that are not actually free. Handle(BRepBuilderAPI_Sewing) Sew = new BRepBuilderAPI_Sewing(myTol); BRepLib::BuildCurves3d(myShape); TopExp_Explorer expf(myShape,TopAbs_FACE); @@ -939,7 +937,7 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) TopoDS_Shape SewedShape = Sew->SewedShape(); if ( SewedShape.IsNull()) Standard_Failure::Raise("Sewing aux fraises"); - // Le sewing a t il modifie des orientations. + // Check if the sewing modified the orientation. expf.Init(myShape,TopAbs_FACE); TopoDS_Face FaceRef = TopoDS::Face(expf.Current()); TopAbs_Orientation OriRef = FaceRef.Orientation(); @@ -953,8 +951,8 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) } } - // On fait le SameParameter cas Sew ne le fait pas (Detecte que les edges - // ne sont pas sameparameter mais ne fait rien.) + // Make SameParameter if Sew does not do it (Detect that edges + // are not sameparameter but it does nothing.) expf.Init(SewedShape, TopAbs_EDGE); for (; expf.More(); expf.Next()) { const TopoDS_Edge& sec = TopoDS::Edge(expf.Current()); @@ -964,7 +962,7 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) TopExp::MapShapesAndAncestors (SewedShape,TopAbs_EDGE,TopAbs_FACE,myAncestors); - // Maj myFaces avec les faces du sewed shape. + // Extend myFaces with the faces of the sewed shape. expf.Init(myShape,TopAbs_FACE); for ( ; expf.More(); expf.Next()) { const TopoDS_Shape& F = expf.Current(); @@ -975,7 +973,7 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) } myShape = SewedShape; -// fin Sewing pour faux bords libres. +// end Sewing for false free borders. #if DEB OSD_Chronometer cl_total, ch; @@ -986,7 +984,7 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) #endif // ---------------------------------------------------------------- - // on met les faces avec la bonne orientation dans le shape initial + // place faces with the proper orientation in the initial shape // ---------------------------------------------------------------- TopExp_Explorer exp(myShape,TopAbs_FACE); for ( ; exp.More(); exp.Next()) { @@ -1002,7 +1000,7 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) } // ---------------------------------------------- - // Calcul des lignes de centres et des surfaces + // Calculate lines of centers and of surfaces // ---------------------------------------------- #if DEB ChFi3d_InitChron(ch); @@ -1015,7 +1013,7 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) #endif // ----------------------------- - // Calcul des Surfaces raccords + // Calculate connection Surfaces // ----------------------------- #if DEB ChFi3d_InitChron(ch); @@ -1028,7 +1026,7 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) #endif // ---------------------------------- - // Calcul du shape genere si demande + // Calculate the generated shape if required // ---------------------------------- #if DEB ChFi3d_InitChron(ch); @@ -1040,8 +1038,8 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape) ChFi3d_ResultChron(ch, t_shape); #endif - // Finalement on construit les courbes 3d des edges - // A VIRER des que le partage sera assure ( A Priori); + // Finally construct curves 3d from edges to be transfered + // since the partition is provided ( A Priori); BRepLib::BuildCurves3d(myResult, Precision::Confusion()); #ifdef DEB @@ -1220,7 +1218,7 @@ const TopoDS_Shape& BiTgte_Blend::SupportShape1(const Standard_Integer Index) const TopTools_ListOfShape& L = myAsDes->Ascendant(CurE); // -------------------------------------------------------------- - // F1 et F2 = les 2 faces paralleles qui s'intersectent en CurE. + // F1 and F2 = 2 parallel faces intersecting at CurE. // -------------------------------------------------------------- const TopoDS_Face& F1 = TopoDS::Face(L.First()); const TopoDS_Shape& Or1 = myInitOffsetFace.ImageFrom(F1); @@ -1241,7 +1239,7 @@ const TopoDS_Shape& BiTgte_Blend::SupportShape2(const Standard_Integer Index) const TopTools_ListOfShape& L = myAsDes->Ascendant(CurE); // -------------------------------------------------------------- - // F1 et F2 = les 2 faces paralleles qui s'intersectent en CurE. + // F1 and F2 = 2 parallel faces intersecting at CurE. // -------------------------------------------------------------- const TopoDS_Face& F2 = TopoDS::Face(L.Last()); const TopoDS_Shape& Or2 = myInitOffsetFace.ImageFrom(F2); @@ -1260,8 +1258,8 @@ Handle(Geom_Curve) BiTgte_Blend::CurveOnShape1 const TopoDS_Edge& CurE = TopoDS::Edge(myCenters(Index)); const TopoDS_Shape& F = myMapSF(CurE).Face(); - // methode un peu brutale basee UNIQUEMENT sur la construction du conge: - // le premier edge du tuyau est justement celui sur Shape1. + // somewhat brutal method based ONLY on the construction of the fillet: + // the first edge of the tube is exactly the edge on Shape1. TopExp_Explorer exp(F,TopAbs_EDGE); const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); @@ -1286,8 +1284,8 @@ Handle(Geom_Curve) BiTgte_Blend::CurveOnShape2 const TopoDS_Edge& CurE = TopoDS::Edge(myCenters(Index)); const TopoDS_Shape& F = myMapSF(CurE).Face(); - // methode un peu brutale basee UNIQUEMENT sur la construction du conge: - // le second edge du tuyau est justement celui sur Shape2. + // somewhat brutal method based ONLY on the construction of the fillet: + // the first edge of the tube is exactly the edge on Shape2. TopExp_Explorer exp(F,TopAbs_EDGE); exp.Next(); @@ -1369,10 +1367,10 @@ Standard_Integer BiTgte_Blend::NbBranches() Standard_Integer NbFaces = myCenters.Extent(); - // pour les cons qui veulent tout savoir avant le Calcul !! + if (NbFaces == 0) return 0; - // pour les autres !! + Standard_Integer i; for ( i = 1; i <= NbFaces; i++) { const TopoDS_Shape& CenterLine = myCenters(i); @@ -1382,10 +1380,9 @@ Standard_Integer BiTgte_Blend::NbBranches() const TopoDS_Shape Shells = Glue.Shells(); - // On reordonne la Map myCenters. - // La methode est brutale et vraisemblablement en n24, - // on fera mieux plus tard. - // Cela dit, je suis d'accord, ce n'est vraiment pas elegant !!!!!!!! + // Reorder Map myCenters. + // The method is brutal and unpolished, + // it is possible to refine it. myNbBranches = 0; TopTools_IndexedMapOfShape tmpMap; @@ -1403,18 +1400,18 @@ Standard_Integer BiTgte_Blend::NbBranches() exp.Init(Shells,TopAbs_SHELL); for (; exp.More(); exp.Next()) { - // CurS = le Shell courant. + // CurS = the current Shell. const TopoDS_Shape CurS = exp.Current(); TopExp_Explorer exp2(CurS, TopAbs_FACE); for (; exp2.More(); exp2.Next()) { - // CurF = La face courante du Shell courant. + // CurF = the current face of the current Shell. const TopoDS_Shape CurF = exp2.Current(); for ( i = 1; i <= NbFaces; i++) { const TopoDS_Shape& Center = myCenters(i); const TopoDS_Shape& Rakk = myMapSF(Center).Face(); - // Rakk = la ieme face raccord generee + // Rakk = the ith generated connection face if (CurF.IsEqual(Rakk)) { tmpMap.Add(Center); Count++; @@ -1441,9 +1438,9 @@ void BiTgte_Blend::IndicesOfBranche Standard_Integer& From, Standard_Integer& To ) const { - // Attention au rangement dans myIndices: - // Si les branches sont 1-4 5-9 10-12, on range dans myIndices: - // 0 4 9 12 + // Attention to the ranking in myIndices: + // If the branches are 1-4 5-9 10-12, it is ranked in myIndices: + // 0 4 9 12 From = myIndices->Value(Index) + 1; To = myIndices->Value(Index + 1); } @@ -1457,19 +1454,19 @@ void BiTgte_Blend::IndicesOfBranche void BiTgte_Blend::ComputeCenters() { // ------------ - // Preanalyse. + // Preanalyze. // ------------ Standard_Real TolAngle = 2*ASin(myTol/Abs(myRadius*0.5)); myAnalyse.Perform(myShape,TolAngle); // ------------------------------------------ - // calcul des faces touchees par les bouchons + // calculate faces touched by caps // ------------------------------------------ TopTools_MapOfShape TouchedByCork; Touched(myAnalyse, myStopFaces, myShape, TouchedByCork); // ----------------------- - // init de l'intersector + // init of the intersector // ----------------------- TopAbs_State Side = TopAbs_IN; if (myRadius < 0.) Side = TopAbs_OUT; @@ -1480,11 +1477,11 @@ void BiTgte_Blend::ComputeCenters() TopTools_MapIteratorOfMapOfShape it; BRep_Builder B; - TopoDS_Compound Co; // juste pour savoir sur quels edges on fait les tuyaux + TopoDS_Compound Co; // to only know on which edges the tubes are made B.MakeCompound(Co); // ---------------------------------------- - // Calcul Sections Face/Face + Propagation + // Calculate Sections Face/Face + Propagation // ---------------------------------------- Standard_Boolean JenRajoute = Standard_True; @@ -1498,7 +1495,7 @@ void BiTgte_Blend::ComputeCenters() while ( !Fini) { // ------------------------------------------------- - // on met dans myFaces les Faces connexes a myEdges. + // locate in myFaces the Faces connected to myEdges. // ------------------------------------------------- Fini = Standard_True; for (it.Initialize(myEdges); it.More(); it.Next()) { @@ -1507,12 +1504,10 @@ void BiTgte_Blend::ComputeCenters() const TopTools_ListOfShape& L = myAncestors.FindFromKey(E); if ( L.Extent() == 1) { - // Alors c'est un bord libre sur lequel la bille - // doit rouler. + // So this is a free border onwhich the ball should roll. myFaces.Add(E); - // on le mets dans myStopFaces pour ne pas propager sur - // le tuyau sur bord libre. + // set in myStopFaces to not propagate the tube on free border. myStopFaces.Add(E); } else { @@ -1526,7 +1521,7 @@ void BiTgte_Blend::ComputeCenters() myEdges.Clear(); // -------------------------------------------- - // Construction des Offsets a toutes les faces. + // Construction of Offsets of all faces. // -------------------------------------------- for (it.Initialize(myFaces); it.More(); it.Next()) { const TopoDS_Shape& AS = it.Key(); @@ -1545,12 +1540,12 @@ void BiTgte_Blend::ComputeCenters() OF1.Init(F,myRadius,EdgeTgt); } } - else { // Alors c'est un edge Bord libre sur lequel la bille roule. + else { // So this is a Free Border edge on which the ball rolls. OF1.Init(TopoDS::Edge(AS),myRadius); } // ------------------------------------ - // Maj de la map des created tangents + // Increment the map of created tangents // ------------------------------------ TopTools_ListOfShape Let; if ( AS.ShapeType() == TopAbs_FACE) { @@ -1584,14 +1579,14 @@ void BiTgte_Blend::ComputeCenters() } } } - // fin MaJ map created tgt + // end of map created tangent if (OF1.Status() == BRepOffset_Reversed || OF1.Status() == BRepOffset_Degenerated ) continue; const TopoDS_Face& F1 = OF1.Face(); - // maj S D + // increment S D myInitOffsetFace.SetRoot(AS); myInitOffsetFace.Bind(AS,F1); @@ -1600,7 +1595,7 @@ void BiTgte_Blend::ComputeCenters() MapSBox.Bind(F1,Box1); // --------------------------------------------- - // intersection avec toutes les faces deja crees. + // intersection with all already created faces. // --------------------------------------------- Fini = !Intersect(AS,F1,MapSBox,OF1,Inter); @@ -1613,10 +1608,10 @@ void BiTgte_Blend::ComputeCenters() //-------------------------------------------------------- - // on a alors cree et intersecte les offsets. - // on construit maintenant les tuyaux. + // so the offsets were created and intersected. + // now the tubes are constructed. //-------------------------------------------------------- - // Construction des tuyaux sur arete. + // Construction of tubes on edge. //-------------------------------------------------------- BRepOffset_Type OT = BRepOffset_Convex; if (myRadius < 0.) OT = BRepOffset_Concave; @@ -1682,7 +1677,7 @@ void BiTgte_Blend::ComputeCenters() MapSBox.Bind(F1,Box1); // --------------------------------------------- - // intersection avec toutes les faces deja crees. + // intersection with all already created faces. // --------------------------------------------- Standard_Boolean IsOnRest = Intersect(E,F1,MapSBox,OF1,Inter); JenRajoute = JenRajoute || IsOnRest; @@ -1692,18 +1687,18 @@ void BiTgte_Blend::ComputeCenters() } } - } // fin while JenRajoute + } // end while JenRajoute myEdges.Clear(); myEdges = Inter.NewEdges(); // ------------------------------------------------------------------- - // il faut maintenant restreindre les edges sur les voisins (sinon on - // va trop loin et on ne peut plus construire les faces). + // now it is necessary to limit edges on the neighbors (otherwise one + // will go too far and will not be able to construct faces). // ------------------------------------------------------------------- - // On y va avec le MakeLoops + // Proceed with MakeLoops BRepOffset_Type OT = BRepOffset_Concave; if (myRadius < 0.) OT = BRepOffset_Convex; @@ -1713,10 +1708,10 @@ void BiTgte_Blend::ComputeCenters() for ( ; it.More(); it.Next()) { const TopoDS_Shape& CurS = it.Key(); - // tuyau sur bord libre, on n en veut pas. + // tube on free border, it is undesirable. if ( myStopFaces.Contains(CurS)) continue; - if ( !myMapSF.IsBound(CurS)) continue; // inverted ou degenere + if ( !myMapSF.IsBound(CurS)) continue; // inverted or degenerated const TopoDS_Face& CurOF = myMapSF(CurS).Face(); LOF.Append(CurOF); @@ -1726,14 +1721,14 @@ void BiTgte_Blend::ComputeCenters() TopExp_Explorer expe(CurF.Oriented(TopAbs_FORWARD),TopAbs_EDGE); for (; expe.More(); expe.Next()) { // -------------------------------------------------------------- - // on met dans myAsDes les edges generes par les restrictions du - // carreau initial si du bon type (On ne met pas les edges qui - // vont disparaitre) + // set in myAsDes the edges generated by limitations of the + // initial square if the type is correct (The edges that will + // disappear are not set) // -------------------------------------------------------------- const TopoDS_Edge& CurE = TopoDS::Edge(expe.Current()); const BRepOffset_ListOfInterval& L = myAnalyse.Type(CurE); if (!L.IsEmpty() && L.First().Type() != OT) { - // a priori ne disparait pas, donc on le met + // a priori doe s not disappear, so it is set TopoDS_Shape aLocalShape = myMapSF(CurF).Generated(CurE); const TopoDS_Edge& CurOE = TopoDS::Edge(aLocalShape); // const TopoDS_Edge& CurOE = @@ -1762,8 +1757,8 @@ void BiTgte_Blend::ComputeCenters() } // ---------------------------------------------------------------- - // Il faut aussi faire les intersections 2d avec les tuyaux generes - // (Utile au debouclage) + // It is also required to make 2D intersections with generated tubes + // (Useful for unwinding) // ---------------------------------------------------------------- BRepOffset_DataMapIteratorOfDataMapOfShapeOffset It(myMapSF); for ( ; It.More(); It.Next()) { @@ -1772,13 +1767,13 @@ void BiTgte_Blend::ComputeCenters() const TopoDS_Face& CurOF = It.Value().Face(); - // on ne deboucle pas les tuyaux sur bord libre. + // no unwinding by tubes on free border. if ( myStopFaces.Contains(CurS)) continue; LOF.Append(CurOF); // -------------------------------------------------------------- - // on met dans myAsDes les edges restrictions du carreau. + // set in myAsDes the edge restrictions of the square // -------------------------------------------------------------- TopExp_Explorer expe(CurOF.Oriented(TopAbs_FORWARD),TopAbs_EDGE); for (; expe.More(); expe.Next()) { @@ -1792,19 +1787,19 @@ void BiTgte_Blend::ComputeCenters() myTol); } // ------------ - // On deboucle + // unwinding // ------------ BRepOffset_MakeLoops MakeLoops; MakeLoops.Build( LOF, myAsDes, myImageOffset ); // ------------------------------------------------------------ - // On a deboucle les edges dont l'un au moins des ancetres est - // une face du shape initial, donc: - // il manque les edges generes par intersection tuyau-tuyau + // It is possible to unwind edges at least one ancestor which of + // is a face of the initial shape, so: + // the edges generated by intersection tube-tube are missing // ------------------------------------------------------------ // -------------------------------------------------------------- - // On met pour l'instant dans les surfaces debouclees + // Currently set the unwinded surfaces in // -------------------------------------------------------------- B.MakeCompound(TopoDS::Compound(myResult)); TopTools_ListIteratorOfListOfShape itLOF(LOF); @@ -1818,7 +1813,7 @@ void BiTgte_Blend::ComputeCenters() myImageOffset.LastImage(CurLOF,Lim); TopTools_ListIteratorOfListOfShape itLim(Lim); for ( ;itLim.More(); itLim.Next()) { - // Si une face est sa propre image, on ne la mets pas + // If a face is its own image, it is not set const TopoDS_Shape& CurLIM = itLim.Value(); if (CurLIM.IsSame(CurLOF)) break; @@ -1828,11 +1823,11 @@ void BiTgte_Blend::ComputeCenters() #ifdef DEB if ( myResult.IsNull()) { - cout << " Pas de Lignes de Centres Generees" << endl; + cout << " No Lines of Generated Centers" << endl; } #ifdef DRAW else { - if (Affich) DBRep::Set("Debouc",myResult); + if (Affich) DBRep::Set("Unwind",myResult); } #endif #endif @@ -1846,13 +1841,12 @@ void BiTgte_Blend::ComputeCenters() void BiTgte_Blend::ComputeSurfaces() { - // on met dans myFaces, les faces reellement impliquee dans - // le raccord + // set in myFaces, the faces actually implied in the connection myFaces.Clear(); - // on construit - // 1 - Les Tuyaux ( Les Vrais Conges) - // 2 - Les Spheres. + // construct + // 1 - Tubes (True Fillets) + // 2 - Spheres. #ifdef DRAW Standard_Integer nbc = 1; @@ -1868,22 +1862,22 @@ void BiTgte_Blend::ComputeSurfaces() BRepOffset_Analyse CenterAnalyse(myResult,TolAngle); // ----------------------------------------------------- - // Construction des tuyaux que l'on benne dans myResult + // Construction of tubes in myResult // ----------------------------------------------------- BRep_Builder B; B.MakeCompound(TopoDS::Compound(myResult)); // -------------------------------------------------------------------- - // Dummy: pour construction des spheres: - // On met dans Co les lignes de centres, puis si il existe au moins 3 - // ligne de centre partageant un meme vertex, Sphere sur ce vertex. + // Dummy: for construction of spheres: + // Set in Co the center line, then it there are at least 3 + // center lines sharing the same vertex, Sphere on this vertex. // -------------------------------------------------------------------- TopoDS_Compound Co; B.MakeCompound(Co); // -------------------------------------------------------------------- - // Iteration sur les les edges lignes de centre - // et On prend leur partie valide apres decoupe, et construction tuyau. + // Iteration on the edges lines of center + // and their valid valid part is taken after cut and tube construction. // -------------------------------------------------------------------- BRepOffset_Type OT = BRepOffset_Concave; if (myRadius < 0.) OT = BRepOffset_Convex; @@ -1896,14 +1890,14 @@ void BiTgte_Blend::ComputeSurfaces() if ( L.Extent() != 2) continue; // -------------------------------------------------------------- - // F1 et F2 = les 2 faces paralleles qui s'intersectent en CurE. + // F1 and F2 = 2 parallel faces intersecting in CurE. // -------------------------------------------------------------- const TopoDS_Face& F1 = TopoDS::Face(L.First()); const TopoDS_Face& F2 = TopoDS::Face(L.Last()); // ----------------------------------------------------- - // on cherche les orientations des edges d'intersection - // dans les faces initiales. + // find the orientation of edges of intersection + // in the initial faces. // ----------------------------------------------------- const TopTools_ListOfShape& LD1 = myAsDes->Descendant(F1); const TopTools_ListOfShape& LD2 = myAsDes->Descendant(F2); @@ -1912,7 +1906,7 @@ void BiTgte_Blend::ComputeSurfaces() TopAbs_Orientation Orien2 = Orientation(CurE, F2, LD2); // --------------------------------------------------------- - // Or1 et Or2 : les shapes generateurs des faces paralleles. + // Or1 and Or2 : the shapes generators of parallel faces // --------------------------------------------------------- const TopoDS_Shape& Or1 = myInitOffsetFace.ImageFrom(F1); const TopoDS_Shape& Or2 = myInitOffsetFace.ImageFrom(F2); @@ -1940,8 +1934,8 @@ void BiTgte_Blend::ComputeSurfaces() } // ---------------------------------------------------------------- - // Si mise en jeu d'un vertex dans le contact, on ne fait rien - // pour l'instant on ne gere pas les vertex ( Inters avec sphere); + // If a vertex is used in contact, currently nothing is done + // and the vertexes are not managed (Intersections with sphere); // ---------------------------------------------------------------- if ( OF1.IsNull() && OE1.IsNull()) continue; @@ -1960,18 +1954,18 @@ void BiTgte_Blend::ComputeSurfaces() GS2 = BRep_Tool::Surface(OF2); } // ---------------------------------------------------------------- - // Si mise en jeu d'un vertex dans le contact, on ne fait rien - // pour l'instant on ne gere pas les vertex ( Inters avec sphere); + // If a vertex is used in contact, currently nothing is done + // and the vertexes are not managed (Intersections with sphere); // ---------------------------------------------------------------- if ( OF2.IsNull() && OE2.IsNull()) continue; TopTools_ListOfShape CurL; - if ( !myImageOffset.HasImage(CurE)) {// les tuyaux ne sont pas deboucles - if ( OF1isEdge && OF2isEdge) { // si je n'ai pas d'image, peut etre - CurL.Append(CurE); // suis-je sur inters tuyau tuyau - } // Voir commentaire sur l'appel a + if ( !myImageOffset.HasImage(CurE)) {// the tubes are not unwinded + if ( OF1isEdge && OF2isEdge) { // if I don't have the image, possibly + CurL.Append(CurE); // I'm on intersection tube-tube + } // See comment on the call to else // MakeLoops continue; } @@ -1980,7 +1974,7 @@ void BiTgte_Blend::ComputeSurfaces() } // --------------------------------------------------------------- - // CurL = List des edges descendant de CurE ( = Decoupes de CurE) + // CurL = List of edges descending from CurE ( = Cuts of CurE) // --------------------------------------------------------------- TopTools_ListIteratorOfListOfShape itl(CurL); for ( ; itl.More(); itl.Next()) { @@ -1992,7 +1986,7 @@ void BiTgte_Blend::ComputeSurfaces() BRep_Tool::CurveOnSurface(CurCutE,F2,f2,l2); if ( PC1.IsNull() || PC2.IsNull()) { #ifdef DEB - cout << "Pas de PCurves sur Intersections : Pas de tuyau construit"; + cout << "No PCurves on Intersections : No tubes constructed"; cout << endl; #endif continue; @@ -2007,7 +2001,7 @@ void BiTgte_Blend::ComputeSurfaces() TopExp::Vertices(CurCutE,V1f,V1l); // find if the pipe on the tangent edges are soon created. - // edges generes par V1f et V1l + Maj MapOnV1f/l + // edges generated by V1f and V1l + Maj MapOnV1f/l E1f = FindCreatedEdge(V1f,CurCutE,myMapSF,MapOnV1f, CenterAnalyse,myRadius,myTol); @@ -2027,8 +2021,8 @@ void BiTgte_Blend::ComputeSurfaces() if ( VlOnE1.IsNull()) VlOnE1 = FindVertex(P2,MapOnV1f,myTol); if ( P1.SquareDistance(P2) < myTol*myTol) { - //BRepOffset_Offset gere les KPart degeneres - //IL FAUT que C soit un cercle de rayon NUL + //BRepOffset_Offset manages degenerated KPart + //It is REQUIRED that C should be a circle with ZERO radius E1 = MakeDegeneratedEdge(C,VfOnE1); } else { @@ -2066,8 +2060,8 @@ void BiTgte_Blend::ComputeSurfaces() if ( VlOnE2.IsNull()) VlOnE2 = FindVertex(P2,MapOnV1f,myTol); if ( P1.SquareDistance(P2) < myTol*myTol) { - //BRepOffset_Offset gere les KPart degeneres - //IL FAUT que C soit un cercle de rayon NUL + //BRepOffset_Offset manages degenerated KParts + //It is REQUIRED that C should be a circle with ZERO radius E2 = MakeDegeneratedEdge(C,VfOnE2); } else { @@ -2091,7 +2085,7 @@ void BiTgte_Blend::ComputeSurfaces() } KPartCurve3d(E2,PC2,GS2); } - // Maj de la Map des Created si reconstruction du Shape est demandee. + // Increment of the Map of Created if reconstruction of the Shape is required if ( myBuildShape) { myCreated.Bind(CurCutE,EmptyMap); @@ -2104,9 +2098,9 @@ void BiTgte_Blend::ComputeSurfaces() // ---------------------------------------------------------- // try to init E1f, E1l, if not found with Analysis. - // Ne devrait se produire que si les edges tangents THEORIQUES - // ne sont pas reelememt tangent ( Cf: Approx des lignes - // d'intersection qui bruitent) + // Should happen only if the THEORETICALLY tangent edges + // are not actually tangent ( Cf: Approximation of lines + // of intersection that add noise.) // ---------------------------------------------------------- TopoDS_Vertex V1,V2; if ( E1f.IsNull() && !VfOnE1.IsNull() && !VfOnE2.IsNull()) { @@ -2151,12 +2145,12 @@ void BiTgte_Blend::ComputeSurfaces() B.Add(myResult,Tuyo); if ( myBuildShape) { - // methode basee UNIQUEMENT sur la construction du conge: - // le premier edge du tuyau est justement celui sur Shape1. + // method based ONLY on the construction of fillet: + // the first edge of the tube is exactly on Shape1. GeomAPI_ProjectPointOnCurve Projector; TopExp_Explorer exp(Tuyo,TopAbs_EDGE); TopoDS_Vertex V1,V2; - if (OF1isEdge) { // On met les CutEdges a jour. + if (OF1isEdge) { // Update CutEdges. const TopoDS_Edge& EOnF1 = TopoDS::Edge(exp.Current()); TopExp::Vertices(EOnF1,V1,V2); @@ -2184,7 +2178,7 @@ void BiTgte_Blend::ComputeSurfaces() TopTools_ListOfShape& L1 = myCutEdges(Or1); L1.Append(V1); L1.Append(V2); } - if (OF2isEdge) { // On met les CutEdges a jour. + if (OF2isEdge) { // Update CutEdges. exp.Next(); const TopoDS_Edge& EOnF2 = TopoDS::Edge(exp.Current()); TopExp::Vertices(EOnF2,V1,V2);; @@ -2226,8 +2220,8 @@ void BiTgte_Blend::ComputeSurfaces() } // --------------------------------------------------- - // Construction des spheres, - // si nombre suffisant de tuyaux arrive sur le vertex + // Construction of spheres, + // if enough tubes arrive at the vertex // --------------------------------------------------- TopTools_IndexedDataMapOfShapeListOfShape Map; TopExp::MapShapesAndAncestors(Co,TopAbs_VERTEX,TopAbs_EDGE,Map); @@ -2272,13 +2266,12 @@ void BiTgte_Blend::ComputeSurfaces() void BiTgte_Blend::ComputeShape() { - // On trouvera dans le Shape final: - // - les Faces non touchees. - // - les tuyaux generes - // - les faces voisines des tuyaux qu'il faut reconstruire en assurant - // le partage. + // Find in the initial Shapel: + // - untouched Faces + // - generated tubes + // - the faces neighbors of tubes that sould be reconstucted preserving sharing. - // Pour Debug : Visu des edges du shape initial qui sont a reconstruire. + // For Debug : Visualize edges of the initial shape that should be reconstructed. #ifdef DRAW if (Affich) { TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(myCutEdges); @@ -2296,10 +2289,10 @@ void BiTgte_Blend::ComputeShape() } } #endif - // fin debug + // end debug // - // On modifie les tuyaux sur arete pour le partage des edges. + // modify the tubes on edge for partition of edges. // Standard_Integer NbS = NbSurfaces(); NbS = 0; @@ -2308,8 +2301,8 @@ void BiTgte_Blend::ComputeShape() if ( S1.ShapeType() == TopAbs_EDGE) { const TopoDS_Edge& E1 = TopoDS::Edge(S1); - // il faut remplacer dans F, les edges decoupe de E1, qui - // representent CutE + // it is required to replace in F the cut edges of E1, that + // represent CutE const TopTools_ListOfShape& VonE = myCutEdges(E1); TopTools_ListOfShape NewE; CutEdge(E1,VonE,NewE); @@ -2329,24 +2322,24 @@ void BiTgte_Blend::ComputeShape() Standard_Integer NbNT = 1; #endif - // Maj de la Map des created. - // On met a jour les edges qui ne changent pas dans le shape resultat - // i.e. les edges invariants dans le debouclage. + // Maj of the Map of created. + // Update edges that do not change in the resulting shape + // i.e. invariant edges in the unwinding. TopExp_Explorer exp(myShape,TopAbs_FACE); // Standard_Integer nbe = 1; for ( ;exp.More(); exp.Next()) { const TopoDS_Face& CurF = TopoDS::Face(exp.Current()); - if ( !myFaces.Contains(CurF)) continue; // alors la face n'est pas touchee + if ( !myFaces.Contains(CurF)) continue; // so the face is not touched - // alors les faces sont debouclees - if ( !myMapSF.IsBound(CurF)) continue; // inverted ou degenere + // so the faces are unwinded + if ( !myMapSF.IsBound(CurF)) continue; // inverted or degenerated const BRepOffset_Offset& Offset = myMapSF(CurF); const TopoDS_Face& CurOF = myMapSF(CurF).Face(); - if ( !myImageOffset.HasImage(CurOF)) // face disparait dans debouclage + if ( !myImageOffset.HasImage(CurOF)) // face disappears in unwinding continue; TopExp_Explorer exp2(CurF,TopAbs_EDGE); @@ -2357,7 +2350,7 @@ void BiTgte_Blend::ComputeShape() // const TopoDS_Edge& CurOE = TopoDS::Edge(Offset.Generated(CurE)); if (!myImageOffset.HasImage(CurOE)) continue; - // CurOE disparait + // CurOE disappears const TopoDS_Edge& ImE = TopoDS::Edge(myImageOffset.Image(CurOE).First()); @@ -2369,34 +2362,34 @@ void BiTgte_Blend::ComputeShape() } } - // Les faces raccords sont deja dans myResult. - // Il faut alors rajouter les faces: - // - non touchees (donc pas dans myFaces) - // - issues du debouclage(non degenerees, non inverted, non disparues) + // The connected faces are already in myResult. + // So it is necessary to add faces: + // - non-touched (so not in myFaces) + // - issuing from the unwinding (non degenerated, non inverted, non disappeared) exp.Init(myShape,TopAbs_FACE); for ( ;exp.More(); exp.Next()) { const TopoDS_Face& CurF = TopoDS::Face(exp.Current()); if ( !myFaces.Contains(CurF)) { - // alors la face n'est pas touchee + // so the face is not touched B.Add(myResult,CurF); } - else { // alors les faces sont debouclees + else { // so the faces are unwindeds - if ( !myMapSF.IsBound(CurF)) continue; // inverted ou degenere + if ( !myMapSF.IsBound(CurF)) continue; // inverted or degenerated const TopoDS_Face& CurOF = myMapSF(CurF).Face(); - if ( !myImageOffset.HasImage(CurOF)) // face disparait dans debouclage + if ( !myImageOffset.HasImage(CurOF)) // face disappears in unwinding continue; - // Liste des faces generees par une face dans le debouclage. + // List of faces generated by a face in the unwinding TopTools_ListOfShape Lim; myImageOffset.LastImage(CurOF,Lim); TopTools_ListIteratorOfListOfShape itLim(Lim); for ( ;itLim.More(); itLim.Next()) { - // DeboucFace = La Face offset debouclee dans "Debouc". + // DeboucFace = offset Face unwinded in "Debouc". const TopoDS_Face& DeboucFace = TopoDS::Face(itLim.Value()); TopLoc_Location L; @@ -2448,7 +2441,7 @@ void BiTgte_Blend::ComputeShape() Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E,Face,f,l); TopoDS_Edge OE; - if ( MapSS.IsBound(E)) { // c`est un edge de couture + if ( MapSS.IsBound(E)) { // this is an edge of cutting OE = TopoDS::Edge(MapSS(E)); TopoDS_Shape aLocalShape = E.Reversed(); Handle(Geom2d_Curve) C2d_1 = @@ -2463,7 +2456,7 @@ void BiTgte_Blend::ComputeShape() B.Range(OE,f,l); } else { - // E a-t-il ume image dans la Map des Created ? + // Is there an image in the Map of Created ? if ( myCreated.IsBound(E)) { if ( myCreated(E).IsBound(CurF)) { OE = TopoDS::Edge(myCreated(E)(CurF).First()); @@ -2524,8 +2517,7 @@ void BiTgte_Blend::ComputeShape() } } - // en desespoir de cause, s'il reste toujours des bords verts sur ce - // satane Shape, on sew le shape. + // non-regarding the cause, there always remain greeb borders on this Shape, so it is sewn. Handle(BRepBuilderAPI_Sewing) Sew = new BRepBuilderAPI_Sewing(myTol); BRepLib::BuildCurves3d(myResult); @@ -2536,8 +2528,8 @@ void BiTgte_Blend::ComputeShape() Sew->Perform(); - // On fait le SameParameter cas Sew ne le fait pas (Detecte que les edges - // ne sont pas sameparameter mais ne fait rien.) + // SameParameter is done in case Sew does not do it (Detect that the edges + // are not sameparameter but does nothing.) const TopoDS_Shape& SewedShape = Sew->SewedShape(); if ( !SewedShape.IsNull()) { @@ -2568,7 +2560,7 @@ Standard_Boolean BiTgte_Blend::Intersect const Bnd_Box& Box1 = MapSBox(Face); // ----------------------------------------------- - // intersection avec toutes les faces deja creees. + // intersection with all already created faces. // ----------------------------------------------- const TopoDS_Shape& InitShape1 = OF1.InitialShape(); Standard_Boolean F1surBordLibre = @@ -2585,7 +2577,7 @@ Standard_Boolean BiTgte_Blend::Intersect if ( Inter.IsDone(Face,F2)) continue; - // on n intersecte pas 2 tuyaix construits sur bord libre. + // 2 tubes created on free border are not intersected. const TopoDS_Shape& InitShape2 = OF2.InitialShape(); Standard_Boolean F2surBordLibre = InitShape2.ShapeType() == TopAbs_EDGE && @@ -2593,7 +2585,7 @@ Standard_Boolean BiTgte_Blend::Intersect #ifdef DEB if ( F1surBordLibre && F2surBordLibre) { - cout << "Rejection : On n intersecte pas 2 tuyaux sur bord libre"; + cout << "Rejection : 2 tubes on free border are not intersected"; cout << endl; } #endif @@ -2601,7 +2593,7 @@ Standard_Boolean BiTgte_Blend::Intersect if ( F1surBordLibre && F2surBordLibre) continue; // ------------------------------------------------------- - // On n'intersecte pas les tuyaux avec ses faces voisines. + // Tubes are not intersected with neighbor faces. // ------------------------------------------------------- const TopoDS_Shape& ItKey = It.Key(); @@ -2613,8 +2605,8 @@ Standard_Boolean BiTgte_Blend::Intersect Inter.FaceInter(Face,F2,myInitOffsetFace); // ------------------------------------------ - // un edge de F1 ou F2 a-t-il ete touche ? - // si oui, on rajoute des faces dans myFaces + // an edge of F1 or F2 has been touched ? + // if yes, add faces in myFaces // ==> JenRajoute = True // ------------------------------------------ TopTools_ListOfShape LInt; @@ -2632,8 +2624,8 @@ Standard_Boolean BiTgte_Blend::Intersect Standard_Boolean IsOnR2 = IsOnRestriction(V1,CurE,F2,E2); #ifdef DEB if (IsOnR1 && IsOnR2) { - cout << "On sort en meme tps sur les 2 faces, "; - cout << "on ne propage pas si bord libre"; + cout << "Leave in the same tps on 2 faces, "; + cout << "propagation only on free border"; cout << endl; } #endif @@ -2655,14 +2647,14 @@ Standard_Boolean BiTgte_Blend::Intersect Standard_Boolean IsOnR1 = IsOnRestriction(V2,CurE,Face,E1); Standard_Boolean IsOnR2 = IsOnRestriction(V2,CurE,F2,E2); - // Si IsOnR1 && IsOnR2, - // On sort en meme tps sur les 2 faces, on ne propage pas - // sur les bords libres. - // A priori, la facette se ferme toute seule. + // If IsOnR1 && IsOnR2, + // Leave in the same tps on 2 faces, propagate only on + // free borders. + // A priori, only facet is closed. #ifdef DEB if (IsOnR1 && IsOnR2) { - cout << "On sort en meme tps sur les 2 faces, "; - cout << "on ne propage pas si bord libre"; + cout << "Leave with the same tps on 2 faces, "; + cout << "propagate only if the border is free"; cout << endl; } #endif diff --git a/src/Bisector/Bisector_Bisec.cxx b/src/Bisector/Bisector_Bisec.cxx index 6b2430216c..82c0e28f0f 100755 --- a/src/Bisector/Bisector_Bisec.cxx +++ b/src/Bisector/Bisector_Bisec.cxx @@ -41,22 +41,22 @@ static void ReplaceByLineIfIsToSmall (Handle(Geom2d_Curve)& Bis, Standard_Real& UFirst, Standard_Real& ULast); //============================================================================= -//function : Constructeur vide +//function : Empty Constructor //============================================================================= Bisector_Bisec::Bisector_Bisec() { } //=========================================================================== -// calcul de la bissectrice entre deux courbes issue d un point. +// calculate the bissectrice between two curves coming from a point. // -// afirstcurve : \ courbes entre lesquelles on veut calculer la -// asecondcurve : / bissectrice. -// apoint : point par lequel doit passer la bissectrice. -// afirstvector : \ vecteurs pour determiner le secteur dans lequel -// asecondvector : / la bissectrice doit se trouver. -// adirection : indique le cote de la bissectrice a conserver. -// tolerance : seuil a partir duquel les bisectrices sont degenerees +// afirstcurve : \ curves between which the +// asecondcurve : / bissectrice is calculated. +// apoint : point through which the bissectrice should pass. +// afirstvector : \ vectors to determine the sector where +// asecondvector : / the bissectrice should be located. +// adirection : shows the the side of the bissectrice to be preserved. +// tolerance : threshold starting from which the bisectrices are degenerated //=========================================================================== void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , @@ -85,7 +85,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , if ( (Type1 == STANDARD_TYPE(Geom2d_Circle) || Type1 == STANDARD_TYPE(Geom2d_Line)) && (Type2 == STANDARD_TYPE(Geom2d_Circle) || Type2 == STANDARD_TYPE(Geom2d_Line)) ) { //------------------------------------------------------------------ - // Bissectrice analytique. + // Analytic Bissectrice. //------------------------------------------------------------------ Handle(Bisector_BisecAna) BisAna = new Bisector_BisecAna(); BisAna->Perform(afirstcurve , @@ -113,7 +113,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , } if (IsLine) { //------------------------------------------------------------------ - // Demi-Droite. + // Half-Staight. //------------------------------------------------------------------ gp_Dir2d N ( - adirection*afirstvector.Y(), adirection*afirstvector.X()); Handle (Geom2d_CartesianPoint) PG = new Geom2d_CartesianPoint(apoint); @@ -138,8 +138,8 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , apoint); if (BisCC -> IsEmpty()) { - // la bissectrice est vide apoint se projette a la fin de la courbe - // guide . Construction d une fausse bissectrice. + // bissectrice is empty. a point is projected at the end of the guide curve. + // Construction of a false bissectrice. // modified by NIZHNY-EAP Mon Feb 21 12:00:13 2000 ___BEGIN___ gp_Dir2d dir1(afirstvector), dir2(asecondvector); Standard_Real @@ -186,15 +186,15 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , } //=========================================================================== -// calcul de la bissectrice entre une courbe et un point issue d un point. +// calculate the bissectrice between a curve and a point starting in a point. // -// afirstcurve : \ courbe et point entre lesquelles on veut calculer la -// asecondpoint : / bissectrice. -// apoint : point par lequel doit passer la bissectrice. -// afirstvector : \ vecteurs pour determiner le secteur dans lequel -// asecondvector : / la bissectrice doit se trouver. -// adirection : indique le cote de la bissectrice a conserver. -// tolerance : seuil a partir duquel les bisectrices sont degenerees +// afirstcurve : \ curve and point the bissectrice between which is calculated. +// asecondpoint : / +// apoint : point through which the bissectrice should pass. +// afirstvector : \ vectors to find the sector where +// asecondvector : / the bissectrice should be located. +// adirection : shows the side of the bissectrice to be preserved. +// tolerance : threshold starting from which the bisectrices are degenerated //=========================================================================== void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , @@ -219,7 +219,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , if ( Type1 == STANDARD_TYPE(Geom2d_Circle) || Type1 == STANDARD_TYPE(Geom2d_Line)) { //------------------------------------------------------------------ - // Bissectrice analytique. + // Analytic Bissectrice. //------------------------------------------------------------------ Handle(Bisector_BisecAna) BisAna = new Bisector_BisecAna(); BisAna -> Perform (afirstcurve , @@ -246,7 +246,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , } if (IsLine) { //------------------------------------------------------------------ - // Demi-Droite. + // Half-Right. //------------------------------------------------------------------ gp_Dir2d N ( -adirection*afirstvector.Y(), adirection*afirstvector.X()); Handle (Geom2d_Line) L = new Geom2d_Line (apoint,N); @@ -326,15 +326,15 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve , } //=========================================================================== -// calcul de la bissectrice entre une courbe et un point issue d un point. +// calculate the bissectrice between a curve and a point starting in a point. // -// afirstpoint : \ point et courbe entre lesquelles on veut calculer la -// asecondcurve : / bissectrice. -// apoint : point par lequel doit passer la bissectrice. -// afirstvector : \ vecteurs pour determiner le secteur dans lequel -// asecondvector : / la bissectrice doit se trouver. -// adirection : indique le cote de la bissectrice a conserver. -// tolerance : seuil a partir duquel les bisectrices sont degenerees +// afirstpoint : \ curve and point the bissectrice between which is calculated. +// asecondcurve : / +// apoint : point through which the bissectrice should pass. +// afirstvector : \ vectors to find the sector where +// asecondvector : / the bissectrice should be located. +// adirection : shows the side of the bissectrice to be preserved. +// tolerance : threshold starting from which the bisectrices are degenerated //=========================================================================== void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint , @@ -360,7 +360,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint , if ( Type1 == STANDARD_TYPE(Geom2d_Circle) || Type1 == STANDARD_TYPE(Geom2d_Line)) { //------------------------------------------------------------------ - // Bissectrice analytique. + // Analytic Bissectrice. //------------------------------------------------------------------ Handle(Bisector_BisecAna) BisAna = new Bisector_BisecAna(); BisAna -> Perform (afirstpoint , @@ -388,7 +388,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint , } if (IsLine) { //------------------------------------------------------------------ - // Demi-Droite. + // Half-Staight. //------------------------------------------------------------------ gp_Dir2d N ( -adirection*afirstvector.Y(), adirection*afirstvector.X()); Handle (Geom2d_Line) L = new Geom2d_Line (apoint,N); @@ -464,14 +464,14 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint , } //=========================================================================== -// calcul de la bissectrice entre deux points issue d un point. +// calculate the bissectrice between two points starting in a point. // -// afirstpoint : \ courbes entre lesquelles on veut calculer la -// asecondpoint : / bissectrice. -// apoint : point par lequel doit passer la bissectrice. -// afirstvector : \ vecteurs pour determiner le secteur dans lequel -// asecondvector : / la bissectrice doit se trouver. -// adirection : indique le cote de la bissectrice a conserver. +// afirstpoint : \ curves the bissectrice between which should be +// asecondpoint : / calculated. +// apoint : point through which the bissectrice should pass. +// afirstvector : \ vectors to find the sector where +// asecondvector : / the bissectrice should be located. +// adirection : shows the side of the bissectrice to be preserved. //=========================================================================== void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint , @@ -549,8 +549,8 @@ static Standard_Boolean PointIsOnCurve(const Handle(Geom2d_Curve)& C, #endif //============================================================================= //function : ReplaceByLineIfIsToSmall -//purpose : Si une bissectrice algorithmique est de taille negligeable elle est -// remplace par une demi-droite. +//purpose : If the size of an algorithmic bissectrice is negligeable it is +// replaced by a half-straight. //============================================================================= static void ReplaceByLineIfIsToSmall (Handle(Geom2d_Curve)& Bis, Standard_Real& UFirst, diff --git a/src/Bisector/Bisector_BisecAna.cxx b/src/Bisector/Bisector_BisecAna.cxx index dbfc20cf77..4bd3f0361f 100755 --- a/src/Bisector/Bisector_BisecAna.cxx +++ b/src/Bisector/Bisector_BisecAna.cxx @@ -46,16 +46,16 @@ Bisector_BisecAna::Bisector_BisecAna() } //============================================================================= -// calcul de la distance du point a la bissectrice. + -// et orientation de la bissectrice. + -// apoint : point de passage. + -// abisector : la bissectrice calculee. + -// afirstvector : premier vecteur. \ + -// asecondvector : deuxieme vecteur./ pour choisir le bon cadran. + -// adirection : indique si bissectrice interieure ou exterieure. + -// aparameter : out : le parametre de depart de la bissectrice. + -// asense : out : le sens de la bissectrice. + -// astatus : out : indique si on garde la bissectrice. + +// calcul the distance betweem the point and the bissectrice. + +// and orientation of the bissectrice. + +// apoint : point of passage. + +// abisector : calculated bissectrice. + +// afirstvector : first vector. \ + +// asecondvector : second vector./ to choose the proper sector. + +// adirection : shows if the bissectrice is interior or exterior. + +// aparameter : out : the start parameter of the bissectrice. + +// asense : out : the direction of the bissectrice. + +// astatus : out : shows if the bissectrice is preserved. + //============================================================================= Standard_Real Bisector_BisecAna::Distance ( const gp_Pnt2d& apoint, @@ -115,21 +115,21 @@ Standard_Real Bisector_BisecAna::Distance ( gp_Dir2d secdirrev = aseconddir.Reversed(); -// 1er passage pour savoir si la courbe est dans le bon cadran +// 1st passage to learn if the curve is in the proper sector if(asense) { - // le status n est determiner que dans le cas oncurve ie: - // la tangente a la bissectrice est bisectrice des deux vecteurs. + // the status is determined only in case on curve ie: + // tangent to the bissectrice is bisectrice of two vectors. Standard_Real SinPlat = 1.e-3; - if (Abs(afirstdir^aseconddir) < SinPlat) { //plat - if (afirstdir*aseconddir >= 0.0) { //tangente confondues - // bonne si le produit scalaire est proche de 1. + if (Abs(afirstdir^aseconddir) < SinPlat) { //flat + if (afirstdir*aseconddir >= 0.0) { //tangent mixed + // correct if the scalar product is close to 1. if (Abs(tangdir*afirstdir) < 0.5) { astatus = Standard_False; } } - else { // tangentes opposees. - // bonne si le produit scalaire proche de 0. + else { // opposed tangents. + // correct if the scalar product is close to 0. if (Abs(tangdir*afirstdir) > 0.5 ) { astatus = Standard_False; } @@ -146,19 +146,19 @@ Standard_Real Bisector_BisecAna::Distance ( // Replacement of -1.E-8 for a tolerance 1.e-4 Standard_Real aTol = 1.e-4; - if ((afirstdir^secdirrev)*adirection < -0.1) { // rentrant + if ((afirstdir^secdirrev)*adirection < -0.1) { // input if((afirstdir^tangdir)*adirection < aTol && (secdirrev^tangdir)*adirection < aTol) asense = Standard_False; } - else if((afirstdir^secdirrev)*adirection > 0.1) { // sortant + else if((afirstdir^secdirrev)*adirection > 0.1) { // output if((afirstdir^tangdir)*adirection < aTol || (secdirrev^tangdir)*adirection < aTol) asense = Standard_False; } - else { // plat + else { // flat if (afirstdir.Dot(secdirrev) > 0.) { // tangent if ((afirstdir^tangdir)*adirection < 0.) asense = Standard_False; } - else{ // rebroussement + else{ // turn back // Modified by Sergey KHROMOV - Thu Oct 31 14:16:53 2002 // if ((afirstdir.Dot(tangdir))*adirection > 0.) asense = Standard_False; if (afirstdir.Dot(tangdir) < 0.) asense = Standard_False; @@ -171,15 +171,15 @@ Standard_Real Bisector_BisecAna::Distance ( } //=========================================================================== -// calcul de la bissectrice entre deux courbes issue d un point. + +// calculate the bissectrice between two curves coming from a point. + // + -// afirstcurve : \ courbes entre lesquelles on veut calculer la + -// asecondcurve : / bissectrice. + -// apoint : point par lequel doit passer la bissectrice. + -// afirstvector : \ vecteurs pour determiner le secteur dans lequel + -// asecondvector : / la bissectrice doit se trouver. + -// adirection : indique le cote de la bissectrice a conserver. + -// tolerance : seuil a partir duquel les bisectrices sont degenerees+ +// afirstcurve : \ curves the bissectrice between which will be calculated. + +// asecondcurve : / + +// apoint : point through which the bissectrice should pass. + +// afirstvector : \ vectors to find the sector where + +// asecondvector : / the bissectrice should be located. + +// adirection : shows the side of the bissectrice to be preserved. + +// tolerance : threshold starting from which the bisectrices are degenerated + //=========================================================================== void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , const Handle(Geom2d_Curve)& asecondcurve , @@ -225,7 +225,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , gp_Lin2d line1,line2; //============================================================================= -// Determination de la nature des arguments. + +// Determination of the nature of arguments. + //============================================================================= if (type1 == STANDARD_TYPE(Geom2d_Circle)) { @@ -273,7 +273,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , switch(cas) { //============================================================================= -// Bissectrice cercle - cercle. + +// Bissectrice circle - circle. + //============================================================================= case 1 : { @@ -281,7 +281,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , Standard_Real radius2 = circle2.Radius(); //----------------------------------------------------- - // Cas particulier ou les deux cercles sont confondus. + // Particular case when two circles are mixed. //----------------------------------------------------- if (circle1.Location().IsEqual(circle2.Location(),PreConf)&& (Abs(radius1 - radius2) <= PreConf)){ @@ -339,7 +339,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , parameter2); } break; - } //fin cas part cercles confondus. + } //end of case mixed circles. if (radius1 < radius2) { gp_Circ2d circle = circle1; @@ -351,9 +351,8 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , radius2 = radius; } - // petit recadrage des cercles. dans le cas ou les cercles - // sont OnCurve , si ils sont presque tangents on les rends - // tangents. + // small reframing of circles. in the case when the circles + // are OnCurve , if they are almost tangent they become tangent. Standard_Real EntreAxe = circle1.Location().Distance(circle2.Location()); Standard_Real D1 = 0.5*(radius1 - EntreAxe - radius2); Standard_Boolean CirclesTangent = Standard_False; @@ -362,7 +361,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , // if ( oncurve && Abs(D1) < PreConf) { if ( oncurve && Abs(D1) < PreConf && tan1.IsParallel(tan2, 1.e-8)) { // Modified by Sergey KHROMOV - Thu Oct 31 12:42:22 2002 Begin - // C2 inclus dans C1 et tangent. + // C2 included in C1 and tangent. circle1.SetRadius(radius1 - D1); circle2.SetRadius(radius2 + D1); CirclesTangent = Standard_True; @@ -373,12 +372,12 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , // if (oncurve && Abs(D1) < PreConf) { if (oncurve && Abs(D1) < PreConf && tan1.IsParallel(tan2, 1.e-8)) { // Modified by Sergey KHROMOV - Thu Oct 31 12:44:25 2002 End - // C2 et C1 tangents et disjoints. + // C2 and C1 tangent and disconnected. circle1.SetRadius(radius1 - D1); circle2.SetRadius(radius2 - D1); CirclesTangent = Standard_True; } - } // fin recadrage. + } // end of reframing. GccAna_Circ2dBisec Bisector(circle1,circle2); @@ -432,14 +431,14 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , if (!thesense) secondparameter = - Precision::Infinite(); if (oncurve) { - // bisectrice droite et oncurve - // soit cassure entre deux cercles de meme rayon soit cercles tangent. - - // si tangent plat et que la bissectrice est du cote de la concavite - // d un des cercle . la bissectrice est un segment du point commun au - // premier des 2 centre de cercle qu elle rencontre. - // dan ce cas il est important de mettre un segmnent pour les - // intersection dans Tool2d. + // bisectrice right and oncurve + // is cut between two circle of the same radius if circles are tangent. + + // if tangent flat and the bissectrice at the side of the concavity + // of one of the circles. the bissectrice is a segment of the point common to + // first of 2 centers of circle that it meets. + // in this case it is important to set a segmnent for + // intersection in Tool2d. if (CirclesTangent) { // Modified by skv - Tue Apr 13 17:23:31 2004 IDEM(Airbus) Begin @@ -462,7 +461,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , } // Modified by skv - Tue Apr 13 17:23:32 2004 IDEM(Airbus) End if (tan1.Dot(tan2) < 0.) { - // plat et nom rebroussement. + // flat and not turn back. Standard_Real Par1 = ElCLib::Parameter(gpline, circle1.Location()); Standard_Real Par2 = ElCLib::Parameter(gpline, circle2.Location()); Standard_Real MinPar = Min(Par1,Par2); @@ -521,13 +520,12 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , break; //============================================================================= -// Bissectrice cercle - droite. + +// Bissectrice circle - straight. + //============================================================================= case 2 : { - // petit recadrage des cercles. dans le cas OnCurve. - // Si le cercle et la droite sont presque tangents on les rends - // tangents. + // small reframing of circles. in case OnCurve. + // If the circle and the straight line are almost tangent they become tangent. if (oncurve) { Standard_Real radius1 = circle1.Radius(); Standard_Real D1 = (line2.Distance(circle1.Location()) - radius1); @@ -580,14 +578,11 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , Handle(Geom2d_Curve) bisectorcurve; if (type == GccInt_Lin) { // ----------------------------------------------------------------- - // Si la bisectrice est une ligne - // => la droite est tangente au cercle. - // Si La portion de bisectrice qui nous interresse est du cote - // du centre. - // => la bisectrice est limitee par le point et le centre du - // cercle. - // Remarque : Dans ce dernier cas la bisectrice est en fait une - // parabole degeneree. + // If the bisectrice is a line + // => the straight line is tangent to the circle. + // It the part of bisectrice concerned is at the side of the center. + // => the bisectrice is limited by the point and the center of the circle. + // Note : In the latter case the bisectrice is a degenerated parabole. // ----------------------------------------------------------------- gp_Pnt2d circlecenter; gp_Lin2d gpline; @@ -636,7 +631,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , break; //============================================================================= -// Bissectrice droite - droite. + +// Bissectrice straight - straight. + //============================================================================= case 3 : { gp_Dir2d Direc1(line1.Direction()); @@ -737,15 +732,15 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , //=========================================================================== -// calcul de la bissectrice entre une courbe et un point issue d un point. + +// calculate the bissectrice between a curve and a point and starting in a point. + // + -// afirstcurve : \ courbe et point entre lesquelles on veut calculer la + -// asecondpoint : / bissectrice. + -// apoint : point par lequel doit passer la bissectrice. + -// afirstvector : \ vecteurs pour determiner le secteur dans lequel + -// asecondvector : / la bissectrice doit se trouver. + -// adirection : indique le cote de la bissectrice a conserver. + -// tolerance : seuil a partir duquel les bisectrices sont degenerees+ +// afirstcurve : \ curve and point the bissectrice between which is calculated + +// asecondpoint : / + +// apoint : point through which the bissectrice should pass. + +// afirstvector : \ vectors to determine the sector in which + +// asecondvector : / the bissectrice should be located. + +// adirection : shows the side of the bissectrice to be preserved. + +// tolerance : threshold starting from which the bisectrices are degenerated+ //=========================================================================== void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , @@ -801,7 +796,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , switch(cas) { //============================================================================= -// Bissectrice point - cercle. + +// Bissectrice point - circle. + //============================================================================= case 1 : { GccAna_CircPnt2dBisec Bisector(circle,asecondpoint->Pnt2d()); @@ -829,12 +824,11 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , if (type == GccInt_Lin) { // ---------------------------------------------------------------------------- -// Si la bisectrice est une ligne -// => le point est sur le cercle. -// Si La portion de bisectrice qui nous interresse est du cote du centre. -// => la bisectrice est limitee par le point et le centre du cercle. -// Remarque : Dans ce dernier cas la bisectrice est en fait un ellipse de petit -// axe nul. +// If the bisectrice is a line +// => the point is on the circle. +// If the part of bisectrice concerned is at the side of the center. +// => the bisectrice is limited by the point and the center of the circle. +// Note : In this latter case the bisectrice is actually an ellipse of small null axis. // ---------------------------------------------------------------------------- circlecenter = circle.Location(); @@ -907,7 +901,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , break; //============================================================================= -// Bissectrice point - droite. + +// Bissectrice point - straight. + //============================================================================= case 2 : { GccAna_LinPnt2dBisec Bisector(line,asecondpoint->Pnt2d()); @@ -960,15 +954,15 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , //=========================================================================== -// calcul de la bissectrice entre une courbe et un point issue d un point. + +// calculate the bissectrice between a curve and a point starting at a point. + // + -// afirstpoint : \ courbes entre lesquelles on veut calculer la + -// asecondcurve : / bissectrice. + -// apoint : point par lequel doit passer la bissectrice. + -// afirstvector : \ vecteurs pour determiner le secteur dans lequel + -// asecondvector : / la bissectrice doit se trouver. + -// adirection : indique le cote de la bissectrice a conserver. + -// tolerance : seuil a partir duquel les bisectrices sont degenerees+ +// afirstpoint : \ curves between which the + +// asecondcurve : / bissectrice is calculated. + +// apoint : point through which the bissectrice should pass. + +// afirstvector : \ vectors to determine the secteur in which + +// asecondvector : / the bissectrice should be located. + +// adirection : shows the side of the bissectrice to be preserved. + +// tolerance : threshold at which the bisectrices become degenerated+ //=========================================================================== void Bisector_BisecAna::Perform(const Handle(Geom2d_Point)& afirstpoint , @@ -996,14 +990,14 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Point)& afirstpoint , } //=========================================================================== -// calcul de la bissectrice entre deux points issue d un point. + +// calculate the bissectrice between two points starting at a point. + // + -// afirstpoint : \ courbes entre lesquelles on veut calculer la + -// asecondpoint : / bissectrice. + -// apoint : point par lequel doit passer la bissectrice. + -// afirstvector : \ vecteurs pour determiner le secteur dans lequel + -// asecondvector : / la bissectrice doit se trouver. + -// adirection : indique le cote de la bissectrice a conserver. + +// afirstpoint : \ curves between which the + +// asecondpoint : / bissectrice is calculated. + +// apoint : point through which the bissectrice should pass. + +// afirstvector : \ vectors to determine the sector in which the + +// asecondvector : / bissectrice should be located. + +// adirection : shows the side of the bissectrice to be preserved. + //=========================================================================== void Bisector_BisecAna::Perform(const Handle(Geom2d_Point)& afirstpoint , @@ -1058,11 +1052,11 @@ Standard_Boolean Bisector_BisecAna::IsExtendAtEnd() const //============================================================================= //function : SetTrim -//purpose : Restriction de la bissectrice par le domaine de la courbe Cu. -// Le domaine de la courbe est l ensemble des points plus pres de la -// courbe que de ses extremites. -// Pour le calcul le domaine est etendu. Extension de Epsilon1 du -// First et du Last parametre de la courbe. +//purpose : Restriction of the bissectrice by the domain of the curve Cu. +// The domain of the curve is the set of points that are closer to the +// than to its extremities. +// For the calculation the domain is extended. Extension of Epsilon1 of the +// First and the Last parameter of the curve. //============================================================================= //void Bisector_BisecAna::SetTrim(const Handle(Geom2d_Curve)& Cu) void Bisector_BisecAna::SetTrim(const Handle(Geom2d_Curve)& ) @@ -1507,9 +1501,8 @@ void Bisector_BisecAna::Init(const Handle(Geom2d_TrimmedCurve)& Bis) //============================================================================= //function : Degenerate -//purpose : Remplace la bisectrice par une droite, -// si la bisectrice est une ellipse, une parabole ou une ellipse -// degenere. +//purpose : Replace the bisectrice by a straight line, +// if the bisectrice is an ellipse, a parabole or a degenerated ellipse. //============================================================================= Standard_Boolean Degenerate(Handle(GccInt_Bisec)& aBisector, const Standard_Real Tolerance) @@ -1528,8 +1521,8 @@ Standard_Boolean Degenerate(Handle(GccInt_Bisec)& aBisector, if (type == GccInt_Hpr) { gphyperbola = aBisector->Hyperbola(); - // Si l Hyperbole est degeneree, elle est remplacee par la droite - // de direction l axe de symetrie. + // If the Hyperbola is degenerated, it is replaced by the straight line + // with direction to the axis if symmetry. if (gphyperbola.MajorRadius() < Tolerance) { gp_Lin2d gpline(gphyperbola.YAxis()); @@ -1547,8 +1540,8 @@ Standard_Boolean Degenerate(Handle(GccInt_Bisec)& aBisector, else if (type == GccInt_Par) { gpparabola = aBisector->Parabola(); - // Si la parabole est degeneree, elle est remplacee par la droite - // issue du Sommet et de direction l axe de symetrie. + // If the parabole is degenerated, it is replaces by the straight + // line starting at the Top and with direction of the axis of symmetry. if (gpparabola.Focal() < Tolerance) { gp_Lin2d gpline(gpparabola.MirrorAxis()); @@ -1560,8 +1553,8 @@ Standard_Boolean Degenerate(Handle(GccInt_Bisec)& aBisector, else if (type == GccInt_Ell) { gpellipse = aBisector->Ellipse(); - // Si l ellipse est degeneree, elle est remplacee par la droite - // definie par le grand axe. + // If the ellipse is degenerated, it is replaced by the straight line + // defined by the great axis. if (gpellipse.MinorRadius() < Tolerance) { gp_Lin2d gpline(gpellipse.XAxis()); diff --git a/src/Bisector/Bisector_BisecCC.cxx b/src/Bisector/Bisector_BisecCC.cxx index 6751f7a05b..00ba746ad4 100755 --- a/src/Bisector/Bisector_BisecCC.cxx +++ b/src/Bisector/Bisector_BisecCC.cxx @@ -107,29 +107,29 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1, Standard_Boolean YaPoly = Standard_True; Standard_Boolean OriInPoly = Standard_False; //--------------------------------------------- - // Calcul premier point du polygone. + // Calculate first point of the polygon. //--------------------------------------------- U = ProjOnCurve (Origin,curve1); P = ValueByInt (U,UC1,UC2,Dist); if (Dist < Precision::Infinite()) { //---------------------------------------------------- - // le parametre du point origine donne un point sur le - // polygone. + // the parameter of the origin point gives a point + // on the polygon. //---------------------------------------------------- myPolygon.Append(Bisector_PointOnBis(UC1,UC2,U,Dist,P)); startIntervals.Append(U); if (P.IsEqual(Origin,Precision::Confusion())) { //---------------------------------------- - // test si le prenier point est l origine. + // test if the first point is the origin. //---------------------------------------- OriInPoly = Standard_True; } } else { //------------------------------------------------------- - // Le point origine est sur un prolongement. - // Recherche du premier point du polygone par dichotomie. + // The origin point is on the extension. + // Find the first point of the polygon by dichotomy. //------------------------------------------------------- dU = (curve1->LastParameter() - U)/(NbPnts - 1); U += dU; @@ -149,7 +149,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1, if ( !myPolygon.Length() == 0) { SupLastParameter(); //---------------------------------------------- - // Construction du polygone de la bissectrice. + // Construction of the polygon of the bissectrice. //--------------------------------------------- U = FirstParameter(); Standard_Real DU = LastParameter() - U; @@ -182,7 +182,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1, } else { //---------------- - // Polygone vide. + // Empty Polygon. //---------------- YaPoly = Standard_False; } @@ -196,17 +196,17 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1, } else { //----------------------------------------------------------------------------- - // Prolongement : La courbe est prolongee au debut ou/et a la fin si - // - une des deux courbes est concave. - // - Les courbes ont un point commun au debut ou/et a la fin - // - l angle d ouverture au point commun entre les deux courbes - // vaut PI. - // le prolongemt au debut est pris en compte si l origine se trouve dessus. - // ie : l origine n est pas dans le polygone. + // Extension : The curve is extended at the beginning and/or the end if + // - one of two curves is concave. + // - the curves have a common point at the beginning and/or the end + // - the angle of opening at the common point between two curves + // values PI. + // the extension at the beginning is taken into account if the origin is found above. + // ie : the origin is not the in the polygon. //----------------------------------------------------------------------------- //--------------------------------- - // Existent ils des prolongemnets ? + // Do the extensions exist ? //--------------------------------- if (OriInPoly) { extensionStart = Standard_False; @@ -217,7 +217,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1, extensionEnd = TestExtension(curve1,curve2,2); //----------------- - // Calcul pointEnd. + // Calculate pointEnd. //----------------- if (extensionEnd) { pointEnd = curve1->Value(curve1->LastParameter()); @@ -229,7 +229,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1, ComputePointEnd(); } //------------------------------------------------------ - // Mise a jour des Bornes des intervalles de definition. + // Update the Limits of intervals of definition. //------------------------------------------------------ if (YaPoly) { if (extensionStart) { @@ -250,7 +250,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1, } else { //-------------------------------------------------- - // Pas de polygone => la bissectrise est un segment. + // No polygon => the bissectrice is a segment. //-------------------------------------------------- startIntervals.Append(0.); endIntervals .Append(pointEnd.Distance(pointStart)); @@ -337,10 +337,10 @@ Handle(Geom2d_Geometry) Bisector_BisecCC::Copy() const //============================================================================= //function : ChangeGuide -//purpose : Changement de la ligne guide pour le parametrage de la bissectrice -// ATTENTION : - Ceci peut inverser le sens de parametrage. -// - Ceci ne concerne que la partie de la courbe -// correspondante au polygone. +//purpose : Changet of the guideline for the parameters of the bissectrice +// ATTENTION : - This can invert the direction of parameterization. +// - This concerns only the part of the curve +// corresponding to the polygon. //============================================================================= Handle(Bisector_BisecCC) Bisector_BisecCC::ChangeGuide() const { @@ -351,13 +351,13 @@ Handle(Bisector_BisecCC) Bisector_BisecCC::ChangeGuide() const C -> IsConvex (1, isConvex2); C -> IsConvex (2, isConvex1); //------------------------------------------------------------------------- - // Construction du nouveau polygone a partir de celui d origine. - // inversion des PointOnBis et Calcul nouveau parametre sur la bissectrice. + // Construction of the new polygon from the initial one. + // inversion of PointOnBis and Calculation of new parameters on the bissectrice. //------------------------------------------------------------------------- Bisector_PolyBis Poly; if (sign1 == sign2 ) { //--------------------------------------------------------------- - // les elements du nouveau polygone sont ranges dans l autre sens. + // elements of the new polygon are ranked in the other direction. //--------------------------------------------------------------- for (Standard_Integer i = myPolygon.Length(); i >=1; i--) { Bisector_PointOnBis P = myPolygon.Value(i); @@ -536,17 +536,17 @@ static Standard_Real Curvature (const Handle(Geom2d_Curve)& C, //============================================================================= //function : Value -//purpose : CALCUL DU POINT COURANT PAR METHODE ITERATIVE. +//purpose : CALCULATE THE CURRENT POINT BY ITERATIVE METHOD. // ---------------------------------------------- -// Calcul du point courant, de la distance du point courant aux deux -// courbes, des parametres sur chaque courbe de la projection du -// point courrant. +// Calculate the current point, the distance from the current point to +// both curves, the parameters on each curve of the projection +// of the current point. // -//method : - Recheche parametre de depart en utilisant . -// - Calcul du parametre U2 sur la courbe C2 solution de H(U,V)= 0 +//method : - Find start parameter by using . +// - Calculate parameter U2 on curve C2 solution of H(U,V)= 0 // - P(U) = F(U,U2) // -// ou : +// or : // ||P2(v0)P1(u)||**2 // F(u,v) = P1(u) - 1/2 *----------------* N(u) // (N(u).P2(v0)P1(u)) @@ -562,14 +562,14 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U, gp_Vec2d T; //----------------------------------------------- - // le polygone est il reduit a un point ou vide? + // is the polygon reduced to a point or empty? //----------------------------------------------- if (myPolygon.Length() <= 1) { return Extension(U,U1,U2,Dist,T); } //----------------------------------------------- - // test U en dehors des bornes du polygone. + // test U out of the limits of the polygon. //----------------------------------------------- if (U < myPolygon.First().ParamOnBis()) { return Extension(U,U1,U2,Dist,T); @@ -579,7 +579,7 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U, } //------------------------------------------------------- - // Recheche parametre de depart en utilisant . + // Find start parameter by using . //------------------------------------------------------- Standard_Integer IntervalIndex = myPolygon.Interval(U); Standard_Real UMin = myPolygon.Value(IntervalIndex ).ParamOnBis(); @@ -601,7 +601,7 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U, VMax = Max(VMin,VMax); VMin = VTemp; Standard_Boolean Valid = Standard_True; //--------------------------------------------------------------- - // Calcul du parametre U2 sur la courbe C2 solution de H(u,v)= 0 + // Calculate parameter U2 on curve C2 solution of H(u,v)=0 //--------------------------------------------------------------- gp_Pnt2d P1; gp_Vec2d T1; @@ -659,14 +659,13 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U, } //---------------------------------------------------------------- - // Si le point n est pas valide - // calcul par intersection. + // If the point is not valid + // calculate by intersection. //---------------------------------------------------------------- if (!Valid) { //-------------------------------------------------------------------- - // Construction de la bisectrice point courbe et de la droite passant - // par P1 et portee par la normale. la curve2 est restreinte par VMin et - // VMax. + // Construction of the bisectrice point curve and of the straight line passing + // by P1 and carried by the normal. curve2 is limited by VMin and VMax. //-------------------------------------------------------------------- Standard_Real DMin = Precision::Infinite(); gp_Pnt2d P; @@ -700,16 +699,16 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U, //============================================================================= //function : ValueByInt -//purpose : CALCUL DU POINT COURANT PAR INTERSECTION. -// ----------------------------------------- -// Calcul du point courant, de la distance du point courant aux deux -// courbes, des parametres sur chaque courbe de la projection du -// point courrant. -// le point courrant au parametre U est l intersection de la -// bissectrice point courbe (P1,curve2) et de la droite passant par -// P1 de vecteur directeur N1. -// P1 est le point courrant de parametre U sur la curve1 et N1 la -// normale en ce point. +//purpose : CALCULATE THE CURRENT POINT BY INTERSECTION. +// ------------------------------------------- +// Calculate the current point, the distance from the current point +// to two curves, the parameters on each curve of the projection of the +// current point. +// the current point with parameter U is the intersection of the +// bissectrice point curve (P1,curve2) and of the straight line +// passing through P1 of director vector N1. +// P1 is the current point of parameter U on curve1 and N1 the +// normal at this point. //============================================================================= gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U, Standard_Real& U1, @@ -717,7 +716,7 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U, Standard_Real& Dist) const { //------------------------------------------------------------------ - // Recuperation des point,tangente,normale sur C1 au parametre U. + // Return point, tangent, normal on C1 at parameter U. //------------------------------------------------------------------- U1 = LinkBisCurve(U); @@ -727,7 +726,7 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U, gp_Vec2d N1( Tan1.Y(), - Tan1.X()); //-------------------------------------------------------------------------- - // test de confusion de P1 avec extremite de curve2. + // test confusion of P1 with extremity of curve2. //-------------------------------------------------------------------------- if (P1.Distance(curve2->Value(curve2->FirstParameter())) < Precision::Confusion()) { U2 = curve2->FirstParameter(); @@ -791,7 +790,7 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U, Standard_Real SquareP2P1 = P2P1.SquareMagnitude(); Standard_Real N1P2P1 = N1.Dot(P2P1); - // Test si la solution est du bon cote des courbes. + // Test if the solution is at the proper side of the curves. if (N1P2P1*sign1 > 0 ) { P = P1.Translated(- (0.5*SquareP2P1/N1P2P1)*N1); DistPP1 = P1.SquareDistance(P); @@ -851,14 +850,14 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U, if (YaSol) { Dist = DMin; //-------------------------------------------------------------- - // Point trouve => Test distance courbure + Test angulaire + // Point found => Test curve distance + Angular Test //--------------------------------------------------------------- P2 = curve2->Value(U2); gp_Vec2d PP1(P1.X() - PSol.X(),P1.Y() - PSol.Y()); gp_Vec2d PP2(P2.X() - PSol.X(),P2.Y() - PSol.Y()); //----------------------------------------------- - // Dist = produit des normes = distance au carre. + // Dist = product of norms = distance at the square. //----------------------------------------------- if (PP1.Dot(PP2) > (1. - Precision::Angular())*Dist) { YaSol = Standard_False; @@ -968,12 +967,12 @@ gp_Vec2d Bisector_BisecCC::DN(const Standard_Real U, //============================================================================= //function : Values -// purpose : la courbe peut etre decrite par les equations suivantes: +// purpose : the curve can be described by the following equations: // // B(u) = F(u,v0) -// ou v0 = Phi(u) est donne par H (u,v) = 0. +// where v0 = Phi(u) is given by H (u,v) = 0. // -// avec : +// with : // ||P2(v0)P1(u)||**2 // F(u,v) = P1(u) - 1/2 *----------------* N(u) // (N(u).P2(v0)P1(u)) @@ -982,8 +981,8 @@ gp_Vec2d Bisector_BisecCC::DN(const Standard_Real U, // // => dB(u)/du = dF/du + dF/dv(- dH/du:dH/dv) // -// Remarque : la tangente a la bisectrice est bissectrice aux -// tangentes T1(u) et T2(v0) +// Note : tangent to the bisectrice is bissectrice at +// tangents T1(u) and T2(v0) // //============================================================================= void Bisector_BisecCC::Values (const Standard_Real U, @@ -997,13 +996,13 @@ void Bisector_BisecCC::Values (const Standard_Real U, V2 = gp_Vec2d(0.,0.); V3 = gp_Vec2d(0.,0.); //------------------------------------------------------------------------- - // Calcul du point courant sur la bisectrice et des parametres sur chaque - // courbe. + // Calculate the current point on the bisectrice and the parameters on each + // curve. //------------------------------------------------------------------------- Standard_Real U0,V0,Dist; //----------------------------------------------- - // le polygone est il reduit a un point ou vide? + // is the polygon reduced to a point or empty? //----------------------------------------------- if (myPolygon.Length() <= 1) { P = Extension(U,U0,V0,Dist,V1); @@ -1020,27 +1019,27 @@ void Bisector_BisecCC::Values (const Standard_Real U, if (N == 0) return; //------------------------------------------------------------------ - // Recuperation des point,tangente,normale sur C1 au parametre U0. + // Return point, tangent, normal to C1 by parameter U0. //------------------------------------------------------------------- - gp_Pnt2d P1 ; // point sur C1. - gp_Vec2d Tu ; // tangente a C1 en U0. - gp_Vec2d Tuu ; // derivee seconde a C1 en U0. + gp_Pnt2d P1 ; // point on C1. + gp_Vec2d Tu ; // tangent to C1 by U0. + gp_Vec2d Tuu ; // second derivative to C1 by U0. curve1->D2(U0,P1,Tu,Tuu); - gp_Vec2d Nor( - Tu .Y() , Tu .X()); // Normale en U0. - gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivee de la normale en U0. + gp_Vec2d Nor( - Tu .Y() , Tu .X()); // Normal by U0. + gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivative of the normal by U0. //------------------------------------------------------------------- - // Recuperation des point,tangente,normale sur C2 au parametre V0. + // Return point, tangent, normale to C2 by parameter V0. //------------------------------------------------------------------- - gp_Pnt2d P2 ; // point sur C2. - gp_Vec2d Tv ; // tangente a C2 en V. - gp_Vec2d Tvv ; // derivee seconde a C2 en V. + gp_Pnt2d P2 ; // point on C2. + gp_Vec2d Tv ; // tangent to C2 by V. + gp_Vec2d Tvv ; // second derivative to C2 by V. curve2->D2(V0,P2,Tv,Tvv); gp_Vec2d PuPv(P2.X() - P1.X(), P2.Y() - P1.Y()); //----------------------------- - // Calcul de dH/du et de dH/dv. + // Calculate dH/du and dH/dv. //----------------------------- Standard_Real TuTu,TvTv,TuTv; Standard_Real TuPuPv,TvPuPv ; @@ -1058,7 +1057,7 @@ void Bisector_BisecCC::Values (const Standard_Real U, TvPuPv*(TvvPuPv + TvTv)*TuTu); //----------------------------- - // Calcul de dF/du et de dF/dv. + // Calculate dF/du and dF/dv. //----------------------------- Standard_Real NorPuPv,NuPuPv,NorTv; Standard_Real A,B,dAdu,dAdv,dBdu,dBdv,BB; @@ -1098,8 +1097,8 @@ void Bisector_BisecCC::Values (const Standard_Real U, //============================================================================= //function : Extension -// purpose : Calcul du point courant sur les extensions ou prolongement en -// tangence de la courbe. +// purpose : Calculate the current point on the extensions +// by tangence of the curve. //============================================================================ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U, Standard_Real& U1, @@ -1119,7 +1118,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U, if (myPolygon.Length() == 0) { //--------------------------------------------- - // Polygone vide => segment (pointStart,pointEnd) + // Empty Polygon => segment (pointStart,pointEnd) //--------------------------------------------- dU = U - startIntervals.First(); P = pointStart; @@ -1135,7 +1134,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U, dU = U - PRef.ParamOnBis(); if (extensionStart) { //------------------------------------------------------------ - // extension = segment (pointstart,premier point du polygone.) + // extension = segment (pointstart, first point of the polygon.) //------------------------------------------------------------ P1 = pointStart; U1 = curve1->FirstParameter(); @@ -1153,7 +1152,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U, dU = U - PRef.ParamOnBis(); if (extensionEnd) { //------------------------------------------------------------ - // extension = segment (dernier point du polygone.pointEnd) + // extension = segment (last point of the polygon.pointEnd) //------------------------------------------------------------ P1 = pointEnd; U1 = curve1->LastParameter(); @@ -1168,8 +1167,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U, if (ExtensionTangent) { //----------------------------------------------------------- - // Si la courbe n a pas d extension, celle ci est prolonge - // en tangence. + // If the la curve has no a extension, it is extended by tangency //------------------------------------------------------------ U1 = PRef.ParamOnC1(); U2 = PRef.ParamOnC2(); @@ -1201,7 +1199,7 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA, Standard_Real& Dist) { //------------------------------------------------------------------ - // Recuperation des point,tangente,normale sur CA au parametre UOnA. + // Return point,tangent, normal on CA with parameter UOnA. //------------------------------------------------------------------- gp_Pnt2d P1,P2,P,PSol; gp_Vec2d Tan1,Tan2; @@ -1212,7 +1210,7 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA, gp_Vec2d N1(Tan1.Y(), - Tan1.X()); //-------------------------------------------------------------------------- - // test de confusion de P1 avec extremite de curve2. + // test of confusion of P1 with extremity of curve2. //-------------------------------------------------------------------------- if (P1.Distance(CB->Value(CB->FirstParameter())) < Precision::Confusion()) { UOnB = CB->FirstParameter(); @@ -1243,13 +1241,13 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA, Standard_Real UPC; Standard_Boolean YaSol = Standard_False; //-------------------------------------------------------------------- - // Construction de la bisectrice point courbe et de la droite passant - // par P1 et portee par la normale. + // Construction of the bisectrice point curve and of the straight line passing + // through P1 and carried by the normal. //-------------------------------------------------------------------- Handle(Bisector_BisecPC) BisPC = new Bisector_BisecPC(CB,P1,SignB ); //------------------------------- - // Test si la bissectrice existe. + // Test if the bissectrice exists. //------------------------------- if (BisPC->IsEmpty()) { Dist = Precision::Infinite(); @@ -1283,7 +1281,7 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA, } if (YaSol) { //-------------------------------------------------------------- - // Point trouve => Test distance courbure + Test angulaire + // Point found => Test distance curvature + Angular test //--------------------------------------------------------------- P2 = CB->Value(UOnB); gp_Dir2d PP1Unit(P1.X() - PSol.X(),P1.Y() - PSol.Y()); @@ -1321,9 +1319,9 @@ void Bisector_BisecCC::SupLastParameter() { endIntervals.Append(curve1->LastParameter()); // ---------------------------------------------------------------------- - // Calcul du parametre sur curve1 associees a l une ou lautre des extremites - // de curve2 suivant les valeurs de sign1 et sign2. - // la bissectrice est restreinte par les parametres obtenus. + // Calculate parameter on curve1 associated to one or the other of the extremities + // of curve2 following the values of sign1 and sign2. + // the bissectrice is limited by the obtained parameters. //------------------------------------------------------------------------ Standard_Real UOnC1,UOnC2,Dist; if (sign1 == sign2) { diff --git a/src/Bisector/Bisector_BisecPC.cxx b/src/Bisector/Bisector_BisecPC.cxx index 1b785314e1..6240aa9607 100755 --- a/src/Bisector/Bisector_BisecPC.cxx +++ b/src/Bisector/Bisector_BisecPC.cxx @@ -87,7 +87,7 @@ void Bisector_BisecPC::Perform(const Handle(Geom2d_Curve)& Cu, sign = Side; isConvex = Bisector::IsConvex(curve,sign); //-------------------------------------------- - // Calcul intervalle de definition. + // Calculate interval of definition. //-------------------------------------------- ComputeIntervals(); if (isEmpty) return; @@ -285,8 +285,8 @@ Standard_Boolean Bisector_BisecPC::IsClosed() const { if (curve->IsClosed()) { //----------------------------------------------------------------------- - // La bisectrice est fermee si la curve est fermee et que la bissectrice - // a un seul domaine de continuite egale a celui de la courbe. + // The bisectrice is closed if the curve is closed and the bissectrice + // has only one domain of continuity equal to the one of the curve. // ----------------------------------------------------------------------- if (startIntervals.First() == curve->FirstParameter() && endIntervals .First() == curve->LastParameter () ) @@ -339,14 +339,14 @@ void Bisector_BisecPC::Extension(const Standard_Real U, //============================================================================= //function : Values -// purpose : A chaque point de la courbe est associe un point sur la -// bissectrice. l equation de la bissectrice est: +// purpose : To each point of the curve is associated a point on the +// bissectrice. The equation of the bissectrice is: // || PP(u)||**2 // F(u) = P(u) - 1/2* -------------- * N(u) // (N(u)|PP(u)) // -// N(u) normale a la courbe en u. -// ( | ) designe le produit scalaire. +// N(u) normal to the curve by u. +// ( | ) designation of the scalar product. //============================================================================= void Bisector_BisecPC::Values(const Standard_Real U, const Standard_Integer N, @@ -387,9 +387,9 @@ void Bisector_BisecPC::Values(const Standard_Real U, } else {return; } - if (N == 0) return; // Fin Calcul Point; + if (N == 0) return; // End Calculation Point; - gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivee de la normale en U. + gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivative of the normal by U. Standard_Real NuPPC = Nu .Dot(PPC); Standard_Real TuPPC = Tu .Dot(PPC); Standard_Real NorPPCE2 = NorPPC*NorPPC; @@ -398,7 +398,7 @@ void Bisector_BisecPC::Values(const Standard_Real U, //-------------------------- V1 = Tu - A1*Nu - A2*Nor; //-------------------------- - if (N == 1) return; //Fin calcul D1. + if (N == 1) return; // End calculation D1. gp_Vec2d Nuu ( - T3u.Y() , T3u.X()); @@ -442,13 +442,13 @@ static Standard_Real Curvature (const Handle(Geom2d_Curve)& C, //============================================================================= //function : Distance -//purpose : distance au carre du point de parametre U a la courbe et au point: +//purpose : distance at the square of the point of parameter U to the curve and at point: // // 2 ||PP(u)||**4 2 // d = 1/4* ------------------- ||Nor|| // (Nor(u)/PP(u))**2 // -// ou Nor est la normale a la courbe en U. +// where Nor is the normal to the curve by U. //============================================================================= Standard_Real Bisector_BisecPC::Distance (const Standard_Real U) const { @@ -468,9 +468,9 @@ Standard_Real Bisector_BisecPC::Distance (const Standard_Real U) const if (point.IsEqual(PC,Precision::Confusion())) { if (isConvex) { return 0.;} //---------------------------------------------------- - // le point est sur une courbe concave. - // Le point voulu n est pas le point commun. - // ceci pour evite la discontinuite de la bisectrice. + // the point is on a concave curve. + // The required point is not the common point. + // This can avoid the discontinuity of the bisectrice. //---------------------------------------------------- else { return Precision::Infinite();} } @@ -482,7 +482,7 @@ Standard_Real Bisector_BisecPC::Distance (const Standard_Real U) const Standard_Real A = 0.5*SquareMagPPC/Prosca; Standard_Real Dist = A*A*NorNor; //---------------------------------------- - // Test Courbure si la courbe est concave. + // Test Curvature if the curve is concave. //---------------------------------------- // if (!isConvex){ // Standard_Real K = Curvature(curve,UOnCurve,Precision::Confusion()); @@ -687,20 +687,19 @@ void Bisector_BisecPC::ComputeIntervals () endIntervals .Append(UEnd); //------------------------------------------------------------------------ - // Decalage eventuel du parametre sur la courbe par rapport a celui sur - // la curve. Le decalage est effectue si la curve est periodique. et - // que le point de parametre initial est interieure a un interval de cont - // inuite. + // Eventual offset of the parameter on the curve correspondingly to the one + // on the curve. The offset can be done if the curve is periodical and the + // point of initial parameter is less then the interval of continuity. //------------------------------------------------------------------------ if (curve->IsPeriodic()) { if (startIntervals.Length() > 1) { // Plusieurs intervals. if (endIntervals .Last() == curve->LastParameter() && startIntervals.First() == curve->FirstParameter() ) { //--------------------------------------------------------------- - // la bissectrice est definie a l origine. - // => Fusion du premier et du dernier interval. - // => le 0 sur la bisectrice devient le debut du premier interval - // => decalage de parametre sur toutes les bornes des intervals. + // the bissectrice is defined at the origin. + // => Fusion of the first and the last interval. + // => 0 on the bisectrice becomes the start of the first interval + // => offset of parameter on all limits of intervals. //--------------------------------------------------------------- startIntervals.Remove(1); endIntervals .Remove(endIntervals.Length()); diff --git a/src/Bisector/Bisector_Inter.cxx b/src/Bisector/Bisector_Inter.cxx index 15a56883c3..86c37613ca 100755 --- a/src/Bisector/Bisector_Inter.cxx +++ b/src/Bisector/Bisector_Inter.cxx @@ -97,7 +97,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1, gp_Pnt2d PMin,PMax; //------------------------------------------------------ - // Recuperation Min Max domain1. + // Return Min Max domain1. //------------------------------------------------------ if (D1.HasFirstPoint()) {MinDomain = D1.FirstParameter();} else {MinDomain = RealFirst(); } @@ -106,8 +106,8 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1, else {MaxDomain = RealLast(); } //---------------------------------------------------------- - // Decoupage de la premiere courbe selon les intervalles de - // continuite en tenant compte de D1 + // Cutting the first curve by the intervals of + // continuity taking account of D1 //---------------------------------------------------------- //for (Standard_Integer IB1 = 1; IB1 <= Bis1->NbIntervals(); IB1++) { Standard_Integer IB1; @@ -125,7 +125,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1, if ((IB1 == 1 && Bis1->IsExtendAtStart()) || (IB1 == Bis1->NbIntervals() && Bis1->IsExtendAtEnd()) ){ //-------------------------------------------------------- - // Portion correspondante a une extension est un segment. + // Part corresponding to an extension is a segment. //-------------------------------------------------------- SBis1 [IB1] = ConstructSegment (PMin,PMax,UMin,UMax); } @@ -137,7 +137,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1, } //------------------------------------------------------ - // Recuperation Min Max domain2. + // Return Min Max domain2. //------------------------------------------------------ if (D2.HasFirstPoint()) {MinDomain = D2.FirstParameter();} else {MinDomain = RealFirst(); } @@ -146,8 +146,8 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1, else {MaxDomain = RealLast(); } //---------------------------------------------------------- - // Decoupage de la deuxieme courbe selon les intervalles de - // continuite en tenant compte de D2 + // Cut the second curve following the intervals of + // continuity taking account of D2 //---------------------------------------------------------- //for (Standard_Integer IB2 = 1; IB2 <= Bis2->NbIntervals(); IB2++) { Standard_Integer IB2; @@ -165,7 +165,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1, if ((IB2 == 1 && Bis2->IsExtendAtStart()) || (IB2 == Bis1->NbIntervals() && Bis2->IsExtendAtEnd()) ){ //-------------------------------------------------------- - // Portion correspondante a une extension est un segment. + // Part corresponding to an extension is a segment. //-------------------------------------------------------- SBis2 [IB2] = ConstructSegment (PMin,PMax,UMin,UMax); } @@ -177,7 +177,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1, } //-------------------------------------------------------------- - // Boucle sur les intersections des portions de chaque courbe. + // Loop on the intersections of parts of each curve. //-------------------------------------------------------------- for ( IB1 = 1; IB1 <= NB1; IB1++) { for ( IB2 = 1; IB2 <= NB2; IB2++) { @@ -254,9 +254,9 @@ void Bisector_Inter::SinglePerform(const Handle(Geom2d_Curve)& CBis1, Handle(Bisector_BisecCC)::DownCast(Bis2),D2,Tol); } else { - // Si on arrive la une des deux bissectrices est un segment. - // Si une des bissectrice n est pas un segment on teste si - // ses extremites sont sur la droite + // If we are here one of two bissectrices is a segment. + // If one of bissectrices is not a segment, it is tested if + // its extremities are on the straight line. if (Type1 == STANDARD_TYPE(Geom2d_Line) && Type2 != STANDARD_TYPE(Geom2d_Line)) { TestBound(Handle(Geom2d_Line)::DownCast(Bis1), @@ -297,15 +297,14 @@ void Bisector_Inter::SinglePerform(const Handle(Geom2d_Curve)& CBis1, //=================================================================================== // function : NeighbourPerform -// putpose : Recherche de l intersection de 2 bissectrices courbe/courbe -// Voisines (ie Bis1 separe A et B et Bis2 separe B et C). -// Bis1 est parametree par B et Bis2 par C. +// putpose : Find the intersection of 2 neighbor bissectrices curve/curve +// (ie Bis1 separates A and B and Bis2 separates B and C). +// Bis1 is parameterized by B and Bis2 by C. // -// Methode : On parametre Bis2 par B -// les 2 bissectrices sont alors parametree par la meme -// courbe. -// Soientt D1(u) = d(Bis1(u),B(u)) et D2(U) = d(Bis2(u),B(U)) -// On cherche le parametre U0 pour lequel D1(U0)-D2(U0) = 0. +// Method : Bis2 is parameterized by B +// 2 bissectrices are thus parameterized by the same curve. +// Let D1(u) = d(Bis1(u),B(u)) and D2(U) = d(Bis2(u),B(U)) +// Parameter U0 for which D1(U0)-D2(U0) = 0 is found. //=================================================================================== void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1, const IntRes2d_Domain& D1, @@ -325,7 +324,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1, Handle(Geom2d_Curve) Guide; Handle(Bisector_BisecCC) BisTemp; - // Changement ligne guide sur Bis2. + // Change guiedline on Bis2. BisTemp = Bis2->ChangeGuide(); Guide = Bis2->Curve(2); #ifdef DEB @@ -335,7 +334,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1, Bis2->ValueAndDist(D2.FirstParameter(),U1,UMax,Dist); Bis2->ValueAndDist(D2.LastParameter() ,U1,UMin,Dist); #endif - // Calcul du domaine d intersection sur la ligne guide. + // Calculate the domain of intersection on the guideline. UMin = Max (D1.FirstParameter(),UMin); UMax = Min (D1.LastParameter() ,UMax); @@ -343,7 +342,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1, if (UMin - Eps > UMax + Eps) {return;} - // Resolution F = 0 pour trouver le point commun. + // Solution F = 0 to find the common point. Bisector_FunctionInter Fint (Guide,Bis1,BisTemp); math_BissecNewton Sol (Fint,UMin,UMax,Tol,20); if (Sol.IsDone()) { @@ -361,11 +360,10 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1, -//=================================================================================== +//===================================================================================== // function : TestBound -// putpose : Test si les extremites de Bis2 sont sur le segment coorespondant -// a Bis1. -//=================================================================================== +// putpose : Test if the extremities of Bis2 are on the segment cooresponding to Bis1. +//===================================================================================== void Bisector_Inter::TestBound (const Handle(Geom2d_Line)& Bis1, const IntRes2d_Domain& D1, const Handle(Geom2d_Curve)& Bis2, diff --git a/src/Bnd/Bnd_BoundSortBox.cxx b/src/Bnd/Bnd_BoundSortBox.cxx index 557e2cf262..1dfcd7b95d 100755 --- a/src/Bnd/Bnd_BoundSortBox.cxx +++ b/src/Bnd/Bnd_BoundSortBox.cxx @@ -18,25 +18,25 @@ //-- lbr le 27 fev 97 //-- //-- -//-- Initialisation: Une boite englobante BE -//-- Une liste de boites Bi (Bi dans BE) +//-- Initialisation: Bounding box BE +//-- List of boxes Bi (Bi in BE) //-- -//-- Compare(b) renvoie la liste des Boites Bi touchees par b +//-- Compare(b) returns the list of Boxes Bi touched by b //-- //-- -//-- Principe General: +//-- General principle: //-- -//-- 1) On discretise la boite BE en N*N*N voxels -//-- Chaque boite Bi touche un certain nombre de voxels -//-- Bi touche { Vijk avec i0<=i<=i1 ... k0<=k<=k1 } -//-- 2) On projete sur chaque axe X,Y,Z les boites Bi -//-- pour obtenir les structures suivantes : +//-- 1) Discretize box BE into N*N*N voxels +//-- Each box Bi touches a certain number of voxels +//-- Bi touches { Vijk with i0<=i<=i1 ... k0<=k<=k1 } +//-- 2) Project on each axis X,Y,Z boxes Bi +//-- to get the following structures : //-- -//-- Exemple : +//-- Example : //-- -//-- la boite i1 touche les voxels { Vijk avec 1<=i<=N-1 ... } -//-- la boite i2 touche les voxels { Vijk avec 2<=i<=3 ... } -//-- la boite i3 touche les voxels { Vijk avec 1<=i<=2 ... } +//-- box i1 touches voxels { Vijk with 1<=i<=N-1 ... } +//-- box i2 touches voxels { Vijk with 2<=i<=3 ... } +//-- box i3 touches voxels { Vijk with 1<=i<=2 ... } //-- //-- //-- X[.] | 1 2 3 4 .... N-1 N @@ -46,46 +46,39 @@ //-- | i3 //-- //-- -//-- On realise la meme chose pour les axes Y et Z +//-- Produce the same thing for axes Y and Z //-- -//-- On obtient donc 3 tableaux (X,Y,Z) de listes d entiers (les indices des boites) +//-- Obtain 3 tables (X,Y,Z) of lists of integers (indexes of boxes) //-- -//-- 3) Pour rechercher les boites en contact avec une boite bt -//-- a) On cherche les voxels touches par bt -> i0bt,i1bt ... k0bt,k1bt -//-- b) On cherche dans la liste Z les boites presentes dans les cases Z[k0bt ... k1bt] -//-- c) On cherche parmi ces boites celles presentes dans les cases Y[j0bt ... j1bt] -//-- d) et le resultat est l intersection du result. precedent avec X[i0bt ... i1bt] +//-- 3) To find boxes contacting with box bt +//-- a) Find voxels touched by bt -> i0bt,i1bt ... k0bt,k1bt +//-- b) Find in list Z the boxes present in cases Z[k0bt ... k1bt] +//-- c) Find among these boxes the ones present in cases Y[j0bt ... j1bt] +//-- d) and the result is the intersection of the previous result with X[i0bt ... i1bt] //-- //-- -//-- Rejection de plus haut niveau. +//-- Rejection of a higher level. //-- -//-- *) On garde une representation a l aide d un tableau de bit des voxels de l espace BE -//-- qui contiennenrt au moins une boite Bi. -//-- *) Lorsque on teste une boite bt, on regarde tout d abord si cette boite comprend dans -//-- le tableau de bit au moins un voxel occuppe. -//-- Si un voxel occuppe est touche : pas de rejection -//-- Sinon return +//-- *) Preserve a table representation of bit of voxels of space BE +//-- that contains at least one box Bi. +//-- *) While box bt is texted, it is checked if this box includes in +//-- the table of bit at least one occupied voxel. +//-- If the occupied voxel is touched : no rejection +//-- Otherwise return //-- -//-- **) Une autre rejection a ete adoptee. Elle consiste a ne pas checher a placer dans les -//-- structures ci-dessus (tableaux X,Y,Z et tableau de Bits) une boite Bi qui est grande -//-- devant la boite englobante BE. +//-- **) Another rejection was adopted. It consists in trying to locate in +//-- the above structures (tables X,Y,Z and table of Bits) a box Bi which is greater than the +//-- bounding box BE. //-- -//-- Les indices de ces boites sont placees dans un tableau ToTest, et on comparera -//-- systematiquement ces boites avec bt. +//-- The indices of these boxes are located in table ToTest, and these +// boxes are compared systematically with bt. //-- -//-- -//-- -//-- -//-- Note : des tableaux C remplacent ici avantageusement les HArray1OfListOfInteger et autres -//-- structures agreables lorsqu il faut ajouter des donnees mais lentes a la lecture. +//-- Note : tables C replace here HArray1OfListOfInteger and other +//-- structures that are sufficient for data adding but slow for reading. //-- -//-- Ici, on ajoute les donnees au debut (ds les fcts Initialize et SortBoxes) et ensuite, -//-- on passe beaucoup de temps a parcourir les tableaux. Des structures lentes a l ecriture -//-- mais rapides a la lecture sont donc meilleures. -//-- -//-- -//-- -//-- +//-- Here the data is added at start (Initialize and SortBoxes) and later, +//-- it takes much time to parse the tables. The slowly written, byut fastly read structures +//-- are thus better. //-- @@ -119,7 +112,7 @@ static long unsigned _P2[32] = { 1,2,4,8, 16,32,64,128, 256,512,1024,2048, 1048576,2097152,4194304,8388608, 16777216,33554432,67108864,134217728, 268435456,536870912,1073741824,2147483648U}; -class BSB_T3Bits { //-- size est une puissance de 2 > 4 +class BSB_T3Bits { //-- size is power of 2 > 4 public: Standard_Integer _DECAL; @@ -143,7 +136,7 @@ public: BSB_T3Bits(int size); ~BSB_T3Bits(); - //-- Partie HArray1OfListOfInteger + //-- Part HArray1OfListOfInteger void AppendAxisX(const Standard_Integer i,const Standard_Integer v); void AppendAxisY(const Standard_Integer i,const Standard_Integer v); @@ -279,7 +272,7 @@ void BSB_T3Bits::AppendAxisX(const Standard_Integer i, n++; if(nAppendAxisZ(lacaseZ,labox); } //------------------------------------------------------------ - //-- remplissage du tableau de bits + //-- fill table with bits //-- if(Map) { for (lacaseX=firstcaseX; lacaseX<=lastcaseX; lacaseX++) { @@ -553,7 +546,7 @@ void Bnd_BoundSortBox::Add(const Bnd_Box& theBox, Map->AppendAxisZ(theGapZ,boxIndex); } //------------------------------------------------------------ - //-- remplissage du tableau de bits + //-- fill table with bits //-- if(TabBits) { Map=(BSB_T3Bits *)TabBits; @@ -580,7 +573,7 @@ static void VerifCompare(const TColStd_ListOfInteger& lastResult, Standard_Integer i0,i1; i0=taBox.Lower(); i1=taBox.Upper(); - char * qwe=new char [i1+1]; //-- $$$$$$$ ATTENTION SI I0 < 0 + char * qwe=new char [i1+1]; //-- $$$$$$$ ATTENTION IF I0 < 0 for( i=i0; i<=i1; i++) qwe[i]='\0'; TColStd_ListIteratorOfListOfInteger theList(lastResult); for (; theList.More(); theList.Next()) { @@ -594,10 +587,10 @@ static void VerifCompare(const TColStd_ListOfInteger& lastResult, } for(i=i0;i<=i1;i++) { if(qwe[i]==2) { - printf("\nPb avec boite: %d ",i); + printf("\nPb with box: %d ",i); } else if(qwe[i]==1) { - printf("\n fausse rejection en %d \n",i); + printf("\n false rejection by %d \n",i); } } delete [] qwe; @@ -624,7 +617,7 @@ const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare (const Bnd_Box& theBox) return lastResult; } const Bnd_Array1OfBox& taBox=myBndComponents->Array1(); - //-- Rejection avec le tableau de bits + //-- Rejection with the table of bits Standard_Boolean touch = Standard_True; touch = Standard_False; Standard_Real _Xmin,_Ymin,_Zmin,_Xmax,_Ymax,_Zmax; @@ -658,7 +651,7 @@ const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare (const Bnd_Box& theBox) } } } - //-- traitement des boites a tester systematiquement + //-- processing of systematically tested boxes if(Map->ToTest) { Standard_Integer l0 = taBox.Lower(); Standard_Integer l1 = taBox.Upper(); @@ -680,9 +673,9 @@ const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare (const Bnd_Box& theBox) #endif return(lastResult); } - //------------------------- - //-- traitement classique - //------------------------- + //------------------------ + //-- classic processing -- + //------------------------ i0++; i1++; j0++; j1++; k0++; k1++; Crible.Clear(); theFound=6; diff --git a/src/BndLib/BndLib.cxx b/src/BndLib/BndLib.cxx index 3d450b52fd..d8c3b38ed2 100755 --- a/src/BndLib/BndLib.cxx +++ b/src/BndLib/BndLib.cxx @@ -600,12 +600,7 @@ void BndLib::Add( const gp_Cone& S,const Standard_Real VMin, void BndLib::Add(const gp_Sphere& S,const Standard_Real UMin, const Standard_Real UMax,const Standard_Real VMin, const Standard_Real VMax,const Standard_Real Tol, Bnd_Box& B) { -//------------------------------------------------------------ -//-- lbr le 26 novembre 97 -//-- je ne comprends pas comment ce code marche -//-- et en plus il ne marche pas sur certains cas -//-- Temporairement on choisit une solution plus simple. -//------------------------------------------------------------ + #if 0 Standard_Real Fi1; Standard_Real Fi2; diff --git a/src/CDF/CDF_Application.cxx b/src/CDF/CDF_Application.cxx index 0b71da2f7f..caddd0082a 100755 --- a/src/CDF/CDF_Application.cxx +++ b/src/CDF/CDF_Application.cxx @@ -421,7 +421,7 @@ Standard_Boolean CDF_Application::FindReader(const TCollection_ExtendedString& a TCollection_ExtendedString theFormat=PCDM_ReadWriter::FileFormat(aFileName); -// Si le format est dans le fichier, tant mieux. Sinon on se base sur l'extension. +// It is good if the format is in the file. Otherwise base on the extension. if(theFormat.Length()==0) { ResourceName=UTL::Extension(aFileName); @@ -445,7 +445,7 @@ Standard_Boolean CDF_Application::Format(const TCollection_ExtendedString& aFile { theFormat = PCDM_ReadWriter::FileFormat(aFileName); - // Si le format est dans le fichier, tant mieux. Sinon on se base sur l'extension. +// It is good if the format is in the file. Otherwise base on the extension. if(theFormat.Length()==0) { TCollection_ExtendedString ResourceName; ResourceName=UTL::Extension(aFileName); diff --git a/src/CPnts/CPnts_AbscissaPoint.cxx b/src/CPnts/CPnts_AbscissaPoint.cxx index c912c82050..e1d1ba4d6e 100755 --- a/src/CPnts/CPnts_AbscissaPoint.cxx +++ b/src/CPnts/CPnts_AbscissaPoint.cxx @@ -1,18 +1,15 @@ //------------------------------------------------------------------------ -// Calculer un point a abscisse donne a partir -// d un point donne +// Calculate a point with given abscissa starting from a given point +// cases processed: straight segment, arc of circle, parameterized curve +// curve should be C1 // -// cas traites :segment de droite,arc de cercle courbe parametree -// la courbe doit etre C1 +// for a parameterized curve: // -// pour une courbe parametree: -// -// on calcule la longueur totale de la courbe -// on calcule un point approche en assimilant la courbe a une droite -// on calcule la longueur de la courbe entre le point de depart et -// le point approche -// par iteration succsessive on trouve le point et son parametre associe -// appel a FunctionRoot +// calculate the total length of the curve +// calculate an approached point by assimilating the curve to a staight line +// calculate the length of the curve between the start point and the approached point +// by succsessive iteration find the point and its associated parameter +// call to FunctionRoot // // @@ -428,8 +425,8 @@ void CPnts_AbscissaPoint::Perform(const Standard_Real Abscissa, { if (myL < Precision::Confusion()) { // - // on sort moins violemment : j'espere que l'on espere pas - // un increment notable au niveau de myParam + // leave less violently : it is expected that + // the increment of the level of myParam will not be great // myDone = Standard_True ; myParam = U0 ; @@ -454,7 +451,7 @@ void CPnts_AbscissaPoint::Perform(const Standard_Real Abscissa, { if (myL < Precision::Confusion()) { // - // on sort moins violemment : + // leave less violently : // myDone = Standard_True ; myParam = U0 ; @@ -465,8 +462,8 @@ void CPnts_AbscissaPoint::Perform(const Standard_Real Abscissa, math_FunctionRoot Solution(myF, Ui, Resolution, myUMin, myUMax); -// Temporairement on vire le test de validite de la solution -// Il faudra des que l on pourra faire du cdl, rendre un tolreached +// Temporarily suspend the validity test of the solution +// it is necessary to make a tolreached as soon as one will make a cdl // lbo 21/03/97 // if (Solution.IsDone()) { // Standard_Real D; @@ -495,7 +492,7 @@ void CPnts_AbscissaPoint::AdvPerform(const Standard_Real Abscissa, { if (myL < Precision::Confusion()) { // - // on sort moins violemment : + // leave less violently : // myDone = Standard_True ; myParam = U0 ; @@ -507,8 +504,8 @@ void CPnts_AbscissaPoint::AdvPerform(const Standard_Real Abscissa, math_FunctionRoot Solution(myF, Ui, Resolution, myUMin, myUMax); -// Temporairement on vire le test de validite de la solution -// Il faudra des que l on pourra faire du cdl, rendre un tolreached +// Temporarily suspend the validity test of the solution +// it is necessary to make a tolreached as soon as one will make a cdl // lbo 21/03/97 // if (Solution.IsDone()) { // Standard_Real D; diff --git a/src/CPnts/CPnts_UniformDeflection.cxx b/src/CPnts/CPnts_UniformDeflection.cxx index 4355ca7a13..6b023c80a1 100755 --- a/src/CPnts/CPnts_UniformDeflection.cxx +++ b/src/CPnts/CPnts_UniformDeflection.cxx @@ -1,42 +1,39 @@ //------------------------------------------------------------------- -// algorihme lieu a fleche constante +// Algorithm concerns the constant arrow // -// cas traites : courbe parametree -// la courbe doit etre C2 -// on assure une fleche maxi +// cases processed : parameterized curve +// the curve should be C2 +// provide a max arrow // -// algorithme courbe parametree: +// algorithm of parameterized curve: // -// -// le calcul du pas d avancement est +// calculation of the step of advancement is // du = sqrt(8*fleche*||P'(u)||/||P'(u)^P''(u)|| // -// on calcule chaque point t.q. u+Du -// -// on verifie si la fleche est effectivement respectee ,si oui on continue -// sinon on rectifie le pas +// calculate each point such as u+Du // -// si du ne peut etre calculer (courbure nulle ,singularite sur la courbe) on -// prendra alors un pas constant pour atteindre le dernier point ou le depass// er +// check if the arrow is actually taken into account, if yes, continue +// otherwise correct the step // -// le dernier point est reajuste selon les criteres suivants: +// si du cannot be calculated (null curvature, singularity on the curve) +// take a constant step to reach the last point or to go past it +// The last point is readjusted by the following criteria: // -// si le dernier parametre calcule <2*resolution,on recadre le dernier -// point trouve entre lui meme et le precedent et on rajoute le point -// de fin (eviter une concentration a la fin) +// if the last calculated parameter is <2*resolution, reframe the last point found +// between itself and the previous point and add the end point +// (avoid a concentration at the end) // -// sinon si la distance (dernier point calcule ,point de fin) myDeflection / 5.0) { NormD2 = Max(NormD2, 1.1 * myDeflection); @@ -180,7 +177,7 @@ void CPnts_UniformDeflection::Perform() myFinish = (myLastParam - myFirstParam < myTolCur) || (myDu == 0.); } if (myFinish) { - // le dernier point est corrige si control + // the last point is corrected if control if (myControl && (myNbPoints == 1) ) { Un1 = myParams[0]; if (myLastParam - Un1 < 0.33*(myLastParam-myFirstParam)) { @@ -220,7 +217,7 @@ void CPnts_UniformDeflection::Perform() if ((VV.CrossMagnitude(gp_Vec(P2, P)) / NormD1 < myDeflection) && (Un1 >= myLastParam - myDwmax) ) { - // on supprime le point n + // point n is removed myParams[1]= myLastParam; myPoints[1] = P1 ; } diff --git a/src/CSLib/CSLib.cxx b/src/CSLib/CSLib.cxx index 1dba09bc00..c982961721 100755 --- a/src/CSLib/CSLib.cxx +++ b/src/CSLib/CSLib.cxx @@ -1,9 +1,7 @@ // File: CSLib.cxx // Created: Mon Sep 9 11:19:10 1991 // Author: Michel Chauvat -// Modif JCV Decembre 1991 : Ajout des Status -// Modif JPI Octobre 1996 : Ajout des methodes DNNUV et DNNormal -// Modif JPI Novembre 1996 : Ajout de la methode Normal pour les cas singuliers + #include @@ -45,7 +43,7 @@ CSLib_DerivativeStatus& Status, gp_Dir& Normal ) { -// Fonction: Calcul de la normale a partir des tangentes en u et en v. +// Function: Calculation of the normal from tangents by u and by v. Standard_Real D1UMag = D1U.SquareMagnitude(); Standard_Real D1VMag = D1V.SquareMagnitude(); @@ -80,8 +78,8 @@ CSLib_NormalStatus& Status, gp_Dir& Normal ) { -// Calcul d'une normale approchee dans le cas d'une normale nulle. -// On utilise le developpement limite de la normale a l'ordre 1: +// Calculation of an approximate normale in case of a null normal. +// Use limited development of the normal of order 1: // N(u0+du,v0+dv) = N0 + dN/du(u0,v0) * du + dN/dv(u0,v0) * dv + epsilon // -> N ~ dN/du + dN/dv. @@ -143,7 +141,7 @@ const Standard_Real MagTol, CSLib_NormalStatus& Status, gp_Dir& Normal ) { -// Fonction: Calcul de la normale a partir des tangentes en u et en v. +// Function: Calculate the normal from tangents by u and by v. Standard_Real D1UMag = D1U.Magnitude(); Standard_Real D1VMag = D1V.Magnitude(); @@ -160,7 +158,7 @@ gp_Dir& Normal } -// Calcul du vecteur normal dans les cas singuliers +// Calculate normal vector in singular cases // void CSLib::Normal(const Standard_Integer MaxOrder, const TColgp_Array2OfVec& DerNUV, @@ -182,8 +180,8 @@ void CSLib::Normal(const Standard_Integer MaxOrder, // Status = Singular; Standard_Real Norme; gp_Vec D; - //Recherche de k0 tel que toutes des derivee de N=dS/du ^ dS/dv soient nulles - //jusqu'a l'ordre k0-1 + //Find k0 such that all derivatives N=dS/du ^ dS/dv are null + //till order k0-1 while(!Trouve && Order < MaxOrder) { Order++; @@ -199,7 +197,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder, } OrderU=i+1; OrderV=Order-OrderU; - //Vko premiere derivee de N non nulle : reference + //Vko first non null derivative of N : reference if(Trouve) { if(Order == 0) @@ -212,7 +210,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder, gp_Vec Vk0; Vk0=DerNUV(OrderU,OrderV); TColStd_Array1OfReal Ratio(0,Order); - //Calcul des lambda i + //Calculate lambda i i=0; Standard_Boolean definie=Standard_False; while(i<=Order && !definie) @@ -236,17 +234,17 @@ void CSLib::Normal(const Standard_Integer MaxOrder, } } i++; - }//fin while + }//end while if(!definie) - { //Tout les lambda i existent + { //All lambda i exist Standard_Integer SP; Standard_Real inf,sup; inf=0.0-Standard_PI; sup=0.0+Standard_PI; Standard_Boolean FU,LU,FV,LV; - //Creation du domaine de definition en fonction de la position - //du point singulier (milieu, bord, coin). + //Creation of the domain of definition depending on the position + //of a single point (medium, border, corner). FU=(Abs(U-Umin) < Precision::PConfusion()); LU=(Abs(U-Umax) < Precision::PConfusion() ); FV=(Abs(V-Vmin) < Precision::PConfusion() ); @@ -277,18 +275,18 @@ void CSLib::Normal(const Standard_Integer MaxOrder, } Standard_Boolean CS=0; Standard_Real Vprec=0,Vsuiv; - //Creation du polynome + //Creation of the polynom CSLib_NormalPolyDef Poly(Order,Ratio); - //Recherche des zeros de SAPS + //Find zeros of SAPS math_FunctionRoots FindRoots(Poly,inf,sup,200,1e-5, Precision::Confusion(), Precision::Confusion()); - //Si il y a des zeros + //If there are zeros if(FindRoots.IsDone()) { if(FindRoots.NbSolutions()>0) { - //rangement par ordre crossant des racines de SAPS dans Sol0 + //ranking by increasing order of roots of SAPS in Sol0 TColStd_Array1OfReal Sol0(0,FindRoots.NbSolutions()+1); Sol0(1)=FindRoots.Value(1); @@ -304,12 +302,12 @@ void CSLib::Normal(const Standard_Integer MaxOrder, } Sol0(i+1)=ASOL; n++; - }//fin while(n - //Ajouts des bornes du domaines + }//end while(n + //Add limits of the domains Sol0(0)=inf; Sol0(FindRoots.NbSolutions()+1)=sup; - //Recherche des changement de signe de SAPS par comparaison de ses - //valeurs a gauche et a droite de chaque racines + //Find change of sign of SAPS in comparison with its + //values to the left and right of each root Standard_Integer ifirst=0; for (i=0;i<=FindRoots.NbSolutions();i++) { @@ -332,20 +330,20 @@ void CSLib::Normal(const Standard_Integer MaxOrder, } else { - //SAPS n'a pas de racine donc forcement ne change pas de signe + //SAPS has no root, so forcedly do not change the sign CS=Standard_False; Poly.Value(inf,Vsuiv); } //fin if(MFR.NbSolutions()>0) }//fin if(MFR>IsDone()) if(CS) - //Le polynome change de signe + //Polynom changes the sign SP=0; else if(Vsuiv>0) - //Le polynome est toujours positif + //Polynom is always positive SP=1; else - //Le polynome est toujours negatif + //Polynom is always negative SP=-1; if(SP==0) Status = InfinityOfSolutions; @@ -364,7 +362,7 @@ void CSLib::Normal(const Standard_Integer MaxOrder, } } // -// Calcul de la derivee du vecteur normal non norme +// Calculate the derivative of the non-normed normal vector // gp_Vec CSLib::DNNUV(const Standard_Integer Nu, const Standard_Integer Nv, @@ -409,8 +407,8 @@ gp_Vec CSLib::DNNUV(const Standard_Integer Nu, } // -// CalCul des derivees du vecteur normal norme en fonction des derivees -// du vecteur normal non norme +// Calculate the derivatives of the normed normal vector depending on the derivatives +// of the non-normed normal vector // gp_Vec CSLib::DNNormal(const Standard_Integer Nu, const Standard_Integer Nv, @@ -440,7 +438,7 @@ for ( Mderiv = 1;Mderiv <= Kderiv; Mderiv++) if (Pderiv <= Nu && Qderiv <= Nv) { // -// Compute n . derivee(p,q) de n +// Compute n . derivee(p,q) of n Scal = 0.; if ( Pderiv > Qderiv ) { diff --git a/src/CSLib/CSLib_Class2d.cxx b/src/CSLib/CSLib_Class2d.cxx index 92089504ad..fb53e5b55e 100755 --- a/src/CSLib/CSLib_Class2d.cxx +++ b/src/CSLib/CSLib_Class2d.cxx @@ -83,8 +83,8 @@ void CSLib_Class2d::Destroy() { } } -//-- Attention Tableau de 0 ------> N + 1 -//-- P1 ..... Pn P1 +//-- Attention Table of 0 ------> N + 1 +//-- P1 ..... Pn P1 //-- //-- 1 2 3 //-- 4 0 5 @@ -119,7 +119,7 @@ Standard_Integer CSLib_Class2d::SiDans(const gp_Pnt2d& P) const Standard_Integer res = InternalSiDansOuOn(x,y); - if(res==-1) { //-- on est peut etre ON + if(res==-1) { return 0; } if(Tolu || Tolv) { @@ -148,7 +148,7 @@ Standard_Integer CSLib_Class2d::SiDans_OnMode(const gp_Pnt2d& P, aTolu=Tol; aTolv=Tol; - //-- ****** A FAIRE PLUS TARD, ESTIMER EN CHAQUE POINT la Tol2d en fct de la Tol3d ***** + //-- ****** TO DO LATER, ESTIMATE AT EACH POINT Tol2d depending on Tol3d ***** if(UminUmax+aTolu) || (yVmax+aTolv)) { @@ -212,7 +212,7 @@ Standard_Integer CSLib_Class2d::InternalSiDans(const Standard_Real Px, //modified by NIZNHY-PKV Fri Jan 15 09:03:48 2010f //======================================================================= //function : InternalSiDansOuOn -//purpose : meme code que ci-dessus + test sur ON (return(-1) dans ce cas +//purpose : same code as above + test on ON (return(-1) in this case //======================================================================= Standard_Integer CSLib_Class2d::InternalSiDansOuOn(const Standard_Real Px, const Standard_Real Py) const diff --git a/src/Contap/Contap_ContAna.cxx b/src/Contap/Contap_ContAna.cxx index 2aa7aca327..357dd7eb78 100755 --- a/src/Contap/Contap_ContAna.cxx +++ b/src/Contap/Contap_ContAna.cxx @@ -124,18 +124,18 @@ void Contap_ContAna::Perform (const gp_Cylinder& C, nbSol = 2; dir1 = dir2 = C.Position().Direction(); - if (!C.Direct()) { // la normale est inversee. + if (!C.Direct()) { // The normal is inverted. Coefcos = -Coefcos; Coefsin = -Coefsin; } - // On doit resoudre Coefcos*cos(t) + Coefsin*sin(t) = Coefcst - // et les origines des droites solution sont dans le repere du - // cylindre en (R*cost0, R*sint0,0) et (R*cost1,R*sint1,0) - // En posant cos(phi) = Coefcos/Sqrt(Coefcos**2 + Coefsin**2) et + // Necessary to solve Coefcos*cos(t) + Coefsin*sin(t) = Coefcst + // and the origins of solution are in the reference of the + // cylinder in (R*cost0, R*sint0,0) and (R*cost1,R*sint1,0) + // By setting cos(phi) = Coefcos/Sqrt(Coefcos**2 + Coefsin**2) and // sin(phi) = Coefsin/Sqrt(Coefcos**2 + Coefsin**2) - // et en utilisant les relations trigonometriques, on a sans resolution - // les valeurs des cosinus et sinus aux solutions. + // and by using trigonometric relations the values of cosinus + // and sinus to the solutions are obtained. prm = Sqrt(norm1 - Coefcst*Coefcst); Standard_Real cost0,sint0,cost1,sint1; @@ -181,8 +181,7 @@ void Contap_ContAna::Perform (const gp_Cylinder& C, prm = radius*sqrt(1.-radius*radius/(dist*dist)); dir1 = C.Axis().Direction(); dir2 = dir1; - gp_XYZ axeye(theaxis.Normal(Eye).Direction().XYZ()); // oriente de l axe - // vers l exterieur + gp_XYZ axeye(theaxis.Normal(Eye).Direction().XYZ()); // orientate the axis to the outside gp_XYZ normale((theaxis.Direction().Crossed(axeye)).XYZ()); // normale.Normalize(); pt1.SetXYZ(C.Location().XYZ() + (radius*radius/dist)*axeye); @@ -219,13 +218,13 @@ void Contap_ContAna::Perform (const gp_Cone& C, nbSol = 2; pt1 = C.Apex(); pt2 = pt1; - // On doit resoudre Coefcos*cos(t) + Coefsin*sin(t) = Coefcst - // et les vecteurs directeurs des solutions sont + // Necessary to solve Coefcos*cos(t) + Coefsin*sin(t) = Coefcst + // and director vectors of solutions are // cos(t0) * XDirection + sin(t0) * YDirection + ZDirection/Tgtalpha - // En posant cos(phi) = Coefcos/Sqrt(Coefcos**2 + Coefsin**2) et + // By setting cos(phi) = Coefcos/Sqrt(Coefcos**2 + Coefsin**2) and // sin(phi) = Coefsin/Sqrt(Coefcos**2 + Coefsin**2) - // et en utilisant les relations trigonometriques, on a sans resolution - // les valeurs des cosinus et sinus aux solutions. + // and by using trigonometric relations the values of cosinus + // and sinus to the solutions are obtained. prm = Sqrt(norm1 - Coefcst*Coefcst); Standard_Real cost0,sint0,cost1,sint1; @@ -281,13 +280,13 @@ void Contap_ContAna::Perform (const gp_Cone& C, pt1 = C.Apex(); pt2 = pt1; - // On doit resoudre Coefcos*cos(t) + Coefsin*sin(t) = Coefcst - // et les vecteurs directeurs des solutions sont + // It is requiredto solve Coefcos*cos(t) + Coefsin*sin(t) = Coefcst + // and the director vectors of solutions are // cos(t0) * XDirection + sin(t0) * YDirection + ZDirection/Tgtalpha - // En posant cos(phi) = Coefcos/Sqrt(Coefcos**2 + Coefsin**2) et + // By setting cos(phi) = Coefcos/Sqrt(Coefcos**2 + Coefsin**2) and // sin(phi) = Coefsin/Sqrt(Coefcos**2 + Coefsin**2) - // et en utilisant les relations trigonometriques, on a sans resolution - // les valeurs des cosinus et sinus aux solutions. + // and by using trigonometric relations the values of cosinus + // and sinus to the solutions are obtained. prm = Sqrt(norm1 - Coefcst*Coefcst); Standard_Real cost0,sint0,cost1,sint1; @@ -383,13 +382,13 @@ void Contap_ContAna::Perform (const gp_Cone& C, nbSol = 2; pt1 = C.Apex(); pt2 = pt1; - // On doit resoudre Coefcos*cos(t) + Coefsin*sin(t) = Coefcst - // et les vecteurs directeurs des solutions sont + // It is required to solve Coefcos*cos(t) + Coefsin*sin(t) = Coefcst + // and the director vectors of solutions are // cos(t0) * XDirection + sin(t0) * YDirection + ZDirection/Tgtalpha - // En posant cos(phi) = Coefcos/Sqrt(Coefcos**2 + Coefsin**2) et + // By setting cos(phi) = Coefcos/Sqrt(Coefcos**2 + Coefsin**2) and // sin(phi) = Coefsin/Sqrt(Coefcos**2 + Coefsin**2) - // et en utilisant les relations trigonometriques, on a sans resolution - // les valeurs des cosinus et sinus aux solutions. + // and by using trigonometric relations the values of cosinus + // and sinus to the solutions are obtained. prm = Sqrt(norm1 - Coefcst*Coefcst); Standard_Real cost0,sint0,cost1,sint1; diff --git a/src/Convert/Convert_CircleToBSplineCurve.cxx b/src/Convert/Convert_CircleToBSplineCurve.cxx index 350f7b1057..4582647c23 100755 --- a/src/Convert/Convert_CircleToBSplineCurve.cxx +++ b/src/Convert/Convert_CircleToBSplineCurve.cxx @@ -15,13 +15,13 @@ #include //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)) ; diff --git a/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx b/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx index 2572c55220..72465198a8 100755 --- a/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx +++ b/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx @@ -2,9 +2,6 @@ // Created: Wed Oct 20 14:55:08 1993 // Author: Bruno DUMORTIER // -// 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 @@ -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)); diff --git a/src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx b/src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx index a77a681462..5b6ac2e808 100755 --- a/src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx +++ b/src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx @@ -2,9 +2,7 @@ // Created: Wed Oct 20 14:55:08 1993 // Author: Bruno DUMORTIER // -// 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 @@ -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++) { diff --git a/src/Convert/Convert_ConeToBSplineSurface.cxx b/src/Convert/Convert_ConeToBSplineSurface.cxx index 53d4253cc2..cbfa2a0142 100755 --- a/src/Convert/Convert_ConeToBSplineSurface.cxx +++ b/src/Convert/Convert_ConeToBSplineSurface.cxx @@ -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()); diff --git a/src/Convert/Convert_CylinderToBSplineSurface.cxx b/src/Convert/Convert_CylinderToBSplineSurface.cxx index 2c419c517d..abff8bb791 100755 --- a/src/Convert/Convert_CylinderToBSplineSurface.cxx +++ b/src/Convert/Convert_CylinderToBSplineSurface.cxx @@ -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()); diff --git a/src/Convert/Convert_EllipseToBSplineCurve.cxx b/src/Convert/Convert_EllipseToBSplineCurve.cxx index cbda392595..e3e87fcf32 100755 --- a/src/Convert/Convert_EllipseToBSplineCurve.cxx +++ b/src/Convert/Convert_EllipseToBSplineCurve.cxx @@ -18,16 +18,16 @@ #include //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)) ; diff --git a/src/Convert/Convert_HyperbolaToBSplineCurve.cxx b/src/Convert/Convert_HyperbolaToBSplineCurve.cxx index 2e425d6846..921ff4fb3e 100755 --- a/src/Convert/Convert_HyperbolaToBSplineCurve.cxx +++ b/src/Convert/Convert_HyperbolaToBSplineCurve.cxx @@ -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); diff --git a/src/Convert/Convert_ParabolaToBSplineCurve.cxx b/src/Convert/Convert_ParabolaToBSplineCurve.cxx index 490155b481..ecd7f51f41 100755 --- a/src/Convert/Convert_ParabolaToBSplineCurve.cxx +++ b/src/Convert/Convert_ParabolaToBSplineCurve.cxx @@ -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); diff --git a/src/Convert/Convert_PolynomialCosAndSin.cxx b/src/Convert/Convert_PolynomialCosAndSin.cxx index 8ec809084a..13fa931782 100755 --- a/src/Convert/Convert_PolynomialCosAndSin.cxx +++ b/src/Convert/Convert_PolynomialCosAndSin.cxx @@ -2,7 +2,6 @@ // Created: Tue Oct 10 15:56:28 1995 // Author: Jacques GOUSSARD // -//PMN 4/12/1997 On se ramene toujours sur [0, Delta] pour eviter les cas tordus #include @@ -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); diff --git a/src/Convert/Convert_SphereToBSplineSurface.cxx b/src/Convert/Convert_SphereToBSplineSurface.cxx index d88a1c7e8e..ff9fe06d9f 100755 --- a/src/Convert/Convert_SphereToBSplineSurface.cxx +++ b/src/Convert/Convert_SphereToBSplineSurface.cxx @@ -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()); diff --git a/src/Convert/Convert_TorusToBSplineSurface.cxx b/src/Convert/Convert_TorusToBSplineSurface.cxx index e958ccc346..d8df101f02 100755 --- a/src/Convert/Convert_TorusToBSplineSurface.cxx +++ b/src/Convert/Convert_TorusToBSplineSurface.cxx @@ -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()); diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index e76d4b53a0..4df1225f0d 100755 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -52,7 +52,7 @@ extern Draw_Viewer dout; //========================================== -// usefull methods +// useful methods //========================================== Standard_EXPORT void DBRep_WriteColorOrientation () @@ -171,8 +171,8 @@ static Standard_Integer hlr (Draw_Interpretor& di, else di << " no HiddenLines"; di << "\n"; if (withHLR) { - di << "Angle de discretisation : "; - di << anglHLR * 180 / PI << " degres" << "\n"; + di << "Angle of discretization : "; + di << anglHLR * 180 / PI << " degrees" << "\n"; } } else di << " wireframe"; @@ -222,8 +222,8 @@ static Standard_Integer hlr (Draw_Interpretor& di, if (anglHLR < HAngMin) anglHLR = HAngMin; if (anglHLR > HAngMax) anglHLR = HAngMax; } - di << "Angle de discretisation : "; - di << anglHLR * 180 / PI << " degres" << "\n"; + di << "Angle of discretization : "; + di << anglHLR * 180 / PI << " degrees" << "\n"; } if (n >= nFirst + 1) { @@ -759,7 +759,7 @@ static Standard_Integer orientation(Draw_Interpretor& , #include //======================================================================= -// numshapes meme chose que nbshapes sauf que la sortie est cout +// numshapes same as nbshapes but the output is cout //======================================================================= static Standard_Integer numshapes(Draw_Interpretor& di, @@ -1151,7 +1151,7 @@ void DBRep::BasicCommands(Draw_Interpretor& theCommands) // theCommands.Add("dumpmmgt", // "dump le contenu du gestionnaire de memoire",__FILE__,dumpmmgt,g); theCommands.Add("purgemmgt", - "rend la memoire libre du gestionnaire de memoire au systeme", + "returns the free memory from the system to the memory manager", __FILE__,purgemmgt,g); // Add command for DRAW-specific ProgressIndicator diff --git a/src/DDataStd/DDataStd_DrawPresentation.cxx b/src/DDataStd/DDataStd_DrawPresentation.cxx index 0fac4632d5..ad33a5d73f 100755 --- a/src/DDataStd/DDataStd_DrawPresentation.cxx +++ b/src/DDataStd/DDataStd_DrawPresentation.cxx @@ -247,7 +247,7 @@ void DDataStd_DrawPresentation::AfterResume() //======================================================================= //function : BeforeUndo -//purpose : le NamedShape associe doit etre present +//purpose : the associated NamedShape should be present //======================================================================= Standard_Boolean DDataStd_DrawPresentation::BeforeUndo (const Handle(TDF_AttributeDelta)& AD, @@ -285,7 +285,7 @@ Standard_Boolean DDataStd_DrawPresentation::BeforeUndo (const Handle(TDF_Attribu //======================================================================= //function : AfterUndo -//purpose : le NamedShape associe doit etre present +//purpose : associated NamedShape should be present //======================================================================= Standard_Boolean DDataStd_DrawPresentation::AfterUndo (const Handle(TDF_AttributeDelta)& AD, diff --git a/src/Draft/Draft_Modification_1.cxx b/src/Draft/Draft_Modification_1.cxx index 9de051c045..5bf0d35faf 100755 --- a/src/Draft/Draft_Modification_1.cxx +++ b/src/Draft/Draft_Modification_1.cxx @@ -222,7 +222,7 @@ Standard_Boolean Draft_Modification::InternalAdd(const TopoDS_Face& F, errStat = Draft_FaceRecomputation; return Standard_False; } - // Pour eviter certains pbs sur restrictions infinies + // To avoid some problems with infinite restrictions const Handle(Standard_Type)& typs = NewS->DynamicType(); if (typs == STANDARD_TYPE(Geom_CylindricalSurface) || typs == STANDARD_TYPE(Geom_ConicalSurface)) { @@ -238,11 +238,11 @@ Standard_Boolean Draft_Modification::InternalAdd(const TopoDS_Face& F, else { gp_Cone Co = Handle(Geom_ConicalSurface)::DownCast(NewS)->Cone(); Standard_Real Vapex = - Co.RefRadius()/Sin(Co.SemiAngle()); - if (vmin < Vapex) { // vmax ne doit pas exceder Vapex + if (vmin < Vapex) { // vmax should not exceed Vapex if (vmax + deltav > Vapex) { vmax = Vapex; vmin = vmin - 10.*(vmax - vmin); - // JAG debug pour eviter apex + // JAG debug to avoid apex vmax = vmax-Precision::Confusion(); } else { @@ -250,11 +250,11 @@ Standard_Boolean Draft_Modification::InternalAdd(const TopoDS_Face& F, vmax = vmax + deltav; } } - else { // on a Vapex <= vmin < vmax + else { // Vapex <= vmin < vmax if (vmin - deltav < Vapex) { vmin = Vapex; vmax = vmax + 10.*(vmax - vmin); - // JAG debug pour eviter apex + // JAG debug to avoid apex vmin = vmin+Precision::Confusion(); } else { @@ -291,7 +291,7 @@ Standard_Boolean Draft_Modification::InternalAdd(const TopoDS_Face& F, addface = Standard_False; } else { - // Chercher l autre face contenant l edge. + // Find the other face containing the edge. TopTools_ListIteratorOfListOfShape it; it.Initialize(myEFMap.FindFromKey(edg)); Standard_Integer nbother = 0; @@ -313,7 +313,7 @@ Standard_Boolean Draft_Modification::InternalAdd(const TopoDS_Face& F, addface= Standard_True; addedg = Standard_True; } - else if (nbother == 0) { // jag : ajout du 8 Novembre 95 : bord libre + else if (nbother == 0) { // badShape = F; } } @@ -334,7 +334,7 @@ Standard_Boolean Draft_Modification::InternalAdd(const TopoDS_Face& F, EInf.Add(F); EInf.Add(OtherF); - // recherche du point fixe + // find fixed point Handle(Geom_Line) aLocalGeom = Handle(Geom_Line)::DownCast(C); if (aLocalGeom.IsNull()) { badShape = edg; @@ -409,7 +409,7 @@ Standard_Boolean Draft_Modification::Propagate () Draft_DataMapIteratorOfDataMapOfFaceFaceInfo itf(myFMap); - // On met tous les edges et les vertex des faces modifiees + // Set all edges and vertices of modified faces TopoDS_Face F; TopoDS_Edge E; TopoDS_Vertex V; @@ -452,7 +452,7 @@ Standard_Boolean Draft_Modification::Propagate () TopExp_Explorer anc; Standard_Boolean found; - // On met les edges contenant les vertex modifies. + // Set edges containing modified vertices. Draft_DataMapIteratorOfDataMapOfVertexVertexInfo itv(myVMap); @@ -487,7 +487,7 @@ Standard_Boolean Draft_Modification::Propagate () } - // On met les faces contenant des edges modifiees + // Set faces containing modified edges Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo ite(myEMap); @@ -525,7 +525,7 @@ Standard_Boolean Draft_Modification::Propagate () ite.Next(); } - // JAG. On essaie de rajouter des faces pour les bords libres... + // Try to add faces for free borders... // JAG 09.11.95 ite.Initialize(myEMap); for (; ite.More(); ite.Next()) { @@ -568,10 +568,10 @@ Standard_Boolean Draft_Modification::Propagate () else { badShape = TopoDS::Edge(ite.Key()); errStat = Draft_EdgeRecomputation; - break; // on sort du for + break; // leave from for } } - else { // on est sur un plan + else { // on the plane Draft_DataMapIteratorOfDataMapOfVertexVertexInfo anewitv(myVMap); while (anewitv.More()) { Draft_VertexInfo& Vinf = myVMap(anewitv.Key()); @@ -612,7 +612,7 @@ Standard_Boolean Draft_Modification::Propagate () else { badShape = TopoDS::Edge(ite.Key()); errStat = Draft_EdgeRecomputation; - break; // on sort de while + break; // leave from while } Adaptor3d_SurfaceOfLinearExtrusion SLE(HCur,Direc); switch(SLE.GetType()){ @@ -640,7 +640,7 @@ Standard_Boolean Draft_Modification::Propagate () else { badShape = TopoDS::Edge(ite.Key()); errStat = Draft_EdgeRecomputation; - break; // on sort du while + break; // leave from while } break; } @@ -657,7 +657,7 @@ Standard_Boolean Draft_Modification::Propagate () myFMap.Bind(TheNewFace,FI); } else { - break; // on sort du for + break; // leave from for } // Fin JAG 09.11.95 } @@ -683,7 +683,7 @@ void Draft_Modification::Perform () return; } - // On calcule les faces eventuelles + // Calculate eventual faces Draft_DataMapIteratorOfDataMapOfFaceFaceInfo itf(myFMap); while (itf.More()) { @@ -731,7 +731,7 @@ void Draft_Modification::Perform () gp_Dir extrdir = i2p.Line(1).Direction(); - // On garde le meme sens que la face de base + // Preserve the same direction as the base face Handle(Geom_Surface) RefSurf = BRep_Tool::Surface(TopoDS::Face(itf.Key())); if (RefSurf->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) { @@ -756,8 +756,8 @@ void Draft_Modification::Perform () if (extrdir.Dot(DirRef) < 0.) extrdir.Reverse(); - // on peut ameliorer la rapidite en stockant l`info lors de - // InternalAdd --> modif de FaceInfo pour garder le cercle + // it is possible to accelerate speed by storing the info during + // InternalAdd --> modification of FaceInfo to preserve the circle Handle(Geom_Circle) CCir = Handle(Geom_Circle)::DownCast(Finf.Curve()); @@ -773,7 +773,7 @@ void Draft_Modification::Perform () vmax = vmax + deltav; } - // tres temporaire + // very temporary else { vmax = 300; vmin = -300; @@ -785,7 +785,7 @@ void Draft_Modification::Perform () itf.Next(); } - // On calcule les nouveaux edges. + // Calculate new edges. Handle(Geom_Surface) S1,S2; Handle(Geom_Curve) C, newC; @@ -812,7 +812,7 @@ void Draft_Modification::Perform () Standard_Integer detrompeur = 0; - // On recupere le FirstVertex et la tangente en ce point. + // Return FirstVertex and the tangent at this point. TopoDS_Vertex FV = TopExp::FirstVertex(theEdge); TopoDS_Vertex LV = TopExp::LastVertex(theEdge); Standard_Real pmin = 0.; @@ -826,7 +826,7 @@ void Draft_Modification::Perform () Standard_Real TolF1 = BRep_Tool::Tolerance (FirstFace); Standard_Real TolF2 = BRep_Tool::Tolerance (SecondFace); - //On passe la tolerance de la face pour projeter + //Pass the tolerance of the face to project GeomAPI_ProjectPointOnSurf proj1 (pfv, S1, TolF1); GeomAPI_ProjectPointOnSurf proj2 (plv, S1, TolF1); GeomAPI_ProjectPointOnSurf proj3 (pfv, S2, TolF2); @@ -860,7 +860,7 @@ void Draft_Modification::Perform () DownCast(S2)->BasisSurface(); } - Standard_Boolean PC1 = Standard_True; // KPart sur S1 + Standard_Boolean PC1 = Standard_True; // KPart on S1 if (S1->DynamicType() == STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion) && S2->DynamicType() == STANDARD_TYPE(Geom_Plane) ) { KPart = Standard_True; @@ -881,7 +881,7 @@ void Draft_Modification::Perform () DownCast(S2)->Direction(); } Handle(Geom_Circle) aCirc ; - if ( KPart) { // TRES Provisoire sur les cercles !!! + if ( KPart) { // very temporary on circles !!! aCirc = Handle(Geom_Circle)::DownCast(TheNewCurve); if (aCirc.IsNull()) KPart = Standard_False; @@ -898,14 +898,14 @@ void Draft_Modification::Perform () Standard_Integer imin; GeomInt_IntSS i2s; if ( KPart) { - //calcul direct de NewC + // direct calculation of NewC Standard_Real aLocalReal = gp_Vec(aCirc->Circ().Location(),Axis.Location()). Dot(Axis.Direction()); Standard_Real Cos = TheDirExtr.Dot(Axis.Direction()); gp_Vec VV = ( aLocalReal / Cos) * TheDirExtr; newC = Handle(Geom_Curve)::DownCast(TheNewCurve->Translated(VV)); - // on sait calculer la PCurve + // it is possible to calculate PCurve Handle(Geom2d_Line) L2d = new Geom2d_Line(gp_Pnt2d(0.,aLocalReal/Cos), gp::DX2d()); @@ -919,11 +919,11 @@ void Draft_Modification::Perform () S1 = myFMap(Einf.FirstFace()).Geometry(); S2 = myFMap(Einf.SecondFace()).Geometry(); - // rem : dub 16/09/97 - // On ne calcule plus les PCurves tout de suite et pour 2 raisons: - // 1 - Si ProjLib doit faire une Approx, c'est idiot d'approximer - // toute la courbe d'intersection. - // 2 - De plus, si YaRev, on risque de ne plus etre SameRange. + + // PCurves are not calculated immediately for 2 reasons: + // 1 - If ProjLib should make an Approx, it is stupid to approximate the + // entire intersection curve. + // 2 - Additionally, if YaRev, there is a risk to not be SameRange. i2s.Perform(S1,S2,Precision::Confusion(), Standard_True,Standard_False,Standard_False); @@ -952,8 +952,8 @@ void Draft_Modification::Perform () locpmin = myExtPC.Point(1).Parameter(); } if(myExtPC.NbExt() == 2 && Dist2Min > Precision::Confusion() * Precision::Confusion()) { - //pour ne pas se tromper dans le choix d'image - //du premier vertex de l'edge initial + //to avoid incorrectly choosing the image + //of the first vertex of the initial edge Standard_Real d1_2 = myExtPC.SquareDistance(1); Standard_Real d2_2 = myExtPC.SquareDistance(2); if(d1_2 > 1.21*d2_2) { @@ -1229,9 +1229,9 @@ void Draft_Modification::Perform () } // else: i2s.NbLines() > 2 && S1 is Cylinder or Cone Einf.Tolerance(Max(Einf.Tolerance(), i2s.TolReached3d())); - } // Fin pas KPart + } // End step KPart } - else { // cas de tangence + else { // case of tangency const TopoDS_Face& F1 = Einf.FirstFace(); const TopoDS_Face& F2 = Einf.SecondFace(); @@ -1258,16 +1258,16 @@ void Draft_Modification::Perform () Handle(Geom_CylindricalSurface)::DownCast(aLocalS1)->Cylinder(); dirextr = cyl.Axis().Direction(); //dirfound = Standard_True; - // voir sens... + // see direction... } else if (aLocalS1->DynamicType() == STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion)) { dirextr = Handle(Geom_SurfaceOfLinearExtrusion):: DownCast(aLocalS1)->Direction(); //dirfound = Standard_True; - // voir sens... + // see direction... - // Ici on sait calculer la PCurve. + // Here it is possible to calculate PCurve. Handle(Geom_SurfaceOfLinearExtrusion) SEL = Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(aLocalS1); Handle(Geom_Circle) GCir = @@ -1284,17 +1284,17 @@ void Draft_Modification::Perform () gp_Cylinder cyl = Handle(Geom_CylindricalSurface)::DownCast(aLocalS2)->Cylinder(); dirextr = cyl.Axis().Direction(); - //dirfound = Standard_True; - // voir sens... + // dirfound = Standard_True; + // see direction... } else if (aLocalS2->DynamicType() == STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion)) { dirextr = Handle(Geom_SurfaceOfLinearExtrusion):: DownCast(aLocalS2)->Direction(); - //dirfound = Standard_True; - // voir sens... + // dirfound = Standard_True; + // see direction... - // Ici on sait calculer la PCurve. + // Here it is possible to calculate PCurve. Handle(Geom_SurfaceOfLinearExtrusion) SEL = Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(aLocalS2); Handle(Geom_Circle) GCir = @@ -1329,7 +1329,7 @@ void Draft_Modification::Perform () Einf.ChangeGeometry() = newC; } else if (!Einf.NewGeometry()){ - // on met la courbe 3d existante + // set existing curve 3D Handle(Geom_TrimmedCurve) T = Handle(Geom_TrimmedCurve)::DownCast(C); if (!T.IsNull()) C = T->BasisCurve(); Einf.ChangeGeometry() = C; @@ -1337,7 +1337,7 @@ void Draft_Modification::Perform () ite.Next(); } - // On calcule les nouveaux vertex. + // Calculate new vertices. Draft_DataMapIteratorOfDataMapOfVertexVertexInfo itv(myVMap); @@ -1351,7 +1351,7 @@ void Draft_Modification::Perform () Draft_VertexInfo& Vinf = myVMap(itv.Key()); if (!Choose(myFMap,myEMap,itv.Key(),Vinf,AC,AS)) { -// pas d'edge concourante => alignement de deux edges consecutives. +// no concerted edge => alignment of two consecutive edges. gp_Pnt pvt; Vinf.ChangeGeometry() = pvt; Vinf.InitEdgeIterator(); @@ -1509,7 +1509,7 @@ void Draft_Modification::Perform () } } - // petite boucle de validation/protection + // small loop of validation/protection for (Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo ite(myEMap); ite.More(); ite.Next()) { @@ -1620,7 +1620,7 @@ Handle(Geom_Surface) Draft_Modification::NewSurface return NewS; } gp_Ax3 axcone = Cy.Position(); - // Pb : Ou est la matiere??? + // Pb : Where is the material??? Standard_Real alpha = Angle; Standard_Boolean direct(axcone.Direct()); if ((direct && Oris == TopAbs_REVERSED) || @@ -1677,7 +1677,7 @@ Handle(Geom_Surface) Draft_Modification::NewSurface return NewS; } gp_Ax3 axcone = Co1.Position(); - // Pb : Ou est la matiere??? + // Pb : Where is the material??? Standard_Real alpha = Angle; Standard_Boolean direct(axcone.Direct()); if ((direct && Oris == TopAbs_REVERSED) || @@ -1817,7 +1817,7 @@ static Standard_Boolean Choose(const Draft_DataMapOfFaceFaceInfo& theFMap, gp_Vec tgref; Vinf.InitEdgeIterator(); - // On cherche un edge de regularite ou dont SecondFace est nulle + // Find a regular edge with null SecondFace while (Vinf.MoreEdge()) { const TopoDS_Edge& E1 = Vinf.Edge(); const Draft_EdgeInfo& Einf1 = theEMap(E1); @@ -1833,7 +1833,7 @@ static Standard_Boolean Choose(const Draft_DataMapOfFaceFaceInfo& theFMap, } Vinf.NextEdge(); } - if (!Vinf.MoreEdge()) { // on prend le premier edge + if (!Vinf.MoreEdge()) { // take the first edge Vinf.InitEdgeIterator(); } @@ -1864,7 +1864,7 @@ static Standard_Boolean Choose(const Draft_DataMapOfFaceFaceInfo& theFMap, Vinf.InitEdgeIterator(); while (Vinf.MoreEdge()) { - // On cherche un edge non tangent + // Find a non tangent edge const TopoDS_Edge& Edg = Vinf.Edge(); if (!Edg.IsSame(Eref)) { //const Draft_EdgeInfo& Einfo = theEMap(Edg); @@ -2108,7 +2108,7 @@ static TopAbs_Orientation Orientation(const TopoDS_Shape& S, const TopoDS_Face& F) { // -// changement portage NT +// change porting NT // TopExp_Explorer expl ; expl.Init(S, @@ -2141,7 +2141,7 @@ static Standard_Boolean FindRotation(const gp_Pln& Pl, if (i2pl.IsDone() && i2pl.TypeInter() == IntAna_Line) { gp_Lin li = i2pl.Line(1); - // On va essayer de tourner autour de cette ligne + // Try to turn around this line gp_Dir nx = li.Direction(); gp_Dir ny = Pl.Axis().Direction().Crossed(nx); Standard_Real a = Direction.Dot(nx); diff --git a/src/Draw/CommandWindow.cxx b/src/Draw/CommandWindow.cxx index 29fd266adc..a52430ac77 100755 --- a/src/Draw/CommandWindow.cxx +++ b/src/Draw/CommandWindow.cxx @@ -25,17 +25,17 @@ -Standard_Boolean Draw_Interprete(char*); // Implemente dans draw.cxx +Standard_Boolean Draw_Interprete(char*); // Implement in draw.cxx #define CLIENTWND 0 #define PROMPT "Command >> " -#define COMMANDSIZE 1000 // Nb caracteres maximun pour un commande +#define COMMANDSIZE 1000 // Max nb of characters for a command -// Definition des varaibles globales +// Definition of global variables #ifdef STRICT - WNDPROC OldEditProc; // Sauvegarde la procedure standard de la fenetre d'edition (Sous Classement) + WNDPROC OldEditProc; // Save the standard procedure of the edition (sub-class) #else FARPROC OldEditProc; #endif @@ -70,7 +70,7 @@ HWND CreateCommandWindow(HWND hWnd, int nitem) LONG APIENTRY CommandProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam ) { HWND hWndEdit; - int index; // Nombre de caractere dans le buffer de hWndEdit + int index; // Nb of characters in the buffer of hWndEdit MINMAXINFO* lpmmi; switch(wMsg) @@ -90,7 +90,7 @@ LONG APIENTRY CommandProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam ) case WM_SIZE : hWndEdit = (HWND)GetWindowLong(hWnd, CLIENTWND); MoveWindow(hWndEdit, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE); - // Place le curseur a la fin du buffer + // Place the cursor at the end of the buffer index = SendMessage(hWnd, WM_GETTEXTLENGTH, 0l, 0l); SendMessage(hWnd, EM_SETSEL, index, index); break; @@ -127,13 +127,13 @@ BOOL CommandCreateProc(HWND hWnd) hWnd, 0, hInstance, NULL); - // Enregistrement hWndEdit deans l'extra memory en 0 de CommandWindow + // Save hWndEdit in the extra memory in 0 of CommandWindow if (hWndEdit) SetWindowLong(hWnd, CLIENTWND, (LONG)hWndEdit); - // Sous Classement de la fenetre + // Sub-Class of the window //------- - // Sauvegarde du pointeur sur la procedure existante + // Save the pointer on the existing procedure #ifdef STRICT #ifndef _WIN64 OldEditProc = (WNDPROC)GetWindowLong(hWndEdit, GWL_WNDPROC); @@ -143,7 +143,7 @@ BOOL CommandCreateProc(HWND hWnd) #else OldEditProc = (FARPROC)GetWindowLong(hWndEdit, GWL_WNDPROC); #endif - // Mise en place de la nouvelle fonction + // Implement the new function #ifndef _WIN64 SetWindowLong(hWndEdit, GWL_WNDPROC, (LONG) EditProc); #else @@ -169,7 +169,7 @@ int GetCommand(HWND hWnd, char* buffer) while ( again && nbLine > -1 && nbChar < COMMANDSIZE-1) { strcat(buffer, strrev(temp)); - // Initialisation du 1er WORD de temp au nombre de caracteres a lire + // Initialization of the 1st WORD to the nb of characters to read WORD* nbMaxChar = (WORD*)temp; *nbMaxChar = COMMANDSIZE-1; @@ -199,7 +199,7 @@ LONG APIENTRY EditProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam ) char buffer[COMMANDSIZE]; POINT pos; BOOL rep; - static int nbline; // Taille du buffer de la fenetre d`edition + static int nbline; // Process the buffer of the edit window int index; switch(wMsg) @@ -209,21 +209,21 @@ LONG APIENTRY EditProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam ) return 0l; switch(LOWORD(wParam)) { - // Surcharge du caractere \n + // Overload of character \n case 0x0d : GetCommand(hWnd, buffer); - // Traitement standard + // Standard processing CallWindowProc(OldEditProc, hWnd, wMsg, wParam, lParam); - // Affichage du PROMPT + // Display of PROMPT rep = GetCaretPos(&pos); SendMessage(hWnd, EM_REPLACESEL, 0, (LPARAM)PROMPT); - // Affiche la commande dans la console + // Display the command in the console cout << buffer << endl; /*if (Draw_Interprete(buffer+strlen(PROMPT))== -2) DestroyProc(hWnd); */ strcpy(console_command, buffer+strlen(PROMPT)); console_semaphore = HAS_CONSOLE_COMMAND; - // Purge du buffer + // Purge the buffer nbline = SendMessage(hWnd, EM_GETLINECOUNT, 0l, 0l); if(nbline > 200) { @@ -232,7 +232,7 @@ LONG APIENTRY EditProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam ) index = SendMessage(hWnd, EM_LINEINDEX, 100, 0); SendMessage(hWnd, EM_SETSEL, 0, index); SendMessage(hWnd, WM_CUT, 0, 0); - // Place le curseur en fin de text + // Place the cursor at the end of text index = SendMessage(hWnd, WM_GETTEXTLENGTH, 0l, 0l); SendMessage(hWnd, EM_SETSEL, index, index); } @@ -241,7 +241,7 @@ LONG APIENTRY EditProc(HWND hWnd, UINT wMsg, WPARAM wParam, LONG lParam ) default : if (IsAlphanumeric((Standard_Character)LOWORD(wParam))) { - // Place le curseur en fin de texte avant affichage + // Place the cursor at the end of text before display index = SendMessage(hWnd, WM_GETTEXTLENGTH, 0l, 0l); SendMessage(hWnd, EM_SETSEL, index, index); CallWindowProc(OldEditProc, hWnd, wMsg, wParam, lParam); diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx index 4e114ca7cf..2984977dff 100755 --- a/src/Draw/Draw_BasicCommands.cxx +++ b/src/Draw/Draw_BasicCommands.cxx @@ -237,7 +237,7 @@ static Standard_Integer cpulimit(Draw_Interpretor& di, Standard_Integer n, const MDTV_CPU_LIMIT = atoi(a[1]); MDTV_CPU_CURRENT = clock()/1000; - if (first) // Lancer le thread au 1er appel seulement. + if (first) // Launch the thread only at the 1st call. { first=0 ; _beginthreadex(NULL,0,CpuFunc,NULL,0,&ThreadID); diff --git a/src/Draw/Draw_Interpretor.cxx b/src/Draw/Draw_Interpretor.cxx index 6ef1fad07c..51e796eb96 100755 --- a/src/Draw/Draw_Interpretor.cxx +++ b/src/Draw/Draw_Interpretor.cxx @@ -150,14 +150,14 @@ static void CommandDelete (ClientData clientData) Draw_Interpretor::Draw_Interpretor() : isAllocated(Standard_False) { -// On ne cree pas tout de suite l'interpreteur tcl car s'il est detenu -// par une variable globale il est cree et ecrase avant le main(). +// The tcl interpreter is not created immediately as it is kept +// by a global variable and created and deleted before the main(). myInterp = NULL; } //======================================================================= //function : Init -//purpose : Il faut appeler cette fonction +//purpose : It is necessary to call this function //======================================================================= void Draw_Interpretor::Init() diff --git a/src/Draw/Draw_Main.cxx b/src/Draw/Draw_Main.cxx index 6045ba0a75..7a7021af86 100755 --- a/src/Draw/Draw_Main.cxx +++ b/src/Draw/Draw_Main.cxx @@ -32,34 +32,6 @@ // - Draw_Appli is differently declared. -// ******************************************************************* -// CKY 18 Juilet 1997 -// ******************************************************************* -// MAIN a la sauce WNT -// EXPLICATION : un MAIN sous NT, c est quelque chose ... different de sous UNIX -// ilya un tas de trucs a initialiser -// Deux aspects : le main et Draw_Appli -// le main est specifique : arguments, creation de "console" -// Draw_Appli aussi, mais comme certains peuvent le redefinir, et que -// NT ne permet pas cela, eh be il est duplique dans chaque main ... -// Ceci a l identique. Youpi -// -// Ce source comprend : -// - un main repris : WinMain, qui en particlier definit une "console" -// - un Draw_Appli repris -// - la plupart des ifdef WNT sont laisses pour memoire -// MAIS CE CODE N EST COMPILABLE QU EN NT -// -// MODE D EMPLOI -// Dans le source de l exec .cxx, Inclure ce gros paquet (NTMain.pxx) -// a la place des includes courants et du main, en ifdef WNT of course -// -// On laisse les includes specifiques ainsi que le Draw_InitAppli -// qui lui aussi est specifique -// -// ATTENTION, avant de faire umake, taper cette commande magique (?) -// setenv (WOK_EXETYPE) W -// ******************************************************************* #ifdef HAVE_CONFIG_H # include diff --git a/src/Draw/MainWindow.cxx b/src/Draw/MainWindow.cxx index 85a12a9acf..82a1efe963 100755 --- a/src/Draw/MainWindow.cxx +++ b/src/Draw/MainWindow.cxx @@ -15,7 +15,7 @@ #include #include -Standard_Boolean Draw_Interprete(char* command); // Implemente dans Draw.cxx +Standard_Boolean Draw_Interprete(char* command); // Implemented in Draw.cxx extern Standard_Boolean Draw_IsConsoleSubsystem; //extern "C" int compat_unlink(const char *fname); // Implemente dans TCL @@ -59,14 +59,14 @@ LONG APIENTRY WndProc(HWND hWndFrame, UINT wMsg, WPARAM wParam, LONG lParam ) /*--------------------------------------------------------------------------*\ | CLIENT CREATE PROCEDURE -| Handler pour le message WM_CREATE. Creation de la fenetre de control MDI +| Handler for message WM_CREATE. Creation of control window MDI | \*--------------------------------------------------------------------------*/ BOOL CreateProc(HWND hWndFrame) { HWND hWnd; - // Enregistre le hWnd dans la fenetre principale dans extra memory en 0 + // Save hWnd in the main window in extra memory in 0 if (hWnd = CreateMDIClientWindow(hWndFrame)) SetWindowLong(hWndFrame, CLIENTWND, (LONG)hWnd); return(TRUE); @@ -75,12 +75,12 @@ BOOL CreateProc(HWND hWndFrame) /*--------------------------------------------------------------------------*\ | COMMAND PROCEDURE -| Handler pour le message WM_COMMAND +| Handler for message WM_COMMAND | \*--------------------------------------------------------------------------*/ BOOL CommandProc(HWND hWndFrame, WPARAM wParam, LPARAM lParam) { - HWND hWndClient; // Handle sur la fenetre MDI + HWND hWndClient; // Handle on window MDI HWND hWndActive; hWndClient = (HWND)GetWindowLong(hWndFrame, CLIENTWND); @@ -120,7 +120,7 @@ BOOL CommandProc(HWND hWndFrame, WPARAM wParam, LPARAM lParam) /*--------------------------------------------------------------------------*\ | CLIENT DESTROY PROCEDURE -| Handler pour le message WM_DESTROY. +| Handler for message WM_DESTROY. | \*--------------------------------------------------------------------------*/ VOID DestroyProc(HWND hWnd) diff --git a/src/DrawDim/DrawDim_Angle.cxx b/src/DrawDim/DrawDim_Angle.cxx index 1283eb21eb..c2f3d168df 100755 --- a/src/DrawDim/DrawDim_Angle.cxx +++ b/src/DrawDim/DrawDim_Angle.cxx @@ -104,7 +104,7 @@ void DrawDim_Angle::DrawOn(Draw_Display& ) const - // calcul de myAxis + // calculation of myAxis gp_Pln pln1, pln2; if (!DrawDim::Pln(myPlane1,pln1)) return; if (!DrawDim::Pln(myPlane2,pln2)) return; @@ -127,7 +127,7 @@ void DrawDim_Angle::DrawOn(Draw_Display& ) const // void AIS_AngleDimension::ComputeTwoFacesAngle(const Handle(Prs3d_Presentation)& aPresentation) // { - // Recuperation des plans + // Return planes gp_Pnt curpos; gp_Ax1 AxePos = myAxis; @@ -157,7 +157,7 @@ void DrawDim_Angle::DrawOn(Draw_Display& ) const } else { curpos = myPosition; - //myFAttach = le point de myFShape le plus proche de curpos (sauf si c'est un point sur l'axe) + //myFAttach = the point of myFShape closest to curpos (except for the case when this is a point on the axis) Standard_Real dist = RealLast(); TopExp_Explorer explo1(myFShape,TopAbs_VERTEX); gp_Pnt AxePosition = AxePos.Location(); @@ -192,7 +192,7 @@ void DrawDim_Angle::DrawOn(Draw_Display& ) const mySDir.SetXYZ (SVec.XYZ()); if (!myAutomaticPosition) { - //Projection de la position sur le plan defini par myFDir mySDir et de normale theAxisDir + //Projection of the position on the plane defined by myFDir mySDir and normal theAxisDir gp_Pln aPln (myCenter, theAxisDir); Standard_Real U,V; ElSLib::Parameters (aPln, curpos, U, V); diff --git a/src/DrawResources/TestDraw.cxx b/src/DrawResources/TestDraw.cxx index d3e959208e..c809581bc6 100755 --- a/src/DrawResources/TestDraw.cxx +++ b/src/DrawResources/TestDraw.cxx @@ -1,11 +1,11 @@ -// modele de programme principal Draw +// model of main program Draw #include #include -// main passe la main a Draw +// main passes main to Draw main(int argc, char** argv) { @@ -14,36 +14,36 @@ main(int argc, char** argv) //******************************* // -// Retirez les includes inutiles -// pour ne pas surcharger le link +// Remove unused includes +// to avoid overloading the link // //******************************** #include -// seulement si on fait de la topologie +// only is one makes the topology #include -// pour les commandes utilisateurs topologie +// for the commands using topology #include -// exemple de commande utilisateur +// example of user command static Standard_Integer macommande (Draw_Interpretor& di, Standard_Integer n, char** a) { - if (n < 2) return 1; // erreur si pas assez d'arguments + if (n < 2) return 1; // error if not enough arguments TopoDS_Shape S = DBRep::Get(a[1]); if (S.IsNull()) { - cout << a[1] << " n'est pas un shape" << endl; + cout << a[1] << " is not a shape" << endl; return 1; } - // .... faite ce que vous voulez a S ..... + // .... do what you like with S ..... - //... pour retourner un chaine a TCL, mettez la dans di + //... to return a chain to TCL, place it in di di << a[1]; @@ -51,20 +51,20 @@ static Standard_Integer macommande (Draw_Interpretor& di, } -// definition des commandes +// definition of commands void Draw_InitAppli(Draw_Interpretor& theCommands) { Draw::Commands(theCommands); // geometry - GeometryTest::AllCommands(theCommands); // voir GeometryTest.cdl pour etre plus fin + GeometryTest::AllCommands(theCommands); // see GeometryTest.cdl for details - // pour la topologie - BRepTest::AllCommands(theCommands); // voir BRepTest.cdl pour etre plus fin + // for the topology + BRepTest::AllCommands(theCommands); // see BRepTest.cdl for details - // commandes utilisateur + // user commands - theCommands.Add("macommande","macommande et son help",macommande); + theCommands.Add("macommande","macommande and its help",macommande); } diff --git a/src/DsgPrs/DsgPrs_LengthPresentation.cdl b/src/DsgPrs/DsgPrs_LengthPresentation.cdl index 36db45e870..369cf7464f 100755 --- a/src/DsgPrs/DsgPrs_LengthPresentation.cdl +++ b/src/DsgPrs/DsgPrs_LengthPresentation.cdl @@ -2,7 +2,6 @@ -- Created: Thu Jun 3 09:41:39 1993 -- Author: Jean-Louis FRENKEL -- --- modified : Rob le 26-mars-96 rajout de methodes pour representation simple... ---Copyright: Matra Datavision 1993 diff --git a/src/ElSLib/ElSLib.cxx b/src/ElSLib/ElSLib.cxx index a08c73d089..80bee3639e 100755 --- a/src/ElSLib/ElSLib.cxx +++ b/src/ElSLib/ElSLib.cxx @@ -1,11 +1,6 @@ // File: ElSLib.cxx // Created: Mon Sep 9 11:19:10 1991 // Author: Michel Chauvat -// Modifs JCV Decembre 1991 : Ajout calculs de derivees -// JPI : 28/10/96 : correction SphereDN -// JCT/RBV : 13/10/97 : correction SphereD3 -// RBV : correction Torus -// JCT : 29/03/98 : correction TorusD3 // Modified by skv - Tue Sep 9 15:10:35 2003 OCC620 @@ -1364,7 +1359,7 @@ void ElSLib::ConeParameters(const gp_Ax3& Pos, U = 0.0; } else if ( -Radius > Ploc.Z()* Tan(SAngle) ) { - // le point est du `mauvais` cote de l`apex + // the point is at the wrong side of the apex U = atan2(-Ploc.Y(), -Ploc.X()); } else { @@ -1373,14 +1368,14 @@ void ElSLib::ConeParameters(const gp_Ax3& Pos, if (U < -1.e-16) U += PIPI; else if (U < 0) U = 0; - // On evalue le V de la facon suivante : + // Evaluate V as follows : // P0 = Cone.Value(U,0) // P1 = Cone.Value(U,1) // V = P0 P1 . P0 Ploc - // Apres simplification on obtient: + // After simplification obtain: // V = Sin(Sang) * ( x cosU + y SinU - R) + z * Cos(Sang) - // Methode qui permet de trouver le V du point projete si le point - // n est pas vraiment sur le cone. + // Method that permits to find V of the projected point if the point + // is not actually on the cone. V = sin(SAngle) * ( Ploc.X() * cos(U) + Ploc.Y() * sin(U) - Radius) + cos(SAngle) * Ploc.Z(); @@ -1403,7 +1398,7 @@ void ElSLib::SphereParameters(const gp_Ax3& Pos, Standard_Real x, y, z; Ploc.Coord (x, y, z); Standard_Real l = sqrt (x * x + y * y); - if (l < gp::Resolution()) { // point sur l axe Z de la sphere + if (l < gp::Resolution()) { // point on axis Z of the sphere if (z > 0.) V = M_PI_2; // PI * 0.5 else @@ -1436,7 +1431,7 @@ void ElSLib::TorusParameters(const gp_Ax3& Pos, Standard_Real x, y, z; Ploc.Coord (x, y, z); - // toutes ces magouilles pour traiter le cas de Major < Minor. + // all that to process case of Major < Minor. U = atan2(y,x); if (MajorRadius < MinorRadius){ Standard_Real cosu = cos(U); diff --git a/src/Extrema/Extrema_ExtCS.cxx b/src/Extrema/Extrema_ExtCS.cxx index 6d67754019..cba4ff969e 100755 --- a/src/Extrema/Extrema_ExtCS.cxx +++ b/src/Extrema/Extrema_ExtCS.cxx @@ -2,10 +2,6 @@ // Created: Tue Jul 18 10:33:04 1995 // Author: Modelistation // -// Modified by MPS (june 96) : -// Dans les cas line /cone et line /tore on utilise la classe GenExtCS -// a la place de ExtElCS. Dans ExtElCS les cas line/cone et line/tore ne sont -// pas implementes // Modified by skv - Thu Jul 7 12:29:34 2005 OCC9134 diff --git a/src/Extrema/Extrema_ExtElC2d.cxx b/src/Extrema/Extrema_ExtElC2d.cxx index e70a299f4c..5508bdd336 100755 --- a/src/Extrema/Extrema_ExtElC2d.cxx +++ b/src/Extrema/Extrema_ExtElC2d.cxx @@ -25,17 +25,16 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Lin2d& C2, const Standard_Real) /*----------------------------------------------------------------------------- -Fonction: - Recherche de la distance minimale entre 2 droites. - -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 P = C1(u1) et P =C2(u2) le point intersection: +Function: + Find min distance between 2 straight lines. + +Method: + Let D1 and D2 be 2 directions of straight lines C1 and C2. + 2 cases are considered: + 1- if Angle(D1,D2) < AngTol, the straight lines are parallel. + The distance is the distance between any point of C1 and straight line C2. + 2- if Angle(D1,D2) > AngTol: + Let P = C1(u1) and P =C2(u2) the point intersection: -----------------------------------------------------------------------------*/ { @@ -60,14 +59,14 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Circ2d& C2, const Standard_Real) /*----------------------------------------------------------------------------- -Fonction: - Recherche des distances extremales entre la droite C1 et le cercle 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) +Function: + Find extreme distances between straight line C1 and circle C2. + +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) -----------------------------------------------------------------------------*/ { @@ -75,7 +74,7 @@ Methode: myDone = Standard_False; myNbExt = 0; -// Calcul de T1 dans le repere du cercle ... +// Calculate T1 in the reference of the circle ... gp_Dir2d D = C1.Direction(); gp_Dir2d x2, y2; x2 = C2.XAxis().Direction(); @@ -128,7 +127,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, myDone = Standard_False; myNbExt = 0; -// Calcul de T1 dans le repere de l ellipse ... +// Calculate T1 in the reference of the ellipse ... gp_Dir2d D = C1.Direction(); gp_Dir2d x2, y2; x2 = C2.XAxis().Direction(); @@ -179,7 +178,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Hypr2d& C2) myDone = Standard_False; myNbExt = 0; -// Calcul de T1 dans le repere de la parabole ... +// Calculate T1 in the reference of the parabole ... gp_Dir2d D = C1.Direction(); gp_Dir2d x2, y2; x2 = C2.XAxis().Direction(); @@ -215,7 +214,7 @@ Extrema_ExtElC2d::Extrema_ExtElC2d (const gp_Lin2d& C1, const gp_Parab2d& C2) myDone = Standard_False; myNbExt = 0; -// Calcul de T1 dans le repere de la parabole ... +// Calculate T1 in the reference of the parabole ... gp_Dir2d D = C1.Direction(); gp_Dir2d x2, y2; x2 = C2.MirrorAxis().Direction(); diff --git a/src/Extrema/Extrema_ExtPElC.cxx b/src/Extrema/Extrema_ExtPElC.cxx index 4ccf82f516..2bffeaa5ce 100755 --- a/src/Extrema/Extrema_ExtPElC.cxx +++ b/src/Extrema/Extrema_ExtPElC.cxx @@ -65,39 +65,39 @@ void Extrema_ExtPElC::Perform(const gp_Pnt& P, const Standard_Real Uinf, const Standard_Real Usup) /*----------------------------------------------------------------------------- -Fonction: - Recherche des valeurs de parametre u telle que: - - dist(P,C(u)) passe par un extremum, +Function: + Find values of parameter u such as: + - dist(P,C(u)) pass by an extrema, - Uinf <= u <= Usup. -Methode: - On procede en 3 temps: - 1- Projection du point P dans le plan du cercle, - 2- Calculs des u solutions dans [0.,2.*PI]: - Soit Pp, le point projete et - O, le centre du cercle; - 2 cas: - - si Pp est confondu avec O, il y a une infinite de solutions; +Method: + Pass 3 stages: + 1- Projection of point P in the plane of the circle, + 2- Calculation of u solutions in [0.,2.*PI]: + Let Pp, the projected point and + O, the center of the circle; + 2 cases: + - if Pp is mixed with 0, there is an infinite number of solutions; IsDone() renvoie Standard_False. - - sinon, 2 points sont solutions pour le cercle complet: - . Us1 = angle(OPp,OX) correspond au minimum, - . soit Us2 = ( Us1 + PI si Us1 < PI, - ( Us1 - PI sinon; - Us2 correspond au maximum. - 3- Calcul des extrema dans [Uinf,Usup]. + - otherwise, 2 points are solutions for the complete circle: + . Us1 = angle(OPp,OX) corresponds to the minimum, + . let Us2 = ( Us1 + PI if Us1 < PI, + ( Us1 - PI otherwise; + Us2 corresponds to the maximum. + 3- Calculate the extrema in [Uinf,Usup]. -----------------------------------------------------------------------------*/ { myDone = Standard_False; myNbExt = 0; -// 1- Projection du point P dans le plan du cercle -> Pp ... +// 1- Projection of the point P in the plane of circle -> Pp ... gp_Pnt O = C.Location(); gp_Vec Axe (C.Axis().Direction()); gp_Vec Trsl = Axe.Multiplied(-(gp_Vec(O,P).Dot(Axe))); gp_Pnt Pp = P.Translated(Trsl); -// 2- Calcul des u solutions dans [0.,2.*PI] ... +// 2- Calculate u solutions in [0.,2.*PI] ... gp_Vec OPp (O,Pp); if (OPp.Magnitude() < Tol) { return; } @@ -121,7 +121,7 @@ Methode: if (((Usol[1]-2*PI-Uinf) < TolU) && ((Usol[1]-2*PI-Uinf) > -TolU)) Usol[1] = Uinf; -// 3- Calcul des extrema dans [Umin,Umax] ... +// 3- Calculate extrema in [Umin,Umax] ... gp_Pnt Cu; Standard_Real Us; @@ -156,36 +156,35 @@ void Extrema_ExtPElC::Perform (const gp_Pnt& P, const Standard_Real Uinf, const Standard_Real Usup) /*----------------------------------------------------------------------------- -Fonction: - Recherche des valeurs de parametre u telle que: - - dist(P,C(u)) passe par un extremum, +Function: + Find values of parameter u so that: + - dist(P,C(u)) passes by an extremum, - Uinf <= u <= Usup. -Methode: - On procede en 2 temps: - 1- Projection du point P dans le plan de l'ellipse, - 2- Calculs des solutions: - Soit Pp, le point projete; on recherche les valeurs u telles que: +Method: + Takes 2 steps: + 1- Projection of point P in the plane of the ellipse, + 2- Calculation of the solutions: + Let Pp, the projected point; find values u so that: (C(u)-Pp).C'(u) = 0. (1) - Soit Cos = cos(u) et Sin = sin(u), - C(u) = (A*Cos,B*Sin) et Pp = (X,Y); - Alors, (1) <=> (A*Cos-X,B*Sin-Y).(-A*Sin,B*Cos) = 0. + Let Cos = cos(u) and Sin = sin(u), + C(u) = (A*Cos,B*Sin) and Pp = (X,Y); + Then, (1) <=> (A*Cos-X,B*Sin-Y).(-A*Sin,B*Cos) = 0. (B**2-A**2)*Cos*Sin - B*Y*Cos + A*X*Sin = 0. - On utilise l'algorithme math_TrigonometricFunctionRoots pour resoudre - cette equation. + Use algorithm math_TrigonometricFunctionRoots to solve this equation. -----------------------------------------------------------------------------*/ { myDone = Standard_False; myNbExt = 0; -// 1- Projection du point P dans le plan de l ellipse -> Pp ... +// 1- Projection of point P in the plane of the ellipse -> Pp ... gp_Pnt O = C.Location(); gp_Vec Axe (C.Axis().Direction()); gp_Vec Trsl = Axe.Multiplied(-(gp_Vec(O,P).Dot(Axe))); gp_Pnt Pp = P.Translated(Trsl); -// 2- Calculs des solutions ... +// 2- Calculation of solutions ... Standard_Integer NoSol, NbSol; Standard_Real A = C.MajorRadius(); @@ -235,24 +234,24 @@ void Extrema_ExtPElC::Perform(const gp_Pnt& P, const Standard_Real Uinf, const Standard_Real Usup) /*----------------------------------------------------------------------------- -Fonction: - Recherche des valeurs de parametre u telle que: - - dist(P,C(u)) passe par un extremum, +Function: + Find values of parameter u so that: + - dist(P,C(u)) passes by an extremum, - Uinf <= u <= Usup. -Methode: - On procede en 2 temps: - 1- Projection du point P dans le plan de l'hyperbole, - 2- Calculs des solutions: - Soit Pp, le point projete; on recherche les valeurs u telles que: +Method: + Takes 2 steps: + 1- Projection of point P in the plane of the hyperbola, + 2- Calculation of solutions: + Let Pp, le point projete; on recherche les valeurs u telles que: (C(u)-Pp).C'(u) = 0. (1) - Soit R et r les rayons de l'hyperbole, - Chu = Cosh(u) et Shu = Sinh(u), - C(u) = (R*Chu,r*Shu) et Pp = (X,Y); - Alors, (1) <=> (R*Chu-X,r*Shu-Y).(R*Shu,r*Chu) = 0. + Let R and r be the radiuses of the hyperbola, + Chu = Cosh(u) and Shu = Sinh(u), + C(u) = (R*Chu,r*Shu) and Pp = (X,Y); + Then, (1) <=> (R*Chu-X,r*Shu-Y).(R*Shu,r*Chu) = 0. (R**2+r**2)*Chu*Shu - X*R*Shu - Y*r*Chu = 0. (2) - Soit v = e**u; - Alors, en utilisant Chu = (e**u+e**(-u))/2. et Sh = (e**u-e**(-u)))/2. + Let v = e**u; + Then, by using Chu = (e**u+e**(-u))/2. and Sh = (e**u-e**(-u)))/2. (2) <=> ((R**2+r**2)/4.) * (v**2-v**(-2)) - ((X*R+Y*r)/2.) * v + ((X*R-Y*r)/2.) * v**(-1) = 0. @@ -260,21 +259,20 @@ Methode: ((X*R+Y*r)/2.) * v**3 + ((X*R-Y*r)/2.) * v - ((R**2+r**2)/4.) = 0. - On utilise l'algorithme math_DirectPolynomialRoots pour resoudre - cette equation en v. + Use algorithm math_DirectPolynomialRoots to solve this equation by v. -----------------------------------------------------------------------------*/ { myDone = Standard_False; myNbExt = 0; -// 1- Projection du point P dans le plan de l hyperbole -> Pp ... +// 1- Projection of point P in the plane of hyperbola -> Pp ... gp_Pnt O = C.Location(); gp_Vec Axe (C.Axis().Direction()); gp_Vec Trsl = Axe.Multiplied(-(gp_Vec(O,P).Dot(Axe))); gp_Pnt Pp = P.Translated(Trsl); -// 2- Calculs des solutions ... +// 2- Calculation of solutions ... Standard_Real Tol2 = Tol * Tol; Standard_Real R = C.MajorRadius(); @@ -341,36 +339,35 @@ void Extrema_ExtPElC::Perform(const gp_Pnt& P, const Standard_Real Uinf, const Standard_Real Usup) /*----------------------------------------------------------------------------- -Fonction: - Recherche des valeurs de parametre u telle que: - - dist(P,C(u)) passe par un extremum, +Function: + Find values of parameter u so that: + - dist(P,C(u)) pass by an extremum, - Uinf <= u <= Usup. -Methode: - On procede en 2 temps: - 1- Projection du point P dans le plan de la parabole, - 2- Calculs des solutions: - Soit Pp, le point projete; on recherche les valeurs u telles que: +Method: + Takes 2 steps: + 1- Projection of point P in the plane of the parabola, + 2- Calculation of solutions: + Let Pp, the projected point; find values u so that: (C(u)-Pp).C'(u) = 0. (1) - Soit F la focale de la parabole, - C(u) = ((u*u)/(4.*F),u) et Pp = (X,Y); + Let F the focus of the parabola, + C(u) = ((u*u)/(4.*F),u) and Pp = (X,Y); Alors, (1) <=> ((u*u)/(4.*F)-X,u-Y).(u/(2.*F),1) = 0. (1./(4.*F)) * U**3 + (2.*F-X) * U - 2*F*Y = 0. - On utilise l'algorithme math_DirectPolynomialRoots pour resoudre - cette equation en U. + Use algorithm math_DirectPolynomialRoots to solve this equation by U. -----------------------------------------------------------------------------*/ { myDone = Standard_False; myNbExt = 0; -// 1- Projection du point P dans le plan de la parabole -> Pp ... +// 1- Projection of point P in the plane of the parabola -> Pp ... gp_Pnt O = C.Location(); gp_Vec Axe (C.Axis().Direction()); gp_Vec Trsl = Axe.Multiplied(-(gp_Vec(O,P).Dot(Axe))); gp_Pnt Pp = P.Translated(Trsl); -// 2- Calculs des solutions ... +// 2- Calculation of solutions ... Standard_Real F = C.Focal(); gp_Vec OPp (O,Pp); diff --git a/src/Extrema/Extrema_ExtPElS.cxx b/src/Extrema/Extrema_ExtPElS.cxx index 22942e1b4b..de973f37e0 100755 --- a/src/Extrema/Extrema_ExtPElS.cxx +++ b/src/Extrema/Extrema_ExtPElS.cxx @@ -1,7 +1,4 @@ -// modified by MPS (june 96) gestion du cas ou le plan de reference du cone -// passe par le sommet ( O et M sont alors confondus) -// -// + #include #include #include @@ -20,20 +17,20 @@ Extrema_ExtPElS::Extrema_ExtPElS (const gp_Pnt& P, Perform(P, S, Tol); } /*----------------------------------------------------------------------------- -Fonction: - Recherche des 2 distances extremales entre le point P et le cylindre S. +Function: +Find 2 extreme distances between point P and cylinder S. -Methode: - Soit Pp la projection de P dans le plan XOY du cylindre; - 2 cas sont consideres: +Method: + Let Pp be the projection of P in plane XOY of the cylinder; + 2 cases are considered: 1- distance(Pp,O) < Tol: - Il y a une infinite de solutions; IsDone() = Standard_False. + There are infinite solutions; IsDone() = Standard_False. 2- distance(Pp,O) > Tol: - Soit V = OP.OZ, - U1 = angle(OX,OPp) avec 0 < U1 < 2.*PI - U2 = U1 + PI avec 0 < U2 < 2.*PI; - alors (U1,V) correspond a la distance minimale - et (U2,V) correspond a la distance maximale. + let V = OP.OZ, + U1 = angle(OX,OPp) with 0 < U1 < 2.*PI + U2 = U1 + PI with 0 < U2 < 2.*PI; + then (U1,V) corresponds to the min distance. + and (U2,V) corresponds to the max distance. -----------------------------------------------------------------------------*/ void Extrema_ExtPElS::Perform(const gp_Pnt& P, @@ -43,14 +40,14 @@ void Extrema_ExtPElS::Perform(const gp_Pnt& P, myDone = Standard_False; myNbExt = 0; -// Projection du point P dans le plan XOY du cylindre ... +// Projection of point P in plane XOY of the cylinder ... gp_Ax3 Pos = S.Position(); gp_Pnt O = Pos.Location(); gp_Vec OZ (Pos.Direction()); Standard_Real V = gp_Vec(O,P).Dot(OZ); gp_Pnt Pp = P.Translated(OZ.Multiplied(-V)); -// Calcul des extrema +// Calculation of extrema gp_Vec OPp (O,Pp); if (OPp.Magnitude() < Tol) { return; } gp_Vec myZ = Pos.XDirection()^Pos.YDirection(); @@ -78,33 +75,33 @@ Extrema_ExtPElS::Extrema_ExtPElS (const gp_Pnt& P, Perform(P, S, Tol); } /*----------------------------------------------------------------------------- -Fonction: - Recherche des 2 distances extremales entre le point P et le cone S. +Function: + Find 2 extreme distances between point P and cone S. -Methode: - Soit M le sommet du cone. - 2 cas sont consideres: +Method: + Let M the top of the cone. + 2 cases are considered: 1- distance(P,M) < Tol: - Il y a un minimum en M. + there is a minimum in M. 2- distance(P,M) > Tol: - Soit Pp la projection de P dans le plan XOY du cone; - 2 cas sont consideres: + Let Pp the projection of P in the plane XOY of the cone; + 2 cases are considered: 1- distance(Pp,O) < Tol: - Il y a une infinite de solutions; IsDone() = Standard_False. + There is an infinite number of solutions; IsDone() = Standard_False. 2- distance(Pp,O) > Tol: - Il existe 2 extrema: - Soit Vm = valeur de v pour le point M, - Vp = valeur de v pour le point P, - U1 = angle(OX,OPp) si Vp > Vm ) - -angle(OX,OPp) sinon ) avec 0. < U1 < 2*PI, - U2 = U1 + PI avec 0. < U2 < 2*PI; - On se place dans le plan PpOZ. - Soit A l'angle du cone, - B = angle(MP,MO) avec 0. < B < PI, + There exist 2 extrema: + Let Vm = value of v for point M, + Vp = value of v for point P, + U1 = angle(OX,OPp) if Vp > Vm ) + -angle(OX,OPp) otherwise ) with 0. < U1 < 2*PI, + U2 = U1 + PI with 0. < U2 < 2*PI; + We are in plane PpOZ. + Let A the angle of the cone, + B = angle(MP,MO) with 0. < B < PI, L = longueur(MP), V1 = (L * cos(B-A)) + Vm, V2 = (L * cos(B+A)) + Vm; - alors (U1,V1) et (U2,V2) correspondent aux distances minimales. + then (U1,V1) and (U2,V2) correspond to min distances. -----------------------------------------------------------------------------*/ void Extrema_ExtPElS::Perform(const gp_Pnt& P, @@ -130,7 +127,7 @@ void Extrema_ExtPElS::Perform(const gp_Pnt& P, gp_Vec(O, M).Dot(OZ); #endif -// Cas ou P est confondu avec S ... +// Case when P is mixed with S ... if (L2 < Tol * Tol) { mySqDist[0] = L2; myPoint[0] = Extrema_POnSurf(0.,Vm,M); @@ -145,7 +142,7 @@ void Extrema_ExtPElS::Perform(const gp_Pnt& P, } else DirZ=gp_Vec(M,O); -// Projection de P dans le plan de reference du cone ... +// Projection of P in the reference plane of the cone ... Standard_Real Zp = gp_Vec(O, P).Dot(OZ); gp_Pnt Pp = P.Translated(OZ.Multiplied(-Zp)); @@ -195,25 +192,25 @@ Extrema_ExtPElS::Extrema_ExtPElS (const gp_Pnt& P, Perform(P, S, Tol); } /*----------------------------------------------------------------------------- -Fonction: - Recherche des 2 distances extremales entre le point P et la sphere S. +Function: + Find 2 extreme distances between point P and sphere S. -Methode: - Soit O l'origine de la sphere. - 2 cas sont consideres: +Method: + Let O be the origin of the sphere. + 2 cases are considered: 1- distance(P,O) < Tol: - Il y a une infinite de solutions; IsDone() = Standard_False + There is an infinite number of solutions; IsDone() = Standard_False 2- distance(P,O) > Tol: - Soit Pp la projection du point P dans le plan XOY de la sphere; - 2 cas sont consideres: + Let Pp be the projection of point P in the plane XOY of the sphere; + 2 cases are considered: 1- distance(Pp,O) < Tol: - Les 2 solutions sont: (0,-PI/2.) et (0.,PI/2.) + 2 solutions are: (0,-PI/2.) and (0.,PI/2.) 2- distance(Pp,O) > Tol: - Soit U1 = angle(OX,OPp) avec 0. < U1 < 2.*PI, + Let U1 = angle(OX,OPp) with 0. < U1 < 2.*PI, U2 = U1 + PI avec 0. < U2 < 2*PI, - V1 = angle(OPp,OP) avec -PI/2. < V1 < PI/2. , - alors (U1, V1) correspond a la distance minimale - et (U2,-V1) correspond a la distance maximale. + V1 = angle(OPp,OP) with -PI/2. < V1 < PI/2. , + then (U1, V1) corresponds to the min distance + and (U2,-V1) corresponds to the max distance. -----------------------------------------------------------------------------*/ void Extrema_ExtPElS::Perform(const gp_Pnt& P, @@ -226,16 +223,16 @@ void Extrema_ExtPElS::Perform(const gp_Pnt& P, gp_Ax3 Pos = S.Position(); gp_Vec OP (Pos.Location(),P); -// Cas ou P est confondu avec O ... +// Case when P is mixed with O ... if (OP.SquareMagnitude() < Tol * Tol) { return; } -// Projection de P dans le plan XOY de la sphere ... +// Projection if P in plane XOY of the sphere ... gp_Pnt O = Pos.Location(); gp_Vec OZ (Pos.Direction()); Standard_Real Zp = OP.Dot(OZ); gp_Pnt Pp = P.Translated(OZ.Multiplied(-Zp)); -// Calcul des extrema ... +// Calculation of extrema ... gp_Vec OPp (O,Pp); Standard_Real U1, U2, V; if (OPp.SquareMagnitude() < Tol * Tol) { @@ -273,23 +270,23 @@ Extrema_ExtPElS::Extrema_ExtPElS (const gp_Pnt& P, Perform(P, S, Tol); } /*----------------------------------------------------------------------------- -Fonction: - Recherche des 2 distances extremales entre le point P et le tore S. +Function: + Find 2 extreme distances between point P and torus S. -Methode: - Soit Pp la projection du point P dans le plan XOY du tore; - 2 cas sont consideres: + Method: + Let Pp be the projection of point P in plane XOY of the torus; + 2 cases are consideres: 1- distance(Pp,O) < Tol: - Il y a une infinite de solutions; IsDone() = Standard_False. + There is an infinite number of solutions; IsDone() = Standard_False. 2- distance(Pp,O) > Tol: - On se place dans le plan PpOZ; - Soit V1 = angle(OX,OPp) avec 0. < V1 < 2.*PI, - V2 = V1 + PI avec 0. < V2 < 2.*PI, - O1 et O2 les centres des cercles (O1 sur coord. posit.) - U1 = angle(OPp,O1P), - U2 = angle(OPp,PO2); - alors (U1,V1) correspond a la distance minimale - et (U2,V2) correspond a la distance maximale. + One is located in plane PpOZ; + Let V1 = angle(OX,OPp) with 0. < V1 < 2.*PI, + V2 = V1 + PI with 0. < V2 < 2.*PI, + O1 and O2 centers of circles (O1 on coord. posit.) + U1 = angle(OPp,O1P), + U2 = angle(OPp,PO2); + then (U1,V1) corresponds to the min distance + and (U2,V2) corresponds to the max distance. -----------------------------------------------------------------------------*/ void Extrema_ExtPElS::Perform(const gp_Pnt& P, const gp_Torus& S, @@ -298,13 +295,13 @@ void Extrema_ExtPElS::Perform(const gp_Pnt& P, myDone = Standard_False; myNbExt = 0; -// Projection de P dans le plan XOY ... +// Projection of P in plane XOY ... gp_Ax3 Pos = S.Position(); gp_Pnt O = Pos.Location(); gp_Vec OZ (Pos.Direction()); gp_Pnt Pp = P.Translated(OZ.Multiplied(-(gp_Vec(O,P).Dot(Pos.Direction())))); -// Calcul des extrema ... +// Calculation of extrema ... gp_Vec OPp (O,Pp); Standard_Real R2 = OPp.SquareMagnitude(); if (R2 < Tol * Tol) { return; } @@ -364,7 +361,7 @@ void Extrema_ExtPElS::Perform (const gp_Pnt& P, myDone = Standard_False; myNbExt = 0; -// Projection du point P dans le plan XOY du cylindre ... +// Projection of point P in plane XOY of the cylinder ... gp_Pnt O = S.Location(); gp_Vec OZ (S.Axis().Direction()); Standard_Real U, V = gp_Vec(O,P).Dot(OZ); diff --git a/src/Extrema/Extrema_ExtPS.cxx b/src/Extrema/Extrema_ExtPS.cxx index 290e5b6539..090fb3f018 100755 --- a/src/Extrema/Extrema_ExtPS.cxx +++ b/src/Extrema/Extrema_ExtPS.cxx @@ -1,10 +1,5 @@ // File Extrema_ExtPS.cxx //----------------------------------------------------------------- -// modif JMB le 17 Mai 1999. -// on trimme la surface a +/- 10000 plutot qu'a l'infini -// (sinon ca raise dans les Math) -// voir bug ID260065 -//----------------------------------------------------------------- #include #include @@ -359,4 +354,4 @@ void Extrema_ExtPS::SetFlag(const Extrema_ExtFlag F) void Extrema_ExtPS::SetAlgo(const Extrema_ExtAlgo A) { myExtPS.SetAlgo(A); -} \ No newline at end of file +} diff --git a/src/Extrema/Extrema_FuncExtCC.cdl b/src/Extrema/Extrema_FuncExtCC.cdl index 5b7f66bc7a..2b447ebeb5 100755 --- a/src/Extrema/Extrema_FuncExtCC.cdl +++ b/src/Extrema/Extrema_FuncExtCC.cdl @@ -16,8 +16,7 @@ private generic class FuncExtCC from Extrema inherits FunctionSetWithDerivatives from math - ---Purpose: Fonction permettant de rechercher les extrema de la - -- distance entre 2 courbes. + ---Purpose: Function allows finding extrema of the distance between 2 curves. uses Vector from math, Matrix from math, @@ -50,34 +49,34 @@ is ---C++: inline Value (me: in out; UV: Vector; F: out Vector) returns Boolean is redefined; - ---Purpose: Calcul de Fi(U,V). + ---Purpose: Calculate Fi(U,V). Derivatives (me: in out; UV: Vector; DF: out Matrix) returns Boolean; - ---Purpose: Calcul de Fi'(U,V). + ---Purpose: Calculate Fi'(U,V). Values (me: in out; UV: Vector; F: out Vector; DF: out Matrix) returns Boolean; - ---Purpose: Calcul de Fi(U,V) et Fi'(U,V). + ---Purpose: Calculate Fi(U,V) and Fi'(U,V). GetStateNumber (me: in out) returns Integer - ---Purpose: Memorise l'extremum trouve. + ---Purpose: Save the found extremum. is redefined; NbExt (me) returns Integer; ---C++: inline - ---Purpose: Renvoie le nombre d'extrema trouves. + ---Purpose: Return the number of found extrema. SquareDistance (me; N: Integer) returns Real ---C++: inline - ---Purpose: Renvoie la valeur de la Nieme distance. + ---Purpose: Return the value of the Nth distance. raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). Points (me; N: Integer; P1,P2: out POnC) - ---Purpose: Renvoie les points de la Nieme distance extremale. + ---Purpose: Return the points of the Nth extreme distance. raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). CurvePtr (me; theRank: Integer) returns Address; ---C++: inline @@ -93,10 +92,10 @@ fields myC1 : Address from Standard; myC2 : Address from Standard; myTol : Real; - myU : Real; -- valeur courante de U - myV : Real; -- valeur courante de V - myP1 : Pnt; -- point courant C1(U) - myP2 : Pnt; -- point courant C2(U) + myU : Real; + myV : Real; + myP1 : Pnt; -- current point C1(U) + myP2 : Pnt; -- current point C2(U) mySqDist: SequenceOfReal from TColStd; myPoints: SeqPOnC; diff --git a/src/Extrema/Extrema_FuncExtCS.cdl b/src/Extrema/Extrema_FuncExtCS.cdl index 1f83f54062..9e7ac0b10c 100755 --- a/src/Extrema/Extrema_FuncExtCS.cdl +++ b/src/Extrema/Extrema_FuncExtCS.cdl @@ -8,8 +8,8 @@ private class FuncExtCS from Extrema inherits FunctionSetWithDerivatives from math - ---Purpose: Fonction permettant de rechercher les extrema de la - -- distance entre une courbe et une surface. + ---Purpose: Function to find extrema of the + -- distance between a curve and a surface. uses POnSurf from Extrema, POnCurv from Extrema, @@ -45,39 +45,39 @@ is NbEquations (me) returns Integer; Value (me: in out; UV: Vector; F: out Vector) returns Boolean; - ---Purpose: Calcul de Fi(U,V). + ---Purpose: Calculation of Fi(U,V). Derivatives (me: in out; UV: Vector; DF: out Matrix) returns Boolean; - ---Purpose: Calcul de Fi'(U,V). + ---Purpose: Calculation of Fi'(U,V). Values (me: in out; UV: Vector; F: out Vector; DF: out Matrix) returns Boolean; - ---Purpose: Calcul de Fi(U,V) et Fi'(U,V). + ---Purpose: Calculation of Fi(U,V) and Fi'(U,V). GetStateNumber (me: in out) returns Integer - ---Purpose: Memorise l'extremum trouve. + ---Purpose: Save the found extremum. is redefined; NbExt (me) returns Integer; - ---Purpose: Renvoie le nombre d'extrema trouves. + ---Purpose: Return the number of found extrema. SquareDistance (me; N: Integer) returns Real - ---Purpose: Renvoie la valeur de la Nieme distance. + ---Purpose: Return the value of the Nth distance. raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). PointOnCurve (me; N: Integer) returns POnCurv - ---Purpose: Renvoie le Nieme extremum sur C. + ---Purpose: Returns the Nth extremum on C. ---C++: return const& raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). PointOnSurface (me; N: Integer) returns POnSurf - ---Purpose: Renvoie le Nieme extremum sur S. + ---Purpose: Return the Nth extremum on S. ---C++: return const& raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). Bidon1(me) returns SurfacePtr from Adaptor3d is static private; @@ -93,9 +93,9 @@ fields myP1 : Pnt from gp; myP2 : Pnt from gp; - myt : Real; -- valeur courante de U sur C - myU : Real; -- valeur courante de U sur S - myV : Real; -- valeur courante de V sur S + myt : Real; -- current value of U on C + myU : Real; -- current value of U on S + myV : Real; -- current value of V on S mySqDist: SequenceOfReal from TColStd; myPoint1: SequenceOfPOnCurv from Extrema; diff --git a/src/Extrema/Extrema_FuncExtPC.cdl b/src/Extrema/Extrema_FuncExtPC.cdl index 751c1fe4c3..99e90a7a2e 100755 --- a/src/Extrema/Extrema_FuncExtPC.cdl +++ b/src/Extrema/Extrema_FuncExtPC.cdl @@ -13,8 +13,8 @@ private generic class FuncExtPC from Extrema Vec as any) inherits FunctionWithDerivative from math - ---Purpose: Fonction permettant de rechercher les extrema de la - -- distance entre un point et une courbe. + --- Purpose: Function to find extrema of the distance between a + --- point and a curve. uses SequenceOfReal from TColStd, SequenceOfInteger from TColStd @@ -45,47 +45,47 @@ is -- were not initialized. Value (me: in out; U: Real; F: out Real) returns Boolean; - ---Purpose: Calcul de F(U). + ---Purpose: Calculation of F(U). Derivative (me: in out; U: Real; DF: out Real) returns Boolean; - ---Purpose: Calcul de F'(U). + ---Purpose: Calculation of F'(U). Values (me: in out; U: Real; F,DF: out Real) returns Boolean; - ---Purpose: Calcul de F(U) et F'(U). + ---Purpose: Calculation of F(U) and F'(U). GetStateNumber (me: in out) returns Integer - ---Purpose: Memorise l'extremum trouve. + ---Purpose: Save the found extremum. is redefined; NbExt (me) returns Integer - ---Purpose: Renvoie le nombre d'extrema trouves. + ---Purpose: Return the nunber of found extrema. raises TypeMismatch from Standard; SquareDistance (me; N: Integer) returns Real - ---Purpose: Renvoie la Nieme distance. + ---Purpose: Returns the Nth distance. raises OutOfRange from Standard, TypeMismatch from Standard; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). IsMin (me; N: Integer) returns Boolean - ---Purpose: Indique si la Nieme distance est un minimum. + ---Purpose: Shows if the Nth distance is a minimum. raises OutOfRange from Standard, TypeMismatch from Standard; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). Point (me; N: Integer) returns POnC - ---Purpose: Renvoie le Nieme extremum. + ---Purpose: Returns the Nth extremum. raises OutOfRange from Standard, TypeMismatch from Standard; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). fields myP : Pnt; myC : Address from Standard; - myU : Real; -- valeur courante - myPc : Pnt; -- point courant - myD1f : Real; -- valeur de la derivee de la fonction + myU : Real; -- current + myPc : Pnt; -- current point + myD1f : Real; -- value of derivative of the function mySqDist: SequenceOfReal from TColStd; myIsMin: SequenceOfInteger from TColStd; diff --git a/src/Extrema/Extrema_FuncExtPS.cdl b/src/Extrema/Extrema_FuncExtPS.cdl index f97a67ab7b..ff4042cdc4 100755 --- a/src/Extrema/Extrema_FuncExtPS.cdl +++ b/src/Extrema/Extrema_FuncExtPS.cdl @@ -10,8 +10,8 @@ private class FuncExtPS from Extrema inherits FunctionSetWithDerivatives from math - ---Purpose: Fonction permettant de rechercher les extrema de la - -- distance entre un point et une surface. + ---Purpose: Function to find the extrema of the + -- distance between a point and a surface. uses POnSurf from Extrema, SequenceOfPOnSurf from Extrema, @@ -47,32 +47,32 @@ is NbEquations (me) returns Integer; Value (me: in out; UV: Vector; F: out Vector) returns Boolean; - ---Purpose: Calcul de Fi(U,V). + ---Purpose: Calculate Fi(U,V). Derivatives (me: in out; UV: Vector; DF: out Matrix) returns Boolean; - ---Purpose: Calcul de Fi'(U,V). + ---Purpose: Calculate Fi'(U,V). Values (me: in out; UV: Vector; F: out Vector; DF: out Matrix) returns Boolean; - ---Purpose: Calcul de Fi(U,V) et Fi'(U,V). + ---Purpose: Calculate Fi(U,V) and Fi'(U,V). GetStateNumber (me: in out) returns Integer - ---Purpose: Memorise l'extremum trouve. + ---Purpose: Save the found extremum. is redefined; NbExt (me) returns Integer; - ---Purpose: Renvoie le nombre d'extrema trouves. + ---Purpose: Return the number of found extrema. SquareDistance (me; N: Integer) returns Real - ---Purpose: Renvoie la valeur de la Nieme distance. + ---Purpose: Return the value of the Nth distance. raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). Point (me; N: Integer) returns POnSurf - ---Purpose: Renvoie le Nieme extremum. + ---Purpose: Returns the Nth extremum. raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). -- Modified by skv - Thu Sep 30 15:19:59 2004 OCC593 Begin HasDegIso(me) returns Boolean from Standard; @@ -85,9 +85,9 @@ fields myP : Pnt from gp; myS : SurfacePtr from Adaptor3d; - myU : Real; -- valeur courante de U - myV : Real; -- valeur courante de V - myPs : Pnt from gp; -- point courant + myU : Real; -- current value of U + myV : Real; -- current value of V + myPs : Pnt from gp; -- current point mySqDist: SequenceOfReal from TColStd; myPoint: SequenceOfPOnSurf from Extrema; diff --git a/src/Extrema/Extrema_FuncExtSS.cdl b/src/Extrema/Extrema_FuncExtSS.cdl index 3db4448694..d60c876416 100755 --- a/src/Extrema/Extrema_FuncExtSS.cdl +++ b/src/Extrema/Extrema_FuncExtSS.cdl @@ -7,8 +7,8 @@ private class FuncExtSS from Extrema inherits FunctionSetWithDerivatives from math - ---Purpose: Fonction permettant de rechercher les extrema de la - -- distance entre deux surfaces. + ---Purpose: Function to find extrema of the + -- distance between two surfaces. uses POnSurf from Extrema, SequenceOfPOnSurf from Extrema, @@ -40,32 +40,32 @@ is NbEquations (me) returns Integer; Value (me: in out; UV: Vector; F: out Vector) returns Boolean; - ---Purpose: Calcul de Fi(U,V). + ---Purpose: Calculate Fi(U,V). Derivatives (me: in out; UV: Vector; DF: out Matrix) returns Boolean; - ---Purpose: Calcul de Fi'(U,V). + ---Purpose: Calculate Fi'(U,V). Values (me: in out; UV: Vector; F: out Vector; DF: out Matrix) returns Boolean; - ---Purpose: Calcul de Fi(U,V) et Fi'(U,V). + ---Purpose: Calculate Fi(U,V) and Fi'(U,V). GetStateNumber (me: in out) returns Integer - ---Purpose: Memorise l'extremum trouve. + ---Purpose: Save the found extremum. is redefined; NbExt (me) returns Integer; - ---Purpose: Renvoie le nombre d'extrema trouves. + ---Purpose: Return the number of found extrema. SquareDistance (me; N: Integer) returns Real - ---Purpose: Renvoie la valeur de la Nieme distance. + ---Purpose: Return the value of the Nth distance. raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). PointOnS1 (me; N: Integer) returns POnSurf - ---Purpose: Renvoie le Nieme extremum sur S1. + ---Purpose: Return the Nth extremum on S1. raises OutOfRange; - -- si N < 1 ou N > NbExt(me). + -- if N < 1 or N > NbExt(me). PointOnS2 (me; N: Integer) returns POnSurf ---Purpose: Renvoie le Nieme extremum sur S2. @@ -83,10 +83,10 @@ fields myP1 : Pnt from gp; myP2 : Pnt from gp; - myU1 : Real; -- valeur courante de U sur S1 - myV1 : Real; -- valeur courante de V sur S1 - myU2 : Real; -- valeur courante de U sur S2 - myV2 : Real; -- valeur courante de V sur S2 + myU1 : Real; -- current value of U on S1 + myV1 : Real; -- current value of V on S1 + myU2 : Real; -- current value of U on S2 + myV2 : Real; -- current value of V on S2 mySqDist: SequenceOfReal from TColStd; myPoint1: SequenceOfPOnSurf from Extrema; diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index b76cf7882b..f20ff89d2a 100755 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -157,9 +157,9 @@ Function: S using sampling (NbU,NbV). Method: - The algorithm bases on the hypothesis that sampling is precise enough - pour que, s'il existe N distances extremales entre le point et la surface, - alors il existe aussi N extrema entre le point et la grille. + The algorithm bases on the hypothesis that sampling is precise enough, + if there exist N extreme distances between the point and the surface, + so there also exist N extrema between the point and the grid. So, the algorithm consists in starting from extrema of the grid to find the extrema of the surface. The extrema are calculated by the algorithm math_FunctionSetRoot with the @@ -338,7 +338,7 @@ void Extrema_GenExtPS::Initialize(const Adaptor3d_Surface& S, U0 = U0/2. + myumin; V0 = V0/2. + myvmin; -// Calcul des distances +// Calculation of distances Standard_Integer NoU, NoV; Standard_Real U, V; @@ -353,11 +353,11 @@ void Extrema_GenExtPS::Initialize(const Adaptor3d_Surface& S, //mypoints = new TColgp_HArray2OfPnt(0,myusample+1,0,myvsample+1); /* -a- Constitution du tableau des distances (TbDist(0,myusample+1,0,myvsample+1)): +a- Constitution of the table of distances (TbDist(0,myusample+1,0,myvsample+1)): --------------------------------------------------------------- */ -// Parametrage de l echantillon +// Parameterisation of the sample } @@ -378,7 +378,7 @@ void Extrema_GenExtPS::BuildTree() U0 = U0/2. + myumin; V0 = V0/2. + myvmin; - // Calcul des distances + // Calculation of distances mySphereUBTree = new Extrema_UBTreeOfSphere; Extrema_UBTreeFillerOfSphere aFiller(*mySphereUBTree); Standard_Integer i = 0; diff --git a/src/Extrema/Extrema_GenLocateExtPS.cxx b/src/Extrema/Extrema_GenLocateExtPS.cxx index c88d90c9c5..9c7789eda4 100755 --- a/src/Extrema/Extrema_GenLocateExtPS.cxx +++ b/src/Extrema/Extrema_GenLocateExtPS.cxx @@ -24,18 +24,17 @@ Extrema_GenLocateExtPS::Extrema_GenLocateExtPS (const gp_Pnt& P, const Standard_Real TolU, const Standard_Real TolV) /*----------------------------------------------------------------------------- -Fonction: - Recherche de (U,V) proche de (U0,V0) tel que dist(S(U,V),P) soit extremale. +Function: + Find (U,V) close to (U0,V0) so that dist(S(U,V),P) was extreme. -Methode: - Si (u,v) est solution, on peut ecrire: +Method: + If (u,v) is a solution, it is possible to write: { F1(u,v) = (S(u,v)-P).dS/du(u,v) = 0. { F2(u,v) = (S(u,v)-P).dS/dv(u,v) = 0. - Le probleme consiste a rechercher, dans l'intervalle de definition de la - surface, la racine du systeme la plus proche de (U0,V0). - On utilise la classe math_FunctionSetRoot avec les arguments de construction - suivants: - - F: Extrema_FuncExtPS cree a partir de P et S, + The problem consists in finding, in the interval of surface definition, + the root of the system closest to (U0,V0). + Use class math_FunctionSetRoot with the following construction arguments: + - F: Extrema_FuncExtPS created from P and S, - U0V0: math_Vector (U0,V0), - Tol: Min(TolU,TolV), diff --git a/src/FairCurve/FairCurve_Batten.cxx b/src/FairCurve/FairCurve_Batten.cxx index 63e0b0a6f9..3b9ce1acdd 100755 --- a/src/FairCurve/FairCurve_Batten.cxx +++ b/src/FairCurve/FairCurve_Batten.cxx @@ -53,9 +53,9 @@ FairCurve_Batten::FairCurve_Batten(const gp_Pnt2d& P1, if (P1.IsEqual(P2, Precision::Confusion())) Standard_NullValue::Raise("FairCurve : P1 and P2 are confused"); if (Height <= 0) - Standard_NegativeValue::Raise("FairCurve : Height is no positive"); + Standard_NegativeValue::Raise("FairCurve : Height is not positive"); // -// On initialise par une droite (2 poles) +// Initialize by a straight line (2 poles) // Handle(TColStd_HArray1OfReal) Iknots = new TColStd_HArray1OfReal(1,2); Handle(TColStd_HArray1OfInteger) Imults = new TColStd_HArray1OfInteger(1,2); @@ -70,7 +70,7 @@ FairCurve_Batten::FairCurve_Batten(const gp_Pnt2d& P1, Ipoles->SetValue(1, P1); Ipoles->SetValue(2, P2); -// On incremente le degree +// Increase the degree Handle(TColgp_HArray1OfPnt2d) Npoles = new TColgp_HArray1OfPnt2d(1, Degree+1); Handle(TColStd_HArray1OfReal) Nweight = new TColStd_HArray1OfReal(1, 2); @@ -87,13 +87,13 @@ FairCurve_Batten::FairCurve_Batten(const gp_Pnt2d& P1, Nknots->ChangeArray1(), Nmults->ChangeArray1() ); - // et on affecte le resultat dans nos champs + // and impact the result in our fields Poles = Npoles; Knots = Nknots; Mults = Nmults; - // calcul des noeuds "plats". + // calculate "plane" nodes Flatknots = new TColStd_HArray1OfReal (1, BSplCLib::KnotSequenceLength(Mults->Array1(), Degree, Standard_False)); @@ -144,13 +144,13 @@ Standard_Boolean FairCurve_Batten::Compute(FairCurve_AnalysisCode& ACode, // ================================================================== { Standard_Boolean Ok=Standard_True, End=Standard_False; - Standard_Real AngleMax = 0.7; // parametre reglant la fonction d'increment ( 40 degrees ) - Standard_Real AngleMin = 2*PI/100; // parametre reglant la fonction d'increment - // un tour complet ne doit pas couter plus de 100 pas. + Standard_Real AngleMax = 0.7; // parameter ruling the function of increment ( 40 degrees ) + Standard_Real AngleMin = 2*PI/100; // parameter ruling the function of increment + // full passage should not cost more than 100 steps. Standard_Real DAngle1, DAngle2, Ratio, Fraction, Toler; Standard_Real OldDist, NewDist; -// Boucle d'Homotopie : calcul du pas et optimisation +// Loop of Homotopy : calculation of the step and optimisation while (Ok && !End) { DAngle1 = NewAngle1-OldAngle1; @@ -210,7 +210,7 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, Standard_Boolean Ok, OkCompute=Standard_True; ACode = FairCurve_OK; -// Deformation de la courbe par ajout d'un polynome d'interpolation +// Deformation of the curve by adding a polynom of interpolation Standard_Integer L = 2 + NewConstraintOrder1 + NewConstraintOrder2, kk, ii; TColStd_Array1OfReal knots (1,2); knots(1) = 0; @@ -220,13 +220,13 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, TColgp_Array1OfPnt2d Interpolation(1,L); Handle(TColgp_HArray1OfPnt2d) NPoles = new TColgp_HArray1OfPnt2d(1, Poles->Length()); -// Polynomes d'Hermites +// Polynoms of Hermite math_Matrix HermiteCoef(1, L, 1, L); Ok = PLib::HermiteCoefficients(0,1, NewConstraintOrder1, NewConstraintOrder2, HermiteCoef); if (!Ok) return Standard_False; -// Definition des contraintes d'interpolation +// Definition of constraints of interpolation TColgp_Array1OfXY ADelta(1,L); gp_Vec2d VOld(OldP1, OldP2), VNew( -(OldP1.XY()+DeltaP1.XY()) + (OldP2.XY()+DeltaP2.XY()) ); Standard_Real DAngleRef = VNew.Angle(VOld); @@ -258,7 +258,7 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, } Interpolation(ii).SetXY(AuxXY); } -// Conversion en BSpline de meme structure que le batten courant. +// Conversion into BSpline of the same structure as the current batten. PLib::CoefficientsPoles( Interpolation, PLib::NoWeights(), HermitePoles, PLib::NoWeights() ); @@ -273,13 +273,13 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, DeltaCurve->InsertKnots(Knots->Array1(), Mults->Array1(), 1.e-10); } -// Sommation +// Summing DeltaCurve->Poles( NPoles->ChangeArray1() ); for (kk= NPoles->Lower(); kk<=NPoles->Upper(); kk++) { NPoles->ChangeValue(kk).ChangeCoord() += Poles->Value(kk).Coord(); } -// Donnees intermediaires +// Intermediary data Standard_Real Angle1, Angle2, SlidingLength, Alph1 = OldAngle1 + DeltaAngle1, @@ -291,12 +291,12 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, P1P2 ( NPoles->Value(NPoles->Upper()).Coord() - NPoles->Value(NPoles->Lower()).Coord() ); -// Angles par rapport a l'axe ox +// Angles corresponding to axis ox Angle1 = Ox.Angle(P1P2) + Alph1; Angle2 = -Ox.Angle(P1P2) + Alph2; -// Calcul de la longeur de glissement (impose ou intiale); +// Calculation of the length of sliding (imposed or intial); if (!NewFreeSliding) { SlidingLength = NewSlidingFactor * LReference; @@ -312,7 +312,7 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, -// Energie et vecteurs d'initialisation +// Energy and vectors of initialisation FairCurve_BattenLaw LBatten (NewHeight, NewSlope, SlidingLength ); FairCurve_EnergyOfBatten EBatten (Degree+1, Flatknots, NPoles, NewConstraintOrder1, NewConstraintOrder2, @@ -320,8 +320,7 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, Angle1, Angle2); math_Vector VInit (1, EBatten.NbVariables()); - // La valeur ci-dessous donne une idee de la plus petie valeur propre - // du critere de flexion. + // The valeur below is the smallest value of the criterion of flexion. Standard_Real VConvex = 0.01 * pow(NewHeight / SlidingLength, 3); if (VConvex < 1.e-12) {VConvex = 1.e-12;} @@ -376,18 +375,18 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, Ok = EBatten.Variable(VInit); - // Traitement de la non convergence + // Processing of non-convergence if (!Newton.IsConverged()) { ACode = FairCurve_NotConverged; } - // Prevention du glissement infinie + // Prevention of infinite sliding if (NewFreeSliding && VInit(VInit.Upper()) > 2*LReference) ACode = FairCurve_InfiniteSliding; -// Insertion eventuelle de Noeuds +// Eventual insertion of Nodes Standard_Boolean NewKnots = Standard_False; Standard_Integer NbKnots = Knots->Length(); Standard_Real ValAngles = (Abs(OldAngle1) + Abs(OldAngle2) @@ -428,7 +427,7 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, Flatknots = FKnots; } -// Pour d'eventuels debug +// For eventual debug // Newton.Dump(cout); return OkCompute; @@ -449,7 +448,7 @@ Standard_Real FairCurve_Batten::SlidingOfReference(const Standard_Real Dist, { Standard_Real a1, a2; -// cas d'angle non contraints +// case of angle without constraints if ( (NewConstraintOrder1 == 0) && (NewConstraintOrder2 == 0)) return Dist; if (NewConstraintOrder1 == 0) a1 = Abs( Abs(NewAngle2)= 0 ) { return Compute(Dist, a1, a2); } -// cas d'angle de signe opposes +// case of angle of opposite sign else { Standard_Real Ratio = a1 / ( a1 + a2 ); Standard_Real AngleMilieu = pow(1-Ratio,2) * a1 + pow(Ratio,2) * a2; @@ -496,10 +495,10 @@ Standard_Real FairCurve_Batten::Compute(const Standard_Real Dist, const Standard_Real Angle) const // ================================================================== { - if (Angle < Precision::Angular() ) { return Dist; } // longeur du segment P1P2 - if (Angle < PI/2) { return Angle*Dist / sin(Angle); } // longueur du cercle P1P2 respectant ANGLE + if (Angle < Precision::Angular() ) { return Dist; } // length of segment P1P2 + if (Angle < PI/2) { return Angle*Dist / sin(Angle); } // length of circle P1P2 respecting ANGLE if (Angle > PI) { return Sqrt(Angle*PI) * Dist;} - else { return Angle * Dist; } // interpolation lineaire + else { return Angle * Dist; } // linear interpolation } // ================================================================== diff --git a/src/FairCurve/FairCurve_Energy.cxx b/src/FairCurve/FairCurve_Energy.cxx index cd49baa86a..48ffd3bd4c 100755 --- a/src/FairCurve/FairCurve_Energy.cxx +++ b/src/FairCurve/FairCurve_Energy.cxx @@ -34,7 +34,7 @@ FairCurve_Energy::FairCurve_Energy(const Handle(TColgp_HArray1OfPnt2d)& Poles, MyGradient( 0, MyNbValues), MyHessian( 0, MyNbValues + MyNbValues*(MyNbValues+1)/2 ) { - // on attend des angles dans le repere (Ox,Oy) + // chesk angles in reference (Ox,Oy) gp_XY L0 (Cos(Angle1), Sin(Angle1)), L1 (-Cos(Angle2), Sin(Angle2)); MyLinearForm.SetValue(0, L0); MyLinearForm.SetValue(1, L1); @@ -78,7 +78,7 @@ void FairCurve_Energy::Gradient1(const math_Vector& Vect, Standard_Integer Vdeb = 3, Vfin = 2*MyPoles->Length()-2; -// .... par calcul +// .... by calculation if (MyContrOrder1 >= 1) { gp_XY DPole (Vect(Vdeb), Vect(Vdeb+1)); Grad(DebG) = MyLinearForm(0) * DPole; @@ -111,7 +111,7 @@ void FairCurve_Energy::Gradient1(const math_Vector& Vect, Grad(FinG+1) = MyLinearForm(1) * DPole; FinG -= 1; } -// ... par recopie +// ... by recopy for (ii=DebG; ii<=FinG; ii++) { Grad(ii) = Vect(Vdeb); Vdeb += 1; @@ -186,7 +186,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, if (MyContrOrder1 >= 1) { -// calcul de la colonne lambda gauche -------------------------------- +// calculate the left lambda column -------------------------------- jj = Vdeb-2*MyContrOrder1; kk=Indice(jj, jj); // X2X2 @@ -220,7 +220,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, } if (MyContrOrder2 >= 1) { - H(MyNbVar-MyWithAuxValue, 1) = 0; // correct si il y a moins 3 noeuds + H(MyNbVar-MyWithAuxValue, 1) = 0; // correct if there are less than 3 nodes if (MyContrOrder2 == 2) {H(MyNbVar-MyWithAuxValue-1, 1) = 0;} } @@ -235,7 +235,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, } } -// calcul de la ligne mu gauche ----------------------- +// calculate the left line mu ---------------------- if (MyContrOrder1 >= 2) { jj = Vdeb-2*(MyContrOrder1-1); kk=Indice(jj, jj); // X3X3 @@ -251,7 +251,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, } if (MyContrOrder2 >= 1) { - H(MyNbVar-MyWithAuxValue, 2) = 0; // correct si il y a moins 3 noeuds + H(MyNbVar-MyWithAuxValue, 2) = 0; // correct if there are less than 3 nodes if (MyContrOrder2 == 2) {H(MyNbVar-MyWithAuxValue-1, 2) = 0;} } Vk = Vdeb; @@ -269,7 +269,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, } } -// calcul de la ligne lambda droite ----------------------- +// calculate the right lambda line ----------------------- if (MyContrOrder2 >= 1) { jj = FinH + 1; @@ -304,11 +304,11 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, H(FinH+2, FinH+1) += Laux * MyLinearForm(1).Multiplied(Aux) + (Laux.X()*MyLinearForm(1).Y() + Laux.Y()*MyLinearForm(1).X()) * Vect(ll+jj); -// H(FinH+2, FinH+1) = 0; // faute de mieux ... Bug dans l'expression precedente +// H(FinH+2, FinH+1) = 0; // No better alternative. Bug in the previous expression } } -// calcule de la ligne mu droite ----------------------- +// calculate the right line mu ----------------------- if (MyContrOrder2 >= 2) { jj = FinH + 2; Vk = Vfin + 2*MyContrOrder2 - 3; @@ -320,7 +320,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, for (ii=DebH; ii<=FinH; ii++) { H(jj, ii) = MyLinearForm(1).X() * Vect(kk) + MyLinearForm(1).Y() * Vect(kk+Vk); - // update de la ligne Lambda droite + // update the right line Lambda H(jj-1,ii) += Xaux*Vect(kk) + Yaux*Vect(kk+Vk); kk++; } @@ -329,7 +329,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, H(jj,jj) = Cos1*Vect(kk) + CosSin1*Vect(ii) + Sin1*Vect(ii+1); } -// calcule de la ligne Variable Auxiliaire ----------------------- +// calculate the Auxiliary Variable line ----------------------- if (MyWithAuxValue) { kk = Indice(Vup, Vdeb); @@ -353,7 +353,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, H(H.UpperRow(), H.UpperRow()) = Vect(kk); } -// recopie du bloc interne --------------------------------------------- +// recopy the internal block ----------------------------------- kk = Indice(Vdeb, Vdeb); for (ii = DebH; ii <=FinH; ii++) { @@ -363,7 +363,7 @@ void FairCurve_Energy::Hessian1(const math_Vector& Vect, } kk += Vdeb-1; } -// symetrie +// symmetry for (ii = H.LowerRow(); ii <= H.UpperRow(); ii++) for (jj = ii+1; jj <= H.UpperRow(); jj++) H(ii,jj) = H(jj,ii); } @@ -376,11 +376,11 @@ Standard_Boolean FairCurve_Energy::Variable(math_Vector& X) const IndexDeb1 = MyPoles->Lower()+1, IndexDeb2 = X.Lower(), IndexFin1 = MyPoles->Upper()-1, - IndexFin2 = X.Upper() - MyWithAuxValue; // on decremente de 1 si le glissement - // est libre car la derniere valeur de X lui est reserve. + IndexFin2 = X.Upper() - MyWithAuxValue; // decrease by 1 if the sliding is + // free as the last value of X is reserved. -// calculs des variables de contraintes +// calculation of variables of constraints if (MyContrOrder1 >= 1) { X(IndexDeb2) = MyPoles->Value(MyPoles->Lower()) .Distance( MyPoles->Value(MyPoles->Lower()+1) ); @@ -407,9 +407,9 @@ Standard_Boolean FairCurve_Energy::Variable(math_Vector& X) const IndexFin1 -= 1; } -// La recopie des variables auxiliaires n'est pas realise dans la classe abstraite +// Recopy of auxiliary variables is not done in the abstract class -// recopie des poles vers les variables +// copy poles to variables for (ii=IndexDeb1; ii<=IndexFin1; ii++) { X(IndexDeb2) = MyPoles->Value(ii).X(); X(IndexDeb2+1) = MyPoles->Value(ii).Y(); @@ -426,11 +426,11 @@ void FairCurve_Energy::ComputePoles(const math_Vector& X) IndexDeb1 = MyPoles->Lower()+1, IndexDeb2 = X.Lower(), IndexFin1 = MyPoles->Upper()-1, - IndexFin2 = X.Upper() - MyWithAuxValue; // on decremente de 1 si le glissement - // est libre car la derniere valeur de X lui est reserve. -// calculs des poles contraints -// for (ii=MyPoles->Lower();ii<=MyPoles->Upper();ii++) { -// cout << ii << " X = " << MyPoles->Value(ii).X() << + IndexFin2 = X.Upper() - MyWithAuxValue; // decrease by 1 if the sliding is + // is free as the last value of X is reserved. +// calculation of pole constraints +// for (ii=MyPoles->Lower();ii<=MyPoles->Upper();ii++) { +// cout << ii << " X = " << MyPoles->Value(ii).X() << // " Y = " << MyPoles->Value(ii).Y() << endl;} if (MyContrOrder1 >= 1) { @@ -459,7 +459,7 @@ void FairCurve_Energy::ComputePoles(const math_Vector& X) } // if (MyWithAuxValue) { MyLengthSliding = X(X.Upper()); } -// recopie des autres +// recopy others for (ii=IndexDeb1; ii<=IndexFin1; ii++) { MyPoles -> ChangeValue(ii).SetX( X(IndexDeb2) ); MyPoles -> ChangeValue(ii).SetY( X(IndexDeb2+1) ); diff --git a/src/FairCurve/FairCurve_MinimalVariation.cxx b/src/FairCurve/FairCurve_MinimalVariation.cxx index 572fe51b25..3452ece64a 100755 --- a/src/FairCurve/FairCurve_MinimalVariation.cxx +++ b/src/FairCurve/FairCurve_MinimalVariation.cxx @@ -44,15 +44,13 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(FairCurve_AnalysisCode& ACo //====================================================================================== { Standard_Boolean Ok=Standard_True, End=Standard_False; - Standard_Real AngleMax = 0.7; // parametre reglant la fonction d'increment - // ( 40 degrees ) - Standard_Real AngleMin = 2*PI/100; // parametre reglant la fonction d'increment - // un tour complet ne doit pas couter plus de - // 100 pas. + Standard_Real AngleMax = 0.7; // parameter regulating the function of increment ( 40 degrees ) + Standard_Real AngleMin = 2*PI/100; // parameter regulating the function of increment + // full passage should not contain more than 100 steps. Standard_Real DAngle1, DAngle2, DRho1, DRho2, Ratio, Fraction, Toler; Standard_Real OldDist, NewDist; -// Boucle d'Homotopie : calcul du pas et optimisation +// Loop of Homotopy : calculation of the step and optimisation while (Ok && !End) { DAngle1 = NewAngle1-OldAngle1; @@ -133,7 +131,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, Standard_Boolean Ok, OkCompute=Standard_True; ACode = FairCurve_OK; -// Deformation de la courbe par ajout d'un polynome d'interpolation +// Deformation of the curve by adding a polynom of interpolation Standard_Integer L = 2 + NewConstraintOrder1 + NewConstraintOrder2, kk, ii; // NbP1 = Poles->Length()-1, kk, ii; @@ -152,24 +150,24 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, TColgp_Array1OfPnt2d Interpolation(1,L); Handle(TColgp_HArray1OfPnt2d) NPoles = new TColgp_HArray1OfPnt2d(1, Poles->Length()); -// Polynomes d'Hermites +// Polynomes of Hermite math_Matrix HermiteCoef(1, L, 1, L); Ok = PLib::HermiteCoefficients(0,1, NewConstraintOrder1, NewConstraintOrder2, HermiteCoef); if (!Ok) return Standard_False; -// Definition des contraintes d'interpolation +// Definition of constraints of interpolation TColgp_Array1OfXY ADelta(1,L); gp_Vec2d VOld(OldP1, OldP2), VNew( -(OldP1.XY()+DeltaP1.XY()) + (OldP2.XY()+DeltaP2.XY()) ); Standard_Real DAngleRef = VNew.Angle(VOld); Standard_Real DAngle1 = DeltaAngle1 - DAngleRef, - DAngle2 = DAngleRef - DeltaAngle2; // Correction du Delta par le Delta induit par les points. + DAngle2 = DAngleRef - DeltaAngle2; // Correction of Delta by the Delta induced by the points. ADelta(1) = DeltaP1.XY(); kk = 2; if (NewConstraintOrder1>0) { - // rotation de la derive premiereDeltaAngle1 + // rotation of the derivative premiereDeltaAngle1 gp_Vec2d OldDerive( Poles->Value(Poles->Lower()), Poles->Value(Poles->Lower()+1) ); OldDerive *= Degree / (Knots->Value(Knots->Lower()+1)-Knots->Value(Knots->Lower()) ); @@ -177,7 +175,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, kk += 1; if (NewConstraintOrder1>1) { - // rotation de la derive seconde + ajout + // rotation of the second derivative + adding gp_Vec2d OldSeconde( Poles->Value(Poles->Lower()).XY() + Poles->Value(Poles->Lower()+2).XY() - 2*Poles->Value(Poles->Lower()+1).XY() ); OldSeconde *= Degree*( Degree-1) @@ -197,7 +195,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, ADelta(kk) = (OldDerive.Rotated(DAngle2) - OldDerive).XY(); kk += 1; if (NewConstraintOrder2>1) { - // rotation de la derive seconde + ajout + // rotation of the second derivative + adding gp_Vec2d OldSeconde( Poles->Value(Poles->Upper()).XY() + Poles->Value(Poles->Upper()-2).XY() - 2*Poles->Value(Poles->Upper()-1).XY() ); OldSeconde *= Degree*( Degree-1) @@ -218,7 +216,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, } Interpolation(ii).SetXY(AuxXY); } -// Conversion en BSpline de meme structure que le batten courant. +// Conversion into BSpline of the same structure as the current batten. PLib::CoefficientsPoles(Interpolation, PLib::NoWeights(), HermitePoles, PLib::NoWeights()); @@ -233,13 +231,13 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, DeltaCurve->InsertKnots(Knots->Array1(), Mults->Array1(), 1.e-10); } -// Sommation +// Summing DeltaCurve->Poles( NPoles->ChangeArray1() ); for (kk= NPoles->Lower(); kk<=NPoles->Upper(); kk++) { NPoles->ChangeValue(kk).ChangeCoord() += Poles->Value(kk).Coord(); } -// Donnees intermediaires +// Intermediaires Standard_Real Angle1, Angle2, SlidingLength, Alph1 = OldAngle1 + DeltaAngle1, @@ -253,12 +251,12 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, P1P2 ( NPoles->Value(NPoles->Upper()).Coord() - NPoles->Value(NPoles->Lower()).Coord() ); -// Angles par rapport a l'axe ox +// Angles corresponding to axis ox Angle1 = Ox.Angle(P1P2) + Alph1; Angle2 = -Ox.Angle(P1P2) + Alph2; -// Calcul de la longeur de glissement (impose ou intiale); +// Calculation of the length of sliding (imposed or intial); if (!NewFreeSliding) { SlidingLength = NewSlidingFactor * LReference; @@ -274,7 +272,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, -// Energie et vecteurs d'initialisation +// Energy and vectors of initialization FairCurve_BattenLaw LBatten (NewHeight, NewSlope, SlidingLength ); FairCurve_EnergyOfMVC EMVC (Degree+1, Flatknots, NPoles, NewConstraintOrder1, NewConstraintOrder2, @@ -282,8 +280,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, Angle1, Angle2, Rho1, Rho2); math_Vector VInit (1, EMVC.NbVariables()); - // La valeur ci-dessous donne une idee de la plus petie valeur propre - // du critere de flexion. + // The value below gives an idea about the smallest value of the criterion of flexion. Standard_Real VConvex = 0.01 * pow(NewHeight / SlidingLength, 3); if (VConvex < 1.e-12) {VConvex = 1.e-12;} @@ -358,17 +355,17 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, Ok = EMVC.Variable(VInit); - // Traitement de la non convergence + // Processing of non convergence if (!Newton.IsConverged()) { ACode = FairCurve_NotConverged; } - // Prevention du glissement infinie + // Prevention of infinite sliding if (NewFreeSliding && VInit(VInit.Upper()) > 2*LReference) ACode = FairCurve_InfiniteSliding; -// Insertion eventuelle de Noeuds +// Eventual insertion of Nodes Standard_Boolean NewKnots = Standard_False; Standard_Integer NbKnots = Knots->Length(); Standard_Real ValAngles = (Abs(OldAngle1) + Abs(OldAngle2) @@ -410,8 +407,7 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, } -// Pour d'eventuelle debug -// Newton.Dump(cout); +// For eventual debug Newton.Dump(cout); return OkCompute; } diff --git a/src/FairCurve/FairCurve_Newton.cxx b/src/FairCurve/FairCurve_Newton.cxx index 9c8249b049..c3bc213cb1 100755 --- a/src/FairCurve/FairCurve_Newton.cxx +++ b/src/FairCurve/FairCurve_Newton.cxx @@ -18,8 +18,8 @@ FairCurve_Newton::FairCurve_Newton(math_MultipleVarFunctionWithHessian& F, mySpTol(SpatialTolerance) { -// Attention cette ecriture est bancale car FairCurve_Newton::IsConverged() n'est pas -// pas utiliser dans le constructeur de NewtonMinimum !! +// Attention this writing is wrong as FairCurve_Newton::IsConverged() is not +// used in the constructor of NewtonMinimum !! } FairCurve_Newton::FairCurve_Newton(math_MultipleVarFunctionWithHessian& F, @@ -33,14 +33,14 @@ FairCurve_Newton::FairCurve_Newton(math_MultipleVarFunctionWithHessian& F, mySpTol(SpatialTolerance) { -// C'est beaucoup mieux +// It is much better } Standard_Boolean FairCurve_Newton::IsConverged() const -// On converge si le pas est tres petits -// ou si le critere progresse peu avec un pas raisonnable, cette derniere exigence -// permetant de detecter les glissements infinis, -// (cas ou le critere varie tres lentement). +// Convert if the steps are too small +// or if the criterion progresses little with a reasonable step, this last requirement +// allows detecting infinite slidings, +// (case when the criterion varies troo slowly). { Standard_Real N = TheStep.Norm(); return ( (N <= mySpTol/100 ) || diff --git a/src/GC/GC_MakeConicalSurface.cxx b/src/GC/GC_MakeConicalSurface.cxx index 0b07cdf458..a4efe588a1 100755 --- a/src/GC/GC_MakeConicalSurface.cxx +++ b/src/GC/GC_MakeConicalSurface.cxx @@ -42,10 +42,10 @@ GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Cone& , //C, } //========================================================================= -// Creation d un cone par quatre points. + -// les deux premiers donnent l axe. + -// le troisieme donne le rayon de la base. + -// le troisieme et le quatrieme le demi angle. + +// Creation of a cone by four points. + +// two first give the axis. + +// the third gives the base radius. + +// the third and the fourth the half-angle. + //========================================================================= GC_MakeConicalSurface::GC_MakeConicalSurface(const gp_Pnt& P1 , diff --git a/src/GC/GC_MakeCylindricalSurface.cxx b/src/GC/GC_MakeCylindricalSurface.cxx index 90b80d813f..05a45cd517 100755 --- a/src/GC/GC_MakeCylindricalSurface.cxx +++ b/src/GC/GC_MakeCylindricalSurface.cxx @@ -25,7 +25,7 @@ GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Ax2& A2 , } //========================================================================= -// Construction d un cylindre par axe et rayon . + +// Construction of a cylinder by axis et radius . + //========================================================================= GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Ax1& A1 , @@ -39,7 +39,7 @@ GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Ax1& A1 , } //========================================================================= -// Construction d un cylindre par un cercle . + +// Construction of a cylinder by a circle . + //========================================================================= GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Circ& Circ ) { @@ -49,9 +49,9 @@ GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Circ& Circ ) { } //========================================================================= -// Construction d un cylindre par trois points , , . + -// Les deux premiers points definissent l axe. + -// Le troisieme donne le rayon. + +// Construction of a cylinder by tree points , , . + +// Two first points define the axis. + +// The third gives the radius. + //========================================================================= GC_MakeCylindricalSurface::GC_MakeCylindricalSurface(const gp_Pnt& P1 , diff --git a/src/GC/GC_MakeTranslation.cxx b/src/GC/GC_MakeTranslation.cxx index 23a9fa5e89..c915cee9fa 100755 --- a/src/GC/GC_MakeTranslation.cxx +++ b/src/GC/GC_MakeTranslation.cxx @@ -8,7 +8,7 @@ #include //========================================================================= -// Creation d une translation 3d de Geom de vecteur de tanslation Vec. + +// Creation of a 3D Geom translation of tanslation vector Vec. + //========================================================================= GC_MakeTranslation::GC_MakeTranslation(const gp_Vec& Vec ) { @@ -17,8 +17,8 @@ GC_MakeTranslation::GC_MakeTranslation(const gp_Vec& Vec ) { } //========================================================================= -// Creation d une translation 3d de Geom de vecteur de tanslation le + -// vecteur reliant Point1 a Point2. + +// Creation of a 3D Geom translation of translation vector connecting +// Point1 and Point2. + //========================================================================= GC_MakeTranslation::GC_MakeTranslation(const gp_Pnt& Point1 , diff --git a/src/GC/GC_MakeTrimmedCone.cxx b/src/GC/GC_MakeTrimmedCone.cxx index f843566bae..a1597f0f14 100755 --- a/src/GC/GC_MakeTrimmedCone.cxx +++ b/src/GC/GC_MakeTrimmedCone.cxx @@ -13,10 +13,10 @@ #include //========================================================================= -// Creation d un cone par quatre points. + -// les deux premiers donnent l axe. + -// le troisieme donne le rayon de la base. + -// le troisieme et le quatrieme le demi angle. + +// Creation of a cone by four points. + +// First two give the axis. + +// The third gives the base radius. + +// the third and the fourth demi-angle. + //========================================================================= GC_MakeTrimmedCone::GC_MakeTrimmedCone(const gp_Pnt& P1 , diff --git a/src/GC/GC_MakeTrimmedCylinder.cxx b/src/GC/GC_MakeTrimmedCylinder.cxx index f3288a36a3..a28933e5ae 100755 --- a/src/GC/GC_MakeTrimmedCylinder.cxx +++ b/src/GC/GC_MakeTrimmedCylinder.cxx @@ -9,9 +9,9 @@ #include //========================================================================= -// Creation d un cylindre limite par trois points , et . + -// le cylindre resultat a comme hauteur la distance de a . + -// Il a comme rayon la distance de a l axe . + +// Creation of a cylinder limited by three points , and . + +// the height og the resulting cylinder is the distance from to . + +// The radius is the distance from to axis . + //========================================================================= GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Pnt& P1 , @@ -27,7 +27,7 @@ GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Pnt& P1 , } //========================================================================= -// Creation d un cylindre limite par un cercle et une hauteur. + +// Creation of a cylinder limited by a circle and height. + //========================================================================= GC_MakeTrimmedCylinder::GC_MakeTrimmedCylinder(const gp_Circ& Circ , diff --git a/src/GccAna/GccAna_Circ2d2TanOn.cxx b/src/GccAna/GccAna_Circ2d2TanOn.cxx index cba02b3b62..5873a35a65 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn.cxx @@ -19,17 +19,15 @@ #include //========================================================================= -// Cercles tangents a deux cercles C1 et C2 et centres sur une droite. + -// Nous commencons par distinguer les differents cas limites que nous + -// allons traiter separement. + -// Pour le cas general: + +// Circles tangent to two circles C1 and C2 and centered on a straight line. + +// We start by distinguishing various boundary cases that will be processed separately. + +// In the general case: + // ==================== + -// Nous calculons les bissectrices aux deux cercles qui nous donnent + -// l ensemble des lieux possibles des centres de tous les cercles + -// tangents a C1 et C2. + -// Nous intersectons ces bissectrices avec la droite OnLine ce qui nous + -// donne les points parmis lesquels nous allons choisir les solutions. + -// Les choix s effectuent a partir des Qualifieurs qualifiant C1 et C2. + +// We calculate bissectrices to two circles that give us + +// all possible locations of centers of all circles tangent to C1 and C2. + +// We intersect these bissectrices with straight line which gives us + +// points among which we are going to find solutions. + +// The choices are made basing on Qualifiers of C1 and C2. + //========================================================================= GccAna_Circ2d2TanOn:: @@ -86,7 +84,7 @@ GccAna_Circ2d2TanOn:: Standard_Real d4 = dist2-R2; //========================================================================= -// Traitement des cas limites. + +// Processing of boundary cases. + //========================================================================= if (Abs(d3-d4) //========================================================================= -// Creation d un cercle tangent a un Cercle C1 et a une Droite L2. + -// centre sur une Droite. + -// Nous commencons par distinguer les differents cas limites que nous + -// allons traiter separement. + -// Pour le cas general: + +// Creation of a circle tangent to Circle C1 and a straight line L2. + +// centered on a straight line. + +// We start by making difference between cases that we are going to + +// proceess separately. + +// In general case: + // ==================== + -// Nous calculons les bissectrices a C1 et L2 qui nous donnent + -// l ensemble des lieux possibles des centres de tous les cercles + -// tangents a C1 et L2. + -// Nous intersectons ces bissectrices avec la droite OnLine ce qui nous + -// donne les points parmis lesquels nous allons choisir les solutions. + -// Les choix s effectuent a partir des Qualifieurs qualifiant C1 et L2. + +// We calculate bissectrices to C1 and L2 that give us + +// all possibles locations of centers of all circles tangent to C1 and L2+ + +// We intersect these bissectrices with straight line OnLine which gives + +// us points among which we'll choose the solutions. + +// The choices are made basing on Qualifiers of C1 and L2. + //========================================================================= GccAna_Circ2d2TanOn:: @@ -75,7 +74,7 @@ GccAna_Circ2d2TanOn:: gp_Dir2d normL2(-dirL2.Y(),dirL2.X()); //========================================================================= -// Traitement des cas limites. + +// Processing of limit cases. + //========================================================================= Standard_Real distcl = OnLine.Distance(center1); @@ -151,7 +150,7 @@ GccAna_Circ2d2TanOn:: } //========================================================================= -// Cas general. + +// General case. + //========================================================================= GccAna_CircLin2dBisec Bis(C1,L2); diff --git a/src/GccAna/GccAna_Circ2d2TanOn_10.cxx b/src/GccAna/GccAna_Circ2d2TanOn_10.cxx index 937fe7e15a..28e17f2d8d 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn_10.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_10.cxx @@ -18,18 +18,18 @@ #include //========================================================================= -// Creation d un cercle tangent a une Droite L1 et a un point Point2. + -// centre sur un cercle. + -// Nous commencons par distinguer les differents cas limites que nous + -// allons traiter separement. + -// Pour le cas general: + +// Creation of a circle tangent to straight line L1 and a point Point2. + +// centered on a circle. + +// We start by making difference between boundary cases that will be + +// processed separately. + +// In general case: + // ==================== + -// Nous calculons les bissectrices a L1 et Point2 qui nous donnent + -// l ensemble des lieux possibles des centres de tous les cercles + -// tangents a L1 et Point2. + -// Nous intersectons ces bissectrices avec le cerclee OnCirc ce qui nous + -// donne les points parmis lesquels nous allons choisir les solutions. + -// Les choix s effectuent a partir des Qualifieurs qualifiant L1. + +// We calculate bissectrices to L1 and Point2 that give us all + +// all possible locations of centers of all circles + +// tangent to L1 and Point2. + +// We intersect these bissectrices with circle OnCirc which gives us + +// points among which we'll choose the solutions. + +// The choice is made using Qualifiers of L1. + //========================================================================= GccAna_Circ2d2TanOn:: @@ -69,7 +69,7 @@ gp_Dir2d normL1(-dirL1.Y(),dirL1.X()); //========================================================================= -// Traitement des cas limites. + +// Processing of boundary cases. + //========================================================================= Standard_Real Ron = OnCirc.Radius(); @@ -120,7 +120,7 @@ } //========================================================================= -// Cas general. + +// General case. + //========================================================================= GccAna_LinPnt2dBisec Bis(L1,Point2); diff --git a/src/GccAna/GccAna_Circ2d2TanOn_11.cxx b/src/GccAna/GccAna_Circ2d2TanOn_11.cxx index a6f975707f..a3932b488b 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn_11.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_11.cxx @@ -4,11 +4,11 @@ // //========================================================================= -// Creation d un cercle tangent a deux elements : Droite. + -// Cercle. + +// Creation of a circle tangent to two elements : Straight line. + +// Circle. + // Point. + -// centre sur un troisieme : Droite. + -// Cercle. + +// center on a third : Straight line. + +// Circle. + //========================================================================= #include @@ -21,15 +21,15 @@ #include //========================================================================= -// Creation d un cercle Passant par : 2 points Point1 et Point2. + -// Centre sur : 1 cercle OnCirc. + -// avec une Tolerance de precision : Tolerance. + +// Creation of a circle passing by : 2 points Point1 and Point2. + +// Center on : 1 circle OnCirc. + +// with a Tolerance of precision : Tolerance. + // + -// On cree L1 la droite des points equidistant de Point1 et Point2. + -// On cree alors les solutions cirsol telles que : + -// cirsol est l ensemble des cercle ayant pour centre une des inter- + -// sections de L1 avec OnCirc et de rayon la distance entre Point1 et + -// le point ci dessus calcule. + +// Create L1 the straight line of points equidistant to Point1 and Point2. + +// Create then solutions cirsol so that : + +// cirsol is the set of circles with center in one of inter- + +// sections of L1 with OnCirc and the radius the distance between Point1 and + +// the point calculated below. + //========================================================================= GccAna_Circ2d2TanOn:: diff --git a/src/GccAna/GccAna_Circ2d2TanOn_2.cxx b/src/GccAna/GccAna_Circ2d2TanOn_2.cxx index c22e034a68..96da15a0f2 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn_2.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_2.cxx @@ -2,8 +2,6 @@ // Created: Thu Jan 2 15:52:15 1992 // Author: Remi GILET // -// JCT 06/07/98 cas des droites confondues (PRO14405) -// JCT 16/11/98 tri des solutions apres le calcul (PRO16384) #include @@ -52,7 +50,7 @@ GccAna_Circ2d2TanOn:: 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()); @@ -62,25 +60,25 @@ GccAna_Circ2d2TanOn:: 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); } @@ -93,7 +91,7 @@ GccAna_Circ2d2TanOn:: } - // tri selon les qualifiers des NbrSol solutions acceptables + // parce following the qualifiers NbrSol acceptable solutions for (Standard_Integer i=1 ; i <= NbrSol ; i++) { @@ -101,7 +99,7 @@ GccAna_Circ2d2TanOn:: 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())); @@ -110,7 +108,7 @@ GccAna_Circ2d2TanOn:: 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())); @@ -120,7 +118,7 @@ GccAna_Circ2d2TanOn:: || 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()); @@ -139,7 +137,7 @@ GccAna_Circ2d2TanOn:: 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++) { diff --git a/src/GccAna/GccAna_Circ2d2TanOn_3.cxx b/src/GccAna/GccAna_Circ2d2TanOn_3.cxx index 486370bdfe..80e7693cf7 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn_3.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_3.cxx @@ -20,18 +20,18 @@ #include //========================================================================= -// Cercles tangents un cercle C1, passant par un point Point2 et centres + -// sur une droite OnLine. + -// Nous commencons par distinguer les differents cas limites que nous + -// allons traiter separement. + -// Pour le cas general: + +// Circles tangent to circle C1, passing by point Point2 and centers + +// on a straight line OnLine. + +// We start by making difference with boundary cases that will be + +// processed separately. + +// For the general case: + // ==================== + -// Nous calculons les bissectrices a C1 et Point2 qui nous donnent + -// l ensemble des lieux possibles des centres de tous les cercles + -// tangents a C1 et passant par Point2. + -// Nous intersectons ces bissectrices avec la droite OnLine ce qui nous + -// donne les points parmis lesquels nous allons choisir les solutions. + -// Les choix s effectuent a partir des Qualifieurs qualifiant C1 et C2. + +// We calculate bissectrices to C1 and Point2 that give us all + +// possible locations of centers of all circles + +// tangent to C1 and passing by Point2. + +// We intersect these bissectrices with the straight line OnLine which + +// gives us the points among which we'll choose the solutions. + +// The choices are made using Qualifiers of C1 and C2. + //========================================================================= GccAna_Circ2d2TanOn:: @@ -70,7 +70,7 @@ GccAna_Circ2d2TanOn:: gp_Pnt2d center1(C1.Location()); //========================================================================= -// Traitement des cas limites. + +// Processing of boundary cases. + //========================================================================= Standard_Real dp2l = OnLine.Distance(Point2); @@ -122,7 +122,7 @@ GccAna_Circ2d2TanOn:: } //========================================================================= -// cas general. + +// General case. + //========================================================================= GccAna_CircPnt2dBisec Bis(C1,Point2); diff --git a/src/GccAna/GccAna_Circ2d2TanOn_4.cxx b/src/GccAna/GccAna_Circ2d2TanOn_4.cxx index f336a6c939..d07a862089 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn_4.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_4.cxx @@ -19,21 +19,21 @@ #include #include //========================================================================= -// Creation d un cercle Tangent a : 1 droite L1. + -// Passant par : 1 point Point2. + -// Centre sur : 1 droite OnLine. + -// avec une Tolerance de precision : Tolerance. + +// Creation of a circle Tangent to : 1 straight line L1. + +// Passing by : 1 point Point2. + +// Centered on : 1 straight line OnLine. + +// with a Tolerance of precision : Tolerance. + // + -// Nous commencons par distinguer les differents cas limites que nous + -// allons traiter separement. + -// Pour le cas general: + +// We start by making difference with various boundary cases that will be + +// processed separately. + +// For the general case: + // ==================== + -// Nous calculons les bissectrices a L1 et Point2 qui nous donnent + -// l ensemble des lieux possibles des centres de tous les cercles + -// tangents a L1 et passant par Point2. + -// Nous intersectons ces bissectrices avec la droite OnLine ce qui nous + -// donne les points parmis lesquels nous allons choisir les solutions. + -// Les choix s effectuent a partir des Qualifieurs qualifiant L1. + +// We calculate bissectrices to L1 and Point2 that give us + +// all possible locations of centers of all circles + +// tangent to L1 and passing through Point2. + +// We intersect these bissectrices with straight line OnLine which gives us + +// the points among which we'll choose the solutions. + +// The choices are made basing on Qualifieurs of L1. + //========================================================================= GccAna_Circ2d2TanOn:: @@ -72,12 +72,12 @@ GccAna_Circ2d2TanOn:: gp_Dir2d normal(-dirL1.Y(),dirL1.X()); //========================================================================= -// Traitement des cas limites. + +// Processing of boundary cases. + //========================================================================= if (dirL1.IsEqual(OnLine.Direction(),Precision::Confusion()) && OnLine.Distance(originL1) //========================================================================= -// Creation d un cercle Passant par : 2 points Point1 et Point2. + -// Centre sur : 1 droite OnLine. + -// avec une Tolerance de precision : Tolerance. + +// Creation of a circle passing by : 2 points Point1 and Point2. + +// Centered on : 1 straight line OnLine. + +// with a Tolerance of precision : Tolerance. + // + -// On cree L1 la droite des points equidistant de Point1 et Point2. + -// On cree alors la solutions cirsol telle que : + -// cirsol est l ensemble des cercle ayant pour centre l intersections + -// de L1 avec OnLine et de rayon la distance entre Point1 et le point + -// ci dessus calcule. + +// Create L1 straight line of points equidistant from Point1 and Point2. + +// Then create solutions cirsol such as : + +// cirsol is all circle with center at the intersections of + +// L1 with OnLine and the radius the distance between Point1 and the point + +// calculated above. + //========================================================================= GccAna_Circ2d2TanOn:: diff --git a/src/GccAna/GccAna_Circ2d2TanOn_6.cxx b/src/GccAna/GccAna_Circ2d2TanOn_6.cxx index 41242e2ac2..ca2d35a265 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn_6.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_6.cxx @@ -19,18 +19,17 @@ #include //========================================================================= -// Creation d un cercle tangent a deux cercle C1 et C2. + -// centre sur un cercle. + -// Nous commencons par distinguer les differents cas limites que nous + -// allons traiter separement. + -// Pour le cas general: + +// Creation of a circle tangent to two circles C1 and C2. + +// centered on a circle. + +// We start with distinguishing various boundary cases that will be + +// processed separately. + +// In the general case: + // ==================== + -// Nous calculons les bissectrices a C1 et C2 qui nous donnent + -// l ensemble des lieux possibles des centres de tous les cercles + -// tangents aC1 et C2. + -// Nous intersectons ces bissectrices avec le cercle OnCirc ce qui nous + -// donne les points parmis lesquels nous allons choisir les solutions. + -// Les choix s effectuent a partir des Qualifieurs qualifiant C1 et C2. + +// We calculate bissectrices to C1 and C2 that give us all + +// possible locations of centers of all circles tangent to C1 and C2. + +// We intersect these bissectrices with circle OnCirc which gives us + +// points among which we choose the solutions. + +// The choice is made basing in Qualifiers of C1 and C2. + //========================================================================= GccAna_Circ2d2TanOn:: @@ -80,7 +79,7 @@ GccAna_Circ2d2TanOn:: Standard_Real R2 = C2.Radius(); //========================================================================= -// Traitement des cas limites. + +// Processing of boundary cases. + //========================================================================= Standard_Integer nbsol1 = 1; @@ -178,7 +177,7 @@ GccAna_Circ2d2TanOn:: } //========================================================================= -// Cas general. + +// General case. + //========================================================================= GccAna_Circ2dBisec Bis(C1,C2); diff --git a/src/GccAna/GccAna_Circ2d2TanOn_7.cxx b/src/GccAna/GccAna_Circ2d2TanOn_7.cxx index cc71681aeb..d1ffed90b1 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn_7.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_7.cxx @@ -58,7 +58,7 @@ GccAna_Circ2d2TanOn:: gp_Dir2d normL2(-dirL2.Y(),dirL2.X()); //========================================================================= -// Traitement des cas limites. + +// Processing of boundary cases. + //========================================================================= Standard_Real Tol = Abs(Tolerance); @@ -143,7 +143,7 @@ GccAna_Circ2d2TanOn:: } //========================================================================= -// Cas general. + +// General case. + //========================================================================= GccAna_CircLin2dBisec Bis(C1,L2); diff --git a/src/GccAna/GccAna_Circ2d2TanOn_8.cxx b/src/GccAna/GccAna_Circ2d2TanOn_8.cxx index c59657ab56..3bd3883617 100755 --- a/src/GccAna/GccAna_Circ2d2TanOn_8.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_8.cxx @@ -4,11 +4,11 @@ // //========================================================================= -// Creation d un cercle tangent a deux elements : Droite. + -// Cercle. + +// Creation of a circle tangent to two elements : Straight line. + +// Circle. + // Point. + -// centre sur un troisieme : Droite. + -// Cercle. + +// center on a third : Straight line. + +// Circle. + //========================================================================= #include @@ -64,7 +64,7 @@ GccAna_Circ2d2TanOn:: gp_Pnt2d center1(C1.Location()); //========================================================================= -// Traitement des cas limites. + +// Processing of boundary cases. + //========================================================================= Standard_Integer nbsol1 = 1; @@ -140,7 +140,7 @@ GccAna_Circ2d2TanOn:: } //========================================================================= -// cas general. + +// General case. + //========================================================================= GccAna_CircPnt2dBisec Bis(C1,Point2); @@ -196,7 +196,7 @@ GccAna_Circ2d2TanOn:: if (ok) { for (Standard_Integer k = 1 ; k <= nbsol ; k++) { - // pop : protection contre le cas center1 == Center + // pop : protection against case center1 == Center if (center1.IsEqual(Center,Precision::Confusion())) { continue; } diff --git a/src/GccAna/GccAna_Circ2d2TanRad.cxx b/src/GccAna/GccAna_Circ2d2TanRad.cxx index 4e19cfdb8e..2b09a6ae8f 100755 --- a/src/GccAna/GccAna_Circ2d2TanRad.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad.cxx @@ -1,12 +1,6 @@ // File GccAna_Circ2d2TanRad.cxx, REG 08/07/91 -// Modified: Thu Dec 5 09:46:23 1996 -// by: Joelle CHAUVET -// Indice de boucle pour par1sol,par2sol,pararg1,pararg2 -// (PRO6126) -// Modified: Mon May 11 10:42:16 1998 -// Author: Joelle CHAUVET -// Permutation pnttg1sol<->pnttg2sol oubliee dans certains cas -// (CTS20080) + + #include @@ -22,19 +16,19 @@ #include #include -// circulaire tangent a deux cercles et de rayon donne +// circular tangent to two cercles and given radius //==================================================== -//======================================================================== -// On initialise WellDone a false. + -// On recupere le cercle C1 et le cercle C2. + -// On sort en erreur dans les cas ou la construction est impossible. + -// On distingue les cas limites pour les triater separement. + -// On fait la parallele a C1 dans le bon sens. + -// On fait la parallele a C2 dans le bon sens. + -// On intersecte les paralleles ==> point de centre de la solution. + -// On cree la solution qu on ajoute aux solutions deja trouvees. + -// On remplit les champs. + -//======================================================================== +//================================================================== +// Initialize WellDone to false. + +// Return circle C1 and circle C2. + +// Leave with error if the construction is impossible. + +// Distinguish boundary cases to process them separately. + +// Create parallel to C1 in the proper direction. + +// Create parallel to C2 in the proper direction. + +// Intersect parallels ==> center point of the solution. + +// Create the solution to be added to already found solutions. + +// Fill the fields. + +//================================================================== GccAna_Circ2d2TanRad:: GccAna_Circ2d2TanRad (const GccEnt_QualifiedCirc& Qualified1 , @@ -142,7 +136,7 @@ GccAna_Circ2d2TanRad:: center1 = center2; center2 = center3; dir1.Reverse(); - // il faudra permuter les points de tangence resultats + // it is necessary to swap the resulting tangency points invers = Standard_True; } if ((R2-Radius>Tol) || (TolR1-dist-R2) || @@ -210,7 +204,7 @@ GccAna_Circ2d2TanRad:: center1 = center2; center2 = center3; dir1.Reverse(); - // il faudra permuter les points de tangence resultats + // it is necessary to swap the resulting tangency points invers = Standard_True; } if ((Radius-R1>Tol)||(dist-R2-R1>Tol)|| @@ -270,7 +264,7 @@ GccAna_Circ2d2TanRad:: center1 = center2; center2 = center3; dir1.Reverse(); - // il faudra permuter les points de tangence resultats + // it is necessary to swap the resulting tangency points invers = Standard_True; } if ((Radius-R1 > Tol) || (dist-R2-R1 > Tol)) { WellDone = Standard_True; } @@ -372,7 +366,7 @@ GccAna_Circ2d2TanRad:: center1 = center2; center2 = center3; dir1.Reverse(); - // il faudra permuter les point de tangence resultats + // it is necessary to swap the resulting tangency points invers = Standard_True; } if ((R1-Radius > Tol) || (Tol < R1+R2-dist) || @@ -506,7 +500,7 @@ GccAna_Circ2d2TanRad:: center1 = center2; center2 = center3; dir1.Reverse(); - // il faudra permuter les points de tangence resultats + // it is necessary to swap the resulting tangency points invers = Standard_True; } if (Tol < R1-dist-R2) { WellDone = Standard_True; } @@ -637,7 +631,7 @@ GccAna_Circ2d2TanRad:: } } } - // permutation des points de tangence resultats si necessaire + // swapping of resulting tangency points if necessary if (invers) { gp_Pnt2d Psav; for (Standard_Integer i = 1 ; i <= NbrSol ; i++) { @@ -646,7 +640,7 @@ GccAna_Circ2d2TanRad:: pnttg2sol(i) = Psav; } } - // calcul des parametres des points de tangence + // calculation of parameters of tangency points for (Standard_Integer i = 1 ; i <= NbrSol ; i++) { par1sol(i)=ElCLib::Parameter(cirsol(i),pnttg1sol(i)); if (TheSame1(i) == 0) { diff --git a/src/GccAna/GccAna_Circ2d2TanRad_1.cxx b/src/GccAna/GccAna_Circ2d2TanRad_1.cxx index 76d615eeba..71178a4aa8 100755 --- a/src/GccAna/GccAna_Circ2d2TanRad_1.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_1.cxx @@ -15,17 +15,17 @@ #include #include -// circulaire tangent a un cercle et une ligne et de rayon donne +// circular tangent to a circle, a line and a given radius //============================================================== //======================================================================== -// On initialise WellDone a false. + -// On recupere le cercle C1 et la droite L2. + -// On sort en erreur dans les cas ou la construction est impossible. + -// On fait la parallele a C1 dans le bon sens. + -// On fait la parallele a L2 dans le bon sens. + -// On intersecte les paralleles ==> point de centre de la solution. + -// On cree la solution qu on ajoute aux solutions deja trouvees. + -// On remplit les champs. + +// Initialize WellDone to false. + +// Return circle C1 and straight line L2. + +// Leave with error if the construction is impossible. + +// Create parallel to C1 in the proper direction. + +// Create parallel to L2 in the proper direction. + +// Intersect parallels ==> center point of the solution. + +// Create the solution and add it to already found ones. + +// Fill the fields. + //======================================================================== GccAna_Circ2d2TanRad:: diff --git a/src/GccAna/GccAna_Circ2d2TanRad_2.cxx b/src/GccAna/GccAna_Circ2d2TanRad_2.cxx index c2a6d1efa4..7969447844 100755 --- a/src/GccAna/GccAna_Circ2d2TanRad_2.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_2.cxx @@ -14,19 +14,19 @@ #include #include -// circulaire tangent a un cercle et un point et de rayon donne +// circulare tangent to a circle a point and a given radius //============================================================= //======================================================================== -// On initialise WellDone a false. + -// On recupere le cercle C1. + -// On sort en erreur dans les cas ou la construction est impossible. + -// On fait la parallele a C1 dans le bon sens. + -// On fait le cercle centre en Point1 de rayon Radius. + -// On intersecte la parallele et le cercle. + -// ==> Le point de centre de la solution. + -// On cree la solution qu on ajoute aux solutions deja trouvees. + -// On remplit les champs. + +// Initialize WellDone to false. + +// Return circle C1. + +// Leave with error if the construction is impossible. + +// Create parallel to C1 in the proper direction. + +// Create circle with center in Point1 of radius Radius. + +// Intersect the parallel and the circle. + +// ==> The center point of the solution. + +// Create the solution that will be added to already found solutions. + +// Fill the fields. + //======================================================================== GccAna_Circ2d2TanRad:: diff --git a/src/GccAna/GccAna_Circ2d2TanRad_3.cxx b/src/GccAna/GccAna_Circ2d2TanRad_3.cxx index 4d15fd1a26..3f149b0e0a 100755 --- a/src/GccAna/GccAna_Circ2d2TanRad_3.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_3.cxx @@ -18,18 +18,18 @@ #include #include -// circulaire tangent a une ligne et un point et de rayon donne +// circular tangent to a line and a point and a given radius //============================================================= //======================================================================== -// On initialise WellDone a false. + -// On recupere la ligne L1. + -// On sort en erreur dans les cas ou la construction est impossible. + -// On fait la parallele a L1 dans le bon sens. + -// On fait le cercle centre en Point1 de rayon Radius. + -// On intersecte la parallele et le cercle. + -// ==> Le point de centre de la solution. + -// On cree la solution qu on ajoute aux solutions deja trouvees. + -// On remplit les champs. + +// Initialize WellDone to false. + +// Return line L1. + +// Leave with error if the construction is impossible. + +// Create parallel to L1 in the proper direction. + +// Create the circle with center at Point1 of radius Radius. + +// Intersect the parallel and the circle. + +// ==> The center point of the solution. + +// Create the solution to be added to already found solutions. + +// Fill the fields. + //======================================================================== GccAna_Circ2d2TanRad:: @@ -138,9 +138,8 @@ GccAna_Circ2d2TanRad:: if (nbsol == 1) { if (displ1<1.e-10) { - // cas particulier ou Point2 est sur la ligne - // pas la peine de passer par les intersections - // on construit les deux solutions directement + // particular case when Point2 is on the line + // construct two solutions directly for (Standard_Integer jcote = 1 ; jcote <= nbcote ; jcote++) { NbrSol++; gp_Pnt2d Center(cxloc-cote(jcote)*ydir*Radius, diff --git a/src/GccAna/GccAna_Circ2d2TanRad_4.cxx b/src/GccAna/GccAna_Circ2d2TanRad_4.cxx index 7fc5bafc9c..3ca3eabe4f 100755 --- a/src/GccAna/GccAna_Circ2d2TanRad_4.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_4.cxx @@ -18,16 +18,16 @@ #include -// circulaire tangent a deux ligne de rayon donne +// circular tangent to two lines of given radius //=============================================== //======================================================================== -// On initialise WellDone a false. + -// On recupere les deux lignes L1 et L2. + -// On sort en erreur dans les cas ou la construction est impossible. + -// On fait les paralleles a L1 et L2 dans le bon sens. + -// On intersecte les paralleles ==> Le point de centre de la solution. + -// On cree la solution qu on ajoute aux solutions deja trouvees. + -// On remplit les champs. + +// Initialize WellDone to false. + +// Return two lines L1 and L2. + +// Leave with error if the construction is impossible. + +// Create parallel lines to L1 and L2 in the proper direction. + +// Intersect parallels ==> The center point of the solution. + +// Create the solution to be added to the already found solutions. + +// Fill the fields. + //======================================================================== GccAna_Circ2d2TanRad:: diff --git a/src/GccAna/GccAna_Circ2d2TanRad_5.cxx b/src/GccAna/GccAna_Circ2d2TanRad_5.cxx index 9e03f450d4..989b6a964b 100755 --- a/src/GccAna/GccAna_Circ2d2TanRad_5.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_5.cxx @@ -14,13 +14,13 @@ #include #include -// Cercle passant par deux points de rayon donne. +// Circle passing by two points of given radius. // ============================================== -//========================================================================= -// Resolution de l equation du second degre indiquant que le centre du + -// cercle est equidistant des deux points. + -//========================================================================= +//============================================================================== +// Solution of the equation of second degree showing that the center of the + +// circle is equidistant from two points. + +//============================================================================== GccAna_Circ2d2TanRad:: GccAna_Circ2d2TanRad (const gp_Pnt2d& Point1 , diff --git a/src/GccAna/GccAna_Circ2d3Tan.cxx b/src/GccAna/GccAna_Circ2d3Tan.cxx index c0935cc487..9003f93ded 100755 --- a/src/GccAna/GccAna_Circ2d3Tan.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan.cxx @@ -21,7 +21,7 @@ #include //========================================================================= -// Creation d un cercle tangent a trois cercles. + +// Creation of a circle tangent to three circles. + //========================================================================= GccAna_Circ2d3Tan:: @@ -31,7 +31,7 @@ GccAna_Circ2d3Tan:: const Standard_Real Tolerance ): //========================================================================= -// Initialisation des champs. + +// Initialization of fields. + //========================================================================= cirsol(1,16) , @@ -67,7 +67,7 @@ GccAna_Circ2d3Tan:: } //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Circ2d Cir1 = Qualified1.Qualified(); diff --git a/src/GccAna/GccAna_Circ2d3Tan_1.cxx b/src/GccAna/GccAna_Circ2d3Tan_1.cxx index 1595a11fd0..cd663b5063 100755 --- a/src/GccAna/GccAna_Circ2d3Tan_1.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_1.cxx @@ -19,7 +19,7 @@ #include //========================================================================= -// Creation d un cercle tangent a deux cercles et a une droite. + +// Creation of a circle tangent to two circles and a straight line. + //========================================================================= GccAna_Circ2d3Tan:: @@ -29,7 +29,7 @@ GccAna_Circ2d3Tan:: const Standard_Real Tolerance ): //========================================================================= -// Initialisation des champs. + +// Initialization of fields. + //========================================================================= cirsol(1,16) , @@ -65,7 +65,7 @@ GccAna_Circ2d3Tan:: } //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Circ2d C1 = Qualified1.Qualified(); @@ -118,7 +118,7 @@ GccAna_Circ2d3Tan:: Standard_Real Rradius=0; gp_Pnt2d Center(Intp.Point(j).Value()); -// pop : si les coordonnes sont trop grandes ( qu'est trop grand : avoir ) pas de creation +// pop : if the coordinates are too great, no creation if (Center.X() > 1e10 || Center.Y() > 1e10 ) break; @@ -126,7 +126,7 @@ GccAna_Circ2d3Tan:: Standard_Real dist2 = Center.Distance(C2.Location()); Standard_Real dist3 = L3.Distance(Center); -// pop : si les coordonnes sont trop grandes ( qu'est trop grand : avoir ) pas de creation +// pop : if the coordinates are too great, no creation if (dist3 > 1e10 ) break; Standard_Integer nbsol1 = 0; @@ -271,13 +271,13 @@ GccAna_Circ2d3Tan:: TheSame1(NbrSol) = 0; gp_Dir2d dc(C1.Location().XY()-Center.XY()); pnttg1sol(NbrSol)=gp_Pnt2d(Center.XY()+Radius(ind3)*dc.XY()); - // POP pour portection dans le cas ou cirsol(NbrSol).Location == pnttg1sol(NbrSol) + // POP for protection if cirsol(NbrSol).Location == pnttg1sol(NbrSol) if (cirsol(NbrSol).Location().IsEqual(pnttg1sol(NbrSol),Precision::Confusion())) par1sol(NbrSol)=1; else par1sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol), pnttg1sol(NbrSol)); - // POP pour portection dans le cas ou C1.Location == pnttg1sol(NbrSol) + // POP for protection if C1.Location == pnttg1sol(NbrSol) if (C1.Location().IsEqual(pnttg1sol(NbrSol),Precision::Confusion())) pararg1(NbrSol)=1; else @@ -291,13 +291,13 @@ GccAna_Circ2d3Tan:: TheSame2(NbrSol) = 0; gp_Dir2d dc(C2.Location().XY()-Center.XY()); pnttg2sol(NbrSol)=gp_Pnt2d(Center.XY()+Radius(ind3)*dc.XY()); - // POP pour portection dans le cas ou cirsol(NbrSol).Location == pnttg1sol(NbrSol) + // POP for protection if cirsol(NbrSol).Location == pnttg1sol(NbrSol) if (cirsol(NbrSol).Location().IsEqual(pnttg1sol(NbrSol),Precision::Confusion())) par1sol(NbrSol)=1; else par2sol(NbrSol)=ElCLib::Parameter(cirsol(NbrSol), pnttg2sol(NbrSol)); - // POP pour portection dans le cas ou C2.Location == pnttg2sol(NbrSol) + // POP for protection if C2.Location == pnttg2sol(NbrSol) if (C2.Location().IsEqual(pnttg2sol(NbrSol),Precision::Confusion())) pararg2(NbrSol)=1; else diff --git a/src/GccAna/GccAna_Circ2d3Tan_2.cxx b/src/GccAna/GccAna_Circ2d3Tan_2.cxx index d0bc31be9a..2f1d5fd2d3 100755 --- a/src/GccAna/GccAna_Circ2d3Tan_2.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_2.cxx @@ -18,7 +18,7 @@ #include //========================================================================= -// Creation d un cercle tangent a un cercle et a deux droites. + +// Creation of a circle tangent to a circle and two straight lines. + //========================================================================= GccAna_Circ2d3Tan::GccAna_Circ2d3Tan (const GccEnt_QualifiedCirc& Qualified1 , @@ -27,7 +27,7 @@ GccAna_Circ2d3Tan::GccAna_Circ2d3Tan (const GccEnt_QualifiedCirc& Qualified1 , const Standard_Real Tolerance ) //========================================================================= -// Initialisation des champs. + +// Initialisation of fields. + //========================================================================= :cirsol(1,8) , @@ -65,7 +65,7 @@ pararg3(1,8) } //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Circ2d C1 = Qualified1.Qualified(); diff --git a/src/GccAna/GccAna_Circ2d3Tan_3.cxx b/src/GccAna/GccAna_Circ2d3Tan_3.cxx index 0d5dc02153..a1b26ae05f 100755 --- a/src/GccAna/GccAna_Circ2d3Tan_3.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_3.cxx @@ -12,13 +12,13 @@ #include //========================================================================= -// Creation d un cercle tangent a trois droites. + -// On cree les Bissectrices a Qualified1 et Qualified2 et + -// les Bissectrices a Qualified1 et Qualified3. + -// On intersecte les bissectrices ainsi calculees ==> Points de centre. + -// On Choisit le point de centre qui correspond aux qualifieurs et on + -// construit la solution de rayon egal a la distance entre le point de + -// centre choisi et la droite Qualified1. + +// Creation of a circle tangent to three straight lines. + +// Create Bissectrices at Qualified1 and Qualified2 and + +// Bissectrices at Qualified1 and Qualified3. + +// Intersect bissectrices calculated in this way ==> Center points + +// Choose the center point that corresponds to qualifiers and + +// construct the solution of radius equal to the distance between the + +// chosen center point and straight line Qualified1. + //========================================================================= GccAna_Circ2d3Tan:: @@ -32,7 +32,7 @@ GccAna_Circ2d3Tan:: ): //========================================================================= -// Initialisation des champs. + +// Initialization of fields. + //========================================================================= cirsol(1,4) , @@ -73,7 +73,7 @@ GccAna_Circ2d3Tan:: } //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Lin2d L1(Qualified1.Qualified()); diff --git a/src/GccAna/GccAna_Circ2d3Tan_4.cxx b/src/GccAna/GccAna_Circ2d3Tan_4.cxx index 23ee203136..ddb1c0ff38 100755 --- a/src/GccAna/GccAna_Circ2d3Tan_4.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_4.cxx @@ -21,7 +21,7 @@ static Standard_Integer MaxSol = 20; //========================================================================= -// Creation d un cercle tangent a deux cercles et a un point. + +// Creation of a circle tangent to two circles and a point. + //========================================================================= GccAna_Circ2d3Tan:: @@ -31,7 +31,7 @@ GccAna_Circ2d3Tan:: const Standard_Real Tolerance ): //========================================================================= -// Initialisation des champs. + +// Initialization of fields. + //========================================================================= cirsol(1,MaxSol) , @@ -65,7 +65,7 @@ GccAna_Circ2d3Tan:: } //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Circ2d C1(Qualified1.Qualified()); @@ -289,8 +289,8 @@ GccAna_Circ2d3Tan:: else { TheSame2(NbrSol) = 0; gp_Dir2d dc(center2.XY()-Center.XY()); - // cas des cercles concentriques : - // le 2eme point de tangence est de l'autre cote du cercle solution + // case of concentric circles : + // 2nd tangency point is at the other side of the circle solution Standard_Real alpha = 1.; if (center1.Distance(center2)<=Tolerance) alpha = -1; pnttg2sol(NbrSol)=gp_Pnt2d(Center.XY()+alpha*Radius(k1)*dc.XY()); @@ -318,7 +318,7 @@ GccAna_Circ2d3Tan:: } } - // Debug grossier pour que le point soit sur les cercles solutions. + // Debug to create the point on the solution circles. Standard_Integer kk ; for ( kk = 1; kk <= NbrSol; kk++) { @@ -329,8 +329,8 @@ GccAna_Circ2d3Tan:: } } - // Debug grossier pour eliminer solution multiple. - // ca arrive dans le cas d intersection ligne hyperbole. + // Debug to eliminate multiple solution. + // this happens in case of intersection line hyperbola. Standard_Real Tol2 = Tol*Tol; for (kk = 1; kk #include -//========================================================================= -// Creation d un cercle tangent a un cercle, une droite et un point. + -//========================================================================= +//=========================================================================== +// Creation of a circle tangent to a circle, a straight line and a point. + +//=========================================================================== GccAna_Circ2d3Tan:: GccAna_Circ2d3Tan (const GccEnt_QualifiedCirc& Qualified1 , @@ -29,7 +29,7 @@ GccAna_Circ2d3Tan:: const Standard_Real Tolerance ): //========================================================================= -// Initialisation des champs. + +// Initialization of fields. + //========================================================================= cirsol(1,4) , @@ -64,7 +64,7 @@ GccAna_Circ2d3Tan:: } //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Circ2d C1(Qualified1.Qualified()); @@ -179,7 +179,7 @@ GccAna_Circ2d3Tan:: for (Standard_Integer k = 1 ; k <= nbsol3 ; k++) { if (NbrSol==4) break; -// pop : si le rayon est trop grand ( qu'est trop grand : avoir ) pas de creation +// pop : if the radius is too great - no creation if (Radius(k) > MaxRad) break; if (Abs(Radius(k)) < MinRad) break; diff --git a/src/GccAna/GccAna_Circ2d3Tan_6.cxx b/src/GccAna/GccAna_Circ2d3Tan_6.cxx index 746ea1c1f2..a3c1252c47 100755 --- a/src/GccAna/GccAna_Circ2d3Tan_6.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_6.cxx @@ -17,7 +17,7 @@ #include //========================================================================= -// Creation d un cercle tangent a deux droites et a un point. + +// Creation of a circle tangent to two straight lines and a point. + //========================================================================= GccAna_Circ2d3Tan:: @@ -59,7 +59,7 @@ GccAna_Circ2d3Tan:: pnttg3sol.Init(Point3); //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Lin2d L1 = Qualified1.Qualified(); diff --git a/src/GccAna/GccAna_Circ2d3Tan_7.cxx b/src/GccAna/GccAna_Circ2d3Tan_7.cxx index eb1e4175c8..943b900575 100755 --- a/src/GccAna/GccAna_Circ2d3Tan_7.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_7.cxx @@ -20,9 +20,9 @@ #include #include -//========================================================================= -// Creation d un cercle tangent a un cercle et a deux points. + -//========================================================================= +//======================================================================= +// Creation of a circle tangent to a circle and two points. + +//======================================================================= GccAna_Circ2d3Tan:: GccAna_Circ2d3Tan (const GccEnt_QualifiedCirc& Qualified1 , @@ -59,7 +59,7 @@ GccAna_Circ2d3Tan:: } //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Circ2d C1 = Qualified1.Qualified(); diff --git a/src/GccAna/GccAna_Circ2d3Tan_8.cxx b/src/GccAna/GccAna_Circ2d3Tan_8.cxx index 237fc7566e..ff5ea6d898 100755 --- a/src/GccAna/GccAna_Circ2d3Tan_8.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_8.cxx @@ -18,7 +18,7 @@ #include #include //========================================================================= -// Creation d un cercle tangent a une droite et a deux points. + +// Creation of a circle tangent to a straight line and two points. + //========================================================================= GccAna_Circ2d3Tan:: @@ -56,7 +56,7 @@ GccAna_Circ2d3Tan:: } //========================================================================= -// Traitement. + +// Processing. + //========================================================================= gp_Lin2d L1 = Qualified1.Qualified(); diff --git a/src/GccAna/GccAna_Circ2d3Tan_9.cxx b/src/GccAna/GccAna_Circ2d3Tan_9.cxx index 27e81bcb76..79582e0622 100755 --- a/src/GccAna/GccAna_Circ2d3Tan_9.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_9.cxx @@ -12,18 +12,18 @@ #include //========================================================================= -// Creation d un cercle passant par trois points. + -// Trois cas de figures : + -// 1/ Les trois points sont confondus. + +// Creation of a circle passing by three points. + +// Three cases : + +// 1/ Three points coincide. + // ----------------------------------- + -// Le resultat est le cercle centre en Point1 de rayon zero. + -// 2/ Deux des trois points sont confondus. + +// The result is the circle with center in Point1 with zero radius. + +// 2/ Two of three points coincide. + // ---------------------------------------- + -// On cree la mediatrice a deux points non confondus ainsi que la + -// droite passant par ces deux points. + -// La solution a pour centre l intersection de ces deux droite et + -// pour rayon la distance entre ce centre et l un des trois points. + -// 3/ Les trois points sont distinct. + +// Create the medium line between two non-coinciding points and + +// the straight line passing by these two points. + +// The center of the solution is the intersection of two straight lines and the + +// radius is the distance between this center and one of three points. + +// 3/ The three points are distinct. + // ---------------------------------- + // //========================================================================= @@ -35,7 +35,7 @@ GccAna_Circ2d3Tan:: const Standard_Real Tolerance ): //========================================================================= -// Initialisation des champs. + +// Initialization of fields. + //========================================================================= cirsol(1,1) , @@ -61,7 +61,7 @@ GccAna_Circ2d3Tan:: NbrSol = 0; //========================================================================= -// Traitement. + +// Processing. + //========================================================================= Standard_Real dist1 = Point1.Distance(Point2); diff --git a/src/GccAna/GccAna_Circ2dBisec.cxx b/src/GccAna/GccAna_Circ2dBisec.cxx index 3ec648baf3..0d85d6c456 100755 --- a/src/GccAna/GccAna_Circ2dBisec.cxx +++ b/src/GccAna/GccAna_Circ2dBisec.cxx @@ -5,7 +5,7 @@ //========================================================================= -// CREATION DE LA BISSECTICE ENTRE DEUX CERCLES. + +// CREATION of the BISSECTICE between two CIRCLES. + //========================================================================= #include @@ -34,15 +34,15 @@ GccAna_Circ2dBisec:: const gp_Circ2d& Circ2 ) { //========================================================================= -// Initialisation des champs : + -// - circle1 (Cercle : premier argument.) + -// - circle2 (Ligne : deuxieme argument.) + -// - intersection (Entier indiquant la position du plus petit + -// des deux cercles par rapport a l autre.) + -// - sameradius (Booleen indiquant si les deux cercles ont + -// meme rayon ou non.) + -// - NbrSol (Entier indiquant le nombre de solutions.) + -// - WellDone (Booleen indiquant le succes ou non de l algo.). + +// Initialization of fields : + +// - circle1 (Circle : first argument.) + +// - circle2 (Line : second argument.) + +// - intersection (Integer showing the smallest position + +// of two circles correspondingly to each other.) + +// - sameradius (Booleen showing if the two circles have + +// the same radius or not.) + +// - NbrSol (Integer showing the number of solutions.) + +// - WellDone (Boolean showing succes or failure of the algo.). + //========================================================================= WellDone = Standard_False; @@ -115,10 +115,10 @@ GccAna_Circ2dBisec:: } //========================================================================= -// Traitement. + -// On recupere les coordonees des centres des cercles circle1 et circle2 + +// Processing. + +// Return the coordinates of centers of circles circle1 and circle2 + // (xcencir1, ycencir1, xcencir2, ycencir2). + -// On recupere aussi les rayons des deux cercles R1 et R2. + +// Also return the radiuses of two circles R1 and R2. + //========================================================================= Handle(GccInt_Bisec) GccAna_Circ2dBisec:: diff --git a/src/GccAna/GccAna_Circ2dTanCen.cxx b/src/GccAna/GccAna_Circ2dTanCen.cxx index 9197c85eb8..918f3800a5 100755 --- a/src/GccAna/GccAna_Circ2dTanCen.cxx +++ b/src/GccAna/GccAna_Circ2dTanCen.cxx @@ -1,9 +1,9 @@ // File GccAna_Circ2dTanCen.cxx, REG 08/07/91 -//======================================================================== -// Creation d'un cercle tangent a un element et centre en un point + -//======================================================================== +//================================================================================ +// Creation of a circle tangent to an element and having center in a point + +//================================================================================ #include @@ -17,16 +17,15 @@ #include //======================================================================== -// Creation d'un cercle tangent a un cercle centre en un point. + -// - On calcule la distance entre le centre du cercle et le point de + -// centre : dist + -// - On verifie que cette distance est compatible avec le qualifieur + -// du cercle. + -// Si oui le rayon de la solution sera : + -// C1.Radius()-dist si le qualifieur est Enclosed. + -// C1.Radius()+dist si le qualifieur est Enclosing. + -// dist-C1.Radius() si le qualifieur est Outside. + -// un melange de ces valeurs si le qualifieur est Unqualified. + +// Creation of a circle tangent to a circle with center in a point. + +// - Calculate the distance between the center of the circle and the point of + +// center : dist + +// - Check that this distance is compatible with the qualifier of the circle. + +// Si yes, the radius of the solution will be : + +// C1.Radius()-dist if the qualifier is Enclosed. + +// C1.Radius()+dist if the qualifier is Enclosing. + +// dist-C1.Radius() if the qualifier is Outside. + +// a mix of these values if the qualifier is Unqualified. + //======================================================================== @@ -36,7 +35,7 @@ GccAna_Circ2dTanCen:: const Standard_Real Tolerance ): //======================================================================== -// Initialisation des champs. + +// Initialization of fields. + //======================================================================== cirsol(1,2) , @@ -151,9 +150,9 @@ GccAna_Circ2dTanCen:: } //========================================================================= -// Cercle tangent a une ligne Linetan et centre en un point Pcenter. + -// On calcule la distance du point a la ligne ==> Rayon. + -// On cree le cercle de centre Pcenter de rayon Rayon. + +// Circle tangent to line Linetan and center in a point Pcenter. + +// Calculate the distance from the point to the line ==> Radius. + +// Create the circle with center Pcenter of radius Radius. + //========================================================================= GccAna_Circ2dTanCen:: @@ -161,7 +160,7 @@ GccAna_Circ2dTanCen:: const gp_Pnt2d& Pcenter ): //========================================================================= -// Initialisation des champs. + +// Initialisation of fields. + //========================================================================= cirsol(1,1) , @@ -199,9 +198,9 @@ GccAna_Circ2dTanCen:: } //========================================================================= -// Cercle tangent a un point Point1 et centre en un point Pcenter. + -// On calcule la distance de Pcenter a Point1 ==> Rayon. + -// On cree le cercle de centre Pcenter de rayon Rayon. + +// Circle tangent to point Point1 and centered in a point Pcenter. + +// Calculate the distance from Pcenter to Point1 ==> Radius. + +// Create the circle with center Pcenter of radius Radius. + //========================================================================= GccAna_Circ2dTanCen:: @@ -209,7 +208,7 @@ GccAna_Circ2dTanCen:: const gp_Pnt2d& Pcenter ): //========================================================================= -// Initialisation des champs. + +// Initialisation of fields. + //========================================================================= cirsol(1,1) , diff --git a/src/GccAna/GccAna_Circ2dTanOnRad.cxx b/src/GccAna/GccAna_Circ2dTanOnRad.cxx index 5dc4d55977..603fc744f1 100755 --- a/src/GccAna/GccAna_Circ2dTanOnRad.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad.cxx @@ -2,12 +2,12 @@ // PRO12736 : bug quand OnLine // Ox, JCT 20/03/98 //======================================================================== -// circulaire tangent a un element de type : - Cercle. + -// - Ligne. + +// circular tangent to element of type : - Circle. + +// - Line. + // - Point. + -// centre sur un deuxieme element de type : - Cercle. + -// - Ligne. + -// de rayon donne : Radius. + +// center on second element of type : - Circle. + +// - Line. + +// of given radius : Radius. + //======================================================================== #include @@ -24,20 +24,18 @@ typedef math_DirectPolynomialRoots Roots; //========================================================================= -// Cercle tangent : a un cercle Qualified1 (C1). + -// centre : sur une droite OnLine. + -// de rayon : Radius. + +// Circle tangent : to circle Qualified1 (C1). + +// center : on straight line OnLine. + +// of radius : Radius. + // + -// On initialise le tableau de solutions cirsol ainsi que tous les + -// champs. + -// On elimine en fonction du qualifieur les cas ne presentant pas de + -// solutions. + -// On resoud l equation du second degre indiquant que le point de centre + -// recherche (xc,yc) est a une distance Radius du cercle C1 et + -// sur la droite OnLine. + -// Les solutions sont representees par les cercles : + -// - de centre Pntcen(xc,yc) + -// - de rayon Radius. + +// Initialise the table of solutions cirsol and all fields. + +// Eliminate depending on the qualifier the cases not being solutions. + +// Solve the equation of the second degree indicating that the found center + +// point (xc,yc) is at a distance Radius from circle C1 and + +// on straight line OnLine. + +// The solutions aret represented by circles : + +// - with center Pntcen(xc,yc) + +// - with radius Radius. + //========================================================================= GccAna_Circ2dTanOnRad:: diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_1.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_1.cxx index 203037f466..8d7a99f71a 100755 --- a/src/GccAna/GccAna_Circ2dTanOnRad_1.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_1.cxx @@ -12,20 +12,18 @@ #include //========================================================================= -// Cercle tangent a une droite Qualified1 (L1) + -// centre sur une droite OnLine + -// de rayon Radius. + +// Circle tangent to straight line Qualified1 (L1) + +// center on straight line OnLine + +// of radius Radius. + // + -// On initialise le tableau de solutions cirsol ainsi que tous les + -// champs. + -// On elimine en fonction du qualifieur les cas ne presentant pas de + -// solutions. + -// On cree L1para : la parallele a L1 dans le sens voulu par le + -// qualifieur a une distance Radius. + -// Le point P d intersection entre L1para et OnLine donnera le point de + -// centre de la solution. + -// On cree les solutions cirsol de centre P et de rayon Radius. + -// On remplit les champs. + +// Initialize the table of solutions cirsol and all fields. + +// Elimine depending on the qualifier the cases not being solutions. + +// Create L1para : parallel to L1 in the direction required by the + +// qualifier at distance Radius. + +// Point P of intersection between L1para and OnLine will give the center point + +// of the solution. + +// Create solutions cirsol with center P and radius Radius. + +// Fill the fields. + //========================================================================= GccAna_Circ2dTanOnRad:: diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_2.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_2.cxx index a044ca499a..66e5a64703 100755 --- a/src/GccAna/GccAna_Circ2dTanOnRad_2.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_2.cxx @@ -9,25 +9,23 @@ #include //========================================================================= -// typedef des objets manipules : + +// typedef of handled objects : + //========================================================================= typedef math_DirectPolynomialRoots Roots; //========================================================================= -// Cercle tangent a un point Point1. + -// centre sur une droite OnLine. + -// de rayon Radius. + +// Circle tangent to a point Point1. + +// center on straight line OnLine. + +// radius Radius. + // + -// On initialise le tableau de solutions cirsol ainsi que tous les + -// champs. + -// On elimine les cas ne presentant pas de solution. + -// On resoud l equation du second degre indiquant que le point de centre + -// recherche (xc,yc) est a une distance Radius du point Point1 et + -// sur la droite OnLine. + -// Les solutions sont representees par les cercles : + -// - de centre Pntcen(xc,yc) + -// - de rayon Radius. + +// Initialize the table of solutions cirsol and all fields. + +// Eliminate cases not being the solution. + +// Solve the equation of second degree showing that the found center point + +// (xc,yc) is at distance Radius from point Point1 and on the straight line OnLine. + +// The solutions are represented by circles : + +// - of center Pntcen(xc,yc) + +// - of radius Radius. + //========================================================================= GccAna_Circ2dTanOnRad:: diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_3.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_3.cxx index dc6009b9dc..71ff8587d0 100755 --- a/src/GccAna/GccAna_Circ2dTanOnRad_3.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_3.cxx @@ -12,17 +12,16 @@ #include //========================================================================= -// Cercle tangent a un cercle Qualified1 (C1). + -// centre sur un cercle OnCirc. + -// de rayon Radius. + +// Circle tangent to a circle Qualified1 (C1). + +// center on a circle OnCirc. + +// of radius Radius. + // + -// On initialise le tableau de solutions cirsol ainsi que tous les + -// champs. + -// On elimine les cas ne presentant pas de solution. + -// On cree la (les) parallele(s) a C1 dans le (les) sens voulu(s). + -// On intersecte cette (ces) parallele(s) avec OnCirc et on obtient le + -// (les) point(s) de centre de la (des) solution(s) recherchee(s). + -// On cree cette (ces) solution(s) cirsol. + +// Initialize the table of solutions cirsol and all fields. + +// Eliminate cases not being the solution. + +// Create parallel(s) to C1 in the required direction(s). + +// Intersect parallel(s) with OnCirc and obtain the + +// center point(s) of found solution(s). + +// Create solution(s) cirsol. + //========================================================================= GccAna_Circ2dTanOnRad:: diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_4.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_4.cxx index 22ba171d05..d352521e46 100755 --- a/src/GccAna/GccAna_Circ2dTanOnRad_4.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_4.cxx @@ -11,17 +11,16 @@ #include //========================================================================= -// Cercle tangent a une droite Qualified1 (L1). + -// centre sur un cercle OnCirc. + -// de rayon Radius. + +// Circle tangent to straight line Qualified1 (L1). + +// center on circle OnCirc. + +// with radius Radius. + // + -// On initialise le tableau de solutions cirsol ainsi que tous les + -// champs. + -// On elimine les cas ne presentant pas de solution. + -// On cree la (les) parallele(s) a L1 dans le (les) sens voulu(s). + -// On intersecte cette (ces) parallele(s) avec OnCirc et on obtient les + -// points de centre des solutions recherchees. + -// On cree ces solutions cirsol. + +// Initialize table of solutions cirsol and all fields. + +// Eliminate cases not being the solution. + +// Create parallel line(s) to L1 in the required direction(s). + +// Intersect parallel line(s) with OnCirc and obtain + +// center points of found solutions. + +// Create solutions cirsol. + //========================================================================= GccAna_Circ2dTanOnRad:: @@ -31,7 +30,7 @@ GccAna_Circ2dTanOnRad:: const Standard_Real Tolerance ): //========================================================================= -// Initialisation des champs. + +// Initialization of fields. + //========================================================================= cirsol(1,4) , @@ -56,7 +55,7 @@ GccAna_Circ2dTanOnRad:: } //========================================================================= -// Initialisation de diverses variables. + +// Initialisation of various variables. + //========================================================================= Standard_Integer nbsol = 0; @@ -69,7 +68,7 @@ GccAna_Circ2dTanOnRad:: Standard_Real dist2 = L1.Distance(OnCirc.Location())+OnCirc.Radius(); //========================================================================= -// Traitement. + +// Processing. + //========================================================================= if (Radius < 0.0) { Standard_NegativeValue::Raise(); } @@ -78,7 +77,7 @@ GccAna_Circ2dTanOnRad:: if ((dist1-Radius>Tol) || (Tol 0.0) { dist1 = Radius; } else if (dist2-Radius < 0.0) { dist2 = Radius; } diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_5.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_5.cxx index df73d652d0..249e2108f8 100755 --- a/src/GccAna/GccAna_Circ2dTanOnRad_5.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_5.cxx @@ -9,17 +9,16 @@ #include //========================================================================= -// Cercle tangent a un point Point1. + -// centre sur un cercle OnCirc. + -// de rayon Radius. + +// Circle tangent to a point Point1. + +// center on circle OnCirc. + +// radius Radius. + // + -// On initialise le tableau de solutions cirsol ainsi que tous les + -// champs. + -// On elimine les cas ne presentant pas de solution. + -// On cree le cercle centre en Point1 de rayon Radius. + -// On intersecte ce cercle avec OnCirc et on obtient les points de + -// centre des solutions recherchees. + -// On cree ces solutions cirsol. + +// Initialize the table of solutions cirsol and all fields. + +// Eliminate cases not being the solution. + +// Create the circle with center in Point1 of radius Radius. + +// Intersect this circle with OnCirc and obtain the center points + +// of found solutions. + +// Create solutions cirsol. + //========================================================================= GccAna_Circ2dTanOnRad:: diff --git a/src/GccAna/GccAna_CircLin2dBisec.cxx b/src/GccAna/GccAna_CircLin2dBisec.cxx index df5a71235c..452d80d8d2 100755 --- a/src/GccAna/GccAna_CircLin2dBisec.cxx +++ b/src/GccAna/GccAna_CircLin2dBisec.cxx @@ -4,7 +4,7 @@ // //========================================================================= -// CREATION DE LA BISSECTICE ENTRE UN CERCLE ET UNE DROITE. + +// CREATION of the BISSECTICE between a CIRCLE and a STRAIGHT LINE. + //========================================================================= #include @@ -29,11 +29,11 @@ GccAna_CircLin2dBisec:: { //========================================================================= -// Initialisation des champs : + -// - circle (Le cercle.) + -// - line (la droite.) + -// - NbrSol (nombre de solution.) + -// - WellDone (Booleen indiquant le succes ou non de l algo.). + +// Initialization of fields : + +// - circle + +// - line (straight line.) + +// - NbrSol (number of solution.) + +// - WellDone (Booleen showing success or failure of algorithm). + //========================================================================= NbrSol = 2; @@ -41,15 +41,15 @@ GccAna_CircLin2dBisec:: } //========================================================================= -// Traitement. + -// On recupere les coordonees des origines de la droite (xloc,yloc) et + -// du cercle (xcencir, ycencir). + -// On recupere aussi les coordonees dela direction de la droite (xdir, + -// ydir) et le rayon du cercle R1. + -// On regarde de quel cote de la droite se trouve le centre du cercle + -// pour orienter la parabole (signe). + -// On cree l axe de chacune des paraboles (axeparab1, axeparb2), puis + -// les deux paraboles (biscirlin1, biscirlin1). + +// Processing. + +// Return coordinates of origins of the straight line (xloc,yloc) and the + +// circle (xcencir, ycencir). + +// Also return the coordinates of the direction of the straight line (xdir, + +// ydir) and the radius of circle R1. + +// Check at which side of the straight line is found the center of the circle + +// to orientate the parabola (sign). + +// Create axis of each parabola (axeparab1, axeparb2), then + +// two parabolas (biscirlin1, biscirlin1). + //========================================================================= Handle(GccInt_Bisec) GccAna_CircLin2dBisec:: diff --git a/src/GccAna/GccAna_CircPnt2dBisec.cxx b/src/GccAna/GccAna_CircPnt2dBisec.cxx index 205630a3a3..6d85d39c3e 100755 --- a/src/GccAna/GccAna_CircPnt2dBisec.cxx +++ b/src/GccAna/GccAna_CircPnt2dBisec.cxx @@ -4,7 +4,7 @@ // //========================================================================= -// CREATION DE LA BISSECTICE ENTRE UN CERCLE ET UN POINT. + +// CREATION of the BISSECTICE between a CIRCLE and a POINT. + //========================================================================= #include @@ -31,13 +31,13 @@ GccAna_CircPnt2dBisec:: point(Point) { //========================================================================= -// Initialisation des champs : + -// - circle (Cercle : premier argument.) + -// - line (Ligne : deuxieme argument.) + -// - theposition (Entier indiquant la position de Point par + -// rapport a Circle.) + -// - NbrSol (Entier indiquant le nombre de solutions.) + -// - WellDone (Booleen indiquant le succes ou non de l algo.). + +// Initialization of fields : + +// - circle ( first argument.) + +// - line ( second argument.) + +// - theposition (Integer showing the position of Point + +// correspondingly to Circle.) + +// - NbrSol (Integer showing the number of solutions.) + +// - WellDone (Booleen showing the success or failure of the algorithm). + //========================================================================= Standard_Real dist = Circle.Radius()-Point.Distance(Circle.Location()); @@ -60,15 +60,15 @@ GccAna_CircPnt2dBisec:: } //========================================================================= -// Traitement. + -// On recupere les coordonees des origines de la droite (xloc,yloc) et + -// du cercle (xcencirc, ycencirc). + -// On recupere aussi les coordonees dela direction de la droite (xdir, + -// ydir) et le rayon du cercle R1. + -// On regarde de quel cote de la droite se trouve le centre du cercle + -// pour orienter la parabole (signe). + -// On cree l axe de chacune des paraboles (axeparab1, axeparb2), puis + -// les deux paraboles (biscirPnt1, biscirPnt1). + +// Processing. + +// Return the coordinates of origins of the straight line (xloc,yloc) and+ +// of the circle (xcencirc, ycencirc). + +// Also return the coordinates of the direction of the straight line (xdir, + +// ydir) and the radius of circle R1. + +// Check at which side of the straight line is found the center of circle + +// to orientate the parabola (sign). + +// Create axis of each parabola (axeparab1, axeparb2), then + +// two parabolas (biscirPnt1, biscirPnt1). + //========================================================================= Handle(GccInt_Bisec) GccAna_CircPnt2dBisec:: @@ -100,7 +100,7 @@ Handle(GccInt_Bisec) GccAna_CircPnt2dBisec:: gp_Ax2d majax(center,gp_Dir2d(xpoint-xcencir,ypoint-ycencir)); //========================================================================= - // Le point est a l interieur du cercle. + + // The point is inside the circle. + //========================================================================= if (theposition == -1) { @@ -110,9 +110,9 @@ Handle(GccInt_Bisec) GccAna_CircPnt2dBisec:: } //========================================================================= - // Le point est sur le cercle. + - // Il y a une seule solution : la droite passant par point et le centre + - // du cercle. + + // The point is on the circle. + + // There is only one solution : straight line passing through point and the center + + // of the circle. + //========================================================================= else if (theposition == 0) { @@ -126,8 +126,8 @@ Handle(GccInt_Bisec) GccAna_CircPnt2dBisec:: } //========================================================================= - // Le point est a l exterieur du cercle. + - // Il y a deux solutions : les deux branches principales de l hyperbole.+ + // The point is outside of the circle. + + // There are two solutions : two main branches of the hyperbola.+ //========================================================================= else { diff --git a/src/GccAna/GccAna_Lin2d2Tan.cxx b/src/GccAna/GccAna_Lin2d2Tan.cxx index aaadebcca9..01ebd45787 100755 --- a/src/GccAna/GccAna_Lin2d2Tan.cxx +++ b/src/GccAna/GccAna_Lin2d2Tan.cxx @@ -1,8 +1,8 @@ // File GccAna_Lin2d2Tan.cxx, REG 08/07/91 //========================================================================= -// Droite tangente a deux cercles ou tangente a un cercle et passant + -// par un point. + +// Straight line tangent to two circles or tangent to a circle and passing + +// through point. + //========================================================================= #include @@ -17,7 +17,7 @@ #include //========================================================================= -// Droite passant par deux points. + +// Straight line passing through two points. + // =============================== + //========================================================================= @@ -58,14 +58,13 @@ GccAna_Lin2d2Tan:: } //========================================================================= -// Droite tangente a un cercle passant par un point. + +// Straight line tangent to a circle passing by a point. + // ================================================= + -// Suivant le qualifieur attache au cercle Qualified1 (C1) on definit + -// la direction de la tangente a calculer. + -// Cette tangente aura comme point d attache le point P1 (point de tan- + -// gence avec le cercle. + -// Elle fera un angle A (de sinus R1/dist ou -R1/dist) avec la droite + -// passant par le centre du cercle et ThePoint. + +// Basing on the qualifier attached to circle Qualified1 (C1) define + +// the direction of the tangent to be calculated. + +// This tangent will have connection point P1 (point of tangency with the circle. + +// It has angle A (sinus R1/dist or -R1/dist) with straight line + +// passing by the center of the circle and ThePoint. + //========================================================================= GccAna_Lin2d2Tan:: @@ -152,21 +151,21 @@ GccAna_Lin2d2Tan:: } //========================================================================= - // Droite tangente a deux cercles. + - // =============================== + - // Dans le cas limite (les deux cercles tangents interieurs l un a + - // l autre) on prend la droite orthogonale a la droite reliant les deux + - // cercles. + - // Dans les autres cas on fait subir au centre de C1 (Qualified1) ou de + - // C2 (Qualified2), suivant que R1 est plus grand ou non que R2, une + - // rotation d angle A avec sinus(A) = (R1+R2)/dist ou + - // sinus(A) = (R1-R2)/dist ou + - // sinus(A) = (R2-R1)/dist ou + - // sinus(A) = (-R1-R2)/dist + - // Le point ainsi determine est P1 ou P2. + - // la direction de la droite a calculer est celle de la droite passant + - // par le centre de la rotation (centre de C1 ou de C2) et P1 ou P2. + - // On translate ensuite la droite pour la rendre tangente a C1. + + // Straight line tangent to two circles. + + // ==================================== + + // In the boundary cas (two interior circles are tangent to each other) + + // take the straight line orthogonal to the straight line connecting + + // two circles. + + // In other cases subject the center of C1 (Qualified1) or of + + // C2 (Qualified2), provided that R1 is greater than R2, to a + + // rotation of angle A with sinus(A) = (R1+R2)/dist or + + // sinus(A) = (R1-R2)/dist or + + // sinus(A) = (R2-R1)/dist or + + // sinus(A) = (-R1-R2)/dist + + // The point found this way is P1 or P2. + + // The direction of the straight line to be calculated should pass by + + // the center of rotation (center of C1 or of C2) and P1 or P2. + + // Then translate the straight line to make it tangent to C1. + //========================================================================= GccAna_Lin2d2Tan:: diff --git a/src/GccAna/GccAna_Lin2dBisec.cxx b/src/GccAna/GccAna_Lin2dBisec.cxx index b3ca3bde1c..3fa6c0892f 100755 --- a/src/GccAna/GccAna_Lin2dBisec.cxx +++ b/src/GccAna/GccAna_Lin2dBisec.cxx @@ -1,8 +1,6 @@ // File GccAna_Lin2dBisec.cxx, REG 08/07/91 -// JCT 06/07/98 on se fie a IntAna2d_AnaIntersection pour savoir si -// les droites sont paralleles (PRO14405) //========================================================================= -// CREATION DE LA BISSECTICE ENTRE DEUX DROITES. + +// CREATION of the BISSECTICE between two STRAIGHT LINES. + //========================================================================= #include @@ -19,11 +17,11 @@ #include //========================================================================= -// La premiere bissectrice calculee est la bisectrice interieure, la + -// seconde est la bissectrice exterieure. + -// la direction de la premiere bissectrice est telle que son produit + -// scalaire avec la direction de Lin1 est toujours positif. + -// La seconde bissectrice est tournee dans le sens positif. + +// The first calculated bissectrice is the interior bisectrice, the + +// second is the exterior bissectrice. + +// the direction of the first bissectrice is such that its scalar product + +// with direction of Lin1 is always positive. + +// The second bissectrice is turned in the positive direction. + //========================================================================= GccAna_Lin2dBisec:: @@ -50,9 +48,9 @@ GccAna_Lin2dBisec:: linsol(NbrSol) = gp_Lin2d(Lin1); } else { - // Attention : ne pas utiliser dist = Lin1.Distance(Lin2); - // car les droites sont peut-etre concourrentes pour gp_Lin2d - // d'ou dist = 0.0 (test sur l'angle trop severe ?) + // Attention : do not use dist = Lin1.Distance(Lin2); + // as straight lines can be concurrent for gp_Lin2d + // so dist = 0.0 (test of the angle too strict ?) Standard_Real dist = Lin1.Distance(Lin2.Location())/2.0; Standard_Real cross = gp_Vec2d ( -Lin2.Direction().Y() , Lin2.Direction().X() ) diff --git a/src/GccAna/GccAna_Lin2dTanObl.cxx b/src/GccAna/GccAna_Lin2dTanObl.cxx index 1c6a8de8cc..0ba933bf0a 100755 --- a/src/GccAna/GccAna_Lin2dTanObl.cxx +++ b/src/GccAna/GccAna_Lin2dTanObl.cxx @@ -1,8 +1,8 @@ //File GccAna_Lin2dTanObl.cxx, REG 08/07/91 //========================================================================= -// CREATION D UNE DROITE TANGENTE A UN CERCLE OU PASSANT PAR UN POINT + -// ET FAISANT UN ANGLE A AVEC UNE DROITE. + +// CREATION of a STRAIGHT LINE TANGENT to a CIRCLE or PASSING by a POINT + +// and MAKING ANGLE A with a STRAIGHT LINE. + //========================================================================= #include @@ -19,12 +19,12 @@ #include //========================================================================= -// Creation d une droite passant par un point : ThePoint + -// faisant un angle : TheAngle + -// avec une droite : TheLine. + -// On fait subir a la droite (ThePoint,TheLine.Location()) une rotation + -// d angle TheAngle ==> D1. + -// on cree la droite passant par ThePoint de direction D1. + +// Creation of a straight line passing by a point : ThePoint + +// making an angle : TheAngle + +// with straight line : TheLine. + +// Subject the straight line (ThePoint,TheLine.Location()) to a rotation + +// by angle TheAngle ==> D1. + +// create straight line passing through ThePoint of direction D1. + //========================================================================= GccAna_Lin2dTanObl:: @@ -72,12 +72,12 @@ GccAna_Lin2dTanObl:: } //========================================================================= -// Creation d une droite tangent a un cercle : Qualified1 (C1) + -// faisant un angle : TheAngle + -// avec une droite : TheLine. + -// On fait subir a la droite (C1.Location,TheLine.Location()) une + -// rotation d angle TheAngle ou -TheAngle ==> D1. + -// on cree la droite passant par C1 de direction D1. + +// Creation of a straight line tangent to a circle : Qualified1 (C1) + +// making angle : TheAngle + +// with a straight line : TheLine. + +// Subject the straight line (C1.Location,TheLine.Location()) to a + +// rotation by angle TheAngle or -TheAngle ==> D1. + +// create the straight line passing by C1 of direction D1. + //========================================================================= GccAna_Lin2dTanObl:: diff --git a/src/GccAna/GccAna_Lin2dTanPar.cxx b/src/GccAna/GccAna_Lin2dTanPar.cxx index b7bc639e3d..1ed144ad8a 100755 --- a/src/GccAna/GccAna_Lin2dTanPar.cxx +++ b/src/GccAna/GccAna_Lin2dTanPar.cxx @@ -1,8 +1,8 @@ // File GccAna_Lin2dTanPar.cxx, REG 08/07/91 //======================================================================== -// CREATION D UNE LIGNE TANGENTE A UN CERCLE OU PASSANT PAR UN POINT + -// ET PARALLELE A UNE DROITE. + +// CREATION of a LINE TANGENT to a CIRCLE or PASSING by a POINT + +// and PARALLEL to a STRAIGHT DROITE. + //======================================================================== #include @@ -17,9 +17,9 @@ #include //======================================================================== -// Passant par un point : + -// On cree la droite d origine ThePoint et + -// de direction Lin1.Direction(). + +// Passing by a point : + +// Create the straight line with origin ThePoint and + +// direction Lin1.Direction(). + //======================================================================== GccAna_Lin2dTanPar:: @@ -43,14 +43,14 @@ GccAna_Lin2dTanPar:: } //======================================================================== -// Tangent a un cercle : + -// On cree suivant le qualifieur la droite + -// - d origine P1 (P1 est un point d intersection entre C1 et + -// une droite passant par le centre de C1 et de + -// direction la normale a Lin1). + -// le choix du point d intersection est fonction + -// du qualifieur. + -// - de direction la direction de Lin1. + +// Tangent to a circle : + +// Create following the qualifier the straight line + +// - with origin P1 (P1 is a point of intersection between C1 and + +// a straight line passing by the center of C1 and + +// direction the normal to Lin1). + +// the choice of the point of intersection depends + +// on the qualifier. + +// - with direction the direction of Lin1. + //======================================================================== GccAna_Lin2dTanPar:: diff --git a/src/GccAna/GccAna_Lin2dTanPer.cxx b/src/GccAna/GccAna_Lin2dTanPer.cxx index 0be2982a21..05ad62c96c 100755 --- a/src/GccAna/GccAna_Lin2dTanPer.cxx +++ b/src/GccAna/GccAna_Lin2dTanPer.cxx @@ -1,8 +1,8 @@ // File GccAna_Lin2dTanPer.cxx, REG 08/07/91 //========================================================================= -// CREATION D UNE DROITE TANGENTE A UN CERCLE OU PASSANT PAR UN POINT + -// ET ORTHOGONALE A UNE DROITE. + +// CREATION of a STRAIGHT LINE TANGENT to a CIRCLE or PASSING by a POINT + +// and ORTHOGONAL to a STRAIGHT LINE. + //========================================================================= #include @@ -19,10 +19,10 @@ #include //========================================================================= -// Droite passant par un point : ThePoint et + -// orthogonale a une droite : TheLin. + -// On cree la droite d origine : ThePoint + -// et de direction : TheLin.Direction() tournee de 90 + +// Straight line passing by point : ThePoint and + +// orthogonal to straight line : TheLin. + +// Create the straight line of origin : ThePoint + +// and direction : TheLin.Direction() turned by 90 + //========================================================================= GccAna_Lin2dTanPer:: @@ -60,10 +60,10 @@ GccAna_Lin2dTanPer:: } //========================================================================= -// Droite passant par un point : ThePnt + -// et orthogonale a un cercle : TheCircle. + -// On cree la droite d origine : ThePoint + -// et de direction : (TheCircle.Location(),ThePnt). + +// Straight line passing by point : ThePnt + +// and orthogonal to circle : TheCircle. + +// Create the straight line of origin : ThePoint + +// and direction : (TheCircle.Location(),ThePnt). + //========================================================================= GccAna_Lin2dTanPer:: @@ -104,10 +104,10 @@ GccAna_Lin2dTanPer:: } //========================================================================= -// Droite tangente a un cercle : Qualified1 (C1) + -// et orthogonale a une droite : TheLin. + -// On cree la droite d origine : P1 (sur C1) + -// et de direction : TheLin.Direction() tournee de 90` + +// Straight line tangent to circle : Qualified1 (C1) + +// and orthogonal to straight line : TheLin. + +// Create straight line of origin : P1 (on C1) + +// and direction : TheLin.Direction() turned by 90` + //========================================================================= GccAna_Lin2dTanPer:: @@ -175,10 +175,10 @@ GccAna_Lin2dTanPer:: } //========================================================================= -// Droite tangente a un cercle : Qualified1 (C1) + -// et orthogonale a un cercle : TheCircle. + -// On cree la droite d origine : P1 (sur C1) + -// et de direction : TheLin.Direction() tournee de 90` + +// Straight line tangent to circle : Qualified1 (C1) + +// and orthogonal to circle : TheCircle. + +// Create straight line of origin : P1 (on C1) + +// and direction : TheLin.Direction() turned by 90` + //========================================================================= GccAna_Lin2dTanPer:: diff --git a/src/GccAna/GccAna_LinPnt2dBisec.cxx b/src/GccAna/GccAna_LinPnt2dBisec.cxx index 90ffb7fdbc..978eecc33a 100755 --- a/src/GccAna/GccAna_LinPnt2dBisec.cxx +++ b/src/GccAna/GccAna_LinPnt2dBisec.cxx @@ -5,7 +5,7 @@ //========================================================================= -// CREATION DE LA BISSECTRICE ENTRE UNE DROITE ET UN POINTS. + +// CREATION of the BISSECTRICE between a DROITE and POINTS. + //========================================================================= #include diff --git a/src/GccAna/GccAna_Pnt2dBisec.cxx b/src/GccAna/GccAna_Pnt2dBisec.cxx index 2811d19aca..ee2b3bdc42 100755 --- a/src/GccAna/GccAna_Pnt2dBisec.cxx +++ b/src/GccAna/GccAna_Pnt2dBisec.cxx @@ -5,7 +5,7 @@ //========================================================================= -// CREATION DE LA BISSECTRICE ENTRE DEUX POINTS. + +// CREATION of the BISSECTRICE between two POINTS. + //========================================================================= #include diff --git a/src/GccEnt/GccEnt.cxx b/src/GccEnt/GccEnt.cxx index 72d47bcdb7..71367f3e96 100755 --- a/src/GccEnt/GccEnt.cxx +++ b/src/GccEnt/GccEnt.cxx @@ -1,7 +1,7 @@ // File GccEnt.cxx, REG 13/08/91 //========================================================================= -// Methodes de package permettant de qualifier les objets. + +// Methods of packing allowing to qualify objects. + // + //========================================================================= -- 2.20.1