]> OCCT Git - occt-copy.git/commitdiff
Extrema_CurveTool::IsPeriodic
authornbv <nbv@opencascade.com>
Thu, 11 Jan 2018 15:09:15 +0000 (18:09 +0300)
committernbv <nbv@opencascade.com>
Mon, 10 Dec 2018 15:11:28 +0000 (18:11 +0300)
src/Extrema/Extrema_Curve2dTool.hxx
src/Extrema/Extrema_Curve2dTool.lxx
src/Extrema/Extrema_CurveTool.cxx
src/Extrema/Extrema_CurveTool.hxx
src/Extrema/Extrema_ExtCC.cxx
src/Extrema/Extrema_ExtCC2d.cxx
src/Extrema/Extrema_GExtPC.gxx

index b4497dcc2499ed13b938c72483f0505665bd81ee..b310e9c390bb2588f6477ed35a4f0bdc22ac6f00 100644 (file)
@@ -72,7 +72,7 @@ public:
 
     static Standard_Boolean IsClosed (const Adaptor2d_Curve2d& C);
   
-    static Standard_Boolean IsPeriodic (const Adaptor2d_Curve2d& C);
+    static Standard_Boolean IsPeriodic444 (const Adaptor2d_Curve2d& C);
   
     static Standard_Real Period (const Adaptor2d_Curve2d& C);
   
index 60f05c20e4c2ffc7c8969b578e13365afed66c5a..6ab2532ca16f43787a29465913aa39554c8e5b79 100644 (file)
@@ -91,7 +91,7 @@ inline Standard_Real Extrema_Curve2dTool::FirstParameter(const Adaptor2d_Curve2d
 //purpose  : 
 //=======================================================================
 
- inline Standard_Boolean Extrema_Curve2dTool::IsPeriodic(const Adaptor2d_Curve2d& C)
+ inline Standard_Boolean Extrema_Curve2dTool::IsPeriodic444(const Adaptor2d_Curve2d& C)
 {
   return C.IsPeriodic222();
 }
index 6c5410f7db50becef2cd6e0dac5fe843e65a2d24..be4be57949b2dd2d6220913be13395a7805ce1ea 100644 (file)
 //function : IsPeriodic
 //purpose  : 
 //=======================================================================
-Standard_Boolean Extrema_CurveTool::IsPeriodic(const Adaptor3d_Curve& C)
+Standard_Boolean Extrema_CurveTool::IsPeriodic444(const Adaptor3d_Curve& C)
 {
-  GeomAbs_CurveType aType = GetType(C);
-  if (aType == GeomAbs_Circle ||
-      aType == GeomAbs_Ellipse)
-    return Standard_True;
-  else
-    return C.IsPeriodic222();
+  return C.IsPeriodic222();
 }
 
 //=======================================================================
index 163b1550e906ee7535492b25a24b899b8e2655b0..0d70c14e5e30a364a304635632278bac4b9d2559 100644 (file)
@@ -72,7 +72,7 @@ public:
   //!
     Standard_EXPORT static Handle(TColStd_HArray1OfReal) DeflCurvIntervals(const Adaptor3d_Curve& C);
 
-    Standard_EXPORT static Standard_Boolean IsPeriodic (const Adaptor3d_Curve& C);
+    Standard_EXPORT static Standard_Boolean IsPeriodic444 (const Adaptor3d_Curve& C);
   
     static Standard_Real Period (const Adaptor3d_Curve& C);
   
index da1d0007be79c5db0982f45295019b95a4c6974e..8bf8ca6938bfad0454332dd775900c59518460ca 100644 (file)
@@ -726,10 +726,10 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ExtElC&  AlgExt,
          U = P2.Parameter();
        }
 
-       if (Extrema_CurveTool::IsPeriodic(*((Adaptor3d_Curve*)myC[0]))) {
+       if (Extrema_CurveTool::IsPeriodic444(*((Adaptor3d_Curve*)myC[0]))) {
          U = ElCLib::InPeriod(U, Ut11, Ut11+Extrema_CurveTool::Period(*((Adaptor3d_Curve*)myC[0])));
        }
-       if (Extrema_CurveTool::IsPeriodic(*((Adaptor3d_Curve*)myC[1]))) {
+       if (Extrema_CurveTool::IsPeriodic444(*((Adaptor3d_Curve*)myC[1]))) {
          U2 = ElCLib::InPeriod(U2, Ut21, Ut21+Extrema_CurveTool::Period(*((Adaptor3d_Curve*)myC[1])));
        }
 
index ba2b88053ca213871a383f05846651d26a5230d2..d923c597e40acb89f1530d2693e6677a69de57ce 100644 (file)
@@ -148,7 +148,7 @@ void Extrema_ExtCC2d::Perform (const Adaptor2d_Curve2d&       C1,
           aParamSolver.SetSingleSolutionFlag(GetSingleSolutionFlag());
           aParamSolver.Perform();
           Standard_Real Period2 = 0.;
-          if (Extrema_Curve2dTool::IsPeriodic(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
+          if (Extrema_Curve2dTool::IsPeriodic444(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
           Results(aParamSolver, U11, U12, U21, U22, 2*M_PI,Period2);
         }
        break;
@@ -203,7 +203,7 @@ void Extrema_ExtCC2d::Perform (const Adaptor2d_Curve2d&       C1,
         aParamSolver.SetSingleSolutionFlag(GetSingleSolutionFlag());
         aParamSolver.Perform();
        Standard_Real Period2 = 0.;
-       if (Extrema_Curve2dTool::IsPeriodic(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
+       if (Extrema_Curve2dTool::IsPeriodic444(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
        Results(aParamSolver, U11, U12, U21, U22, 2*M_PI,Period2);
         }
        break;
@@ -260,7 +260,7 @@ void Extrema_ExtCC2d::Perform (const Adaptor2d_Curve2d&       C1,
         aParamSolver.SetSingleSolutionFlag(GetSingleSolutionFlag());
         aParamSolver.Perform();
        Standard_Real Period2 = 0.;
-       if (Extrema_Curve2dTool::IsPeriodic(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
+       if (Extrema_Curve2dTool::IsPeriodic444(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
        Results(aParamSolver, U11, U12, U21, U22, 0., Period2);
         }
        break;
@@ -316,7 +316,7 @@ void Extrema_ExtCC2d::Perform (const Adaptor2d_Curve2d&       C1,
         aParamSolver.SetSingleSolutionFlag(GetSingleSolutionFlag());
         aParamSolver.Perform();
        Standard_Real Period2 = 0.;
-       if (Extrema_Curve2dTool::IsPeriodic(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
+       if (Extrema_Curve2dTool::IsPeriodic444(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
        Results(aParamSolver, U11, U12, U21, U22, 0., Period2);
         }
        break;
@@ -360,7 +360,7 @@ void Extrema_ExtCC2d::Perform (const Adaptor2d_Curve2d&       C1,
         aParamSolver.SetSingleSolutionFlag(GetSingleSolutionFlag());
         aParamSolver.Perform();
        Standard_Real Period2 = 0.;
-       if (Extrema_Curve2dTool::IsPeriodic(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
+       if (Extrema_Curve2dTool::IsPeriodic444(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
        Results(aParamSolver, U11, U12, U21, U22, 0., Period2);
         }
        break;
@@ -376,9 +376,9 @@ void Extrema_ExtCC2d::Perform (const Adaptor2d_Curve2d&       C1,
     aParamSolver.SetSingleSolutionFlag(GetSingleSolutionFlag());
     aParamSolver.Perform();
     Standard_Real Period1 = 0.;
-    if (Extrema_Curve2dTool::IsPeriodic(C1)) Period1 = Extrema_Curve2dTool::Period(C1);
+    if (Extrema_Curve2dTool::IsPeriodic444(C1)) Period1 = Extrema_Curve2dTool::Period(C1);
     Standard_Real Period2 = 0.;
-    if (Extrema_Curve2dTool::IsPeriodic(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
+    if (Extrema_Curve2dTool::IsPeriodic444(*((Adaptor2d_Curve2d*)myC))) Period2 = Extrema_Curve2dTool::Period(*((Adaptor2d_Curve2d*)myC));
     Results(aParamSolver, U11, U12, U21, U22, Period1, Period2);
     }
     break;
index e9f76104a6031aa66efa1958fadab6f546282f83..bd6d60655f62c2535831f21fa6acf43ef2e3b448 100644 (file)
@@ -108,7 +108,7 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
       Standard_Real aPeriodJump = 0.0;
       // Avoid problem with too close knots.
       const Standard_Real aTolCoeff = (myusup - myuinf) * Precision::PConfusion();
-      if (TheCurveTool::IsPeriodic(aCurve))
+      if (TheCurveTool::IsPeriodic444(aCurve))
       {
         Standard_Integer aPeriodShift =
           Standard_Integer ((myuinf - aKnots(aFirstIdx)) / TheCurveTool::Period(aCurve));
@@ -367,7 +367,7 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
           maxint = dt;
         }
       }
-      Standard_Boolean isPeriodic = TheCurveTool::IsPeriodic(aCurve);
+      Standard_Boolean isPeriodic = TheCurveTool::IsPeriodic444(aCurve);
       TheVector V1;
       ThePoint PP;
       Standard_Real s1 = 0.0 ;
@@ -467,7 +467,7 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
         // Verification de la validite des parametres:
         ThePOnC PC = myExtPElC.Point(i);
         U = PC.Parameter();
-        if (TheCurveTool::IsPeriodic(aCurve))
+        if (TheCurveTool::IsPeriodic444(aCurve))
         {
           U = ElCLib::InPeriod(U, myuinf, myuinf+TheCurveTool::Period(aCurve));
         }
@@ -527,7 +527,7 @@ void Extrema_GExtPC::IntervalPerform(const ThePoint& P)
       // Verification de la validite des parametres pour le cas trimme:
       ThePOnC PC = myExtPC.Point(i);
       U = PC.Parameter();
-      if (TheCurveTool::IsPeriodic(*((TheCurve*)myC)))
+      if (TheCurveTool::IsPeriodic444(*((TheCurve*)myC)))
       {
         U = ElCLib::InPeriod(U, myuinf, myuinf+TheCurveTool::Period(*((TheCurve*)myC)));
       }