0025019: Command "bsection" in Test Harness with flag build pcurve on second shape...
authoremv <emv@opencascade.com>
Thu, 26 Jun 2014 08:58:42 +0000 (12:58 +0400)
committerapn <apn@opencascade.com>
Thu, 26 Jun 2014 08:59:15 +0000 (12:59 +0400)
class IntTools_FaceFace
method
  void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
                                  const TopoDS_Face& aF2)
Change the approximation flags according to the order of faces.

Test case for issue CR25019

src/IntTools/IntTools_FaceFace.cxx
tests/bugs/modalg_5/bug25019 [new file with mode: 0755]

index f31df2a..b24b494 100644 (file)
@@ -553,6 +553,10 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
         aP2S.SetValue(aU2,aV2,aU1,aV1);
       }
     }
+    //
+    Standard_Boolean anAproxTmp = myApprox1;
+    myApprox1 = myApprox2;
+    myApprox2 = anAproxTmp;
   }
 
 
diff --git a/tests/bugs/modalg_5/bug25019 b/tests/bugs/modalg_5/bug25019
new file mode 100755 (executable)
index 0000000..baf5aa8
--- /dev/null
@@ -0,0 +1,60 @@
+puts "============"
+puts "OCC25019"
+puts "============"
+puts ""
+###############################
+## Command "bsection" in Test Harness with flag build pcurve on second shape works slowly.
+###############################
+
+restore [locate_data_file bug25019_a_shape_1.brep] a1
+restore [locate_data_file bug25019_prism.brep] p1
+
+# 1.
+dchrono h1 reset
+dchrono h1 start
+
+bsection r a1 p1 -n2d2
+
+dchrono h1 stop
+set q1 [dchrono h1 show]
+
+# 2.
+dchrono h2 reset
+dchrono h2 start
+
+bsection r a1 p1
+
+dchrono h2 stop
+set q2 [dchrono h2 show]
+
+#
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q1 full t1
+puts "$t1"
+if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
+   puts "OS = Windows NT"
+   set max_time1 5
+} else {
+   puts "OS = Linux"
+   set max_time1 5
+}
+if { $t1 > ${max_time1} } {                                         
+    puts "Elapsed time is more than ${max_time1} seconds - Faulty"
+} else {
+    puts "Elapsed time is less than ${max_time1} seconds - OK"
+}
+
+#
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full t2
+puts "$t2"
+if { [string compare $tcl_platform(platform) "windows"] == 0 }  {
+   puts "OS = Windows NT"
+   set max_time2 5
+} else {
+   puts "OS = Linux"
+   set max_time2 5
+}
+if { $t2 > ${max_time2} } {                                         
+    puts "Elapsed time is more than ${max_time2} seconds - Faulty"
+} else {
+    puts "Elapsed time is less than ${max_time2} seconds - OK"
+}