From c99a7d095006a8adc3d3a4b3e8982d3f684d4cfa Mon Sep 17 00:00:00 2001 From: Youmu Date: Thu, 16 Jul 2020 16:35:20 -0400 Subject: [PATCH] Fix the calculation of power in factorization --- Surface_mesh_topology/include/CGAL/Path_on_surface.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Surface_mesh_topology/include/CGAL/Path_on_surface.h b/Surface_mesh_topology/include/CGAL/Path_on_surface.h index 702e0c55647..c7643fb764e 100644 --- a/Surface_mesh_topology/include/CGAL/Path_on_surface.h +++ b/Surface_mesh_topology/include/CGAL/Path_on_surface.h @@ -1121,10 +1121,11 @@ public: ; /// It can be proved that the first match location is the length of match auto primitiveSize = itMatch - pp2.m_path.begin(); + auto originalLength = pp1.length(); CGAL_assertion(pp1.length() % primitiveSize == 0); pp1.cut(primitiveSize); CGAL_assertion(pp1.is_closed()); - return std::make_pair(pp1, pp1.length() / primitiveSize); + return std::make_pair(pp1, originalLength / primitiveSize); } /// @return the turn between dart number i and dart number i+1.