From 924bfdf2c3fed4949321a679d89e3e36435070d6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 9 Jan 2025 14:00:52 +0000 Subject: [PATCH 1/3] PMP: Slow compute_vertex_normal() --- .../Polygon_mesh_processing/CMakeLists.txt | 1 + .../data/slow_compute_normal.off | 1202 +++++++++++++++++ .../slow_compute_normal.cpp | 39 + 3 files changed, 1242 insertions(+) create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data/slow_compute_normal.off create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/slow_compute_normal.cpp diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 44b52f55548..08c24f62177 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -7,6 +7,7 @@ project(Polygon_mesh_processing_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS Core) +create_single_source_cgal_program("slow_compute_normal.cpp") create_single_source_cgal_program("test_pmp_triangle.cpp") create_single_source_cgal_program("test_hausdorff_bounded_error_distance.cpp") create_single_source_cgal_program("test_pmp_read_polygon_mesh.cpp") diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data/slow_compute_normal.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/slow_compute_normal.off new file mode 100644 index 00000000000..5c09e19ef8f --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/data/slow_compute_normal.off @@ -0,0 +1,1202 @@ +OFF +600 598 0 + +-103.33809661865234 -9.7869815826416016 -40 +-103.33809661865234 -71.779998779296875 -40 +-103.33809661865234 -72.139999389648438 -40 +-103.33809661865234 -44.599998474121094 -40 +-103.33809661865234 11.718429565429688 -40 +-103.33809661865234 5.2999997138977051 -40 +-103.33809661865234 -24.547355651855469 -40 +-103.33809661865234 -46.799999237060547 -40 +-103.33809661865234 -72.400001525878906 -40 +-103.33809661865234 -24.420000076293945 -40 +-103.33809661865234 2.4800000190734863 -40 +-103.33809661865234 8.5199995040893555 -40 +-103.33809661865234 -24.119998931884766 -40 +-103.33809661865234 -72.760002136230469 -40 +-103.33809661865234 -50.746982574462891 -40 +-103.33809661865234 -29.214235305786133 -40 +-103.33809661865234 -63.799999237060547 -40 +-103.33809661865234 -73.05999755859375 -40 +-103.33809661865234 -23.613948822021484 -40 +-103.33809661865234 5.0399999618530273 -40 +-103.33809661865234 -73.419998168945312 -40 +-103.33809661865234 -23.5 -40 +-103.33809661865234 4.679999828338623 -40 +-103.33809661865234 -50.486980438232422 -40 +-103.33809661865234 -15.819999694824219 -40 +-103.33809661865234 -41.05999755859375 -40 +-103.33809661865234 -50.126979827880859 -40 +-103.33809661865234 -23.139999389648438 -40 +-103.33809661865234 -18.639999389648438 -40 +-103.33809661865234 -45.259998321533203 -40 +-103.33809661865234 -16.079999923706055 -40 +-103.33809661865234 -73.680000305175781 -40 +-103.33809661865234 -22.680595397949219 -40 +-103.33809661865234 -74.040000915527344 -40 +-103.33809661865234 -46.539997100830078 -40 +-103.33809661865234 -22.479999542236328 -40 +-103.33809661865234 -64.099998474121094 -40 +-103.33809661865234 4.380000114440918 -40 +-103.33809661865234 4.0199999809265137 -40 +-103.33809661865234 -49.826980590820312 -40 +-103.33809661865234 -22.219999313354492 -40 +-103.33809661865234 -47.159999847412109 -40 +-103.33809661865234 -16.739999771118164 -40 +-103.33809661865234 -49.46697998046875 -40 +-103.33809661865234 -27.959999084472656 -40 +-103.33809661865234 -49.206981658935547 -40 +-103.33809661865234 -21.747188568115234 -40 +-103.33809661865234 10.159999847412109 -40 +-103.33809661865234 -17.08030891418457 -40 +-103.33809661865234 -21.559999465942383 -40 +-103.33809661865234 -41.348213195800781 -40 +-103.33809661865234 -64.459999084472656 -40 +-103.33809661865234 1.1999999284744263 -40 +-103.33809661865234 -57.039997100830078 -40 +-103.33809661865234 -20.813833236694336 -40 +-103.33809661865234 -31.799999237060547 -40 +-103.33809661865234 -74.339996337890625 -40 +-103.33809661865234 12.059999465942383 -40 +-103.33809661865234 -74.699996948242188 -40 +-103.33809661865234 -36.681282043457031 -40 +-103.33809661865234 3.7599999904632568 -40 +103.33809661865234 88.099998474121094 -90 +-103.33809661865234 1.8199999332427979 -40 +-103.33809661865234 3.3999998569488525 -40 +-103.33809661865234 -42.040000915527344 -40 +-103.33809661865234 -12.899999618530273 -40 +-103.33809661865234 -47.459999084472656 -40 +-103.33809661865234 -48.846981048583984 -40 +-103.33809661865234 -51 -40 +-103.33809661865234 -20.579999923706055 -40 +-103.33809661865234 15.539999961853027 -40 +-103.33809661865234 -48.546981811523438 -40 +-103.33809661865234 -36.55999755859375 -40 +-103.33809661865234 -19.880426406860352 -40 +-103.33809661865234 -51.299999237060547 -40 +-103.33809661865234 -48.186981201171875 -40 +-103.33809661865234 -19.659999847412109 -40 +-103.33809661865234 -25.039999008178711 -40 +-103.33809661865234 -57.699996948242188 -40 +-103.33809661865234 -36.299999237060547 -40 +-103.33809661865234 -56.779998779296875 -40 +-103.33809661865234 -18.947071075439453 -40 +-103.33809661865234 -50.639999389648438 -40 +-103.33809661865234 -0.71999996900558472 -40 +-103.33809661865234 -28.260000228881836 -40 +-103.33809661865234 -74.959999084472656 -40 +-103.33809661865234 -47.926982879638672 -40 +-103.33809661865234 1.4599999189376831 -40 +-103.33809661865234 -47.566982269287109 -40 +-103.33809661865234 -47.819999694824219 -40 +-103.33809661865234 -47.266983032226562 -40 +-103.33809661865234 -12.413379669189453 -40 +-103.33809661865234 -75.319999694824219 -40 +-103.33809661865234 -1.3799999952316284 -40 +-103.33809661865234 12.719999313354492 -40 +-103.33809661865234 -30.819999694824219 -40 +-103.33809661865234 16.385309219360352 -40 +-103.33809661865234 8.880000114440918 -40 +-103.33809661865234 12.979999542236328 -40 +-103.33809661865234 -35.279998779296875 -40 +-103.33809661865234 -64.720001220703125 -40 +-103.33809661865234 -7.4800000190734863 -40 +-103.33809661865234 -1.7400000095367432 -40 +-103.33809661865234 -46.906982421875 -40 +-103.33809661865234 -46.646980285644531 -40 +-103.33809661865234 -75.6199951171875 -40 +-103.33809661865234 -75.979995727539062 -40 +-103.33809661865234 -46.286979675292969 -40 +-103.33809661865234 -45.986980438232422 -40 +-103.33809661865234 -48.079998016357422 -40 +-103.33809661865234 -45.626979827880859 -40 +-103.33809661865234 -45.366981506347656 -40 +-103.33809661865234 -46.180000305175781 -40 +-103.33809661865234 -65.080001831054688 -40 +-103.33809661865234 -45.006980895996094 -40 +-103.33809661865234 -12.239999771118164 -40 +-103.33809661865234 -2 -40 +-103.33809661865234 -75.066978454589844 -40 +-103.33809661865234 -74.806983947753906 -40 +-103.33809661865234 -44.706981658935547 -40 +-103.33809661865234 -44.346981048583984 -40 +-103.33809661865234 -7.7799997329711914 -40 +-103.33809661865234 -44.086982727050781 -40 +-103.33809661865234 -43.726982116699219 -40 +-103.33809661865234 -8.1399993896484375 -40 +-103.33809661865234 -2.3599998950958252 -40 +-103.33809661865234 -76.239997863769531 -40 +-103.33809661865234 -43.066982269287109 -40 +-103.33809661865234 -42.806980133056641 -40 +-103.33809661865234 -54.219997406005859 -40 +-103.33809661865234 -42.146980285644531 -40 +-103.33809661865234 -65.379997253417969 -40 +-103.33809661865234 -48.439998626708984 -40 +-103.33809661865234 -76.599998474121094 -40 +-103.33809661865234 -44.239997863769531 -40 +-103.33809661865234 -41.166980743408203 -40 +-103.33809661865234 -53.55999755859375 -40 +-103.33809661865234 -76.900001525878906 -40 +-103.33809661865234 -40.866981506347656 -40 +-103.33809661865234 -26.979999542236328 -40 +-103.33809661865234 -65.739997863769531 -40 +-103.33809661865234 -40.246982574462891 -40 +-103.33809661865234 -74.446983337402344 -40 +-103.33809661865234 -39.919857025146484 -40 +-103.33809661865234 -77.259994506835938 -40 +-103.33809661865234 -53.199996948242188 -40 +-103.33809661865234 2.119999885559082 -40 +-103.33809661865234 -39.226982116699219 -40 +-103.33809661865234 -77.519996643066406 -40 +-103.33809661865234 -77.879997253417969 -40 +-103.33809661865234 -38.9864501953125 -40 +-103.33809661865234 -18.013666152954102 -40 +-103.33809661865234 -38.306980133056641 -40 +-103.33809661865234 16.559999465942383 -40 +-103.33809661865234 -66 -40 +-103.33809661865234 -2.6599998474121094 -40 +-103.33809661865234 -38.053092956542969 -40 +-103.33809661865234 -74.146980285644531 -40 +-103.33809661865234 -37.326980590820312 -40 +103.33809661865234 -88.099998474121094 -40 +-103.33809661865234 -3.0199999809265137 -40 +-103.33809661865234 -78.180000305175781 -40 +-103.33809661865234 -37.11968994140625 -40 +-103.33809661865234 -78.540000915527344 -40 +-103.33809661865234 -36.666980743408203 -40 +-103.33809661865234 8.2200002670288086 -40 +-103.33809661865234 14.619999885559082 -40 +-103.33809661865234 -66.360000610351562 -40 +-103.33809661865234 -36.406982421875 -40 +-103.33809661865234 -36.186336517333984 -40 +-103.33809661865234 -8.3999996185302734 -40 +-103.33809661865234 -35.746982574462891 -40 +-103.33809661865234 -78.799995422363281 -40 +-103.33809661865234 -73.786979675292969 -40 +-103.33809661865234 -58.05999755859375 -40 +-103.33809661865234 -35.386981964111328 -40 +-103.33809661865234 -48.739997863769531 -40 +-103.33809661865234 -28.879999160766602 -40 +-103.33809661865234 -35.2529296875 -40 +-103.33809661865234 -79.159996032714844 -40 +-103.33809661865234 -3.2799999713897705 -40 +-103.33809661865234 -34.766983032226562 -40 +-103.33809661865234 -8.7600002288818359 -40 +-103.33809661865234 -73.5269775390625 -40 +-103.33809661865234 -3.6399998664855957 -40 +-103.33809661865234 -34.46697998046875 -40 +-103.33809661865234 -71.479995727539062 -40 +-103.33809661865234 -32.947761535644531 -40 +-103.33809661865234 -34.319572448730469 -40 +-103.33809661865234 -73.166984558105469 -40 +-103.33809661865234 -33.739997863769531 -40 +-103.33809661865234 -79.459999084472656 -40 +-103.33809661865234 -33.846981048583984 -40 +-103.33809661865234 -72.866981506347656 -40 +-103.33809661865234 -9.0599994659423828 -40 +-103.33809661865234 -33.486980438232422 -40 +-103.33809661865234 -79.819999694824219 -40 +-103.33809661865234 -33.88116455078125 -40 +-103.33809661865234 -17.719999313354492 -40 +-103.33809661865234 -32.826980590820312 -40 +-103.33809661865234 -3.9399998188018799 -40 +-103.33809661865234 -72.506980895996094 -40 +-103.33809661865234 -32.566982269287109 -40 +-103.33809661865234 -9.4200000762939453 -40 +-103.33809661865234 -4.2999997138977051 -40 +-103.33809661865234 -32.452808380126953 -40 +-103.33809661865234 -80.080001831054688 -40 +-103.33809661865234 -80.439994812011719 -40 +-103.33809661865234 -49.099998474121094 -40 +-103.33809661865234 -31.906982421875 -40 +-103.33809661865234 -72.246978759765625 -40 +-103.33809661865234 -6.8599996566772461 -40 +-103.33809661865234 -31.546981811523438 -40 +-103.33809661865234 -4.559999942779541 -40 +-103.33809661865234 -71.886978149414062 -40 +-103.33809661865234 -30.926980972290039 -40 +-103.33809661865234 -9.6799993515014648 -40 +-103.33809661865234 -30.626981735229492 -40 +-103.33809661865234 -4.9200000762939453 -40 +-103.33809661865234 -80.739997863769531 -40 +-103.33809661865234 -10.039999961853027 -40 +-103.33809661865234 -30.006980895996094 -40 +-103.33809661865234 -71.586982727050781 -40 +-103.33809661865234 -29.652643203735352 -40 +-103.33809661865234 -71.226982116699219 -40 +-103.33809661865234 -81.099998474121094 -40 +-103.33809661865234 -28.986982345581055 -40 +-103.33809661865234 -5.2199997901916504 -40 +-103.33809661865234 -28.726982116699219 -40 +-103.33809661865234 -81.360000610351562 -40 +-103.33809661865234 -81.720001220703125 -40 +-103.33809661865234 -5.5799999237060547 -40 +-103.33809661865234 -28.066982269287109 -40 +-103.33809661865234 -70.96697998046875 -40 +-103.33809661865234 13.639999389648438 -40 +-103.33809661865234 -27.785881042480469 -40 +-103.33809661865234 -49.360000610351562 -40 +-103.33809661865234 -10.340000152587891 -40 +-103.33809661865234 -38.5 -40 +-103.33809661865234 -27.086982727050781 -40 +-103.33809661865234 5.9600000381469727 -40 +-103.33809661865234 -5.8399996757507324 -40 +-103.33809661865234 -26.852523803710938 -40 +-103.33809661865234 -70.606979370117188 -40 +-103.33809661865234 -10.54661750793457 -40 +-103.33809661865234 -26.166982650756836 -40 +-103.33809661865234 -6.1999998092651367 -40 +-103.33809661865234 -32.719997406005859 -40 +-103.33809661865234 -70.306983947753906 -40 +-103.33809661865234 -82.019996643066406 -40 +-103.33809661865234 -26.059999465942383 -40 +-103.33809661865234 -56.419998168945312 -40 +-103.33809661865234 -71.1199951171875 -40 +-103.33809661865234 -69.946983337402344 -40 +-103.33809661865234 -69.686981201171875 -40 +-103.33809661865234 -43.979999542236328 -40 +-103.33809661865234 -38.200000762939453 -40 +-103.33809661865234 -34.360000610351562 -40 +-103.33809661865234 -82.379997253417969 -40 +-103.33809661865234 -69.326980590820312 -40 +-103.33809661865234 2.7400000095367432 -40 +-103.33809661865234 -69.0269775390625 -40 +-103.33809661865234 -32.459999084472656 -40 +-103.33809661865234 -0.079999998211860657 -40 +-103.33809661865234 6.3199996948242188 -40 +-103.33809661865234 -34.659999847412109 -40 +-103.33809661865234 -52.939998626708984 -40 +-103.33809661865234 3.0999999046325684 -40 +-103.33809661865234 -82.639999389648438 -40 +-103.33809661865234 -6.5 -40 +-103.33809661865234 -1.0799999237060547 -40 +-103.33809661865234 -56.119998931884766 -40 +-103.33809661865234 -68.666984558105469 -40 +-103.33809661865234 -68.406982421875 -40 +-103.33809661865234 9.8000001907348633 -40 +-103.33809661865234 -83 -40 +-103.33809661865234 7.5999999046325684 -40 +-103.33809661865234 -35.639999389648438 -40 +-103.33809661865234 -68.046981811523438 -40 +-103.33809661865234 -49.719997406005859 -40 +-103.33809661865234 -58.319999694824219 -40 +-103.33809661865234 -83.299995422363281 -40 +-103.33809661865234 -7.119999885559082 -40 +-103.33809661865234 -67.746978759765625 -40 +-103.33809661865234 -67.386978149414062 -40 +-103.33809661865234 -83.659996032714844 -40 +-103.33809661865234 -67.126983642578125 -40 +-103.33809661865234 -55.759998321533203 -40 +-103.33809661865234 -25.919118881225586 -40 +-103.33809661865234 -58.680000305175781 -40 +-103.33809661865234 -66.766983032226562 -40 +-103.33809661865234 -66.46697998046875 -40 +-103.33809661865234 -66.106979370117188 -40 +-103.33809661865234 -35.747928619384766 -40 +-103.33809661865234 -55.5 -40 +-103.33809661865234 -65.846977233886719 -40 +-103.33809661865234 -65.486984252929688 -40 +-103.33809661865234 -65.186981201171875 -40 +-103.33809661865234 -55.139999389648438 -40 +-103.33809661865234 -83.919998168945312 -40 +-103.33809661865234 14.920000076293945 -40 +-103.33809661865234 -64.826980590820312 -40 +-103.33809661865234 -64.566978454589844 -40 +-103.33809661865234 -64.206977844238281 -40 +-103.33809661865234 -58.979999542236328 -40 +-103.33809661865234 -54.840000152587891 -40 +-103.33809661865234 -63.906982421875 -40 +-103.33809661865234 -29.899999618530273 -40 +-103.33809661865234 -63.546981811523438 -40 +-103.33809661865234 5.6599998474121094 -40 +-103.33809661865234 7.2399997711181641 -40 +-103.33809661865234 -63.286979675292969 -40 +-103.33809661865234 -59.340000152587891 -40 +-103.33809661865234 -84.279998779296875 -40 +-103.33809661865234 -15.159999847412109 -40 +-103.33809661865234 -62.926982879638672 -40 +-103.33809661865234 -41.786979675292969 -40 +-103.33809661865234 6.940000057220459 -40 +-103.33809661865234 -25.146982192993164 -40 +-103.33809661865234 -62.626979827880859 -40 +-103.33809661865234 -30.14764404296875 -40 +-103.33809661865234 -34.814521789550781 -40 +-103.33809661865234 -52.579998016357422 -40 +-103.33809661865234 11.079999923706055 -40 +-103.33809661865234 -62.266979217529297 -40 +-103.33809661865234 -84.580001831054688 -40 +-103.33809661865234 -62.006980895996094 -40 +-103.33809661865234 -45.520000457763672 -40 +-103.33809661865234 -63.439998626708984 -40 +-103.33809661865234 -59.599998474121094 -40 +-103.33809661865234 -61.646980285644531 -40 +-103.33809661865234 -61.346981048583984 -40 +-103.33809661865234 -42.281570434570312 -40 +-103.33809661865234 -60.986980438232422 -40 +-103.33809661865234 -60.726982116699219 -40 +-103.33809661865234 -9.1669816970825195 -40 +-103.33809661865234 -24.985763549804688 -40 +-103.33809661865234 -84.939994812011719 -40 +-103.33809661865234 -60.366981506347656 -40 +-103.33809661865234 16.819999694824219 -40 +-103.33809661865234 -60.066982269287109 -40 +-103.33809661865234 -59.959999084472656 -40 +-103.33809661865234 -59.706981658935547 -40 +-103.33809661865234 15.899999618530273 -40 +-103.33809661865234 -14.799999237060547 -40 +-103.33809661865234 -59.446979522705078 -40 +-103.33809661865234 -59.086982727050781 -40 +-103.33809661865234 -24.526981353759766 -40 +-103.33809661865234 -58.786979675292969 -40 +-103.33809661865234 -9.5269813537597656 -40 +-103.33809661865234 -85.199996948242188 -40 +-103.33809661865234 -37.579998016357422 -40 +-103.33809661865234 -58.426982879638672 -40 +-103.33809661865234 -0.45999997854232788 -40 +-103.33809661865234 -58.166980743408203 -40 +-103.33809661865234 -57.806980133056641 -40 +-103.33809661865234 -24.226982116699219 -40 +-103.33809661865234 -85.55999755859375 -40 +-103.33809661865234 -57.506980895996094 -40 +-103.33809661865234 -70.860000610351562 -40 +-103.33809661865234 7.8599996566772461 -40 +-103.33809661865234 -57.399997711181641 -40 +-103.33809661865234 -86.586982727050781 -40 +-103.33809661865234 -82.746978759765625 -40 +-103.33809661865234 -78.646980285644531 -40 +-103.33809661865234 -78.906982421875 -40 +-103.33809661865234 -86.946983337402344 -40 +-103.33809661865234 -83.106979370117188 -40 +-103.33809661865234 -79.266983032226562 -40 +-103.33809661865234 -87.246978759765625 -40 +-103.33809661865234 -83.406982421875 -40 +-103.33809661865234 -75.426979064941406 -40 +-103.33809661865234 -79.566978454589844 -40 +-103.33809661865234 -83.766983032226562 -40 +-103.33809661865234 -75.726982116699219 -40 +-103.33809661865234 -79.926979064941406 -40 +-103.33809661865234 -84.0269775390625 -40 +-103.33809661865234 -76.086982727050781 -40 +-103.33809661865234 -80.186981201171875 -40 +-103.33809661865234 -84.386978149414062 -40 +-103.33809661865234 -76.346977233886719 -40 +-103.33809661865234 -84.686981201171875 -40 +-103.33809661865234 -76.706977844238281 -40 +-103.33809661865234 -80.546981811523438 -40 +-103.33809661865234 -85.046981811523438 -40 +-103.33809661865234 -77.006980895996094 -40 +-103.33809661865234 -80.846977233886719 -40 +-103.33809661865234 -86.839996337890625 -40 +-103.33809661865234 -85.306983947753906 -40 +-103.33809661865234 -77.366981506347656 -40 +-103.33809661865234 -81.206977844238281 -40 +-103.33809661865234 -81.46697998046875 -40 +-103.33809661865234 -85.666976928710938 -40 +-103.33809661865234 -77.626983642578125 -40 +-103.33809661865234 -81.826980590820312 -40 +-103.33809661865234 -85.96697998046875 -40 +-103.33809661865234 -77.986984252929688 -40 +-103.33809661865234 -82.126983642578125 -40 +-103.33809661865234 -86.326980590820312 -40 +-103.33809661865234 -78.286979675292969 -40 +-103.33809661865234 -82.486984252929688 -40 +-103.33809661865234 -87.606979370117188 -40 +-103.33809661865234 -87.866981506347656 -40 +-103.33809661865234 -60.259998321533203 -40 +-103.33809661865234 -24.05235481262207 -40 +-103.33809661865234 -23.60698127746582 -40 +-103.33809661865234 -23.246982574462891 -40 +-103.33809661865234 -60.619998931884766 -40 +-103.33809661865234 10.814975738525391 -40 +-103.33809661865234 -23.119001388549805 -40 +-103.33809661865234 -22.586982727050781 -40 +-103.33809661865234 -22.326982498168945 -40 +-103.33809661865234 -54.479999542236328 -40 +-103.33809661865234 -60.879997253417969 -40 +-103.33809661865234 -22.18559455871582 -40 +-103.33809661865234 -21.666982650756836 -40 +-103.33809661865234 -21.306982040405273 -40 +-103.33809661865234 -61.239997863769531 -40 +-103.33809661865234 -45.879997253417969 -40 +-103.33809661865234 -20.686981201171875 -40 +-103.33809661865234 -20.386981964111328 -40 +-103.33809661865234 -19.76698112487793 -40 +-103.33809661865234 -40.399997711181641 -40 +-103.33809661865234 -61.539997100830078 -40 +-103.33809661865234 -19.406982421875 -40 +-103.33809661865234 -18.746982574462891 -40 +-103.33809661865234 -18.486982345581055 -40 +-103.33809661865234 -61.899997711181641 -40 +-103.33809661865234 -32.014404296875 -40 +-103.33809661865234 -17.826982498168945 -40 +-103.33809661865234 -17.518714904785156 -40 +-103.33809661865234 -16.846982955932617 -40 +-103.33809661865234 6.5799999237060547 -40 +-103.33809661865234 -62.159999847412109 -40 +-103.33809661865234 -16.585309982299805 -40 +-103.33809661865234 -15.926981925964355 -40 +-103.33809661865234 -15.65195369720459 -40 +-103.33809661865234 -62.520000457763672 -40 +-103.33809661865234 -40.139999389648438 -40 +-103.33809661865234 -14.906982421875 -40 +-103.33809661865234 -14.718546867370605 -40 +-103.33809661865234 -13.986982345581055 -40 +-103.33809661865234 -27.340000152587891 -40 +-103.33809661865234 -62.819999694824219 -40 +-103.33809661865234 -13.785191535949707 -40 +-103.33809661865234 -13.00698184967041 -40 +-103.33809661865234 -12.851785659790039 -40 +-103.33809661865234 -63.180000305175781 -40 +-103.33809661865234 0.53999996185302734 -40 +-103.33809661865234 -57.146980285644531 -40 +-103.33809661865234 -11.319999694824219 -40 +-103.33809661865234 -12.346982002258301 -40 +-103.33809661865234 -56.886981964111328 -40 +-103.33809661865234 -11.480024337768555 -40 +-103.33809661865234 -25.399999618530273 -40 +-103.33809661865234 -50.020000457763672 -40 +-103.33809661865234 -12.086981773376465 -40 +-103.33809661865234 -56.526981353759766 -40 +-103.33809661865234 -56.226982116699219 -40 +-103.33809661865234 -11.918430328369141 -40 +-103.33809661865234 -55.866981506347656 -40 +-103.33809661865234 -11.979999542236328 -40 +-103.33809661865234 -50.379997253417969 -40 +-103.33809661865234 -31.080997467041016 -40 +-103.33809661865234 -11.426981925964355 -40 +-103.33809661865234 0.8399999737739563 -40 +-103.33809661865234 -55.606979370117188 -40 +-103.33809661865234 -66.659996032714844 -40 +-103.33809661865234 -52.279998779296875 -40 +-103.33809661865234 -55.246982574462891 -40 +-103.33809661865234 -85.860000610351562 -40 +-103.33809661865234 -67.019996643066406 -40 +-103.33809661865234 -44.899997711181641 -40 +-103.33809661865234 -37.219997406005859 -40 +-103.33809661865234 -14.179999351501465 -40 +-103.33809661865234 -26.319999694824219 -40 +-103.33809661865234 -67.279998779296875 -40 +-103.33809661865234 -86.220001220703125 -40 +-103.33809661865234 -11.066982269287109 -40 +-103.33809661865234 -43.185024261474609 -40 +-103.33809661865234 -67.639999389648438 -40 +-103.33809661865234 -39.479999542236328 -40 +-103.33809661865234 -54.946979522705078 -40 +-103.33809661865234 -54.586982727050781 -40 +-103.33809661865234 -86.479995727539062 -40 +-103.33809661865234 0.17999999225139618 -40 +-103.33809661865234 -67.939994812011719 -40 +-103.33809661865234 -51.919998168945312 -40 +-103.33809661865234 -54.326980590820312 -40 +-103.33809661865234 9.1399993896484375 -40 +-103.33809661865234 -68.299995422363281 -40 +-103.33809661865234 -53.860000610351562 -40 +-103.33809661865234 -13.880000114440918 -40 +-103.33809661865234 -53.96697998046875 -40 +-103.33809661865234 -10.446982383728027 -40 +-103.33809661865234 -53.666980743408203 -40 +-103.33809661865234 -68.55999755859375 -40 +-103.33809661865234 -53.306980133056641 -40 +-103.33809661865234 -53.046981811523438 -40 +-103.33809661865234 -87.139999389648438 -40 +-103.33809661865234 -68.919998168945312 -40 +-103.33809661865234 -52.686981201171875 -40 +-103.33809661865234 -52.386981964111328 -40 +-103.33809661865234 14 -40 +-103.33809661865234 -87.5 -40 +103.33809661865234 -88.099998474121094 -90 +-103.33809661865234 -69.220001220703125 -40 +-103.33809661865234 9.5 -40 +-103.33809661865234 -51.659999847412109 -40 +-103.33809661865234 -10.146981239318848 -40 +-103.33809661865234 -69.580001831054688 -40 +-103.33809661865234 -70.5 -40 +-103.33809661865234 -52.026981353759766 -40 +-103.33809661865234 -87.759994506835938 -40 +-103.33809661865234 -88.099998474121094 -40 +-103.33809661865234 -39.119998931884766 -40 +-103.33809661865234 -69.839996337890625 -40 +-103.33809661865234 -51.106983184814453 -40 +-103.33809661865234 -13.25999927520752 -40 +-103.33809661865234 -42.959999084472656 -40 +-103.33809661865234 -70.199996948242188 -40 +-103.33809661865234 -51.766983032226562 -40 +-103.33809661865234 -51.406982421875 -40 +-103.33809661865234 -88.099998474121094 -90 +-103.33809661865234 16.88031005859375 -40 +-103.33809661865234 16.713016510009766 -40 +-103.33809661865234 16.45301628112793 -40 +-103.33809661865234 15.946902275085449 -40 +-103.33809661865234 15.793017387390137 -40 +-103.33809661865234 15.013546943664551 -40 +-103.33809661865234 14.813016891479492 -40 +-103.33809661865234 14.080141067504883 -40 +-103.33809661865234 13.893016815185547 -40 +-103.33809661865234 13.146785736083984 -40 +-103.33809661865234 12.873017311096191 -40 +-103.33809661865234 12.213379859924316 -40 +-103.33809661865234 11.953017234802246 -40 +-103.33809661865234 11.280024528503418 -40 +-103.33809661865234 10.973017692565918 -40 +-103.33809661865234 10.313016891479492 -40 +-103.33809661865234 10.053017616271973 -40 +-103.33809661865234 9.6930179595947266 -40 +-103.33809661865234 9.3930177688598633 -40 +-103.33809661865234 9.0330181121826172 -40 +-103.33809661865234 8.7730178833007812 -40 +-103.33809661865234 8.4130182266235352 -40 +-103.33809661865234 8.1130180358886719 -40 +-103.33809661865234 7.7530179023742676 -40 +-103.33809661865234 7.4930181503295898 -40 +-103.33809661865234 7.1330180168151855 -40 +-103.33809661865234 6.8330178260803223 -40 +-103.33809661865234 6.4730181694030762 -40 +-103.33809661865234 6.2130179405212402 -40 +-103.33809661865234 5.8530182838439941 -40 +-103.33809661865234 5.5530180931091309 -40 +-103.33809661865234 5.1930179595947266 -40 +-103.33809661865234 4.9330177307128906 -40 +-103.33809661865234 4.5730175971984863 -40 +-103.33809661865234 4.2730178833007812 -40 +-103.33809661865234 3.913017749786377 -40 +-103.33809661865234 3.6530177593231201 -40 +-103.33809661865234 3.2930178642272949 -40 +-103.33809661865234 2.9930179119110107 -40 +-103.33809661865234 2.6330177783966064 -40 +-103.33809661865234 2.3730180263519287 -40 +-103.33809661865234 2.0130178928375244 -40 +-103.33809661865234 1.7130179405212402 -40 +-103.33809661865234 1.353018045425415 -40 +-103.33809661865234 1.0930179357528687 -40 +-103.33809661865234 0.73301792144775391 -40 +-103.33809661865234 0.43301793932914734 -40 +-103.33809661865234 0.073017969727516174 -40 +-103.33809661865234 -0.18698202073574066 -40 +-103.33809661865234 -0.56698203086853027 -40 +-103.33809661865234 -0.82698202133178711 -40 +-103.33809661865234 -1.1869820356369019 -40 +-103.33809661865234 -1.486981987953186 -40 +-103.33809661865234 -1.8469818830490112 -40 +-103.33809661865234 -2.1069819927215576 -40 +-103.33809661865234 -2.4669818878173828 -40 +-103.33809661865234 -2.7669820785522461 -40 +-103.33809661865234 -3.1269819736480713 -40 +-103.33809661865234 -3.3869819641113281 -40 +-103.33809661865234 -3.7469820976257324 -40 +-103.33809661865234 -4.0469818115234375 -40 +-103.33809661865234 -4.4069819450378418 -40 +-103.33809661865234 -4.6669821739196777 -40 +-103.33809661865234 -5.0269818305969238 -40 +-103.33809661865234 -5.3269815444946289 -40 +-103.33809661865234 -5.6869816780090332 -40 +-103.33809661865234 -5.9469819068908691 -40 +-103.33809661865234 -6.3069815635681152 -40 +-103.33809661865234 -6.6069817543029785 -40 +-103.33809661865234 -6.9669818878173828 -40 +-103.33809661865234 -7.2269816398620605 -40 +-103.33809661865234 -7.5869817733764648 -40 +-103.33809661865234 -7.8869814872741699 -40 +-103.33809661865234 -8.2469816207885742 -40 +-103.33809661865234 -8.5069818496704102 -40 +-103.33809661865234 -8.8669815063476562 -40 +3 523 598 170 +3 523 170 597 +3 523 597 124 +3 523 124 596 +3 523 596 121 +3 523 121 595 +3 523 18 405 +3 523 404 18 +3 523 595 101 +3 523 101 594 +3 523 12 404 +3 523 594 282 +3 523 282 593 +3 523 593 211 +3 523 356 12 +3 523 9 356 +3 523 211 592 +3 523 592 269 +3 523 347 9 +3 523 6 347 +3 523 269 591 +3 523 591 246 +3 523 336 6 +3 523 77 336 +3 523 115 456 +3 523 246 590 +3 523 318 77 +3 523 456 461 +3 523 590 241 +3 523 241 589 +3 523 461 459 +3 523 92 117 +3 523 589 231 +3 523 231 588 +3 523 454 318 +3 523 288 454 +3 523 588 227 +3 523 227 587 +3 523 250 288 +3 523 446 91 +3 523 587 218 +3 523 245 250 +3 523 459 453 +3 523 218 586 +3 523 453 464 +3 523 586 213 +3 523 475 245 +3 523 242 475 +3 523 213 585 +3 523 585 204 +3 523 139 242 +3 523 239 139 +3 523 204 584 +3 523 584 200 +3 523 442 239 +3 523 235 442 +3 523 200 583 +3 523 583 184 +3 523 44 235 +3 523 232 44 +3 523 184 582 +3 523 117 85 +3 523 84 232 +3 523 228 84 +3 523 582 180 +3 523 180 581 +3 523 177 228 +3 523 226 177 +3 523 581 160 +3 523 464 450 +3 523 15 226 +3 523 223 15 +3 523 160 580 +3 523 580 155 +3 523 307 223 +3 523 221 307 +3 523 155 579 +3 523 579 125 +3 523 320 221 +3 523 217 320 +3 523 125 578 +3 523 85 118 +3 523 95 217 +3 523 215 95 +3 523 450 478 +3 523 478 244 +3 523 463 215 +3 523 212 463 +3 523 118 58 +3 523 578 116 +3 523 55 212 +3 523 209 55 +3 523 116 577 +3 523 577 102 +3 523 102 576 +3 523 428 209 +3 523 576 93 +3 523 93 575 +3 523 205 428 +3 523 262 205 +3 523 58 142 +3 523 142 56 +3 523 202 262 +3 523 247 202 +3 523 575 270 +3 523 244 494 +3 523 199 247 +3 523 187 199 +3 523 270 574 +3 523 574 83 +3 523 195 187 +3 523 190 195 +3 523 83 573 +3 523 573 353 +3 523 353 572 +3 523 192 190 +3 523 56 157 +3 523 405 21 +3 523 21 406 +3 523 406 27 +3 523 572 263 +3 523 263 571 +3 523 27 409 +3 523 409 32 +3 523 32 410 +3 523 410 35 +3 523 35 411 +3 523 411 40 +3 523 40 414 +3 523 414 46 +3 523 46 415 +3 523 415 49 +3 523 49 416 +3 523 416 54 +3 523 54 419 +3 523 419 69 +3 523 422 141 +3 523 69 420 +3 523 420 73 +3 523 73 421 +3 523 421 76 +3 523 76 424 +3 523 424 81 +3 523 571 485 +3 523 485 570 +3 523 494 237 +3 523 237 509 +3 523 509 220 +3 523 220 0 +3 523 0 216 +3 523 81 425 +3 523 425 28 +3 523 570 448 +3 523 448 569 +3 523 28 426 +3 523 216 349 +3 523 349 203 +3 523 451 115 +3 523 91 451 +3 523 203 335 +3 523 335 194 +3 523 194 599 +3 523 569 465 +3 523 599 182 +3 523 182 598 +3 523 339 524 +3 523 525 339 +3 523 141 438 +3 523 82 23 +3 523 14 82 +3 523 465 568 +3 523 568 52 +3 523 52 567 +3 523 153 525 +3 523 526 153 +3 523 96 526 +3 523 527 96 +3 523 426 151 +3 523 151 429 +3 523 343 527 +3 523 528 343 +3 523 429 198 +3 523 198 430 +3 523 68 14 +3 523 517 68 +3 523 567 87 +3 523 87 566 +3 61 505 523 +3 523 70 528 +3 159 523 505 +3 159 514 523 +3 523 430 48 +3 523 566 62 +3 523 529 70 +3 523 62 565 +3 523 565 146 +3 523 146 564 +3 523 197 192 +3 523 564 10 +3 523 300 529 +3 523 10 563 +3 523 157 33 +3 523 530 300 +3 523 33 173 +3 523 173 31 +3 523 31 183 +3 523 183 20 +3 523 563 260 +3 523 20 189 +3 523 260 562 +3 523 189 17 +3 523 17 193 +3 523 166 530 +3 523 193 13 +3 523 13 201 +3 523 531 166 +3 523 201 8 +3 523 8 210 +3 523 65 446 +3 523 503 531 +3 523 210 2 +3 523 2 214 +3 523 214 1 +3 523 562 267 +3 523 48 431 +3 523 1 222 +3 523 222 186 +3 523 186 224 +3 523 224 252 +3 523 252 233 +3 523 233 359 +3 523 431 42 +3 523 267 561 +3 523 359 243 +3 523 243 511 +3 523 511 248 +3 523 248 520 +3 523 520 253 +3 523 253 516 +3 523 561 63 +3 523 63 560 +3 523 516 254 +3 523 254 510 +3 523 510 259 +3 523 259 506 +3 523 506 261 +3 523 261 500 +3 523 560 60 +3 523 60 559 +3 523 500 272 +3 523 272 496 +3 523 496 273 +3 523 273 490 +3 523 42 434 +3 523 559 38 +3 523 434 30 +3 523 30 435 +3 523 435 24 +3 523 38 558 +3 523 24 436 +3 523 490 278 +3 523 278 486 +3 523 558 37 +3 523 436 314 +3 523 486 283 +3 523 283 480 +3 523 480 284 +3 523 284 476 +3 523 476 286 +3 523 286 471 +3 523 314 439 +3 523 37 557 +3 523 471 290 +3 523 557 22 +3 523 290 467 +3 523 467 291 +3 523 291 167 +3 523 167 292 +3 523 292 154 +3 523 154 295 +3 523 295 140 +3 523 140 296 +3 523 296 131 +3 523 131 297 +3 523 297 113 +3 523 113 301 +3 523 301 100 +3 523 100 302 +3 523 302 51 +3 523 51 303 +3 523 303 36 +3 523 36 306 +3 523 306 16 +3 523 16 308 +3 523 22 556 +3 523 308 328 +3 523 328 311 +3 523 311 447 +3 523 532 503 +3 523 447 315 +3 523 315 443 +3 523 443 319 +3 523 319 437 +3 523 437 324 +3 523 324 433 +3 523 234 532 +3 523 556 19 +3 523 19 555 +3 523 433 326 +3 523 326 427 +3 523 427 330 +3 523 330 423 +3 523 423 331 +3 523 533 234 +3 523 555 5 +3 523 331 417 +3 523 417 333 +3 523 333 413 +3 523 413 334 +3 523 334 407 +3 523 407 338 +3 523 98 533 +3 523 338 403 +3 523 5 554 +3 523 403 340 +3 523 340 341 +3 523 341 342 +3 523 342 329 +3 523 329 345 +3 523 554 309 +3 523 534 98 +3 523 345 312 +3 523 74 517 +3 523 309 553 +3 523 522 74 +3 523 312 346 +3 523 94 534 +3 523 535 94 +3 523 57 535 +3 523 553 240 +3 523 240 552 +3 523 536 57 +3 523 4 536 +3 523 537 4 +3 523 323 537 +3 523 445 65 +3 523 538 323 +3 523 439 344 +3 523 344 440 +3 523 408 538 +3 523 539 408 +3 523 47 539 +3 523 540 47 +3 523 274 540 +3 523 518 445 +3 523 552 264 +3 523 264 551 +3 523 188 197 +3 523 257 188 +3 523 185 257 +3 523 265 185 +3 523 181 265 +3 523 321 181 +3 523 551 432 +3 523 432 550 +3 523 178 321 +3 523 99 178 +3 523 175 99 +3 523 277 175 +3 523 171 277 +3 523 293 171 +3 523 550 317 +3 523 440 474 +3 523 169 293 +3 523 79 169 +3 523 168 79 +3 523 72 168 +3 523 164 72 +3 523 317 549 +3 523 59 164 +3 523 474 441 +3 523 162 59 +3 523 473 162 +3 523 158 473 +3 523 351 158 +3 523 156 351 +3 523 346 304 +3 523 304 348 +3 523 348 289 +3 523 289 352 +3 523 256 156 +3 523 152 256 +3 523 441 492 +3 523 549 310 +3 523 238 152 +3 523 150 238 +3 523 515 150 +3 523 147 515 +3 523 481 147 +3 523 143 481 +3 523 310 548 +3 523 352 280 +3 523 280 354 +3 523 548 276 +3 523 438 143 +3 523 354 174 +3 523 174 355 +3 523 276 547 +3 523 355 78 +3 523 547 360 +3 523 78 358 +3 523 358 361 +3 523 361 449 +3 523 449 53 +3 523 53 452 +3 523 452 80 +3 523 80 457 +3 523 457 251 +3 523 251 458 +3 523 458 271 +3 523 360 546 +3 523 546 165 +3 523 271 460 +3 523 460 287 +3 523 287 466 +3 523 466 294 +3 523 294 469 +3 523 469 298 +3 523 492 444 +3 523 165 545 +3 523 444 518 +3 523 298 482 +3 523 482 305 +3 523 545 11 +3 523 305 483 +3 523 483 412 +3 523 412 488 +3 523 488 129 +3 523 129 493 +3 523 493 491 +3 523 491 495 +3 523 495 136 +3 523 11 544 +3 523 136 497 +3 523 544 97 +3 523 97 543 +3 523 497 145 +3 523 145 498 +3 523 498 266 +3 523 266 501 +3 523 501 322 +3 523 322 502 +3 523 543 489 +3 523 489 542 +3 523 502 468 +3 523 468 512 +3 523 512 487 +3 523 487 521 +3 523 521 508 +3 523 508 522 +3 523 542 507 +3 523 507 541 +3 523 541 274 +3 523 362 484 +3 523 230 391 +3 523 363 268 +3 523 364 163 +3 523 249 394 +3 523 365 172 +3 523 366 387 +3 523 258 397 +3 523 268 400 +3 523 367 275 +3 523 275 363 +3 523 368 179 +3 523 369 499 +3 523 281 367 +3 523 370 281 +3 523 371 92 +3 523 285 370 +3 523 105 371 +3 523 372 191 +3 523 373 285 +3 523 299 373 +3 523 106 374 +3 523 374 105 +3 523 375 196 +3 523 313 376 +3 523 126 377 +3 523 376 299 +3 523 377 106 +3 523 325 379 +3 523 133 380 +3 523 378 206 +3 523 337 381 +3 523 137 382 +3 523 379 313 +3 523 380 126 +3 523 350 384 +3 523 144 385 +3 523 357 388 +3 523 148 389 +3 523 381 325 +3 523 382 133 +3 523 383 207 +3 523 470 392 +3 523 149 393 +3 523 477 395 +3 523 161 396 +3 523 384 337 +3 523 385 137 +3 523 386 219 +3 523 484 398 +3 523 163 399 +3 523 387 362 +3 523 172 364 +3 523 388 350 +3 523 389 144 +3 523 390 225 +3 523 499 366 +3 523 179 365 +3 523 391 229 +3 523 504 369 +3 523 191 368 +3 523 392 357 +3 523 393 148 +3 523 196 372 +3 523 394 230 +3 523 206 375 +3 523 395 470 +3 523 396 149 +3 523 207 378 +3 523 397 249 +3 523 398 477 +3 523 219 383 +3 523 225 386 +3 523 399 161 +3 523 229 390 +3 523 400 258 +3 401 504 523 +3 513 401 523 +3 402 513 523 +3 514 402 523 +3 523 23 462 +3 523 462 26 +3 523 26 455 +3 523 455 39 +3 523 39 279 +3 523 279 43 +3 523 43 236 +3 523 236 45 +3 523 45 208 +3 523 208 67 +3 523 67 176 +3 523 176 71 +3 523 71 132 +3 523 132 75 +3 523 75 109 +3 523 109 86 +3 523 86 89 +3 523 89 88 +3 523 88 66 +3 523 66 90 +3 523 90 41 +3 523 41 103 +3 523 103 7 +3 523 7 104 +3 523 104 34 +3 523 34 107 +3 523 107 112 +3 523 112 108 +3 523 108 418 +3 523 418 110 +3 523 110 327 +3 523 327 111 +3 523 111 29 +3 523 29 114 +3 523 114 472 +3 523 472 119 +3 523 119 3 +3 523 3 120 +3 523 120 134 +3 523 134 122 +3 523 122 255 +3 523 255 123 +3 523 123 479 +3 523 479 127 +3 523 127 519 +3 523 519 128 +3 523 128 332 +3 523 332 130 +3 523 130 64 +3 523 64 316 +3 523 316 50 +3 523 50 135 +3 523 135 25 +3 523 25 138 +3 523 138 422 + diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/slow_compute_normal.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/slow_compute_normal.cpp new file mode 100644 index 00000000000..3b14b3f72d1 --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/slow_compute_normal.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#include + +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; + +typedef K::Point_3 Point; +typedef K::Vector_3 Vector; + +typedef CGAL::Surface_mesh Mesh; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::face_descriptor face_descriptor; + +namespace PMP = CGAL::Polygon_mesh_processing; + +int main(int argc, char* argv[]) +{ + const std::string filename = "./data/slow_compute_normal.off"; + + Mesh mesh; + if(!PMP::IO::read_polygon_mesh(filename, mesh)) + { + std::cerr << "Invalid input." << std::endl; + return 1; + } + + CGAL::Timer t; + t.start(); + std::cout << "compute_vertex_normal" << std::endl; + PMP::compute_vertex_normal(vertex_descriptor(523), mesh); + std::cout << t.time() << " sec." << std::endl; + + return 0; +} From 125a0d60416973ad91096cf2fec7513f89cd2ff1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 10 Jan 2025 09:16:17 +0000 Subject: [PATCH 2/3] A trivial fix for the data set, but does not work when the face normals are slightly perturbed --- .../include/CGAL/Polygon_mesh_processing/compute_normal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index dd77b2e9843..d1bf35fc630 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -516,6 +516,9 @@ compute_vertex_normal_most_visible_min_circle(typename boost::graph_traits::null_face()) continue; + if((! incident_faces.empty()) && (get(face_normals, incident_faces.back()) == get(face_normals, f)) ) + continue; + incident_faces.push_back(f); } From be12df3dc1997f3183f603f35c8dcef8a1a8f7f6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 13 Jan 2025 07:18:26 +0000 Subject: [PATCH 3/3] A deviation of 0.1 degree can savely considered as zero here --- .../CGAL/Polygon_mesh_processing/compute_normal.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index d1bf35fc630..53c7a1e9cfa 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -509,6 +509,8 @@ compute_vertex_normal_most_visible_min_circle(typename boost::graph_traits incident_faces; incident_faces.reserve(8); for(face_descriptor f : CGAL::faces_around_target(halfedge(v, pmesh), pmesh)) @@ -516,9 +518,14 @@ compute_vertex_normal_most_visible_min_circle(typename boost::graph_traits::null_face()) continue; - if((! incident_faces.empty()) && (get(face_normals, incident_faces.back()) == get(face_normals, f)) ) - continue; + if(! incident_faces.empty()){ + if((get(face_normals, incident_faces.back()) == get(face_normals, f)) ) + continue; + auto aa = approximate_angle(get(face_normals, incident_faces.back()) ,get(face_normals, f)); + if(aa < bound) + continue; + } incident_faces.push_back(f); }