0023944: Typo in ShapeCustom_RestrictionParameters leading to wrong approximation...
authorRoman Lygin <roman.lygin@gmail.com>
Fri, 31 May 2013 12:58:07 +0000 (16:58 +0400)
committerRoman Lygin <roman.lygin@gmail.com>
Fri, 31 May 2013 12:58:07 +0000 (16:58 +0400)
Add test case for this fix

src/ShapeCustom/ShapeCustom_RestrictionParameters.cxx
tests/bugs/heal/bug23944 [new file with mode: 0755]

index 0033a18..481df18 100755 (executable)
@@ -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 (executable)
index 0000000..fc92baa
--- /dev/null
@@ -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"
+}