From ed819084dfa3bd44a66b52c8ca4bb9936ff3cc26 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 30 Nov 2023 14:40:27 +0100 Subject: [PATCH] ExactCDT2d::create_intersection(): forgot to push length_ value for new point in expansion_nt mode --- .../mesh/mesh_surface_intersection_internal.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/geogram/mesh/mesh_surface_intersection_internal.cpp b/src/lib/geogram/mesh/mesh_surface_intersection_internal.cpp index 0c2859826a6f..1ed549f3b536 100644 --- a/src/lib/geogram/mesh/mesh_surface_intersection_internal.cpp +++ b/src/lib/geogram/mesh/mesh_surface_intersection_internal.cpp @@ -853,6 +853,17 @@ namespace GEO { point_.push_back(mix(t, point_[i], point_[j])); Numeric::optimize_number_representation(*point_.rbegin()); + +#ifndef INTERSECTIONS_USE_EXACT_NT + { + const ExactPoint& p = *point_.rbegin(); + length_.push_back( + (geo_sqr(p.x) + geo_sqr(p.y)).estimate() / + geo_sqr(p.w).estimate() + ); + } +#endif + id_.push_back(index_t(-1)); index_t x = point_.size()-1;