0024510: Remove unused local variables
[occt.git] / src / IntPatch / IntPatch_ImpPrmIntersection.cxx
old mode 100755 (executable)
new mode 100644 (file)
index c2a063b..b9721aa
@@ -1,23 +1,18 @@
 // Created on: 1992-05-07
 // Created by: Jacques GOUSSARD
 // Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
 //
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
 //
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and / or modify it
+// under the terms of the GNU Lesser General Public version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
 //
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <IntPatch_ImpPrmIntersection.ixx>
 
@@ -253,8 +248,8 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst,
              LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
            }
            else {
-             if ((test > 0.)&& arcorien == TopAbs_FORWARD ||
-                 (test < 0.)&& arcorien == TopAbs_REVERSED){
+             if (((test > 0.)&& arcorien == TopAbs_FORWARD) ||
+                 ((test < 0.)&& arcorien == TopAbs_REVERSED)){
                LocTrans = TopAbs_FORWARD;
              }
              else {
@@ -292,8 +287,8 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst,
                      LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
                    }
                    else {
-                     if ((test > 0.)&& arcorien == TopAbs_FORWARD ||
-                         (test < 0.)&& arcorien == TopAbs_REVERSED){
+                     if (((test > 0.)&& arcorien == TopAbs_FORWARD) ||
+                         ((test < 0.)&& arcorien == TopAbs_REVERSED)){
                        LocTrans = TopAbs_FORWARD;
                      }
                      else {
@@ -376,6 +371,8 @@ void Recadre(const Standard_Boolean ,
     case GeomAbs_Sphere:
       while(U1<(U1p-1.5*M_PI)) U1+=M_PI+M_PI;
       while(U1>(U1p+1.5*M_PI)) U1-=M_PI+M_PI;
+    default:
+      break;
   }
   switch(typeS2)
   { 
@@ -387,6 +384,8 @@ void Recadre(const Standard_Boolean ,
     case GeomAbs_Sphere:
       while(U2<(U2p-1.5*M_PI)) U2+=M_PI+M_PI;
       while(U2>(U2p+1.5*M_PI)) U2-=M_PI+M_PI;
+    default:
+      break;
   }
   pt.SetParameters(U1,V1,U2,V2);
 }
@@ -405,7 +404,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)& Sur
                                           const Standard_Real Pas)
 {
   Standard_Boolean reversed, procf, procl, dofirst, dolast;
-  Standard_Integer indfirst, indlast, ind2, i,j,k, NbSegm;
+  Standard_Integer indfirst = 0, indlast = 0, ind2, i,j,k, NbSegm;
   Standard_Integer NbPointIns, NbPointRst, Nblines, Nbpts, NbPointDep;
   Standard_Real U1,V1,U2,V2,paramf,paraml,currentparam;
   
@@ -1803,7 +1802,6 @@ static void ToSmooth(Handle(IntSurf_LineOn2S)& Line,
   Standard_Integer Index3 = (IsFirst) ? 3 : (Line->NbPoints()-2);
 
   Standard_Boolean doU = Standard_False;
-  Standard_Boolean doV = Standard_False;
 
   Standard_Real U1 = 0., U2 = 0., V1 = 0., V2 = 0., U3 = 0., V3 = 0.;
 
@@ -1843,8 +1841,6 @@ static void ToSmooth(Handle(IntSurf_LineOn2S)& Line,
     }
   }
 
-  if(fabs(fabs(V1)-fabs(V2)) > DDV) doV = Standard_True;
-
   if(doU) {
     Standard_Real dU = Min((DDU/10.),5.e-8);
     Standard_Real U = (U2 > U3) ? (U2 + dU) : (U2 - dU);
@@ -2328,7 +2324,7 @@ void DecomposeResult(Handle(IntPatch_Line)&   Line,
   Standard_Real BAPEX = M_PI/16.;  // delta U crossing apex
   
   Standard_Integer k = 0;
-  Standard_Real U1 = 0., U2 = 0., V1 = 0., V2 = 0., AnU1 = 0., AnV1 = 0., DU1 = 0., DV1 = 0.;
+  Standard_Real U1 = 0., U2 = 0., V1 = 0., V2 = 0., AnU1 = 0.;
   Standard_Integer Findex = 1, Lindex = NbPnts, Bindex = 0;
 
   gp_Pnt aPnt, aSPnt;
@@ -2347,8 +2343,7 @@ void DecomposeResult(Handle(IntPatch_Line)&   Line,
 
   // reset variables
   Standard_Boolean isDecomposited = Standard_False;
-  Standard_Boolean is2PIDecomposed = Standard_False;
-  U1 = 0.; V1 = 0.; U2 = 0.; V2 = 0.; AnU1 = 0.; AnV1 = 0.; DU1 = 0.; DV1 = 0.;
+  U1 = 0.; V1 = 0.; U2 = 0.; V2 = 0.; AnU1 = 0.;
 
   // analyze other points
   for(k = Findex; k <= Lindex; k++) {
@@ -2362,7 +2357,6 @@ void DecomposeResult(Handle(IntPatch_Line)&   Line,
        SSLine->Value(k).ParametersOnS1(AnU1,V1);    // S1 - quadric, set U,V by Pnt3D
       }
       sline->Add(SSLine->Value(k));
-      AnV1 = V1;
       continue;
     }
 
@@ -2377,7 +2371,6 @@ void DecomposeResult(Handle(IntPatch_Line)&   Line,
     if(DeltaU > BSEAM) {
       Bindex = k;
       isDecomposited = Standard_True;
-      is2PIDecomposed = Standard_True;
       break;
     }
     else if((DeltaU > BAPEX) && (k >= (Findex+10) && k <= (Lindex-10))) {
@@ -2389,7 +2382,6 @@ void DecomposeResult(Handle(IntPatch_Line)&   Line,
 
     sline->Add(SSLine->Value(k));
     AnU1=U1;
-    AnV1=V1;
   }
  
   IntSurf_PntOn2S aVF,aVL;