From 3425e83f4b01fcbbac16ed226f8f104a0032bcd8 Mon Sep 17 00:00:00 2001 From: AndreiLA Date: Thu, 17 Mar 2022 15:10:01 +0300 Subject: [PATCH] 0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces The tests are added to verify the correctness of the projection algorithm's work in two cases. --- tests/bugs/modalg_5/bug23820_1 | 24 ++++++++++++++++++++++++ tests/bugs/modalg_5/bug23820_2 | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 tests/bugs/modalg_5/bug23820_1 create mode 100644 tests/bugs/modalg_5/bug23820_2 diff --git a/tests/bugs/modalg_5/bug23820_1 b/tests/bugs/modalg_5/bug23820_1 new file mode 100644 index 0000000000..071ab360b9 --- /dev/null +++ b/tests/bugs/modalg_5/bug23820_1 @@ -0,0 +1,24 @@ + +############################################################# +## OCC23820: Test of the wire projection on the complicated +## shell of several faces without parameter +############################################################# + +pload MODELING + +vertex v1 297.706909179688 19.969066619873 9.07486343383789 +vertex v2 282.750762939453 24.8436107635498 6.85506725311279 +vertex v3 284.397491455078 7.2792820930481 -0.00160308415070176 +vertex v4 301.926666259766 5.67953395843506 0.0583421923220158 +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v4 +edge e4 v4 v1 +wire w e1 e2 e3 e4 + +restore [locate_data_file bug23820_non_planar.brep] shell + +nproject result w shell + +checknbshapes result -vertex 24 -edge 14 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 39 +checkprops result -l 83.0174 diff --git a/tests/bugs/modalg_5/bug23820_2 b/tests/bugs/modalg_5/bug23820_2 new file mode 100644 index 0000000000..76a59c1fd9 --- /dev/null +++ b/tests/bugs/modalg_5/bug23820_2 @@ -0,0 +1,24 @@ + +############################################################# +## OCC23820: Test of the wire projection on the complicated +## shell of several faces with a certain parameter +############################################################# + +pload MODELING + +vertex v1 297.706909179688 19.969066619873 9.07486343383789 +vertex v2 282.750762939453 24.8436107635498 6.85506725311279 +vertex v3 284.397491455078 7.2792820930481 -0.00160308415070176 +vertex v4 301.926666259766 5.67953395843506 0.0583421923220158 +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v4 +edge e4 v4 v1 +wire w e1 e2 e3 e4 + +restore [locate_data_file bug23820_non_planar.brep] shell + +nproject result w shell -d 2.0 + +checknbshapes result -vertex 12 -edge 6 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 19 +checkprops result -l 73.9585