From 72952ef2b87cb54043ef047d2c38864388306351 Mon Sep 17 00:00:00 2001 From: razmyslovich Date: Wed, 14 May 2014 13:16:16 +0200 Subject: [PATCH] 0024921: ShapeAnalysis_Curve::ValidateRange doesn't adjust the range for periodic curves Fix the sequence of conditional checks and always try to adjust the range for periodic curves --- src/ShapeAnalysis/ShapeAnalysis_Curve.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ShapeAnalysis/ShapeAnalysis_Curve.cxx b/src/ShapeAnalysis/ShapeAnalysis_Curve.cxx index 0a68b22bd6..8b83b3229a 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Curve.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Curve.cxx @@ -506,11 +506,13 @@ Standard_Boolean ShapeAnalysis_Curve::ValidateRange (const Handle(Geom_Curve)& t } } - if (First < Last) return Standard_True; - // 15.11.2002 PTV OCC966 - if (ShapeAnalysis_Curve::IsPeriodic(theCurve)) + if (ShapeAnalysis_Curve::IsPeriodic(theCurve)) { ElCLib::AdjustPeriodic(cf,cl,Precision::PConfusion(),First,Last); //:a7 abv 11 Feb 98: preci -> PConfusion() + } + else if (First < Last) { + // nothing to fix + } else if (theCurve->IsClosed()) { // 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 -- 2.39.5