From 5174095875f548bfc99273d5f440f01cdf460d41 Mon Sep 17 00:00:00 2001 From: ski Date: Tue, 8 Sep 2015 15:41:26 +0300 Subject: [PATCH] 0026586: Eliminate compile warnings obtained by building occt with vc14: declaration of local variable hides previous local declaration Eliminated warnings about "declaration of some local variable hides previous local declaration" --- src/AIS/AIS_AngleDimension.cxx | 13 +- src/AIS/AIS_Dimension.cxx | 1 - src/AIS/AIS_LengthDimension.cxx | 8 +- src/AppCont/AppCont_LeastSquare.cxx | 1 - src/AppParCurves/AppParCurves_LeastSquare.gxx | 4 +- src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx | 4 +- src/BOPAlgo/BOPAlgo_BOP.cxx | 9 +- src/BOPAlgo/BOPAlgo_BuilderFace.cxx | 1 - src/BOPAlgo/BOPAlgo_Builder_2.cxx | 4 +- src/BOPAlgo/BOPAlgo_Builder_3.cxx | 4 +- src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx | 7 +- src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 22 +- src/BOPAlgo/BOPAlgo_WireSplitter.cxx | 2 +- src/BOPTest/BOPTest_HistoryCommands.cxx | 8 +- .../BRepBlend_SurfRstLineBuilder.cxx | 8 +- src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx | 1 - src/BRepCheck/BRepCheck_Analyzer.cxx | 8 +- src/BRepCheck/BRepCheck_Edge.cxx | 4 +- src/BRepCheck/BRepCheck_Shell.cxx | 8 +- src/BRepExtrema/BRepExtrema_DistanceSS.cxx | 16 +- src/BRepFeat/BRepFeat_Form.cxx | 3 - src/BRepFeat/BRepFeat_MakeDPrism.cxx | 7 +- src/BRepFeat/BRepFeat_MakeLinearForm.cxx | 7 +- src/BRepFeat/BRepFeat_MakeRevol.cxx | 6 +- src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx | 28 +- src/BRepFeat/BRepFeat_RibSlot.cxx | 10 +- src/BRepFill/BRepFill.cxx | 2 +- src/BRepFill/BRepFill_ApproxSeewing.cxx | 14 +- src/BRepFill/BRepFill_CompatibleWires.cxx | 21 +- src/BRepFill/BRepFill_Evolved.cxx | 55 +- src/BRepFill/BRepFill_Filling.cxx | 2 - src/BRepFill/BRepFill_Generator.cxx | 4 +- src/BRepFill/BRepFill_MultiLine.cxx | 8 +- src/BRepFill/BRepFill_NSections.cxx | 4 +- src/BRepFill/BRepFill_OffsetWire.cxx | 20 +- src/BRepFill/BRepFill_Sweep.cxx | 12 +- src/BRepFill/BRepFill_TrimShellCorner.cxx | 3 +- src/BRepMesh/BRepMesh_Delaun.cxx | 6 +- src/BRepMesh/BRepMesh_EdgeTessellator.cxx | 1 - src/BRepOffset/BRepOffset_Inter3d.cxx | 11 +- src/BRepOffset/BRepOffset_MakeLoops.cxx | 12 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 16 +- src/BRepOffset/BRepOffset_Offset.cxx | 12 +- src/BRepOffset/BRepOffset_Tool.cxx | 41 +- .../BRepOffsetAPI_DraftAngle.cxx | 8 +- .../BRepOffsetAPI_ThruSections.cxx | 6 +- .../BRepSweep_NumLinearRegularSweep.cxx | 6 +- src/BRepSweep/BRepSweep_Rotation.cxx | 6 +- src/BRepTest/BRepTest_FeatureCommands.cxx | 1 - src/BRepToIGES/BRepToIGES_BRShell.cxx | 6 +- .../BRepTools_NurbsConvertModification.cxx | 6 +- src/BRepTools/BRepTools_Quilt.cxx | 12 +- src/BiTgte/BiTgte_Blend.cxx | 40 +- src/BinMNaming/BinMNaming_NamingDriver.cxx | 8 +- src/Bisector/Bisector_BisecAna.cxx | 28 +- src/Bisector/Bisector_BisecCC.cxx | 4 +- src/Blend/Blend_Walking_1.gxx | 1 - src/Blend/Blend_Walking_3.gxx | 8 +- src/CDF/CDF_FWOSDriver.cxx | 6 +- src/CSLib/CSLib.cxx | 10 +- src/CSLib/CSLib_Offset.cxx | 6 +- src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx | 10 +- src/ChFi2d/ChFi2d_Builder.cxx | 3 +- src/ChFi2d/ChFi2d_FilletAlgo.cxx | 10 +- src/ChFi3d/ChFi3d_Builder_2.cxx | 8 +- src/ChFiDS/ChFiDS_FilSpine.cxx | 6 +- src/Contap/Contap_Contour.cxx | 6 +- src/DBRep/DBRep_DrawableShape.cxx | 38 +- src/DNaming/DNaming.cxx | 1 - src/DNaming/DNaming_PrismDriver.cxx | 4 +- src/DNaming/DNaming_RevolutionDriver.cxx | 16 +- src/Extrema/Extrema_GenExtCS.cxx | 14 +- src/Extrema/Extrema_GenExtPS.cxx | 2 - src/FEmTool/FEmTool_Assembly.cxx | 5 +- src/FEmTool/FEmTool_LinearFlexion.cxx | 4 +- src/FEmTool/FEmTool_LinearJerk.cxx | 4 +- src/FEmTool/FEmTool_LinearTension.cxx | 4 +- src/FairCurve/FairCurve_Batten.cxx | 6 +- src/FairCurve/FairCurve_MinimalVariation.cxx | 6 +- src/FilletSurf/FilletSurf_InternalBuilder.cxx | 6 +- src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx | 2 +- src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx | 84 +- src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx | 4 +- src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx | 2 - src/GeomAdaptor/GeomAdaptor_Curve.cxx | 4 - src/GeomConvert/GeomConvert_1.cxx | 8 +- src/GeomFill/GeomFill_LocationDraft.cxx | 6 +- src/GeomFill/GeomFill_Profiler.cxx | 8 +- .../GeomFill_QuasiAngularConvertor.cxx | 4 +- src/GeomFill/GeomFill_SectionPlacement.cxx | 3 +- src/GeomPlate/GeomPlate_BuildPlateSurface.cxx | 51 +- .../GeometryTest_API2dCommands.cxx | 6 +- .../GeomliteTest_ApproxCommands.cxx | 6 +- .../GeomliteTest_CurveCommands.cxx | 12 +- src/HLRBRep/HLRBRep_Data.cxx | 12 +- src/HLRBRep/HLRBRep_HLRToShape.cxx | 18 +- src/HLRBRep/HLRBRep_InternalAlgo.cxx | 36 +- src/HLRBRep/HLRBRep_PolyAlgo.cxx | 54 +- src/HLRBRep/HLRBRep_ShapeToHLR.cxx | 4 +- src/HLRTest/HLRTest_DrawableEdgeTool.cxx | 14 +- src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx | 1 - src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx | 20 +- src/IFSelect/IFSelect_SessionDumper.cxx | 1 - src/IGESCAFControl/IGESCAFControl_Reader.cxx | 1 - src/IGESControl/IGESControl_IGESBoundary.cxx | 10 +- src/IGESConvGeom/IGESConvGeom.cxx | 29 +- src/IntCurve/IntCurve_IntConicConic_1.cxx | 2 - src/IntImpParGen/IntImpParGen_Intersector.gxx | 852 +++++++++--------- .../IntPatch_ImpImpIntersection_0.gxx | 8 +- .../IntPatch_ImpImpIntersection_4.gxx | 28 +- src/IntPatch/IntPatch_Intersection.cxx | 8 +- src/IntPolyh/IntPolyh_MaillageAffinage.cxx | 4 +- src/IntPolyh/IntPolyh_Triangle.cxx | 4 +- src/IntTools/IntTools_EdgeFace.cxx | 8 +- src/IntTools/IntTools_FClass2d.cxx | 4 +- src/IntTools/IntTools_FaceFace.cxx | 8 +- src/IntWalk/IntWalk_PWalking.cxx | 10 +- src/Interface/Interface_EntityList.cxx | 12 +- src/Law/Law_BSpline.cxx | 10 +- src/LocOpe/LocOpe_BuildWires.cxx | 10 +- src/LocOpe/LocOpe_Generator.cxx | 10 +- src/LocOpe/LocOpe_LinearForm.cxx | 6 +- src/LocOpe/LocOpe_Prism.cxx | 6 +- src/LocOpe/LocOpe_Revol.cxx | 6 +- src/LocOpe/LocOpe_RevolutionForm.cxx | 6 +- src/LocOpe/LocOpe_SplitDrafts.cxx | 4 +- src/LocOpe/LocOpe_SplitShape.cxx | 14 +- src/MAT/MAT_Graph.cxx | 8 +- src/MeshTest/MeshTest_CheckTopology.cxx | 8 +- src/MeshTest/MeshTest_PluginCommands.cxx | 12 +- src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx | 9 +- src/OpenGl/OpenGl_AspectMarker.cxx | 2 - src/PCDM/PCDM_RetrievalDriver.cxx | 6 +- src/ProjLib/ProjLib_CompProjectedCurve.cxx | 22 +- .../ProjLib_ComputeApproxOnPolarSurface.cxx | 48 +- src/ProjLib/ProjLib_ProjectOnPlane.cxx | 14 +- src/QABugs/QABugs_14.cxx | 4 +- src/QABugs/QABugs_17.cxx | 2 +- src/QANCollection/QANCollection_Handle.cxx | 2 +- .../QANewBRepNaming_BooleanOperationFeat.cxx | 2 - ...faceWithKnotsAndRationalBSplineSurface.cxx | 8 +- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 4 +- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 12 +- src/STEPControl/STEPControl_ActorRead.cxx | 6 +- src/STEPControl/STEPControl_ActorWrite.cxx | 4 +- src/STEPControl/STEPControl_Reader.cxx | 7 +- .../STEPSelections_SelectGSCurves.cxx | 10 +- src/ShapeFix/ShapeFix.cxx | 4 +- src/ShapeFix/ShapeFix_ComposeShell.cxx | 12 +- src/ShapeFix/ShapeFix_Face.cxx | 4 +- src/ShapeFix/ShapeFix_FixSmallSolid.cxx | 10 +- src/ShapeFix/ShapeFix_Shape.cxx | 6 +- src/ShapeFix/ShapeFix_Solid.cxx | 14 +- .../ShapeUpgrade_UnifySameDomain.cxx | 6 +- src/StepData/StepData_Field.cxx | 4 +- src/TNaming/TNaming.cxx | 12 +- src/TNaming/TNaming_Name.cxx | 78 +- src/TNaming/TNaming_Naming.cxx | 38 +- src/TNaming/TNaming_Selector.cxx | 4 +- src/TNaming/TNaming_TranslateTool.cxx | 1 - src/TestTopOpe/TestTopOpe_CORCommands.cxx | 8 +- src/TopOpeBRep/TopOpeBRep_DSFiller.cxx | 18 +- .../TopOpeBRep_EdgesIntersector.cxx | 8 +- src/TopOpeBRep/TopOpeBRep_Hctxee2d.cxx | 8 +- src/TopOpeBRep/TopOpeBRep_kpart.cxx | 4 +- src/TopOpeBRep/TopOpeBRep_vpr.cxx | 6 +- src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx | 8 +- src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx | 20 +- src/TopOpeBRepTool/TopOpeBRepTool_REGUS.cxx | 8 +- src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx | 8 +- src/TopOpeBRepTool/TopOpeBRepTool_closing.cxx | 8 +- .../TopOpeBRepTool_makeTransition.cxx | 8 +- src/V3d/V3d_CircularGrid.cxx | 24 +- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 22 +- .../ViewerTest_RelationCommands.cxx | 36 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 26 +- src/Voxel/Voxel_CollisionDetection.cxx | 4 +- src/Voxel/Voxel_FastConverter.cxx | 26 +- src/Voxel/Voxel_OctBoolDS.cxx | 4 +- src/VrmlData/VrmlData_IndexedFaceSet.cxx | 14 +- .../XCAFDimTolObjects_Tool.cxx | 8 +- src/XCAFDoc/XCAFDoc_DocumentTool.cxx | 6 +- src/XCAFPrs/XCAFPrs_AISObject.cxx | 6 +- src/XDEDRAW/XDEDRAW_GDTs.cxx | 10 +- .../XmlMDataStd_NamedDataDriver.cxx | 4 +- src/math/math_FunctionSetRoot.cxx | 2 +- 186 files changed, 1388 insertions(+), 1472 deletions(-) diff --git a/src/AIS/AIS_AngleDimension.cxx b/src/AIS/AIS_AngleDimension.cxx index cf746fbf89..c07d6121d5 100644 --- a/src/AIS/AIS_AngleDimension.cxx +++ b/src/AIS/AIS_AngleDimension.cxx @@ -852,7 +852,6 @@ Standard_Boolean AIS_AngleDimension::InitTwoEdgesAngle (gp_Pln& theComputedPlane // Compute geometry for this plane and edges Standard_Boolean isInfinite1,isInfinite2; gp_Pnt aFirstPoint1, aLastPoint1, aFirstPoint2, aLastPoint2; - gp_Lin2d aFirstLin2d, aSecondLin2d; if (!AIS::ComputeGeometry (aFirstEdge, aSecondEdge, aFirstLine, aSecondLine, @@ -924,15 +923,15 @@ Standard_Boolean AIS_AngleDimension::InitTwoFacesAngle() TopoDS_Face aSecondFace = TopoDS::Face (mySecondShape); gp_Dir aFirstDir, aSecondDir; - gp_Pln aFirstPlane, aSecondPlane; + gp_Pln aFirstPln, aSecondPln; Handle(Geom_Surface) aFirstBasisSurf, aSecondBasisSurf; AIS_KindOfSurface aFirstSurfType, aSecondSurfType; Standard_Real aFirstOffset, aSecondOffset; - AIS::GetPlaneFromFace (aFirstFace, aFirstPlane, + AIS::GetPlaneFromFace (aFirstFace, aFirstPln, aFirstBasisSurf,aFirstSurfType,aFirstOffset); - AIS::GetPlaneFromFace (aSecondFace, aSecondPlane, + AIS::GetPlaneFromFace (aSecondFace, aSecondPln, aSecondBasisSurf, aSecondSurfType, aSecondOffset); if (aFirstSurfType == AIS_KOS_Plane && aSecondSurfType == AIS_KOS_Plane) @@ -975,15 +974,15 @@ Standard_Boolean AIS_AngleDimension::InitTwoFacesAngle (const gp_Pnt thePointOnF TopoDS_Face aSecondFace = TopoDS::Face (mySecondShape); gp_Dir aFirstDir, aSecondDir; - gp_Pln aFirstPlane, aSecondPlane; + gp_Pln aFirstPln, aSecondPln; Handle(Geom_Surface) aFirstBasisSurf, aSecondBasisSurf; AIS_KindOfSurface aFirstSurfType, aSecondSurfType; Standard_Real aFirstOffset, aSecondOffset; - AIS::GetPlaneFromFace (aFirstFace, aFirstPlane, + AIS::GetPlaneFromFace (aFirstFace, aFirstPln, aFirstBasisSurf,aFirstSurfType,aFirstOffset); - AIS::GetPlaneFromFace (aSecondFace, aSecondPlane, + AIS::GetPlaneFromFace (aSecondFace, aSecondPln, aSecondBasisSurf, aSecondSurfType, aSecondOffset); myFirstPoint = thePointOnFirstFace; diff --git a/src/AIS/AIS_Dimension.cxx b/src/AIS/AIS_Dimension.cxx index feca35f0a3..e235d142b9 100755 --- a/src/AIS/AIS_Dimension.cxx +++ b/src/AIS/AIS_Dimension.cxx @@ -958,7 +958,6 @@ void AIS_Dimension::DrawLinearDimension (const Handle(Prs3d_Presentation)& thePr aPrimSegments->AddVertex (theSecondPoint); aPrimSegments->AddVertex (aLineEndPoint); - Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect(); Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect()); Prs3d_Root::CurrentGroup (thePresentation)->AddPrimitiveArray (aPrimSegments); } diff --git a/src/AIS/AIS_LengthDimension.cxx b/src/AIS/AIS_LengthDimension.cxx index d5566def7d..ebbba29fe8 100755 --- a/src/AIS/AIS_LengthDimension.cxx +++ b/src/AIS/AIS_LengthDimension.cxx @@ -645,10 +645,10 @@ Standard_Boolean AIS_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape& t else if (theSecondShape.ShapeType() == TopAbs_EDGE) { myGeometryType = GeometryType_EdgeVertex; - Standard_Boolean isSuccess = InitEdgeVertexLength (TopoDS::Edge(theSecondShape), - TopoDS::Vertex(theFirstShape), - aDirAttach, - isInfinite); + isSuccess = InitEdgeVertexLength (TopoDS::Edge(theSecondShape), + TopoDS::Vertex(theFirstShape), + aDirAttach, + isInfinite); if (isSuccess) { theComputedPlane = ComputePlane (aDirAttach); diff --git a/src/AppCont/AppCont_LeastSquare.cxx b/src/AppCont/AppCont_LeastSquare.cxx index 813b1c3932..92c18eb1a9 100644 --- a/src/AppCont/AppCont_LeastSquare.cxx +++ b/src/AppCont/AppCont_LeastSquare.cxx @@ -101,7 +101,6 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function& SSP, { myDone = Standard_False; myDegre = Deg; - math_Matrix InvM(1, Deg+1, 1, Deg + 1); Standard_Integer i, j, k, c, i2; Standard_Integer classe = Deg + 1, cl1 = Deg; Standard_Real U, dU, Coeff, Coeff2; diff --git a/src/AppParCurves/AppParCurves_LeastSquare.gxx b/src/AppParCurves/AppParCurves_LeastSquare.gxx index f9093ae576..d21e2765c5 100644 --- a/src/AppParCurves/AppParCurves_LeastSquare.gxx +++ b/src/AppParCurves/AppParCurves_LeastSquare.gxx @@ -430,7 +430,7 @@ void AppParCurves_LeastSquare::Perform(const math_Vector& Parameters) { if (!isready) { return; } - Standard_Integer i, j, k, Ci, Nincx, i2, k1, k2; + Standard_Integer i, j, k, Ci, i2, k1, k2; Standard_Integer nbpol1 = nbpoles-1, Ninc1 = Ninc-1; Standard_Real AD1, A0; // gp_Pnt Pt; @@ -523,7 +523,7 @@ void AppParCurves_LeastSquare::Perform(const math_Vector& Parameters) { // cas de tangence: // =========================================================== - Nincx = resfin-resinit+1; + Standard_Integer Nincx = resfin-resinit+1; Standard_Integer deport = 0, Nincx2 = 2*Nincx; math_IntegerVector InternalIndex(1, Nincx); diff --git a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx index 2a058586ac..ea7771dec5 100644 --- a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx +++ b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx @@ -839,8 +839,8 @@ void BOPAlgo_ArgumentAnalyzer::TestContinuity() aExp.Init(aS, TopAbs_FACE); for (; aExp.More(); aExp.Next()) { const TopoDS_Face& aF = *(TopoDS_Face*)&aExp.Current(); - const Handle(Geom_Surface)& aS = BRep_Tool::Surface(aF); - if (aS->Continuity() == GeomAbs_C0) { + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aF); + if (aSurf->Continuity() == GeomAbs_C0) { aMS.Add(aF); } } diff --git a/src/BOPAlgo/BOPAlgo_BOP.cxx b/src/BOPAlgo/BOPAlgo_BOP.cxx index 18c743ef0b..2d0eb30436 100644 --- a/src/BOPAlgo/BOPAlgo_BOP.cxx +++ b/src/BOPAlgo/BOPAlgo_BOP.cxx @@ -504,7 +504,6 @@ void BOPAlgo_BOP::BuildRC() Standard_Integer aDmin; TopAbs_ShapeEnum aTmin; TopoDS_Compound aC; - TopoDS_Shape aSAIm, aSTIm; BRep_Builder aBB; TopExp_Explorer aExp; BOPCol_DataMapOfShapeShape aDMSSA; @@ -581,9 +580,9 @@ void BOPAlgo_BOP::BuildRC() const BOPCol_ListOfShape& aLT=(!bFlag1) ? myArguments : myTools; aItLS.Initialize(aLT); for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aST=aItLS.Value(); - if (myImages.IsBound(aST)){ - const BOPCol_ListOfShape& aLSTIm=myImages.Find(aST); + const TopoDS_Shape& aTShape =aItLS.Value(); + if (myImages.IsBound(aTShape)){ + const BOPCol_ListOfShape& aLSTIm=myImages.Find(aTShape); aItIm.Initialize(aLSTIm); for (; aItIm.More(); aItIm.Next()) { const TopoDS_Shape& aSTIm=aItIm.Value(); @@ -614,7 +613,7 @@ void BOPAlgo_BOP::BuildRC() } }// if (myImages.IsBound(aST)){ else { - aExp.Init(aST, aTmin); + aExp.Init(aTShape, aTmin); for (; aExp.More(); aExp.Next()) { const TopoDS_Shape aSIm=aExp.Current(); // skip degenerated edges diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx index 0f3492ed00..b513c29099 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx @@ -619,7 +619,6 @@ void BOPAlgo_BuilderFace::PerformAreas() } // if (anUnUsedHoles.Extent()) { - TopoDS_Face aFace; aBB.MakeFace(aFace, aS, aLoc, aTol); aMSH.Add(aFace, anUnUsedHoles); // diff --git a/src/BOPAlgo/BOPAlgo_Builder_2.cxx b/src/BOPAlgo/BOPAlgo_Builder_2.cxx index e28a036846..8127f1c5f6 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_2.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_2.cxx @@ -742,9 +742,9 @@ void BOPAlgo_Builder::FillImagesFaces1() // iFlag=aVFI.Flag(); if (!iFlag) { - TopoDS_Vertex& aVx=aVFI.Vertex(); + TopoDS_Vertex& aVertex=aVFI.Vertex(); TopoDS_Face& aFy=aVFI.Face(); - aBB.Add(aFy, aVx); + aBB.Add(aFy, aVertex); } } } diff --git a/src/BOPAlgo/BOPAlgo_Builder_3.cxx b/src/BOPAlgo/BOPAlgo_Builder_3.cxx index 8570c4c437..57f990b50e 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_3.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_3.cxx @@ -664,7 +664,7 @@ void BOPAlgo_Builder::FillIn3DParts BOPAlgo_FillIn3DParts& aFIP=aVFIP(k); bHasImage=aFIP.HasImage(); const TopoDS_Solid& aSolid=aFIP.Solid(); - const TopoDS_Solid& aSD=aFIP.DraftSolid(); + const TopoDS_Solid& aSDraft =aFIP.DraftSolid(); const BOPCol_ListOfShape& aLFIN=aFIP.LFIN(); const BOPCol_ListOfShape& aLIF=aFIP.LIF(); // @@ -689,7 +689,7 @@ void BOPAlgo_Builder::FillIn3DParts } // if (aNbFIN || bHasImage) { - theDraftSolids.Bind(aSolid, aSD); + theDraftSolids.Bind(aSolid, aSDraft); } } } diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx index 4220a2d2fc..93f9ca925e 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx @@ -450,7 +450,7 @@ void BOPAlgo_PaveFiller::PerformEE() BOPTools_AlgoTools::MakeNewVertex(aE1, aT1, aE2, aT2, aVnew); // <-LXBR { - Standard_Integer nVS[2], iFound, k; + Standard_Integer nVS[2], iFound; Standard_Real aTolVx, aTolVnew, aD2, aDT2; BOPCol_MapOfInteger aMV; gp_Pnt aPnew, aPx; @@ -472,8 +472,8 @@ void BOPAlgo_PaveFiller::PerformEE() aTolVnew=BRep_Tool::Tolerance(aVnew); aPnew=BRep_Tool::Pnt(aVnew); // - for (k=0; k<=j; ++k) { - const TopoDS_Vertex& aVx= *(TopoDS_Vertex*)&(myDS->Shape(nVS[k])); + for (Standard_Integer k1=0; k1<=j; ++k1) { + const TopoDS_Vertex& aVx= *(TopoDS_Vertex*)&(myDS->Shape(nVS[k1])); aTolVx=BRep_Tool::Tolerance(aVx); aPx=BRep_Tool::Pnt(aVx); aD2=aPnew.SquareDistance(aPx); @@ -588,7 +588,6 @@ Standard_Integer BOPAlgo_PaveFiller::PerformVerticesEE // Standard_Integer nVx, iV, j, nE, iFlag, iX, i, aNb; Standard_Real aT; - TopoDS_Shape aV; BOPCol_ListIteratorOfListOfShape aItLS; BOPCol_ListIteratorOfListOfInteger aItLI; BOPDS_ListIteratorOfListOfPaveBlock aItLPB; diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index 7097c7c7d6..4522482dc2 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -1939,7 +1939,7 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC, const BOPCol_ListOfInteger& aFaces = aCB1->Faces(); aIt.Initialize(aLPB); for (; aIt.More(); aIt.Next()) { - const Handle(BOPDS_PaveBlock)& aPB = aIt.Value(); + const Handle(BOPDS_PaveBlock)& aPBValue = aIt.Value(); // aCB = new BOPDS_CommonBlock; aIt1.Initialize(aLPB1); @@ -1948,9 +1948,9 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC, nE = aPB2->OriginalEdge(); // aPB2n = new BOPDS_PaveBlock; - aPB2n->SetPave1(aPB->Pave1()); - aPB2n->SetPave2(aPB->Pave2()); - aPB2n->SetEdge(aPB->Edge()); + aPB2n->SetPave1(aPBValue->Pave1()); + aPB2n->SetPave2(aPBValue->Pave2()); + aPB2n->SetEdge(aPBValue->Edge()); aPB2n->SetOriginalEdge(nE); aCB->AddPaveBlock(aPB2n); myDS->SetCommonBlock(aPB2n, aCB); @@ -1997,8 +1997,8 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC, // aIt.Initialize(aLPB); for (; aIt.More(); aIt.Next()) { - Handle(BOPDS_PaveBlock)& aPB = aIt.ChangeValue(); - const TopoDS_Edge& aE = *(TopoDS_Edge*)&myDS->Shape(aPB->Edge()); + Handle(BOPDS_PaveBlock)& aPBChangeValue = aIt.ChangeValue(); + const TopoDS_Edge& aE = *(TopoDS_Edge*)&myDS->Shape(aPBChangeValue->Edge()); aTolE = BRep_Tool::Tolerance(aE); // IntTools_EdgeFace anEF; @@ -2006,7 +2006,7 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC, anEF.SetFace(aF); anEF.SetTolE(aTolE); anEF.SetTolF(aTolF); - anEF.SetRange(aPB->Pave1().Parameter(), aPB->Pave2().Parameter()); + anEF.SetRange(aPBChangeValue->Pave1().Parameter(), aPBChangeValue->Pave2().Parameter()); anEF.SetContext(myContext); anEF.Perform(); // @@ -2015,15 +2015,15 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC, Standard_Boolean bCoinc = (aCPrts(1).Type() == TopAbs_EDGE); if (bCoinc) { if (bCB) { - aCB = myDS->CommonBlock(aPB); + aCB = myDS->CommonBlock(aPBChangeValue); } else { aCB = new BOPDS_CommonBlock; - aCB->AddPaveBlock(aPB); - myDS->SetCommonBlock(aPB, aCB); + aCB->AddPaveBlock(aPBChangeValue); + myDS->SetCommonBlock(aPBChangeValue, aCB); } aCB->AddFace(nF); // - aMPBIn.Add(aPB); + aMPBIn.Add(aPBChangeValue); } } } diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter.cxx b/src/BOPAlgo/BOPAlgo_WireSplitter.cxx index e79d00590c..7f9765e799 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter.cxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter.cxx @@ -225,7 +225,7 @@ void BOPAlgo_WireSplitter::MakeConnexityBlocks() } // if (bRegular) { - Standard_Integer k, aNbVR, aNbER; + Standard_Integer aNbVR, aNbER; // aNbVR=aMVER.Extent(); for (k=1; k<=aNbVR; ++k) { diff --git a/src/BOPTest/BOPTest_HistoryCommands.cxx b/src/BOPTest/BOPTest_HistoryCommands.cxx index a983e79bc4..1eac5bf865 100644 --- a/src/BOPTest/BOPTest_HistoryCommands.cxx +++ b/src/BOPTest/BOPTest_HistoryCommands.cxx @@ -91,8 +91,8 @@ Standard_Integer bmodified(Draw_Interpretor& di, aBB.MakeCompound(aRes); TopTools_ListIteratorOfListOfShape aIt(aLS); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS = aIt.Value(); - aBB.Add(aRes, aS); + const TopoDS_Shape& aShape = aIt.Value(); + aBB.Add(aRes, aShape); } // DBRep::Set(a[1], aRes); @@ -140,8 +140,8 @@ Standard_Integer bgenerated(Draw_Interpretor& di, aBB.MakeCompound(aRes); TopTools_ListIteratorOfListOfShape aIt(aLS); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS = aIt.Value(); - aBB.Add(aRes, aS); + const TopoDS_Shape& aShape = aIt.Value(); + aBB.Add(aRes, aShape); } // DBRep::Set(a[1], aRes); diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx index 5b1a4052c5..4689af89ae 100644 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx @@ -985,17 +985,17 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv& Solinv(3) = pmin; - math_FunctionSetRoot rsnld(FinvC,toler,30); - rsnld.Perform(FinvC,Solinv,infb,supb); + math_FunctionSetRoot aRsnld(FinvC,toler,30); + aRsnld.Perform(FinvC,Solinv,infb,supb); - if (!rsnld.IsDone()) { + if (!aRsnld.IsDone()) { #ifdef OCCT_DEBUG cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl; #endif } else { // It is necessary to check the value of the function - rsnld.Root(Solinv); + aRsnld.Root(Solinv); recadre = FinvC.IsSolution(Solinv,tolesp); } } diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx index 4a8407c712..8c9b592905 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx @@ -4121,7 +4121,6 @@ void BRepBuilderAPI_Sewing::CreateSewedShape() if (IndexMerged.Contains(i)) continue; TopoDS_Shell shell = TopoDS::Shell(OldShells.FindKey(i)); if (NewShell.IsNull()) { - BRep_Builder aB; aB.MakeShell(NewShell); TopoDS_Iterator aItSS(shell) ; for( ; aItSS.More(); aItSS.Next()) diff --git a/src/BRepCheck/BRepCheck_Analyzer.cxx b/src/BRepCheck/BRepCheck_Analyzer.cxx index da733d9333..d6078c08da 100644 --- a/src/BRepCheck/BRepCheck_Analyzer.cxx +++ b/src/BRepCheck/BRepCheck_Analyzer.cxx @@ -173,12 +173,12 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S) if ( ! myMap(S).IsNull() ) myMap(S)->SetFailStatus(S); - Handle(BRepCheck_Result) aRes = myMap(aVertex); + Handle(BRepCheck_Result) aResOfVertex = myMap(aVertex); - if ( ! aRes.IsNull() ) + if ( !aResOfVertex.IsNull() ) { - aRes->SetFailStatus(aVertex); - aRes->SetFailStatus(S); + aResOfVertex->SetFailStatus(aVertex); + aResOfVertex->SetFailStatus(S); } }//catch(Standard_Failure) }//for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next()) diff --git a/src/BRepCheck/BRepCheck_Edge.cxx b/src/BRepCheck/BRepCheck_Edge.cxx index 937b10c187..63b8c9dbcf 100644 --- a/src/BRepCheck/BRepCheck_Edge.cxx +++ b/src/BRepCheck/BRepCheck_Edge.cxx @@ -616,9 +616,9 @@ BRepCheck_Status BRepCheck_Edge:: { const Standard_Real aParam = aPOnTriag->Parameters()->Value(i); const gp_Pnt aPE(aBC.Value(aParam)), - aPT(Nodes(anIndices(i)).Transformed(aLL)); + aPnt(Nodes(anIndices(i)).Transformed(aLL)); - const Standard_Real aSQDist = aPE.SquareDistance(aPT); + const Standard_Real aSQDist = aPE.SquareDistance(aPnt); if(aSQDist > aTol*aTol) { return BRepCheck_InvalidPolygonOnTriangulation; diff --git a/src/BRepCheck/BRepCheck_Shell.cxx b/src/BRepCheck/BRepCheck_Shell.cxx index 8b87af573f..b39e76b02c 100644 --- a/src/BRepCheck/BRepCheck_Shell.cxx +++ b/src/BRepCheck/BRepCheck_Shell.cxx @@ -598,8 +598,8 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update) } //JR/Hp : - Standard_Integer iorf = MapOfShapeOrientation.Find(Fcur) ; - orf = (TopAbs_Orientation) iorf ; + Standard_Integer anOriFCur = MapOfShapeOrientation.Find(Fcur) ; + orf = (TopAbs_Orientation)anOriFCur; // orf = (TopAbs_Orientation)MapOfShapeOrientation.Find(Fcur); Fcur.Orientation(orf); @@ -757,8 +757,8 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update) } //JR/Hp : - Standard_Integer iorf = MapOfShapeOrientation.Find(Fcur) ; - orf = (TopAbs_Orientation) iorf ; + Standard_Integer anOriFCur = MapOfShapeOrientation.Find(Fcur) ; + orf = (TopAbs_Orientation)anOriFCur; // orf = (TopAbs_Orientation)MapOfShapeOrientation.Find(Fcur); Fcur.Orientation(orf); diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index 3a755870ab..61773dd806 100644 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -1054,13 +1054,13 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Edge& S1, const TopoDS_Face& S TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt); BRepExtrema_ExtPF ExtPF(V1,S2); - const Standard_Integer NbExtrema = ExtPF.IsDone()? ExtPF.NbExt() : 0; - if ( NbExtrema > 0 ) + const Standard_Integer NbExtremaPF = ExtPF.IsDone()? ExtPF.NbExt() : 0; + if (NbExtremaPF > 0 ) { // Search minimum distance Dstmin Standard_Integer ii; Standard_Real Dstmin = ExtPF.SquareDistance(1); - for (ii = 2; ii <= NbExtrema; ii++) + for (ii = 2; ii <= NbExtremaPF; ii++) { const Standard_Real sDst = ExtPF.SquareDistance(ii); if (sDst 0 ) + const Standard_Integer NbExtremaPF = ExtPF.IsDone()? ExtPF.NbExt() : 0; + if (NbExtremaPF > 0 ) { // Search minimum distance Dstmin Standard_Integer ii; Standard_Real Dstmin = ExtPF.SquareDistance(1); - for (ii = 2; ii <= NbExtrema; ii++) + for (ii = 2; ii <= NbExtremaPF; ii++) { const Standard_Real sDst = ExtPF.SquareDistance(ii); if (sDst counter) { - TopTools_ListIteratorOfListOfShape it; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm; TopExp_Explorer EX2(w, TopAbs_EDGE); Standard_Integer ii = 0; @@ -742,7 +740,6 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase, TopoDS_Shape comp; - BRep_Builder BB; BB.MakeShell(TopoDS::Shell(comp)); for(; it.More(); it.Next()) { diff --git a/src/BRepFeat/BRepFeat_MakeRevol.cxx b/src/BRepFeat/BRepFeat_MakeRevol.cxx index f9decdfaae..193b123277 100644 --- a/src/BRepFeat/BRepFeat_MakeRevol.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevol.cxx @@ -279,9 +279,9 @@ void BRepFeat_MakeRevol::Perform(const Standard_Real Angle) } } - TopExp_Explorer exp(mySbase, TopAbs_FACE); - for(; exp.More(); exp.Next()) { - const TopoDS_Face& ff = TopoDS::Face(exp.Current()); + TopExp_Explorer anExp(mySbase, TopAbs_FACE); + for(; anExp.More(); anExp.Next()) { + const TopoDS_Face& ff = TopoDS::Face(anExp.Current()); if(ToFuse(ff, FFace)) { TopTools_DataMapOfShapeListOfShape sl; if(!FFace.IsSame(myPbase) && BRepFeat::IsInside(ff, FFace)) diff --git a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx index 22de2b6021..5844407635 100644 --- a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx @@ -236,8 +236,8 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, if(tol > myTol) myTol = tol; } - TopoDS_Shape aLocalShape = W.Oriented(TopAbs_FORWARD); - myWire = TopoDS::Wire(aLocalShape); + TopoDS_Shape aLocalShapeW = W.Oriented(TopAbs_FORWARD); + myWire = TopoDS::Wire(aLocalShapeW); // myWire = TopoDS::Wire(W.Oriented(TopAbs_FORWARD)); myPln = Plane; myHeight1 = H1; @@ -619,7 +619,6 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, counter++; } else { - Standard_Real f, l; Handle(Geom_Curve) cc = BRep_Tool::Curve(E, f, l); gp_Pnt pf = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True)); gp_Pnt pl = myLastPnt; @@ -755,7 +754,6 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, SlidMap.Clear(); if(Sliding && counter1 > counter) { - TopTools_ListIteratorOfListOfShape it; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm; TopExp_Explorer EX2(w, TopAbs_EDGE); Standard_Integer ii = 0; @@ -846,7 +844,6 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, Handle(Geom2d_Curve) l2d = GeomAPI::To2d(ln, Plane->Pln()); Geom2dAPI_InterCurveCurve intcc(l2d, ln2d, Precision::Confusion()); TopoDS_Vertex VV; VV.Nullify(); - TopoDS_Edge ee1, ee2; if(intcc.NbPoints() > 0) { gp_Pnt2d P = intcc.Point(1); @@ -900,10 +897,10 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, BRepAlgoAPI_Cut c(BndFace, NewBndFace); //modified by NIZNHY-PKV Fri Mar 22 16:52:57 2002 t TopExp_Explorer exp(c.Shape(), TopAbs_WIRE); - const TopoDS_Wire& w = TopoDS::Wire(exp.Current()); + const TopoDS_Wire& aCurWire = TopoDS::Wire(exp.Current()); // akm 13/02/02 : we know the plane. Why not to use it? // BRepLib_MakeFace ff(w); - BRepLib_MakeFace ff(myPln->Pln(), w, Standard_True); + BRepLib_MakeFace ff(myPln->Pln(), aCurWire, Standard_True); NewBndFace = TopoDS::Face(ff.Shape()); } @@ -962,7 +959,6 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase, TopoDS_Shape comp; - BRep_Builder BB; BB.MakeShell(TopoDS::Shell(comp)); for(; it.More(); it.Next()) { @@ -1486,9 +1482,9 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl } for (ex.Init(CurrentFace, TopAbs_EDGE); ex.More(); ex.Next()) { - const TopoDS_Edge& e = TopoDS::Edge(ex.Current()); + const TopoDS_Edge& aCurEdge = TopoDS::Edge(ex.Current()); - BRepExtrema_ExtPC projF(v1, e); + BRepExtrema_ExtPC projF(v1, aCurEdge); if(projF.IsDone() && projF.NbExt() >=1) { Standard_Real dist2min = RealLast(); @@ -1500,8 +1496,8 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl } } if (index != 0) { - if (dist2min <= BRep_Tool::Tolerance(e) * BRep_Tool::Tolerance(e)) { - FirstEdge = e; + if (dist2min <= BRep_Tool::Tolerance(aCurEdge) * BRep_Tool::Tolerance(aCurEdge)) { + FirstEdge = aCurEdge; break; } } @@ -1590,8 +1586,8 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl } for (ex.Init(CurrentFace, TopAbs_EDGE); ex.More(); ex.Next()) { - const TopoDS_Edge& e = TopoDS::Edge(ex.Current()); - BRepExtrema_ExtPC projF(v2, e); + const TopoDS_Edge& aCurEdge = TopoDS::Edge(ex.Current()); + BRepExtrema_ExtPC projF(v2, aCurEdge); if(projF.IsDone() && projF.NbExt() >=1) { Standard_Real dist2min = RealLast(); @@ -1603,8 +1599,8 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl } } if (index != 0) { - if (dist2min <= BRep_Tool::Tolerance(e) * BRep_Tool::Tolerance(e)) { - FirstEdge = e; + if (dist2min <= BRep_Tool::Tolerance(aCurEdge) * BRep_Tool::Tolerance(aCurEdge)) { + FirstEdge = aCurEdge; break; } } diff --git a/src/BRepFeat/BRepFeat_RibSlot.cxx b/src/BRepFeat/BRepFeat_RibSlot.cxx index 6b18c6542b..1c5099fa8e 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.cxx +++ b/src/BRepFeat/BRepFeat_RibSlot.cxx @@ -1087,21 +1087,21 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, TopoDS_Vertex OnVertex; Standard_Real intpar; for(; ex1.More(); ex1.Next()) { - const TopoDS_Face& f = TopoDS::Face(ex1.Current()); + const TopoDS_Face& aCurFace = TopoDS::Face(ex1.Current()); GeomAdaptor_Curve aGAC (curve); - inter.Init (f, aGAC, BRep_Tool::Tolerance(f)); + inter.Init (aCurFace, aGAC, BRep_Tool::Tolerance(aCurFace)); if(!inter.More()) continue; for(; inter.More(); inter.Next()) { gp_Pnt thePoint = inter.Pnt(); if(!FirstVertex.IsNull()) { gp_Pnt point = BRep_Tool::Pnt(FirstVertex); - if(point.Distance(thePoint) <= BRep_Tool::Tolerance(f)) { + if(point.Distance(thePoint) <= BRep_Tool::Tolerance(aCurFace)) { continue; } } intpar = IntPar(curve, thePoint); theEdge = E; - theFace = f; + theFace = aCurFace; B.MakeVertex(theVertex, thePoint, Precision::Confusion()); if(!FirstOK) { if(thePoint.Distance(P2) <= Precision::Confusion()) { @@ -1110,7 +1110,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib, } // ---Find thepoint on an edge or a vertex of face f - PtOnEdgeVertex(RevolRib, f, thePoint, FirstVertex, LastVertex, + PtOnEdgeVertex(RevolRib, aCurFace, thePoint, FirstVertex, LastVertex, PtOnEdge,OnEdge,PtOnVertex,OnVertex); diff --git a/src/BRepFill/BRepFill.cxx b/src/BRepFill/BRepFill.cxx index b616fee0f1..b141b9cc9c 100644 --- a/src/BRepFill/BRepFill.cxx +++ b/src/BRepFill/BRepFill.cxx @@ -816,7 +816,7 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W, Standard_Boolean NewVertex = Standard_False; Standard_Real theparam = 1.e101, angle; TopoDS_Vertex V ; - TopoDS_Edge E, Eref, E1 , E2; + TopoDS_Edge E, Eref; BRep_Builder B; // Class BRep_Tool without fields and without Constructor : // BRep_Tool BT; diff --git a/src/BRepFill/BRepFill_ApproxSeewing.cxx b/src/BRepFill/BRepFill_ApproxSeewing.cxx index d9bae83aeb..c8305f160e 100644 --- a/src/BRepFill/BRepFill_ApproxSeewing.cxx +++ b/src/BRepFill/BRepFill_ApproxSeewing.cxx @@ -72,15 +72,15 @@ void BRepFill_ApproxSeewing::Perform(const BRepFill_MultiLine& ML) Standard_Real Dist, dU = (U2 - U1) / ( 2*NbPoints - 1); TColgp_Array1OfPnt2d LP(1,2*NbPoints); // tableau Longueur <-> Param - gp_Pnt P1, P2; - P1 = myML.Value(U1); + gp_Pnt aPnt1, aPnt2; + aPnt1 = myML.Value(U1); for ( i = 0; i < 2*NbPoints ; i++) { - P2 = myML.Value(U1 + i*dU); - Dist = P1.Distance(P2); + aPnt2 = myML.Value(U1 + i*dU); + Dist = aPnt1.Distance(aPnt2); Length += Dist; LP(i+1) = gp_Pnt2d( Length, U1 + (i*dU)); - P1 = P2; + aPnt1 = aPnt2; } // On cherche a mettre NbPoints dans la curve. @@ -140,11 +140,11 @@ void BRepFill_ApproxSeewing::Perform(const BRepFill_MultiLine& ML) Standard_Real Uf = ML.FirstParameter(); Standard_Real Ul = ML.LastParameter(); - Standard_Real dU = (Ul-Uf)/(NbPoints-1); + Standard_Real dUlf = (Ul-Uf)/(NbPoints-1); AppDef_MultiPointConstraint MPC; for ( i = 1; i<= NbPoints-1; i++) { MPC = MLS.Value(i); - U = Uf + (i-1) * dU; + U = Uf + (i-1) * dUlf; P (i) = MPC.Point(1); P1(i) = MPC.Point2d(2); P2(i) = MPC.Point2d(3); diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 7cb424969d..249c50f994 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -852,7 +852,6 @@ void BRepFill_CompatibleWires:: // initialisation Standard_Integer NbSects=myWork.Length(); BRepTools_WireExplorer anExp; - TopoDS_Vertex V1, V2; Standard_Boolean allClosed = Standard_True; Standard_Integer i,ii,ideb=1,ifin=NbSects; @@ -945,8 +944,6 @@ void BRepFill_CompatibleWires:: if (SeqV.Length()>NbMaxV) Standard_NoSuchObject::Raise("BRepFill::SameNumberByPolarMethod failed"); - // extremity of the first wire - V1 = TopoDS::Vertex(SeqV.Value(1)); // loop on vertices of wire1 for (ii=1;ii<=SeqV.Length();ii++) { @@ -1022,8 +1019,6 @@ void BRepFill_CompatibleWires:: if ( SeqV.Length()>NbMaxV || SeqV.Length()>SizeMap ) Standard_NoSuchObject::Raise("BRepFill::SameNumberByPolarMethod failed"); - // extremity of the first wire - V1 = TopoDS::Vertex(SeqV.Value(1)); // next wire const TopoDS_Wire& wire2 = TopoDS::Wire(myWork(i+1)); @@ -1110,11 +1105,11 @@ void BRepFill_CompatibleWires:: // parse candidate edges Standard_Real scal1,scal2; if ( (V1.IsSame(VVF)&&V2.IsSame(VVL)) || (V2.IsSame(VVF)&&V1.IsSame(VVL)) ) { - Standard_Real U1 = BRep_Tool::Parameter(VVF,E); - Standard_Real U2 = BRep_Tool::Parameter(VVL,E); - BRepAdaptor_Curve Curve(E); - gp_Pnt PP1 = Curve.Value(0.1*(U1+9*U2)); - gp_Pnt PP2 = Curve.Value(0.1*(9*U1+U2)); + Standard_Real U1param = BRep_Tool::Parameter(VVF,E); + Standard_Real U2param = BRep_Tool::Parameter(VVL,E); + BRepAdaptor_Curve CurveE(E); + gp_Pnt PP1 = CurveE.Value(0.1*(U1param +9* U2param)); + gp_Pnt PP2 = CurveE.Value(0.1*(9* U1param + U2param)); for (rang=i;rang>ideb;rang--) { Transform(WithRotation, PP1, @@ -1518,12 +1513,12 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ ) gp_Vec NormalOfFirstPlane = FirstPlane.Axis().Direction(); for (i = ideb+1; i <= ifin; i++) { - const TopoDS_Wire& wire = TopoDS::Wire(myWork(i)); + const TopoDS_Wire& aWire = TopoDS::Wire(myWork(i)); //Compute offset vector as current bary center projected on first plane //to first bary center gp_Pln CurPlane; - PlaneOfWire(wire, CurPlane); + PlaneOfWire(aWire, CurPlane); gp_Pnt CurBary = CurPlane.Location(); gp_Vec aVec(FirstBary, CurBary); gp_Vec anOffsetProj = (aVec * NormalOfFirstPlane) * NormalOfFirstPlane; @@ -1535,7 +1530,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ ) BB.MakeWire(newwire); TopTools_SequenceOfShape SeqVertices, SeqEdges; - for (anExp.Init(wire); anExp.More(); anExp.Next()) + for (anExp.Init(aWire); anExp.More(); anExp.Next()) { SeqVertices.Append( anExp.CurrentVertex() ); SeqEdges.Append( anExp.Current() ); diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index 1dc613c12d..282c818716 100644 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -502,8 +502,8 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine, // 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(); - B.Add(TopoDS::Wire(aLocalShape)); + TopoDS_Shape aLocalShapeRev = SpineExp.Current().Reversed(); + B.Add(TopoDS::Wire(aLocalShapeRev)); // B.Add(TopoDS::Wire(SpineExp.Current().Reversed())); Face = B.Face(); BRepMAT2d_Explorer Exp(Face); @@ -750,8 +750,6 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, } #endif - TopoDS_Vertex VF,VL; - //--------------------------------------------------- // Construction of edges associated to bissectrices. //--------------------------------------------------- @@ -1109,14 +1107,14 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, //------------------------------------------------------------ // No connected face in the volevo => no parallel edge. //------------------------------------------------------------ - TopTools_SequenceOfShape S; + TopTools_SequenceOfShape aSeqOfShape; TrimEdge (CurrentEdge, MapBis (FaceControle), MapBis (CurrentEdge) , - MapVerPar(CurrentEdge) , S); + MapVerPar(CurrentEdge) , aSeqOfShape); - for ( k = 1; k <= S.Length(); k++) { - myMap(CurrentSpine)(VCF).Append(S.Value(k)); + for ( k = 1; k <= aSeqOfShape.Length(); k++) { + myMap(CurrentSpine)(VCF).Append(aSeqOfShape.Value(k)); #ifdef DRAW if (AffichEdge) { @@ -1147,14 +1145,14 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, // 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; + TopTools_SequenceOfShape aSeqOfShape; TrimEdge (CurrentEdge, MapBis (FaceControle), MapBis (CurrentEdge) , - MapVerPar(CurrentEdge) , S); + MapVerPar(CurrentEdge) , aSeqOfShape); - for ( k = 1; k <= S.Length(); k++) { - myMap(CurrentSpine)(VCL).Append(S.Value(k)); + for ( k = 1; k <= aSeqOfShape.Length(); k++) { + myMap(CurrentSpine)(VCL).Append(aSeqOfShape.Value(k)); #ifdef DRAW if (AffichEdge) { @@ -1214,13 +1212,13 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, } //Cut of the face. - TopTools_SequenceOfShape S; + TopTools_SequenceOfShape aSeqOfShape; - TrimFace (CurrentFace, MapBis(CurrentFace), S); + TrimFace (CurrentFace, MapBis(CurrentFace), aSeqOfShape); - for (Standard_Integer ii = 1; ii <= S.Length(); ii++) { - myBuilder.Add (myShape,S.Value(ii)); - myMap(CurrentSpine)(CurrentProf).Append(S.Value(ii)); + for (Standard_Integer ii = 1; ii <= aSeqOfShape.Length(); ii++) { + myBuilder.Add (myShape, aSeqOfShape.Value(ii)); + myMap(CurrentSpine)(CurrentProf).Append(aSeqOfShape.Value(ii)); } } } @@ -1260,8 +1258,8 @@ void BRepFill_Evolved::PlanarPerform (const TopoDS_Face& Sp, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join) { - TopoDS_Shape aLocalShape = Sp.Oriented(TopAbs_FORWARD); - mySpine = TopoDS::Face(aLocalShape); + TopoDS_Shape aLocalShapeOriented = Sp.Oriented(TopAbs_FORWARD); + mySpine = TopoDS::Face(aLocalShapeOriented); // mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD)); myProfile = Pr; myMap.Clear(); @@ -1271,7 +1269,6 @@ void BRepFill_Evolved::PlanarPerform (const TopoDS_Face& Sp, BRepTools_WireExplorer ProfExp; TopExp_Explorer Exp,exp1,exp2; - TopoDS_Shape Rest; TopTools_DataMapOfShapeListOfShape EmptyMap; TopTools_ListOfShape EmptyList; TopTools_DataMapOfShapeShape MapVP; @@ -1436,8 +1433,8 @@ void BRepFill_Evolved::VerticalPerform (const TopoDS_Face& Sp, // MAJ myMap for (Exp.Init(Base,TopAbs_EDGE); Exp.More(); Exp.Next()) { - const TopoDS_Edge& E = TopoDS::Edge(Exp.Current()); - const TopoDS_Shape& AE = OffAnc.Ancestor(E); + const TopoDS_Edge& anEdge = TopoDS::Edge(Exp.Current()); + const TopoDS_Shape& AE = OffAnc.Ancestor(anEdge); if (!myMap.IsBound(AE)) { myMap.Bind(AE,EmptyMap); } @@ -1445,7 +1442,7 @@ void BRepFill_Evolved::VerticalPerform (const TopoDS_Face& Sp, TopTools_ListOfShape L; myMap(AE).Bind(V1,L); } - myMap(AE)(V1).Append(E); + myMap(AE)(V1).Append(anEdge); } First = Standard_False; } @@ -2116,7 +2113,7 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue) Loop.Perform(); Loop.WiresToFaces(); const TopTools_ListOfShape& L = Loop.NewFaces(); - TopTools_ListIteratorOfListOfShape itL(L); + TopTools_ListIteratorOfListOfShape anIterL(L); // Maj of myTop and myBottom for the history // and addition of constructed faces. @@ -2125,12 +2122,12 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue) B.MakeCompound(Bouchon); Standard_Integer j = 0; - for (itL.Initialize(L); itL.More(); itL.Next()) { + for (anIterL.Initialize(L); anIterL.More(); anIterL.Next()) { j++; - Glue.Add(itL.Value()); - if (j ==1 && i == 0) myTop = itL.Value(); - if (j ==1 && i == 1) myBottom = itL.Value(); - B.Add(Bouchon,itL.Value()); + Glue.Add(anIterL.Value()); + if (j ==1 && i == 0) myTop = anIterL.Value(); + if (j ==1 && i == 1) myBottom = anIterL.Value(); + B.Add(Bouchon,anIterL.Value()); } if (i == 0 && j > 1) myTop = Bouchon; if (i == 1 && j > 1) myBottom = Bouchon; diff --git a/src/BRepFill/BRepFill_Filling.cxx b/src/BRepFill/BRepFill_Filling.cxx index cb4f5b5464..d0be7823cd 100644 --- a/src/BRepFill/BRepFill_Filling.cxx +++ b/src/BRepFill/BRepFill_Filling.cxx @@ -386,8 +386,6 @@ void BRepFill_Filling::AddConstraints( const BRepFill_SequenceOfEdgeFaceAndOrder //====================================================================== void BRepFill_Filling::BuildWires( TopTools_ListOfShape& EdgeList, TopTools_ListOfShape& WireList ) { - TopoDS_Wire CurWire; - TopoDS_Edge CurEdge; TopTools_ListIteratorOfListOfShape Itl; Standard_Integer i, j; diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index 53fa242e05..6e70529a99 100644 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -251,8 +251,8 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, pos = AdC.Line().Location(); dist = AdC.Value(first2).Distance(AdC.Value(last2)); gp_Vec vec(AdC.Value(first2),AdC.Value(last2)); - gp_Dir dir(vec); - axe = gp_Ax1(AdC.Value(first2),dir); + gp_Dir aDir(vec); + axe = gp_Ax1(AdC.Value(first2), aDir); if (axe.IsParallel(axe1,Precision::Angular())) { // parallel straight line if (Abs(dist-dist1)BasisCurve()->IsKind(STANDARD_TYPE(Geom_Conic))) { - const Handle(Geom_Curve)& aCurve = aTrimCurve; // to avoid ambiguity - GeomConvert_ApproxCurve anAppr (aCurve, Precision::Confusion(), GeomAbs_C1, 16, 14); + const Handle(Geom_Curve)& aCurveTemp = aTrimCurve; // to avoid ambiguity + GeomConvert_ApproxCurve anAppr (aCurveTemp, Precision::Confusion(), GeomAbs_C1, 16, 14); if (anAppr.HasResult()) aBSCurve = anAppr.Curve(); } diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index 7aaf944a23..adeb3959c6 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -725,8 +725,8 @@ void BRepFill_OffsetWire::PerformWithBiLo const Standard_Real Alt) { myIsDone = Standard_False; - TopoDS_Shape aLocalShape = Spine.Oriented(TopAbs_FORWARD); - myWorkSpine = TopoDS::Face(aLocalShape); + TopoDS_Shape aLocalShapeWork = Spine.Oriented(TopAbs_FORWARD); + myWorkSpine = TopoDS::Face(aLocalShapeWork); // myWorkSpine = TopoDS::Face(Spine.Oriented(TopAbs_FORWARD)); myJoinType = Join; myOffset = Offset ; @@ -1042,7 +1042,7 @@ void BRepFill_OffsetWire::PerformWithBiLo myMap(j).Clear(); if (MapBis.IsBound(CurrentEdge)) { - TopTools_SequenceOfShape S; + TopTools_SequenceOfShape aSeqOfShape; if (!MapBis(CurrentEdge).IsEmpty()) { Standard_Integer IndOfE = 0; if (myIsOpenResult) @@ -1058,9 +1058,9 @@ void BRepFill_OffsetWire::PerformWithBiLo Detromp (CurrentSpine), MapBis (CurrentEdge) , MapVerPar(CurrentEdge) , - S, MapVV, IndOfE); - for ( k = 1; k <= S.Length(); k++) { - myMap(j).Append(S.Value(k)); + aSeqOfShape, MapVV, IndOfE); + for ( k = 1; k <= aSeqOfShape.Length(); k++) { + myMap(j).Append(aSeqOfShape.Value(k)); } } else { @@ -1123,15 +1123,15 @@ void BRepFill_OffsetWire::PerformWithBiLo TopExp_Explorer Explo( myShape, TopAbs_EDGE ); for (; Explo.More(); Explo.Next()) { - TopoDS_Edge E = TopoDS::Edge( Explo.Current() ); + TopoDS_Edge anEdge = TopoDS::Edge( Explo.Current() ); TopoDS_Vertex V1, V2; - TopExp::Vertices( E, V1, V2 ); + TopExp::Vertices(anEdge, V1, V2 ); Handle(BRep_TVertex)& TV1 = *((Handle(BRep_TVertex)*) &(V1).TShape()); Handle(BRep_TVertex)& TV2 = *((Handle(BRep_TVertex)*) &(V2).TShape()); TopLoc_Location loc; Standard_Real f, l; - Handle( Geom_Curve ) theCurve = BRep_Tool::Curve( E, loc, f, l ); + Handle( Geom_Curve ) theCurve = BRep_Tool::Curve(anEdge, loc, f, l ); theCurve = Handle( Geom_Curve )::DownCast( theCurve->Copy() ); theCurve->Transform( loc.Transformation() ); gp_Pnt f3d = theCurve->Value( f ); @@ -1531,7 +1531,6 @@ void BRepFill_OffsetWire::FixHoles() TopTools_SequenceOfShape ClosedWires, UnclosedWires, IsolatedWires; Standard_Real MaxTol = 0.; - Standard_Integer i; BRep_Builder BB; TopExp_Explorer Explo( mySpine, TopAbs_VERTEX ); @@ -1807,6 +1806,7 @@ void BRepFill_OffsetWire::FixHoles() { TopoDS_Compound R; BB.MakeCompound( R ); + Standard_Integer i; for (i = 1; i <= ClosedWires.Length(); i++) BB.Add( R, ClosedWires(i) ); for (i = 1; i <= IsolatedWires.Length(); i++) diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index 34607d618d..6f486fcca0 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -2303,12 +2303,12 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, exuv = ExchUV(isec, ipath); S->Bounds(UFirst, ULast, VFirst, VLast); if (UReverse(isec, ipath)) { - Standard_Real aux; + Standard_Real aux2; if (exuv) { - aux = VFirst; VFirst = VLast; VLast = aux; + aux2 = VFirst; VFirst = VLast; VLast = aux2; } else { - aux = UFirst; UFirst = ULast; ULast = aux; + aux2 = UFirst; UFirst = ULast; ULast = aux2; } } @@ -2617,7 +2617,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //(4.2) // General case => Tweezers Standard_Boolean isG1; TopoDS_Face FF; - TopoDS_Edge E; + TopoDS_Edge anEdge; for (isec=1; isec <= NbLaw+1; isec++) { if (isec>1) isG1 = @@ -2646,8 +2646,8 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, if (isG1) { if (ipath==NbPath+1) FF = TopoDS::Face(myFaces->Value(isec, 1)); else FF = TopoDS::Face(myFaces->Value(isec, IPath)); - E = TopoDS::Edge(myVEdges->Value(isec, IPath)); - BRepLib::EncodeRegularity(E, FF, + anEdge = TopoDS::Edge(myVEdges->Value(isec, IPath)); + BRepLib::EncodeRegularity(anEdge, FF, TopoDS::Face(myFaces->Value(isec, IPath-1)), myTolAngular); } diff --git a/src/BRepFill/BRepFill_TrimShellCorner.cxx b/src/BRepFill/BRepFill_TrimShellCorner.cxx index bf61029b33..6f6d84bb86 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.cxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.cxx @@ -329,7 +329,7 @@ void BRepFill_TrimShellCorner::Perform() // BOPDS_VectorOfPoint& aVP=aFFi.ChangePoints(); aNbP=aVP.Extent(); - BOPDS_VectorOfCurve& aVC=aFFi.ChangeCurves(); + const BOPDS_VectorOfCurve& aVC=aFFi.Curves(); aNbC=aVC.Extent(); if (!aNbP && !aNbC) { if (!theDS->HasInterfSubShapes(nF1, nF2)) { @@ -338,7 +338,6 @@ void BRepFill_TrimShellCorner::Perform() } // if((nF1 == anIndex1) && (nF2 == anIndex2)) { - const BOPDS_VectorOfCurve& aVC = aFFi.Curves(); bhassec = Standard_False; // for (j = 0; j < aNbC; ++j) { diff --git a/src/BRepMesh/BRepMesh_Delaun.cxx b/src/BRepMesh/BRepMesh_Delaun.cxx index 31073ae771..6f43de69f0 100644 --- a/src/BRepMesh/BRepMesh_Delaun.cxx +++ b/src/BRepMesh/BRepMesh_Delaun.cxx @@ -362,16 +362,16 @@ void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIn Standard_Boolean isSensOK = (aDist12 > 0. && aDist23 > 0.); if (isSensOK) { - Standard_Integer anEdges[3]; + Standard_Integer anEdgeIds[3]; Standard_Boolean anEdgesOri[3]; for ( Standard_Integer aTriLinkIt = 0; aTriLinkIt < 3; ++aTriLinkIt ) { const Standard_Integer& anEdgeInfo = anEdgesInfo[aTriLinkIt]; - anEdges[aTriLinkIt] = Abs( anEdgeInfo ); + anEdgeIds[aTriLinkIt] = Abs( anEdgeInfo ); anEdgesOri[aTriLinkIt] = anEdgeInfo > 0; } - addTriangle( anEdges, anEdgesOri, aNodes ); + addTriangle(anEdgeIds, anEdgesOri, aNodes ); } else { diff --git a/src/BRepMesh/BRepMesh_EdgeTessellator.cxx b/src/BRepMesh/BRepMesh_EdgeTessellator.cxx index da06a66e93..679ddc4ef2 100644 --- a/src/BRepMesh/BRepMesh_EdgeTessellator.cxx +++ b/src/BRepMesh/BRepMesh_EdgeTessellator.cxx @@ -59,7 +59,6 @@ BRepMesh_EdgeTessellator::BRepMesh_EdgeTessellator( else myCOnS.Initialize(theEdge, theFaceAttribute->Face()); - TopLoc_Location aLoc; const GeomAbs_CurveType aCurveType = myCOnS.GetType(); Standard_Integer aMinPntNb = (aCurveType == GeomAbs_Circle) ? 4 : 2; //OCC287 diff --git a/src/BRepOffset/BRepOffset_Inter3d.cxx b/src/BRepOffset/BRepOffset_Inter3d.cxx index 627baf4002..6a7b95859b 100644 --- a/src/BRepOffset/BRepOffset_Inter3d.cxx +++ b/src/BRepOffset/BRepOffset_Inter3d.cxx @@ -214,7 +214,7 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces, // Calculate the intersections of offset faces // Distinction of intersection between faces // tangents. //--------------------------------------------------------------- - TopoDS_Face F1,F2; + TopoDS_Face F2; TopTools_ListIteratorOfListOfShape it; //--------------------------------------------------------------- @@ -591,7 +591,6 @@ void BRepOffset_Inter3d::ContextIntByInt TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed) { - TopTools_ListOfShape LInt1,LInt2; TopTools_MapOfShape MV; TopExp_Explorer exp; TopoDS_Face OF,NF,WCF; @@ -845,11 +844,11 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& Conte // LInt1,LInt2); LInt1.Clear(); LInt1.Append(OE); LInt2.Clear(); - TopAbs_Orientation O1,O2; - BRepOffset_Tool::OrientSection(OE,CF,OF1,O1,O2); + TopAbs_Orientation anOri1, anOri2; + BRepOffset_Tool::OrientSection(OE,CF,OF1, anOri1,anOri2); // if (mySide == TopAbs_OUT); - O1 = TopAbs::Reverse(O1); - LInt1.First().Orientation(O1); + anOri1 = TopAbs::Reverse(anOri1); + LInt1.First().Orientation(anOri1); Store(CF,OF1,LInt1,LInt2); } } diff --git a/src/BRepOffset/BRepOffset_MakeLoops.cxx b/src/BRepOffset/BRepOffset_MakeLoops.cxx index 09d7894a1e..fac1255852 100644 --- a/src/BRepOffset/BRepOffset_MakeLoops.cxx +++ b/src/BRepOffset/BRepOffset_MakeLoops.cxx @@ -217,8 +217,8 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext // 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)); + TopoDS_Shape aReversedF = F.Reversed(); + if (InSide) Loops.Init(TopoDS::Face(aReversedF)); // if (InSide) Loops.Init(TopoDS::Face(F.Reversed())); else Loops.Init(F); //-------------------------------------------------------- @@ -232,9 +232,9 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext if (Analyse.HasAncestor(CE)) { // the stop of cups except for the connectivity stops between caps. // if (!AsDes->HasAscendant(CE)) { - aLocalShape = CE.Reversed(); + TopoDS_Shape aReversedE = CE.Reversed(); if (InSide) Loops.AddConstEdge(CE); - else Loops.AddConstEdge(TopoDS::Edge(aLocalShape)); + else Loops.AddConstEdge(TopoDS::Edge(aReversedE)); // else Loops.AddConstEdge(TopoDS::Edge(CE.Reversed())); } } @@ -263,8 +263,8 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext if (InSide) Loops.AddConstEdge(TopoDS::Edge(CE)); else { - TopoDS_Shape aLocalShape = CE.Reversed(); - Loops.AddConstEdge(TopoDS::Edge(aLocalShape)); + TopoDS_Shape aReversedE = CE.Reversed(); + Loops.AddConstEdge(TopoDS::Edge(aReversedE)); } // else Loops.AddConstEdge(TopoDS::Edge(CE.Reversed())); } diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index 15b64e83f2..d6e012b0d8 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -1147,9 +1147,9 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() const TopoDS_Shape& FI = Exp.Current(); const TopoDS_Shape& OFI = MapSF(FI).Face(); if (MES.IsBound(OFI)) { - const TopoDS_Face& NF = TopoDS::Face(MES(OFI)); - LFE.Append(NF); - IMOE.SetRoot(NF); + const TopoDS_Face& aLocalFace = TopoDS::Face(MES(OFI)); + LFE.Append(aLocalFace); + IMOE.SetRoot(aLocalFace); } } @@ -1499,10 +1499,10 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() Standard_Real CurOffset = myOffset; if ( myFaceOffset.IsBound(Anc.First())) CurOffset = myFaceOffset(Anc.First()); - TopoDS_Shape aLocalShape = MapSF(Anc.First()).Generated(E); - TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShape); - aLocalShape = MapSF(Anc.Last()).Generated(E); - TopoDS_Edge EOn2 = TopoDS::Edge(aLocalShape); + TopoDS_Shape aLocalShapeGen = MapSF(Anc.First()).Generated(E); + TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShapeGen); + aLocalShapeGen = MapSF(Anc.Last()).Generated(E); + TopoDS_Edge EOn2 = TopoDS::Edge(aLocalShapeGen); // TopoDS_Edge EOn1 = TopoDS::Edge(MapSF(Anc.First()).Generated(E)); // TopoDS_Edge EOn2 = TopoDS::Edge(MapSF(Anc.Last()) .Generated(E)); // find if exits tangent edges in the original shape @@ -3312,7 +3312,7 @@ void BRepOffset_MakeOffset::EncodeRegularity () } else if ( Type1 == TopAbs_EDGE && Type2 == TopAbs_EDGE) { TopTools_ListOfShape LV; - TopExp_Explorer exp1,exp2; + TopExp_Explorer exp1; for (exp1.Init(Root1,TopAbs_VERTEX); exp1.More(); exp1.Next()) { TopExp_Explorer exp2(F2,TopAbs_EDGE); for (exp2.Init(Root2,TopAbs_VERTEX); exp2.More(); exp2.Next()) { diff --git a/src/BRepOffset/BRepOffset_Offset.cxx b/src/BRepOffset/BRepOffset_Offset.cxx index 878b30aec9..5c7d9889d7 100644 --- a/src/BRepOffset/BRepOffset_Offset.cxx +++ b/src/BRepOffset/BRepOffset_Offset.cxx @@ -574,7 +574,7 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face, { const Standard_Real TolApex = 1.e-5; //define the iso of singularity (u or v) - const TopoDS_Edge& theDegEdge = TopoDS::Edge(DegEdges(1)); + TopoDS_Edge theDegEdge = TopoDS::Edge(DegEdges(1)); Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface(theDegEdge, Face, fpar, lpar); gp_Pnt2d fp2d = aCurve->Value(fpar); gp_Pnt2d lp2d = aCurve->Value(lpar); @@ -590,8 +590,6 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face, } else //DegEdges.Length() == 1 { - const TopoDS_Edge& theDegEdge = TopoDS::Edge(DegEdges(1)); - Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface(theDegEdge, Face, fpar, lpar); if (UisoDegen) { if (Abs(fp2d.X() - uf1) <= Precision::Confusion()) @@ -804,8 +802,8 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face, TopTools_DataMapOfShapeShape MapSS; // mise a jour de la map sur les vertex deja crees - TopoDS_Shape aLocalShape = Face.Oriented(TopAbs_FORWARD); - TopoDS_Face CurFace = TopoDS::Face(aLocalShape); + TopoDS_Shape aLocalShapeOriented = Face.Oriented(TopAbs_FORWARD); + TopoDS_Face CurFace = TopoDS::Face(aLocalShapeOriented); // TopoDS_Face CurFace = TopoDS::Face(Face.Oriented(TopAbs_FORWARD)); TopTools_MapOfShape VonDegen; @@ -970,9 +968,9 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face, myBuilder.Range(OE, myFace, f, l); if (!BRep_Tool::Degenerated(E) && TheSurf->IsUClosed()) { - TopoDS_Shape aLocalShape = E.Reversed(); + TopoDS_Shape aLocalShapeReversedE = E.Reversed(); Handle(Geom2d_Curve) C2d_1 = - BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShape),CurFace,f,l); + BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShapeReversedE),CurFace,f,l); P2d1 = C2d_1->Value(BRep_Tool::Parameter(V1,E,CurFace)); P2d2 = C2d_1->Value(BRep_Tool::Parameter(V2,E,CurFace)); if (VonDegen.Contains(V1)) diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 4ddb3c2bd0..638b476ae6 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -725,7 +725,6 @@ void BRepOffset_Tool::PipeInter(const TopoDS_Face& F1, #endif Handle (Geom_Curve) CI; - TopoDS_Edge E; TopAbs_Orientation O1,O2; L1.Clear(); L2.Clear(); BRep_Builder B; @@ -1783,7 +1782,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1, for (i = 1; i <= wseq.Length(); i++) { TopoDS_Wire aWire = TopoDS::Wire(wseq(i)); - TopTools_SequenceOfShape EdgesForConcat; + TopTools_SequenceOfShape aLocalEdgesForConcat; if (aWire.Closed()) { TopoDS_Vertex StartVertex; @@ -1826,7 +1825,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1, TopExp::Vertices( StartEdge, V1, V2 ); StartVertex = V1; } - EdgesForConcat.Append( StartEdge ); + aLocalEdgesForConcat.Append( StartEdge ); while (!Elist.IsEmpty()) { for (itl.Initialize(Elist); itl.More(); itl.Next()) @@ -1837,29 +1836,29 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1, if (V1.IsSame(StartVertex)) { StartVertex = V2; - EdgesForConcat.Append( anEdge ); + aLocalEdgesForConcat.Append( anEdge ); Elist.Remove(itl); break; } else if (V2.IsSame(StartVertex)) { StartVertex = V1; - EdgesForConcat.Append( anEdge ); + aLocalEdgesForConcat.Append( anEdge ); Elist.Remove(itl); break; } } } //end of while (!Elist.IsEmpty()) } //end of if (aWire.Closed()) - else + else { BRepTools_WireExplorer Wexp( aWire ); for (; Wexp.More(); Wexp.Next()) - EdgesForConcat.Append( Wexp.Current() ); + aLocalEdgesForConcat.Append( Wexp.Current() ); } TopoDS_Edge theEdge = - AssembleEdge( pDS, cpF1, cpF2, addPCurve1, addPCurve2, EdgesForConcat ); + AssembleEdge( pDS, cpF1, cpF2, addPCurve1, addPCurve2, aLocalEdgesForConcat ); eseq.Append( theEdge ); } } //end of else (when TrueEdges is empty) @@ -2006,7 +2005,6 @@ void BRepOffset_Tool::InterOrExtent(const TopoDS_Face& F1, #endif Handle (Geom_Curve) CI; - TopoDS_Edge E; TopAbs_Orientation O1,O2; L1.Clear(); L2.Clear(); Handle (Geom_Surface) S1 = BRep_Tool::Surface(F1); @@ -2291,9 +2289,9 @@ void BRepOffset_Tool::Inter2d (const TopoDS_Face& F, while (!YaSol && itry < 2) { for ( Standard_Integer i = 1; i <= NbPC1 ; i++) { - TopoDS_Shape aLocalEdge = E1.Reversed(); + TopoDS_Shape aLocalEdgeReversedE1 = E1.Reversed(); if (i == 1) C1 = BRep_Tool::CurveOnSurface(E1,F,fl1[0],fl1[1]); - else C1 = BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalEdge), + else C1 = BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalEdgeReversedE1), F,fl1[0],fl1[1]); // if (i == 1) C1 = BRep_Tool::CurveOnSurface(E1,F,fl1[0],fl1[1]); // else C1 = BRep_Tool::CurveOnSurface(TopoDS::Edge(E1.Reversed()), @@ -2437,10 +2435,10 @@ void BRepOffset_Tool::Inter2d (const TopoDS_Face& F, gp_Pnt P = S->Value(P2d.X(),P2d.Y()); TopoDS_Vertex V = BRepLib_MakeVertex(P); V.Orientation(TopAbs_INTERNAL); - TopoDS_Shape aLocalEdge = E1.Oriented(TopAbs_FORWARD); - B.UpdateVertex(V,U1,TopoDS::Edge(aLocalEdge),TolConf); - aLocalEdge = E2.Oriented(TopAbs_FORWARD); - B.UpdateVertex(V,U2,TopoDS::Edge(aLocalEdge),TolConf); + TopoDS_Shape aLocalEdgeOrientedE1 = E1.Oriented(TopAbs_FORWARD); + B.UpdateVertex(V,U1,TopoDS::Edge(aLocalEdgeOrientedE1),TolConf); + aLocalEdgeOrientedE1 = E2.Oriented(TopAbs_FORWARD); + B.UpdateVertex(V,U2,TopoDS::Edge(aLocalEdgeOrientedE1),TolConf); // B.UpdateVertex(V,U1,TopoDS::Edge(E1.Oriented(TopAbs_FORWARD)),TolConf); // B.UpdateVertex(V,U2,TopoDS::Edge(E2.Oriented(TopAbs_FORWARD)),TolConf); LV.Append(V); @@ -3502,9 +3500,9 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F, BRep_Tool::Range(Ecs,f,l); } if (BRep_Tool::IsClosed(CE,Fforward)) { - TopoDS_Shape aLocalShape = CE.Reversed(); + TopoDS_Shape aLocalShapeReversedCE = CE.Reversed(); Handle(Geom2d_Curve) C2R = - BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShape),Fforward,f,l); + BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShapeReversedCE),Fforward,f,l); // Handle(Geom2d_Curve) C2R = // BRep_Tool::CurveOnSurface(TopoDS::Edge(CE.Reversed()),F,f,l); B.UpdateEdge (CE,C2,C2R,EF,BRep_Tool::Tolerance(CE)); @@ -3763,15 +3761,14 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F, NV1 = TopoDS::Vertex(ConstShapes(V1)); NV2 = TopoDS::Vertex(ConstShapes(V2)); - TopoDS_Shape aLocalVertex = NV1.Oriented(TopAbs_INTERNAL); + TopoDS_Shape aLocalVertexOrientedNV1 = NV1.Oriented(TopAbs_INTERNAL); TopoDS_Shape aLocalEdge = NE.Oriented(TopAbs_INTERNAL); - U1 = BRep_Tool::Parameter(TopoDS::Vertex(aLocalVertex), + U1 = BRep_Tool::Parameter(TopoDS::Vertex(aLocalVertexOrientedNV1), TopoDS::Edge (aLocalEdge)); - aLocalVertex = NV2.Oriented(TopAbs_INTERNAL); + aLocalVertexOrientedNV1 = NV2.Oriented(TopAbs_INTERNAL); aLocalEdge = NE.Oriented(TopAbs_FORWARD); - U2 = BRep_Tool::Parameter - (TopoDS::Vertex(aLocalVertex),TopoDS::Edge (aLocalEdge)); + U2 = BRep_Tool::Parameter (TopoDS::Vertex(aLocalVertexOrientedNV1),TopoDS::Edge (aLocalEdge)); // U1 = BRep_Tool::Parameter // (TopoDS::Vertex(NV1.Oriented(TopAbs_INTERNAL)), // TopoDS::Edge (NE .Oriented(TopAbs_FORWARD))); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx index b76abe2390..0bdea46c94 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx @@ -718,10 +718,10 @@ void BRepOffsetAPI_DraftAngle::CorrectWires() if (Abs(fpar-Seq2(j)) <= Precision::Confusion()) break; NewE.Orientation( TopAbs_FORWARD ); - TopoDS_Shape aLocalShape = SeqVer(j).Oriented(TopAbs_FORWARD); - BB.Add( NewE, TopoDS::Vertex( aLocalShape ) ); - aLocalShape = SeqVer(j+1).Oriented(TopAbs_REVERSED); - BB.Add( NewE, TopoDS::Vertex( aLocalShape ) ); + TopoDS_Shape aLocalShapeCur = SeqVer(j).Oriented(TopAbs_FORWARD); + BB.Add( NewE, TopoDS::Vertex( aLocalShapeCur) ); + aLocalShapeCur = SeqVer(j+1).Oriented(TopAbs_REVERSED); + BB.Add( NewE, TopoDS::Vertex( aLocalShapeCur ) ); //BB.Add( NewE, TopoDS::Vertex( SeqVer(j).Oriented(TopAbs_FORWARD) ) ); //BB.Add( NewE, TopoDS::Vertex( SeqVer(j+1).Oriented(TopAbs_REVERSED) ) ); NewEdges.Append( NewE ); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index 31343836e9..18038cde0e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -804,7 +804,6 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() if (vClosed) { TopoDS_Solid solid; - BRep_Builder B; B.MakeSolid(solid); B.Add(solid, shell); @@ -889,8 +888,8 @@ static Handle(Geom_BSplineCurve) EdgeToBSpline (const TopoDS_Edge& theEdge) // special treatment of conic curve if (aTrimCurve->BasisCurve()->IsKind(STANDARD_TYPE(Geom_Conic))) { - const Handle(Geom_Curve)& aCurve = aTrimCurve; // to avoid ambiguity - GeomConvert_ApproxCurve anAppr (aCurve, Precision::Confusion(), GeomAbs_C1, 16, 14); + const Handle(Geom_Curve)& aCurveTrimmed = aTrimCurve; // to avoid ambiguity + GeomConvert_ApproxCurve anAppr (aCurveTrimmed, Precision::Confusion(), GeomAbs_C1, 16, 14); if (anAppr.HasResult()) aBSCurve = anAppr.Curve(); } @@ -937,7 +936,6 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: Handle(Geom_BSplineSurface) surface; Handle(Geom_BSplineCurve) BS, BS1; Handle(Geom_TrimmedCurve) curvTrim; - Handle(Geom_BSplineCurve) curvBS; if (w1Point) { jdeb++; diff --git a/src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx b/src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx index 21eb408f11..6472c67497 100644 --- a/src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx +++ b/src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx @@ -344,15 +344,15 @@ TopoDS_Shape BRepSweep_NumLinearRegularSweep::Shape (const TopoDS_Shape& aGenS, if (aGenSType==TopAbs_FACE){ newShell.Closed (BRep_Tool::IsClosed (newShell)); TopoDS_Shape temp = SplitShell(newShell); - TopAbs_Orientation Or = DirectSolid(aGenS,aDirS); + TopAbs_Orientation ShellOri = DirectSolid(aGenS,aDirS); Lt.Init(temp); if(Lt.More()) Lt.Next(); if(Lt.More()){ for (Lt.Init(temp);Lt.More();Lt.Next()){ - myBuilder.Add(myShapes(iGenS,iDirS),Lt.Value(),Or); + myBuilder.Add(myShapes(iGenS,iDirS),Lt.Value(), ShellOri); } } - else myBuilder.Add(myShapes(iGenS,iDirS),newShell,Or); + else myBuilder.Add(myShapes(iGenS,iDirS),newShell, ShellOri); } } else if (myDirShapeTool.Type(aDirS)==TopAbs_WIRE){ diff --git a/src/BRepSweep/BRepSweep_Rotation.cxx b/src/BRepSweep/BRepSweep_Rotation.cxx index d384f96f68..a9b98a0081 100644 --- a/src/BRepSweep/BRepSweep_Rotation.cxx +++ b/src/BRepSweep/BRepSweep_Rotation.cxx @@ -518,9 +518,9 @@ void BRepSweep_Rotation::SetGeneratingPCurve L.SetDirection(gp::DY2d()); } else{ - Standard_Real u = 0; - if (aDirV.Index() == 2) u = myAng; - L.SetLocation(gp_Pnt2d(u,0)); + Standard_Real anAngleTemp = 0; + if (aDirV.Index() == 2) anAngleTemp = myAng; + L.SetLocation(gp_Pnt2d(anAngleTemp,0)); L.SetDirection(gp::DY2d()); } Handle(Geom2d_Line) GL = new Geom2d_Line(L); diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index bca729d9fb..5fd63d76f7 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -786,7 +786,6 @@ static Standard_Integer SPLS(Draw_Interpretor& , } TopAbs_ShapeEnum wtyp = W.ShapeType(); if (wtyp != TopAbs_WIRE && wtyp != TopAbs_EDGE && wtyp != TopAbs_COMPOUND && pick) { - Standard_Real u,v; DBRep_DrawableShape::LastPick(W,u,v); wtyp = W.ShapeType(); } diff --git a/src/BRepToIGES/BRepToIGES_BRShell.cxx b/src/BRepToIGES/BRepToIGES_BRShell.cxx index c591549c9e..6600bb5253 100644 --- a/src/BRepToIGES/BRepToIGES_BRShell.cxx +++ b/src/BRepToIGES/BRepToIGES_BRShell.cxx @@ -298,15 +298,13 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& // returns the TrimmedSurface // -------------------------- - Standard_Boolean Flag = Standard_True; Handle(IGESGeom_TrimmedSurface) TrimmedSurf = new IGESGeom_TrimmedSurface; if (BRep_Tool::NaturalRestriction(start)) { //if face bounds and surface bounds are same, outer wire is unnecessary - Standard_Boolean Flag = Standard_False; - TrimmedSurf-> Init (ISurf, Flag, NULL, Tab); + TrimmedSurf-> Init (ISurf, Standard_False, NULL, Tab); } else - TrimmedSurf-> Init (ISurf, Flag, IOuter, Tab); + TrimmedSurf-> Init (ISurf, Standard_True, IOuter, Tab); res = TrimmedSurf; SetShapeResult ( start, res ); diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.cxx b/src/BRepTools/BRepTools_NurbsConvertModification.cxx index aad1facc09..ac076c3315 100644 --- a/src/BRepTools/BRepTools_NurbsConvertModification.cxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.cxx @@ -396,8 +396,6 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d); Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC); - TopLoc_Location Loc; - Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, Loc, f3d,l3d); if(!newE.IsNull()) { C3d = BRep_Tool::Curve(newE, f3d, l3d); } @@ -493,7 +491,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d } if (!itled.More()) { // on stocke l`edge et la curve2d Handle(Geom2d_Curve) C2dBis; - Standard_Real f3d,l3d,f2dBis,l2dBis; + Standard_Real f2dBis,l2dBis; C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d); Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d); Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC); @@ -505,8 +503,6 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Geom2dAdaptor_Curve G2dACBis(C2dBis, f2dBis, l2dBis); Handle(Geom2dAdaptor_HCurve) G2dAHCBis = new Geom2dAdaptor_HCurve(G2dACBis); - TopLoc_Location Loc; - Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, f3d,l3d); if(C3d.IsNull()) { if(isConvert2d) { Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy()); diff --git a/src/BRepTools/BRepTools_Quilt.cxx b/src/BRepTools/BRepTools_Quilt.cxx index eb6a3247c0..522236e6a6 100644 --- a/src/BRepTools/BRepTools_Quilt.cxx +++ b/src/BRepTools/BRepTools_Quilt.cxx @@ -435,17 +435,17 @@ TopoDS_Shape BRepTools_Quilt::Shells() const // Add the faces of oldShell in SH. for (TopoDS_Iterator its(oldShell); its.More(); its.Next()) { const TopoDS_Face Fo = TopoDS::Face(its.Value()); - TopAbs_Orientation NewO; + TopAbs_Orientation NewOFo; // update the orientation of Fo in SH. if (Rev) - NewO = TopAbs::Reverse(MF(Fo).Orientation()); + NewOFo = TopAbs::Reverse(MF(Fo).Orientation()); else - NewO = MF(Fo).Orientation(); + NewOFo = MF(Fo).Orientation(); - MF.Bind(Fo,SH.Oriented(NewO)); + MF.Bind(Fo,SH.Oriented(NewOFo)); // B.Add (SH.Oriented(TopAbs_FORWARD),Fo.Oriented(NewO)); - TopoDS_Shape arefShape = SH.Oriented(TopAbs_FORWARD) ; - B.Add ( arefShape ,Fo.Oriented(NewO)); + TopoDS_Shape arefShapeFo = SH.Oriented(TopAbs_FORWARD) ; + B.Add ( arefShapeFo,Fo.Oriented(NewOFo)); } // Rebind the free edges of the old shell to the new shell //gka BUG 6491 diff --git a/src/BiTgte/BiTgte_Blend.cxx b/src/BiTgte/BiTgte_Blend.cxx index d1f401db9f..577535c90c 100644 --- a/src/BiTgte/BiTgte_Blend.cxx +++ b/src/BiTgte/BiTgte_Blend.cxx @@ -731,8 +731,8 @@ static void CutEdge (const TopoDS_Edge& E, const TopTools_ListOfShape& VOnE, TopTools_ListOfShape& NE ) { - TopoDS_Shape aLocalShape = E.Oriented(TopAbs_FORWARD); - TopoDS_Edge WE = TopoDS::Edge(aLocalShape); + TopoDS_Shape aLocalShapeOrientedE = E.Oriented(TopAbs_FORWARD); + TopoDS_Edge WE = TopoDS::Edge(aLocalShapeOrientedE); // TopoDS_Edge WE = TopoDS::Edge(E.Oriented(TopAbs_FORWARD)); Standard_Real U1,U2; @@ -1656,10 +1656,10 @@ void BiTgte_Blend::ComputeCenters() if (Anc.Extent() == 2) { const BRepOffset_ListOfInterval& L = myAnalyse.Type(E); if (!L.IsEmpty() && L.First().Type() == OT) { - TopoDS_Shape aLocalShape = myMapSF(Anc.First()).Generated(E); - TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShape); - aLocalShape = myMapSF(Anc.Last()) .Generated(E); - TopoDS_Edge EOn2 = TopoDS::Edge(aLocalShape); + TopoDS_Shape aLocalShapeGen = myMapSF(Anc.First()).Generated(E); + TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShapeGen); + aLocalShapeGen = myMapSF(Anc.Last()) .Generated(E); + TopoDS_Edge EOn2 = TopoDS::Edge(aLocalShapeGen); // TopoDS_Edge EOn1 = TopoDS::Edge(myMapSF(Anc.First()).Generated(E)); // TopoDS_Edge EOn2 = TopoDS::Edge(myMapSF(Anc.Last()) .Generated(E)); // find if exits tangent edges in the original shape @@ -2128,15 +2128,15 @@ void BiTgte_Blend::ComputeSurfaces() // are not actually tangent ( Cf: Approximation of lines // of intersection that add noise.) // ---------------------------------------------------------- - TopoDS_Vertex V1,V2; + TopoDS_Vertex aVertex1, aVertex2; if ( E1f.IsNull() && !VfOnE1.IsNull() && !VfOnE2.IsNull()) { TopTools_MapIteratorOfMapOfShape it(MapOnV1f); for ( ; it.More(); it.Next()) { const TopoDS_Edge& E = TopoDS::Edge(it.Key()); if ( !E.IsNull()) { - TopExp::Vertices(E,V1,V2); - if ((V1.IsSame(VfOnE1) && V2.IsSame(VfOnE2)) || - (V2.IsSame(VfOnE1) && V1.IsSame(VfOnE2)) ) { + TopExp::Vertices(E, aVertex1, aVertex2); + if ((aVertex1.IsSame(VfOnE1) && aVertex2.IsSame(VfOnE2)) || + (aVertex2.IsSame(VfOnE1) && aVertex1.IsSame(VfOnE2)) ) { E1f = E; break; } @@ -2148,9 +2148,9 @@ void BiTgte_Blend::ComputeSurfaces() for ( ; it.More(); it.Next()) { const TopoDS_Edge& E = TopoDS::Edge(it.Key()); if ( !E.IsNull()) { - TopExp::Vertices(E,V1,V2); - if ((V1.IsSame(VlOnE1) && V2.IsSame(VlOnE2)) || - (V2.IsSame(VlOnE1) && V1.IsSame(VlOnE2)) ) { + TopExp::Vertices(E, aVertex1, aVertex2); + if ((aVertex1.IsSame(VlOnE1) && aVertex2.IsSame(VlOnE2)) || + (aVertex2.IsSame(VlOnE1) && aVertex1.IsSame(VlOnE2)) ) { E1l = E; break; } @@ -2251,15 +2251,15 @@ void BiTgte_Blend::ComputeSurfaces() // --------------------------------------------------- TopTools_IndexedDataMapOfShapeListOfShape Map; TopExp::MapShapesAndAncestors(Co,TopAbs_VERTEX,TopAbs_EDGE,Map); - - for ( Standard_Integer i = 1; i <= Map.Extent(); i++) { - const TopoDS_Vertex& V = TopoDS::Vertex(Map.FindKey(i)); - if ( Map(i).Extent() != 3) continue; + + for ( Standard_Integer j = 1; j <= Map.Extent(); j++) { + const TopoDS_Vertex& V = TopoDS::Vertex(Map.FindKey(j)); + if ( Map(j).Extent() != 3) continue; TopTools_ListOfShape LOE; TopTools_ListIteratorOfListOfShape it; - for (it.Initialize(Map(i)) ; it.More(); it.Next()) { + for (it.Initialize(Map(j)) ; it.More(); it.Next()) { Standard_Boolean Reverse = Standard_True; if ( Reverse) LOE.Append(myMapSF(it.Value()).Generated(V).Reversed()); @@ -2466,9 +2466,9 @@ void BiTgte_Blend::ComputeShape() TopoDS_Edge OE; if ( MapSS.IsBound(E)) { // this is an edge of cutting OE = TopoDS::Edge(MapSS(E)); - TopoDS_Shape aLocalShape = E.Reversed(); + TopoDS_Shape aLocalShapeReversedE = E.Reversed(); Handle(Geom2d_Curve) C2d_1 = - BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShape),Face,f,l); + BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShapeReversedE),Face,f,l); // Handle(Geom2d_Curve) C2d_1 = // BRep_Tool::CurveOnSurface(TopoDS::Edge(E.Reversed()), // Face,f,l); diff --git a/src/BinMNaming/BinMNaming_NamingDriver.cxx b/src/BinMNaming/BinMNaming_NamingDriver.cxx index 7fb92d6c54..854777ffba 100644 --- a/src/BinMNaming/BinMNaming_NamingDriver.cxx +++ b/src/BinMNaming/BinMNaming_NamingDriver.cxx @@ -256,14 +256,14 @@ Standard_Boolean BinMNaming_NamingDriver::Paste } if(BinMNaming::DocumentVersion() > 4 && BinMNaming::DocumentVersion() < 7) { // Orientation processing - converting from old format - Handle(TNaming_NamedShape) aNS; - if(anAtt->Label().FindAttribute(TNaming_NamedShape::GetID(), aNS)) { + Handle(TNaming_NamedShape) aNShape; + if(anAtt->Label().FindAttribute(TNaming_NamedShape::GetID(), aNShape)) { //const TDF_Label& aLab = aNS->Label(); - TNaming_Iterator itL (aNS); + TNaming_Iterator itL (aNShape); for (; itL.More(); itL.Next()) { const TopoDS_Shape& S = itL.NewShape(); if (S.IsNull()) continue; - if(aNS->Evolution() == TNaming_SELECTED) { + if(aNShape->Evolution() == TNaming_SELECTED) { if (itL.More() && itL.NewShape().ShapeType() != TopAbs_VERTEX && !itL.OldShape().IsNull() && itL.OldShape().ShapeType() == TopAbs_VERTEX ) {//OR-N TopAbs_Orientation OrientationToApply = itL.OldShape().Orientation(); diff --git a/src/Bisector/Bisector_BisecAna.cxx b/src/Bisector/Bisector_BisecAna.cxx index 4550db9f22..a30b70feee 100644 --- a/src/Bisector/Bisector_BisecAna.cxx +++ b/src/Bisector/Bisector_BisecAna.cxx @@ -754,7 +754,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , else { gp_Lin2d l(apoint,gp_Dir2d(Direc2.XY()-Direc1.XY())); Handle(GccInt_Bisec) solution = new GccInt_BLine(l); - Standard_Boolean ok; + Standard_Boolean isOk; sense = Standard_False; // Modified by skv - Tue Feb 15 17:51:29 2005 Integration Begin // distanceptsol = Distance(apoint,solution, @@ -763,13 +763,13 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , if (oncurve) distanceptsol = Distance(apoint,solution, tan2,tan1,LineBisVec, - adirection,parameter,sense,ok); + adirection,parameter,sense, isOk); else distanceptsol = Distance(apoint,solution, afirstvector,asecondvector,LineBisVec, - adirection,parameter,sense,ok, Standard_True); + adirection,parameter,sense, isOk, Standard_True); // Modified by skv - Tue Feb 15 17:51:29 2005 Integration End - if (ok || !oncurve) { + if (isOk || !oncurve) { thesense = sense; distancemini = distanceptsol; } @@ -827,27 +827,27 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , Standard_Integer cas = 0; - Handle(Standard_Type) type = afirstcurve->DynamicType(); + Handle(Standard_Type) aFirstCurveType = afirstcurve->DynamicType(); - if (type == STANDARD_TYPE(Geom2d_TrimmedCurve)) { + if (aFirstCurveType == STANDARD_TYPE(Geom2d_TrimmedCurve)) { curve = Handle(Geom2d_TrimmedCurve)::DownCast (afirstcurve)->BasisCurve(); } else { curve = afirstcurve; } - type = curve->DynamicType(); + aFirstCurveType = curve->DynamicType(); #ifdef OCCT_DEBUG gp_Pnt2d Point(asecondpoint->Pnt2d()); #else asecondpoint->Pnt2d(); #endif - if (type == STANDARD_TYPE(Geom2d_Circle)) { + if (aFirstCurveType == STANDARD_TYPE(Geom2d_Circle)) { cas = 1; Handle(Geom2d_Circle) C1 = Handle(Geom2d_Circle)::DownCast(curve); circle = C1->Circ2d(); } - else if (type == STANDARD_TYPE(Geom2d_Line)) { + else if (aFirstCurveType == STANDARD_TYPE(Geom2d_Line)) { cas = 2; Handle(Geom2d_Line) L1 = Handle(Geom2d_Line)::DownCast(curve); line = L1->Lin2d(); @@ -882,9 +882,9 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , } } if (!TheSol.IsNull()) { - GccInt_IType type = TheSol->ArcType(); + GccInt_IType aSolType = TheSol->ArcType(); Handle(Geom2d_Curve) bisectorcurve; - if (type == GccInt_Lin) { + if (aSolType == GccInt_Lin) { // ---------------------------------------------------------------------------- // If the bisectrice is a line @@ -921,7 +921,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , secondparameter); } - else if (type == GccInt_Cir) { + else if (aSolType == GccInt_Cir) { bisectorcurve = new Geom2d_Circle(TheSol->Circle()); if (!thesense) thebisector = new Geom2d_TrimmedCurve(bisectorcurve, @@ -934,7 +934,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , firstparameter+2.0*M_PI, thesense); } - else if (type == GccInt_Hpr) { + else if (aSolType == GccInt_Hpr) { bisectorcurve=new Geom2d_Hyperbola(TheSol->Hyperbola()); if (!thesense) thebisector = new Geom2d_TrimmedCurve(bisectorcurve, @@ -945,7 +945,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , firstparameter, Precision::Infinite()); } - else if (type == GccInt_Ell) { + else if (aSolType == GccInt_Ell) { bisectorcurve = new Geom2d_Ellipse(TheSol->Ellipse()); if (!thesense) thebisector = new Geom2d_TrimmedCurve(bisectorcurve, diff --git a/src/Bisector/Bisector_BisecCC.cxx b/src/Bisector/Bisector_BisecCC.cxx index 95e759011d..b0b0e2f07c 100644 --- a/src/Bisector/Bisector_BisecCC.cxx +++ b/src/Bisector/Bisector_BisecCC.cxx @@ -823,8 +823,8 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U, if (SolRoot.IsDone()) { for (Standard_Integer j = 1; j <= SolRoot.NbSolutions(); j++) { USol = SolRoot.Value(j); - gp_Pnt2d P2 = curve2->Value(USol); - gp_Vec2d P2P1(P1.X() - P2.X(),P1.Y() - P2.Y()); + gp_Pnt2d P2Curve2 = curve2->Value(USol); + gp_Vec2d P2P1(P1.X() - P2Curve2.X(),P1.Y() - P2Curve2.Y()); Standard_Real SquareP2P1 = P2P1.SquareMagnitude(); Standard_Real N1P2P1 = N1.Dot(P2P1); diff --git a/src/Blend/Blend_Walking_1.gxx b/src/Blend/Blend_Walking_1.gxx index 44f18d3643..8f205cfa38 100644 --- a/src/Blend/Blend_Walking_1.gxx +++ b/src/Blend/Blend_Walking_1.gxx @@ -88,7 +88,6 @@ void Blend_Walking::Perform(Blend_Function& Func, } Blend_Status State; - TheExtremity ptf1,ptf2; param = Pdep; Func.Set(param); diff --git a/src/Blend/Blend_Walking_3.gxx b/src/Blend/Blend_Walking_3.gxx index 2fab27e672..1a0586c82d 100644 --- a/src/Blend/Blend_Walking_3.gxx +++ b/src/Blend/Blend_Walking_3.gxx @@ -311,19 +311,19 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, FuncInv.Set(OnFirst,thecur); FuncInv.GetBounds(infb,supb); FuncInv.GetTolerance(toler,tolesp/10);//Il vaut mieux garder un peu de marge - math_FunctionSetRoot rsnld(FuncInv,toler,35); + math_FunctionSetRoot aRsnld(FuncInv,toler,35); toler *= 10; // Mais on fait les tests correctements // Resolution... - rsnld.Perform(FuncInv,solrst,infb,supb); + aRsnld.Perform(FuncInv,solrst,infb,supb); - if (!rsnld.IsDone()) { + if (!aRsnld.IsDone()) { #ifdef OCCT_DEBUG cout << "Walking::Recadre : RSNLD not done " << endl; #endif recadre = Standard_False; } else { - rsnld.Root(solrst); + aRsnld.Root(solrst); recadre = FuncInv.IsSolution(solrst,tolesp); } } diff --git a/src/CDF/CDF_FWOSDriver.cxx b/src/CDF/CDF_FWOSDriver.cxx index 531b898b21..feb5ddb60b 100644 --- a/src/CDF/CDF_FWOSDriver.cxx +++ b/src/CDF/CDF_FWOSDriver.cxx @@ -220,11 +220,10 @@ TCollection_ExtendedString CDF_FWOSDriver::SetName(const Handle(CDM_Document)& a #ifdef WNT //windows is not case sensitive - Standard_ExtCharacter echar; //make the extension lower case for(int i = 1; i <= xn.Length(); i++) { - echar = xn.Value(i); + Standard_ExtCharacter echar = xn.Value(i); echar = towlower(echar); xn.SetValue(i, echar); } @@ -235,11 +234,10 @@ TCollection_ExtendedString CDF_FWOSDriver::SetName(const Handle(CDM_Document)& a if (e.Length() > 0) { #ifdef WNT //windows is not case sensitive - Standard_ExtCharacter echar; //make the extension lower case for(int i = 1; i <= xe.Length(); i++) { - echar = xe.Value(i); + Standard_ExtCharacter echar = xe.Value(i); echar = towlower(echar); xe.SetValue(i, echar); } diff --git a/src/CSLib/CSLib.cxx b/src/CSLib/CSLib.cxx index 37561bcec4..8775fed36f 100644 --- a/src/CSLib/CSLib.cxx +++ b/src/CSLib/CSLib.cxx @@ -321,13 +321,13 @@ void CSLib::Normal(const Standard_Integer MaxOrder, while(n<=FindRoots.NbSolutions()) { Standard_Real ASOL=FindRoots.Value(n); - Standard_Integer i=n-1; - while((i>=1) && (Sol0(i)> ASOL)) + Standard_Integer j=n-1; + while((j>=1) && (Sol0(j)> ASOL)) { - Sol0(i+1)=Sol0(i); - i--; + Sol0(j+1)=Sol0(j); + j--; } - Sol0(i+1)=ASOL; + Sol0(j+1)=ASOL; n++; }//end while(n //Add limits of the domains diff --git a/src/CSLib/CSLib_Offset.cxx b/src/CSLib/CSLib_Offset.cxx index 2181b8165e..fa8fce47bc 100644 --- a/src/CSLib/CSLib_Offset.cxx +++ b/src/CSLib/CSLib_Offset.cxx @@ -198,7 +198,7 @@ void CSLib_Offset::D3(const gp_Pnt2d& theBasePoint, (theOffset * (6.0*Dr*Dr/R4 + 6.0*Dr*D2r/R4 - 15.0*Dr*Dr*Dr/R6 - D3r)))); D3Ndir.Multiply (theOffset/R); // V2 = P" (U) : - Standard_Real R4 = R2 * R2; + R4 = R2 * R2; D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2)); D2Ndir.Subtract (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2))); D2Ndir.Multiply (theOffset / R); @@ -339,7 +339,7 @@ void CSLib_Offset::D2(const gp_Pnt& theBasePoint, //We try another computation but the stability is not very good //dixit ISG. // V2 = P" (U) : - Standard_Real R4 = R2 * R2; + R4 = R2 * R2; D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2)); D2Ndir.Add (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2))); D2Ndir.Multiply (theOffsetValue / R); @@ -423,7 +423,7 @@ void CSLib_Offset::D3(const gp_Pnt& theBasePoint, D3Ndir.Add (Ndir.Multiplied (6.0*Dr*Dr/R4 + 6.0*Dr*D2r/R4 - 15.0*Dr*Dr*Dr/R6 - D3r)); D3Ndir.Multiply (theOffsetValue/R); // V2 = P" (U) : - Standard_Real R4 = R2 * R2; + R4 = R2 * R2; D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2)); D2Ndir.Subtract (Ndir.Multiplied ((3.0 * Dr * Dr / R4) - (D2r / R2))); D2Ndir.Multiply (theOffsetValue / R); diff --git a/src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx b/src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx index 5c1a06093c..f6cc1b4ac7 100644 --- a/src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx +++ b/src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx @@ -758,12 +758,12 @@ Standard_Boolean ChFi2d_AnaFilletAlgo::ArcFilletSegment(const Standard_Real radi // Make a line parallel to segment and // passing near the "near" point. - gp_Vec2d d2(v2); - gp_Lin2d line(p22, -d2); - d2.Rotate(M_PI_2); - line.Translate(radius * d2); + gp_Vec2d aD2Vec(v2); + gp_Lin2d line(p22, -aD2Vec); + aD2Vec.Rotate(M_PI_2); + line.Translate(radius * aD2Vec); if (line.Distance(nearPoint) > radius) - line.Translate(-2.0 * radius * d2); + line.Translate(-2.0 * radius * aD2Vec); // Make a circle of radius of the arc +/- fillet radius. gp_Ax2d axes(pc1, gp::DX2d()); diff --git a/src/ChFi2d/ChFi2d_Builder.cxx b/src/ChFi2d/ChFi2d_Builder.cxx index 58e911bdd7..e0e4e3125d 100644 --- a/src/ChFi2d/ChFi2d_Builder.cxx +++ b/src/ChFi2d/ChFi2d_Builder.cxx @@ -1041,8 +1041,7 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V, if (OE1 == TopAbs_REVERSED) { vec1.Reverse(); } // if (OE1 ... - Standard_Real cross = vec1*vec; - Standard_Boolean Sense = cross > 0.; + Standard_Boolean Sense = ( vec1*vec ) > 0.; if (U1 > Vv1 && U1 > 2.*M_PI) { ElCLib::AdjustPeriodic(0.,2.*M_PI,Precision::Confusion(),U1,Vv1); } // if (U1 ... diff --git a/src/ChFi2d/ChFi2d_FilletAlgo.cxx b/src/ChFi2d/ChFi2d_FilletAlgo.cxx index 7a2d2ce3c2..53c4ef1669 100644 --- a/src/ChFi2d/ChFi2d_FilletAlgo.cxx +++ b/src/ChFi2d/ChFi2d_FilletAlgo.cxx @@ -266,14 +266,14 @@ void ChFi2d_FilletAlgo::FillPoint(FilletPoint* thePoint, const Standard_Real the aValid2 = !IsRadiusIntersected(myCurve1, myStart1, myEnd1, aCenter, aProj.Point(a), Standard_False); // checking the right parameter - Standard_Real aParam = aProj.Parameter(a); - while(myCurve2->IsPeriodic() && aParam < myStart2) - aParam += myCurve2->Period(); + Standard_Real aParamProj = aProj.Parameter(a); + while(myCurve2->IsPeriodic() && aParamProj < myStart2) + aParamProj += myCurve2->Period(); const Standard_Real d = aProj.Distance(a); - thePoint->appendValue(d * d - myRadius * myRadius, (aParam >= myStart2 && aParam <= myEnd2 && aValid2)); + thePoint->appendValue(d * d - myRadius * myRadius, (aParamProj >= myStart2 && aParamProj <= myEnd2 && aValid2)); if (Abs(d - myRadius) < Precision::Confusion()) - thePoint->setParam2(aParam); + thePoint->setParam2(aParamProj); } } diff --git a/src/ChFi3d/ChFi3d_Builder_2.cxx b/src/ChFi3d/ChFi3d_Builder_2.cxx index 79f26ed8de..ff19e6a163 100644 --- a/src/ChFi3d/ChFi3d_Builder_2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_2.cxx @@ -955,10 +955,10 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, Stripe->OrientationOnFace1(), Stripe->OrientationOnFace2(), RC); - const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity - const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity - I1->Initialize(HSon1); - I2->Initialize(HSon2); + const Handle(Adaptor3d_HSurface)& HSon1new = HS1; // to avoid ambiguity + const Handle(Adaptor3d_HSurface)& HSon2new = HS2; // to avoid ambiguity + I1->Initialize(HSon1new); + I2->Initialize(HSon2new); if(PerformFirstSection(Spine,HGuide,Choix,HS1,HS2, I1,I2,w,SolDep,Pos1,Pos2)){ P1.SetCoord(SolDep(1),SolDep(2)); diff --git a/src/ChFiDS/ChFiDS_FilSpine.cxx b/src/ChFiDS/ChFiDS_FilSpine.cxx index 2d5f3bfb77..07f6b4fb48 100644 --- a/src/ChFiDS/ChFiDS_FilSpine.cxx +++ b/src/ChFiDS/ChFiDS_FilSpine.cxx @@ -496,7 +496,7 @@ Handle(Law_Composite) ChFiDS_FilSpine::ComputeLaw Standard_Real spinefin = LastParameter(); Standard_Integer nbed = ifin - ideb + 1; - Standard_Integer biddeb = ideb, bidfin = ifin; + Standard_Integer bidfin = ifin; Handle(Law_Composite) loi = new Law_Composite(); Law_Laws& list = loi->ChangeLaws(); @@ -510,11 +510,11 @@ Handle(Law_Composite) ChFiDS_FilSpine::ComputeLaw if(IsPeriodic()){ if(deb < 0 && ideb > ifin) bidfin += len; else if(fin > LastParameter(len) && ideb > ifin) bidfin += len; - nbed = bidfin - biddeb + 1; + nbed = bidfin - ideb + 1; } TColStd_Array1OfInteger ind(1,nbed); Standard_Integer j = 1; - for(Standard_Integer i = biddeb; i <= bidfin; i++){ + for(Standard_Integer i = ideb; i <= bidfin; i++){ ind(j++) = ((i - 1)%len) + 1; } diff --git a/src/Contap/Contap_Contour.cxx b/src/Contap/Contap_Contour.cxx index 1aad555951..22cdbe0387 100644 --- a/src/Contap/Contap_Contour.cxx +++ b/src/Contap/Contap_Contour.cxx @@ -1464,9 +1464,9 @@ void Contap_Contour::Perform //IFV begin if(solrst.NbSegments() <= 0) { if(mySFunc.FunctionType() == Contap_ContourStd) { - const Handle(Adaptor3d_HSurface)& Surf = mySFunc.Surface(); - if(Adaptor3d_HSurfaceTool::GetType(Surf) == GeomAbs_Torus) { - gp_Torus aTor = Adaptor3d_HSurfaceTool::Torus(Surf); + const Handle(Adaptor3d_HSurface)& SurfToCheck = mySFunc.Surface(); + if(Adaptor3d_HSurfaceTool::GetType(SurfToCheck) == GeomAbs_Torus) { + gp_Torus aTor = Adaptor3d_HSurfaceTool::Torus(SurfToCheck); gp_Dir aTorDir = aTor.Axis().Direction(); gp_Dir aProjDir = mySFunc.Direction(); diff --git a/src/DBRep/DBRep_DrawableShape.cxx b/src/DBRep/DBRep_DrawableShape.cxx index 06396663ee..634fc02dd5 100644 --- a/src/DBRep/DBRep_DrawableShape.cxx +++ b/src/DBRep/DBRep_DrawableShape.cxx @@ -372,7 +372,7 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const // Faces Handle(Poly_Triangulation) Tr; - TopLoc_Location l; + TopLoc_Location aTempLoc; TopLoc_Location loc; DBRep_ListIteratorOfListOfFace itf(myFaces); @@ -382,23 +382,23 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const const Handle(DBRep_Face)& F = itf.Value(); dis.SetColor(F->Color()); - const Handle(Geom_Surface)& S = BRep_Tool::Surface(F->Face(),l); + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(F->Face(), aTempLoc); - if (!S.IsNull()) { + if (!aSurf.IsNull()) { Standard_Boolean restriction = Standard_False; - if(S->IsUPeriodic() || S->IsVPeriodic()) { + if(aSurf->IsUPeriodic() || aSurf->IsVPeriodic()) { Standard_Real SU1 = 0., SU2 = 0., SV1 = 0., SV2 = 0.; Standard_Real FU1 = 0., FU2 = 0., FV1 = 0., FV2 = 0.; - S->Bounds(SU1,SU2,SV1,SV2); + aSurf->Bounds(SU1,SU2,SV1,SV2); BRepTools::UVBounds (F->Face(),FU1,FU2,FV1,FV2); - if(S->IsUPeriodic()) { + if(aSurf->IsUPeriodic()) { if(FU1 < SU1 || FU1 > SU2) restriction = Standard_True; if(!restriction && (FU2 < SU1 || FU2 > SU2)) restriction = Standard_True; } - if(!restriction && S->IsVPeriodic()) { + if(!restriction && aSurf->IsVPeriodic()) { if(FV1 < SV1 || FV1 > SV2) restriction = Standard_True; if(!restriction && (FV2 < SV1 || FV2 > SV2)) @@ -604,7 +604,7 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const // trace des eventuelles triangulations. //===================================== - if (S.IsNull() || mytriangulations) { + if (aSurf.IsNull() || mytriangulations) { Tr = BRep_Tool::Triangulation(F->Face(), loc); if (!Tr.IsNull()) { Display(Tr, loc.Transformation(), dis); @@ -627,12 +627,12 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const // display geometrical curve if exists. Standard_Boolean isgeom = BRep_Tool::IsGeometric(E->Edge()); - Standard_Real U1,U2; + Standard_Real aCheckU1, aCheckU2; if (isgeom) { // check the range (to report bad edges) - BRep_Tool::Range(E->Edge(),U1,U2); - if (U2 < U1) { + BRep_Tool::Range(E->Edge(), aCheckU1, aCheckU2); + if (aCheckU2 < aCheckU1) { // bad orientation cout << "DBRep_DrawableShape : Bad parameters on edge."<Edge(),cout); @@ -719,13 +719,13 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const if (myDispOr) { // display an arrow at the end - gp_Pnt P; + gp_Pnt aPnt; gp_Vec V; - C.D1(l,P,V); + C.D1(l, aPnt,V); gp_Pnt2d p1,p2; - dis.Project(P,p1); - P.Translate(V); - dis.Project(P,p2); + dis.Project(aPnt,p1); + aPnt.Translate(V); + dis.Project(aPnt,p2); gp_Vec2d v(p1,p2); if (v.Magnitude() > gp::Resolution()) { Standard_Real L = 20 / dis.Zoom(); @@ -769,12 +769,12 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const else { // Polygone sur triangulation: - Handle(Poly_Triangulation) Tr; + Handle(Poly_Triangulation) PolyTr; Handle(Poly_PolygonOnTriangulation) Poly; - BRep_Tool::PolygonOnTriangulation(E->Edge(), Poly, Tr, loc); + BRep_Tool::PolygonOnTriangulation(E->Edge(), Poly, PolyTr, loc); if (!Poly.IsNull()) { const TColStd_Array1OfInteger& Indices = Poly->Nodes(); - const TColgp_Array1OfPnt& Nodes = Tr->Nodes(); + const TColgp_Array1OfPnt& Nodes = PolyTr->Nodes(); for (i=Indices.Lower()+1; i<=Indices.Upper(); i++) { dis.Draw(Nodes(Indices(i-1)).Transformed(loc), Nodes(Indices(i)).Transformed(loc)); diff --git a/src/DNaming/DNaming.cxx b/src/DNaming/DNaming.cxx index 54e78cdd70..6484d1fefe 100644 --- a/src/DNaming/DNaming.cxx +++ b/src/DNaming/DNaming.cxx @@ -749,7 +749,6 @@ void DNaming::LoadAndOrientModifiedShapes (BRepBuilderAPI_MakeShape& MS, { TopTools_MapOfShape View; TopExp_Explorer ShapeExplorer (ShapeIn, KindOfShape); - TopTools_ListOfShape Shapes; for (; ShapeExplorer.More(); ShapeExplorer.Next ()) { const TopoDS_Shape& Root = ShapeExplorer.Current (); if (!View.Add(Root)) continue; diff --git a/src/DNaming/DNaming_PrismDriver.cxx b/src/DNaming/DNaming_PrismDriver.cxx index e4905a33d8..b19d34ae3a 100644 --- a/src/DNaming/DNaming_PrismDriver.cxx +++ b/src/DNaming/DNaming_PrismDriver.cxx @@ -169,8 +169,8 @@ Standard_Integer DNaming_PrismDriver::Execute(TFunction_Logbook& theLog) const { } const TopoDS_Shape& aResult = aMakePrism.Shape(); - BRepCheck_Analyzer aCheck(aResult); - if (!aCheck.IsValid(aResult)) { + BRepCheck_Analyzer aCheckAnalyzer(aResult); + if (!aCheckAnalyzer.IsValid(aResult)) { aFunction->SetFailure(RESULT_NOT_VALID); #ifdef OCCT_DEBUG Standard_CString aFileName = "PrismResult.brep"; diff --git a/src/DNaming/DNaming_RevolutionDriver.cxx b/src/DNaming/DNaming_RevolutionDriver.cxx index ca86865cb8..9d13a8d975 100644 --- a/src/DNaming/DNaming_RevolutionDriver.cxx +++ b/src/DNaming/DNaming_RevolutionDriver.cxx @@ -180,8 +180,8 @@ Standard_Integer DNaming_RevolutionDriver::Execute(TFunction_Logbook& theLog) co return -1; } const TopoDS_Shape aResult = aMakeRevol.Shape(); - BRepCheck_Analyzer aCheck(aResult); - if (!aCheck.IsValid(aResult)) { + BRepCheck_Analyzer aCheckAnalyzer(aResult); + if (!aCheckAnalyzer.IsValid(aResult)) { aFunction->SetFailure(RESULT_NOT_VALID); return -1; } @@ -223,8 +223,8 @@ Standard_Integer DNaming_RevolutionDriver::Execute(TFunction_Logbook& theLog) co return -1; } const TopoDS_Shape aResult = aMakeRevol.Shape(); - BRepCheck_Analyzer aCheck(aResult); - if (!aCheck.IsValid(aResult)) { + BRepCheck_Analyzer aCheckAnalyzer(aResult); + if (!aCheckAnalyzer.IsValid(aResult)) { aFunction->SetFailure(RESULT_NOT_VALID); return -1; } @@ -453,8 +453,8 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel, if(StartShape.ShapeType() != TopAbs_FACE) { TopoDS_Iterator it(StartShape); for (; it.More(); it.Next()) { - TNaming_Builder Builder(theResultLabel.NewChild()); - Builder.Generated(it.Value()); + TNaming_Builder aBuilder(theResultLabel.NewChild()); + aBuilder.Generated(it.Value()); } } } else { @@ -478,8 +478,8 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel, if(EndShape.ShapeType() != TopAbs_FACE) { TopoDS_Iterator it(EndShape); for (; it.More(); it.Next()) { - TNaming_Builder Builder(theResultLabel.NewChild()); - Builder.Generated(it.Value()); + TNaming_Builder aBuilder(theResultLabel.NewChild()); + aBuilder.Generated(it.Value()); } } } else { diff --git a/src/Extrema/Extrema_GenExtCS.cxx b/src/Extrema/Extrema_GenExtCS.cxx index 3a6952f303..65bdac7f51 100644 --- a/src/Extrema/Extrema_GenExtCS.cxx +++ b/src/Extrema/Extrema_GenExtCS.cxx @@ -248,9 +248,9 @@ void Extrema_GenExtCS::Perform (const Adaptor3d_Curve& C, // Pre-compute curve sample points. TColgp_HArray1OfPnt aCurvPnts (0, mytsample); - Standard_Real aCU = aMinTUV(1); - for (Standard_Integer aCUI = 0; aCUI <= mytsample; aCUI++, aCU += aStepCU) - aCurvPnts.SetValue (aCUI, C.Value (aCU)); + Standard_Real aCU1 = aMinTUV(1); + for (Standard_Integer aCUI = 0; aCUI <= mytsample; aCUI++, aCU1 += aStepCU) + aCurvPnts.SetValue (aCUI, C.Value (aCU1)); PSO_Particle* aParticle = aParticles.GetWorstParticle(); // Select specified number of particles from pre-computed set of samples @@ -260,18 +260,18 @@ void Extrema_GenExtCS::Perform (const Adaptor3d_Curve& C, Standard_Real aSV = aMinTUV(3); for (Standard_Integer aSVI = 0; aSVI <= myvsample; aSVI++, aSV += aStepSV) { - Standard_Real aCU = aMinTUV(1); - for (Standard_Integer aCUI = 0; aCUI <= mytsample; aCUI++, aCU += aStepCU) + Standard_Real aCU2 = aMinTUV(1); + for (Standard_Integer aCUI = 0; aCUI <= mytsample; aCUI++, aCU2 += aStepCU) { Standard_Real aSqDist = mySurfPnts->Value(aSUI, aSVI).SquareDistance(aCurvPnts.Value(aCUI)); if (aSqDist < aParticle->Distance) { - aParticle->Position[0] = aCU; + aParticle->Position[0] = aCU2; aParticle->Position[1] = aSU; aParticle->Position[2] = aSV; - aParticle->BestPosition[0] = aCU; + aParticle->BestPosition[0] = aCU2; aParticle->BestPosition[1] = aSU; aParticle->BestPosition[2] = aSV; diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index 681b0d6661..6c949bc0cd 100644 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -520,7 +520,6 @@ void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint) PasU = (PasU - U0) / (myusample - 1); U0 = U0/2. + myumin; myUParams = new TColStd_HArray1OfReal(1,myusample ); - Standard_Integer NoU; Standard_Real U = U0; for ( NoU = 1 ; NoU <= myusample; NoU++, U += PasU) myUParams->SetValue(NoU, U); @@ -534,7 +533,6 @@ void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint) V0 = V0/2. + myvmin; myVParams = new TColStd_HArray1OfReal(1,myvsample ); - Standard_Integer NoV; Standard_Real V = V0; for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV) diff --git a/src/FEmTool/FEmTool_Assembly.cxx b/src/FEmTool/FEmTool_Assembly.cxx index f5ee8f16f6..517ca0e4e8 100644 --- a/src/FEmTool/FEmTool_Assembly.cxx +++ b/src/FEmTool/FEmTool_Assembly.cxx @@ -322,9 +322,9 @@ Standard_Boolean FEmTool_Assembly::Solve() if(GHGt->IsInProfile(k, i)) { Standard_Real m = 0.; // m = M(k,i) - const FEmTool_ListOfVectors& L = G.Value(k); + const FEmTool_ListOfVectors& aL = G.Value(k); - for(Iter.Initialize(L); Iter.More(); Iter.Next()) { + for(Iter.Initialize(aL); Iter.More(); Iter.Next()) { const Handle(TColStd_HArray1OfReal)& a = Iter.Value(); for(j = a->Lower(); j <= a->Upper(); j++) m += qi(j) * a->Value(j); // scalar product of @@ -486,7 +486,6 @@ void FEmTool_Assembly::AddConstraint(const Standard_Integer IndexofConstraint, } else { FEmTool_ListIteratorOfListOfVectors Iter(L); - Standard_Integer i; Standard_Real s1 = 0, s2 = 0; Handle(TColStd_HArray1OfReal) Aux1, Aux2; for(i=1; Iter.More(); Iter.Next(), i++) { diff --git a/src/FEmTool/FEmTool_LinearFlexion.cxx b/src/FEmTool/FEmTool_LinearFlexion.cxx index 970209c074..a4d787603d 100644 --- a/src/FEmTool/FEmTool_LinearFlexion.cxx +++ b/src/FEmTool/FEmTool_LinearFlexion.cxx @@ -53,9 +53,9 @@ FEmTool_LinearFlexion::FEmTool_LinearFlexion(const Standard_Integer WorkDegree, Handle(PLib_HermitJacobi) theBase = new PLib_HermitJacobi(WDeg, ConstraintOrder); FEmTool_ElementsOfRefMatrix Elem = FEmTool_ElementsOfRefMatrix(theBase, DerOrder); Standard_Integer maxDegree = WDeg+1; - math_IntegerVector Order(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); + math_IntegerVector anOrder(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); math_Vector Lower(1,1,-1.), Upper(1,1,1.); - math_GaussSetIntegration anInt(Elem, Lower, Upper, Order); + math_GaussSetIntegration anInt(Elem, Lower, Upper, anOrder); MatrixElemts = anInt.Value(); } diff --git a/src/FEmTool/FEmTool_LinearJerk.cxx b/src/FEmTool/FEmTool_LinearJerk.cxx index 91e26e2857..9e76dcaf5e 100644 --- a/src/FEmTool/FEmTool_LinearJerk.cxx +++ b/src/FEmTool/FEmTool_LinearJerk.cxx @@ -53,11 +53,11 @@ FEmTool_LinearJerk::FEmTool_LinearJerk(const Standard_Integer WorkDegree, Standard_Integer maxDegree = WDeg+1; - math_IntegerVector Order(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); + math_IntegerVector anOrder(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); math_Vector Lower(1,1,-1.), Upper(1,1,1.); - math_GaussSetIntegration anInt(Elem, Lower, Upper, Order); + math_GaussSetIntegration anInt(Elem, Lower, Upper, anOrder); MatrixElemts = anInt.Value(); } diff --git a/src/FEmTool/FEmTool_LinearTension.cxx b/src/FEmTool/FEmTool_LinearTension.cxx index e5c2d8fa87..ea7e64f994 100644 --- a/src/FEmTool/FEmTool_LinearTension.cxx +++ b/src/FEmTool/FEmTool_LinearTension.cxx @@ -51,10 +51,10 @@ FEmTool_LinearTension::FEmTool_LinearTension(const Standard_Integer WorkDegree, FEmTool_ElementsOfRefMatrix Elem = FEmTool_ElementsOfRefMatrix(theBase, DerOrder); Standard_Integer maxDegree = WDeg+1; - math_IntegerVector Order(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); + math_IntegerVector anOrder(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); math_Vector Lower(1,1,-1.), Upper(1,1,1.); - math_GaussSetIntegration anInt(Elem, Lower, Upper, Order); + math_GaussSetIntegration anInt(Elem, Lower, Upper, anOrder); MatrixElemts = anInt.Value(); } diff --git a/src/FairCurve/FairCurve_Batten.cxx b/src/FairCurve/FairCurve_Batten.cxx index 4578593abe..c5507f7edf 100644 --- a/src/FairCurve/FairCurve_Batten.cxx +++ b/src/FairCurve/FairCurve_Batten.cxx @@ -425,16 +425,16 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1, } NewBS -> InsertKnots(NKnots->Array1(), NMults->Array1(), 1.e-10); - Handle(TColgp_HArray1OfPnt2d) NPoles = + Handle(TColgp_HArray1OfPnt2d) NewNPoles = new TColgp_HArray1OfPnt2d(1, NewBS->NbPoles()); - NewBS -> Poles( NPoles->ChangeArray1() ); + NewBS -> Poles(NewNPoles->ChangeArray1() ); NewBS -> Multiplicities( NMults->ChangeArray1() ); NewBS -> Knots( NKnots->ChangeArray1() ); Handle(TColStd_HArray1OfReal) FKnots = new TColStd_HArray1OfReal (1, NewBS->NbPoles() + Degree+1); NewBS -> KnotSequence( FKnots->ChangeArray1()); - Poles = NPoles; + Poles = NewNPoles; Mults = NMults; Knots = NKnots; Flatknots = FKnots; diff --git a/src/FairCurve/FairCurve_MinimalVariation.cxx b/src/FairCurve/FairCurve_MinimalVariation.cxx index 9336d6cf3b..002e2188f7 100644 --- a/src/FairCurve/FairCurve_MinimalVariation.cxx +++ b/src/FairCurve/FairCurve_MinimalVariation.cxx @@ -407,16 +407,16 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1, } NewBS -> InsertKnots(NKnots->Array1(), NMults->Array1(), 1.e-10); - Handle(TColgp_HArray1OfPnt2d) NPoles = + Handle(TColgp_HArray1OfPnt2d) NewNPoles = new TColgp_HArray1OfPnt2d(1, NewBS->NbPoles()); - NewBS -> Poles( NPoles->ChangeArray1() ); + NewBS -> Poles(NewNPoles->ChangeArray1() ); NewBS -> Multiplicities( NMults->ChangeArray1() ); NewBS -> Knots( NKnots->ChangeArray1() ); Handle(TColStd_HArray1OfReal) FKnots = new TColStd_HArray1OfReal (1, NewBS->NbPoles() + Degree+1); NewBS -> KnotSequence( FKnots->ChangeArray1()); - Poles = NPoles; + Poles = NewNPoles; Mults = NMults; Knots = NKnots; Flatknots = FKnots; diff --git a/src/FilletSurf/FilletSurf_InternalBuilder.cxx b/src/FilletSurf/FilletSurf_InternalBuilder.cxx index 9c526117f4..c07838e613 100644 --- a/src/FilletSurf/FilletSurf_InternalBuilder.cxx +++ b/src/FilletSurf/FilletSurf_InternalBuilder.cxx @@ -239,15 +239,15 @@ Standard_Integer FilletSurf_InternalBuilder::Add(const TopTools_ListOfShape& E, } if(!periodic && yatrou) return 2; if(periodic && yatrou){ - Standard_Boolean vraitrou = 0, debut = 0; + Standard_Boolean vraitrou = 0, aLocalDebut = 0; for(Standard_Integer i = sp->NbEdges(); i > yatrou; i--){ TopoDS_Edge cured = sp->Edges(i); if(isinlist(cured,E)){ if(vraitrou) return 2; newsp->PutInFirst(cured); } - else if(debut) vraitrou = 1; - debut = 1; + else if(aLocalDebut) vraitrou = 1; + aLocalDebut = 1; } } diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx index ba5b6586b6..3e9260fdef 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx @@ -389,7 +389,7 @@ parcen3(1,8) cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius); // ======================================================= #ifdef OCCT_DEBUG - gp_Dir2d dc1(center1.XY()-Center.XY()); + gp_Dir2d aDC1(center1.XY()-Center.XY()); #endif gp_Dir2d dc2(origin2.XY()-Center.XY()); Standard_Real distcc1 = Center.Distance(center1); diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx index 5d66550a22..3c0a921d4e 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx @@ -106,21 +106,21 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 , ElCLib::D1(Ufirst(1),L1,point1,Tan1); Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2,Tan2); gp_Vec2d Tan3(OnLine.Direction().XY()); - gp_Pnt2d point3(OnLine.Location().XY()+Ufirst(3)*Tan3.XY()); - Standard_Real dist1 = point3.Distance(point1); - Standard_Real dist2 = point3.Distance(point2); + gp_Pnt2d point3new(OnLine.Location().XY()+Ufirst(3)*Tan3.XY()); + Standard_Real dist1 = point3new.Distance(point1); + Standard_Real dist2 = point3new.Distance(point2); if ( Abs(dist1-dist2)/2. <= Tol) { - cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); + cirsol = gp_Circ2d(gp_Ax2d(point3new,dirx),(dist1+dist2)/2.); Standard_Real normetan2 = Tan2.Magnitude(); - gp_Vec2d Vec1(point1,point3); - gp_Vec2d Vec2(point2,point3); + gp_Vec2d Vec1(point1,point3new); + gp_Vec2d Vec2(point2,point3new); Standard_Real normevec2 = Vec2.Magnitude(); Standard_Real angle2; if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) { angle2 = Vec2.Angle(Tan2); } else { angle2 = 0.; } - Standard_Real pscal=point3.XY().Dot(gp_XY(-L1.Direction().Y(), + Standard_Real pscal=point3new.XY().Dot(gp_XY(-L1.Direction().Y(), L1.Direction().X())); if (Qualified1.IsUnqualified() || (Qualified1.IsOutside() && pscal <= 0.) || @@ -137,7 +137,7 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 , pnttg2sol = point2; pararg2 = Ufirst(2); par2sol = ElCLib::Parameter(cirsol,pnttg2sol); - pntcen = point3; + pntcen = point3new; parcen3 = Ufirst(3); WellDone = Standard_True; } @@ -207,15 +207,15 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 , Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1,Tan1); Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2,Tan2); gp_Vec2d Tan3(OnLine.Direction().XY()); - gp_Pnt2d point3(OnLine.Location().XY()+Ufirst(3)*Tan3.XY()); - Standard_Real dist1 = point3.Distance(point1); - Standard_Real dist2 = point3.Distance(point2); + gp_Pnt2d point3new(OnLine.Location().XY()+Ufirst(3)*Tan3.XY()); + Standard_Real dist1 = point3new.Distance(point1); + Standard_Real dist2 = point3new.Distance(point2); if ( Abs(dist1-dist2)/2. <= Tol) { - cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); + cirsol = gp_Circ2d(gp_Ax2d(point3new,dirx),(dist1+dist2)/2.); Standard_Real normetan1 = Tan1.Magnitude(); Standard_Real normetan2 = Tan2.Magnitude(); - gp_Vec2d Vec1(point1,point3); - gp_Vec2d Vec2(point2,point3); + gp_Vec2d Vec1(point1,point3new); + gp_Vec2d Vec2(point2,point3new); Standard_Real normevec1 = Vec1.Magnitude(); Standard_Real normevec2 = Vec2.Magnitude(); Standard_Real angle1,angle2; @@ -243,7 +243,7 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 , pnttg2sol = point2; pararg2 = Ufirst(2); par2sol = ElCLib::Parameter(cirsol,pnttg2sol); - pntcen = point3; + pntcen = point3new; parcen3 = Ufirst(3); WellDone = Standard_True; } @@ -300,16 +300,16 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 , Func.Value(Ufirst,Umin); if (Root.IsDone()) { Root.Root(Ufirst); - gp_Pnt2d point1,point3; + gp_Pnt2d point1new,point3new; gp_Vec2d Tan1,Tan3; - Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1,Tan1); - ElCLib::D1(Ufirst(2),OnLine,point3,Tan3); - Standard_Real dist1 = point3.Distance(point1); - Standard_Real dist2 = point3.Distance(Point2); + Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1new,Tan1); + ElCLib::D1(Ufirst(2),OnLine,point3new,Tan3); + Standard_Real dist1 = point3new.Distance(point1new); + Standard_Real dist2 = point3new.Distance(Point2); if ( Abs(dist1-dist2)/2. <= Tol) { - cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); + cirsol = gp_Circ2d(gp_Ax2d(point3new,dirx),(dist1+dist2)/2.); Standard_Real normetan1 = Tan1.Magnitude(); - gp_Vec2d Vec1(point1,point3); + gp_Vec2d Vec1(point1new,point3new); Standard_Real normevec1 = Vec1.Magnitude(); Standard_Real angle1; if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) { @@ -322,13 +322,13 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 , (Qualified1.IsEnclosed() && angle1 <= 0.)) { qualifier1 = Qualified1.Qualifier(); qualifier2 = GccEnt_noqualifier; - pnttg1sol = point1; + pnttg1sol = point1new; pararg1 = Ufirst(1); par1sol = ElCLib::Parameter(cirsol,pnttg1sol); pnttg2sol = Point2; pararg2 = Ufirst(2); par2sol = ElCLib::Parameter(cirsol,pnttg2sol); - pntcen = point3; + pntcen = point3new; parcen3 = Ufirst(3); WellDone = Standard_True; } @@ -607,21 +607,21 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 , Func.Value(Ufirst,Umin); if (Root.IsDone()) { Root.Root(Ufirst); - gp_Pnt2d point1,point2; + gp_Pnt2d point1new,point2new; gp_Vec2d Tan1,Tan2; - ElCLib::D1(Ufirst(1),L1,point1,Tan1); - Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2,Tan2); + ElCLib::D1(Ufirst(1),L1,point1new,Tan1); + Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2new,Tan2); #ifdef OCCT_DEBUG gp_Vec2d Tan3(-Sin(Ufirst(3)),Cos(Ufirst(3))); #endif point3 = ElCLib::Value(Ufirst(3),OnCirc); - Standard_Real dist1 = point3.Distance(point1); - Standard_Real dist2 = point3.Distance(point2); + Standard_Real dist1 = point3.Distance(point1new); + Standard_Real dist2 = point3.Distance(point2new); if ( Abs(dist1-dist2)/2. <= Tol) { cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); Standard_Real normetan2 = Tan2.Magnitude(); - gp_Vec2d Vec1(point1,point3); - gp_Vec2d Vec2(point2,point3); + gp_Vec2d Vec1(point1new,point3); + gp_Vec2d Vec2(point2new,point3); Standard_Real normevec2 = Vec2.Magnitude(); Standard_Real angle2; if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) { @@ -639,10 +639,10 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 , (Qualified2.IsEnclosed() && angle2 <= 0.)) { qualifier1 = Qualified1.Qualifier(); qualifier2 = Qualified2.Qualifier(); - pnttg1sol = point1; + pnttg1sol = point1new; pararg1 = Ufirst(1); par1sol = ElCLib::Parameter(cirsol,pnttg1sol); - pnttg2sol = point2; + pnttg2sol = point2new; pararg2 = Ufirst(2); par2sol = ElCLib::Parameter(cirsol,pnttg2sol); pntcen = point3; @@ -813,16 +813,16 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 , Func.Value(Ufirst,Umin); if (Root.IsDone()) { Root.Root(Ufirst); - gp_Pnt2d point1,point3; + gp_Pnt2d point1new,point3new; gp_Vec2d Tan1,Tan3; - Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1,Tan1); - ElCLib::D1(Ufirst(2),OnCirc,point3,Tan3); - Standard_Real dist1 = point3.Distance(point1); - Standard_Real dist2 = point3.Distance(Point2); + Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1new,Tan1); + ElCLib::D1(Ufirst(2),OnCirc,point3new,Tan3); + Standard_Real dist1 = point3new.Distance(point1new); + Standard_Real dist2 = point3new.Distance(Point2); if ( Abs(dist1-dist2)/2. <= Tol) { - cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); + cirsol = gp_Circ2d(gp_Ax2d(point3new,dirx),(dist1+dist2)/2.); Standard_Real normetan1 = Tan1.Magnitude(); - gp_Vec2d Vec1(point1,point3); + gp_Vec2d Vec1(point1new,point3new); Standard_Real normevec1 = Vec1.Magnitude(); Standard_Real angle1; if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) { @@ -835,13 +835,13 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 , (Qualified1.IsEnclosed() && angle1 <= 0.)) { qualifier1 = Qualified1.Qualifier(); qualifier2 = GccEnt_noqualifier; - pnttg1sol = point1; + pnttg1sol = point1new; pararg1 = Ufirst(1); par1sol = ElCLib::Parameter(cirsol,pnttg1sol); pnttg2sol = Point2; pararg2 = 0.; par2sol = ElCLib::Parameter(cirsol,pnttg2sol); - pntcen = point3; + pntcen = point3new; parcen3 = Ufirst(3); WellDone = Standard_True; } diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx index 1177e55c28..bc5f03352c 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx @@ -837,7 +837,7 @@ pararg2(1,aNbSolMAX) firstparam = Max(Geom2dGcc_CurveToolGeo::FirstParameter(C1),thefirst); lastparam = Min(Geom2dGcc_CurveToolGeo::LastParameter(C1),thelast); #ifdef OCCT_DEBUG - IntRes2d_Domain D2(Geom2dGcc_CurveToolGeo::Value(C1,firstparam),firstparam,Tol, + IntRes2d_Domain D2C1(Geom2dGcc_CurveToolGeo::Value(C1,firstparam),firstparam,Tol, Geom2dGcc_CurveToolGeo::Value(C1,lastparam),lastparam,Tol); #else Geom2dGcc_CurveToolGeo::Value(C1,firstparam); @@ -849,7 +849,7 @@ pararg2(1,aNbSolMAX) firstparam = Max(Geom2dGcc_CurveToolGeo::FirstParameter(C2),thefirst); lastparam = Min(Geom2dGcc_CurveToolGeo::LastParameter(C2),thelast); #ifdef OCCT_DEBUG - IntRes2d_Domain D2(Geom2dGcc_CurveToolGeo::Value(C2,firstparam),firstparam,Tol, + IntRes2d_Domain D2C2(Geom2dGcc_CurveToolGeo::Value(C2,firstparam),firstparam,Tol, Geom2dGcc_CurveToolGeo::Value(C2,lastparam),lastparam,Tol); #else Geom2dGcc_CurveToolGeo::Value(C2,firstparam); diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx index 7b8fff7adf..15843989b1 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx @@ -630,8 +630,6 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedLin& Qualified1 , if (Qualified1.IsUnqualified() || (Qualified1.IsOutside() && pscal <= 0.) || (Qualified1.IsEnclosed() && pscal >= 0.)) { - Standard_Real pscal=centre.XY().Dot(gp_XY(-L1.Direction().Y(), - L1.Direction().X())); gp_Vec2d Tan1(L1.Direction().XY()); gp_Vec2d Tan2(L2.Direction().XY()); Standard_Real normetan1 = Tan1.Magnitude(); diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index 3393e203b4..cf6ca4f4f7 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -262,8 +262,6 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const else if ( S == GeomAbs_C2) Cont = 2; else if ( S == GeomAbs_C3) Cont = 3; else Cont = myBspl->Degree(); - Standard_Integer FirstIndex = myBspl->FirstUKnotIndex(); - Standard_Integer LastIndex = myBspl->LastUKnotIndex(); Standard_Integer Degree = myBspl->Degree(); Standard_Integer NbKnots = myBspl->NbKnots(); TColStd_Array1OfInteger Mults (1, NbKnots); @@ -386,8 +384,6 @@ void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, else if ( S == GeomAbs_C2) Cont = 2; else if ( S == GeomAbs_C3) Cont = 3; else Cont = myBspl->Degree(); - Standard_Integer FirstIndex = myBspl->FirstUKnotIndex(); - Standard_Integer LastIndex = myBspl->LastUKnotIndex(); Standard_Integer Degree = myBspl->Degree(); Standard_Integer NbKnots = myBspl->NbKnots(); TColStd_Array1OfInteger Mults (1, NbKnots); diff --git a/src/GeomConvert/GeomConvert_1.cxx b/src/GeomConvert/GeomConvert_1.cxx index 322d6f241d..c9be974e74 100644 --- a/src/GeomConvert/GeomConvert_1.cxx +++ b/src/GeomConvert/GeomConvert_1.cxx @@ -363,10 +363,10 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface Handle(Geom_Surface) Surf = Strim->BasisSurface(); UFirst = U1; ULast = U2; VFirst = V1; VLast = V2; if (Surf->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) { - Handle(Geom_OffsetSurface) OffsetSur = + Handle(Geom_OffsetSurface) OffsetSurBasis = Handle(Geom_OffsetSurface)::DownCast(Surf); - S = OffsetSur->Surface(); + S = OffsetSurBasis->Surface(); if (!S.IsNull()) { Surf = S; } @@ -374,11 +374,11 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface } if (Surf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { - Handle(Geom_RectangularTrimmedSurface) Strim = new + Handle(Geom_RectangularTrimmedSurface) aStrim = new (Geom_RectangularTrimmedSurface) (Surf, UFirst, ULast, VFirst, VLast); - return SurfaceToBSplineSurface(Strim); + return SurfaceToBSplineSurface(aStrim); } if (Surf->IsKind(STANDARD_TYPE(Geom_Plane))) { diff --git a/src/GeomFill/GeomFill_LocationDraft.cxx b/src/GeomFill/GeomFill_LocationDraft.cxx index e69d8df7a9..e912fab441 100644 --- a/src/GeomFill/GeomFill_LocationDraft.cxx +++ b/src/GeomFill/GeomFill_LocationDraft.cxx @@ -612,14 +612,14 @@ GeomFill_LocationDraft::GeomFill_LocationDraft E.DerivTX(DN, myAngle, D2EDTDX); // d2E/dtdx math_Vector D2SDT2(1,3,0); // d2s/dt2 - math_Matrix T(1,3,1,3,0); - D2EDX2.Multiply(DSDT,T); + math_Matrix aT(1,3,1,3,0); + D2EDX2.Multiply(DSDT,aT); // resolution du syst. lin. math_Gauss Ga1 (DEDX); if (Ga1.IsDone()) { - Ga1.Solve ( -T*DSDT - 2*D2EDTDX*DSDT - D2EDT2 , D2SDT2); + Ga1.Solve ( -aT*DSDT - 2*D2EDTDX*DSDT - D2EDT2 , D2SDT2); gp_Vec2d d2p (D2SDT2(2), D2SDT2(3)); // surface gp_Vec2d d2q (D2SDT2(1), 0); // courbe D2Poles2d.SetValue(1, d2p); diff --git a/src/GeomFill/GeomFill_Profiler.cxx b/src/GeomFill/GeomFill_Profiler.cxx index 7da48e3772..5488bc3501 100644 --- a/src/GeomFill/GeomFill_Profiler.cxx +++ b/src/GeomFill/GeomFill_Profiler.cxx @@ -101,8 +101,8 @@ void UnifyBySettingMiddleKnots(TColGeom_SequenceOfCurve& theCurves) Standard_Real aMidKnot = 0.; for (i = 1; i <= theCurves.Length(); i++) { - Handle(Geom_BSplineCurve) C = Handle(Geom_BSplineCurve)::DownCast(theCurves(i)); - aMidKnot += C->Knot(j); + Handle(Geom_BSplineCurve) Ctemp = Handle(Geom_BSplineCurve)::DownCast(theCurves(i)); + aMidKnot += Ctemp->Knot(j); } aMidKnot /= theCurves.Length(); NewKnots(j) = aMidKnot; @@ -110,8 +110,8 @@ void UnifyBySettingMiddleKnots(TColGeom_SequenceOfCurve& theCurves) for (i = 1; i <= theCurves.Length(); i++) { - Handle(Geom_BSplineCurve) C = Handle(Geom_BSplineCurve)::DownCast(theCurves(i)); - C->SetKnots(NewKnots); + Handle(Geom_BSplineCurve) Cres = Handle(Geom_BSplineCurve)::DownCast(theCurves(i)); + Cres->SetKnots(NewKnots); } } diff --git a/src/GeomFill/GeomFill_QuasiAngularConvertor.cxx b/src/GeomFill/GeomFill_QuasiAngularConvertor.cxx index e309e27f8f..ad72be825b 100644 --- a/src/GeomFill/GeomFill_QuasiAngularConvertor.cxx +++ b/src/GeomFill/GeomFill_QuasiAngularConvertor.cxx @@ -373,7 +373,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt, D2Px(1, Ordre), D2Py(1, Ordre), D2W(1, Ordre); Standard_Integer ii; - Standard_Real aux, daux, b, b2, c, c2, bpr, bsc; + Standard_Real daux, b, b2, c, c2, bpr, bsc; gp_Vec V1(Center, FirstPnt), V1Prim, V1Secn, V2; // Calcul des transformations @@ -481,7 +481,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt, + 2*betaprim * tan_b * dtan_b; b2 = tan_b - beta; b += beta / (3*b2); - aux = betaprim*tan_b - beta*dtan_b; + Standard_Real aux = betaprim*tan_b - beta*dtan_b; bpr += aux / (3*b2*b2); daux = betasecn*tan_b - beta*d2tan_b; bsc += (daux - 2*aux*betaprim*tan_b*tan_b/b2)/(3*b2*b2); diff --git a/src/GeomFill/GeomFill_SectionPlacement.cxx b/src/GeomFill/GeomFill_SectionPlacement.cxx index 27cc057988..0af4b9919e 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.cxx +++ b/src/GeomFill/GeomFill_SectionPlacement.cxx @@ -465,12 +465,11 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path, if (Intersector.IsDone()) { Standard_Real w; - gp_Pnt P; Standard_Real aDist; for (ii=1; ii<=Intersector.NbPoints(); ii++) { w = Intersector.Point(ii).W(); - P = Path->Value( w ); + P = Path->Value( w ); aDist = P.Distance( TheAxe.Location() ); if (aDist < DistCenter) { diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx index ffab862043..9bdd064423 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx @@ -272,14 +272,14 @@ Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada ProjLib_CompProjectedCurve Projector(hsur, Curv, myTol3d/10, myTol3d/10); - Standard_Real Udeb, Ufin, ProjUdeb, ProjUfin; - Udeb = Curv->FirstParameter(); - Ufin = Curv->LastParameter(); + Standard_Real UdebCheck, UfinCheck, ProjUdeb, ProjUfin; + UdebCheck = Curv->FirstParameter(); + UfinCheck = Curv->LastParameter(); Projector.Bounds( 1, ProjUdeb, ProjUfin ); if (Projector.NbCurves() != 1 || - Abs( Udeb-ProjUdeb ) > Precision::PConfusion() || - Abs( Ufin-ProjUfin ) > Precision::PConfusion()) + Abs( UdebCheck -ProjUdeb ) > Precision::PConfusion() || + Abs( UfinCheck -ProjUfin ) > Precision::PConfusion()) { if (Projector.IsSinglePnt(1, P2d)) { @@ -506,18 +506,17 @@ void GeomPlate_BuildPlateSurface::Perform() Standard_Real u1,v1,u2,v2; mySurfInit->Bounds(u1,v1,u2,v2); - GeomAdaptor_Surface Surf(mySurfInit); - myTolU = Surf.UResolution(myTol3d); - myTolV = Surf.VResolution(myTol3d); - myProj.Initialize(Surf,u1,v1,u2,v2, + GeomAdaptor_Surface aSurfInit(mySurfInit); + myTolU = aSurfInit.UResolution(myTol3d); + myTolV = aSurfInit.VResolution(myTol3d); + myProj.Initialize(aSurfInit,u1,v1,u2,v2, myTolU,myTolV); //====================================================================== // Projection des courbes //====================================================================== - Standard_Integer i; Standard_Boolean Ok = Standard_True; - for (i = 1; i <= NTLinCont; i++) + for (Standard_Integer i = 1; i <= NTLinCont; i++) if(myLinCont->Value(i)->Curve2dOnSurf().IsNull()) { Handle( Geom2d_Curve ) Curve2d = ProjectCurve( myLinCont->Value(i)->Curve3d() ); @@ -545,7 +544,7 @@ void GeomPlate_BuildPlateSurface::Perform() myTolU,myTolV); Ok = Standard_True; - for (i = 1; i <= NTLinCont; i++) + for (Standard_Integer i = 1; i <= NTLinCont; i++) { Handle( Geom2d_Curve ) Curve2d = ProjectCurve( myLinCont->Value(i)->Curve3d() ); if (Curve2d.IsNull()) @@ -560,18 +559,18 @@ void GeomPlate_BuildPlateSurface::Perform() mySurfInit = myPlanarSurfInit; mySurfInit->Bounds(u1,v1,u2,v2); - GeomAdaptor_Surface Surf(mySurfInit); - myTolU = Surf.UResolution(myTol3d); - myTolV = Surf.VResolution(myTol3d); - myProj.Initialize(Surf,u1,v1,u2,v2, + GeomAdaptor_Surface SurfNew(mySurfInit); + myTolU = SurfNew.UResolution(myTol3d); + myTolV = SurfNew.VResolution(myTol3d); + myProj.Initialize(SurfNew,u1,v1,u2,v2, myTolU,myTolV); - for (i = 1; i <= NTLinCont; i++) + for (Standard_Integer i = 1; i <= NTLinCont; i++) myLinCont->ChangeValue(i)-> SetCurve2dOnSurf(ProjectCurve( myLinCont->Value(i)->Curve3d() ) ); } else { // Project the points - for ( i=1;i<=NTPntCont;i++) { + for (Standard_Integer i=1; i<=NTPntCont; i++) { gp_Pnt P; myPntCont->Value(i)->D0(P); myPntCont->ChangeValue(i)->SetPnt2dOnSurf(ProjectPoint(P)); @@ -582,7 +581,7 @@ void GeomPlate_BuildPlateSurface::Perform() //====================================================================== // Projection des points //====================================================================== - for ( i=1;i<=NTPntCont;i++) { + for (Standard_Integer i=1;i<=NTPntCont;i++) { if (! myPntCont->Value(i)->HasPnt2dOnSurf()) { gp_Pnt P; myPntCont->Value(i)->D0(P); @@ -1808,10 +1807,10 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, { Standard_Real coin; Standard_Real Tol= 100 * myTol3d; Standard_Real A1; - gp_Pnt2d P1,P2; + gp_Pnt2d P1temp,P2temp; gp_Vec2d V1,V2; - myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1, V1); - myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2, V2); + myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1temp, V1); + myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2temp, V2); A1 = V1.Angle(V2); if (A1>(M_PI/2)) A1= M_PI - A1; @@ -1862,10 +1861,10 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, Standard_Real coin; Standard_Real Tol= 100 * myTol3d; Standard_Real A1; - gp_Pnt2d P1,P2; + gp_Pnt2d P1temp,P2temp; gp_Vec2d V1,V2; - myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1, V1); - myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2, V2); + myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1temp, V1); + myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2temp, V2); A1 = V1.Angle( V2 ); if (A1 > M_PI/2) A1= M_PI - A1; @@ -2298,7 +2297,6 @@ void GeomPlate_BuildPlateSurface::LoadPoint(const Standard_Integer , Standard_Integer NTPntCont=myPntCont->Length(); Standard_Integer Tang, i; // gp_Vec V1,V2,V3,V4,V5,V6,V7,V8,V9,V10; - gp_Vec V1,V2,V3,V4; // Chargement des points de contraintes ponctuel for (i=1;i<=NTPntCont;i++) { @@ -2312,6 +2310,7 @@ void GeomPlate_BuildPlateSurface::LoadPoint(const Standard_Integer , myPlate.Load(PC); Tang = Min(myPntCont->Value(i)->Order(), OrderMax); if (Tang==1) {// ==1 + gp_Vec V1,V2,V3,V4; myPntCont->Value(i)->D1(PP,V1,V2); mySurfInit->D1(P2d.Coord(1),P2d.Coord(2),PP,V3,V4); Plate_D1 D1final(V1.XYZ(),V2.XYZ()); diff --git a/src/GeometryTest/GeometryTest_API2dCommands.cxx b/src/GeometryTest/GeometryTest_API2dCommands.cxx index 39c7748325..fb0a522eae 100644 --- a/src/GeometryTest/GeometryTest_API2dCommands.cxx +++ b/src/GeometryTest/GeometryTest_API2dCommands.cxx @@ -131,11 +131,11 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch dout << mark; - for (Standard_Integer i = 2; i<=Nb; i++) { + for (Standard_Integer j = 2; j<=Nb; j++) { dout.Select(id,XX,YY,b); - Points(i) = gp_Pnt2d( ((Standard_Real)XX)/zoom, + Points(j) = gp_Pnt2d( ((Standard_Real)XX)/zoom, ((Standard_Real)YY)/zoom ); - mark = new Draw_Marker2D( Points(i), Draw_X, Draw_vert); + mark = new Draw_Marker2D( Points(j), Draw_X, Draw_vert); dout << mark; } } diff --git a/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx b/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx index e359cabec9..b1925023f5 100644 --- a/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx @@ -161,9 +161,9 @@ static Standard_Integer PointsByPick AppDef_MultiPointConstraint mpc(1,0); MPC->ChangeArray1().Init(mpc); for (i=1; i<=ThePoints.Length(); i++) { - AppDef_MultiPointConstraint mpc(1,0); - mpc.SetPoint(1, ThePoints.Value(i)); - MPC->SetValue(i, mpc); + AppDef_MultiPointConstraint aLocalMpc(1,0); + aLocalMpc.SetPoint(1, ThePoints.Value(i)); + MPC->SetValue(i, aLocalMpc); } } diff --git a/src/GeomliteTest/GeomliteTest_CurveCommands.cxx b/src/GeomliteTest/GeomliteTest_CurveCommands.cxx index 1a0cc33b6b..54f44e5dcd 100644 --- a/src/GeomliteTest/GeomliteTest_CurveCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_CurveCommands.cxx @@ -921,15 +921,15 @@ static Standard_Integer cfindp (Draw_Interpretor& , Standard_Integer n, const ch if (!DBs.IsNull()) DBs->FindPole( x, y, d, 5, Index); else { - Handle(DrawTrSurf_BezierCurve2d) DBz = + Handle(DrawTrSurf_BezierCurve2d) DBz2d = Handle(DrawTrSurf_BezierCurve2d)::DownCast(D); - if( !DBz.IsNull()) - DBz->FindPole( x, y, d, 5, Index); + if( !DBz2d.IsNull()) + DBz2d->FindPole( x, y, d, 5, Index); else { - Handle(DrawTrSurf_BSplineCurve2d) DBs = + Handle(DrawTrSurf_BSplineCurve2d) DBs2d = Handle(DrawTrSurf_BSplineCurve2d)::DownCast(D); - if (!DBs.IsNull()) - DBs->FindPole( x, y, d, 5, Index); + if (!DBs2d.IsNull()) + DBs2d->FindPole( x, y, d, 5, Index); else return 1; } diff --git a/src/HLRBRep/HLRBRep_Data.cxx b/src/HLRBRep/HLRBRep_Data.cxx index d8e53fdc42..4d73476be6 100644 --- a/src/HLRBRep/HLRBRep_Data.cxx +++ b/src/HLRBRep/HLRBRep_Data.cxx @@ -826,12 +826,12 @@ void HLRBRep_Data::Update (const HLRAlgo_Projector& P) myFEOutLine = myFaceItr1.OutLine (); myFEInternal = myFaceItr1.Internal (); myFEDouble = myFaceItr1.Double (); - HLRBRep_EdgeData* ed = &(myEData(myFE)); + HLRBRep_EdgeData* EDataFE1 = &(myEData(myFE)); if (!myFEDouble && (myFEOri == TopAbs_FORWARD || myFEOri == TopAbs_REVERSED)) { - myFEGeom = &(ed->ChangeGeometry()); - const HLRBRep_Curve& EC = ed->Geometry(); + myFEGeom = &(EDataFE1->ChangeGeometry()); + const HLRBRep_Curve& EC = EDataFE1->Geometry(); p = EC.Parameter3d((EC.LastParameter () + EC.FirstParameter()) / 2); if (HLRBRep_EdgeFaceTool::UVPoint(p,myFEGeom,iFaceGeom,pu,pv)) { @@ -890,9 +890,9 @@ void HLRBRep_Data::Update (const HLRAlgo_Projector& P) myFaceItr1.MoreEdge(); myFaceItr1.NextEdge()) { myFE = myFaceItr1.Edge(); - HLRBRep_EdgeData* ed = &(myEData(myFE)); - if (!fd->Simple()) ed->AutoIntersectionDone(Standard_False); - HLRAlgo::DecodeMinMax(ed->MinMax(), + HLRBRep_EdgeData* EDataFE2 = &(myEData(myFE)); + if (!fd->Simple()) EDataFE2->AutoIntersectionDone(Standard_False); + HLRAlgo::DecodeMinMax(EDataFE2->MinMax(), (Standard_Address)EdgeMin, (Standard_Address)EdgeMax); if (myFaceItr1.BeginningOfWire()) diff --git a/src/HLRBRep/HLRBRep_HLRToShape.cxx b/src/HLRBRep/HLRBRep_HLRToShape.cxx index 8f6499f66f..b9cd3e1ed9 100644 --- a/src/HLRBRep/HLRBRep_HLRToShape.cxx +++ b/src/HLRBRep/HLRBRep_HLRToShape.cxx @@ -96,10 +96,10 @@ HLRBRep_HLRToShape::InternalCompound (const Standard_Integer typ, Exp.Next()) { Standard_Integer ie = Edges.FindIndex(Exp.Current()); if (ie != 0) { - HLRBRep_EdgeData& ed = DS->EDataArray().ChangeValue(ie); - if (!ed.Used()) { - DrawEdge(visible,Standard_False,typ,ed,Result,added,In3d); - ed.Used(Standard_True); + HLRBRep_EdgeData& EDataIE = DS->EDataArray().ChangeValue(ie); + if (!EDataIE.Used()) { + DrawEdge(visible,Standard_False,typ, EDataIE,Result,added,In3d); + EDataIE.Used(Standard_True); } } } @@ -111,13 +111,13 @@ HLRBRep_HLRToShape::InternalCompound (const Standard_Integer typ, DrawFace(visible,typ,iface,DS,Result,added,In3d); if (typ >= 3) { - HLRBRep_EdgeData* ed = &(DS->EDataArray().ChangeValue(e1 - 1)); + HLRBRep_EdgeData* EDataE11 = &(DS->EDataArray().ChangeValue(e1 - 1)); for (Standard_Integer ie = e1; ie <= e2; ie++) { - ed++; - if (!ed->Used()) { - DrawEdge(visible,Standard_False,typ,*ed,Result,added,In3d); - ed->Used(Standard_True); + EDataE11++; + if (!EDataE11->Used()) { + DrawEdge(visible,Standard_False,typ,*EDataE11,Result,added,In3d); + EDataE11->Used(Standard_True); } } } diff --git a/src/HLRBRep/HLRBRep_InternalAlgo.cxx b/src/HLRBRep/HLRBRep_InternalAlgo.cxx index 65bf867f53..23e299764a 100644 --- a/src/HLRBRep/HLRBRep_InternalAlgo.cxx +++ b/src/HLRBRep/HLRBRep_InternalAlgo.cxx @@ -865,7 +865,7 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I, */ //-- ====================================================================== if(nf>2) { - Standard_Integer i,ir,j,l; + Standard_Integer i,ir,k,l; Standard_Integer rra; l=(nf>>1)+1; ir=nf; @@ -882,28 +882,28 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I, } } i=l; - j=l+l; - while(j<=ir) { - if(j Val(Index(j+1))) - j++; - else if(Val(Index(j)) == Val(Index(j+1))) { - if(Size(Index(j)) > Size(Index(j+1))) - j++; + k=l+l; + while(k<=ir) { + if(k Val(Index(k+1))) + k++; + else if(Val(Index(k)) == Val(Index(k+1))) { + if(Size(Index(k)) > Size(Index(k+1))) + k++; } } - if(Val(rra) > Val(Index(j))) { - Index(i)=Index(j); - i=j; - j<<=1; + if(Val(rra) > Val(Index(k))) { + Index(i)=Index(k); + i=k; + k<<=1; } - else if((Val(rra) == Val(Index(j))) && (Size(rra) > Size(Index(j)))) { - Index(i)=Index(j); - i=j; - j<<=1; + else if((Val(rra) == Val(Index(k))) && (Size(rra) > Size(Index(k)))) { + Index(i)=Index(k); + i=k; + k<<=1; } else { - j=ir+1; + k=ir+1; } } Index(i)=rra; diff --git a/src/HLRBRep/HLRBRep_PolyAlgo.cxx b/src/HLRBRep/HLRBRep_PolyAlgo.cxx index 5d10e373af..9b8d75d870 100644 --- a/src/HLRBRep/HLRBRep_PolyAlgo.cxx +++ b/src/HLRBRep/HLRBRep_PolyAlgo.cxx @@ -938,9 +938,9 @@ void HLRBRep_PolyAlgo::StoreShell (const TopoDS_Shape& Shape, if (ShapeMap1.Add(E)) { Standard_Integer e = myEMap.FindIndex(E); ES(e) = iShell; - Standard_Integer i = EF.FindIndex(E); - if (i > 0) { - TopTools_ListOfShape& LS = EF(i); + Standard_Integer anIndexE = EF.FindIndex(E); + if (anIndexE > 0) { + TopTools_ListOfShape& LS = EF(anIndexE); InitBiPointsWithConnexity(e,E,List,PID,LS,Standard_True); } else { @@ -1312,10 +1312,10 @@ InitBiPointsWithConnexity (const Standard_Integer e, Nod11Indices = Nod12Indices; Nod11RValues = Nod12RValues; i1p2 = Pol1(iPol); - const Handle(HLRAlgo_PolyInternalNode)* pi1p2 = + const Handle(HLRAlgo_PolyInternalNode)* pi1p2iPol = &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol))); - Nod12Indices = (*pi1p2)->Indices(); - Nod12RValues = (*pi1p2)->RValues(); + Nod12Indices = (*pi1p2iPol)->Indices(); + Nod12RValues = (*pi1p2iPol)->RValues(); #ifdef OCCT_DEBUG if (DoError) { if (Nod11NrmX*Nod12NrmX + @@ -1387,7 +1387,7 @@ InitBiPointsWithConnexity (const Standard_Integer e, const TColStd_Array1OfInteger& Pol1 = HPol[0]->Nodes(); const TColStd_Array1OfInteger& Pol2 = HPol[1]->Nodes(); const Handle(TColStd_HArray1OfReal)& par = HPol[0]->Parameters(); - Standard_Integer nbPol = Pol1.Upper(); + Standard_Integer nbPol1 = Pol1.Upper(); Standard_Address TData1 = &pid1->TData(); Standard_Address PISeg1 = &pid1->PISeg(); Standard_Address PINod1 = &pid1->PINod(); @@ -1402,16 +1402,16 @@ InitBiPointsWithConnexity (const Standard_Integer e, &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(1 ))); Nod11Indices = (*pi1p1)->Indices(); Nod11RValues = (*pi1p1)->RValues(); - const Handle(HLRAlgo_PolyInternalNode)* pi1p2 = - &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(nbPol))); - Nod12Indices = (*pi1p2)->Indices(); - Nod12RValues = (*pi1p2)->RValues(); + const Handle(HLRAlgo_PolyInternalNode)* pi1p2nbPol1 = + &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(nbPol1))); + Nod12Indices = (*pi1p2nbPol1)->Indices(); + Nod12RValues = (*pi1p2nbPol1)->RValues(); const Handle(HLRAlgo_PolyInternalNode)* pi2p1 = &(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(1 ))); Nod21Indices = (*pi2p1)->Indices(); Nod21RValues = (*pi2p1)->RValues(); const Handle(HLRAlgo_PolyInternalNode)* pi2p2 = - &(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(nbPol))); + &(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(nbPol1))); Nod22Indices = (*pi2p2)->Indices(); Nod22RValues = (*pi2p2)->RValues(); Nod11Flag |= NMskVert; @@ -1419,7 +1419,7 @@ InitBiPointsWithConnexity (const Standard_Integer e, Nod21Flag |= NMskVert; Nod22Flag |= NMskVert; - for (iPol = 1; iPol <= nbPol; iPol++) { + for (iPol = 1; iPol <= nbPol1; iPol++) { const Handle(HLRAlgo_PolyInternalNode)* pi1pA = &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol))); Standard_Address Nod1AIndices = (*pi1pA)->Indices(); @@ -1467,22 +1467,22 @@ InitBiPointsWithConnexity (const Standard_Integer e, Nod12Flag |= NMskEdge; Nod22Flag |= NMskEdge; TIMultiply(XTI2,YTI2,ZTI2); - if (Pol1(1) == Pol1(nbPol) && myPC.IsPeriodic()) + if (Pol1(1) == Pol1(nbPol1) && myPC.IsPeriodic()) U2 = U2 - myPC.Period(); - if (nbPol == 2 && BRep_Tool::Degenerated(E)) { + if (nbPol1 == 2 && BRep_Tool::Degenerated(E)) { CheckDegeneratedSegment(Nod11Indices,Nod11RValues, Nod12Indices,Nod12RValues); CheckDegeneratedSegment(Nod21Indices,Nod21RValues, Nod22Indices,Nod22RValues); UpdateAroundNode(Pol1(1 ),Nod11Indices,TData1,PISeg1,PINod1); - UpdateAroundNode(Pol1(nbPol),Nod12Indices,TData1,PISeg1,PINod1); + UpdateAroundNode(Pol1(nbPol1),Nod12Indices,TData1,PISeg1,PINod1); UpdateAroundNode(Pol2(1 ),Nod21Indices,TData2,PISeg2,PINod2); - UpdateAroundNode(Pol2(nbPol),Nod22Indices,TData2,PISeg2,PINod2); + UpdateAroundNode(Pol2(nbPol1),Nod22Indices,TData2,PISeg2,PINod2); } else { - for (iPol = 2; iPol <= nbPol; iPol++) { + for (iPol = 2; iPol <= nbPol1; iPol++) { i1p1 = i1p2; Nod11Indices = Nod12Indices; Nod11RValues = Nod12RValues; @@ -1490,15 +1490,15 @@ InitBiPointsWithConnexity (const Standard_Integer e, Nod21Indices = Nod22Indices; Nod21RValues = Nod22RValues; i1p2 = Pol1(iPol); - const Handle(HLRAlgo_PolyInternalNode)* pi1p2 = + const Handle(HLRAlgo_PolyInternalNode)* pi1p2iPol = &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol))); - Nod12Indices = (*pi1p2)->Indices(); - Nod12RValues = (*pi1p2)->RValues(); + Nod12Indices = (*pi1p2iPol)->Indices(); + Nod12RValues = (*pi1p2iPol)->RValues(); i2p2 = Pol2(iPol); - const Handle(HLRAlgo_PolyInternalNode)* pi2p2 = + const Handle(HLRAlgo_PolyInternalNode)* pi2p2iPol = &(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(iPol))); - Nod22Indices = (*pi2p2)->Indices(); - Nod22RValues = (*pi2p2)->RValues(); + Nod22Indices = (*pi2p2iPol)->Indices(); + Nod22RValues = (*pi2p2iPol)->RValues(); #ifdef OCCT_DEBUG if (DoError) { if (Nod11NrmX*Nod12NrmX + @@ -1582,7 +1582,7 @@ InitBiPointsWithConnexity (const Standard_Integer e, TTMa[2][0] = ttma.Value(3,1); TTMa[2][1] = ttma.Value(3,2); TTMa[2][2] = ttma.Value(3,3); - Standard_Integer nbPol = Pol.Upper(); + Standard_Integer nbPol1 = Pol.Upper(); const gp_XYZ& P1 = Pol(1).XYZ(); X2 = P1.X(); Y2 = P1.Y(); @@ -1593,14 +1593,14 @@ InitBiPointsWithConnexity (const Standard_Integer e, ZTI2 = Z2; TIMultiply(XTI2,YTI2,ZTI2); - for (Standard_Integer iPol = 2; iPol <= nbPol; iPol++) { + for (Standard_Integer jPol = 2; jPol <= nbPol1; jPol++) { X1 = X2; Y1 = Y2; Z1 = Z2; XTI1 = XTI2; YTI1 = YTI2; ZTI1 = ZTI2; - const gp_XYZ& P2 = Pol(iPol).XYZ(); + const gp_XYZ& P2 = Pol(jPol).XYZ(); X2 = P2.X(); Y2 = P2.Y(); Z2 = P2.Z(); diff --git a/src/HLRBRep/HLRBRep_ShapeToHLR.cxx b/src/HLRBRep/HLRBRep_ShapeToHLR.cxx index d17769aefe..fd33f64773 100644 --- a/src/HLRBRep/HLRBRep_ShapeToHLR.cxx +++ b/src/HLRBRep/HLRBRep_ShapeToHLR.cxx @@ -218,12 +218,12 @@ HLRBRep_ShapeToHLR::ExploreFace(const Handle(HLRTopoBRep_OutLiner)& S, continue; ne++; Standard_Integer ie = EM.FindIndex(E); - TopAbs_Orientation orient = E.Orientation(); + TopAbs_Orientation anOrientE = E.Orientation(); Standard_Boolean Int = TopDS.IsIntLFaceEdge(F,E); Standard_Boolean Iso = TopDS.IsIsoLFaceEdge(F,E); Standard_Boolean Out = TopDS.IsOutLFaceEdge(F,E); Standard_Boolean Dbl = BRepTools::IsReallyClosed(TopoDS::Edge(E),theFace); - fd.SetWEdge(nw, ne, ie, orient, Out, Int, Dbl, Iso); + fd.SetWEdge(nw, ne, ie, anOrientE, Out, Int, Dbl, Iso); } } DS->FaceMap().Add(theFace); diff --git a/src/HLRTest/HLRTest_DrawableEdgeTool.cxx b/src/HLRTest/HLRTest_DrawableEdgeTool.cxx index 0bcb081c8e..91d18e88ba 100644 --- a/src/HLRTest/HLRTest_DrawableEdgeTool.cxx +++ b/src/HLRTest/HLRTest_DrawableEdgeTool.cxx @@ -94,15 +94,15 @@ HLRTest_DrawableEdgeTool::InternalDraw (Draw_Display& D, if (typ >= 3) { iCB = 1; e2 = 0; - HLRBRep_EdgeData* ed = &(DS->EDataArray().ChangeValue(0)); - ed++; + HLRBRep_EdgeData* anEdgeData = &(DS->EDataArray().ChangeValue(0)); + anEdgeData++; - for (Standard_Integer ie = 1; ie <= ne; ie++) { - if (!ed->Used()) { - DrawEdge(D,Standard_False,typ,nCB,ie,e2,iCB,*ed); - ed->Used(Standard_True); + for (Standard_Integer i = 1; i <= ne; i++) { + if (!anEdgeData->Used()) { + DrawEdge(D,Standard_False,typ,nCB,i,e2,iCB,*anEdgeData); + anEdgeData->Used(Standard_True); } - ed++; + anEdgeData++; } } } diff --git a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx index 176f87e67c..a673935bb4 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx @@ -495,7 +495,6 @@ void HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/, B.Range(E,first,last); if (!C2d.IsNull()) { - BRep_Builder B; B.UpdateEdge(E,C2d,F,BRep_Tool::Tolerance(F)); } diff --git a/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx b/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx index ece314c2e3..4ce3752920 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx @@ -226,13 +226,13 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI, for (Standard_Integer IDom = 1; IDom <= NbDom; IDom++) { const HatchGen_Domain& Dom = Hatcher.Domain (IndH, IDom); - Standard_Real U1 = Dom.HasFirstPoint() ? + Standard_Real U11 = Dom.HasFirstPoint() ? Dom.FirstPoint().Parameter() : VMin - Infinite; - Standard_Real U2 = Dom.HasSecondPoint() ? + Standard_Real U21 = Dom.HasSecondPoint() ? Dom.SecondPoint().Parameter() : VMax + Infinite; - IsoLine->D0 (U1, P); + IsoLine->D0 (U11, P); Surface.D0 (P.X(), P.Y(), P1); - IsoLine->D0 (U2, P); + IsoLine->D0 (U21, P); Surface.D0 (P.X(), P.Y(), P2); if (Dom.HasFirstPoint()) { // Iso U - Premier point const HatchGen_PointOnHatching& PntH = Dom.FirstPoint(); @@ -262,7 +262,7 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI, } if(!V1U.IsNull() && !V2U.IsNull()) HLRTopoBRep_FaceIsoLiner::MakeIsoLine - (F,IsoLine,V1U,V2U,U1,U2,Tolerance,DS); + (F,IsoLine,V1U,V2U,U11,U21,Tolerance,DS); } } @@ -320,13 +320,13 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI, for (Standard_Integer IDom = 1; IDom <= NbDom; IDom++) { const HatchGen_Domain& Dom = Hatcher.Domain (IndH, IDom); - Standard_Real U1 = Dom.HasFirstPoint() ? + Standard_Real U12 = Dom.HasFirstPoint() ? Dom.FirstPoint().Parameter() : VMin - Infinite; - Standard_Real U2 = Dom.HasSecondPoint() ? + Standard_Real U22 = Dom.HasSecondPoint() ? Dom.SecondPoint().Parameter() : VMax + Infinite; - IsoLine->D0 (U1, P); + IsoLine->D0 (U12, P); Surface.D0 (P.X(), P.Y(), P1); - IsoLine->D0 (U2, P); + IsoLine->D0 (U22, P); Surface.D0 (P.X(), P.Y(), P2); if (Dom.HasFirstPoint()) { // Iso V - Premier point const HatchGen_PointOnHatching& PntH = Dom.FirstPoint(); @@ -357,7 +357,7 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI, } if(!V1V.IsNull() && !V2V.IsNull()) HLRTopoBRep_FaceIsoLiner::MakeIsoLine - (F,IsoLine,V1V,V2V,U1,U2,Tolerance,DS); + (F,IsoLine,V1V,V2V,U12,U22,Tolerance,DS); } } diff --git a/src/IFSelect/IFSelect_SessionDumper.cxx b/src/IFSelect/IFSelect_SessionDumper.cxx index 3e45b6e067..23371803b4 100644 --- a/src/IFSelect/IFSelect_SessionDumper.cxx +++ b/src/IFSelect/IFSelect_SessionDumper.cxx @@ -26,7 +26,6 @@ static int cefait = 0; IFSelect_SessionDumper::IFSelect_SessionDumper () { - Handle(IFSelect_BasicDumper) bid; if (!cefait) { cefait = 1; Handle(IFSelect_BasicDumper) bid = new IFSelect_BasicDumper; } else thenext = thefirst; diff --git a/src/IGESCAFControl/IGESCAFControl_Reader.cxx b/src/IGESCAFControl/IGESCAFControl_Reader.cxx index 6f92fe6a59..90057515ae 100644 --- a/src/IGESCAFControl/IGESCAFControl_Reader.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Reader.cxx @@ -155,7 +155,6 @@ static void AddCompositeShape (const Handle(XCAFDoc_ShapeTool)& theSTool, { theSTool->AddShape( aSimpleShape, Standard_False, Standard_False ); TopoDS_Compound aNewShape; - BRep_Builder aB; aB.MakeCompound(aNewShape); aB.Add(aNewShape, aSimpleShape); aB.Add(aNewShape,aCompShape); diff --git a/src/IGESControl/IGESControl_IGESBoundary.cxx b/src/IGESControl/IGESControl_IGESBoundary.cxx index bbcae0ef7f..50e9b579f8 100644 --- a/src/IGESControl/IGESControl_IGESBoundary.cxx +++ b/src/IGESControl/IGESControl_IGESBoundary.cxx @@ -354,12 +354,12 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW, cout << "Warning: IGESToBRep_IGESBoundary: Curves " << i - 1 << " and " << i << " cannot be connected" << endl; #endif Gsewd3d = new ShapeExtend_WireData; - for (Standard_Integer i = 1; i <= len3d; i++) { + for (Standard_Integer j = 1; j <= len3d; j++) { if (usescurve) - Gsewd3d->Add (scurve3d->Edge (i)); + Gsewd3d->Add (scurve3d->Edge (j)); else { TopoDS_Shape Sh = - TC.TransferTopoCurve (Handle(IGESData_IGESEntity)::DownCast (seq3d->Value (i))); + TC.TransferTopoCurve (Handle(IGESData_IGESEntity)::DownCast (seq3d->Value (j))); if (!Sh.IsNull()) Gsewd3d->Add (Sh); } } @@ -367,8 +367,8 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW, ReverseCurves3d(Gsewd3d); } Gsewd2d = new ShapeExtend_WireData; - for (Standard_Integer i = 1; i <= len2d; i++) { - TopoDS_Shape Sh = TC.Transfer2dTopoCurve (Handle(IGESData_IGESEntity)::DownCast (seq2d->Value (i)), + for (Standard_Integer k = 1; k <= len2d; k++) { + TopoDS_Shape Sh = TC.Transfer2dTopoCurve (Handle(IGESData_IGESEntity)::DownCast (seq2d->Value (k)), myface, mytrsf, myuFact); if (!Sh.IsNull()) Gsewd2d->Add (Sh); } diff --git a/src/IGESConvGeom/IGESConvGeom.cxx b/src/IGESConvGeom/IGESConvGeom.cxx index 272fff21a1..5acd4e5ea2 100644 --- a/src/IGESConvGeom/IGESConvGeom.cxx +++ b/src/IGESConvGeom/IGESConvGeom.cxx @@ -350,7 +350,6 @@ Standard_Integer IGESConvGeom::SplineSurfaceFromIGES XPoly = st->XPolynomial(USeg, VSeg); YPoly = st->YPolynomial(USeg, VSeg); ZPoly = st->ZPolynomial(USeg, VSeg); - Standard_Real ParamU, ParamV; ParamU = 1.; for (i=Coef.LowerRow(); i<=Coef.UpperRow(); i++) { ParamV = 1.; @@ -368,35 +367,35 @@ Standard_Integer IGESConvGeom::SplineSurfaceFromIGES PLib::CoefficientsPoles(Coef,PLib::NoWeights2(),BzPole,PLib::NoWeights2()); // C0 check and correction for poles lying on isoparametrics U=0 & V=0 - Standard_Integer iBs = BsPole.LowerRow() + (USeg-1)*DegreeU; - Standard_Integer jBs = BsPole.LowerCol(); + Standard_Integer iBsPole = BsPole.LowerRow() + (USeg-1)*DegreeU; + Standard_Integer jBsPole = BsPole.LowerCol(); iBz = BzPole.LowerRow(); for (jBz=BzPole.LowerCol(); jBz<=BzPole.UpperCol(); jBz++) { - if (!BzPole.Value(iBz,jBz).IsEqual(BsPole.Value(iBs,jBs), epsgeom)) { + if (!BzPole.Value(iBz,jBz).IsEqual(BsPole.Value(iBsPole,jBsPole), epsgeom)) { wasC0=Standard_False; gp_Pnt MidPoint; Standard_Real XCoord = - 0.5 * (BzPole.Value(iBz,jBz).X() + BsPole.Value(iBs,jBs).X()); + 0.5 * (BzPole.Value(iBz,jBz).X() + BsPole.Value(iBsPole,jBsPole).X()); Standard_Real YCoord = - 0.5 * (BzPole.Value(iBz,jBz).Y() + BsPole.Value(iBs,jBs).Y()); + 0.5 * (BzPole.Value(iBz,jBz).Y() + BsPole.Value(iBsPole,jBsPole).Y()); Standard_Real ZCoord = - 0.5 * (BzPole.Value(iBz,jBz).Z() + BsPole.Value(iBs,jBs).Z()); + 0.5 * (BzPole.Value(iBz,jBz).Z() + BsPole.Value(iBsPole,jBsPole).Z()); MidPoint.SetCoord(XCoord, YCoord, ZCoord); - BsPole.SetValue(iBs, jBs++, MidPoint); + BsPole.SetValue(iBsPole, jBsPole++, MidPoint); } else { - BsPole.SetValue(iBs, jBs++, BzPole.Value(iBz,jBz)); + BsPole.SetValue(iBsPole, jBsPole++, BzPole.Value(iBz,jBz)); } } // Other poles (no check about C0) : - iBs++; - jBs = BsPole.LowerCol(); + iBsPole++; + jBsPole = BsPole.LowerCol(); for (iBz=BzPole.LowerRow()+1; iBz<=BzPole.UpperRow(); iBz++) { for (jBz=BzPole.LowerCol(); jBz<=BzPole.UpperCol(); jBz++) - BsPole.SetValue(iBs, jBs++, BzPole.Value(iBz,jBz)); - iBs++; - jBs = BsPole.LowerCol(); + BsPole.SetValue(iBsPole, jBsPole++, BzPole.Value(iBz,jBz)); + iBsPole++; + jBsPole = BsPole.LowerCol(); } } @@ -410,7 +409,6 @@ Standard_Integer IGESConvGeom::SplineSurfaceFromIGES XPoly = st->XPolynomial(USeg, VSeg); YPoly = st->YPolynomial(USeg, VSeg); ZPoly = st->ZPolynomial(USeg, VSeg); - Standard_Real ParamU, ParamV; ParamU = 1.; for (i=Coef.LowerRow(); i<=Coef.UpperRow(); i++) { ParamV = 1.; @@ -468,7 +466,6 @@ Standard_Integer IGESConvGeom::SplineSurfaceFromIGES XPoly = st->XPolynomial(USeg, VSeg); YPoly = st->YPolynomial(USeg, VSeg); ZPoly = st->ZPolynomial(USeg, VSeg); - Standard_Real ParamU, ParamV; ParamU = 1.; for (i=Coef.LowerRow(); i<=Coef.UpperRow(); i++) { ParamV = 1.; diff --git a/src/IntCurve/IntCurve_IntConicConic_1.cxx b/src/IntCurve/IntCurve_IntConicConic_1.cxx index ddb81dc5dc..d31ea86372 100644 --- a/src/IntCurve/IntCurve_IntConicConic_1.cxx +++ b/src/IntCurve/IntCurve_IntConicConic_1.cxx @@ -1452,7 +1452,6 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1 if((!ResultIsAPoint) && (Pos1a!=IntRes2d_Middle || Pos2a!=IntRes2d_Middle)) { - IntRes2d_Transition T1b,T2b; if(ProdVectTan>=TOLERANCE_ANGULAIRE) { //&&&&&&&&&&&&&& T1b.SetValue(Standard_False,Pos1b,IntRes2d_Out); T2b.SetValue(Standard_False,Pos2b,IntRes2d_In); @@ -1599,7 +1598,6 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& L1 PtSeg1.SetValues(ElCLib::Value(U2,L2),U1,U2,T1a,T2a,Standard_False); if((Pos1b!=IntRes2d_Middle || Pos2b!=IntRes2d_Middle)) { - IntRes2d_Transition T1b,T2b; if(ProdVectTan>=TOLERANCE_ANGULAIRE) { T1b.SetValue(Standard_False,Pos1b,IntRes2d_Out); T2b.SetValue(Standard_False,Pos2b,IntRes2d_In); diff --git a/src/IntImpParGen/IntImpParGen_Intersector.gxx b/src/IntImpParGen/IntImpParGen_Intersector.gxx index cadc9acb4d..756895caca 100644 --- a/src/IntImpParGen/IntImpParGen_Intersector.gxx +++ b/src/IntImpParGen/IntImpParGen_Intersector.gxx @@ -43,153 +43,153 @@ //====================================================================== void IntImpParGen_Intersector::And_Domaine_Objet1_Intersections(const ImpTool& TheImpTool, - const ParCurve& TheParCurve, - const IntRes2d_Domain& TheImpCurveDomain, - const IntRes2d_Domain& TheParCurveDomain, - Standard_Integer& NbResultats, - TColStd_Array1OfReal& Inter2_And_Domain2, - TColStd_Array1OfReal& Inter1, - TColStd_Array1OfReal& Resultat1, - TColStd_Array1OfReal& Resultat2, - const Standard_Real EpsNul) const { - - - Standard_Integer Nb_Bornes_Intersection=NbResultats; - NbResultats=0; - - for(Standard_Integer i=1; i<=Nb_Bornes_Intersection; i+=2) { - Standard_Real param1=Inter1.Value(i); - Standard_Real param2=Inter1.Value(i+1); - - Standard_Integer indice_1=i; - Standard_Integer indice_2=i+1; - - if(param1>param2) { - Standard_Real t=param1; param1=param2; param2=t; - indice_1=i+1; - indice_2=i; + const ParCurve& TheParCurve, + const IntRes2d_Domain& TheImpCurveDomain, + const IntRes2d_Domain& TheParCurveDomain, + Standard_Integer& NbResultats, + TColStd_Array1OfReal& Inter2_And_Domain2, + TColStd_Array1OfReal& Inter1, + TColStd_Array1OfReal& Resultat1, + TColStd_Array1OfReal& Resultat2, + const Standard_Real EpsNul) const { + + + Standard_Integer Nb_Bornes_Intersection = NbResultats; + NbResultats = 0; + + for (Standard_Integer i = 1; i <= Nb_Bornes_Intersection; i += 2) { + Standard_Real param1 = Inter1.Value(i); + Standard_Real param2 = Inter1.Value(i + 1); + + Standard_Integer indice_1 = i; + Standard_Integer indice_2 = i + 1; + + if (param1>param2) { + Standard_Real t = param1; param1 = param2; param2 = t; + indice_1 = i + 1; + indice_2 = i; } - gp_Pnt2d Pt1=TheImpTool.Value(param1); - gp_Pnt2d Pt2=TheImpTool.Value(param2); + gp_Pnt2d Pt1 = TheImpTool.Value(param1); + gp_Pnt2d Pt2 = TheImpTool.Value(param2); gp_Pnt2d Pt; - Standard_Boolean IsOnTheImpCurveDomain1=Standard_True; + Standard_Boolean IsOnTheImpCurveDomain1 = Standard_True; - Standard_Boolean IsOnTheImpCurveDomain2=Standard_True; + Standard_Boolean IsOnTheImpCurveDomain2 = Standard_True; //-------------------------------------------------------------------- - if(TheImpCurveDomain.HasFirstPoint()) { - if(param1 TheImpCurveDomain.FirstTolerance()) { - IsOnTheImpCurveDomain1=Standard_False; - } + if (TheImpCurveDomain.HasFirstPoint()) { + if (param1 TheImpCurveDomain.FirstTolerance()) { + IsOnTheImpCurveDomain1 = Standard_False; + } } } - if(IsOnTheImpCurveDomain1 && TheImpCurveDomain.HasLastPoint()) { - if(param1>TheImpCurveDomain.LastParameter()) { - if(Pt1.Distance(TheImpCurveDomain.LastPoint()) - > TheImpCurveDomain.FirstTolerance()) { - IsOnTheImpCurveDomain1=Standard_False; - } + if (IsOnTheImpCurveDomain1 && TheImpCurveDomain.HasLastPoint()) { + if (param1>TheImpCurveDomain.LastParameter()) { + if (Pt1.Distance(TheImpCurveDomain.LastPoint()) + > TheImpCurveDomain.FirstTolerance()) { + IsOnTheImpCurveDomain1 = Standard_False; + } } } //-------------------------------------------------------------------- - if(TheImpCurveDomain.HasFirstPoint()) { - if(param2 TheImpCurveDomain.FirstTolerance()) { - IsOnTheImpCurveDomain2=Standard_False; - } + if (TheImpCurveDomain.HasFirstPoint()) { + if (param2 TheImpCurveDomain.FirstTolerance()) { + IsOnTheImpCurveDomain2 = Standard_False; + } } } - if(IsOnTheImpCurveDomain2 && TheImpCurveDomain.HasLastPoint()) { - if(param2>TheImpCurveDomain.LastParameter()) { - if(Pt2.Distance(TheImpCurveDomain.LastPoint()) - > TheImpCurveDomain.FirstTolerance()) { - IsOnTheImpCurveDomain2=Standard_False; - } + if (IsOnTheImpCurveDomain2 && TheImpCurveDomain.HasLastPoint()) { + if (param2>TheImpCurveDomain.LastParameter()) { + if (Pt2.Distance(TheImpCurveDomain.LastPoint()) + > TheImpCurveDomain.FirstTolerance()) { + IsOnTheImpCurveDomain2 = Standard_False; + } } } - if(IsOnTheImpCurveDomain1) { + if (IsOnTheImpCurveDomain1) { //------------------------------------------------------------------ //--- la borne 1 est sur le domaine -- NbResultats++; - Resultat1.SetValue(NbResultats,Inter1.Value(indice_1)); - Resultat2.SetValue(NbResultats,Inter2_And_Domain2.Value(indice_1)); + Resultat1.SetValue(NbResultats, Inter1.Value(indice_1)); + Resultat2.SetValue(NbResultats, Inter2_And_Domain2.Value(indice_1)); //--- la borne2 est aussi sur le domaine --- - if(IsOnTheImpCurveDomain2) { - NbResultats++; - Resultat1.SetValue(NbResultats,Inter1.Value(indice_2)); - Resultat2.SetValue(NbResultats,Inter2_And_Domain2.Value(indice_2)); + if (IsOnTheImpCurveDomain2) { + NbResultats++; + Resultat1.SetValue(NbResultats, Inter1.Value(indice_2)); + Resultat2.SetValue(NbResultats, Inter2_And_Domain2.Value(indice_2)); } else { - //--- Borne1 sur domaine et Borne 2 Hors Domaine --- - Standard_Real t; - NbResultats++; - t=TheImpCurveDomain.LastParameter(); - Resultat1.SetValue(NbResultats,t); -// Standard_Real popResult = FindV(t,Pt,TheImpTool,TheParCurve, -// TheParCurveDomain, -// Inter2_And_Domain2.Value(indice_1), -// Inter2_And_Domain2.Value(indice_2), -// EpsNul); -// -// Resultat2.SetValue(NbResultats,popResult); - Resultat2.SetValue(NbResultats, - IntImpParGen_Intersector::FindV(t,Pt,TheImpTool,TheParCurve, - TheParCurveDomain, - Inter2_And_Domain2.Value(indice_1), - Inter2_And_Domain2.Value(indice_2), - EpsNul)); + //--- Borne1 sur domaine et Borne 2 Hors Domaine --- + Standard_Real t; + NbResultats++; + t = TheImpCurveDomain.LastParameter(); + Resultat1.SetValue(NbResultats, t); + // Standard_Real popResult = FindV(t,Pt,TheImpTool,TheParCurve, + // TheParCurveDomain, + // Inter2_And_Domain2.Value(indice_1), + // Inter2_And_Domain2.Value(indice_2), + // EpsNul); + // + // Resultat2.SetValue(NbResultats,popResult); + Resultat2.SetValue(NbResultats, + IntImpParGen_Intersector::FindV(t, Pt, TheImpTool, TheParCurve, + TheParCurveDomain, + Inter2_And_Domain2.Value(indice_1), + Inter2_And_Domain2.Value(indice_2), + EpsNul)); } } else { //======= la borne1 n est pas sur le domaine ======== - if(IsOnTheImpCurveDomain2) { - Standard_Real t; - NbResultats++; - t=TheImpCurveDomain.FirstParameter(); - - Resultat1.SetValue(NbResultats,t); - Resultat2.SetValue(NbResultats, - IntImpParGen_Intersector::FindV(t,Pt,TheImpTool,TheParCurve, - TheParCurveDomain, - Inter2_And_Domain2.Value(indice_1), - Inter2_And_Domain2.Value(indice_2), - EpsNul)); - - NbResultats++; - Resultat1.SetValue(NbResultats,Inter1.Value(indice_2)); - Resultat2.SetValue(NbResultats,Inter2_And_Domain2.Value(indice_2)); + if (IsOnTheImpCurveDomain2) { + Standard_Real t; + NbResultats++; + t = TheImpCurveDomain.FirstParameter(); + + Resultat1.SetValue(NbResultats, t); + Resultat2.SetValue(NbResultats, + IntImpParGen_Intersector::FindV(t, Pt, TheImpTool, TheParCurve, + TheParCurveDomain, + Inter2_And_Domain2.Value(indice_1), + Inter2_And_Domain2.Value(indice_2), + EpsNul)); + + NbResultats++; + Resultat1.SetValue(NbResultats, Inter1.Value(indice_2)); + Resultat2.SetValue(NbResultats, Inter2_And_Domain2.Value(indice_2)); } else { //====== la borne2 et la borne1 sont hors domaine ===== - if(param1TheImpCurveDomain.LastParameter()) { - Standard_Real t; - NbResultats++; - t=TheImpCurveDomain.FirstParameter(); - Resultat1.SetValue(NbResultats,t); - Resultat2.SetValue(NbResultats, - IntImpParGen_Intersector::FindV(t,Pt,TheImpTool,TheParCurve, - TheParCurveDomain, - Inter2_And_Domain2.Value(indice_1), - Inter2_And_Domain2.Value(indice_2), - EpsNul)); - - - - NbResultats++; - t=TheImpCurveDomain.LastParameter(); - Resultat1.SetValue(NbResultats,t); - Resultat2.SetValue(NbResultats, - IntImpParGen_Intersector::FindV(t,Pt,TheImpTool,TheParCurve, - TheParCurveDomain, - Inter2_And_Domain2.Value(indice_1), - Inter2_And_Domain2.Value(indice_2), - EpsNul)); - - } + if (param1TheImpCurveDomain.LastParameter()) { + Standard_Real t; + NbResultats++; + t = TheImpCurveDomain.FirstParameter(); + Resultat1.SetValue(NbResultats, t); + Resultat2.SetValue(NbResultats, + IntImpParGen_Intersector::FindV(t, Pt, TheImpTool, TheParCurve, + TheParCurveDomain, + Inter2_And_Domain2.Value(indice_1), + Inter2_And_Domain2.Value(indice_2), + EpsNul)); + + + + NbResultats++; + t = TheImpCurveDomain.LastParameter(); + Resultat1.SetValue(NbResultats, t); + Resultat2.SetValue(NbResultats, + IntImpParGen_Intersector::FindV(t, Pt, TheImpTool, TheParCurve, + TheParCurveDomain, + Inter2_And_Domain2.Value(indice_1), + Inter2_And_Domain2.Value(indice_2), + EpsNul)); + + } } } } @@ -197,139 +197,139 @@ void IntImpParGen_Intersector::And_Domaine_Objet1_Intersections(const ImpTool& T //====================================================================== //-- C o n s t r u c t e u r s e t P e r f o r m IntImpParGen_Intersector::IntImpParGen_Intersector() { - done=Standard_False; + done = Standard_False; } //---------------------------------------------------------------------- //-- IntImpParGen_Intersector::IntImpParGen_Intersector(const ImpTool& TheImpTool, - const IntRes2d_Domain& TheImpCurveDomain, - const ParCurve& TheParCurve, - const IntRes2d_Domain& TheParCurveDomain, - const Standard_Real TolConf, - const Standard_Real Tol) { - Perform(TheImpTool,TheImpCurveDomain,TheParCurve,TheParCurveDomain,TolConf,Tol); + const IntRes2d_Domain& TheImpCurveDomain, + const ParCurve& TheParCurve, + const IntRes2d_Domain& TheParCurveDomain, + const Standard_Real TolConf, + const Standard_Real Tol) { + Perform(TheImpTool, TheImpCurveDomain, TheParCurve, TheParCurveDomain, TolConf, Tol); } //---------------------------------------------------------------------- //-- void IntImpParGen_Intersector::Perform(const ImpTool& TheImpTool, - const IntRes2d_Domain& TheImpCurveDomain, - const ParCurve& TheParCurve, - const IntRes2d_Domain& TheParCurveDomain, - const Standard_Real TolConf, - const Standard_Real Tol) { + const IntRes2d_Domain& TheImpCurveDomain, + const ParCurve& TheParCurve, + const IntRes2d_Domain& TheParCurveDomain, + const Standard_Real TolConf, + const Standard_Real Tol) { - Standard_Integer i,nb_segments_solution, nb_points_solution; - Standard_Real param1,param2,EpsX, EpsNul, EpsDist; - - IntRes2d_Transition Trans1,Trans2; - gp_Pnt2d pt1,pt2; - gp_Vec2d Tan1,Tan2,Norm1,Norm2; - IntRes2d_Position Pos1,Pos2; + Standard_Integer i, nb_segments_solution, nb_points_solution; + Standard_Real param1, param2, EpsX, EpsNul, EpsDist; + + IntRes2d_Transition Trans1, Trans2; + gp_Pnt2d pt1, pt2; + gp_Vec2d Tan1, Tan2, Norm1, Norm2; + IntRes2d_Position Pos1, Pos2; //---------------------------------------------- //-- On teste apres appel aux maths si les bornes //-- des domaines sont des solutions //-- - Standard_Boolean HeadOnImp =Standard_False; - Standard_Boolean HeadOnPar =Standard_False; - Standard_Boolean EndOnImp =Standard_False; - Standard_Boolean EndOnPar =Standard_False; + Standard_Boolean HeadOnImp = Standard_False; + Standard_Boolean HeadOnPar = Standard_False; + Standard_Boolean EndOnImp = Standard_False; + Standard_Boolean EndOnPar = Standard_False; this->ResetFields(); - IntImpParGen_MyImpParTool TheImpParTool(TheImpTool,TheParCurve); + IntImpParGen_MyImpParTool TheImpParTool(TheImpTool, TheParCurve); - if (! (TheParCurveDomain.HasFirstPoint() && - TheParCurveDomain.HasLastPoint())) { + if (!(TheParCurveDomain.HasFirstPoint() && + TheParCurveDomain.HasLastPoint())) { Standard_ConstructionError::Raise("Domaine sur courbe incorrect"); - } - + } + Standard_Integer nb_echantillons = ParTool::NbSamples(TheParCurve, - TheParCurveDomain.FirstParameter(), - TheParCurveDomain.LastParameter()); + TheParCurveDomain.FirstParameter(), + TheParCurveDomain.LastParameter()); EpsX = EPSX; - if(EpsX>1.0e-10) EpsX = 1.0e-10; - EpsNul=(TolConf<=1.0e-10)? 1.0e-10: TolConf; - EpsDist=(Tol<=1.0e-10)? 1.0e-10: Tol; - - Standard_Real Tolerance_Angulaire=EpsDist; - + if (EpsX>1.0e-10) EpsX = 1.0e-10; + EpsNul = (TolConf <= 1.0e-10) ? 1.0e-10 : TolConf; + EpsDist = (Tol <= 1.0e-10) ? 1.0e-10 : Tol; + Standard_Real Tolerance_Angulaire = EpsDist; - if((TheParCurveDomain.LastParameter() - TheParCurveDomain.FirstParameter()) < 100.0*EpsX) { + + + if ((TheParCurveDomain.LastParameter() - TheParCurveDomain.FirstParameter()) < 100.0*EpsX) { EpsX = (TheParCurveDomain.LastParameter() - TheParCurveDomain.FirstParameter())*0.01; } - math_FunctionSample Sample2(TheParCurveDomain.FirstParameter(), - TheParCurveDomain.LastParameter(), - nb_echantillons); - - math_FunctionAllRoots Sol(TheImpParTool, - Sample2, - EpsX, - EpsDist, - EpsNul); - - if(!Sol.IsDone()) {done = Standard_False; return; } - - nb_segments_solution=Sol.NbIntervals(); - nb_points_solution=Sol.NbPoints(); - - //-------------------------------------------------------------------- + math_FunctionSample Sample2(TheParCurveDomain.FirstParameter(), + TheParCurveDomain.LastParameter(), + nb_echantillons); + + math_FunctionAllRoots Sol(TheImpParTool, + Sample2, + EpsX, + EpsDist, + EpsNul); + + if (!Sol.IsDone()) { done = Standard_False; return; } + + nb_segments_solution = Sol.NbIntervals(); + nb_points_solution = Sol.NbPoints(); + + //-------------------------------------------------------------------- //-- T r a i t e m e n t d e s P o i n t s S o l u t i o n s - for(i=1; i<=nb_points_solution; i++) { + for (i = 1; i <= nb_points_solution; i++) { gp_Pnt2d Pt; - param2=Sol.GetPoint(i); - param1=FindU(param2,Pt,TheParCurve,TheImpTool); - - if(TheImpCurveDomain.IsClosed()) { - param1 = IntImpParGen::NormalizeOnDomain( param1 - ,TheImpCurveDomain); + param2 = Sol.GetPoint(i); + param1 = FindU(param2, Pt, TheParCurve, TheImpTool); + + if (TheImpCurveDomain.IsClosed()) { + param1 = IntImpParGen::NormalizeOnDomain(param1 + , TheImpCurveDomain); } - - Standard_Boolean IsOnTheImpCurveDomain=Standard_True; - if(TheImpCurveDomain.HasFirstPoint()) { - if(param1 TheImpCurveDomain.FirstTolerance()) { - IsOnTheImpCurveDomain=Standard_False; - } + + Standard_Boolean IsOnTheImpCurveDomain = Standard_True; + if (TheImpCurveDomain.HasFirstPoint()) { + if (param1 TheImpCurveDomain.FirstTolerance()) { + IsOnTheImpCurveDomain = Standard_False; + } } } - if(IsOnTheImpCurveDomain && TheImpCurveDomain.HasLastPoint()) { - if(param1>TheImpCurveDomain.LastParameter()) { - if(Pt.Distance(TheImpCurveDomain.LastPoint()) - > TheImpCurveDomain.FirstTolerance()) { - IsOnTheImpCurveDomain=Standard_False; - } + if (IsOnTheImpCurveDomain && TheImpCurveDomain.HasLastPoint()) { + if (param1>TheImpCurveDomain.LastParameter()) { + if (Pt.Distance(TheImpCurveDomain.LastPoint()) + > TheImpCurveDomain.FirstTolerance()) { + IsOnTheImpCurveDomain = Standard_False; + } } } - - if(IsOnTheImpCurveDomain) { - TheImpTool.D2(param1,pt1,Tan1,Norm1); - ParTool::D2(TheParCurve,param2,pt2,Tan2,Norm2); - - IntImpParGen::DeterminePosition(Pos1,TheImpCurveDomain,pt1,param1); - IntImpParGen::DeterminePosition(Pos2,TheParCurveDomain,pt2,param2); - - if(Pos1==IntRes2d_End) EndOnImp = Standard_True; - else if(Pos1==IntRes2d_Head) HeadOnImp = Standard_True; - if(Pos2==IntRes2d_End) EndOnPar = Standard_True; - else if(Pos2==IntRes2d_Head) HeadOnPar = Standard_True; - IntImpParGen::DetermineTransition(Pos1,Tan1,Norm1,Trans1, - Pos2,Tan2,Norm2,Trans2, - Tolerance_Angulaire); + if (IsOnTheImpCurveDomain) { + TheImpTool.D2(param1, pt1, Tan1, Norm1); + ParTool::D2(TheParCurve, param2, pt2, Tan2, Norm2); - IntRes2d_IntersectionPoint IP(pt1,param1,param2 - ,Trans1,Trans2 - ,ReversedParameters()); + IntImpParGen::DeterminePosition(Pos1, TheImpCurveDomain, pt1, param1); + IntImpParGen::DeterminePosition(Pos2, TheParCurveDomain, pt2, param2); + + if (Pos1 == IntRes2d_End) EndOnImp = Standard_True; + else if (Pos1 == IntRes2d_Head) HeadOnImp = Standard_True; + if (Pos2 == IntRes2d_End) EndOnPar = Standard_True; + else if (Pos2 == IntRes2d_Head) HeadOnPar = Standard_True; + + IntImpParGen::DetermineTransition(Pos1, Tan1, Norm1, Trans1, + Pos2, Tan2, Norm2, Trans2, + Tolerance_Angulaire); + + IntRes2d_IntersectionPoint IP(pt1, param1, param2 + , Trans1, Trans2 + , ReversedParameters()); Insert(IP); } - } + } //-- F i n d u T r a i t e m e n t d e s P t s S o l. @@ -341,46 +341,45 @@ void IntImpParGen_Intersector::Perform(const ImpTool& TheImpTool, //-- -->2N segments si la courbe en U est fermee //-- - TColStd_Array1OfReal Inter2_and_Domaine2(1,2+8*nb_segments_solution); - TColStd_Array1OfReal Inter1(1,2+8*nb_segments_solution); + TColStd_Array1OfReal Inter2_and_Domaine2(1, 2 + 8 * nb_segments_solution); + TColStd_Array1OfReal Inter1(1, 2 + 8 * nb_segments_solution); + + Standard_Integer nb_segments_crees = 0; - Standard_Integer nb_segments_crees=0; + for (Standard_Integer j2 = 1, j = 1; j <= nb_segments_solution; j++, j2 += 2) { + Standard_Real param2_inf, param2_sup; + Standard_Real param1_inf, param1_sup; + gp_Pnt2d Ptemp; - for (Standard_Integer j2=1,j=1;j<=nb_segments_solution;j++,j2+=2) { - Standard_Real param2_inf,param2_sup; - Standard_Real param1_inf,param1_sup; - gp_Pnt2d Ptemp; - - Sol.GetInterval(j,param2_inf,param2_sup); + Sol.GetInterval(j, param2_inf, param2_sup); param1_inf=FindU(param2_inf,Ptemp,TheParCurve,TheImpTool); param1_sup=FindU(param2_sup,Ptemp,TheParCurve,TheImpTool); //---------------------------------------------------------------------- //-- C o u r b e I m p l i c i t e F e r m e e - if(TheImpCurveDomain.IsClosed()) { + if (TheImpCurveDomain.IsClosed()) { - gp_Pnt2d Ptemp; - gp_Vec2d T1,T2,N1,N2; - Standard_Real param1_origine,param1_fin; + gp_Vec2d T1, T2, N1, N2; + Standard_Real param1_origine, param1_fin; - TheImpCurveDomain.EquivalentParameters(param1_origine,param1_fin); - Standard_Real Periode=param1_fin-param1_origine; + TheImpCurveDomain.EquivalentParameters(param1_origine, param1_fin); + Standard_Real Periode = param1_fin - param1_origine; - while(param1_inf=0.0) { - //--- param1_inf designe un point entrant (et T1 est vers la matiere) - if(param1_inf>=param1_sup) { param1_sup+=Periode; } + if (T1.Dot(T2) >= 0.0) { + //--- param1_inf designe un point entrant (et T1 est vers la matiere) + if (param1_inf >= param1_sup) { param1_sup += Periode; } } else { //--- param1_inf : point sortant (et T1 est Hors matiere) - if(param1_inf<=param1_sup) { param1_inf+=Periode; } + if (param1_inf <= param1_sup) { param1_inf += Periode; } } //--- On cree un nouveau segment decale de Periode //-- Exemple de Pb : Domaine PI/4 PI/2 et intervalle 0,PI @@ -396,57 +395,57 @@ void IntImpParGen_Intersector::Perform(const ImpTool& TheImpTool, //-- // - if(TheImpCurveDomain.LastParameter() - > ((param1_inf>param1_sup)? (param1_sup+Periode): - (param1_inf+Periode))) { - Inter2_and_Domaine2.SetValue(j2,param2_inf); - Inter1.SetValue(j2,param1_inf+Periode); - - Inter2_and_Domaine2.SetValue(j2+1,param2_sup); - Inter1.SetValue(j2+1,param1_sup+Periode); - j2+=2; - nb_segments_crees++; + if (TheImpCurveDomain.LastParameter() + > ((param1_inf>param1_sup) ? (param1_sup + Periode) : + (param1_inf + Periode))) { + Inter2_and_Domaine2.SetValue(j2, param2_inf); + Inter1.SetValue(j2, param1_inf + Periode); + + Inter2_and_Domaine2.SetValue(j2 + 1, param2_sup); + Inter1.SetValue(j2 + 1, param1_sup + Periode); + j2 += 2; + nb_segments_crees++; } - - if(TheImpCurveDomain.FirstParameter() - <((param1_infVV1) X=VV1; else if(XVV1) X = VV1; else if (XFindParameter(Psurf,para); - if (ok) { + Standard_Boolean FindIsOk = alin->FindParameter(Psurf,para); + if (FindIsOk) { pt = alin->Value(para); dist = Psurf.Distance(pt); if (dist< distmin) { @@ -1093,13 +1093,13 @@ Standard_Boolean FindLine (gp_Pnt& Psurf, // Standard_Real anpara=para; //#endif gp_Pnt CopiePsurf=Psurf; - Standard_Boolean ok=IntersectionWithAnArc(CopiePsurf,alin,para,thearc,theparamonarc,thepointonarc,QuadSurf,lower,upper,dist); + Standard_Boolean IntersectIsOk=IntersectionWithAnArc(CopiePsurf,alin,para,thearc,theparamonarc,thepointonarc,QuadSurf,lower,upper,dist); //--printf("\nIntersectionWithAnArc %d \n Psurf(%g,%g,%g)->(%g,%g,%g) dist=%g\n para(%g)->(%g)\n paraonarc(%g)->(%g)", //-- ok,Psurf.X(),Psurf.Y(),Psurf.Z(),thepointonarc.X(),thepointonarc.Y(),thepointonarc.Z(),dist, //-- anpara,para,theparameteronarc,theparamonarc); dist = CopiePsurf.Distance(Psurf); - if(ok) { + if(IntersectIsOk) { if(dist anErrorPrev) {//Method diverges. Keep the best result - const Standard_Real aSinU1 = sin(aMainVarPrev), - aCosU1 = cos(aMainVarPrev), - aSinU2 = sin(aU2Prev), - aCosU2 = cos(aU2Prev); - aMSum -= (theCoeffs.mVecA1*aCosU1 + - theCoeffs.mVecB1*aSinU1 + - theCoeffs.mVecA2*aCosU2 + - theCoeffs.mVecB2*aSinU2 + + const Standard_Real aSinU1Last = sin(aMainVarPrev), + aCosU1Last = cos(aMainVarPrev), + aSinU2Last = sin(aU2Prev), + aCosU2Last = cos(aU2Prev); + aMSum -= (theCoeffs.mVecA1*aCosU1Last + + theCoeffs.mVecB1*aSinU1Last + + theCoeffs.mVecA2*aCosU2Last + + theCoeffs.mVecB2*aSinU2Last + theCoeffs.mVecD); const Standard_Real aSQNorm = aMSum.Norm2(); return (aSQNorm < aTol2); @@ -2529,10 +2529,10 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, { anU1 = anU1crit[i]; - for(Standard_Integer i = 0; i < aNbWLines; i++) + for(Standard_Integer j = 0; j < aNbWLines; j++) { - aWLFindStatus[i] = WLFStatus_Broken; - anUexpect[i] = anU1; + aWLFindStatus[j] = WLFStatus_Broken; + anUexpect[j] = anU1; } break; @@ -3120,10 +3120,10 @@ Standard_Boolean IntCyCyTrim( const IntSurf_Quadric& theQuad1, if(!CylCylComputeParameters(anUl, i, anEquationCoeffs, anU2t)) continue; - const Standard_Real aDU = Abs(anU2t - aCurU2); - if(aDU < aDelta) + const Standard_Real aDU2 = Abs(anU2t - aCurU2); + if(aDU2 < aDelta) { - aDelta = aDU; + aDelta = aDU2; anIndex = i; } } diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index d39eb9a1a5..3e4c7db594 100644 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -282,15 +282,15 @@ static void JoinWLines(IntPatch_SequenceOfLine& theSlin, } const Standard_Integer aNbPntsWL1 = aWLine1->NbPnts(); - const IntSurf_PntOn2S& aPntFWL1 = aWLine1->Point(1); - const IntSurf_PntOn2S& aPntLWL1 = aWLine1->Point(aNbPntsWL1); + const IntSurf_PntOn2S& aPntFW1 = aWLine1->Point(1); + const IntSurf_PntOn2S& aPntLW1 = aWLine1->Point(aNbPntsWL1); for(Standard_Integer aNPt = 1; aNPt <= theSPnt.Length(); aNPt++) { const IntSurf_PntOn2S aPntCur = theSPnt.Value(aNPt).PntOn2S(); - if( aPntCur.IsSame(aPntFWL1, Precision::Confusion()) || - aPntCur.IsSame(aPntLWL1, Precision::Confusion())) + if( aPntCur.IsSame(aPntFW1, Precision::Confusion()) || + aPntCur.IsSame(aPntLW1, Precision::Confusion())) { theSPnt.Remove(aNPt); aNPt--; diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx index c25a795020..78ee8bd73c 100644 --- a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx +++ b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx @@ -669,7 +669,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfEdges PntInit=NbSamplesV+1; //To provide recursion I associate a point with three edges for(Standard_Integer BoucleMeshU=1; BoucleMeshUValue( Milieu.U(), Milieu.V()); - IntPolyh_Point MilieuReel(PtXYZ.X(), PtXYZ.Y(), PtXYZ.Z(), Milieu.U(), Milieu.V()); + gp_Pnt PtXYZMilieu = (MySurface)->Value( Milieu.U(), Milieu.V()); + IntPolyh_Point MilieuReel(PtXYZMilieu.X(), PtXYZMilieu.Y(), PtXYZMilieu.Z(), Milieu.U(), Milieu.V()); Fleche = sqrt(Milieu.SquareDistance(MilieuReel)); } } diff --git a/src/IntTools/IntTools_EdgeFace.cxx b/src/IntTools/IntTools_EdgeFace.cxx index 6d40e62ddd..afc09228f1 100644 --- a/src/IntTools/IntTools_EdgeFace.cxx +++ b/src/IntTools/IntTools_EdgeFace.cxx @@ -1080,7 +1080,7 @@ Standard_Boolean IntTools_EdgeFace::CheckTouch { Standard_Real aTF, aTL, Tol, U1f, U1l, V1f, V1l, af, al,aDist2, aMinDist2; Standard_Boolean theflag=Standard_False; - Standard_Integer aNbExt, i, iLower ; + Standard_Integer aNbExt, iLower; aCP.Range1(aTF, aTL); @@ -1118,7 +1118,7 @@ Standard_Boolean IntTools_EdgeFace::CheckTouch if(aNbExt > 0) { iLower=1; - for (i=1; i<=aNbExt; i++) { + for (Standard_Integer i=1; i<=aNbExt; i++) { aDist2=anExtrema.SquareDistance(i); if (aDist2 < aMinDist2) { aMinDist2=aDist2; @@ -1141,9 +1141,7 @@ Standard_Boolean IntTools_EdgeFace::CheckTouch anExactIntersector.Perform(aCurve, aSurface); if(anExactIntersector.IsDone()) { - Standard_Integer i = 0; - - for(i = 1; i <= anExactIntersector.NbPoints(); i++) { + for(Standard_Integer i = 1; i <= anExactIntersector.NbPoints(); i++) { const IntCurveSurface_IntersectionPoint& aPoint = anExactIntersector.Point(i); if((aPoint.W() >= aTF) && (aPoint.W() <= aTL)) { diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx index 05216273af..0ba5e5acf2 100644 --- a/src/IntTools/IntTools_FClass2d.cxx +++ b/src/IntTools/IntTools_FClass2d.cxx @@ -198,8 +198,8 @@ void IntTools_FClass2d::Init(const TopoDS_Face& aFace, degenerated = Standard_True; for (Standard_Integer i=0; i <= NBSTEPS; i++) { - Standard_Real u = pfbid + i * du / NBSTEPS; - gp_Pnt P3db = C3d.Value (u); + Standard_Real U = pfbid + i * du / NBSTEPS; + gp_Pnt P3db = C3d.Value (U); Standard_Real aR2 = P3da.SquareDistance (P3db); if (aR2 > aPrec2) { degenerated = Standard_False; diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index 10bde06a08..0b85f17c97 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -747,8 +747,8 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1, myListOfPnts.Clear(); // to use LineConstructor } // - const Standard_Integer aNbLin = myIntersector.NbLines(); - for (Standard_Integer i=1; i <= aNbLin; ++i) { + const Standard_Integer aNbLinIntersector = myIntersector.NbLines(); + for (Standard_Integer i=1; i <= aNbLinIntersector; ++i) { MakeCurve(i, dom1, dom2); } // @@ -757,8 +757,8 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1, if (bReverse) { Handle(Geom2d_Curve) aC2D1, aC2D2; // - const Standard_Integer aNbLin=mySeqOfCurve.Length(); - for (Standard_Integer i=1; i<=aNbLin; ++i) + const Standard_Integer aNbLinSeqOfCurve =mySeqOfCurve.Length(); + for (Standard_Integer i=1; i<=aNbLinSeqOfCurve; ++i) { IntTools_Curve& aIC=mySeqOfCurve(i); aC2D1=aIC.FirstCurve2d(); diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index 658bccd3f3..b30d0bd0d7 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -2172,11 +2172,11 @@ DistanceMinimizeByGradient( const Handle(Adaptor3d_HSurface)& theASurf1, theASurf1->D1(theU1, theV1, aPt1, aD1u, aD1v); theASurf2->D1(theU2, theV2, aPt2, aD2U, aD2V); - gp_Vec aP12(aPt1, aPt2); - aGradFu = -aP12.Dot(aD1u); - aGradFv = -aP12.Dot(aD1v); - aGradFU = aP12.Dot(aD2U); - aGradFV = aP12.Dot(aD2V); + gp_Vec aPt12(aPt1, aPt2); + aGradFu = -aPt12.Dot(aD1u); + aGradFv = -aPt12.Dot(aD1v); + aGradFU = aPt12.Dot(aD2U); + aGradFV = aPt12.Dot(aD2V); aSTEPuv = theStep0U1V1; aStepUV = theStep0U2V2; } diff --git a/src/Interface/Interface_EntityList.cxx b/src/Interface/Interface_EntityList.cxx index 64d220aba9..b462d40992 100644 --- a/src/Interface/Interface_EntityList.cxx +++ b/src/Interface/Interface_EntityList.cxx @@ -37,9 +37,9 @@ Interface_EntityList::Interface_EntityList () { } { if (ent.IsNull()) Standard_NullObject::Raise("Interface_EntityList Append"); if (theval.IsNull()) { theval = ent; return; } - Handle(Interface_EntityCluster) ec = + Handle(Interface_EntityCluster) aValEC = Handle(Interface_EntityCluster)::DownCast(theval); - if (!ec.IsNull()) ec->Append(ent); // EntityCluster + if (!aValEC.IsNull()) aValEC->Append(ent); // EntityCluster else { // reste InterfaceEntity ... Handle(Interface_EntityCluster) ec = new Interface_EntityCluster(theval); ec->Append(ent); @@ -57,11 +57,11 @@ Interface_EntityList::Interface_EntityList () { } { if (ent.IsNull()) Standard_NullObject::Raise("Interface_EntityList Add"); if (theval.IsNull()) { theval = ent; return; } - Handle(Interface_EntityCluster) ec = + Handle(Interface_EntityCluster) aValEC = Handle(Interface_EntityCluster)::DownCast(theval); - if (!ec.IsNull()) { // EntityCluster - if (ec->IsLocalFull()) theval = new Interface_EntityCluster(ent,ec); - else ec->Append (ent); + if (!aValEC.IsNull()) { // EntityCluster + if (aValEC->IsLocalFull()) theval = new Interface_EntityCluster(ent, aValEC); + else aValEC->Append (ent); } else { // reste InterfaceEntity ... Handle(Interface_EntityCluster) ec = new Interface_EntityCluster(theval); ec->Append(ent); diff --git a/src/Law/Law_BSpline.cxx b/src/Law/Law_BSpline.cxx index a3dc2b8586..4400a8c974 100644 --- a/src/Law/Law_BSpline.cxx +++ b/src/Law/Law_BSpline.cxx @@ -866,13 +866,13 @@ void Law_BSpline::Segment(const Standard_Real U1, InsertKnots( Knots, Mults, Eps); if (periodic) { // set the origine at NewU1 - Standard_Integer index = 0; + Standard_Integer index0 = 0; BSplCLib::LocateParameter(deg,knots->Array1(),mults->Array1(), U1,periodic,knots->Lower(),knots->Upper(), - index,U); - if ( Abs(knots->Value(index+1)-U) < Eps) - index++; - SetOrigin(index); + index0,U); + if ( Abs(knots->Value(index0+1)-U) < Eps) + index0++; + SetOrigin(index0); SetNotPeriodic(); } diff --git a/src/LocOpe/LocOpe_BuildWires.cxx b/src/LocOpe/LocOpe_BuildWires.cxx index e77d535a28..751ada0e35 100644 --- a/src/LocOpe/LocOpe_BuildWires.cxx +++ b/src/LocOpe/LocOpe_BuildWires.cxx @@ -130,17 +130,17 @@ void LocOpe_BuildWires::Perform(const TopTools_ListOfShape& L, while (!(mapV.Contains(VL) || Bords.Contains(VL))) { Standard_Integer ind = theMapVE.FindIndex(VL); - TopTools_ListIteratorOfListOfShape itl(theMapVE(ind)); - for (; itl.More(); itl.Next()) { - if (!mapE.Contains(itl.Value())) { + TopTools_ListIteratorOfListOfShape anIterl(theMapVE(ind)); + for (; anIterl.More(); anIterl.Next()) { + if (!mapE.Contains(anIterl.Value())) { break; } } - if (!itl.More()) { + if (!anIterl.More()) { Standard_ConstructionError::Raise(); } - const TopoDS_Edge& theEdge = TopoDS::Edge(itl.Value()); + const TopoDS_Edge& theEdge = TopoDS::Edge(anIterl.Value()); TopoDS_Vertex Vf,Vl; TopExp::Vertices(theEdge,Vf,Vl); mapV.Add(VL); diff --git a/src/LocOpe/LocOpe_Generator.cxx b/src/LocOpe/LocOpe_Generator.cxx index aed4dc4dcd..485618b34a 100644 --- a/src/LocOpe/LocOpe_Generator.cxx +++ b/src/LocOpe/LocOpe_Generator.cxx @@ -464,8 +464,8 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) } } orface = exp.Current().Orientation(); - TopoDS_Shape aLocalFace = fac.EmptyCopied(); - newface = TopoDS::Face(aLocalFace); + TopoDS_Shape aLocalFaceEmptyCopied = fac.EmptyCopied(); + newface = TopoDS::Face(aLocalFaceEmptyCopied); // newface = TopoDS::Face(fac.EmptyCopied()); newface.Orientation(TopAbs_FORWARD); S = BRep_Tool::Surface(fac); @@ -818,7 +818,7 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) includeinw = Standard_True; } else { - Standard_Boolean includeinw = Standard_False; + Standard_Boolean isIncludedInW = Standard_False; if (exp2.More()) { for (exp2.ReInit(); exp2.More(); exp2.Next()) { if (!toRemove.Contains(exp2.Current())) { @@ -832,11 +832,11 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) exp4.More(); exp4.Next()) { if (exp4.Current().IsSame(VF) || exp4.Current().IsSame(VL)) { - includeinw = Standard_True; + isIncludedInW = Standard_True; break; } } - if (includeinw) { + if (isIncludedInW) { break; } } diff --git a/src/LocOpe/LocOpe_LinearForm.cxx b/src/LocOpe/LocOpe_LinearForm.cxx index f87f5b5f36..05939976ca 100644 --- a/src/LocOpe/LocOpe_LinearForm.cxx +++ b/src/LocOpe/LocOpe_LinearForm.cxx @@ -196,9 +196,9 @@ void LocOpe_LinearForm::IntPerf() if (myIsTrans) { // m-a-j des descendants - TopExp_Explorer exp; - for (exp.Init(myBase,TopAbs_EDGE);exp.More();exp.Next()) { - const TopoDS_Edge& edg = TopoDS::Edge(exp.Current()); + TopExp_Explorer anExp; + for (anExp.Init(myBase,TopAbs_EDGE); anExp.More(); anExp.Next()) { + const TopoDS_Edge& edg = TopoDS::Edge(anExp.Current()); const TopoDS_Edge& edgbis = TopoDS::Edge(Modif.ModifiedShape(edg)); if (!edgbis.IsSame(edg) && myMap.IsBound(edgbis)) { myMap.Bind(edg,myMap(edgbis)); diff --git a/src/LocOpe/LocOpe_Prism.cxx b/src/LocOpe/LocOpe_Prism.cxx index 136aab0ebb..f1fbec68f0 100644 --- a/src/LocOpe/LocOpe_Prism.cxx +++ b/src/LocOpe/LocOpe_Prism.cxx @@ -207,9 +207,9 @@ void LocOpe_Prism::IntPerf() if (myIsTrans) { // m-a-j des descendants - TopExp_Explorer exp; - for (exp.Init(myBase,TopAbs_EDGE);exp.More();exp.Next()) { - const TopoDS_Edge& edg = TopoDS::Edge(exp.Current()); + TopExp_Explorer anExp; + for (anExp.Init(myBase,TopAbs_EDGE); anExp.More(); anExp.Next()) { + const TopoDS_Edge& edg = TopoDS::Edge(anExp.Current()); const TopoDS_Edge& edgbis = TopoDS::Edge(Modif.ModifiedShape(edg)); if (!edgbis.IsSame(edg) && myMap.IsBound(edgbis)) { myMap.Bind(edg,myMap(edgbis)); diff --git a/src/LocOpe/LocOpe_Revol.cxx b/src/LocOpe/LocOpe_Revol.cxx index be2de154f7..a16311588f 100644 --- a/src/LocOpe/LocOpe_Revol.cxx +++ b/src/LocOpe/LocOpe_Revol.cxx @@ -191,9 +191,9 @@ void LocOpe_Revol::IntPerf() if (myIsTrans) { // m-a-j des descendants - TopExp_Explorer exp; - for (exp.Init(myBase,TopAbs_EDGE);exp.More();exp.Next()) { - const TopoDS_Edge& edg = TopoDS::Edge(exp.Current()); + TopExp_Explorer anExp; + for (anExp.Init(myBase,TopAbs_EDGE); anExp.More(); anExp.Next()) { + const TopoDS_Edge& edg = TopoDS::Edge(anExp.Current()); const TopoDS_Edge& edgbis = TopoDS::Edge(Modif.ModifiedShape(edg)); if (!edgbis.IsSame(edg) && myMap.IsBound(edgbis)) { myMap.Bind(edg,myMap(edgbis)); diff --git a/src/LocOpe/LocOpe_RevolutionForm.cxx b/src/LocOpe/LocOpe_RevolutionForm.cxx index 12479d9fe4..30b465c4d3 100644 --- a/src/LocOpe/LocOpe_RevolutionForm.cxx +++ b/src/LocOpe/LocOpe_RevolutionForm.cxx @@ -162,9 +162,9 @@ void LocOpe_RevolutionForm::IntPerf() if (myIsTrans) { // m-a-j des descendants - TopExp_Explorer exp; - for (exp.Init(myBase,TopAbs_EDGE);exp.More();exp.Next()) { - const TopoDS_Edge& edg = TopoDS::Edge(exp.Current()); + TopExp_Explorer anExp; + for (anExp.Init(myBase,TopAbs_EDGE); anExp.More(); anExp.Next()) { + const TopoDS_Edge& edg = TopoDS::Edge(anExp.Current()); const TopoDS_Edge& edgbis = TopoDS::Edge(Modif.ModifiedShape(edg)); if (!edgbis.IsSame(edg) && myMap.IsBound(edgbis)) { myMap.Bind(edg,myMap(edgbis)); diff --git a/src/LocOpe/LocOpe_SplitDrafts.cxx b/src/LocOpe/LocOpe_SplitDrafts.cxx index 720b9b11f5..ea3c6b8776 100644 --- a/src/LocOpe/LocOpe_SplitDrafts.cxx +++ b/src/LocOpe/LocOpe_SplitDrafts.cxx @@ -1463,8 +1463,8 @@ static void MakeFace(TopoDS_Face& F, while (!alldone) { TopoDS_Wire Wnew; B.MakeWire(Wnew); - TopoDS_Shape aLocalShape = ledg.First(); - const TopoDS_Edge& edg = TopoDS::Edge(aLocalShape); + TopoDS_Shape aLocalShapeCur = ledg.First(); + const TopoDS_Edge& edg = TopoDS::Edge(aLocalShapeCur); // const TopoDS_Edge& edg = TopoDS::Edge(ledg.First()); TopoDS_Vertex VFirst,VLast; if (edg.Orientation() == TopAbs_FORWARD) { diff --git a/src/LocOpe/LocOpe_SplitShape.cxx b/src/LocOpe/LocOpe_SplitShape.cxx index 816d7e5ffb..54a44a1061 100644 --- a/src/LocOpe/LocOpe_SplitShape.cxx +++ b/src/LocOpe/LocOpe_SplitShape.cxx @@ -877,16 +877,16 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W, TopoDS_Edge aNextEdge; if (nbPoss == 1) { aNextEdge = TopoDS::Edge (PossE.FindKey (1)); - TopoDS_Shape aLocalFace = FaceRef.Oriented(wfirst.Orientation()); + TopoDS_Shape aLocalFaceTemp = FaceRef.Oriented(wfirst.Orientation()); C2d = BRep_Tool::CurveOnSurface(aNextEdge, - TopoDS::Face(aLocalFace), f, l); - Standard_Real dpar = (l - f)*0.01; + TopoDS::Face(aLocalFaceTemp), f, l); + Standard_Real dparnew = (l - f)*0.01; if (aNextEdge.Orientation() == TopAbs_FORWARD) { C2d->D1(l,plast,dlast); if (dlast.Magnitude() < gp::Resolution()) { - gp_Pnt2d PrevPnt = C2d->Value(l - dpar); + gp_Pnt2d PrevPnt = C2d->Value(l - dparnew); dlast.SetXY(plast.XY() - PrevPnt.XY()); } } @@ -894,7 +894,7 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W, C2d->D1(f,plast,dlast); if (dlast.Magnitude() < gp::Resolution()) { - gp_Pnt2d NextPnt = C2d->Value(f + dpar); + gp_Pnt2d NextPnt = C2d->Value(f + dparnew); dlast.SetXY(NextPnt.XY() - plast.XY()); } dlast.Reverse(); @@ -902,9 +902,9 @@ void LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W, } else if (nbPoss > 1) { // Faire choix en U,V... - TopoDS_Shape aLocalFace = FaceRef.Oriented(wfirst.Orientation()); + TopoDS_Shape aLocalFaceTemp = FaceRef.Oriented(wfirst.Orientation()); - ChoixUV(LastEdge, TopoDS::Face(aLocalFace), PossE, + ChoixUV(LastEdge, TopoDS::Face(aLocalFaceTemp), PossE, aNextEdge, plast, dlast, toll); } diff --git a/src/MAT/MAT_Graph.cxx b/src/MAT/MAT_Graph.cxx index ebfe4d6460..8d390ded38 100644 --- a/src/MAT/MAT_Graph.cxx +++ b/src/MAT/MAT_Graph.cxx @@ -298,10 +298,10 @@ void MAT_Graph::FusionOfBasicElts(const Standard_Integer IndexElt1, EA1 = Elt1->EndArc(); if ( EA1 != SA1 ) { - Handle(MAT_BasicElt) E1 = EA1->FirstElement (); - Handle(MAT_BasicElt) E2 = EA1->SecondElement(); - Handle(MAT_BasicElt) E3 = SA1->FirstElement (); - Handle(MAT_BasicElt) E4 = SA1->SecondElement(); + E1 = EA1->FirstElement (); + E2 = EA1->SecondElement(); + E3 = SA1->FirstElement (); + E4 = SA1->SecondElement(); Standard_Boolean OnFig = (EA1->FirstNode() ->OnBasicElt() || EA1->SecondNode()->OnBasicElt() || diff --git a/src/MeshTest/MeshTest_CheckTopology.cxx b/src/MeshTest/MeshTest_CheckTopology.cxx index 82fa65cf67..13112882ff 100644 --- a/src/MeshTest/MeshTest_CheckTopology.cxx +++ b/src/MeshTest/MeshTest_CheckTopology.cxx @@ -169,14 +169,14 @@ void MeshTest_CheckTopology::Perform (Draw_Interpretor& di) } } } - + // check of free nodes Standard_Integer aNbNodes = aT->NbNodes(); - for (Standard_Integer i = 1; i <= aNbNodes; i++) - if ( ! aUsedNodes.Contains(i) ) + for (Standard_Integer k = 1; k <= aNbNodes; k++) + if ( ! aUsedNodes.Contains(k) ) { myFreeNodeFaces.Append (iF); - myFreeNodeNums.Append (i); + myFreeNodeNums.Append (k); } } } diff --git a/src/MeshTest/MeshTest_PluginCommands.cxx b/src/MeshTest/MeshTest_PluginCommands.cxx index f4707ad760..1b0d8fc737 100644 --- a/src/MeshTest/MeshTest_PluginCommands.cxx +++ b/src/MeshTest/MeshTest_PluginCommands.cxx @@ -474,10 +474,10 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a) Standard_Integer anUpper = anIndices.Upper(); Standard_Integer aPrevNode = -1; - for (Standard_Integer i = aLower; i <= anUpper; ++i) + for (Standard_Integer j = aLower; j <= anUpper; ++j) { - Standard_Integer aNodeIdx = anIndices.Value(i); - if (i != aLower) + Standard_Integer aNodeIdx = anIndices.Value(j); + if (j != aLower) { BRepMesh_Edge aLink(aPrevNode, aNodeIdx, BRepMesh_Frontier); aBoundaryEdgeMap.Add(aLink); @@ -499,10 +499,10 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a) const Poly_Triangle& aTri = aTris(aTriIndx); Standard_Integer aTriNodes[3] = { aTri.Value(1), aTri.Value(2), aTri.Value(3)}; - for (Standard_Integer i = 1; i <= 3; ++i) + for (Standard_Integer j = 1; j <= 3; ++j) { - Standard_Integer aLastId = aTriNodes[i % 3]; - Standard_Integer aFirstId = aTriNodes[i - 1]; + Standard_Integer aLastId = aTriNodes[j % 3]; + Standard_Integer aFirstId = aTriNodes[j - 1]; BRepMesh_Edge aLink(aFirstId, aLastId, BRepMesh_Free); if (!aBoundaryEdgeMap.Contains(aLink)) diff --git a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx index 679b9b9551..c44abaa39b 100644 --- a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx @@ -297,17 +297,16 @@ void MeshVS_NodalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs, Quantity_Color aNColor; Standard_Boolean isValid = Standard_True; - Standard_Integer i; if (myUseTexture) { - for (i = 1; i <= NbNodes && isValid; ++i) - isValid = myTextureCoords.IsBound (aNodes (i)); + for (Standard_Integer k = 1; k <= NbNodes && isValid; ++k) + isValid = myTextureCoords.IsBound (aNodes (k)); } else { - for (i = 1; i <= NbNodes && isValid; ++i) - isValid = GetColor (aNodes (i), aNColor); + for (Standard_Integer k = 1; k <= NbNodes && isValid; ++k) + isValid = GetColor (aNodes (k), aNColor); } if (!isValid) diff --git a/src/OpenGl/OpenGl_AspectMarker.cxx b/src/OpenGl/OpenGl_AspectMarker.cxx index 8dd9e2dbb6..bc3508bf7f 100644 --- a/src/OpenGl/OpenGl_AspectMarker.cxx +++ b/src/OpenGl/OpenGl_AspectMarker.cxx @@ -1705,7 +1705,6 @@ void OpenGl_AspectMarker::Resources::BuildSprites (const Handle(OpenGl_Context)& Standard_Integer aWidth, aHeight, anOffset, aNumOfBytes; GetMarkerBitMapParam (Aspect_TOM_O, aScale, aWidth, aHeight, anOffset, aNumOfBytes); - const Standard_ShortReal aDelta = 0.1f; NCollection_Vec4 aColor (Standard_Real (theColor.rgb[0]), Standard_Real (theColor.rgb[1]), Standard_Real (theColor.rgb[2]), @@ -1850,7 +1849,6 @@ void OpenGl_AspectMarker::Resources::BuildSprites (const Handle(OpenGl_Context)& } case Aspect_TOM_BALL: { - const Standard_ShortReal aDelta = 0.1f; NCollection_Vec4 aColor (Standard_Real (theColor.rgb[0]), Standard_Real (theColor.rgb[1]), Standard_Real (theColor.rgb[2]), diff --git a/src/PCDM/PCDM_RetrievalDriver.cxx b/src/PCDM/PCDM_RetrievalDriver.cxx index 4fe2855a16..a8a6b53665 100644 --- a/src/PCDM/PCDM_RetrievalDriver.cxx +++ b/src/PCDM/PCDM_RetrievalDriver.cxx @@ -174,10 +174,10 @@ void PCDM_RetrievalDriver::Read(const TCollection_ExtendedString& theFileName, } if(theDocument.IsNull()) { - Standard_SStream aMsg; - aMsg << "could not find any document in this file" << (char) 0; + Standard_SStream anErrorMsg; + anErrorMsg << "could not find any document in this file" << (char) 0; myReaderStatus = PCDM_RS_NoDocument; - Standard_Failure::Raise(aMsg); + Standard_Failure::Raise(anErrorMsg); } Handle(Standard_Persistent) theObject=theDocument->Object(); Handle(PCDM_Document) thePDocument = Handle(PCDM_Document)::DownCast (theObject); diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index 38e587d595..3f9f2ca388 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -735,9 +735,9 @@ void ProjLib_CompProjectedCurve::Init() { //Search for exact boundary point Tol = Min(myTolU, myTolV); - gp_Vec2d D; - d1(Triple.X(), Triple.Y(), Triple.Z(), D, myCurve, mySurface); - Tol /= Max(Abs(D.X()), Abs(D.Y())); + gp_Vec2d aD; + d1(Triple.X(), Triple.Y(), Triple.Z(), aD, myCurve, mySurface); + Tol /= Max(Abs(aD.X()), Abs(aD.Y())); if(!ExactBound(Triple, t - Step, Tol, myTolU, myTolV, myCurve, mySurface)) @@ -931,11 +931,11 @@ void ProjLib_CompProjectedCurve::Init() for(i = 1; i <= myNbCurves; i++) for(j = 1; j <= mySequence->Value(i)->Length(); j++) { - gp_Pnt POnC, POnS, Triple; + gp_Pnt POnC, POnS, aTriple; Standard_Real Distance; - Triple = mySequence->Value(i)->Value(j); - myCurve->D0(Triple.X(), POnC); - mySurface->D0(Triple.Y(), Triple.Z(), POnS); + aTriple = mySequence->Value(i)->Value(j); + myCurve->D0(aTriple.X(), POnC); + mySurface->D0(aTriple.Y(), aTriple.Z(), POnS); Distance = POnC.Distance(POnS); if (myMaxDistance->Value(i) < Distance) myMaxDistance->ChangeValue(i) = Distance; @@ -1245,12 +1245,12 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const Extrema_ExtPS aExtPS(thePoint, mySurface->Surface(), myTolU, myTolV); if (aExtPS.IsDone() && aExtPS.NbExt()) { - Standard_Integer i, Nend, imin = 1; + Standard_Integer k, Nend, imin = 1; // Search for the nearest solution which is also a normal projection Nend = aExtPS.NbExt(); - for(i = 2; i <= Nend; i++) - if (aExtPS.SquareDistance(i) < aExtPS.SquareDistance(imin)) - imin = i; + for(k = 2; k <= Nend; k++) + if (aExtPS.SquareDistance(k) < aExtPS.SquareDistance(imin)) + imin = k; const Extrema_POnSurf& POnS = aExtPS.Point(imin); Standard_Real ParU,ParV; POnS.Parameter(ParU, ParV); diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index 36cc7eee7a..fa90489927 100644 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -1270,13 +1270,13 @@ Handle(Adaptor2d_HCurve2d) } } if(!myProjIsDone && uperiod) { - Standard_Real Uinf, Usup, Uaux; - Uinf = Surf->Surface().FirstUParameter(); - Usup = Surf->Surface().LastUParameter(); - if((Usup - U0) > (U0 - Uinf)) - Uaux = 2*Uinf - U0 + uperiod; + Standard_Real aUinf, aUsup, Uaux; + aUinf = Surf->Surface().FirstUParameter(); + aUsup = Surf->Surface().LastUParameter(); + if((aUsup - U0) > (U0 - aUinf)) + Uaux = 2*aUinf - U0 + uperiod; else - Uaux = 2*Usup - U0 - uperiod; + Uaux = 2*aUsup - U0 - uperiod; Extrema_GenLocateExtPS locext(pntproj, Surf->Surface(), Uaux, V0, TolU, TolV); @@ -1284,7 +1284,7 @@ Handle(Adaptor2d_HCurve2d) if (locext.SquareDistance() < DistTol3d * DistTol3d) { //OCC217 //if (locext.SquareDistance() < Tol3d * Tol3d) { (locext.Point()).Parameter(u,v); - if((Usup - U0) > (U0 - Uinf)) + if((aUsup - U0) > (U0 - aUinf)) usens--; else usens++; @@ -1296,13 +1296,13 @@ Handle(Adaptor2d_HCurve2d) } } if(!myProjIsDone && vperiod) { - Standard_Real Vinf, Vsup, Vaux; - Vinf = Surf->Surface().FirstVParameter(); - Vsup = Surf->Surface().LastVParameter(); - if((Vsup - V0) > (V0 - Vinf)) - Vaux = 2*Vinf - V0 + vperiod; + Standard_Real aVinf, aVsup, Vaux; + aVinf = Surf->Surface().FirstVParameter(); + aVsup = Surf->Surface().LastVParameter(); + if((aVsup - V0) > (V0 - aVinf)) + Vaux = 2*aVinf - V0 + vperiod; else - Vaux = 2*Vsup - V0 - vperiod; + Vaux = 2*aVsup - V0 - vperiod; Extrema_GenLocateExtPS locext(pntproj, Surf->Surface(), U0, Vaux, TolU, TolV) ; @@ -1310,7 +1310,7 @@ Handle(Adaptor2d_HCurve2d) if (locext.SquareDistance() < DistTol3d * DistTol3d) { //OCC217 //if (locext.SquareDistance() < Tol3d * Tol3d) { (locext.Point()).Parameter(u,v); - if((Vsup - V0) > (V0 - Vinf)) + if((aVsup - V0) > (V0 - aVinf)) vsens--; else vsens++; @@ -1357,15 +1357,15 @@ Handle(Adaptor2d_HCurve2d) Extrema_ExtPS ext(pntproj, Surf->Surface(), TolU, TolV) ; if (ext.IsDone()) { Dist2Min = ext.SquareDistance(1); - Standard_Integer GoodValue = 1; + Standard_Integer aGoodValue = 1; for ( j = 2 ; j <= ext.NbExt() ; j++ ) if( Dist2Min > ext.SquareDistance(j)) { Dist2Min = ext.SquareDistance(j); - GoodValue = j; + aGoodValue = j; } if (Dist2Min < DistTol3d * DistTol3d) { //if (Dist2Min < Tol3d * Tol3d) { - (ext.Point(GoodValue)).Parameter(u,v); + (ext.Point(aGoodValue)).Parameter(u,v); if(uperiod) { if((U0 - u) > (2*uperiod/3)) { usens++; @@ -1772,14 +1772,14 @@ Handle(Geom2d_BSplineCurve) Standard_True); if(Fit.IsAllApproximated()) { - Standard_Integer i; + Standard_Integer j; Standard_Integer NbCurves = Fit.NbMultiCurves(); Standard_Integer MaxDeg = 0; // To transform the MultiCurve into BSpline, it is required that all // Bezier constituing it have the same degree -> Calculation of MaxDeg Standard_Integer NbPoles = 1; - for (i = 1; i <= NbCurves; i++) { - Standard_Integer Deg = Fit.Value(i).Degree(); + for (j = 1; j <= NbCurves; j++) { + Standard_Integer Deg = Fit.Value(j).Degree(); MaxDeg = Max ( MaxDeg, Deg); } @@ -1804,15 +1804,15 @@ Handle(Geom2d_BSplineCurve) BSplCLib::IncreaseDegree( MaxDeg, Poles2d, PLib::NoWeights(), TempPoles, PLib::NoWeights()); //update of tops of the PCurve - for (Standard_Integer j = 1 ; j <= MaxDeg + 1; j++) { - Poles.SetValue( Compt, TempPoles( j)); + for (Standard_Integer k = 1 ; k <= MaxDeg + 1; k++) { + Poles.SetValue( Compt, TempPoles( k)); Compt++; } } else { //update of tops of the PCurve - for (Standard_Integer j = 1 ; j <= MaxDeg + 1; j++) { - Poles.SetValue( Compt, Poles2d( j)); + for (Standard_Integer k = 1 ; k <= MaxDeg + 1; k++) { + Poles.SetValue( Compt, Poles2d( k)); Compt++; } } diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.cxx b/src/ProjLib/ProjLib_ProjectOnPlane.cxx index ae895cc32c..b46c8f7d63 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.cxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.cxx @@ -728,9 +728,9 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, else if ( Xc.IsNormal(Yc,Precision::Angular())) { myType = GeomAbs_Parabola; Standard_Real F = Parab.Focal() / Xc.Magnitude(); - gp_Parab Parab = gp_Parab( gp_Ax2(P,Xc^Yc,Xc), F); + gp_Parab aParab = gp_Parab( gp_Ax2(P,Xc^Yc,Xc), F); Handle(Geom_Parabola) GeomParabolaPtr = - new Geom_Parabola(Parab) ; + new Geom_Parabola(aParab) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin GeomAdaptor_Curve aGACurve(GeomParabolaPtr); myResult = new GeomAdaptor_HCurve(aGACurve); @@ -760,14 +760,14 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, gp_Vec Xc = ProjectVec(myPlane,myDirection,gp_Vec(AxeRef.XDirection())); gp_Vec Yc = ProjectVec(myPlane,myDirection,gp_Vec(AxeRef.YDirection())); gp_Pnt P = ProjectPnt(myPlane,myDirection,AxeRef.Location()); - Standard_Real R1 = Hypr.MajorRadius(); - Standard_Real R2 = Hypr.MinorRadius(); + Standard_Real aR1 = Hypr.MajorRadius(); + Standard_Real aR2 = Hypr.MinorRadius(); gp_Dir Z = myPlane.Direction(); if ( Xc.Magnitude() < Precision::Confusion()) { myType = GeomAbs_Hyperbola; gp_Dir X = gp_Dir(Yc) ^ Z; - Hypr = gp_Hypr(gp_Ax2( P, Z, X), 0., R2 * Yc.Magnitude()); + Hypr = gp_Hypr(gp_Ax2( P, Z, X), 0., aR2 * Yc.Magnitude()); GeomHyperbolaPtr = new Geom_Hyperbola(Hypr) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin @@ -778,7 +778,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, else if ( Yc.Magnitude() < Precision::Confusion()) { myType = GeomAbs_Hyperbola; Hypr = - gp_Hypr(gp_Ax2(P, Z, gp_Dir(Xc)), R1 * Xc.Magnitude(), 0.); + gp_Hypr(gp_Ax2(P, Z, gp_Dir(Xc)), aR1 * Xc.Magnitude(), 0.); GeomHyperbolaPtr = new Geom_Hyperbola(Hypr) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin @@ -789,7 +789,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C, else if ( Xc.IsNormal(Yc,Precision::Angular())) { myType = GeomAbs_Hyperbola; Hypr = gp_Hypr( gp_Ax2( P, gp_Dir( Xc ^ Yc), gp_Dir( Xc)), - R1 * Xc.Magnitude(), R2 * Yc.Magnitude() ); + aR1 * Xc.Magnitude(), aR2 * Yc.Magnitude() ); GeomHyperbolaPtr = new Geom_Hyperbola(Hypr) ; // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin diff --git a/src/QABugs/QABugs_14.cxx b/src/QABugs/QABugs_14.cxx index 47683f576c..ca31b63e31 100644 --- a/src/QABugs/QABugs_14.cxx +++ b/src/QABugs/QABugs_14.cxx @@ -214,8 +214,8 @@ static Standard_Integer BUC60854 (Draw_Interpretor& /*di*/, Standard_Integer arg } TopAbs_ShapeEnum wtyp = W.ShapeType(); if (wtyp != TopAbs_WIRE && wtyp != TopAbs_EDGE && pick) { - Standard_Real u,v; - DBRep_DrawableShape::LastPick(W,u,v); + Standard_Real aTempU, aTempV; + DBRep_DrawableShape::LastPick(W, aTempU, aTempV); wtyp = W.ShapeType(); } if (wtyp != TopAbs_WIRE && wtyp != TopAbs_EDGE) { diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx index ceae557362..77ca53c7ba 100644 --- a/src/QABugs/QABugs_17.cxx +++ b/src/QABugs/QABugs_17.cxx @@ -1749,7 +1749,7 @@ static Standard_Integer OCC1642 (Draw_Interpretor& di, Standard_Integer argc, co (Standard_Integer) advWA->CheckSelfIntersectingEdge(j, points2d, points3d); - ShapeExtend_Status status = ShapeExtend_FAIL1; + status = ShapeExtend_FAIL1; if(advWA->StatusSelfIntersection(status)) status = ShapeExtend_FAIL2; diff --git a/src/QANCollection/QANCollection_Handle.cxx b/src/QANCollection/QANCollection_Handle.cxx index e0c3552ab2..36e81da154 100644 --- a/src/QANCollection/QANCollection_Handle.cxx +++ b/src/QANCollection/QANCollection_Handle.cxx @@ -125,7 +125,7 @@ static Standard_Integer QAHandleOps (Draw_Interpretor& theDI, Handle(Geom_Line) qLine = cpLine; // constructor from const pointer -- could be made explicit... // check whether compiler will destroy reference to temporary handle - Handle(Geom_Curve)& aTmpRef (Handle(Geom_Line)::DownCast (aCurve2)); + const Handle(Geom_Curve)& aTmpRef (Handle(Geom_Line)::DownCast (aCurve2)); CHECK(theDI, ! aTmpRef.IsNull(), "local reference of handle to base type to temporary handle object"); Handle(Geom_Surface) aSurf; diff --git a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx index d7d3a48e62..88569e35f7 100644 --- a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx +++ b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx @@ -1532,7 +1532,6 @@ Standard_Boolean QANewBRepNaming_BooleanOperationFeat::IsWRCase2(BRepAlgoAPI_Boo const TopoDS_Shape& Result = MS.Shape(); const TopAbs_ShapeEnum& ResType = ShapeType(Result); if(ResType == TopAbs_COMPOUND || ResType >= TopAbs_FACE) return Standard_False; - TopTools_ListOfShape aList; TopExp_Explorer anExp(Result, TopAbs_FACE); for(;anExp.More();anExp.Next()) { @@ -1564,7 +1563,6 @@ void QANewBRepNaming_BooleanOperationFeat::LoadWRCase(BRepAlgoAPI_BooleanOperati const TopoDS_Shape& Result = MS.Shape(); const TopAbs_ShapeEnum& ResType = ShapeType(Result); if(ResType == TopAbs_COMPOUND || ResType >= TopAbs_FACE) return; - TopTools_ListOfShape aList; TopExp_Explorer anExp(Result, TopAbs_FACE); for(;anExp.More();anExp.Next()) { diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx index a15c7829b2..3270f58ce5 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx @@ -96,8 +96,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep Standard_Integer nbj3 = data->NbParams(data->ParamNumber(nsub3,1)); aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi3, 1, nbj3); for (Standard_Integer i3 = 1; i3 <= nbi3; i3 ++) { - Standard_Integer nsi3; - if (data->ReadSubList (nsub3,i3,"sub-part(control_points_list)",ach,nsi3)) { + Standard_Integer nsi3temp; + if (data->ReadSubList (nsub3,i3,"sub-part(control_points_list)",ach,nsi3temp)) { Standard_Integer nsi3 = data->ParamNumber(nsub3,i3); for (Standard_Integer j3 =1; j3 <= nbj3; j3 ++) { //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed @@ -252,8 +252,8 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep Standard_Integer nbj13 = data->NbParams(data->ParamNumber(nsub13,1)); aWeightsData = new TColStd_HArray2OfReal (1,nbi13,1,nbj13); for (Standard_Integer i13 = 1; i13 <= nbi13; i13 ++) { - Standard_Integer nsi13; - if (data->ReadSubList (nsub13,i13,"sub-part(weights_data)",ach,nsi13)) { + Standard_Integer nsi13temp; + if (data->ReadSubList (nsub13,i13,"sub-part(weights_data)",ach,nsi13temp)) { Standard_Integer nsi13 = data->ParamNumber(nsub13,i13); for (Standard_Integer j13 =1; j13 <= nbj13; j13 ++) { //szv#4:S4163:12Mar99 `Standard_Boolean stat13 =` not needed diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 374cc6d513..e25075a6ad 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -1726,8 +1726,8 @@ Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSess if(!DimCharR.IsNull()) { Handle(StepShape_ShapeDimensionRepresentation) SDimR = DimCharR->Representation(); if(!SDimR.IsNull() && SDimR->NbItems()>0) { - Handle(StepRepr_RepresentationItem) RI = SDimR->ItemsValue(1); - Handle(StepRepr_ValueRange) VR = Handle(StepRepr_ValueRange)::DownCast(RI); + Handle(StepRepr_RepresentationItem) aRI = SDimR->ItemsValue(1); + Handle(StepRepr_ValueRange) VR = Handle(StepRepr_ValueRange)::DownCast(aRI); if(!VR.IsNull()) { aName = VR->Name(); //StepRepr_CompoundItemDefinition CID = VR->ItemElement(); diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 597bd85f5b..96843c3d0a 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -767,10 +767,10 @@ static Standard_Integer FindEntities (const Handle(Transfer_FinderProcess) &FP, if ( TransientListBinder.IsNull() && S.ShapeType() == TopAbs_COMPOUND) { for ( TopoDS_Iterator it(S); it.More(); it.Next() ) { - Handle(StepRepr_RepresentationItem) item = STEPConstruct::FindEntity ( FP, it.Value(), L ); - if ( item.IsNull() ) continue; + Handle(StepRepr_RepresentationItem) aLocalItem = STEPConstruct::FindEntity ( FP, it.Value(), L ); + if (aLocalItem.IsNull() ) continue; nres++; - seqRI.Append ( item ); + seqRI.Append (aLocalItem); } } else @@ -2248,10 +2248,10 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTs (const Handle(XSControl_WorkSe Model->AddEntity(VR); Handle(StepShape_ShapeDimensionRepresentation) SDimR = new StepShape_ShapeDimensionRepresentation; - Handle(StepRepr_HArray1OfRepresentationItem) HARI = + Handle(StepRepr_HArray1OfRepresentationItem) aHARI = new StepRepr_HArray1OfRepresentationItem(1,1); - HARI->SetValue(1,VR); - SDimR->Init(aName,HARI,RC); + aHARI->SetValue(1,VR); + SDimR->Init(aName,aHARI,RC); Model->AddWithRefs(SDimR); Handle(StepShape_DimensionalCharacteristicRepresentation) DimCharR = new StepShape_DimensionalCharacteristicRepresentation; diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index e7558c8b44..ad1763a46b 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -752,7 +752,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han if(!Recognize(sr)) return shbinder; isBound = Standard_False; - Standard_Integer i,nb = sr->NbItems(); + Standard_Integer nb = sr->NbItems(); // Used in XSAlgo::AlgoContainer()->ProcessShape (ssv; 13.11.2010) Standard_Integer nbTPitems = TP->NbMapped(); Handle(Message_Messenger) sout = TP->Messenger(); @@ -803,7 +803,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han myNMTool.SetActive(!isManifold && isNMMode); // [END] Proceed with non-manifold topology (ssv; 12.11.2010) - for (i = 1; i <= nb && PS.More(); i ++,PS.Next()) { + for (Standard_Integer i = 1; i <= nb && PS.More(); i ++,PS.Next()) { //for (i = 1; i <= nb ; i ++) { #ifdef TRANSLOG if (TP->TraceLevel() > 2) @@ -855,7 +855,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han // Make compound to store closed Shells TopoDS_Compound compWithClosings; brepBuilder.MakeCompound(compWithClosings); - + // Attempt to close Shells one-by-one for (Standard_Integer i = 1; i <= shellClosingsMap.Extent(); i++) { TopoDS_Shell adjustedShell = this->closeIDEASShell( TopoDS::Shell( shellClosingsMap.FindKey(i) ), diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index 827c2e3b48..7fc7769afe 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -715,8 +715,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape (const Handle(Tran // NOTE: aNMBinder is connected now with this SDR. It will be added to the resulting // binder in the end of this invocation of TransferShape for (Standard_Integer i = 1; i <= aNMItemsNb; i++) { - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper( FP, RepItemSeq->Value(i) ); - TransferShape(mapper, sdr, FP, NonManifoldGroup, Standard_False); + Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper( FP, RepItemSeq->Value(i) ); + TransferShape(aMapper, sdr, FP, NonManifoldGroup, Standard_False); } // Nothing else needed for pure non-manifold topology, return diff --git a/src/STEPControl/STEPControl_Reader.cxx b/src/STEPControl/STEPControl_Reader.cxx index a40a32a52e..eb7d5e6eed 100644 --- a/src/STEPControl/STEPControl_Reader.cxx +++ b/src/STEPControl/STEPControl_Reader.cxx @@ -317,8 +317,7 @@ void STEPControl_Reader::FileUnits( TColStd_SequenceOfAsciiString& theUnitLength const Interface_Graph& graph = WS()->Graph(); TColStd_MapOfAsciiString aMapUnits[3]; - Standard_Integer i =1; - for( ; i <= nbroots; i++) + for(Standard_Integer i = 1; i <= nbroots; i++) { Handle(Standard_Transient) anEnt = theroots(i); Standard_Integer num = graph.EntityNumber(anEnt); @@ -394,8 +393,8 @@ void STEPControl_Reader::FileUnits( TColStd_SequenceOfAsciiString& theUnitLength Handle(Interface_InterfaceModel) aModel = WS()->Model(); if(aModel.IsNull()) return; - Standard_Integer i = 1, nb = aModel->NbEntities(); - for( ; i <= nb; i++) + Standard_Integer nb = aModel->NbEntities(); + for(Standard_Integer i = 1; i <= nb; i++) { Handle(Standard_Transient) anEnt = aModel->Value(i); Handle(StepRepr_RepresentationContext) aRepCont = Handle(StepRepr_RepresentationContext)::DownCast(anEnt); diff --git a/src/STEPSelections/STEPSelections_SelectGSCurves.cxx b/src/STEPSelections/STEPSelections_SelectGSCurves.cxx index 14fee5bbcb..1d69ab91ac 100644 --- a/src/STEPSelections/STEPSelections_SelectGSCurves.cxx +++ b/src/STEPSelections/STEPSelections_SelectGSCurves.cxx @@ -50,11 +50,11 @@ Standard_Boolean STEPSelections_SelectGSCurves::Explore(const Standard_Integer / isInGeomSet = Standard_True; } if(isInGeomSet) { - Interface_EntityIterator subs = G.Shareds(start); - subs.Start(); - Standard_Boolean isSome = subs.More(); - for (; subs.More(); subs.Next()) - explored.AddItem (subs.Value()); + Interface_EntityIterator aSubsShareds = G.Shareds(start); + aSubsShareds.Start(); + Standard_Boolean isSome = aSubsShareds.More(); + for (; aSubsShareds.More(); aSubsShareds.Next()) + explored.AddItem (aSubsShareds.Value()); return isSome; } else return Standard_False; diff --git a/src/ShapeFix/ShapeFix.cxx b/src/ShapeFix/ShapeFix.cxx index 000cf4fdae..d4a3b8efa2 100644 --- a/src/ShapeFix/ShapeFix.cxx +++ b/src/ShapeFix/ShapeFix.cxx @@ -104,7 +104,7 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape, Message_Msg doneMsg("FixEdge.SameParameter.MSG0"); // Start progress scope (no need to check if progress exists -- it is safe) - Message_ProgressSentry aPSentry(theProgress, "Fixing same parameter problem", 0, 2, 1); + Message_ProgressSentry aPSentryForSameParam(theProgress, "Fixing same parameter problem", 0, 2, 1); { // Start progress scope (no need to check if progress exists -- it is safe) @@ -155,7 +155,7 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape, } // Switch to "Update tolerances" step - aPSentry.Next(); + aPSentryForSameParam.Next(); { // Start progress scope (no need to check if progress exists -- it is safe) diff --git a/src/ShapeFix/ShapeFix_ComposeShell.cxx b/src/ShapeFix/ShapeFix_ComposeShell.cxx index 44730e27cc..49a561e04a 100644 --- a/src/ShapeFix/ShapeFix_ComposeShell.cxx +++ b/src/ShapeFix/ShapeFix_ComposeShell.cxx @@ -2409,12 +2409,12 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces, TopAbs_State stPoint = clas.Perform (unp,Standard_False); if(stPoint == TopAbs_ON || stPoint == TopAbs_UNKNOWN) { - TopoDS_Edge ed = TopoDS::Edge ( ew.Value() ); - Standard_Real cf, cl; - Handle(Geom2d_Curve) cw = BRep_Tool::CurveOnSurface ( ed, pf, cf, cl ); + TopoDS_Edge anEdge = TopoDS::Edge ( ew.Value() ); + Standard_Real aCF, aCL; + Handle(Geom2d_Curve) aCW = BRep_Tool::CurveOnSurface ( anEdge, pf, aCF, aCL); // handle tangential case (ON) while ( stPoint == TopAbs_ON || stPoint == TopAbs_UNKNOWN ) { - stPoint = clas.Perform ( cw->Value(cl), Standard_False ); + stPoint = clas.Perform (aCW->Value(aCL), Standard_False ); if ( ! ew.More() ) break; ew.Next(); if ( ! ew.More() ) break; @@ -2422,8 +2422,8 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces, if(edge.Orientation() !=TopAbs_FORWARD && edge.Orientation() !=TopAbs_REVERSED) continue; - Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface ( edge, pf, cf, cl ); - if ( ! c2d.IsNull() ) cw = c2d; + Handle(Geom2d_Curve) c2d = BRep_Tool::CurveOnSurface ( edge, pf, aCF, aCL ); + if ( ! c2d.IsNull() ) aCW = c2d; } } TopAbs_State stInfin = clas.PerformInfinitePoint(); diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index 2c59f3f3a9..b40cc52aca 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -2434,8 +2434,8 @@ Standard_Boolean ShapeFix_Face::FixSplitFace(const TopTools_DataMapOfShapeListOf const TopTools_ListOfShape& IntWires = MapWires.Find(wire); TopTools_ListIteratorOfListOfShape liter(IntWires); for( ; liter.More(); liter.Next()) { - TopoDS_Shape aShape = tmpFace.EmptyCopied(); - TopoDS_Face aFace = TopoDS::Face ( aShape ); + TopoDS_Shape aShapeEmptyCopied = tmpFace.EmptyCopied(); + TopoDS_Face aFace = TopoDS::Face ( aShapeEmptyCopied); aFace.Orientation ( TopAbs_FORWARD ); B.Add (aFace,liter.Value()); BRepTopAdaptor_FClass2d clas (aFace,::Precision::PConfusion()); diff --git a/src/ShapeFix/ShapeFix_FixSmallSolid.cxx b/src/ShapeFix/ShapeFix_FixSmallSolid.cxx index e25c88a672..78e5663d0b 100644 --- a/src/ShapeFix/ShapeFix_FixSmallSolid.cxx +++ b/src/ShapeFix/ShapeFix_FixSmallSolid.cxx @@ -434,10 +434,10 @@ TopoDS_Shape ShapeFix_FixSmallSolid::Merge ( // compose their shells in lists associated with non-small solids' shells // which they should be merged to TopTools_DataMapOfShapeListOfShape aShellsToMerge, aShellsToAdd; - TopTools_ListIteratorOfListOfShape aSolidIter (aSmallSolids); - while (aSolidIter.More()) + TopTools_ListIteratorOfListOfShape aSmallIter(aSmallSolids); + while (aSmallIter.More()) { - const TopoDS_Shape& aSmallSolid = aSolidIter.Value(); + const TopoDS_Shape& aSmallSolid = aSmallIter.Value(); // find a non-small solid's shell having greatest sum area of // all faces shared with the current small solid @@ -456,10 +456,10 @@ TopoDS_Shape ShapeFix_FixSmallSolid::Merge ( theContext->Remove (aSmallSolid); SendWarning ( aSmallSolid, Message_Msg( "ShapeFix.FixSmallSolid.MSG1" )); - aSmallSolids.Remove (aSolidIter); + aSmallSolids.Remove (aSmallIter); } else - aSolidIter.Next(); + aSmallIter.Next(); } // stop if no solids can be merged diff --git a/src/ShapeFix/ShapeFix_Shape.cxx b/src/ShapeFix/ShapeFix_Shape.cxx index 17ec73cbe2..f1cbab9dc5 100644 --- a/src/ShapeFix/ShapeFix_Shape.cxx +++ b/src/ShapeFix/ShapeFix_Shape.cxx @@ -150,14 +150,14 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator) ++aShapesNb; // Open progress indication scope for sub-shape fixing - Message_ProgressSentry aPSentry(theProgress, "Fixing sub-shape", 0, aShapesNb, 1); - for ( TopoDS_Iterator anIter(S); anIter.More() && aPSentry.More(); anIter.Next(), aPSentry.Next() ) + Message_ProgressSentry aPSentrySubShape(theProgress, "Fixing sub-shape", 0, aShapesNb, 1); + for ( TopoDS_Iterator anIter(S); anIter.More() && aPSentrySubShape.More(); anIter.Next(), aPSentrySubShape.Next() ) { myShape = anIter.Value(); if ( Perform(theProgress) ) status = Standard_True; } - if ( !aPSentry.More() ) + if ( !aPSentrySubShape.More() ) return Standard_False; // aborted execution myFixSameParameterMode = savFixSameParameterMode; diff --git a/src/ShapeFix/ShapeFix_Solid.cxx b/src/ShapeFix/ShapeFix_Solid.cxx index 9fbad43c18..f134f04750 100644 --- a/src/ShapeFix/ShapeFix_Solid.cxx +++ b/src/ShapeFix/ShapeFix_Solid.cxx @@ -402,10 +402,10 @@ Standard_Boolean ShapeFix_Solid::Perform(const Handle(Message_ProgressIndicator) if ( NeedFix(myFixShellMode) ) { // Start progress scope (no need to check if progress exists -- it is safe) - Message_ProgressSentry aPSentry(theProgress, "Fixing shell", 0, aNbShells, 1); + Message_ProgressSentry aPSentryFixShell(theProgress, "Fixing shell", 0, aNbShells, 1); // Fix shell by shell using ShapeFix_Shell tool - for ( TopExp_Explorer aExpSh(S, TopAbs_SHELL); aExpSh.More() && aPSentry.More(); aExpSh.Next(), aPSentry.Next() ) + for ( TopExp_Explorer aExpSh(S, TopAbs_SHELL); aExpSh.More() && aPSentryFixShell.More(); aExpSh.Next(), aPSentryFixShell.Next() ) { TopoDS_Shape sh = aExpSh.Current(); @@ -419,7 +419,7 @@ Standard_Boolean ShapeFix_Solid::Perform(const Handle(Message_ProgressIndicator) } // Halt algorithm in case of user's abort - if ( !aPSentry.More() ) + if ( !aPSentryFixShell.More() ) return Standard_False; } else @@ -499,10 +499,10 @@ Standard_Boolean ShapeFix_Solid::Perform(const Handle(Message_ProgressIndicator) BRep_Builder aB; TopoDS_Compound aComp; aB.MakeCompound(aComp); - Message_ProgressSentry aPSentry(theProgress, "Creating solid", + Message_ProgressSentry aPSentryCreatingSolid(theProgress, "Creating solid", 0, aMapSolids.Extent(), 1); - for(Standard_Integer i =1; (i <= aMapSolids.Extent()) && (aPSentry.More()); - i++, aPSentry.Next()) + for(Standard_Integer i =1; (i <= aMapSolids.Extent()) && (aPSentryCreatingSolid.More()); + i++, aPSentryCreatingSolid.Next()) { TopoDS_Shape aResSh =aMapSolids.FindKey(i); if(aResShape.ShapeType() == TopAbs_SHELL && myCreateOpenSolidMode) { @@ -518,7 +518,7 @@ Standard_Boolean ShapeFix_Solid::Perform(const Handle(Message_ProgressIndicator) aB.Add(aComp,aResSh); } - if ( !aPSentry.More() ) + if ( !aPSentryCreatingSolid.More() ) return Standard_False; // aborted execution Context()->Replace(aResShape,aComp); } diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 346bf432d4..92a7719013 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -810,9 +810,9 @@ static void GenerateSubSeq (const TopTools_SequenceOfShape& anInpEdgeSeq, isOk = IsMergingPossible(edge1, edge2, Tol, DegEdgeVrt); if (!isOk) { - SubSequenceOfEdges SubSeq; - SubSeq.SeqsEdges.Append(edge2); - SeqOfSubSeqOfEdges.Append(SubSeq); + SubSequenceOfEdges aSubSeq; + aSubSeq.SeqsEdges.Append(edge2); + SeqOfSubSeqOfEdges.Append(aSubSeq); } else SeqOfSubSeqOfEdges.ChangeLast().SeqsEdges.Append(edge2); diff --git a/src/StepData/StepData_Field.cxx b/src/StepData/StepData_Field.cxx index 700278307e..d717483e4e 100644 --- a/src/StepData/StepData_Field.cxx +++ b/src/StepData/StepData_Field.cxx @@ -404,8 +404,8 @@ static Standard_Integer TrueKind (const Standard_Integer kind) void StepData_Field::SetEntity (const Standard_Integer num, const Handle(Standard_Transient)& val) { - DeclareAndCast(TColStd_HArray1OfTransient,ht,theany); - if (!ht.IsNull()) { ht->SetValue (num,val); return; } + DeclareAndCast(TColStd_HArray1OfTransient,aHt,theany); + if (!aHt.IsNull()) { aHt->SetValue (num,val); return; } DeclareAndCast(TColStd_HArray1OfInteger,hi,theany); if (!hi.IsNull()) { Standard_Integer low = hi->Lower(), up = hi->Upper(); diff --git a/src/TNaming/TNaming.cxx b/src/TNaming/TNaming.cxx index dfea6cb71d..d4a0bc1478 100644 --- a/src/TNaming/TNaming.cxx +++ b/src/TNaming/TNaming.cxx @@ -852,9 +852,9 @@ TopoDS_Shape TNaming::FindUniqueContextSet(const TopoDS_Shape& Selection, const TopTools_DataMapOfOrientedShapeShape aMap; Standard_Integer Up(0); TopAbs_ShapeEnum aStopType(TopAbs_COMPOUND); - TopoDS_Iterator it(Selection); - for(;it.More(); it.Next()) { - const TopoDS_Shape& aS = it.Value(); + TopoDS_Iterator anIter(Selection); + for(; anIter.More(); anIter.Next()) { + const TopoDS_Shape& aS = anIter.Value(); if(aS.ShapeType() > aStopType) aStopType = aS.ShapeType(); Up++; @@ -888,12 +888,12 @@ TopoDS_Shape TNaming::FindUniqueContextSet(const TopoDS_Shape& Selection, const if(num1 == num2 && num2) return Context; else { - TopoDS_Iterator it(CompShape); + TopoDS_Iterator anIt(CompShape); Standard_Integer n(0); TopoDS_Shape aCmp; - for(;it.More();it.Next()) { + for(; anIt.More(); anIt.Next()) { n++; - aCmp = it.Value(); + aCmp = anIt.Value(); } if(n == 1) { #ifdef OCCT_DEBUG_FSET diff --git a/src/TNaming/TNaming_Name.cxx b/src/TNaming/TNaming_Name.cxx index d8ebaa7cfe..182d623a2c 100644 --- a/src/TNaming/TNaming_Name.cxx +++ b/src/TNaming/TNaming_Name.cxx @@ -767,11 +767,11 @@ static Standard_Boolean Intersection (const TDF_Label& L, indxW = (Index & 0x000F0000) >> 16; nbW = (Index & 0x00F00000) >> 20; indxF = (Index & 0x0F000000) >> 24; - Standard_Integer i(1); + Standard_Integer k(1); TopoDS_Shape aS; TopTools_ListIteratorOfListOfShape itl(aListOfAnc); - for(;itl.More();itl.Next(),i++) { - if(indxF == i) { + for(;itl.More();itl.Next(),k++) { + if(indxF == k) { aS = itl.Value(); break; } @@ -1554,15 +1554,15 @@ static Standard_Boolean ORientation (const TDF_Label& L, TNaming_NamingTool::BuildDescendants (Stop, Forbiden); TNaming_NamingTool::CurrentShape (Valid,Forbiden,A,MS); - TopoDS_Shape S; + TopoDS_Shape aShape; Standard_Boolean isSplit(Standard_False); if (!MS.IsEmpty ()) { if (MS.Extent() == 1) { - S = MS (1); + aShape = MS (1); } else { isSplit = Standard_True; - S = MakeShape(MS); + aShape = MakeShape(MS); #ifdef OCCT_DEBUG_OR for(Standard_Integer anItMS = 1; anItMS <= MS.Extent(); anItMS++) { TCollection_AsciiString aNam("OR_Selection_"); @@ -1574,7 +1574,7 @@ static Standard_Boolean ORientation (const TDF_Label& L, } TNaming_Builder B(L); - if(S.IsNull()) + if(aShape.IsNull()) return Standard_False; #ifdef OCCT_DEBUG_OR DbgTools_Write(S, "Orientation_S.brep"); @@ -1582,8 +1582,8 @@ static Standard_Boolean ORientation (const TDF_Label& L, TopTools_ListOfShape aSList; // tmp. solution - if(S.ShapeType() == TopAbs_COMPOUND && !isSplit) { - TopoDS_Iterator it(S); + if(aShape.ShapeType() == TopAbs_COMPOUND && !isSplit) { + TopoDS_Iterator it(aShape); for(;it.More();it.Next()) aSList.Append(it.Value()); } // @@ -1608,7 +1608,7 @@ static Standard_Boolean ORientation (const TDF_Label& L, Standard_Boolean found(Standard_False); TopoDS_Iterator it(itw.Value()); for(int i=1;it.More();it.Next(),i++) { - if(i == Index && it.Value().IsSame(S)) { + if(i == Index && it.Value().IsSame(aShape)) { CS = it.Value(); found = Standard_True; #ifdef OCCT_DEBUG_OR @@ -1620,7 +1620,7 @@ static Standard_Boolean ORientation (const TDF_Label& L, if(found) break; } } else - CS = FindSubShapeInAncestor(S, AS); + CS = FindSubShapeInAncestor(aShape, AS); // <=== end 21.10.2009 #ifdef OCCT_DEBUG_OR cout << "ORIENTATION: Selection" <<" TShape = " <Label(), entry); #endif MS.Clear(); - TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS);// fill MS with last modifications of the it.Value() + TNaming_NamingTool::CurrentShape (Valid, Forbiden,anIter.Value(),MS);// fill MS with last modifications of the it.Value() CS = MakeShape(MS); TNaming_ShapesSet OS(CS,TopAbs_EDGE); aSet.Add(OS); //concatenate both shapesets @@ -1857,14 +1857,14 @@ static Standard_Boolean ShellIN(const TDF_Label& L, Standard_Boolean aResult(Standard_False); if(!ValidArgs(Args)) return aResult; - TopTools_IndexedMapOfShape MS; - TDF_LabelMap Forbiden; + TopTools_IndexedMapOfShape aMapOfSh; + TDF_LabelMap aForbiden; if (Args.Extent() < 1 ) Standard_ConstructionError::Raise("TNaming_Name::Solve"); const Handle(TNaming_NamedShape)& A = Args.First(); - TNaming_NamingTool::CurrentShape (Valid,Forbiden,A,MS); - if (MS.Extent() != 1) return aResult; - const TopoDS_Shape& aCSO = MS (1); + TNaming_NamingTool::CurrentShape (Valid,aForbiden,A, aMapOfSh); + if (aMapOfSh.Extent() != 1) return aResult; + const TopoDS_Shape& aCSO = aMapOfSh(1); #ifdef OCCT_DEBUG_SHELL cout <<"MS Extent = " <Label(), entry); + TDF_Tool::Entry(anIter.Value()->Label(), entry); TCollection_AsciiString Nam("Arg_"); TCollection_AsciiString aNam = Nam + entry + "_" + "2.brep"; DbgTools_Write(CS, aNam.ToCString()); Standard_Integer ii = 2; #endif - it.Next(); - for (; it.More(); it.Next()) { + anIter.Next(); + for (; anIter.More(); anIter.Next()) { #ifdef OCCT_DEBUG_SHELL - TDF_Tool::Entry(it.Value()->Label(), entry); + TDF_Tool::Entry(anIter.Value()->Label(), entry); #endif MS.Clear(); - TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS);// fill MS with last modifications of the it.Value() + TNaming_NamingTool::CurrentShape (Valid, Forbiden,anIter.Value(),MS);// fill MS with last modifications of the it.Value() CS = MakeShape(MS); TNaming_ShapesSet OS(CS,TopAbs_FACE); aSet.Add(OS); //concatenate both shapesets diff --git a/src/TNaming/TNaming_Naming.cxx b/src/TNaming/TNaming_Naming.cxx index 47721ec863..af2eed5408 100644 --- a/src/TNaming/TNaming_Naming.cxx +++ b/src/TNaming/TNaming_Naming.cxx @@ -500,10 +500,10 @@ static Standard_Boolean TestSolution(const TNaming_Scope& MDF, MS.Remove(exp.Current()); } } else { - TColStd_MapIteratorOfMapOfInteger itm(aView); - for(;itm.More();itm.Next()) { - TopAbs_ShapeEnum aType = (TopAbs_ShapeEnum)itm.Key(); - for (exp.Init(Res,aType) ; exp.More(); exp.Next()) { + TColStd_MapIteratorOfMapOfInteger aMapIter(aView); + for(; aMapIter.More(); aMapIter.Next()) { + TopAbs_ShapeEnum aCurType = (TopAbs_ShapeEnum)aMapIter.Key(); + for (exp.Init(Res, aCurType) ; exp.More(); exp.Next()) { if (MS.Contains(exp.Current())) { MS.Remove(exp.Current()); } @@ -1669,7 +1669,7 @@ Handle(TNaming_NamedShape) TNaming_Naming::Name (const TDF_Label& F, const Standard_Boolean BNProblem) { - Handle(TNaming_NamedShape) NS; + Handle(TNaming_NamedShape) aNamedShape; if (KeepOrientation) { #ifdef OCCT_DEBUG_INNS cout <<"KeepOR = 1: "; Print_Entry(F); @@ -1704,9 +1704,9 @@ Handle(TNaming_NamedShape) TNaming_Naming::Name (const TDF_Label& F, theName.Type(TNaming_ORIENTATION); theName.Orientation(S.Orientation()); - if (!TNaming_Selector::IsIdentified (F, S, NS, Geom)) - NS = TNaming_Naming::Name(Naming->Label(),S,Context,Geom,0); - theName.Append (NS); + if (!TNaming_Selector::IsIdentified (F, S, aNamedShape, Geom)) + aNamedShape = TNaming_Naming::Name(Naming->Label(),S,Context,Geom,0); + theName.Append (aNamedShape); #ifdef MDTV_OR cout << " Sel Label ==> "; Print_Entry(NS->Label()); #endif @@ -1735,12 +1735,12 @@ Handle(TNaming_NamedShape) TNaming_Naming::Name (const TDF_Label& F, if(S.ShapeType() == TopAbs_COMPOUND && Arr->Length() > 1) { // N arguments: to be optimized to avoid duplication of the same Context shape for(Standard_Integer i = Arr->Lower(); i <= Arr->Upper(); i++) { - NS = TNaming_Naming::Name(Naming->Label(), Arr->Value(i), Context, Geom, 1, aBNproblem); - theName.Append (NS); + aNamedShape = TNaming_Naming::Name(Naming->Label(), Arr->Value(i), Context, Geom, 1, aBNproblem); + theName.Append (aNamedShape); } } else { - NS = TNaming_Naming::Name(Naming->Label(),UC,Context, Geom, 1, aBNproblem); - theName.Append (NS); + aNamedShape = TNaming_Naming::Name(Naming->Label(),UC,Context, Geom, 1, aBNproblem); + theName.Append (aNamedShape); #ifdef MDTV_OR cout << " Cont Label ==> "; Print_Entry(NS->Label()); #endif @@ -1749,23 +1749,23 @@ Handle(TNaming_NamedShape) TNaming_Naming::Name (const TDF_Label& F, TNaming_Scope MDF; BuildScope (MDF,Context,F); Naming->GetName().Solve(Naming->Label(),MDF.GetValid()); - Naming->Label().FindAttribute(TNaming_NamedShape::GetID(),NS); - theName.ContextLabel(NS->Label()); - if (Geom) return NS; - if(NS.IsNull()) { + Naming->Label().FindAttribute(TNaming_NamedShape::GetID(), aNamedShape); + theName.ContextLabel(aNamedShape->Label()); + if (Geom) return aNamedShape; + if(aNamedShape.IsNull()) { cout <<" %%% WARNING: TNaming_Naming::Name: FAILED"<Curves()); BRep_ListOfCurveRepresentation& lcr = TTE2->ChangeCurves(); lcr.Clear(); - Handle(BRep_CurveRepresentation) CR; Handle(BRep_GCurve) GC; Standard_Real f, l; diff --git a/src/TestTopOpe/TestTopOpe_CORCommands.cxx b/src/TestTopOpe/TestTopOpe_CORCommands.cxx index 60b51b5f43..30253102f1 100644 --- a/src/TestTopOpe/TestTopOpe_CORCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_CORCommands.cxx @@ -261,19 +261,19 @@ Standard_Integer reguso(Draw_Interpretor& di, Standard_Integer n, const char** a TopTools_ListOfShape splits; SheToSo.MakeSolids(so,splits); - BRep_Builder BB; - TopoDS_Compound CC; BB.MakeCompound(CC); + BRep_Builder aBBuilder; + TopoDS_Compound aCompound; aBBuilder.MakeCompound(aCompound); Standard_Integer nSo = 0; TopTools_ListIteratorOfListOfShape itSo(splits); for (; itSo.More(); itSo.Next()) { const TopoDS_Shape& spli = itSo.Value(); - BB.Add(CC,spli); + aBBuilder.Add(aCompound,spli); nSo++; } di<<"so gives "<Support(); TopOpeBRepDS_Kind ST1 = I1->SupportType(); if (ST1 != TopOpeBRepDS_EDGE) continue; const TopoDS_Edge& e2 = TopoDS::Edge(BDS.Shape(S1)); @@ -747,9 +747,9 @@ void TopOpeBRep_DSFiller::InsertIntersection2d TopoDS_Shape S1 = aS1; TopoDS_Shape S2 = aS2; - TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS(); - BDS.AddShape(S1,1); - BDS.AddShape(S2,2); + TopOpeBRepDS_DataStructure& BDS1 = HDS->ChangeDS(); + BDS1.AddShape(S1,1); + BDS1.AddShape(S2,2); TopoDS_Shape lFF1, lFF2; Standard_Boolean isFFsamdom = Standard_False; @@ -785,9 +785,9 @@ void TopOpeBRep_DSFiller::InsertIntersection2d unfill = Standard_False; } if (unfill) { - TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS(); + TopOpeBRepDS_DataStructure& BDS2 = HDS->ChangeDS(); if(!lFF1.IsNull() && !lFF2.IsNull()) - BDS.UnfillShapesSameDomain(lFF1,lFF2); + BDS2.UnfillShapesSameDomain(lFF1,lFF2); } } @@ -795,7 +795,7 @@ void TopOpeBRep_DSFiller::InsertIntersection2d isFFsamdom = Standard_True; myShapeIntersector2d.ChangeEdgesIntersector().SetFaces(gs1,gs2); lFF1 = gs1; lFF2 = gs2; - BDS.FillShapesSameDomain(gs1,gs2); + BDS1.FillShapesSameDomain(gs1,gs2); } else if ((t1 == TopAbs_EDGE) && (t2 == TopAbs_EDGE)) { TopOpeBRep_EdgesIntersector& EE = myShapeIntersector2d.ChangeEdgesIntersector(); diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx index 30e8987903..d5cce79a1b 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx @@ -368,8 +368,8 @@ Standard_Boolean EdgesIntersector_checkT1D(const TopoDS_Edge& E1,const TopoDS_Ed if (!ok) return;//nyiRaise - Handle(Geom_Surface) S1 = BRep_Tool::Surface(myFace1); - Standard_Boolean apex = FUN_tool_onapex(uv2,S1); + Handle(Geom_Surface) aSurf1 = BRep_Tool::Surface(myFace1); + Standard_Boolean apex = FUN_tool_onapex(uv2, aSurf1); if (apex) { TopoDS_Vertex vf,vl; TopExp::Vertices(myEdge1,vf,vl); gp_Pnt ptf = BRep_Tool::Pnt(vf); Standard_Real df = pt2.Distance(ptf); @@ -422,9 +422,9 @@ Standard_Boolean EdgesIntersector_checkT1D(const TopoDS_Edge& E1,const TopoDS_Ed GeomTools_CurveSet::PrintCurve(NC,cout); cout<<"--- nouvelle PCurve : "<Transition(); + const Handle(TopOpeBRepDS_Interference)& anI = DSCIL.First(); + const TopOpeBRepDS_Transition& lasttransLine = anI->Transition(); // xpu12-12-97 : line is built on only 2 vp, // DSCIL->First() == DSCIL->Last() // lasttransLine = DSCIL's first transition diff --git a/src/TopOpeBRep/TopOpeBRep_vpr.cxx b/src/TopOpeBRep/TopOpeBRep_vpr.cxx index 7cdc3a8442..b4752b42c1 100644 --- a/src/TopOpeBRep/TopOpeBRep_vpr.cxx +++ b/src/TopOpeBRep/TopOpeBRep_vpr.cxx @@ -1183,7 +1183,7 @@ void TopOpeBRep_FacesFiller::ProcessVPonR addEPI = Standard_True; } else { // EPIfound - TopAbs_Orientation otransEdge = transEdge.Orientation(TopAbs_IN); + TopAbs_Orientation anOtransEdge = transEdge.Orientation(TopAbs_IN); Standard_Boolean opporifound,memorifound; opporifound = memorifound = Standard_False; TopOpeBRepDS_ListOfInterference loIfound; @@ -1196,8 +1196,8 @@ void TopOpeBRep_FacesFiller::ProcessVPonR // - il n'en existe pas deja une d'orientation identique a TransEdge for (; PI.More(); PI.Next()){ TopAbs_Orientation oEPI = PI.Value()->Transition().Orientation(TopAbs_IN); - if (!memorifound) memorifound = ( oEPI == otransEdge ); - if (!opporifound) opporifound = ( oEPI == TopAbs::Complement(otransEdge) ); + if (!memorifound) memorifound = ( oEPI == anOtransEdge); + if (!opporifound) opporifound = ( oEPI == TopAbs::Complement(anOtransEdge) ); addEPI = (opporifound && ! memorifound); if (addEPI) break; } diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx index c92331a1be..5de0450894 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx @@ -144,8 +144,8 @@ Standard_Integer TopOpeBRepTool_CLASSI::ClassiBnd2d(const TopoDS_Shape& S1,const #ifdef OCCT_DEBUG Standard_Boolean trc = Standard_False; if (trc) { - for (Standard_Integer i = 1; i <= 2; i++) - cout<<"B("< have been stored - if (!isb) {myedstoconnect.Remove(e); continue;} + if (!isBound) {myedstoconnect.Remove(e); continue;} const TopTools_ListOfShape& lof = mymapeFs.Find(e); Standard_Integer nf = lof.Extent(); if (nf == 0) {myedstoconnect.Remove(e); mymapeFs.UnBind(e); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx index 0a718ba733..df01f3c521 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx @@ -857,14 +857,14 @@ static Standard_Boolean FUN_analyticcS(const gp_Pnt2d& uv0, const Handle(Geom_Su direct = toto.Direct(); } Standard_Real prod = axis.Dot(tg0); - Standard_Boolean maxAcurv = FUN_nullprodv(1-Abs(prod)); + Standard_Boolean isMaxAcurv = FUN_nullprodv(1-Abs(prod)); Standard_Boolean nullcurv = FUN_nullprodv(prod); Standard_Real prod2 = ngS.Dot(tg0); if (cyl || cone) nullcurv = nullcurv || FUN_nullprodv(1-Abs(prod2)); if (nullcurv) {curv = 0.; curvdone = Standard_True;} - if (maxAcurv) { + if (isMaxAcurv) { GeomLProp_SLProps slprops(S,uv0.X(),uv0.Y(),2,Precision::Confusion()); Standard_Boolean curdef = slprops.IsCurvatureDefined(); if (curdef) { @@ -1561,8 +1561,8 @@ Standard_Boolean TopOpeBRepTool_TOOL::EdgeONFace(const Standard_Real par,const T gp_Vec tge; Standard_Boolean ok = TopOpeBRepTool_TOOL::TggeomE(par,ed,tge); if (!ok) return Standard_False; gp_Vec ngf = FUN_tool_nggeomF(uv,fa); - Standard_Real prod = tge.Dot(ngf); - Standard_Boolean etgf = Abs(prod) < tola; + Standard_Real aProdDot = tge.Dot(ngf); + Standard_Boolean etgf = Abs(aProdDot) < tola; if (!etgf) return Standard_True; BRepAdaptor_Surface bs(fa); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_closing.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_closing.cxx index b67625cce9..e23dac1a30 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_closing.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_closing.cxx @@ -116,12 +116,12 @@ Standard_EXPORT Standard_Boolean FUN_tool_correctCLO(TopoDS_Edge& E, const TopoD Standard_Real dot = dxx.Dot(dxx1); if (dot < 0.) continue; - gp_Vec2d dxx; Standard_Real dd=0; - if (inU) {dd = o2d1.X()-o2d.X(); dxx = gp_Vec2d(dd,0.);} - else {dd = o2d1.Y()-o2d.Y(); dxx = gp_Vec2d(0.,dd);} + gp_Vec2d aDxx; Standard_Real dd=0; + if (inU) {dd = o2d1.X()-o2d.X(); aDxx = gp_Vec2d(dd,0.);} + else {dd = o2d1.Y()-o2d.Y(); aDxx = gp_Vec2d(0.,dd);} if (Abs(dd)SetColor (myTenthColor); myGroup->SetGroupPrimitivesAspect (LineAttrib); - Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2*nbpnts); + Handle(Graphic3d_ArrayOfSegments) aPrims1 = new Graphic3d_ArrayOfSegments(2*nbpnts); const gp_Pnt p0(0., 0., -myOffSet); for (Standard_Integer i=1; i<=nbpnts; i++) { - aPrims->AddVertex(p0); - aPrims->AddVertex(Cos(alpha*i)*myRadius, Sin(alpha*i)*myRadius, -myOffSet); + aPrims1->AddVertex(p0); + aPrims1->AddVertex(Cos(alpha*i)*myRadius, Sin(alpha*i)*myRadius, -myOffSet); } - myGroup->AddPrimitiveArray(aPrims, Standard_False); + myGroup->AddPrimitiveArray(aPrims1, Standard_False); // circles nbpnts = 2 * Division + 1; @@ -246,13 +246,13 @@ void V3d_CircularGrid::DefineLines () myGroup->SetGroupPrimitivesAspect (LineAttrib); Standard_Integer n, np; const Standard_Integer nbl = aSeqTenth.Length() / nbpnts; - Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(aSeqTenth.Length(),nbl); + Handle(Graphic3d_ArrayOfPolylines) aPrims2 = new Graphic3d_ArrayOfPolylines(aSeqTenth.Length(),nbl); for (np = 1, n=0; nAddBound(nbpnts); + aPrims2->AddBound(nbpnts); for (Standard_Integer i=0; iAddVertex(aSeqTenth(np)); + aPrims2->AddVertex(aSeqTenth(np)); } - myGroup->AddPrimitiveArray(aPrims, Standard_False); + myGroup->AddPrimitiveArray(aPrims2, Standard_False); } if (aSeqLines.Length()) { @@ -260,13 +260,13 @@ void V3d_CircularGrid::DefineLines () myGroup->SetPrimitivesAspect (LineAttrib); Standard_Integer n, np; const Standard_Integer nbl = aSeqLines.Length() / nbpnts; - Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(aSeqLines.Length(),nbl); + Handle(Graphic3d_ArrayOfPolylines) aPrims3 = new Graphic3d_ArrayOfPolylines(aSeqLines.Length(),nbl); for (np = 1, n=0; nAddBound(nbpnts); + aPrims3->AddBound(nbpnts); for (Standard_Integer i=0; iAddVertex(aSeqLines(np)); + aPrims3->AddVertex(aSeqLines(np)); } - myGroup->AddPrimitiveArray(aPrims, Standard_False); + myGroup->AddPrimitiveArray(aPrims3, Standard_False); } myGroup->SetMinMaxValues(-myRadius, -myRadius, 0.0, myRadius, myRadius, 0.0); diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 3365ef2ed1..ab791f4c63 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -3025,11 +3025,11 @@ Handle( Poly_Triangulation ) CalculationOfSphere( double X , double Y , double Z Nor = gp_Dir(eqPlan); else Nor = gp_Dir(0., 0., 1.); - - Standard_Integer j = (i - PointsOfArray.Lower()) * 3; - Normals->SetValue(j + 1, (Standard_ShortReal)Nor.X()); - Normals->SetValue(j + 2, (Standard_ShortReal)Nor.Y()); - Normals->SetValue(j + 3, (Standard_ShortReal)Nor.Z()); + + Standard_Integer k = (i - PointsOfArray.Lower()) * 3; + Normals->SetValue(k + 1, (Standard_ShortReal)Nor.X()); + Normals->SetValue(k + 2, (Standard_ShortReal)Nor.Y()); + Normals->SetValue(k + 3, (Standard_ShortReal)Nor.Z()); } delete pc; @@ -3922,8 +3922,8 @@ static Standard_Integer VConnect (Draw_Interpretor& /*di*/, } else { - Standard_CString aName = anOriginObjectName.ToCString(); - TopoDS_Shape aTDShape = DBRep::Get (aName); + Standard_CString aOriginName = anOriginObjectName.ToCString(); + TopoDS_Shape aTDShape = DBRep::Get (aOriginName); if (aTDShape.IsNull()) { std::cout << "vconnect error: object " << anOriginObjectName << " doesn't exist\n"; @@ -4028,8 +4028,8 @@ static Standard_Integer VConnectTo (Draw_Interpretor& /*di*/, } else { - Standard_CString aName = anOriginObjectName.ToCString(); - TopoDS_Shape aTDShape = DBRep::Get (aName); + Standard_CString aOriginName = anOriginObjectName.ToCString(); + TopoDS_Shape aTDShape = DBRep::Get (aOriginName); if (aTDShape.IsNull()) { std::cout << "vconnect error: object " << anOriginObjectName << " doesn't exist\n"; @@ -4274,8 +4274,8 @@ static Standard_Integer VListConnected (Draw_Interpretor& /*di*/, { if (GetMapOfAIS().IsBound1 (anIter.Value())) { - TCollection_AsciiString aName = GetMapOfAIS().Find1 (anIter.Value()); - std::cout << aCounter << ") " << aName << " (" << anIter.Value()->DynamicType()->Name() << ")"; + TCollection_AsciiString aCuurrentName = GetMapOfAIS().Find1 (anIter.Value()); + std::cout << aCounter << ") " << aCuurrentName << " (" << anIter.Value()->DynamicType()->Name() << ")"; } std::cout << aCounter << ") " << anIter.Value()->DynamicType()->Name(); diff --git a/src/ViewerTest/ViewerTest_RelationCommands.cxx b/src/ViewerTest/ViewerTest_RelationCommands.cxx index 8569d07233..f0cd9af40b 100644 --- a/src/ViewerTest/ViewerTest_RelationCommands.cxx +++ b/src/ViewerTest/ViewerTest_RelationCommands.cxx @@ -333,12 +333,12 @@ static int ParseDimensionParams (Standard_Integer theArgNum, } else if (aParam.IsEqual ("-arrow")) { - TCollection_AsciiString aParam (theArgVec[++anIt]); - aParam.LowerCase(); + TCollection_AsciiString aLocalParam(theArgVec[++anIt]); + aLocalParam.LowerCase(); - if (aParam == "external") { theAspect->SetArrowOrientation (Prs3d_DAO_External); } - if (aParam == "internal") { theAspect->SetArrowOrientation (Prs3d_DAO_Internal); } - if (aParam == "fit") { theAspect->SetArrowOrientation (Prs3d_DAO_Fit); } + if (aLocalParam == "external") { theAspect->SetArrowOrientation (Prs3d_DAO_External); } + if (aLocalParam == "internal") { theAspect->SetArrowOrientation (Prs3d_DAO_Internal); } + if (aLocalParam == "fit") { theAspect->SetArrowOrientation (Prs3d_DAO_Fit); } } else if (aParam.IsEqual ("-arrowlength") || aParam.IsEqual ("-arlen")) { @@ -366,13 +366,13 @@ static int ParseDimensionParams (Standard_Integer theArgNum, } else if (aParam.IsEqual ("-extension")) { - TCollection_AsciiString aParam (theArgVec[++anIt]); - if (!aParam.IsRealValue()) + TCollection_AsciiString aLocalParam(theArgVec[++anIt]); + if (!aLocalParam.IsRealValue()) { std::cerr << "Error: extension size for dimension should be real value.\n"; return 1; } - theAspect->SetExtensionSize (Draw::Atof (aParam.ToCString())); + theAspect->SetExtensionSize (Draw::Atof (aLocalParam.ToCString())); } else if (aParam.IsEqual ("-plane")) { @@ -401,37 +401,37 @@ static int ParseDimensionParams (Standard_Integer theArgNum, } else if (aParam.IsEqual ("-flyout")) { - TCollection_AsciiString aParam (theArgVec[++anIt]); - if (!aParam.IsRealValue()) + TCollection_AsciiString aLocalParam(theArgVec[++anIt]); + if (!aLocalParam.IsRealValue()) { std::cerr << "Error: flyout for dimension should be real value.\n"; return 1; } - theRealParams.Bind ("flyout", Draw::Atof (aParam.ToCString())); + theRealParams.Bind ("flyout", Draw::Atof (aLocalParam.ToCString())); } else if (aParam.IsEqual ("-value")) { - TCollection_AsciiString aParam (theArgVec[++anIt]); - if (!aParam.IsRealValue()) + TCollection_AsciiString aLocalParam(theArgVec[++anIt]); + if (!aLocalParam.IsRealValue()) { std::cerr << "Error: dimension value for dimension should be real value.\n"; return 1; } - theRealParams.Bind ("value", Draw::Atof (aParam.ToCString())); + theRealParams.Bind ("value", Draw::Atof (aLocalParam.ToCString())); } else if (aParam.IsEqual ("-modelunits")) { - TCollection_AsciiString aParam (theArgVec[++anIt]); + TCollection_AsciiString aLocalParam(theArgVec[++anIt]); - theStringParams.Bind ("modelunits", aParam); + theStringParams.Bind ("modelunits", aLocalParam); } else if (aParam.IsEqual ("-dispunits")) { - TCollection_AsciiString aParam (theArgVec[++anIt]); + TCollection_AsciiString aLocalParam(theArgVec[++anIt]); - theStringParams.Bind ("dispunits", aParam); + theStringParams.Bind ("dispunits", aLocalParam); } else { diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index f0fa0ecc7e..b48044de65 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -597,10 +597,10 @@ TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft // Change name of current active window if (!ViewerTest::CurrentView().IsNull()) { - TCollection_AsciiString aTitle("3D View - "); - aTitle = aTitle + TCollection_AsciiString anActiveWindowTitle("3D View - "); + anActiveWindowTitle = anActiveWindowTitle + ViewerTest_myViews.Find2 (ViewerTest::CurrentView()); - SetWindowTitle (ViewerTest::CurrentView()->Window(), aTitle.ToCString()); + SetWindowTitle (ViewerTest::CurrentView()->Window(), anActiveWindowTitle.ToCString()); } // Create viewer @@ -3566,14 +3566,14 @@ static int VColorScale (Draw_Interpretor& theDI, std::cout << "Error: wrong syntax at argument '" << anArg << "'!\n"; return 1; } - TCollection_AsciiString anArg (theArgVec[anArgIter + 1]); - if (!anArg.IsIntegerValue()) + TCollection_AsciiString aFontArg(theArgVec[anArgIter + 1]); + if (!aFontArg.IsIntegerValue()) { std::cout << "Error: HeightFont value should be integer!\n"; return 1; } - aTextHeight = anArg.IntegerValue(); + aTextHeight = aFontArg.IntegerValue(); anArgIter += 1; } else if (aFlag == "-textpos") @@ -3583,27 +3583,27 @@ static int VColorScale (Draw_Interpretor& theDI, std::cout << "Error: wrong syntax at argument '" << anArg << "'!\n"; return 1; } - TCollection_AsciiString anArg (theArgVec[++anArgIter]); - anArg.LowerCase(); - if (anArg == "none") + TCollection_AsciiString aTextPosArg(theArgVec[++anArgIter]); + aTextPosArg.LowerCase(); + if (aTextPosArg == "none") { aLabPosition = Aspect_TOCSP_NONE; } - else if (anArg == "left") + else if (aTextPosArg == "left") { aLabPosition = Aspect_TOCSP_LEFT; } - else if (anArg == "right") + else if (aTextPosArg == "right") { aLabPosition = Aspect_TOCSP_RIGHT; } - else if (anArg == "center") + else if (aTextPosArg == "center") { aLabPosition = Aspect_TOCSP_CENTER; } else { - std::cout << "Error: unknown position '" << anArg << "'!\n"; + std::cout << "Error: unknown position '" << aTextPosArg << "'!\n"; return 1; } } diff --git a/src/Voxel/Voxel_CollisionDetection.cxx b/src/Voxel/Voxel_CollisionDetection.cxx index be57a8f6eb..5fd8b5f4dc 100644 --- a/src/Voxel/Voxel_CollisionDetection.cxx +++ b/src/Voxel/Voxel_CollisionDetection.cxx @@ -237,8 +237,8 @@ Standard_Boolean Voxel_CollisionDetection::Compute() { for (ishape = 1; ishape < nb_shapes; ishape++) // start with second shape { - Voxel_BoolDS& voxels = ((Voxel_BoolDS*)myVoxels)[ishape]; - if (voxels.Get(ix, iy, iz)) + Voxel_BoolDS& anOtherVoxels = ((Voxel_BoolDS*)myVoxels)[ishape]; + if (anOtherVoxels.Get(ix, iy, iz)) { myCollisions.Set(ix, iy, iz, Standard_True); if (!myHasCollisions) diff --git a/src/Voxel/Voxel_FastConverter.cxx b/src/Voxel/Voxel_FastConverter.cxx index 322f5f1c0f..249b94bb20 100644 --- a/src/Voxel/Voxel_FastConverter.cxx +++ b/src/Voxel/Voxel_FastConverter.cxx @@ -813,10 +813,10 @@ void Voxel_FastConverter::ComputeVoxelsNearTriangle(const gp_Pln& plane ElSLib::Parameters(plane, pc, uc, vc); p2dc.SetCoord(uc, vc); - gp_Vec2d v2dct(p2dc, p2dt); - dv = v2dct.Magnitude() - Precision::Confusion(); + gp_Vec2d aVec2dct1(p2dc, p2dt); + dv = aVec2dct1.Magnitude() - Precision::Confusion(); Lv.SetLocation(p2dc); - Lv.SetDirection(v2dct); + Lv.SetDirection(aVec2dct1); // Side 1: if (mayIntersect(p2d1, p2d2, p2dc, p2dt)) @@ -881,10 +881,10 @@ void Voxel_FastConverter::ComputeVoxelsNearTriangle(const gp_Pln& plane ElSLib::Parameters(plane, pc, uc, vc); p2dc.SetCoord(uc, vc); - gp_Vec2d v2dct(p2dc, p2dt); - dv = v2dct.Magnitude() - Precision::Confusion(); + gp_Vec2d aVec2dct2(p2dc, p2dt); + dv = aVec2dct2.Magnitude() - Precision::Confusion(); Lv.SetLocation(p2dc); - Lv.SetDirection(v2dct); + Lv.SetDirection(aVec2dct2); // Side 1: if (mayIntersect(p2d1, p2d2, p2dc, p2dt)) @@ -1069,18 +1069,18 @@ static bool TriBoxOverlap(const gp_Pnt & p1, const gp_Pnt & p2, const gp_Pnt & p gp_Vec v2(center, p3); // First, test overlap in the {x,y,z}-directions - double min,max; + double aMin,aMax; // Find min, max of the triangle in x-direction, and test for overlap in X - FINDMINMAX(v0.X(), v1.X(), v2.X(), min, max); - if(min>extents.X() || max<-extents.X()) return false; + FINDMINMAX(v0.X(), v1.X(), v2.X(), aMin, aMax); + if(aMin>extents.X() || aMax<-extents.X()) return false; // Same for Y - FINDMINMAX(v0.Y(), v1.Y(), v2.Y(), min, max); - if(min>extents.Y() || max<-extents.Y()) return false; + FINDMINMAX(v0.Y(), v1.Y(), v2.Y(), aMin, aMax); + if(aMin>extents.Y() || aMax<-extents.Y()) return false; // Same for Z - FINDMINMAX(v0.Z(), v1.Z(), v2.Z(), min, max); - if(min>extents.Z() || max<-extents.Z()) return false; + FINDMINMAX(v0.Z(), v1.Z(), v2.Z(), aMin, aMax); + if(aMin>extents.Z() || aMax<-extents.Z()) return false; // 2) Test if the box intersects the plane of the triangle // compute plane equation of triangle: normal*x+d=0 diff --git a/src/Voxel/Voxel_OctBoolDS.cxx b/src/Voxel/Voxel_OctBoolDS.cxx index 72b425ca78..14d1183d5f 100644 --- a/src/Voxel/Voxel_OctBoolDS.cxx +++ b/src/Voxel/Voxel_OctBoolDS.cxx @@ -288,9 +288,9 @@ void Voxel_OctBoolDS::OptimizeMemory() const Standard_Integer ix = itrix.Value(); const Standard_Integer iy = itriy.Value(); const Standard_Integer iz = itriz.Value(); - const Standard_Integer value = itrvalues.Value(); + const Standard_Integer aValue = itrvalues.Value(); - Set(ix, iy, iz, (value ? Standard_True : Standard_False)); + Set(ix, iy, iz, (aValue ? Standard_True : Standard_False)); UnSplit(ix, iy, iz); } diff --git a/src/VrmlData/VrmlData_IndexedFaceSet.cxx b/src/VrmlData/VrmlData_IndexedFaceSet.cxx index ce1cdb11aa..992e30c7ee 100644 --- a/src/VrmlData/VrmlData_IndexedFaceSet.cxx +++ b/src/VrmlData/VrmlData_IndexedFaceSet.cxx @@ -180,18 +180,18 @@ const Handle(TopoDS_TShape)& VrmlData_IndexedFaceSet::TShape () { for (i = 0; i < (int)myNbPolygons; i++) { - const Standard_Integer * arrNodes; - if (Polygon(i, arrNodes) == 3 && - arrNodes[0] >= 0 && - arrNodes[0] < nNodes && - arrNodes[1] < nNodes && - arrNodes[2] < nNodes) // check to avoid previously skipped faces + const Standard_Integer * anArrNodes; + if (Polygon(i, anArrNodes) == 3 && + anArrNodes[0] >= 0 && + anArrNodes[0] < nNodes && + anArrNodes[1] < nNodes && + anArrNodes[2] < nNodes) // check to avoid previously skipped faces { const Standard_Integer * arrIndice; if (IndiceNormals(i, arrIndice) == 3) { for (Standard_Integer j = 0; j < 3; j++) { const gp_XYZ& aNormal = myNormals->Normal (arrIndice[j]); - Standard_Integer anInd = (mapNodeId(arrNodes[j]) - 1) * 3 + 1; + Standard_Integer anInd = (mapNodeId(anArrNodes[j]) - 1) * 3 + 1; Normals->SetValue (anInd + 0, Standard_ShortReal (aNormal.X())); Normals->SetValue (anInd + 1, Standard_ShortReal (aNormal.Y())); Normals->SetValue (anInd + 2, Standard_ShortReal (aNormal.Z())); diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_Tool.cxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_Tool.cxx index 6ca22029f8..4969413b27 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_Tool.cxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_Tool.cxx @@ -140,13 +140,13 @@ Standard_Boolean XCAFDimTolObjects_Tool::GetRefGeomTolerances(const TopoDS_Shape if( aSeq.Value(i).FindAttribute(XCAFDoc_GeomTolerance::GetID(),aGeomTolerance)) { theGeomToleranceObjectSequence.Append(aGeomTolerance->GetObject()); - TDF_LabelSequence aSeq; - if(myDimTolTool->GetDatumOfTolerLabels(aGeomTolerance->Label(), aSeq)) + TDF_LabelSequence aLocalSeq; + if(myDimTolTool->GetDatumOfTolerLabels(aGeomTolerance->Label(), aLocalSeq)) { - for(Standard_Integer i = 1; i <= aSeq.Length(); i++) + for(Standard_Integer j = 1; j <= aLocalSeq.Length(); j++) { Handle(XCAFDoc_Datum) aDatum; - if(aSeq.Value(i).FindAttribute(XCAFDoc_Datum::GetID(), aDatum)) + if(aLocalSeq.Value(j).FindAttribute(XCAFDoc_Datum::GetID(), aDatum)) { theDatumSequence.Append(aDatum->GetObject()); theMap.Bind(theGeomToleranceObjectSequence.Last(), theDatumSequence.Last()); diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx index 94082f9135..67c415e5e0 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx @@ -291,10 +291,10 @@ void XCAFDoc_DocumentTool::Init() const Handle(TDataStd_TreeNode) aRootNode, aLabNode; if (!RootL.FindAttribute (aRefGuid, aRootNode)) { - Handle(TDataStd_TreeNode) aRootNode = TDataStd_TreeNode::Set (RootL, aRefGuid); + Handle(TDataStd_TreeNode) aRootNodeNew = TDataStd_TreeNode::Set (RootL, aRefGuid); Handle(TDataStd_TreeNode) aLNode = TDataStd_TreeNode::Set (DocL, aRefGuid); - aLNode->SetFather (aRootNode); - aRootNode->SetFirst (aLNode); + aLNode->SetFather (aRootNodeNew); + aRootNodeNew->SetFirst (aLNode); } } diff --git a/src/XCAFPrs/XCAFPrs_AISObject.cxx b/src/XCAFPrs/XCAFPrs_AISObject.cxx index 838d5b8210..77d56321aa 100644 --- a/src/XCAFPrs/XCAFPrs_AISObject.cxx +++ b/src/XCAFPrs/XCAFPrs_AISObject.cxx @@ -175,14 +175,14 @@ void XCAFPrs_AISObject::Compute (const Handle(PrsMgr_PresentationManager3d)& the { const TopoDS_Compound& aComp = aStyleGroupIter.Value(); TopoDS_Iterator aShapeIter (aComp); - TopoDS_Shape aShape = aShapeIter.Value(); + TopoDS_Shape aShapeCur = aShapeIter.Value(); aShapeIter.Next(); if (aShapeIter.More()) { - aShape = aComp; + aShapeCur = aComp; } - Handle(AIS_ColoredDrawer) aDrawer = CustomAspects (aShape); + Handle(AIS_ColoredDrawer) aDrawer = CustomAspects (aShapeCur); const XCAFPrs_Style& aStyle = aStyleGroupIter.Key(); aDrawer->SetHidden (!aStyle.IsVisible()); diff --git a/src/XDEDRAW/XDEDRAW_GDTs.cxx b/src/XDEDRAW/XDEDRAW_GDTs.cxx index 8fd97eb8f0..4f7c455957 100644 --- a/src/XDEDRAW/XDEDRAW_GDTs.cxx +++ b/src/XDEDRAW/XDEDRAW_GDTs.cxx @@ -158,14 +158,14 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c Handle(XCAFDoc_GraphNode) aNode; if(aGDTs.Value(j).FindAttribute(XCAFDoc::DatumTolRefGUID(), aNode) && aNode->NbChildren() > 0) { - for(Standard_Integer i = 1; i<=aNode->NbChildren(); i++) + for(Standard_Integer k = 1; k<=aNode->NbChildren(); k++) { Handle(XCAFDoc_Datum) aDatum; - if(aNode->GetChild(i)->Label().FindAttribute(XCAFDoc_Datum::GetID(), aDatum)) + if(aNode->GetChild(k)->Label().FindAttribute(XCAFDoc_Datum::GetID(), aDatum)) { - TCollection_AsciiString Entry; - TDF_Tool::Entry(aNode->GetChild(i)->Label(), Entry); - di << "\n \t \t " << Entry; + TCollection_AsciiString anEntry; + TDF_Tool::Entry(aNode->GetChild(k)->Label(), anEntry); + di << "\n \t \t " << anEntry; di << " Datum"; } } diff --git a/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx b/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx index 2b0ace1a25..b3794a4147 100644 --- a/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx @@ -751,8 +751,8 @@ void XmlMDataStd_NamedDataDriver::Paste(const Handle(TDF_Attribute)& theSource, for(;;) { char aValueChar[32]; Sprintf(aValueChar, "%.15g", anArr1.Value(j)); - TCollection_AsciiString aValueStr(aValueChar); - aValueStr2 += aValueStr; + TCollection_AsciiString aValueStr3(aValueChar); + aValueStr2 += aValueStr3; if (j >= anArr1.Upper()) break; aValueStr2 += ' '; j++; diff --git a/src/math/math_FunctionSetRoot.cxx b/src/math/math_FunctionSetRoot.cxx index a2f30998f3..59485ec69c 100644 --- a/src/math/math_FunctionSetRoot.cxx +++ b/src/math/math_FunctionSetRoot.cxx @@ -473,7 +473,7 @@ static void SearchDirection(const math_Matrix& DF, Direction, Dy); } else if (Cons == Ninc) { // il n'y a plus rien a faire... - for(Standard_Integer i = Direction.Lower(); i <= Direction.Upper(); i++) { + for(i = Direction.Lower(); i <= Direction.Upper(); i++) { Direction(i) = 0; } Dy = 0; -- 2.39.5