X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FBOPTools%2FBOPTools_AlgoTools2D.cxx;h=b24667e264db652c230a538e5bccff8c314219db;hp=41d51b6ad2e09d2d797d268f0e0469007470206c;hb=0a807dd9a320d93306dfea222ae5976a7a355549;hpb=4e882c7153c62fc54b2c67deac5eb9a22ae796d2 diff --git a/src/BOPTools/BOPTools_AlgoTools2D.cxx b/src/BOPTools/BOPTools_AlgoTools2D.cxx index 41d51b6ad2..b24667e264 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -618,12 +619,25 @@ void BOPTools_AlgoTools2D::MakePCurveOnFace } // TolReached2d=aTolR; - // + + // Adjust curve for periodic surface Handle(Geom2d_Curve) aC2DA; BOPTools_AlgoTools2D::AdjustPCurveOnSurf (*pBAS, aT1, aT2, aC2D, aC2DA); - // - aC2D=aC2DA; - // + aC2D = aC2DA; + + // Make sure that the range of the 2D curve is sufficient for representation of the 3D curve. + Standard_Real aTCFirst = aC2D->FirstParameter(); + Standard_Real aTCLast = aC2D->LastParameter(); + if ((aTCFirst - aT1) > Precision::PConfusion() || + (aT2 - aTCLast ) > Precision::PConfusion()) + { + if (aTCFirst < aT1) aTCFirst = aT1; + if (aTCLast > aT2) aTCLast = aT2; + + GeomLib::SameRange(Precision::PConfusion(), aC2D, + aTCFirst, aTCLast, aT1, aT2, aC2D); + } + // compute the appropriate tolerance for the edge Handle(Geom_Surface) aS = pBAS->Surface().Surface(); aS = Handle(Geom_Surface)::DownCast(aS->Transformed(pBAS->Trsf()));