From 963532f8a2c5d8f42154fdc6c426380b88f326fd Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 16 Sep 2014 10:28:27 +0400 Subject: [PATCH] 0024504: Wrong result obtained by Exterma Curve/Curve. Test case added. --- tests/bugs/modalg_5/bug24504 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/bugs/modalg_5/bug24504 diff --git a/tests/bugs/modalg_5/bug24504 b/tests/bugs/modalg_5/bug24504 new file mode 100644 index 0000000000..5426c48ba3 --- /dev/null +++ b/tests/bugs/modalg_5/bug24504 @@ -0,0 +1,26 @@ +puts "==========" +puts "OCC24504" +puts "==========" +puts "" +################################################ +# Wrong result obtained by Extrema Curve/Curve +################################################ + +restore [locate_data_file bug24504_c1] c1 +restore [locate_data_file bug24504_c2] c2 + +trim c1t c1 1435.4903148955743 1484.9899809123547 +trim c2t c2 2590.8671336821694 4503.5062290971819 + +if { [llength [extrema c1t c2t]] != 1 } { + puts "Error: expected only one line as result of extrema!" +} + +# Distance check +set info [dump ext_1] +regexp "Parameters : 0 +(\[-0-9*\.+eE\]+)" $info full extLength +if {$extLength > 1e-12 } { + puts "Error: bad distance points obtained" +} else { + puts "OK: good distance between obtained points " +}