From c9cdd5c507f612bcd85f314a4f8b16680daa1414 Mon Sep 17 00:00:00 2001 From: David Coeurjolly Date: Wed, 6 Nov 2024 11:17:19 +0100 Subject: [PATCH] =?UTF-8?q?fixing=20polyscope=20deprecatd=20API=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/polyscope-examples/tangency-explorer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/polyscope-examples/tangency-explorer.cpp b/examples/polyscope-examples/tangency-explorer.cpp index ae1ecaa19e..1d15c06b8a 100644 --- a/examples/polyscope-examples/tangency-explorer.cpp +++ b/examples/polyscope-examples/tangency-explorer.cpp @@ -472,7 +472,7 @@ void myCallback() face_idx = idx - nv; is_selected = true; selected_kpoint = Point::zero; - for ( auto i : selectedSurface->faces[ face_idx ] ) + for ( auto i : surfmesh.incidentVertices( face_idx ) ) selected_kpoint += digital_points[ i ]; selected_kpoint /= 2; std::ostringstream otext; @@ -485,8 +485,9 @@ void myCallback() edge_idx = idx - nv - nf; is_selected = false; // true; // ne fonctionne pas selected_kpoint = Point::zero; - for ( auto i : selectedSurface->edgeIndices[ edge_idx ] ) - selected_kpoint += digital_points[ i ]; + auto vv = surfmesh.edgeVertices( edge_idx ); + selected_kpoint += digital_points[ vv.first ]; + selected_kpoint += digital_points[ vv.second ]; selected_kpoint /= 2; std::ostringstream otext; otext << "Selected edge = " << edge_idx