From f62fe184cf2d322aa50353ea6e60f5eb91275eb2 Mon Sep 17 00:00:00 2001 From: nbv Date: Thu, 29 Nov 2018 10:02:14 +0300 Subject: [PATCH] Test for 0027976: Unstable work of 2d intersection algorithm for two lines 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. --- .../moddata_2 => lowalgos/2dinter}/bug23587 | 0 .../modalg_5 => lowalgos/2dinter}/bug23706_4 | 0 .../modalg_5 => lowalgos/2dinter}/bug23706_5 | 0 .../{bugs/step => lowalgos/2dinter}/bug24100 | 1 + .../moddata_3 => lowalgos/2dinter}/bug24800 | 0 .../modalg_6 => lowalgos/2dinter}/bug25593 | 0 .../moddata_3 => lowalgos/2dinter}/bug25876 | 0 .../modalg_6 => lowalgos/2dinter}/bug26099 | 0 tests/lowalgos/2dinter/bug27976 | 37 +++++++++++++++++++ .../modalg_7 => lowalgos/2dinter}/bug29162 | 0 .../moddata_2 => lowalgos/2dinter}/bug4426_1 | 0 .../moddata_2 => lowalgos/2dinter}/bug4426_2 | 0 12 files changed, 38 insertions(+) rename tests/{bugs/moddata_2 => lowalgos/2dinter}/bug23587 (100%) mode change 100755 => 100644 rename tests/{bugs/modalg_5 => lowalgos/2dinter}/bug23706_4 (100%) mode change 100755 => 100644 rename tests/{bugs/modalg_5 => lowalgos/2dinter}/bug23706_5 (100%) mode change 100755 => 100644 rename tests/{bugs/step => lowalgos/2dinter}/bug24100 (98%) rename tests/{bugs/moddata_3 => lowalgos/2dinter}/bug24800 (100%) mode change 100755 => 100644 rename tests/{bugs/modalg_6 => lowalgos/2dinter}/bug25593 (100%) mode change 100755 => 100644 rename tests/{bugs/moddata_3 => lowalgos/2dinter}/bug25876 (100%) mode change 100755 => 100644 rename tests/{bugs/modalg_6 => lowalgos/2dinter}/bug26099 (100%) create mode 100644 tests/lowalgos/2dinter/bug27976 rename tests/{bugs/modalg_7 => lowalgos/2dinter}/bug29162 (100%) rename tests/{bugs/moddata_2 => lowalgos/2dinter}/bug4426_1 (100%) mode change 100755 => 100644 rename tests/{bugs/moddata_2 => lowalgos/2dinter}/bug4426_2 (100%) mode change 100755 => 100644 diff --git a/tests/bugs/moddata_2/bug23587 b/tests/lowalgos/2dinter/bug23587 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/moddata_2/bug23587 rename to tests/lowalgos/2dinter/bug23587 diff --git a/tests/bugs/modalg_5/bug23706_4 b/tests/lowalgos/2dinter/bug23706_4 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/modalg_5/bug23706_4 rename to tests/lowalgos/2dinter/bug23706_4 diff --git a/tests/bugs/modalg_5/bug23706_5 b/tests/lowalgos/2dinter/bug23706_5 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/modalg_5/bug23706_5 rename to tests/lowalgos/2dinter/bug23706_5 diff --git a/tests/bugs/step/bug24100 b/tests/lowalgos/2dinter/bug24100 similarity index 98% rename from tests/bugs/step/bug24100 rename to tests/lowalgos/2dinter/bug24100 index 1df0bc3f54..c8b94cf373 100644 --- a/tests/bugs/step/bug24100 +++ b/tests/lowalgos/2dinter/bug24100 @@ -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 diff --git a/tests/bugs/moddata_3/bug24800 b/tests/lowalgos/2dinter/bug24800 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/moddata_3/bug24800 rename to tests/lowalgos/2dinter/bug24800 diff --git a/tests/bugs/modalg_6/bug25593 b/tests/lowalgos/2dinter/bug25593 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/modalg_6/bug25593 rename to tests/lowalgos/2dinter/bug25593 diff --git a/tests/bugs/moddata_3/bug25876 b/tests/lowalgos/2dinter/bug25876 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/moddata_3/bug25876 rename to tests/lowalgos/2dinter/bug25876 diff --git a/tests/bugs/modalg_6/bug26099 b/tests/lowalgos/2dinter/bug26099 similarity index 100% rename from tests/bugs/modalg_6/bug26099 rename to tests/lowalgos/2dinter/bug26099 diff --git a/tests/lowalgos/2dinter/bug27976 b/tests/lowalgos/2dinter/bug27976 new file mode 100644 index 0000000000..2c22e42023 --- /dev/null +++ b/tests/lowalgos/2dinter/bug27976 @@ -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" + } +} diff --git a/tests/bugs/modalg_7/bug29162 b/tests/lowalgos/2dinter/bug29162 similarity index 100% rename from tests/bugs/modalg_7/bug29162 rename to tests/lowalgos/2dinter/bug29162 diff --git a/tests/bugs/moddata_2/bug4426_1 b/tests/lowalgos/2dinter/bug4426_1 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/moddata_2/bug4426_1 rename to tests/lowalgos/2dinter/bug4426_1 diff --git a/tests/bugs/moddata_2/bug4426_2 b/tests/lowalgos/2dinter/bug4426_2 old mode 100755 new mode 100644 similarity index 100% rename from tests/bugs/moddata_2/bug4426_2 rename to tests/lowalgos/2dinter/bug4426_2 -- 2.39.5