From 4d0a8084c7a0dd70a12415b9b1ae7b6d77a335bd Mon Sep 17 00:00:00 2001 From: mkv Date: Tue, 15 Dec 2015 14:53:18 +0300 Subject: [PATCH] Test cases for CR24694 --- tests/bugs/modalg_6/bug24694_1 | 38 ++++++++++++++++++++++++++++++++++ tests/bugs/modalg_6/bug24694_2 | 36 ++++++++++++++++++++++++++++++++ tests/bugs/modalg_6/bug24694_3 | 23 ++++++++++++++++++++ tests/bugs/modalg_6/bug24694_4 | 23 ++++++++++++++++++++ tests/bugs/modalg_6/bug24694_5 | 25 ++++++++++++++++++++++ tests/bugs/modalg_6/bug24694_6 | 25 ++++++++++++++++++++++ tests/bugs/modalg_6/bug24694_7 | 28 +++++++++++++++++++++++++ 7 files changed, 198 insertions(+) create mode 100644 tests/bugs/modalg_6/bug24694_1 create mode 100644 tests/bugs/modalg_6/bug24694_2 create mode 100644 tests/bugs/modalg_6/bug24694_3 create mode 100644 tests/bugs/modalg_6/bug24694_4 create mode 100644 tests/bugs/modalg_6/bug24694_5 create mode 100644 tests/bugs/modalg_6/bug24694_6 create mode 100644 tests/bugs/modalg_6/bug24694_7 diff --git a/tests/bugs/modalg_6/bug24694_1 b/tests/bugs/modalg_6/bug24694_1 new file mode 100644 index 0000000000..3e8f394c96 --- /dev/null +++ b/tests/bugs/modalg_6/bug24694_1 @@ -0,0 +1,38 @@ +puts "========" +puts "OCC24694" +puts "========" +puts "" +############################################################################ +# Wrong processing of two surfaces (implicit and parametric) having tangential intersection: it is not found by intersector +############################################################################ + +cylinder cc 300 -200 0 0 1 0 1 0 0 100 +torus tt 0 0 0 0 0 1 -1 0 0 300 100 +trimv tcc cc -200 600 + +convert s2 tt + +mkface f1 tcc +mkface f2 s2 + +bop f1 f2 +bopfuse result + +checkarea result 1.68947e+06 0.01 0.01 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 8 + EDGE : 16 + WIRE : 10 + FACE : 10 + SHELL : 0 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 45 +" + +checknbshapes result -ref ${nbshapes_expected} -t -m "Result obtained by processing of two surfaces having tangential intersection" + +set 3dviewer 1 diff --git a/tests/bugs/modalg_6/bug24694_2 b/tests/bugs/modalg_6/bug24694_2 new file mode 100644 index 0000000000..1e8436b3da --- /dev/null +++ b/tests/bugs/modalg_6/bug24694_2 @@ -0,0 +1,36 @@ +puts "========" +puts "OCC24694" +puts "========" +puts "" +############################################################################ +# Wrong processing of two surfaces (implicit and parametric) having tangential intersection: it is not found by intersector +############################################################################ + +restore [locate_data_file bug23046_s10] s1 +restore [locate_data_file bug23046_s13] s2 + +trimv ts1 s1 -200 600 +mkface f1 ts1 +mkface f2 s2 + +bop f1 f2 +bopfuse result + +checkarea result 1.68701e+06 0.01 0.01 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 8 + EDGE : 16 + WIRE : 10 + FACE : 10 + SHELL : 0 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 45 +" + +checknbshapes result -ref ${nbshapes_expected} -t -m "Result obtained by processing of two surfaces having tangential intersection" + +set 3dviewer 1 diff --git a/tests/bugs/modalg_6/bug24694_3 b/tests/bugs/modalg_6/bug24694_3 new file mode 100644 index 0000000000..cca50df20e --- /dev/null +++ b/tests/bugs/modalg_6/bug24694_3 @@ -0,0 +1,23 @@ +puts "========" +puts "OCC24694" +puts "========" +puts "" +############################################################################ +# Wrong processing of two surfaces (implicit and parametric) having tangential intersection: it is not found by intersector +############################################################################ + +restore [locate_data_file bug23046_s11] s1 +restore [locate_data_file bug23046_s13] s2 + +set CurveNumb [intersect i s1 s2] + +if { [llength ${CurveNumb}] != 7 } { + puts "Error : Bad Result obtained by processing of two surfaces having tangential intersection" +} else { + puts "OK : Good Result obtained by processing of two surfaces having tangential intersection" +} + +smallview +fit + +set only_screen_axo 1 diff --git a/tests/bugs/modalg_6/bug24694_4 b/tests/bugs/modalg_6/bug24694_4 new file mode 100644 index 0000000000..8bd1a451ac --- /dev/null +++ b/tests/bugs/modalg_6/bug24694_4 @@ -0,0 +1,23 @@ +puts "========" +puts "OCC24694" +puts "========" +puts "" +############################################################################ +# Wrong processing of two surfaces (implicit and parametric) having tangential intersection: it is not found by intersector +############################################################################ + +restore [locate_data_file bug23046_s11] s1 +restore [locate_data_file bug23046_s17] s2 + +set CurveNumb [intersect i s1 s2] + +if { [llength ${CurveNumb}] != 7 } { + puts "Error : Bad Result obtained by processing of two surfaces having tangential intersection" +} else { + puts "OK : Good Result obtained by processing of two surfaces having tangential intersection" +} + +smallview +fit + +set only_screen_axo 1 diff --git a/tests/bugs/modalg_6/bug24694_5 b/tests/bugs/modalg_6/bug24694_5 new file mode 100644 index 0000000000..4af321aa90 --- /dev/null +++ b/tests/bugs/modalg_6/bug24694_5 @@ -0,0 +1,25 @@ +puts "========" +puts "OCC24694" +puts "========" +puts "" +############################################################################ +# Wrong processing of two surfaces (implicit and parametric) having tangential intersection: it is not found by intersector +############################################################################ + +restore [locate_data_file bug23046_s20] s1 +restore [locate_data_file bug23046_s23] s2 + +smallview +donly s2 +fit +display s1 + +set CurveNumb [intersect i s1 s2] + +if { [llength ${CurveNumb}] != 1 } { + puts "Error : Bad Result obtained by processing of two surfaces having tangential intersection" +} else { + puts "OK : Good Result obtained by processing of two surfaces having tangential intersection" +} + +set only_screen_axo 1 diff --git a/tests/bugs/modalg_6/bug24694_6 b/tests/bugs/modalg_6/bug24694_6 new file mode 100644 index 0000000000..e6b00bfceb --- /dev/null +++ b/tests/bugs/modalg_6/bug24694_6 @@ -0,0 +1,25 @@ +puts "========" +puts "OCC24694" +puts "========" +puts "" +############################################################################ +# Wrong processing of two surfaces (implicit and parametric) having tangential intersection: it is not found by intersector +############################################################################ + +restore [locate_data_file bug23046_s22] s1 +restore [locate_data_file bug23046_s21] s2 + +smallview +donly s1 +fit +display s2 + +set CurveNumb [intersect i s1 s2] + +if { [llength ${CurveNumb}] != 1 } { + puts "Error : Bad Result obtained by processing of two surfaces having tangential intersection" +} else { + puts "OK : Good Result obtained by processing of two surfaces having tangential intersection" +} + +set only_screen_axo 1 diff --git a/tests/bugs/modalg_6/bug24694_7 b/tests/bugs/modalg_6/bug24694_7 new file mode 100644 index 0000000000..0139c23485 --- /dev/null +++ b/tests/bugs/modalg_6/bug24694_7 @@ -0,0 +1,28 @@ +puts "========" +puts "OCC24694" +puts "========" +puts "" +############################################################################ +# Wrong processing of two surfaces (implicit and parametric) having tangential intersection: it is not found by intersector +############################################################################ + +cylinder cc 10 +trimv tcc cc -20 20 +sphere ss 10 +convert s2 ss +clpoles s2 +nbiso s2 10 10 + +smallview +donly tcc s2 +fit + +set CurveNumb [intersect i tcc s2] + +if { [llength ${CurveNumb}] != 1 } { + puts "Error : Bad Result obtained by processing of two surfaces having tangential intersection" +} else { + puts "OK : Good Result obtained by processing of two surfaces having tangential intersection" +} + +set only_screen_axo 1 -- 2.39.5