From c15398ab70fd53a459686c29bdbd62c1083ed9d6 Mon Sep 17 00:00:00 2001 From: Roman Lygin Date: Thu, 23 May 2013 14:52:21 +0400 Subject: [PATCH] 239343: OCC fails to work with offset surfaces with singularities Add test cases for this fix --- src/Geom/Geom_OsculatingSurface.cxx | 32 ++++++++++----------- src/ShapeAnalysis/ShapeAnalysis_Surface.cxx | 11 +++++-- tests/bugs/moddata_3/bug23943_1 | 28 ++++++++++++++++++ tests/bugs/moddata_3/bug23943_2 | 28 ++++++++++++++++++ tests/bugs/moddata_3/bug23943_3 | 13 +++++++++ tests/bugs/moddata_3/bug23943_4 | 13 +++++++++ 6 files changed, 106 insertions(+), 19 deletions(-) create mode 100755 tests/bugs/moddata_3/bug23943_1 create mode 100755 tests/bugs/moddata_3/bug23943_2 create mode 100755 tests/bugs/moddata_3/bug23943_3 create mode 100755 tests/bugs/moddata_3/bug23943_4 diff --git a/src/Geom/Geom_OsculatingSurface.cxx b/src/Geom/Geom_OsculatingSurface.cxx index 5cc6f50a32..a358db9d3b 100755 --- a/src/Geom/Geom_OsculatingSurface.cxx +++ b/src/Geom/Geom_OsculatingSurface.cxx @@ -62,7 +62,7 @@ void Geom_OsculatingSurface::Init(const Handle(Geom_Surface)& BS, { ClearOsculFlags(); myTol=Tol; - Standard_Real TolMin=1.e-12; + Standard_Real TolMin=0.;//consider all singularities below Tol, not just above 1.e-12 (id23943) Standard_Boolean OsculSurf = Standard_True; myBasisSurf = Handle(Geom_Surface)::DownCast(BS->Copy()); myOsculSurf1 = new Geom_HSequenceOfBSplineSurface(); @@ -78,7 +78,7 @@ void Geom_OsculatingSurface::Init(const Handle(Geom_Surface)& BS, myAlong.SetValue(2,IsQPunctual(BS,V2,GeomAbs_IsoV,TolMin,Tol)); myAlong.SetValue(3,IsQPunctual(BS,U1,GeomAbs_IsoU,TolMin,Tol)); myAlong.SetValue(4,IsQPunctual(BS,U2,GeomAbs_IsoU,TolMin,Tol)); -#ifdef DEB +#if defined(DEB) && defined(OCCT_DEVELOPMENT) cout<UDegree()<VDegree()<VDegree(); if( (IsAlongU() && vdeg <=1) || (IsAlongV() && udeg <=1)) { -#ifdef DEB +#if defined(DEB) && defined(OCCT_DEVELOPMENT) cout<<" surface osculatrice nulle "<>>>>>>>>>> AlongU"<>>>>>>>>>> AlongV"<