From 416d012709be8aa7529bb95cbe01862aaf8f3acc Mon Sep 17 00:00:00 2001 From: Roman Lygin Date: Fri, 31 May 2013 16:58:07 +0400 Subject: [PATCH] 0023944: Typo in ShapeCustom_RestrictionParameters leading to wrong approximation results Add test case for this fix --- .../ShapeCustom_RestrictionParameters.cxx | 4 +-- tests/bugs/heal/bug23944 | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 tests/bugs/heal/bug23944 diff --git a/src/ShapeCustom/ShapeCustom_RestrictionParameters.cxx b/src/ShapeCustom/ShapeCustom_RestrictionParameters.cxx index 0033a18e5a..481df18503 100755 --- a/src/ShapeCustom/ShapeCustom_RestrictionParameters.cxx +++ b/src/ShapeCustom/ShapeCustom_RestrictionParameters.cxx @@ -28,8 +28,8 @@ ShapeCustom_RestrictionParameters::ShapeCustom_RestrictionParameters() { - myGMaxSeg = 15; - myGMaxDegree = 10000; + myGMaxSeg = 10000; + myGMaxDegree = 15; myConvPlane = Standard_False; //myConvElementarySurf = Standard_False; diff --git a/tests/bugs/heal/bug23944 b/tests/bugs/heal/bug23944 new file mode 100755 index 0000000000..fc92baad9f --- /dev/null +++ b/tests/bugs/heal/bug23944 @@ -0,0 +1,27 @@ +puts "============" +puts "OCC23944" +puts "============" +puts "" +################################################### +## Typo in ShapeCustom_RestrictionParameters leading to wrong approximation results +################################################### + +set BugNumber OCC23944 + +restore [locate_data_file bug23944_s.brep] s + +mkface f s + +set info [bsplres result f 1e-4 1e-9 15 100 C1 C2 0 1] + +# Resume +puts "" +if { [regexp {Debug mode} [dversion]] } { + if { [regexp {Surface is aproximated with continuity 0} $info] } { + puts "OK ${BugNumber}" + } else { + puts "Faulty ${BugNumber}" + } +} else { + puts "Test for debug mode only" +}