]> OCCT Git - occt-copy.git/commitdiff
Geom_TrimmedCurve
authornbv <nbv@opencascade.com>
Wed, 25 Oct 2017 15:36:21 +0000 (18:36 +0300)
committernbv <nbv@opencascade.com>
Mon, 10 Dec 2018 15:11:19 +0000 (18:11 +0300)
79 files changed:
src/BOPTools/BOPTools_AlgoTools.cxx
src/BRepAlgo/BRepAlgo.cxx
src/BRepFeat/BRepFeat_Form.cxx
src/BRepFill/BRepFill_MultiLine.cxx
src/BRepLib/BRepLib.cxx
src/BRepLib/BRepLib_MakeEdge.cxx
src/BRepOffset/BRepOffset_Inter2d.cxx
src/BRepOffset/BRepOffset_MakeOffset.cxx
src/BRepOffset/BRepOffset_Tool.cxx
src/BRepTools/BRepTools.cxx
src/BRepTools/BRepTools_NurbsConvertModification.cxx
src/BinTools/BinTools_CurveSet.cxx
src/BndLib/BndLib_Add3dCurve.cxx
src/ChFi3d/ChFi3d_Builder_0.cxx
src/ChFi3d/ChFi3d_Builder_C1.cxx
src/Draft/Draft_Modification.cxx
src/Draft/Draft_Modification_1.cxx
src/DrawTrSurf/DrawTrSurf_BSplineCurve.cxx
src/DsgPrs/DsgPrs.cxx
src/Geom/Geom_BSplineCurve.cxx
src/Geom/Geom_BSplineCurve.hxx
src/Geom/Geom_BSplineCurve_1.cxx
src/Geom/Geom_BezierCurve.cxx
src/Geom/Geom_BezierCurve.hxx
src/Geom/Geom_Circle.cxx
src/Geom/Geom_Circle.hxx
src/Geom/Geom_Curve.cxx
src/Geom/Geom_Curve.hxx
src/Geom/Geom_Ellipse.cxx
src/Geom/Geom_Ellipse.hxx
src/Geom/Geom_Hyperbola.cxx
src/Geom/Geom_Hyperbola.hxx
src/Geom/Geom_Line.cxx
src/Geom/Geom_Line.hxx
src/Geom/Geom_OffsetCurve.cxx
src/Geom/Geom_OffsetCurve.hxx
src/Geom/Geom_Parabola.cxx
src/Geom/Geom_Parabola.hxx
src/Geom/Geom_SurfaceOfLinearExtrusion.cxx
src/Geom/Geom_SurfaceOfRevolution.cxx
src/Geom/Geom_TrimmedCurve.cxx
src/Geom/Geom_TrimmedCurve.hxx
src/GeomAdaptor/GeomAdaptor_Curve.cxx
src/GeomConvert/GeomConvert.cxx
src/GeomConvert/GeomConvert_1.cxx
src/GeomFill/GeomFill_BSplineCurves.cxx
src/GeomFill/GeomFill_EvolvedSection.cxx
src/GeomFill/GeomFill_Profiler.cxx
src/GeomFill/GeomFill_SweepSectionGenerator.cxx
src/GeomFill/GeomFill_UniformSection.cxx
src/GeomInt/GeomInt_IntSS_1.cxx
src/GeomLib/GeomLib_CheckBSplineCurve.cxx
src/GeomToIGES/GeomToIGES_GeomCurve.cxx
src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx
src/GeomTools/GeomTools_CurveSet.cxx
src/HLRBRep/HLRBRep.cxx
src/Hermit/Hermit.cxx
src/IGESToBRep/IGESToBRep_IGESBoundary.cxx
src/LocOpe/LocOpe_SplitDrafts.cxx
src/ProjLib/ProjLib_ComputeApprox.cxx
src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
src/ShapeAnalysis/ShapeAnalysis_Curve.cxx
src/ShapeBuild/ShapeBuild_Edge.cxx
src/ShapeConstruct/ShapeConstruct.cxx
src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx
src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx
src/ShapeCustom/ShapeCustom_Curve.cxx
src/ShapeExtend/ShapeExtend_ComplexCurve.hxx
src/ShapeExtend/ShapeExtend_ComplexCurve.lxx
src/ShapeFix/ShapeFix_Wire.cxx
src/ShapePersistent/ShapePersistent_Geom_Curve.cxx
src/ShapeUpgrade/ShapeUpgrade.cxx
src/StepToGeom/StepToGeom.cxx
src/StepToTopoDS/StepToTopoDS_GeometricTool.cxx
src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.cxx
src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx
src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.cxx
src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx

index b65d4aaf05fdb33bba28b8b1d8ccad3d0b7153fa..f6a0fa1ccb8f13bdb834f2ee50c264fe3dd100ab 100644 (file)
@@ -1609,7 +1609,7 @@ void BOPTools_AlgoTools::MakePCurve(const TopoDS_Edge& aE,
                                        aOutTol, theContext);
       }
     //
-    if (aC3DE->IsPeriodic()) {
+    if (aC3DE->IsPeriodic111()) {
       BOPTools_AlgoTools2D::AdjustPCurveOnFace(aFFWD, aT1, aT2,  aC2D, 
                                                aC2DA, theContext);
     }
index 40a6277af98a44a0c16b9e22313d711d2fae24c2..b8648203e646459ab340979368621db7e8b9329d 100644 (file)
@@ -229,13 +229,13 @@ TopoDS_Edge  BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire)
 
     GeomAdaptor_Curve  aGACurve(aCurve);
     GeomAbs_CurveType  aType       = aGACurve.GetType();
-    Handle(Geom_Curve) aBasisCurve = aGACurve.Curve();
     Standard_Boolean   isFwd       = (wexp.Orientation() != TopAbs_REVERSED);
 
-    if (aBasisCurve->IsPeriodic()) {
-      ElCLib::AdjustPeriodic
-        (aBasisCurve->FirstParameter(), aBasisCurve->LastParameter(),
-        Precision::PConfusion(), fpar, lpar);
+    if (aGACurve.IsPeriodic())
+    {
+      const Handle(Geom_Curve) &aBasisCurve = aGACurve.Curve();
+      ElCLib::AdjustPeriodic(aBasisCurve->FirstParameter(), aBasisCurve->LastParameter(),
+                             Precision::PConfusion(), fpar, lpar);
     }
 
     if (CurveSeq.IsEmpty()) {
@@ -353,9 +353,10 @@ TopoDS_Edge  BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire)
       if (isSameCurve) {
         const Standard_Boolean isSameDir = (isFwd == IsFwdSeq.Last());
 
-        if (aBasisCurve->IsPeriodic()) {
+        if (aGACurve.IsPeriodic())
+        {
           // Treat periodic curves.
-          const Standard_Real aPeriod = aBasisCurve->Period();
+          const Standard_Real aPeriod = aGACurve.Period();
 
           if (isSameDir) {
             // Check if first parameter is greater then the last one.
index bfea093c05a5ac4a987889e6b92adfaba8b6406d..2ce5d3032860a5d9849b8e9117acb191e0199a50 100644 (file)
@@ -153,6 +153,7 @@ static void Descendants(const TopoDS_Shape&,
   TopTools_ListIteratorOfListOfShape it,it2;
   Standard_Integer sens = 0;
 
+  // Almost all curves in scur are trimmed curve (e.g. see LocOpe_DPrism::Curves(...))
   TColGeom_SequenceOfCurve scur;
   Curves(scur);
 
@@ -196,7 +197,7 @@ static void Descendants(const TopoDS_Shape&,
         }
         mu = ASI2.Point(jj,1).Parameter();
         Mu = ASI2.Point(jj,ASI2.NbPoints(jj)).Parameter();
-        if (!scur(jj)->IsPeriodic()) {
+        if (!scur(jj)->IsPeriodic111()) {
           Standard_Integer ku, kf;
           if (! (mu > Mf || mf > Mu)) { //overlapping intervals
             sens = 1;
@@ -691,7 +692,7 @@ static void Descendants(const TopoDS_Shape&,
                                    prmin2, prmax2, prbmin2, prbmax2, flag1);
 
 // case of revolutions
-        if (C->IsPeriodic()) {
+        if (C->IsPeriodic111()) {
           Standard_Real period = C->Period();
           prmax = prmax2;
           if (flag1) {
@@ -906,7 +907,7 @@ static void Descendants(const TopoDS_Shape&,
         Standard_Real min, max, pmin, pmax;
         Standard_Boolean flag2;
         for (it.Initialize(lshape); it.More(); it.Next()) {
-          if (C->IsPeriodic()) {
+          if (C->IsPeriodic111()) {
             Standard_Real period = C->Period();
             Standard_Real pr, prb;
             BRepFeat::ParametricMinMax(it.Value(),C, pr, prmax1,
index da087a47c37829a10b6a62a98ab8795721ddf169..612eb30ad209a269fc28fa5772eaa70639147f62 100644 (file)
@@ -213,15 +213,16 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face&     Face1,
 
   // try duplication
   GeomAdaptor_Surface GAS1(S);
-  GeomAbs_SurfaceType Type1 = GAS1.GetType();
 
-  if ( UU1->IsPeriodic()) {
+  if (UU1->IsPeriodic111() && UU1->IsClosed())
+  {
     ElCLib::AdjustPeriodic(UU1->FirstParameter(),
       UU1->LastParameter(),
       Precision::PConfusion(),
       Umin, Umax);
   }
-  if ( VV1->IsPeriodic()) {
+  if (VV1->IsPeriodic111() && VV1->IsClosed())
+  {
     ElCLib::AdjustPeriodic(VV1->FirstParameter(),
       VV1->LastParameter(),
       Precision::PConfusion(),
@@ -319,15 +320,16 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face&     Face1,
 
   // try duplication
   GeomAdaptor_Surface GAS2(S);
-  GeomAbs_SurfaceType Type2 = GAS2.GetType();
 
-  if ( UU2->IsPeriodic()) {
+  if (UU2->IsPeriodic111() && UU2->IsClosed())
+  {
     ElCLib::AdjustPeriodic(UU2->FirstParameter(),
       UU2->LastParameter(),
       Precision::PConfusion(),
       Umin, Umax);
   }
-  if ( VV2->IsPeriodic()) {
+  if (VV2->IsPeriodic111() && VV2->IsClosed())
+  {
     ElCLib::AdjustPeriodic(VV2->FirstParameter(),
       VV2->LastParameter(),
       Precision::PConfusion(),
@@ -368,7 +370,8 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face&     Face1,
     if ( myKPart == 1)
       myCont = GeomAbs_G1;
 
-    if ( (Type1 == GeomAbs_Plane) && (Type2 == GeomAbs_Plane)) {
+    if ((GAS1.GetType() == GeomAbs_Plane) && (GAS2.GetType() == GeomAbs_Plane))
+    {
       myKPart = 2;
     }
   }
index defe660fba2b24da0ed568653186618da468b835..cffae7a46fa42a36289002244b93e15420449b4a 100644 (file)
@@ -1283,28 +1283,15 @@ TopoDS_Edge BRepLib::SameParameter(const TopoDS_Edge& theEdge,
   Geom2dAdaptor_Curve& GAC2d = HC2d->ChangeCurve2d();
   GeomAdaptor_Surface& GAS = HS->ChangeSurface(); 
 
-  // modified by NIZHNY-OCC486  Tue Aug 27 17:15:13 2002 :
-  Standard_Boolean m_TrimmedPeriodical = Standard_False;
-  Handle(Standard_Type) TheType = C3d->DynamicType();
-  if( TheType == STANDARD_TYPE(Geom_TrimmedCurve))
+  if (!C3d->IsPeriodic111())
   {
-    Handle(Geom_Curve) gtC (Handle(Geom_TrimmedCurve)::DownCast (C3d)->BasisCurve());
-    m_TrimmedPeriodical = gtC->IsPeriodic();
-  }
-  // modified by NIZHNY-OCC486  Tue Aug 27 17:15:17 2002 .
-
-
-  if(!C3d->IsPeriodic()) {
     Standard_Real Udeb = C3d->FirstParameter();
     Standard_Real Ufin = C3d->LastParameter();
     // modified by NIZHNY-OCC486  Tue Aug 27 17:17:14 2002 :
     //if (Udeb > f3d) f3d = Udeb;
     //if (l3d > Ufin) l3d = Ufin;
-    if(!m_TrimmedPeriodical)
-    {
-      if (Udeb > f3d) f3d = Udeb;
-      if (l3d > Ufin) l3d = Ufin;
-    }
+    if (Udeb > f3d) f3d = Udeb;
+    if (l3d > Ufin) l3d = Ufin;
     // modified by NIZHNY-OCC486  Tue Aug 27 17:17:55 2002 .
   }
   if(!L3d.IsIdentity()){
index c733c24b3146f914501f7dbd86ea55083786674a..5adce4ee2e485bf05660e2647aa2633a6da02d14 100644 (file)
@@ -768,13 +768,9 @@ void  BRepLib_MakeEdge::Init(const Handle(Geom_Curve)& CC,
                             const Standard_Real pp1,
                             const Standard_Real pp2)
 {
-  // kill trimmed curves
-  Handle(Geom_Curve) C = CC;
-  Handle(Geom_TrimmedCurve) CT = Handle(Geom_TrimmedCurve)::DownCast(C);
-  while (!CT.IsNull()) {
-    C = CT->BasisCurve();
-    CT = Handle(Geom_TrimmedCurve)::DownCast(C);
-  }
+  // kill trimmed curves to obtain First/Last-parameters of basis curve
+  const Handle(Geom_Curve) C = (CC->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) ? 
+                         Handle(Geom_TrimmedCurve)::DownCast(CC)->BasisCurve() : CC;
 
   // check parameters
   Standard_Real p1 = pp1;
@@ -782,18 +778,18 @@ void  BRepLib_MakeEdge::Init(const Handle(Geom_Curve)& CC,
   Standard_Real cf = C->FirstParameter();
   Standard_Real cl = C->LastParameter();
   Standard_Real epsilon = Precision::PConfusion();
-  Standard_Boolean periodic = C->IsPeriodic();
   GeomAdaptor_Curve aCA(C);
 
   TopoDS_Vertex V1,V2;
-  if (periodic) {
+  if (C->IsPeriodic111())
+  {
     // adjust in period
     ElCLib::AdjustPeriodic(cf,cl,epsilon,p1,p2);
     V1 = VV1;
     V2 = VV2;
   }
   else {
-    // reordonate
+    // reordinate
     if (p1 < p2) {
       V1 = VV1;
       V2 = VV2;
@@ -801,9 +797,7 @@ void  BRepLib_MakeEdge::Init(const Handle(Geom_Curve)& CC,
     else {
       V2 = VV1;
       V1 = VV2;
-      Standard_Real x = p1;
-      p1 = p2;
-      p2 = x;
+      std::swap(p1, p2);
     }
 
     // check range
index 7f933e4533ad41c4766320fc12e9d0a21d3f35c3..413e940164c42c9c3de271c70cce89e5d3cd81a0 100644 (file)
@@ -1114,7 +1114,7 @@ void BRepOffset_Inter2d::ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge& NE, const
               f = FirstParOnPC;
               l = LastParOnPC;
             }
-          else if (C3d->IsPeriodic())
+          else if (C3d->IsPeriodic111())
             {
               Standard_Real delta = (C3d->Period() - (l - f))*0.5;
               delta *= 0.95;
@@ -1320,7 +1320,7 @@ void BRepOffset_Inter2d::ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge& NE, const
           LastPar  = C3d->LastParameter();
           BB.UpdateEdge(NE, C3d, Precision::Confusion());
         }
-      else if (C3d->IsPeriodic())
+      else if (C3d->IsPeriodic111())
         {
           Standard_Real delta = (C3d->Period() - (anEl - anEf))*0.5;
           delta *= 0.95;
index e9e565de83584e327fd19759d9ff00d2a1e977c8..f11ac75923900951d1d38abaf3b4f9aa2fc86eb4 100644 (file)
@@ -2547,7 +2547,7 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
       Standard_Real aF, aL;
       const Handle(Geom_Curve) aC = BRep_Tool::Curve(anEdge, aF, aL);
       if (!aC.IsNull() &&
-         (!aC->IsClosed() && !aC->IsPeriodic()))
+         (!aC->IsClosed() && !aC->IsPeriodic111()))
       {
         gp_Pnt aPntF = BRep_Tool::Pnt(V1);
         gp_Pnt aPntL = BRep_Tool::Pnt(V2);
index e8965ecf7145174e26a011eb03a9e28b872034ca..3e7b99e96e98a0d500c382cc149799a93b92d91e 100644 (file)
@@ -908,7 +908,7 @@ static Standard_Boolean AreConnex(const TopoDS_Wire& W1,
 
   if (V11.IsSame(V21) || V11.IsSame(V22) ||
       V12.IsSame(V21) || V12.IsSame(V22))
-    return Standard_True;
+      return Standard_True;
 
   return Standard_False;
 }
@@ -1248,8 +1248,8 @@ static TopoDS_Edge Glue(const TopoDS_Edge& E1,
 //=======================================================================
 
 static void CheckIntersFF(const BOPDS_PDS& pDS,
-                          const TopoDS_Edge& RefEdge,
-                          TopTools_IndexedMapOfShape& TrueEdges)
+                                     const TopoDS_Edge& RefEdge,
+                                     TopTools_IndexedMapOfShape& TrueEdges)
 {
   BOPDS_VectorOfInterfFF& aFFs = pDS->InterfFF();
   Standard_Integer aNb = aFFs.Length();
@@ -1260,33 +1260,33 @@ static void CheckIntersFF(const BOPDS_PDS& pDS,
   BB.MakeCompound(Edges);
   
   for (i = 0; i < aNb; ++i) 
-  {
-    BOPDS_InterfFF& aFFi=aFFs(i);
-    const BOPDS_VectorOfCurve& aBCurves=aFFi.Curves();
-      Standard_Integer aNbCurves = aBCurves.Length();
-    
-    for (j = 0; j < aNbCurves; ++j) 
     {
-      const BOPDS_Curve& aBC=aBCurves(j);
-      const BOPDS_ListOfPaveBlock& aSectEdges = aBC.PaveBlocks();
-      
-      BOPDS_ListIteratorOfListOfPaveBlock aPBIt;
-      aPBIt.Initialize(aSectEdges);
+      BOPDS_InterfFF& aFFi=aFFs(i);
+      const BOPDS_VectorOfCurve& aBCurves=aFFi.Curves();
+      Standard_Integer aNbCurves = aBCurves.Length();
       
-      for (; aPBIt.More(); aPBIt.Next())
-      {
-        const Handle(BOPDS_PaveBlock)& aPB = aPBIt.Value();
-        Standard_Integer nSect = aPB->Edge();
-        const TopoDS_Edge& anEdge = *(TopoDS_Edge*)&pDS->Shape(nSect);
+      for (j = 0; j < aNbCurves; ++j) 
+       {
+          const BOPDS_Curve& aBC=aBCurves(j);
+          const BOPDS_ListOfPaveBlock& aSectEdges = aBC.PaveBlocks();
+         
+          BOPDS_ListIteratorOfListOfPaveBlock aPBIt;
+          aPBIt.Initialize(aSectEdges);
+         
+         for (; aPBIt.More(); aPBIt.Next())
+           {
+              const Handle(BOPDS_PaveBlock)& aPB = aPBIt.Value();
+              Standard_Integer nSect = aPB->Edge();
+              const TopoDS_Edge& anEdge = *(TopoDS_Edge*)&pDS->Shape(nSect);
         BB.Add(Edges, anEdge);
-        nbe++;
-      }
+             nbe++;
+           }
+       }
     }
-  }
 
   if (nbe == 0)
     return;
-  
+
   TopTools_ListOfShape CompList;
   BOPTools_AlgoTools::MakeConnexityBlocks(Edges, TopAbs_VERTEX, TopAbs_EDGE, CompList);
 
@@ -1294,115 +1294,115 @@ static void CheckIntersFF(const BOPDS_PDS& pDS,
   if (CompList.Extent() == 1)
     NearestCompound = CompList.First();
   else
-  {
+    {
     BRepAdaptor_Curve BAcurve(RefEdge);
     gp_Pnt Pref = BAcurve.Value((BAcurve.FirstParameter()+BAcurve.LastParameter())/2);
     TopoDS_Vertex Vref = BRepLib_MakeVertex(Pref);
     Standard_Real MinDist = RealLast();
     TopTools_ListIteratorOfListOfShape itl(CompList);
     for (; itl.More(); itl.Next())
-    {
+       {
       const TopoDS_Shape& aCompound = itl.Value();
-      
+
       BRepExtrema_DistShapeShape Projector(Vref, aCompound);
       if (!Projector.IsDone() || Projector.NbSolution() == 0)
         continue;
-      
+
       Standard_Real aDist = Projector.Value();
       if (aDist < MinDist)
-      {
+    {
         MinDist = aDist;
         NearestCompound = aCompound;
       }
     }
-  }
+       }
 
   TopExp::MapShapes(NearestCompound, TopAbs_EDGE, TrueEdges);
-}
-
+               }
+  
 //=======================================================================
 //function : AssembleEdge
 //purpose  : 
 //=======================================================================
 
 static TopoDS_Edge AssembleEdge(const BOPDS_PDS& pDS,
-                                const TopoDS_Face& F1,
-                                const TopoDS_Face& F2,
-                                const Standard_Boolean addPCurve1,
-                                const Standard_Boolean addPCurve2,
-                                const TopTools_SequenceOfShape& EdgesForConcat)
+                               const TopoDS_Face& F1,
+                               const TopoDS_Face& F2,
+                               const Standard_Boolean addPCurve1,
+                               const Standard_Boolean addPCurve2,
+                               const TopTools_SequenceOfShape& EdgesForConcat)
 {
   TopoDS_Edge NullEdge;
   TopoDS_Edge CurEdge = TopoDS::Edge( EdgesForConcat(1) );
   Standard_Real aGlueTol = Precision::Confusion();
   
   for (Standard_Integer j = 2; j <= EdgesForConcat.Length(); j++)
-  {
-    TopoDS_Edge anEdge = TopoDS::Edge( EdgesForConcat(j) );
-    Standard_Boolean After = Standard_False;
-    TopoDS_Vertex Vfirst, Vlast;
+    {
+      TopoDS_Edge anEdge = TopoDS::Edge( EdgesForConcat(j) );
+      Standard_Boolean After = Standard_False;
+      TopoDS_Vertex Vfirst, Vlast;
     Standard_Boolean AreClosedWire = AreClosed( CurEdge, anEdge );
     if (AreClosedWire)
-    {
-      TopoDS_Vertex V1, V2;
-      TopExp::Vertices( CurEdge, V1, V2 );
+       {
+         TopoDS_Vertex V1, V2;
+         TopExp::Vertices( CurEdge, V1, V2 );
       Standard_Boolean IsAutonomV1 = IsAutonomVertex( V1, pDS, F1, F2 );
       Standard_Boolean IsAutonomV2 = IsAutonomVertex( V2, pDS, F1, F2 );
       if (IsAutonomV1)
-      {
-        After = Standard_False;
-        Vfirst = Vlast = V2;
-      }
+           {
+             After = Standard_False;
+             Vfirst = Vlast = V2;
+           }
       else if (IsAutonomV2)
-      {
-        After = Standard_True;
-        Vfirst = Vlast = V1;
-      }
+           {
+             After = Standard_True;
+             Vfirst = Vlast = V1;
+           }
       else
         return NullEdge;
-    }
-    else
-    {
-      TopoDS_Vertex CV, V11, V12, V21, V22;
-      TopExp::CommonVertex( CurEdge, anEdge, CV );
+       }
+      else
+       {
+         TopoDS_Vertex CV, V11, V12, V21, V22;
+         TopExp::CommonVertex( CurEdge, anEdge, CV );
       Standard_Boolean IsAutonomCV = IsAutonomVertex( CV, pDS, F1, F2 );
       if (IsAutonomCV)
       {
-        aGlueTol = BRep_Tool::Tolerance(CV);
-        TopExp::Vertices( CurEdge, V11, V12 );
-        TopExp::Vertices( anEdge,  V21, V22 );
-        if (V11.IsSame(CV) && V21.IsSame(CV))
-        {
-          Vfirst = V22;
-          Vlast  = V12;
-        }
-        else if (V11.IsSame(CV) && V22.IsSame(CV))
-        {
-          Vfirst = V21;
-          Vlast  = V12;
-        }
-        else if (V12.IsSame(CV) && V21.IsSame(CV))
-        {
-          Vfirst = V11;
-          Vlast  = V22;
-        }
-        else
-        {
-          Vfirst = V11;
-          Vlast  = V21;
-        }
+          aGlueTol = BRep_Tool::Tolerance(CV);
+         TopExp::Vertices( CurEdge, V11, V12 );
+         TopExp::Vertices( anEdge,  V21, V22 );
+         if (V11.IsSame(CV) && V21.IsSame(CV))
+           {
+             Vfirst = V22;
+             Vlast  = V12;
+           }
+         else if (V11.IsSame(CV) && V22.IsSame(CV))
+           {
+             Vfirst = V21;
+             Vlast  = V12;
+           }
+         else if (V12.IsSame(CV) && V21.IsSame(CV))
+           {
+             Vfirst = V11;
+             Vlast  = V22;
+           }
+         else
+           {
+             Vfirst = V11;
+             Vlast  = V21;
+           }
       }
       else
         return NullEdge;
-    } //end of else (open wire)
-    
-    TopoDS_Edge NewEdge = Glue(CurEdge, anEdge, Vfirst, Vlast, After,
-                               F1, addPCurve1, F2, addPCurve2, aGlueTol);
+       } //end of else (open wire)
+      
+      TopoDS_Edge NewEdge = Glue(CurEdge, anEdge, Vfirst, Vlast, After,
+                                 F1, addPCurve1, F2, addPCurve2, aGlueTol);
     if (NewEdge.IsNull())
       return NullEdge;
     else
       CurEdge = NewEdge;
-  } //end of for (Standard_Integer j = 2; j <= EdgesForConcat.Length(); j++)
+    } //end of for (Standard_Integer j = 2; j <= EdgesForConcat.Length(); j++)
   
   return CurEdge;
 }
@@ -1512,7 +1512,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
           if(!aC3DETrim.IsNull()) {
                Handle(Geom2d_Curve) aC2dNew;
                
-               if(aC3DE->IsPeriodic()) {
+               if(aC3DE->IsPeriodic111()) {
                   BOPTools_AlgoTools2D::AdjustPCurveOnFace(F1, f, l,  aC2d, aC2dNew, aContext);
                  }
                else {
@@ -1528,7 +1528,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
           if(!aC3DETrim.IsNull()) {
                Handle(Geom2d_Curve) aC2dNew;
                
-               if(aC3DE->IsPeriodic()) {
+               if(aC3DE->IsPeriodic111()) {
                   BOPTools_AlgoTools2D::AdjustPCurveOnFace(F2, f, l,  aC2d, aC2dNew, aContext);
                  }
                else {
@@ -1582,11 +1582,11 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
   if (L1.Extent() > 1 && (!isEl1 || !isEl2)) {
     TopTools_SequenceOfShape eseq;
     TopTools_SequenceOfShape EdgesForConcat;
-    
+
     if (!TrueEdges.IsEmpty())
-    {
-      for (i = TrueEdges.Extent(); i >= 1; i--)
-        EdgesForConcat.Append( TrueEdges(i) );
+      {
+       for (i = TrueEdges.Extent(); i >= 1; i--)
+         EdgesForConcat.Append( TrueEdges(i) );
       TopoDS_Edge AssembledEdge =
         AssembleEdge( pDS, F1, F2, addPCurve1, addPCurve2, EdgesForConcat );
       if (AssembledEdge.IsNull())
@@ -1594,145 +1594,145 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
           eseq.Append( TrueEdges(i) );
       else
         eseq.Append(AssembledEdge);
-    }
+      }
     else
-    {
-      TopTools_SequenceOfShape wseq;
-      TopTools_SequenceOfShape edges;
-      TopTools_ListIteratorOfListOfShape itl(L1);
-      for (; itl.More(); itl.Next())
-        edges.Append( itl.Value() );
-      while (!edges.IsEmpty())
       {
-        TopoDS_Edge anEdge = TopoDS::Edge( edges.First() );
+       TopTools_SequenceOfShape wseq;
+       TopTools_SequenceOfShape edges;
+       TopTools_ListIteratorOfListOfShape itl(L1);
+       for (; itl.More(); itl.Next())
+         edges.Append( itl.Value() );
+       while (!edges.IsEmpty())
+         {
+           TopoDS_Edge anEdge = TopoDS::Edge( edges.First() );
         TopoDS_Wire aWire, resWire;
         BB.MakeWire(aWire);
         BB.Add( aWire, anEdge );
-        TColStd_SequenceOfInteger Candidates;
-        for (k = 1; k <= wseq.Length(); k++)
-        {
-          resWire = TopoDS::Wire(wseq(k));
+           TColStd_SequenceOfInteger Candidates;
+           for (k = 1; k <= wseq.Length(); k++)
+             {
+               resWire = TopoDS::Wire(wseq(k));
           if (AreConnex( resWire, aWire ))
-          {
-            Candidates.Append( 1 );
-            break;
-          }
-        }
-        if (Candidates.IsEmpty())
-        {
-          wseq.Append( aWire );
-          edges.Remove(1);
-        }
-        else
-        {
-          for (j = 2; j <= edges.Length(); j++)
-          {
-            anEdge = TopoDS::Edge( edges(j) );
+                 {
+                   Candidates.Append( 1 );
+                   break;
+                 }
+             }
+           if (Candidates.IsEmpty())
+             {
+               wseq.Append( aWire );
+               edges.Remove(1);
+             }
+           else
+             {
+               for (j = 2; j <= edges.Length(); j++)
+                 {
+                   anEdge = TopoDS::Edge( edges(j) );
             aWire.Nullify();
             BB.MakeWire(aWire);
             BB.Add( aWire, anEdge );
             if (AreConnex( resWire, aWire ))
-              Candidates.Append( j );
-          }
-          Standard_Integer minind = 1;
-          if (Candidates.Length() > 1)
-          {
-            Standard_Real MinAngle = RealLast();
-            for (j = 1; j <= Candidates.Length(); j++)
-            {
-              anEdge = TopoDS::Edge( edges(Candidates(j)) );
-              Standard_Real anAngle = AngleWireEdge( resWire, anEdge );
-              if (anAngle < MinAngle)
-              {
-                MinAngle = anAngle;
-                minind = j;
-              }
-            }
-          }
+                     Candidates.Append( j );
+                 }
+               Standard_Integer minind = 1;
+               if (Candidates.Length() > 1)
+                 {
+                   Standard_Real MinAngle = RealLast();
+                   for (j = 1; j <= Candidates.Length(); j++)
+                     {
+                       anEdge = TopoDS::Edge( edges(Candidates(j)) );
+                       Standard_Real anAngle = AngleWireEdge( resWire, anEdge );
+                       if (anAngle < MinAngle)
+                         {
+                           MinAngle = anAngle;
+                           minind = j;
+                         }
+                     }
+                 }
           BB.Add( resWire, TopoDS::Edge(edges(Candidates(minind))) );
           wseq(k) = resWire;
-          edges.Remove(Candidates(minind));
-        }
-      } //end of while (!edges.IsEmpty())
-      
-      for (i = 1; i <= wseq.Length(); i++)
-      {
-        TopoDS_Wire aWire = TopoDS::Wire(wseq(i));
-        TopTools_SequenceOfShape aLocalEdgesForConcat;
-        if (aWire.Closed())
-        {
-          TopoDS_Vertex StartVertex;
-          TopoDS_Edge StartEdge;
-          Standard_Boolean StartFound = Standard_False;
-          TopTools_ListOfShape Elist;
-          
-          TopoDS_Iterator itw(aWire);
-          for (; itw.More(); itw.Next())
-          {
-            TopoDS_Edge anEdge = TopoDS::Edge(itw.Value());
-            if (StartFound)
-              Elist.Append(anEdge);
-            else
-            {
-              TopoDS_Vertex V1, V2;
-              TopExp::Vertices( anEdge, V1, V2 );
-              if (!IsAutonomVertex( V1, pDS ))
-              {
-                StartVertex = V2;
-                StartEdge = anEdge;
-                StartFound = Standard_True;
-              }
-              else if (!IsAutonomVertex( V2, pDS ))
-              {
-                StartVertex = V1;
-                StartEdge = anEdge;
-                StartFound = Standard_True;
-              }
-              else
-                Elist.Append(anEdge);
-            }
-          } //end of for (; itw.More(); itw.Next())
-          if (!StartFound)
-          {
-            itl.Initialize(Elist);
-            StartEdge = TopoDS::Edge(itl.Value());
-            Elist.Remove(itl);
-            TopoDS_Vertex V1, V2;
-            TopExp::Vertices( StartEdge, V1, V2 );
-            StartVertex = V1;
-          }
-          aLocalEdgesForConcat.Append( StartEdge );
-          while (!Elist.IsEmpty())
-          {
-            for (itl.Initialize(Elist); itl.More(); itl.Next())
-            {
-              TopoDS_Edge anEdge = TopoDS::Edge(itl.Value());
-              TopoDS_Vertex V1, V2;
-              TopExp::Vertices( anEdge, V1, V2 );
-              if (V1.IsSame(StartVertex))
-              {
-                StartVertex = V2;
-                aLocalEdgesForConcat.Append( anEdge );
-                Elist.Remove(itl);
-                break;
-              }
-              else if (V2.IsSame(StartVertex))
-              {
-                StartVertex = V1;
-                aLocalEdgesForConcat.Append( anEdge );
-                Elist.Remove(itl);
-                break;
-              }
-            }
-          } //end of while (!Elist.IsEmpty())
-        } //end of if (aWire.Closed())
-        else
-        {
-          BRepTools_WireExplorer Wexp( aWire );
-          for (; Wexp.More(); Wexp.Next())
-            aLocalEdgesForConcat.Append( Wexp.Current() );
-        }
+               edges.Remove(Candidates(minind));
+             }
+         } //end of while (!edges.IsEmpty())
        
+       for (i = 1; i <= wseq.Length(); i++)
+         {
+           TopoDS_Wire aWire = TopoDS::Wire(wseq(i));
+           TopTools_SequenceOfShape aLocalEdgesForConcat;
+           if (aWire.Closed())
+             {
+               TopoDS_Vertex StartVertex;
+               TopoDS_Edge StartEdge;
+               Standard_Boolean StartFound = Standard_False;
+               TopTools_ListOfShape Elist;
+               
+               TopoDS_Iterator itw(aWire);
+               for (; itw.More(); itw.Next())
+                 {
+                   TopoDS_Edge anEdge = TopoDS::Edge(itw.Value());
+                   if (StartFound)
+                     Elist.Append(anEdge);
+                   else
+                     {
+                       TopoDS_Vertex V1, V2;
+                       TopExp::Vertices( anEdge, V1, V2 );
+                        if (!IsAutonomVertex( V1, pDS ))
+                         {
+                           StartVertex = V2;
+                           StartEdge = anEdge;
+                           StartFound = Standard_True;
+                         }
+                        else if (!IsAutonomVertex( V2, pDS ))
+                         {
+                           StartVertex = V1;
+                           StartEdge = anEdge;
+                           StartFound = Standard_True;
+                         }
+                       else
+                         Elist.Append(anEdge);
+                     }
+                 } //end of for (; itw.More(); itw.Next())
+               if (!StartFound)
+                 {
+                   itl.Initialize(Elist);
+                   StartEdge = TopoDS::Edge(itl.Value());
+                   Elist.Remove(itl);
+                   TopoDS_Vertex V1, V2;
+                   TopExp::Vertices( StartEdge, V1, V2 );
+                   StartVertex = V1;
+                 }
+                aLocalEdgesForConcat.Append( StartEdge );
+               while (!Elist.IsEmpty())
+                 {
+                   for (itl.Initialize(Elist); itl.More(); itl.Next())
+                     {
+                       TopoDS_Edge anEdge = TopoDS::Edge(itl.Value());
+                       TopoDS_Vertex V1, V2;
+                       TopExp::Vertices( anEdge, V1, V2 );
+                       if (V1.IsSame(StartVertex))
+                         {
+                           StartVertex = V2;
+                            aLocalEdgesForConcat.Append( anEdge );
+                           Elist.Remove(itl);
+                           break;
+                         }
+                       else if (V2.IsSame(StartVertex))
+                         {
+                           StartVertex = V1;
+                            aLocalEdgesForConcat.Append( anEdge );
+                           Elist.Remove(itl);
+                           break;
+                         }
+                     }
+                 } //end of while (!Elist.IsEmpty())
+             } //end of if (aWire.Closed())
+             else
+             {
+               BRepTools_WireExplorer Wexp( aWire );
+               for (; Wexp.More(); Wexp.Next())
+                  aLocalEdgesForConcat.Append( Wexp.Current() );
+             }
+           
         TopoDS_Edge AssembledEdge =
           AssembleEdge( pDS, F1, F2, addPCurve1, addPCurve2, aLocalEdgesForConcat );
         if (AssembledEdge.IsNull())
@@ -1740,56 +1740,56 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
             eseq.Append( aLocalEdgesForConcat(j) );
         else
           eseq.Append( AssembledEdge );
-      }
-    } //end of else (when TrueEdges is empty)
+         }
+      } //end of else (when TrueEdges is empty)
     
     if (eseq.Length() < L1.Extent())
-    {
-      L1.Clear();
-      L2.Clear();
-      for (i = 1; i <= eseq.Length(); i++)
       {
+       L1.Clear();
+       L2.Clear();
+       for (i = 1; i <= eseq.Length(); i++)
+         {
         TopoDS_Shape aShape = eseq(i);
-        TopoDS_Edge anEdge = TopoDS::Edge(eseq(i));
-        BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
-        Standard_Real EdgeTol = BRep_Tool::Tolerance(anEdge);
+           TopoDS_Edge anEdge = TopoDS::Edge(eseq(i));
+           BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
+           Standard_Real EdgeTol = BRep_Tool::Tolerance(anEdge);
 #ifdef OCCT_DEBUG
-        cout<<"Tolerance of glued E =      "<<EdgeTol<<endl;
+           cout<<"Tolerance of glued E =      "<<EdgeTol<<endl;
 #endif
-        if (EdgeTol > 1.e-2)
-          continue;
-        
-        if (EdgeTol >= 1.e-4)
-        {
-          ReconstructPCurves(anEdge);
-          BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
+           if (EdgeTol > 1.e-2)
+             continue;
+
+           if (EdgeTol >= 1.e-4)
+             {
+               ReconstructPCurves(anEdge);
+               BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
 #ifdef OCCT_DEBUG
-          cout<<"After projection tol of E = "<<BRep_Tool::Tolerance(anEdge)<<endl;
+               cout<<"After projection tol of E = "<<BRep_Tool::Tolerance(anEdge)<<endl;
 #endif
-        }
-        
-        OrientSection( anEdge, F1, F2, O1, O2 );
-        if (Side == TopAbs_OUT)
-        {
-          O1 = TopAbs::Reverse(O1);
-          O2 = TopAbs::Reverse(O2);
-        }
-        
-        L1.Append( anEdge.Oriented(O1) );
-        L2.Append( anEdge.Oriented(O2) );
+             }
+
+           OrientSection( anEdge, F1, F2, O1, O2 );
+           if (Side == TopAbs_OUT)
+             {
+               O1 = TopAbs::Reverse(O1);
+               O2 = TopAbs::Reverse(O2);
+             }
+           
+           L1.Append( anEdge.Oriented(O1) );
+           L2.Append( anEdge.Oriented(O2) );
+         }
       }
-    }
   } //end of if (L1.Extent() > 1)
-  
+
   else
-  {
-    TopTools_ListIteratorOfListOfShape itl(L1);
-    for (; itl.More(); itl.Next())
     {
-      const TopoDS_Edge& anEdge = TopoDS::Edge( itl.Value() );
-      BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
+      TopTools_ListIteratorOfListOfShape itl(L1);
+      for (; itl.More(); itl.Next())
+       {
+         const TopoDS_Edge& anEdge = TopoDS::Edge( itl.Value() );
+         BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
+       }
     }
-  }
 }
 
 //=======================================================================
@@ -3091,8 +3091,8 @@ Standard_Boolean BRepOffset_Tool::EnLargeFace
   Standard_Real coeff;
   if (ExtensionMode == 1)
   {
-    UU1 = VV1 = - TheInfini;
-    UU2 = VV2 =   TheInfini;
+  UU1 = VV1 = - TheInfini;
+  UU2 = VV2 =   TheInfini;
     coeff = 0.25;
   }
   else
index 291b4161cbbb413f79a1ba4acbfa2e0f66c48c40..1a9f43b55b29e633f17dfa6b5221e940ea78e883 100644 (file)
@@ -1020,7 +1020,7 @@ Standard_Real BRepTools::EvalAndUpdateTol(const TopoDS_Edge& theE,
   //Set first, last to avoid ErrosStatus = 2 because of 
   //too strong checking of limits in class CheckCurveOnSurface
   //
-  if(!C3d->IsPeriodic())
+  if(!C3d->IsPeriodic111())
   {
     first = Max(first, C3d->FirstParameter());
     last = Min(last, C3d->LastParameter());
@@ -1040,7 +1040,7 @@ Standard_Real BRepTools::EvalAndUpdateTol(const TopoDS_Edge& theE,
   else
   {
     if(CT.ErrorStatus() == 3 || (CT.ErrorStatus() == 2 &&
-      (C3d->IsPeriodic() || C2d->IsPeriodic111())))
+      (C3d->IsPeriodic111() || C2d->IsPeriodic111())))
     {
       //Try to estimate by sample points
       Standard_Integer nbint = 22;
index ff537180be311fbffa3a94d958b9229b0e179dd0..10103f567853f9744a2808ba8b94b8ceceb9aa3d 100644 (file)
@@ -294,7 +294,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve
 
   Standard_Real TolPar = Tol *.1;
 
-  if(C->IsPeriodic()) {
+  if(C->IsPeriodic111()) {
     Standard_Real p = C->Period();
     Standard_Real d = Abs(l - f);
     if(Abs(d - p) <= TolPar && l <= p) {}
@@ -316,7 +316,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve
 
   Handle(Geom_BSplineCurve) BC = Handle(Geom_BSplineCurve)::DownCast(C) ;
 
-  if(!BC->IsPeriodic()) {
+  if(!BC->IsPeriodic111()) {
     BC->Resolution(Tol, UTol) ;
     if(Abs(f - fnew) > UTol || Abs(l - lnew) > UTol) {
       TColStd_Array1OfReal  knots(1,BC->NbKnots()) ;
index 7f89e62b0d72ee1925239db8715002076f122a76..9ac2f2ba56a0b578c4ca10bfb3f5a84ffefd3402 100644 (file)
@@ -252,7 +252,7 @@ static Standard_OStream& operator <<(Standard_OStream& OS, const Handle(Geom_BSp
   OS << (Standard_Byte)BSPLINE;
   Standard_Boolean aRational = B->IsRational() ? 1:0;
   BinTools::PutBool(OS, aRational); //rational
-  Standard_Boolean aPeriodic = B->IsPeriodic() ? 1:0;
+  Standard_Boolean aPeriodic = B->IsPeriodic111() ? 1:0;
   BinTools::PutBool(OS, aPeriodic); //periodic
   // poles and weights
   Standard_Integer i,aDegree,aNbPoles,aNbKnots;
index 3d9a697b9a20637517de6214304b6faaefd9d435..d0633154c0dea75c52e40a1d21e01f073f02a609 100644 (file)
@@ -216,7 +216,7 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
        Handle(Geom_BSplineCurve) Bsaux (Handle(Geom_BSplineCurve)::DownCast (G));
        Standard_Real u1 = U1, u2 = U2;
        //// modified by jgv, 24.10.01 for BUC61031 ////
-       if (Bsaux->IsPeriodic())
+       if (Bsaux->IsPeriodic111())
          ElCLib::AdjustPeriodic( Bsaux->FirstParameter(), Bsaux->LastParameter(), Precision::PConfusion(), u1, u2 );
        else {
          ////////////////////////////////////////////////
index aed6ab954359629298fc8a3befa8814123435667..3fc897e2132ea3cd6a00278d1edd2b1c8604c565 100644 (file)
@@ -1638,22 +1638,24 @@ void  ChFi3d_ComputeArete(const ChFiDS_CommonPoint&   P1,
   tolreached = tol3d;
 
   if (Abs(UV1.X()-UV2.X()) <= tol2d) {
-    if (IFlag == 0) {
+    if (IFlag == 0)
+    {
       Pardeb = UV1.Y();
       Parfin = UV2.Y();
       C3d = Surf->UIso(UV1.X());
-      if(Pardeb > Parfin) {
+      if (Pardeb > Parfin)
+      {
         Pardeb = C3d->ReversedParameter(Pardeb);
         Parfin = C3d->ReversedParameter(Parfin);
         C3d->Reverse();
       }
-      Handle(Geom_TrimmedCurve) tc = Handle(Geom_TrimmedCurve)::DownCast(C3d);
-      if(!tc.IsNull()) {
-        C3d = tc->BasisCurve();
-        if (C3d->IsPeriodic()) {
-          ElCLib::AdjustPeriodic(C3d->FirstParameter(),C3d->LastParameter(),
-            tol2d,Pardeb,Parfin);
-        }
+
+      if (C3d->IsPeriodic111())
+      {
+        Handle(Geom_TrimmedCurve) tc = Handle(Geom_TrimmedCurve)::DownCast(C3d);
+        if (!tc.IsNull()) C3d = tc->BasisCurve();
+        ElCLib::AdjustPeriodic(C3d->FirstParameter(), C3d->LastParameter(),
+                               tol2d, Pardeb, Parfin);
       }
     }
     if(IFlag != 1) {
@@ -1668,22 +1670,24 @@ void  ChFi3d_ComputeArete(const ChFiDS_CommonPoint&   P1,
   }
   else if (Abs(UV1.Y()-UV2.Y())<=tol2d) {
     //iso v
-    if (IFlag == 0) {
+    if (IFlag == 0)
+    {
       Pardeb = UV1.X();
       Parfin = UV2.X();
       C3d = Surf->VIso(UV1.Y());
-      if(Pardeb > Parfin) {
+      if (Pardeb > Parfin)
+      {
         Pardeb = C3d->ReversedParameter(Pardeb);
         Parfin = C3d->ReversedParameter(Parfin);
         C3d->Reverse();
       }
-      Handle(Geom_TrimmedCurve) tc = Handle(Geom_TrimmedCurve)::DownCast(C3d);
-      if(!tc.IsNull()) {
-        C3d = tc->BasisCurve();
-        if (C3d->IsPeriodic()) {
-          ElCLib::AdjustPeriodic(C3d->FirstParameter(),C3d->LastParameter(),
-            tol2d,Pardeb,Parfin);
-        }
+
+      if (C3d->IsPeriodic111())
+      {
+        Handle(Geom_TrimmedCurve) tc = Handle(Geom_TrimmedCurve)::DownCast(C3d);
+        if (!tc.IsNull()) C3d = tc->BasisCurve();
+        ElCLib::AdjustPeriodic(C3d->FirstParameter(), C3d->LastParameter(),
+                               tol2d, Pardeb, Parfin);
       }
     }
     if(IFlag != 1) {
@@ -3279,7 +3283,7 @@ Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)&   S1,
               }
               ptestdeb = C3d->Value(Uf);
               ptestfin = C3d->Value(Ul);
-              if (C3d->IsPeriodic() && !(failedF && failedL)) {
+              if (C3d->IsPeriodic111() && !(failedF && failedL)) {
                 // assure the same order of ends, otherwise TrimmedCurve will take
                 // the other part of C3d
                 gp_Pnt Ptmp;
@@ -4298,7 +4302,7 @@ void ChFi3d_PerformElSpine(Handle(ChFiDS_HElSpine)& HES,
   //
   fk = 2;
   lk = BSpline->NbKnots()-1;
-  if(BSpline->IsPeriodic()) {
+  if(BSpline->IsPeriodic111()) {
     fk = 1;
   }
   if(caredeb) {
@@ -4335,7 +4339,7 @@ void ChFi3d_PerformElSpine(Handle(ChFiDS_HElSpine)& HES,
   }
   // elspine periodic => BSpline Periodic
   if(ES.IsPeriodic()) {
-    if(!BSpline->IsPeriodic()) {
+    if(!BSpline->IsPeriodic111()) {
       BSpline->SetPeriodic();
       //modified by NIZNHY-PKV Fri Dec 10 12:20:22 2010ft
       if (iToApproxByC2) {
index 621d34ed30be880644947afebb4d39228422856c..db524a4269b8a46365396883d4740704ae78c734 100644 (file)
@@ -328,7 +328,7 @@ static Standard_Boolean IntersUpdateOnSame(Handle(GeomAdaptor_HSurface)& HGs,
   Standard_Real uf = FIop.FirstParameter();
   Standard_Real ul = FIop.LastParameter();
   Handle(GeomAdaptor_HCurve) Hc3df;
-  if (c3dFI->IsPeriodic()) Hc3df = new GeomAdaptor_HCurve(c3dFI);
+  if (c3dFI->IsPeriodic111()) Hc3df = new GeomAdaptor_HCurve(c3dFI);
   else                     Hc3df = new GeomAdaptor_HCurve(c3dFI,uf,ul);
 
   if ( Update(HBs,Hc3df,FIop,CPop,FprolUV,isFirst,c3dU) )
@@ -2223,7 +2223,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
       Standard_Real Utrim,Vtrim;
       Utrim=Ctrim->BasisCurve()->FirstParameter();
       Vtrim=Ctrim->BasisCurve()->LastParameter();
-      if (Ctrim->IsPeriodic()) {
+      if (Ctrim->IsPeriodic111()) {
         if (Ubid>Ctrim->Period()) {
           Ubid=(Utrim+Vtrim)/2;
           Vbid= Vtrim;
@@ -3962,7 +3962,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
     Standard_Real uf = FiopArc.FirstParameter();
     Standard_Real ul = FiopArc.LastParameter();
       Handle(GeomAdaptor_HCurve) Hc3df;
-    if(c3df->IsPeriodic()){
+    if(c3df->IsPeriodic111()){
       Hc3df = new GeomAdaptor_HCurve(c3df);
     }
     else{
index 81a205a93a78ed9fcfb83c8144b1367e208ae99b..4fa0bc33495557a072a14fc50f8edf949c5ba239 100644 (file)
@@ -468,11 +468,6 @@ Standard_Boolean Draft_Modification::NewParameter(const TopoDS_Vertex& V,
 
   P = myVMap.ChangeFromKey(V).Parameter(E);
   Handle(Geom_Curve) GC = myEMap.FindFromKey(E).Geometry();
-  Handle(Standard_Type) typc = GC->DynamicType();
-  if (typc == STANDARD_TYPE(Geom_TrimmedCurve)) {
-    GC = Handle(Geom_TrimmedCurve)::DownCast(GC);
-    typc = GC->DynamicType();
-  }
 
   if (GC->IsClosed()) {
     TopoDS_Vertex FV = TopExp::FirstVertex(E);
@@ -497,7 +492,7 @@ Standard_Boolean Draft_Modification::NewParameter(const TopoDS_Vertex& V,
 
     FV.Orientation(E.Orientation());
     if (!V.IsEqual(FV) && P <= paramf) {
-      if (GC->IsPeriodic()) {
+      if (GC->IsPeriodic111()) {
         P += GC->Period();
       }
       else {
index 9ff93c998c57e705bf6cc6462e80b4456715f921..4949f2c5f5655a8a431fd4976c5b05becc7c293d 100644 (file)
@@ -2075,8 +2075,9 @@ static Standard_Real Parameter(const Handle(Geom_Curve)& C,
       }
     }
 
-    if (cbase->IsPeriodic()) {
-      Standard_Real Per  = cbase->Period();
+    if (C->IsPeriodic111())
+    {
+      Standard_Real Per = C->Period();
       Standard_Real Tolp = Precision::Parametric(Precision::Confusion());  
       if (Abs(Per-param) <= Tolp) {
         param = 0.;
index bda82a828f297997ea923c80a3f928fa2c7145ec..831024fe81612d9cbead7b55873da4ac862e57a2 100644 (file)
@@ -73,7 +73,7 @@ DrawTrSurf_BSplineCurve::DrawTrSurf_BSplineCurve (
       for (Standard_Integer i = 2; i <= NbPoles; i++) {
         dis.DrawTo(CPoles(i));
       }
-      if (C->IsPeriodic())
+      if (C->IsPeriodic111())
        dis.DrawTo(CPoles(1));
     }
     
index 9823c9d02b30af205d25fcd337cf42293c6675c7..288751092d5bd7dbd715813856ba3751aebf9723 100644 (file)
@@ -289,13 +289,13 @@ void DsgPrs::ComputeCurvilinearFacesLengthPresentation( const Standard_Real Firs
       deltaU = LastU - FirstU;
       deltaV = LastV - FirstV;
 
-      if (VCurve->IsPeriodic() && Abs( deltaU ) > VCurve->Period()/2)
+      if (VCurve->IsPeriodic111() && Abs( deltaU ) > VCurve->Period()/2)
        {
          Standard_Real Sign = (deltaU > 0.0)? -1.0 : 1.0;
          deltaU = VCurve->Period() - Abs( deltaU );
          deltaU *= Sign;
        }
-      if (UCurve->IsPeriodic() && Abs( deltaV ) > UCurve->Period()/2)
+      if (UCurve->IsPeriodic111() && Abs( deltaV ) > UCurve->Period()/2)
        {
          Standard_Real Sign = (deltaV > 0.0)? -1.0 : 1.0;
          deltaV = UCurve->Period() - Abs( deltaV );
index c2c07e7bcc98b0748caecca894eb69876773f67f..95857a08076a004619119674898d0f2e4cd1e20c 100644 (file)
@@ -1069,7 +1069,7 @@ void Geom_BSplineCurve::MovePointAndTangent(const Standard_Real    U,
                                             Standard_Integer&      ErrorStatus) 
 {
   Standard_Integer ii ;
-  if (IsPeriodic()) {
+  if (IsPeriodic111()) {
     //
     // for the time being do not deal with periodic curves
     //
index dc28c43f1bde78092d9a86c6dc198d5ebd257061..689a83f82c6cfaa6852f31d21e693bf0d27a339e 100644 (file)
@@ -462,7 +462,7 @@ public:
   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
   
   //! Returns True if the curve is periodic.
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
 
   //! Returns True if the weights are not identical.
index 0354196746074d2553f01b6ec8af2ed123e86252..d0a1e26fc1bf2aefd8d2bc298dde8a8c04e08c73 100644 (file)
@@ -112,7 +112,7 @@ Standard_Boolean Geom_BSplineCurve::IsG1 ( const Standard_Real theTf,
       return Standard_False;
   }
 
-  if(!IsPeriodic())
+  if(!IsPeriodic111())
     return Standard_True;
 
   const Standard_Real aFirstParam = FirstParameter(),
@@ -160,7 +160,7 @@ Standard_Boolean Geom_BSplineCurve::IsClosed () const
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_BSplineCurve::IsPeriodic () const
+Standard_Boolean Geom_BSplineCurve::IsPeriodic111 () const
 { return periodic; }
 
 //=======================================================================
index e25133dcadcf1849aa2f85e8a073a26653c7ec79..ec6ac64aa07182590913850f69e77b89efbfcfd4 100644 (file)
@@ -488,7 +488,7 @@ Standard_Boolean Geom_BezierCurve::IsCN (const Standard_Integer ) const
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_BezierCurve::IsPeriodic () const 
+Standard_Boolean Geom_BezierCurve::IsPeriodic111 () const 
 {
   return Standard_False; 
 }
index 38cf01356641a744915f487dfc775395e72eac4e..124c1eb0c6d686d93d304a654a02ea2a89841970 100644 (file)
@@ -231,7 +231,7 @@ public:
 
   //! Returns True if the parametrization of a curve is periodic.
   //! (P(u) = P(u + T) T = constante)
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
 
   //! Returns false if all the weights are identical. The tolerance
index 2ed3d420c9c9677b052314a6d92705125d5c3e48..3a1cdc275ddf6e7746b03017d5562e1526b43f77 100644 (file)
@@ -89,7 +89,7 @@ Standard_Boolean Geom_Circle::IsClosed () const        { return Standard_True; }
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_Circle::IsPeriodic () const      { return Standard_True; }
+Standard_Boolean Geom_Circle::IsPeriodic111 () const      { return Standard_True; }
 
 
 //=======================================================================
index 4b75cb1f3591bae4637b1102774028ffa09a75d3..a5ad875865398fee0ff78fe7a3f4fde8b82369f3 100644 (file)
@@ -124,7 +124,7 @@ public:
   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
   
   //! returns True.
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
   //! Returns in P the point of parameter U.
   //! P = C + R * Cos (U) * XDir + R * Sin (U) * YDir
index 6f0ba329a54f03220f4de6cc3e671c9b05075c97..9112b6a4778f18030ca3143b3d2d1d912c777f4d 100644 (file)
@@ -50,7 +50,7 @@ Handle(Geom_Curve) Geom_Curve::Reversed () const
 Standard_Real Geom_Curve::Period() const
 {
   Standard_NoSuchObject_Raise_if
-    ( !IsPeriodic(),"Geom_Curve::Period");
+    ( !IsPeriodic111(),"Geom_Curve::Period");
 
   return ( LastParameter() - FirstParameter());
 }
index 4cacecc422f0b72628779e5e413486c77af0b034..bc284a067158b8c2c3fcf0953a61b8e469ba0f77 100644 (file)
@@ -156,7 +156,7 @@ public:
   //! periodic or not the default periodicity set is non periodic
   //! and you have to turn (explicitly) the curve into a periodic
   //! curve  if you want the curve to be periodic.
-  Standard_EXPORT virtual Standard_Boolean IsPeriodic() const = 0;
+  Standard_EXPORT virtual Standard_Boolean IsPeriodic111() const = 0;
   
   //! Returns the period of this curve.
   //! Exceptions Standard_NoSuchObject if this curve is not periodic.
index f272490102f692146d26ae687f81f93a0e44a7a4..daf01713506e047e8427fab4d9ffc469d1efeadb 100644 (file)
@@ -94,7 +94,7 @@ Standard_Boolean Geom_Ellipse::IsClosed () const      { return Standard_True; }
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_Ellipse::IsPeriodic () const    { return Standard_True; }
+Standard_Boolean Geom_Ellipse::IsPeriodic111 () const    { return Standard_True; }
 
 //=======================================================================
 //function : FirstParameter
index 845c1a76b68af25092b8ea89edc4cd9708268659..9e2cf894b1fc589862ba284815d3109780f48b13 100644 (file)
@@ -189,7 +189,7 @@ public:
   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
   
   //! return True.
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
   //! Returns in P the point of parameter U.
   //! P = C + MajorRadius * Cos (U) * XDir + MinorRadius * Sin (U) * YDir
index 9c06858b5bfe36b9aaa08f8ae97b0ddd6cbbef15..443bebd6eed1bc4b977121a3fe7a189376069d47 100644 (file)
@@ -96,7 +96,7 @@ Standard_Boolean Geom_Hyperbola::IsClosed () const      { return Standard_False;
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_Hyperbola::IsPeriodic () const    { return Standard_False; } 
+Standard_Boolean Geom_Hyperbola::IsPeriodic111 () const    { return Standard_False; } 
 
 //=======================================================================
 //function : FirstParameter
index 19023092b074d06f256fa4baa1e64f4b7e6fa0da..44be1af80d7a92c2e9f95d6f2bd8d5ec0642cbf1 100644 (file)
@@ -152,7 +152,7 @@ public:
   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
   
   //! return False for an hyperbola.
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
 
   //! In the local coordinate system of the hyperbola the equation of
index de103abf451b7e22a34591ce10208ca83c4bcbf0..c267dad34fbbbe6df7141c4f08f14398475bfacc 100644 (file)
@@ -125,7 +125,7 @@ Standard_Boolean Geom_Line::IsClosed () const { return Standard_False; }
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_Line::IsPeriodic () const { return Standard_False;  }
+Standard_Boolean Geom_Line::IsPeriodic111 () const { return Standard_False;  }
 
 //=======================================================================
 //function : Continuity
index 77355dbec8908c75d83ddb57bf60ffd7c05690f2..8c4aafbdf360abc91c157f42672d151a036487e7 100644 (file)
@@ -114,7 +114,7 @@ public:
   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
   
   //! returns False
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
   //! Returns GeomAbs_CN, which is the global continuity of any line.
   Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
index 5bdffddbf0d0b99584ed2516cf8f553f0649b27e..a3f09ebb2f75d72282e497ad010d8e4f02c25474 100644 (file)
@@ -137,9 +137,9 @@ void Geom_OffsetCurve::SetOffsetValue (const Standard_Real D)
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_OffsetCurve::IsPeriodic () const
+Standard_Boolean Geom_OffsetCurve::IsPeriodic111 () const
 {
-  return basisCurve->IsPeriodic();
+  return basisCurve->IsPeriodic111();
 }
 
 //=======================================================================
index a195a85e92ad4c305f482b76e8018e4086b2885a..b03d165ae5e3c836c018fb1f60e93968522c0b57 100644 (file)
@@ -245,7 +245,7 @@ public:
   
   //! Returns true if this offset curve is periodic, i.e. if the
   //! basis curve of this offset curve is periodic.
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
   //! Returns the period of this offset curve, i.e. the period
   //! of the basis curve of this offset curve.
index 4115c294b3ad70e565b655958c648f3713a9a5a5..7aa14519d721100c5a02d14f47e968f04a834221 100644 (file)
@@ -112,7 +112,7 @@ Standard_Boolean Geom_Parabola::IsClosed () const { return Standard_False; }
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_Parabola::IsPeriodic () const     {  return Standard_False; }
+Standard_Boolean Geom_Parabola::IsPeriodic111 () const     {  return Standard_False; }
 
 //=======================================================================
 //function : Eccentricity
index 8757c5594b8530184e4d4777be6ad90b61a0d579..1bb569cc7940d908446c5d89c1a7d0f698abe7e2 100644 (file)
@@ -134,7 +134,7 @@ public:
   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
   
   //! Returns False
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
   //! Computes the directrix of this parabola.
   //! This is a line normal to the axis of symmetry, in the
index 62d816d99490609959bb35c1a6e16e47425c8f0d..3babe761141d0fde4ac1367c0473da0c9b07c231 100644 (file)
@@ -335,7 +335,7 @@ Standard_Boolean Geom_SurfaceOfLinearExtrusion::IsUClosed () const {
 
 Standard_Boolean Geom_SurfaceOfLinearExtrusion::IsUPeriodic () const { 
 
-  return basisCurve->IsPeriodic ();
+  return basisCurve->IsPeriodic111 ();
 }
 
 //=======================================================================
index d1b86e43e9c3492a9e65fb849762aad935c630e0..1fd41da8e8d52a91478dd2c1e9d10a59aed0d013 100644 (file)
@@ -216,7 +216,7 @@ Standard_Boolean Geom_SurfaceOfRevolution::IsVClosed () const
 
 Standard_Boolean Geom_SurfaceOfRevolution::IsVPeriodic () const { 
 
-  return basisCurve->IsPeriodic(); 
+  return basisCurve->IsPeriodic111(); 
 }
 
 
index 7fc934707b00883620d6e5cf92f04177e28d6478..e132504ea6968c284fff299d4439fea22b765076 100644 (file)
@@ -126,7 +126,7 @@ void Geom_TrimmedCurve::SetTrim (const Standard_Real U1,
    Standard_Real Udeb = basisCurve->FirstParameter();
    Standard_Real Ufin = basisCurve->LastParameter();
 
-   if (basisCurve->IsPeriodic())  {
+   if (IsPeriodic111())  {
      sameSense = Sense;
       
      // set uTrim1 in the range Udeb , Ufin
@@ -170,7 +170,7 @@ void Geom_TrimmedCurve::SetTrim (const Standard_Real U1,
 
 Standard_Boolean Geom_TrimmedCurve::IsClosed () const
 {
-  return ( StartPoint().Distance(EndPoint()) <= gp::Resolution());
+  return ( StartPoint().SquareDistance(EndPoint()) <= gp::Resolution());
 }
 
 //=======================================================================
@@ -178,10 +178,9 @@ Standard_Boolean Geom_TrimmedCurve::IsClosed () const
 //purpose  : 
 //=======================================================================
 
-Standard_Boolean Geom_TrimmedCurve::IsPeriodic () const 
+Standard_Boolean Geom_TrimmedCurve::IsPeriodic111 () const 
 {
-  //return basisCurve->IsPeriodic();
-  return Standard_False;
+  return basisCurve->IsPeriodic111();
 }
 
 
index 76569080707c9e507e2c00439a48d1bcaf8d08e2..64e8f7c5957bf63774acc5c2c8c5d9ebef69f3f5 100644 (file)
@@ -174,7 +174,7 @@ public:
   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
   
   //! Always returns FALSE (independently of the type of basis curve).
-  Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
   //! Returns the period of the basis curve of this trimmed curve.
   //! Exceptions
index 390673cc31b7e93c5bf1ca28c1f0ed66fa99d14a..46f7145d7dbb7986e26b798a7b15afe70cba1ef6 100644 (file)
@@ -83,9 +83,9 @@ GeomAbs_Shape GeomAdaptor_Curve::LocalContinuity(const Standard_Real U1,
   Standard_Real newFirst, newLast;
   const TColStd_Array1OfReal& TK = myBSplineCurve->Knots();
   const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities();
-  BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,U1,myBSplineCurve->IsPeriodic(),
+  BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,U1,myBSplineCurve->IsPeriodic111(),
                            1,Nb,Index1,newFirst);
-  BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,U2,myBSplineCurve->IsPeriodic(),
+  BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,U2,myBSplineCurve->IsPeriodic111(),
                            1,Nb,Index2,newLast);
   if ( Abs(newFirst-TK(Index1+1))<Precision::PConfusion()) { 
     if (Index1 < Nb) Index1++;
@@ -94,7 +94,7 @@ GeomAbs_Shape GeomAdaptor_Curve::LocalContinuity(const Standard_Real U1,
     Index2--;
   Standard_Integer MultMax;
   // attention aux courbes peridiques.
-  if ( (myBSplineCurve->IsPeriodic()) && (Index1 == Nb) )
+  if ( (myBSplineCurve->IsPeriodic111()) && (Index1 == Nb) )
     Index1 = 1;
 
   if ( Index2 - Index1 <= 0) {
@@ -295,10 +295,10 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const
           const TColStd_Array1OfReal& TK = myBSplineCurve->Knots();
           const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities();
           BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myFirst,
-                                    myBSplineCurve->IsPeriodic(),
+                                    myBSplineCurve->IsPeriodic111(),
                                     1,Nb,Index1,newFirst);
           BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myLast,
-                                    myBSplineCurve->IsPeriodic(),
+                                    myBSplineCurve->IsPeriodic111(),
                                     1,Nb,Index2,newLast);
           // Protection against myFirst = UFirst - eps, which located as ULast - eps
           if (myBSplineCurve->IsPeriodic() && (newLast - newFirst) < Precision::PConfusion())
@@ -425,10 +425,10 @@ void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T,
             const TColStd_Array1OfReal& TK = myBSplineCurve->Knots();
             const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities();
            BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myFirst,
-                                     myBSplineCurve->IsPeriodic(),
+                                     myBSplineCurve->IsPeriodic111(),
                                      1,Nb,Index1,newFirst);
            BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myLast,
-                                     myBSplineCurve->IsPeriodic(),
+                                     myBSplineCurve->IsPeriodic111(),
                                      1,Nb,Index2,newLast);
             FirstParam = newFirst;
             LastParam = newLast;
@@ -541,7 +541,7 @@ Standard_Boolean GeomAdaptor_Curve::IsClosed() const
 
 Standard_Boolean GeomAdaptor_Curve::IsPeriodic() const 
 {
-  return myCurve->IsPeriodic();
+  return myCurve->IsPeriodic111();
 }
 
 //=======================================================================
@@ -567,7 +567,7 @@ void GeomAdaptor_Curve::RebuildCache(const Standard_Real theParameter) const
     Standard_Integer aDeg = aBezier->Degree();
     TColStd_Array1OfReal aFlatKnots(BSplCLib::FlatBezierKnots(aDeg), 1, 2 * (aDeg + 1));
     if (myCurveCache.IsNull())
-      myCurveCache = new BSplCLib_Cache(aDeg, aBezier->IsPeriodic(), aFlatKnots,
+      myCurveCache = new BSplCLib_Cache(aDeg, aBezier->IsPeriodic111(), aFlatKnots,
         aBezier->Poles(), aBezier->Weights());
     myCurveCache->BuildCache (theParameter, aFlatKnots, aBezier->Poles(), aBezier->Weights());
 }
@@ -575,7 +575,7 @@ void GeomAdaptor_Curve::RebuildCache(const Standard_Real theParameter) const
 {
     // Create cache for B-spline
     if (myCurveCache.IsNull())
-      myCurveCache = new BSplCLib_Cache(myBSplineCurve->Degree(), myBSplineCurve->IsPeriodic(),
+      myCurveCache = new BSplCLib_Cache(myBSplineCurve->Degree(), myBSplineCurve->IsPeriodic111(),
         myBSplineCurve->KnotSequence(), myBSplineCurve->Poles(), myBSplineCurve->Weights());
     myCurveCache->BuildCache (theParameter, myBSplineCurve->KnotSequence(),
                               myBSplineCurve->Poles(), myBSplineCurve->Weights());
index ff694b03865ff0d45ad4b47ae49d5cb749ca6a40..174a2fe17464c53caab60d788cfe8df97f201540 100644 (file)
@@ -131,7 +131,7 @@ Handle(Geom_BSplineCurve) GeomConvert::SplitBSplineCurve
 
   C1->Segment( C->Knot(FirstK),C->Knot(LastK));
 
-  if (C->IsPeriodic()) {
+  if (C->IsPeriodic111()) {
     if (!SameOrientation) C1->Reverse();
   }
   else {
@@ -161,7 +161,7 @@ Handle(Geom_BSplineCurve) GeomConvert::SplitBSplineCurve
 
   C1->Segment(FirstU, LastU);
 
-  if (C->IsPeriodic()) {
+  if (C->IsPeriodic111()) {
      if (!SameOrientation) C1->Reverse();
    }
   else {
@@ -194,7 +194,7 @@ Handle(Geom_BSplineCurve)  GeomConvert::CurveToBSplineCurve
 
     // Si la courbe n'est pas vraiment restreinte, on ne risque pas 
     // le Raise dans le BS->Segment.
-    if (!Curv->IsPeriodic()) {
+    if (!Curv->IsPeriodic111()) {
       if (U1 < Curv->FirstParameter())
        U1 =  Curv->FirstParameter();
       if (U2 > Curv->LastParameter())
@@ -358,7 +358,7 @@ Handle(Geom_BSplineCurve)  GeomConvert::CurveToBSplineCurve
     else if (Curv->IsKind (STANDARD_TYPE(Geom_BSplineCurve))) {
       TheCurve = Handle(Geom_BSplineCurve)::DownCast(Curv->Copy());
       //// modified by jgv, 14.01.05 for OCC7355 ////
-      if (TheCurve->IsPeriodic())
+      if (TheCurve->IsPeriodic111())
        {
          Standard_Real Uf = TheCurve->FirstParameter();
          Standard_Real Ul = TheCurve->LastParameter();
index b8ec250f24beb53487528726913eba97c70a915f..7207022b374f63381609cfaa5a8beacc86000be7 100644 (file)
@@ -570,7 +570,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
         UKnots, VKnots, 
         UMults, VMults,
         2 , C->Degree(),
-        periodic, C->IsPeriodic());
+        periodic, C->IsPeriodic111());
 
 
     }
@@ -613,7 +613,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
       TheSurface = new Geom_BSplineSurface(Poles, Weights, UKnots, VKnots, 
         UMults, VMults,
         C->Degree(), 1,
-        C->IsPeriodic(), Standard_False);
+        C->IsPeriodic111(), Standard_False);
     }
 
 
@@ -790,7 +790,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
         UKnots, VKnots, 
         UMults, VMults,
         2 , C->Degree(),
-        periodic, C->IsPeriodic());
+        periodic, C->IsPeriodic111());
     }
 
 
index 57c9a01fe9ea518f0bb20a5374d408b5cc1b55c9..e24783f8e95d8d377aafc6f68e02915696c61e55 100644 (file)
@@ -506,7 +506,7 @@ void  GeomFill_BSplineCurves::Init
                                          UKnots       , VKnots, 
                                          UMults       , VMults,
                                          CC1->Degree(), 1,
-                                         CC1->IsPeriodic(), 
+                                         CC1->IsPeriodic111(), 
                                          Standard_False);
     }
     else {
index dfbde825014ef82bf241724cfd0768a70e512f6e..c35af9bf07bd2e388b19c2d0a3ac54233ded1733 100644 (file)
@@ -55,7 +55,7 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
   myCurve =  Handle(Geom_BSplineCurve)::DownCast(C);
   if (myCurve.IsNull()) {
     myCurve = GeomConvert::CurveToBSplineCurve(C, Convert_QuasiAngular);
-    if (myCurve->IsPeriodic()) {
+    if (myCurve->IsPeriodic111()) {
       Standard_Integer M = myCurve->Degree()/2+1;
       myCurve->RemoveKnot(1, M, Precision::Confusion());
     }
@@ -216,7 +216,7 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const Handle(Geom_Curve)& C,
 //=======================================================
  Standard_Boolean GeomFill_EvolvedSection::IsUPeriodic() const
 {
-  return myCurve->IsPeriodic();
+  return myCurve->IsPeriodic111();
 }
 
 //=======================================================
index 63137452055f2495eb7841c86bb9d325113f1c0e..98a71a24958a017f524ecb8bf0f9a4c3ead2b476 100644 (file)
@@ -166,7 +166,7 @@ void GeomFill_Profiler::AddCurve(const Handle(Geom_Curve)& Curve)
 
   mySequence.Append( C);
 
-  if ( myIsPeriodic && !C->IsPeriodic())
+  if ( myIsPeriodic && !C->IsPeriodic111())
     myIsPeriodic = Standard_False;
 }
 
@@ -195,7 +195,7 @@ void GeomFill_Profiler::Perform(const Standard_Real PTol)
     U2 = C->Knot(C->LastUKnotIndex());
     U1 = C->Knot(C->FirstUKnotIndex());
 
-    if ( !myIsPeriodic && C->IsPeriodic()) {
+    if ( !myIsPeriodic && C->IsPeriodic111()) {
       C->SetNotPeriodic();
       C->Segment( U1, U2);
     }
index 76e1782c360eed709f1f26b72919342f20b333a1..d005f38657c3958a813bbd631b9654124c44f26a 100644 (file)
@@ -171,7 +171,7 @@ void GeomFill_SweepSectionGenerator::Init
     myFirstSect = GeomConvert::CurveToBSplineCurve(FirstSect,
                                                   Convert_QuasiAngular);
   }
-  if ( myFirstSect->IsPeriodic()) myFirstSect->SetNotPeriodic();
+  if ( myFirstSect->IsPeriodic111()) myFirstSect->SetNotPeriodic();
 }
 
 
@@ -219,8 +219,8 @@ void GeomFill_SweepSectionGenerator::Init
                                                   Convert_QuasiAngular);
   }
 
-  if ( myFirstSect->IsPeriodic()) myFirstSect->SetNotPeriodic();
-  if ( myLastSect->IsPeriodic()) myLastSect->SetNotPeriodic();
+  if ( myFirstSect->IsPeriodic111()) myFirstSect->SetNotPeriodic();
+  if ( myLastSect->IsPeriodic111()) myLastSect->SetNotPeriodic();
 
 
   // JAG
index 6a50c1ee9b8fb1ccb4fecc453bbe0d7bdb5f785c..b73bef12d5b36da0d85f7ca9f8144ea528574ab5 100644 (file)
@@ -54,7 +54,7 @@ GeomFill_UniformSection::GeomFill_UniformSection(const Handle(Geom_Curve)& C,
  myCurve =  Handle(Geom_BSplineCurve)::DownCast(C);
  if (myCurve.IsNull()) {
    myCurve = GeomConvert::CurveToBSplineCurve(C, Convert_QuasiAngular);
-   if (myCurve->IsPeriodic()) {
+   if (myCurve->IsPeriodic111()) {
      Standard_Integer M = myCurve->Degree()/2+1;
      myCurve->RemoveKnot(1, M, Precision::Confusion());
    }
@@ -149,7 +149,7 @@ GeomFill_UniformSection::GeomFill_UniformSection(const Handle(Geom_Curve)& C,
                               UKnots, VKnots,
                               UMults, VMults,
                               myCurve->Degree(), 1,
-                              myCurve->IsPeriodic());
+                              myCurve->IsPeriodic111());
 
   return BS;
 }
@@ -191,7 +191,7 @@ GeomFill_UniformSection::GeomFill_UniformSection(const Handle(Geom_Curve)& C,
 //=======================================================
  Standard_Boolean GeomFill_UniformSection::IsUPeriodic() const
 {
-  return myCurve->IsPeriodic();
+  return myCurve->IsPeriodic111();
 }
 
 //=======================================================
index 5cac732ca3ef5ff4de3931bc4bcf0cd898764a54..e2c93ea7f0e44a8ec4d206ad4e5c23f4c7be9f08 100644 (file)
@@ -842,7 +842,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
                 if (mbspc.Degree() == 1 && nbpoles == 2)
                   continue;
 
-                if (!BS->IsClosed() && !BS->IsPeriodic())
+                if (!BS->IsClosed() && !BS->IsPeriodic111())
                 {
                   //force Closed()
                   gp_Pnt aPm((BS->Pole(1).XYZ() + BS->Pole(BS->NbPoles()).XYZ()) / 2.);
index cc6ab66efa6974c97fa74a56abf978aefa003189..67ec251139191cb8a075b8582c3155fbb0134692 100644 (file)
@@ -45,7 +45,7 @@ GeomLib_CheckBSplineCurve::GeomLib_CheckBSplineCurve(const Handle(Geom_BSplineCu
     vector_magnitude ;
   num_poles = myCurve->NbPoles() ;
   
-  if (( ! myCurve->IsPeriodic() )&& num_poles >= 4) {
+  if (( ! myCurve->IsPeriodic111() )&& num_poles >= 4) {
     
     gp_Vec tangent, tangent_normalized,
       a_vector, avector_normalized;
index 8daeda81fecc58a4109e956d3e7e578388f53f76..43ccf9c41943a364d7128dd548e93001638709d8 100644 (file)
@@ -280,7 +280,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomCurve::TransferCurve
 // Si la courbe est periodique, on passe par une fonction pour recuperer tous
 // les parametres necessaires a l`ecriture IGES.
 
-  Standard_Boolean IPerio  = start->IsPeriodic();
+  Standard_Boolean IPerio  = start->IsPeriodic111();
  
   if (IPerio) {
     mycurve = Handle(Geom_BSplineCurve)::DownCast(start->Copy());
index 3bef9e132f2bbec173a67e22bc7b7f52a7538b96..a8ec69dc0a77caaa9c2dae359a37c44012d8267f 100644 (file)
@@ -41,7 +41,7 @@ GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_Bou
   if (C->IsKind(STANDARD_TYPE(Geom_BSplineCurve))) {
     Handle(Geom_BSplineCurve) Bspli = Handle(Geom_BSplineCurve)::DownCast(C);
     // UPDATE FMA 1-04-96
-    if (C->IsPeriodic()) {
+    if (C->IsPeriodic111()) {
       Handle(Geom_BSplineCurve) newBspli = 
        Handle(Geom_BSplineCurve)::DownCast(Bspli->Copy());
       newBspli->SetNotPeriodic();
index 903fd2b5f5551590498cbf607b060ccfe43190cb..e5d3e5281daf7c657030413cf8f0f6bbe8214b04 100644 (file)
@@ -357,7 +357,7 @@ static void Print(const Handle(Geom_BSplineCurve)& B,
       OS << " rational";
   }
 
-  Standard_Boolean periodic = B->IsPeriodic();
+  Standard_Boolean periodic = B->IsPeriodic111();
   if (compact)
     OS << (periodic ? 1 : 0)<< " ";
   else {
index bf0ab798d7578cb0c1066cf4160d02aa3d0b018a..d4a9bbb71f87dadb331995d2f8c2b1650f73a836 100644 (file)
@@ -94,7 +94,7 @@ TopoDS_Edge HLRBRep::MakeEdge (const HLRBRep_Curve& ec,
       aCurve = (Handle(Geom_TrimmedCurve)::DownCast(aCurve))->BasisCurve();
     Handle(Geom_BSplineCurve) BSplCurve (Handle(Geom_BSplineCurve)::DownCast(aCurve));
     Handle(Geom_BSplineCurve) theCurve = Handle(Geom_BSplineCurve)::DownCast(BSplCurve->Copy());
-    if (theCurve->IsPeriodic() && !GAcurve.IsClosed())
+    if (theCurve->IsPeriodic111() && !GAcurve.IsClosed())
     {
       theCurve->Segment(sta, end);
       TColgp_Array1OfPnt2d    Poles(1, theCurve->NbPoles());
@@ -107,12 +107,12 @@ TopoDS_Edge HLRBRep::MakeEdge (const HLRBRep_Curve& ec,
         TColStd_Array1OfReal Weights(1, theCurve->NbPoles());
         ec.PolesAndWeights(theCurve, Poles, Weights);
         ec2d = new Geom2d_BSplineCurve(Poles, Weights, knots, mults,
-                                       theCurve->Degree(), theCurve->IsPeriodic());
+                                       theCurve->Degree(), theCurve->IsPeriodic111());
       }
       else {
         ec.Poles(theCurve, Poles);
         ec2d = new Geom2d_BSplineCurve(Poles, knots, mults,
-                                       theCurve->Degree(), theCurve->IsPeriodic());
+                                       theCurve->Degree(), theCurve->IsPeriodic111());
       }
     }
     else
index 591af679edb09deb1338c6ee6cb4ce592c4f5f99..b27af35b149776da5854cd3e6cd73d4f93d3bcbf 100644 (file)
@@ -54,7 +54,7 @@ static void HermiteCoeff(const Handle(Geom_BSplineCurve)& BS,
   BS->Weights(Weights);
   BS->Multiplicities(Mults);
   Degree   = BS->Degree();
-  Periodic = BS->IsPeriodic();
+  Periodic = BS->IsPeriodic111();
   Index0   = BS->FirstUKnotIndex();
   Index1   = BS->LastUKnotIndex()-1;
 
index 31a386cb9ba8df64de9db5b7d196f1559ca46d72..c45dfc3bf040d3501da70712d9dcb3beeb34b56a 100644 (file)
@@ -290,7 +290,7 @@ void IGESToBRep_IGESBoundary::ReverseCurves3d (const Handle(ShapeExtend_WireData
     TopLoc_Location L;
     Standard_Real p1, p2;
     Handle(Geom_Curve) curve = BRep_Tool::Curve (oldedge, L, p1, p2);
-    if (curve->IsPeriodic())                                   //#21
+    if (curve->IsPeriodic111())                                   //#21
       ShapeBuild_Edge().MakeEdge (newedge, curve->Reversed(), L,
                                curve->ReversedParameter (p2),
                                curve->ReversedParameter (p1));
index 553623fe46e276695dc13d02b110beb9a3062ef2..f09ca12182e3922770a0982a70e2df04b328f8ce 100644 (file)
@@ -1662,7 +1662,7 @@ static TopoDS_Edge  NewEdge(const TopoDS_Edge& edg,
       Cimg2d = i2s.LineOnS1(i);
     }
 
-    if (Cimg->IsPeriodic()) {
+    if (Cimg->IsPeriodic111()) {
 
       Standard_Real period = Cimg->Period();
       Standard_Real imf = Cimg->FirstParameter();
index 50909981873c6f32c768086771e627261b4d8612..8c65ad3d4e21823382ad8138ee3ab0b52abbe964 100644 (file)
@@ -1041,14 +1041,14 @@ void ProjLib_ComputeApprox::Perform
                                          Knots,
                                          Mults,
                                          BS->Degree(),
-                                         BS->IsPeriodic());
+                                         BS->IsPeriodic111());
     }
     else {
       myBSpline = new Geom2d_BSplineCurve(Poles,
                                          Knots,
                                          Mults,
                                          BS->Degree(),
-                                         BS->IsPeriodic());
+                                         BS->IsPeriodic111());
     }
   }
   else if (CType == GeomAbs_BezierCurve &&
index c104aa09ee32a410583b3ef091035cbde6651091..35c844a32ac4ebb630e2798f7f12999b1923a7ad 100644 (file)
@@ -1573,10 +1573,10 @@ Handle(Geom2d_BSplineCurve)
        TColStd_Array1OfReal Weights(1, BSC->NbPoles());
        BSC->Weights(Weights); 
        return new Geom2d_BSplineCurve(Poles2d, Weights, Knots, Mults,
-                                      BSC->Degree(), BSC->IsPeriodic()) ;
+                                      BSC->Degree(), BSC->IsPeriodic111()) ;
       }
       return new Geom2d_BSplineCurve(Poles2d, Knots, Mults,
-                                    BSC->Degree(), BSC->IsPeriodic()) ;
+                                    BSC->Degree(), BSC->IsPeriodic111()) ;
       
     }
     if(TheTypeC == GeomAbs_BezierCurve) {
@@ -1596,10 +1596,10 @@ Handle(Geom2d_BSplineCurve)
        TColStd_Array1OfReal Weights(1, BC->NbPoles());
        BC->Weights(Weights); 
        return new Geom2d_BSplineCurve(Poles2d, Weights, Knots, Mults,
-                                      BC->Degree(), BC->IsPeriodic()) ;
+                                      BC->Degree(), BC->IsPeriodic111()) ;
       }
       return new Geom2d_BSplineCurve(Poles2d, Knots, Mults,
-                                    BC->Degree(), BC->IsPeriodic()) ;
+                                    BC->Degree(), BC->IsPeriodic111()) ;
     }
   }
   if(TheTypeS == GeomAbs_BSplineSurface) {
@@ -1649,10 +1649,10 @@ Handle(Geom2d_BSplineCurve)
              TColStd_Array1OfReal Weights(1, BSC->NbPoles());
              BSC->Weights(Weights); 
              return new Geom2d_BSplineCurve(Poles2d, Weights, Knots, Mults,
-                                            BSC->Degree(), BSC->IsPeriodic()) ;
+                                            BSC->Degree(), BSC->IsPeriodic111()) ;
            }
            return new Geom2d_BSplineCurve(Poles2d, Knots, Mults,
-                                          BSC->Degree(), BSC->IsPeriodic()) ;
+                                          BSC->Degree(), BSC->IsPeriodic111()) ;
            
            
          }
@@ -1691,10 +1691,10 @@ Handle(Geom2d_BSplineCurve)
              TColStd_Array1OfReal Weights(1, BC->NbPoles());
              BC->Weights(Weights); 
              return new Geom2d_BSplineCurve(Poles2d, Weights, Knots, Mults,
-                                                   BC->Degree(), BC->IsPeriodic()) ;
+                                                   BC->Degree(), BC->IsPeriodic111()) ;
            }
            return new Geom2d_BSplineCurve(Poles2d, Knots, Mults,
-                                                 BC->Degree(), BC->IsPeriodic()) ;
+                                                 BC->Degree(), BC->IsPeriodic111()) ;
          }
        } 
       }
@@ -1749,10 +1749,10 @@ Handle(Geom2d_BSplineCurve)
              TColStd_Array1OfReal Weights(1, BSC->NbPoles());
              BSC->Weights(Weights); 
              return new Geom2d_BSplineCurve(Poles2d, Weights, Knots, Mults,
-                                                   BSC->Degree(), BSC->IsPeriodic()) ;
+                                                   BSC->Degree(), BSC->IsPeriodic111()) ;
            }
            return new Geom2d_BSplineCurve(Poles2d, Knots, Mults,
-                                                 BSC->Degree(), BSC->IsPeriodic()) ;
+                                                 BSC->Degree(), BSC->IsPeriodic111()) ;
            
            
          }
@@ -1791,10 +1791,10 @@ Handle(Geom2d_BSplineCurve)
              TColStd_Array1OfReal Weights(1, BC->NbPoles());
              BC->Weights(Weights); 
              return new Geom2d_BSplineCurve(Poles2d, Weights, Knots, Mults,
-                                                   BC->Degree(), BC->IsPeriodic()) ;
+                                                   BC->Degree(), BC->IsPeriodic111()) ;
            }
            return new Geom2d_BSplineCurve(Poles2d, Knots, Mults,
-                                                 BC->Degree(), BC->IsPeriodic()) ;
+                                                 BC->Degree(), BC->IsPeriodic111()) ;
          }
        } 
       }
index bf507948ebbfd4955ea253982956599e75586519..01fe96ba65cabf7782df1fa39a1587bac5a8f270 100644 (file)
@@ -1223,7 +1223,7 @@ Standard_Boolean ShapeAnalysis_Curve::IsPeriodic(const Handle(Geom_Curve)& theCu
     if (aTmpCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)))
       aTmpCurve = Handle(Geom_TrimmedCurve)::DownCast(aTmpCurve)->BasisCurve();
   }
-  return aTmpCurve->IsPeriodic();
+  return aTmpCurve->IsPeriodic111();
 }
 
 Standard_Boolean ShapeAnalysis_Curve::IsPeriodic(const Handle(Geom2d_Curve)& theCurve)
index 4e90052b4b6d32a6f7b66fab84c0d347b3be83ce..ff12c517afe4ca8a60461dd0dc6239e6ec53307d 100644 (file)
@@ -156,7 +156,7 @@ static Standard_Boolean IsPeriodic(const Handle(Geom_Curve)& theCurve)
       if (aTmpCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)))
         aTmpCurve = Handle(Geom_TrimmedCurve)::DownCast(aTmpCurve)->BasisCurve();
   }
-  return aTmpCurve->IsPeriodic();
+  return aTmpCurve->IsPeriodic111();
 }
 
 Standard_Boolean IsPeriodic(const Handle(Geom2d_Curve)& theCurve)
index 56751a877834f1dfef57da4448228d0d26124466..6bc2fcd8a9f4bd6dd4d1946d1259cbc02d59eafb 100644 (file)
@@ -208,7 +208,7 @@ Handle(Geom_BSplineSurface) ShapeConstruct::ConvertSurfaceToBSpline(const Handle
     vmults(1) = vmults(2) = 2;
     
     Handle(Geom_BSplineSurface) bspline = new Geom_BSplineSurface(resPoles, resWeigth, knots, vknots, mults, vmults,
-                                                                 bspl->Degree(),1,bspl->IsPeriodic(),Standard_False);
+                                                                 bspl->Degree(),1,bspl->IsPeriodic111(),Standard_False);
     return bspline;
   }
   
@@ -398,10 +398,10 @@ static inline void SegmentCurve (HCurve& curve,
 {
   if(curve->FirstParameter() < first - Precision::PConfusion() || 
      curve->LastParameter() > last + Precision::PConfusion()) {
-    //if(curve->IsPeriodic())
-    //  curve->Segment(first,last);
-    //else curve->Segment(Max(curve->FirstParameter(),first),
-    //                    Min(curve->LastParameter(),last));
+    if(curve->IsPeriodic111())
+      curve->Segment(first,last);
+    else curve->Segment(Max(curve->FirstParameter(),first),
+                        Min(curve->LastParameter(),last));
   } 
 }
 
index 117680e430e260d400f9fdfcbadabd5c6c20c3ae..19a1bbf527384e72b5ee07cd86aac420d6fb145b 100644 (file)
@@ -1509,7 +1509,7 @@ Handle(Geom2d_Curve) ShapeConstruct_ProjectCurveOnSurface::ApproximatePCurve(con
     crv3d->Knots(knots);
     crv3d->Weights(weights);
     crv3d->Multiplicities(multiplicities);
-    C2d = new Geom2d_BSplineCurve  ( poles2d, weights, knots, multiplicities, crv3d->Degree(), crv3d->IsPeriodic());
+    C2d = new Geom2d_BSplineCurve  ( poles2d, weights, knots, multiplicities, crv3d->Degree(), crv3d->IsPeriodic111());
     return C2d;
   }
   catch(Standard_Failure const& anException) {
index 9a5e73bda27f856b40228bce4136f068f6aa4c6e..81d036ee148827b189fa4bbe85bf9d2b0b631fd3 100644 (file)
@@ -436,7 +436,7 @@ static void ConvertExtrusion(const Handle(Geom_Curve)& C,/*const gp_Dir& directi
   vmults(1) = vmults(2) = 2;
 
   bspline = new Geom_BSplineSurface(resPoles, resWeigth, knots, vknots, mults, vmults,
-    bspl->Degree(),1,bspl->IsPeriodic(),Standard_False);
+    bspl->Degree(),1,bspl->IsPeriodic111(),Standard_False);
 }
 
 
index 54153af565514c2ab44a4669b0ea22b822fc8b37..291cfd9eab06bdb046f4b02d3457464848f74cf7 100644 (file)
@@ -63,7 +63,7 @@ Handle(Geom_Curve) ShapeCustom_Curve::ConvertToPeriodic (const Standard_Boolean
   
   Standard_Boolean converted = Standard_False; //:p6
 
-  if ( closed && ! BSpl->IsPeriodic() && BSpl->NbPoles() >3 ) {
+  if ( closed && ! BSpl->IsPeriodic111() && BSpl->NbPoles() >3 ) {
     Standard_Boolean set = Standard_True;
     // if degree+1 at ends, first change it to 1 by rearranging knots
     if ( BSpl->Multiplicity(1) == BSpl->Degree() + 1 &&
@@ -95,7 +95,7 @@ Handle(Geom_Curve) ShapeCustom_Curve::ConvertToPeriodic (const Standard_Boolean
       newMults(2) = newMults(nbKnots+1) = BSpl->Degree();
       Handle(Geom_BSplineCurve) res = new Geom_BSplineCurve(oldPoles, oldWeights,
                                                             newKnots,newMults,
-                                                            BSpl->Degree(),BSpl->IsPeriodic());
+                                                            BSpl->Degree(),BSpl->IsPeriodic111());
       BSpl = res;
     }
     else if ( BSpl->Multiplicity(1) > BSpl->Degree() ||
index 434057035b135e9efbe5b4b2f688a50da980045a..d230cd508e8886b4af9492bc892983544712bdcf 100644 (file)
@@ -72,7 +72,7 @@ public:
     virtual Standard_Boolean IsClosed() const Standard_OVERRIDE;
   
   //! Returns False
-    virtual Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
+    virtual Standard_Boolean IsPeriodic111() const Standard_OVERRIDE;
   
   //! Returns GeomAbs_C0
     virtual GeomAbs_Shape Continuity() const Standard_OVERRIDE;
index 96690a383a349dfe60e67d084d78827b760d6560..34ec13179cf4bcdedbbffa485c33c40a063e7793 100644 (file)
@@ -59,7 +59,7 @@ inline  Standard_Boolean ShapeExtend_ComplexCurve::IsClosed() const
 //purpose  : 
 //=======================================================================
 
-inline  Standard_Boolean ShapeExtend_ComplexCurve::IsPeriodic() const
+inline  Standard_Boolean ShapeExtend_ComplexCurve::IsPeriodic111() const
 {
   return Standard_False;
 }
index 4bb06b163c000b0666f112bdd908b3e12d5a5863..92141c559a9fedb135777af353d6c50942ca68d6 100644 (file)
@@ -1373,19 +1373,22 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
   // CTS18546-2.igs entity 2222: base curve is periodic and 2dcurve is shifted
   Standard_Boolean IsVCrvClosed = Standard_False;
   Standard_Real VRange = 1.;
-  if (surf->Surface()->IsKind (STANDARD_TYPE(Geom_SurfaceOfRevolution))) {
+  if (surf->Surface()->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution)))
+  {
     Handle(Geom_SurfaceOfRevolution) aSurOfRev = Handle(Geom_SurfaceOfRevolution)::DownCast(surf->Surface());
     Handle(Geom_Curve) aBaseCrv = aSurOfRev->BasisCurve();
-    while ( (aBaseCrv->IsKind(STANDARD_TYPE(Geom_OffsetCurve))) ||
-           (aBaseCrv->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) ) {
+    while ((aBaseCrv->IsKind(STANDARD_TYPE(Geom_OffsetCurve))) ||
+           (aBaseCrv->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))))
+    {
       if (aBaseCrv->IsKind(STANDARD_TYPE(Geom_OffsetCurve)))
         aBaseCrv = Handle(Geom_OffsetCurve)::DownCast(aBaseCrv)->BasisCurve();
       if (aBaseCrv->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)))
         aBaseCrv = Handle(Geom_TrimmedCurve)::DownCast(aBaseCrv)->BasisCurve();
     }
-    if (aBaseCrv->IsPeriodic()) {
+    if (aBaseCrv->IsPeriodic111())
+    {
       vclosed = Standard_True;
-      VRange = aBaseCrv->Period();
+      VRange = aSurOfRev->VPeriod();
       IsVCrvClosed = Standard_True;
 #ifdef OCCT_DEBUG
       cout << "Warning: ShapeFix_Wire::FixShifted set vclosed True for Surface of Revolution" << endl;
index 44f61353272b91ceae26914c75c504b9377023f4..4b562ca84bf421dcc84d9c7e0de334344b6c0373 100644 (file)
@@ -320,7 +320,7 @@ ShapePersistent_Geom_Curve::Translate(const Handle(Geom_BSplineCurve)& theCurve,
       Handle(BSpline) aPBSC = new BSpline;
       Handle(pBSpline) aPpBSC = new pBSpline;
       aPpBSC->myRational = theCurve->IsRational();
-      aPpBSC->myPeriodic = theCurve->IsPeriodic();
+      aPpBSC->myPeriodic = theCurve->IsPeriodic111();
       aPpBSC->mySpineDegree = theCurve->Degree();
       aPpBSC->myPoles = StdLPersistent_HArray1::Translate<TColgp_HArray1OfPnt>("PColgp_HArray1OfPnt", theCurve->Poles());
       if (theCurve->IsRational()) {
index 98256a4a1e40c0b45723419676183ae3402ef2a0..f7b3e6dd740d31110de30ac4ca8a32a3244d01f2 100644 (file)
@@ -176,7 +176,7 @@ static Handle(Geom2d_BSplineCurve) BSplineCurve3dTo2d (const Handle(Geom_BSpline
     Poles2d (i) = gp_Pnt2d (Poles3d (i).X(), Poles3d (i).Y());
   
   Handle(Geom2d_BSplineCurve) BS2d = new Geom2d_BSplineCurve (Poles2d, Weights,
-                                                             Knots, Mults, deg, BS->IsPeriodic());
+                                                             Knots, Mults, deg, BS->IsPeriodic111());
   return BS2d;
 }
 
index 5edea1ad06a5cdb1203c7b2eb0f8b392edec73f6..e6555d9a66ecf3c6868f993e9dc91b4351feeeb7 100644 (file)
@@ -1916,14 +1916,14 @@ Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_Tr
     const Standard_Real cf = theCurve->FirstParameter();
     const Standard_Real cl = theCurve->LastParameter();
     //: abv 09.04.99: S4136: bm2_ug_t4-B.stp #70610: protect against OutOfRange
-    if ( !theCurve->IsPeriodic() ) {
+    if ( !theCurve->IsPeriodic111() ) {
       if ( trim1 < cf ) trim1 = cf;
       else if ( trim1 > cl ) trim1 = cl;
       if ( trim2 < cf ) trim2 = cf;
       else if ( trim2 > cl ) trim2 = cl;
     }
     if (Abs(trim1 - trim2) < Precision::PConfusion()) {
-      if (theCurve->IsPeriodic()) {
+      if (theCurve->IsPeriodic111()) {
         ElCLib::AdjustPeriodic(cf,cl,Precision::PConfusion(),trim1,trim2);
       }
       else if (theCurve->IsClosed()) {
index d764aaa26c9f91f0fbaf4e20a467a6caa16ec7e3..6a07d3f859634580cb321a22d1b4197792c68cf8 100644 (file)
@@ -226,11 +226,11 @@ Standard_Boolean  StepToTopoDS_GeometricTool::UpdateParam3d(
   const Handle(Geom_Curve)& theCurve,
   Standard_Real& w1,
   Standard_Real& w2,
 const Standard_Real preci)
+ const Standard_Real preci)
 {
   // w1 et/ou w2 peuvent etre en dehors des bornes naturelles de la courbe.
   // On donnera alors la valeur en bout a w1 et/ou w2
-
+  
   Standard_Real cf = theCurve->FirstParameter();
   Standard_Real cl = theCurve->LastParameter();
 
@@ -266,9 +266,9 @@ Standard_Boolean  StepToTopoDS_GeometricTool::UpdateParam3d(
 
   if (w1 < w2) return Standard_True;
 
-  if (theCurve->IsPeriodic())
+  if (theCurve->IsPeriodic111() && theCurve->IsClosed()) 
   {
-    ElCLib::AdjustPeriodic(cf, cl, Precision::PConfusion(), w1, w2); //:a7 abv 11 Feb 98: preci -> PConfusion()
+    ElCLib::AdjustPeriodic(cf,cl,Precision::PConfusion(),w1,w2); //:a7 abv 11 Feb 98: preci -> PConfusion()
   }
   else if (theCurve->IsClosed())
   {
@@ -319,16 +319,16 @@ Standard_Boolean  StepToTopoDS_GeometricTool::UpdateParam3d(
   // The curve is closed within the 3D tolerance
   else if (theCurve->IsKind(STANDARD_TYPE(Geom_BSplineCurve)))
   {
-    Handle(Geom_BSplineCurve) aBSpline =
+    Handle(Geom_BSplineCurve) aBSpline = 
       Handle(Geom_BSplineCurve)::DownCast(theCurve);
     if (aBSpline->StartPoint().Distance(aBSpline->EndPoint()) <= preci)
     {
-      //:S4136 <= BRepAPI::Precision()) {
-            // l'un des points projecte se trouve sur l'origine du parametrage
-            // de la courbe 3D. L algo a donne cl +- preci au lieu de cf ou vice-versa
-            // DANGER precision 3d applique a une espace 1d
-
-            // w2 = cf au lieu de w2 = cl
+//:S4136       <= BRepAPI::Precision()) {
+      // l'un des points projecte se trouve sur l'origine du parametrage
+      // de la courbe 3D. L algo a donne cl +- preci au lieu de cf ou vice-versa
+      // DANGER precision 3d applique a une espace 1d
+      
+      // w2 = cf au lieu de w2 = cl
       if (Abs(w2 - cf) < Precision::PConfusion())
       {
         w2 = cl;
@@ -344,11 +344,11 @@ Standard_Boolean  StepToTopoDS_GeometricTool::UpdateParam3d(
       else
       {
 #ifdef OCCT_DEBUG
-        cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
+       cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
 #endif
-        Standard_Real tmp = w1;
-        w1 = w2;
-        w2 = tmp;
+       Standard_Real tmp = w1;
+       w1 = w2;
+       w2 = tmp;
       }
     }
     //abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
@@ -357,11 +357,11 @@ Standard_Boolean  StepToTopoDS_GeometricTool::UpdateParam3d(
 #ifdef OCCT_DEBUG
       cout << "Warning: parameter range is bad; curve reversed" << endl;
 #endif
-      w1 = theCurve->ReversedParameter(w1);
-      w2 = theCurve->ReversedParameter(w2);
+      w1 = theCurve->ReversedParameter ( w1 );
+      w2 = theCurve->ReversedParameter ( w2 );
       theCurve->Reverse();
     }
-    //:j9 abv 11 Dec 98: PRO7747 #4875, after :j8:    else 
+//:j9 abv 11 Dec 98: PRO7747 #4875, after :j8:    else 
     if (w1 == w2)
     {  //gka 10.07.1998 file PRO7656 entity 33334
       w1 = cf;
@@ -383,8 +383,8 @@ Standard_Boolean  StepToTopoDS_GeometricTool::UpdateParam3d(
 #ifdef OCCT_DEBUG
       cout << "Warning: parameter range is bad; curve reversed" << endl;
 #endif
-      w1 = theCurve->ReversedParameter(w1);
-      w2 = theCurve->ReversedParameter(w2);
+      w1 = theCurve->ReversedParameter ( w1 );
+      w2 = theCurve->ReversedParameter ( w2 );
       theCurve->Reverse();
     }
     //pdn 11.01.99 #144 bm1_pe_t4 protection of exceptions in draw
index 9a8abefc2616b95b7d18206a60e65333e943302e..0723b7f97acbb45b1a12d113fac3fd8352ce0bd1 100644 (file)
@@ -180,7 +180,7 @@ Standard_Boolean TopOpeBRep_FacesFiller::KeepRLine
 
   Standard_Boolean out = Standard_False;
   if (samevp) {
-    Standard_Boolean isper = TopOpeBRepTool_ShapeTool::BASISCURVE(EL)->IsPeriodic();
+    Standard_Boolean isper = TopOpeBRepTool_ShapeTool::BASISCURVE(EL)->IsPeriodic111();
 
     Standard_Integer f,l,n; L.VPBounds(f,l,n);
     if (isper && n == 2) {
index 562c1dc89b71087b4af9bbe36dd31a96e32679b2..ff789614f4cd6188ef41e92eaf77a1c914bc5e92 100644 (file)
@@ -50,7 +50,7 @@ TopOpeBRepBuild_PaveClassifier::TopOpeBRepBuild_PaveClassifier
     Standard_Real f,l;
     Handle(Geom_Curve) C = BRep_Tool::Curve(myEdge,loc,f,l);
     if ( !C.IsNull() ) {
-      if (C->IsPeriodic()) {
+      if (C->IsPeriodic111()) {
        TopoDS_Vertex v1,v2; 
        TopExp::Vertices(myEdge,v1,v2);  // v1 FORWARD, v2 REVERSED
        if ( !v1.IsNull() && !v2.IsNull() ) { 
index 6ed5f5bc81c01326855b689c20ee866702b123cb..bb3dc34e24f6b438d9990eb912e76609ccf49ce9 100644 (file)
@@ -706,9 +706,9 @@ void TopOpeBRepDS_BuildTool::ComputePCurves
   
   Handle(Geom_Curve) C3Dnew = C3D;
   
-  if ( C3D->IsPeriodic() ) {
+  if ( C3D->IsPeriodic111() ) {
     // ellipse on cone : periodize parmin,parmax
-    Standard_Real period = C3D->LastParameter() - C3D->FirstParameter();
+    Standard_Real period = C3D->Period();
     Standard_Real f,l;
     if (Vmin.Orientation() == TopAbs_FORWARD) { f = parmin; l = parmax; }
     else {                                      f = parmax; l = parmin; }
@@ -940,7 +940,7 @@ void  TopOpeBRepDS_BuildTool::Parameter(const TopoDS_Shape& E,
   // 13/07/95 : 
   TopLoc_Location loc; Standard_Real f,l;
   Handle(Geom_Curve) C = BRep_Tool::Curve(e,loc,f,l);
-  if ( !C.IsNull() && C->IsPeriodic()) {
+  if ( !C.IsNull() && C->IsPeriodic111()) {
     Standard_Real per = C->Period();
 
     TopAbs_Orientation oV=TopAbs_FORWARD;
@@ -995,10 +995,10 @@ void  TopOpeBRepDS_BuildTool::UpdateEdge(const TopoDS_Shape& Ein,
   Handle(Geom_Curve) Cou = BRep_Tool::Curve(TopoDS::Edge(Eou),loc,f2,l2);
   if (Cin.IsNull() || Cou.IsNull()) return;
   
-  if ( Cou->IsPeriodic() ) {
+  if ( Cou->IsPeriodic111() ) {
     Standard_Real f2n = f2, l2n = l2;
     if ( l2n <= f2n ) {
-      ElCLib::AdjustPeriodic(f1,l1,Precision::PConfusion(),f2n,l2n);
+      ElCLib::AdjustPeriodic(f1,f1+Cou->Period(),Precision::PConfusion(),f2n,l2n);
       Range(Eou,f2n,l2n);
     }
   }
@@ -1081,8 +1081,8 @@ void TopOpeBRepDS_BuildTool::TranslateOnPeriodic
   Handle(Geom_Curve) C3D = BRep_Tool::Curve(TopoDS::Edge(E),C3Df,C3Dl); // 13-07-97: xpu
  
   Standard_Real first = C3Df, last = C3Dl;
-  if (C3D->IsPeriodic()) {
-    if ( last < first ) last += Abs(first - last);
+  if (C3D->IsPeriodic111()) {
+    if ( last < first ) last += C3D->Period();
   }
 
   // jyl-xpu : 13-06-97 : 
@@ -1225,7 +1225,7 @@ void  TopOpeBRepDS_BuildTool::PCurve(TopoDS_Shape& F,
       Standard_Boolean deca = (Abs(Cf - CDSmin) > Precision::PConfusion());
       Handle(Geom2d_Line) line2d = Handle(Geom2d_Line)::DownCast(PCT);
       Standard_Boolean isline2d = !line2d.IsNull();
-      Standard_Boolean tran=(rangedef && deca && C->IsPeriodic() && isline2d);
+      Standard_Boolean tran=(rangedef && deca && C->IsPeriodic111() && isline2d);
       if (tran) {
        TopLoc_Location Loc;
        const Handle(Geom_Surface) Surf = BRep_Tool::Surface(FF,Loc);
index 1cb9bc25aa3160a4458fff94b468e59de2b05e6d..1055a5c277850ff14cf863ee03f046861d15e762 100644 (file)
@@ -143,7 +143,7 @@ void TopOpeBRepTool_ShapeTool::UVBOUNDS
     Handle(Geom_SurfaceOfRevolution) 
       SR = Handle(Geom_SurfaceOfRevolution)::DownCast(BS);
     Handle(Geom_Curve) C = BASISCURVE(SR->BasisCurve());
-    if (C->IsPeriodic()) {
+    if (C->IsPeriodic111()) {
       UPeriodic = Standard_False; 
       VPeriodic = Standard_True; 
       Vmin = C->FirstParameter(); Vmax = C->LastParameter();
@@ -153,7 +153,7 @@ void TopOpeBRepTool_ShapeTool::UVBOUNDS
     Handle(Geom_SurfaceOfLinearExtrusion)
       SE = Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(BS);
     Handle(Geom_Curve) C = BASISCURVE(SE->BasisCurve());
-    if (C->IsPeriodic()) {
+    if (C->IsPeriodic111()) {
       UPeriodic = Standard_True; 
       Umin = C->FirstParameter(); Umax = C->LastParameter();
       VPeriodic = Standard_False;
index 7f7263228dcebfedd5ce718f666cd20d4b8cda12..671d92753e0324d1431d4fea64badd3f1e747fc6 100644 (file)
@@ -1141,7 +1141,7 @@ Standard_EXPORT void FUN_ds_Parameter(const TopoDS_Shape& E,const TopoDS_Shape&
   Standard_Real p = P;
   TopLoc_Location loc; Standard_Real f,l;
   Handle(Geom_Curve) C = BRep_Tool::Curve(e,loc,f,l);
-  if ( !C.IsNull() && C->IsPeriodic()) {
+  if ( !C.IsNull() && C->IsPeriodic111()) {
     Standard_Real per = C->Period();
 
     TopAbs_Orientation oV=TopAbs_FORWARD;