From ee5debc4f2a1ee21f2d8eac06fbf48adfff1211a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 23 Sep 2026 18:09:52 +0000 Subject: [PATCH] Don't look up shared nodes that are already necessary Vertices that are already going to be kept, because they begin a ring or are on the tile boundary, can't be affected by whether they are also global shared nodes, so skip looking them up. These are most of the vertices that clipping creates, which don't know their node state. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01P2nBqZisxNQfmEmon3vE9v --- geometry.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/geometry.cpp b/geometry.cpp index 41d59eff..21eb7ba3 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -298,7 +298,10 @@ drawvec simplify_lines(drawvec &geom, int z, int tx, int ty, int detail, bool ma geom[i].necessary = true; } - if (shared_nodes_map != NULL && nodepos > 0) { + // A vertex that is already necessary, because it is the start of a ring + // or on the tile boundary, doesn't need to be looked up, since the answer + // could only make it necessary again. + if (shared_nodes_map != NULL && nodepos > 0 && !geom[i].necessary) { if (geom[i].node == NODE_UNKNOWN) { // offset to global long long wx = geom[i].x;