0027976: Unstable work of 2d intersection algorithm for two lines
authornbv <nbv@opencascade.com>
Thu, 29 Nov 2018 07:02:14 +0000 (10:02 +0300)
committerapn <apn@opencascade.com>
Fri, 21 Dec 2018 12:38:03 +0000 (15:38 +0300)
1. Test case for the issue has been created.
The problem is still reproduced on MASTER.

2. Some test cases have been moved to lowalgos/2dinter grid.

12 files changed:
tests/lowalgos/2dinter/bug23587 [moved from tests/bugs/moddata_2/bug23587 with 100% similarity, mode: 0644]
tests/lowalgos/2dinter/bug23706_4 [moved from tests/bugs/modalg_5/bug23706_4 with 100% similarity, mode: 0644]
tests/lowalgos/2dinter/bug23706_5 [moved from tests/bugs/modalg_5/bug23706_5 with 100% similarity, mode: 0644]
tests/lowalgos/2dinter/bug24100 [moved from tests/bugs/step/bug24100 with 98% similarity]
tests/lowalgos/2dinter/bug24800 [moved from tests/bugs/moddata_3/bug24800 with 100% similarity, mode: 0644]
tests/lowalgos/2dinter/bug25593 [moved from tests/bugs/modalg_6/bug25593 with 100% similarity, mode: 0644]
tests/lowalgos/2dinter/bug25876 [moved from tests/bugs/moddata_3/bug25876 with 100% similarity, mode: 0644]
tests/lowalgos/2dinter/bug26099 [moved from tests/bugs/modalg_6/bug26099 with 100% similarity]
tests/lowalgos/2dinter/bug27976 [new file with mode: 0644]
tests/lowalgos/2dinter/bug29162 [moved from tests/bugs/modalg_7/bug29162 with 100% similarity]
tests/lowalgos/2dinter/bug4426_1 [moved from tests/bugs/moddata_2/bug4426_1 with 100% similarity, mode: 0644]
tests/lowalgos/2dinter/bug4426_2 [moved from tests/bugs/moddata_2/bug4426_2 with 100% similarity, mode: 0644]

old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/moddata_2/bug23587
rename to tests/lowalgos/2dinter/bug23587
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/modalg_5/bug23706_4
rename to tests/lowalgos/2dinter/bug23706_4
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/modalg_5/bug23706_5
rename to tests/lowalgos/2dinter/bug23706_5
similarity index 98%
rename from tests/bugs/step/bug24100
rename to tests/lowalgos/2dinter/bug24100
index 1df0bc3..c8b94cf 100644 (file)
@@ -8,6 +8,7 @@ puts ""
 # Bad pcurve is built on a face while converting the shape from STEP format.
 ############################################################################
 
+pload XDE
 stepread [locate_data_file bug24100_REFLECT_CURVE_PART_5_SOL_ohne_Metadaten.stp] a *
 
 explode a_1 f
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/moddata_3/bug24800
rename to tests/lowalgos/2dinter/bug24800
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/modalg_6/bug25593
rename to tests/lowalgos/2dinter/bug25593
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/moddata_3/bug25876
rename to tests/lowalgos/2dinter/bug25876
diff --git a/tests/lowalgos/2dinter/bug27976 b/tests/lowalgos/2dinter/bug27976
new file mode 100644 (file)
index 0000000..2c22e42
--- /dev/null
@@ -0,0 +1,37 @@
+puts "========"
+puts "0027976: Unstable work of 2d intersection algorithm for two lines"
+puts "========"
+puts ""
+
+puts "TODO OCC27976 All: Error: wrong 2-th intersection result"
+
+set aRefPx 170.0
+set aRefPy 9620.0
+
+binrestore [locate_data_file bug27976_fe.bin] b
+explode b
+don b_1
+pcurve b_1
+
+smallview -2D-
+point p1 169.98949375765261 9619.9910661265931
+point p2 170.00862369283078 9620.0101960617721
+don p1 p2
+2dfit
+don b_1_4 b_1_5
+set log(1) [2dintersect b_1_4 b_1_5 -tol 1.e-10]
+checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png
+
+trim c2d b_1_5 9610 9610.0000006891
+don b_1_4 c2d
+set log(2) [2dintersect b_1_4 c2d -tol 1.e-10]
+checkview -screenshot -2d -path ${imagedir}/${test_image}_2.png
+
+for {set i 1} {$i <= 2} {incr i} {
+  if { [regexp {Intersection point 1 : ([-0-9.+eE]+) ([-0-9.+eE]+)} $log($i) full cx($i) cy($i)] } {
+    set aDist($i) [2ddistpp $aRefPx $aRefPy $cx($i) $cy($i)]
+    checkreal Distance $aDist($i) 0.0 1.e-6 0.0
+  } else {
+    puts "Error: wrong $i-th intersection result"
+  }
+}
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/moddata_2/bug4426_1
rename to tests/lowalgos/2dinter/bug4426_1
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/moddata_2/bug4426_2
rename to tests/lowalgos/2dinter/bug4426_2