From 01ce30fa63eb3119a900c622b2e59676ff36dada Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 9 Oct 2025 20:13:28 +0200 Subject: [PATCH] arbiquotient:: min_distance --- arbiquotient.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arbiquotient.cpp b/arbiquotient.cpp index 5332d12e..6d1a7cd6 100644 --- a/arbiquotient.cpp +++ b/arbiquotient.cpp @@ -13,6 +13,7 @@ bool displaying = false; bool block_selfedges = false; bool block_cones = false; bool block_mirrors = false; +int min_distance = 1; bool dedup_rotation = true; bool dedup_mirror = true; @@ -303,6 +304,8 @@ void recurse() { skip: ; } } + + else if(min_distance > 1 && celldistance(p->parent.at, p->where) < min_distance) return; } if(seen_hashes.count(hash)) return; seen_hashes.insert(hash); @@ -359,6 +362,8 @@ void recurse() { for(auto li: active) if(li != cw0.at) { + if(min_distance > 1 && celldistance(li, cw0.at) < min_distance) continue; + auto tryout = [&] (cellwalker cw1) { aq.at(cw1.at).unified_to_start = true; unifications.emplace_back(cw0, cw1); @@ -530,6 +535,7 @@ void show_auto_dialog() { add_edit(block_selfedges); add_edit(block_cones); add_edit(block_mirrors); + add_edit(min_distance); add_edit(allow_nonorientable); add_edit(dedup_rotation); add_edit(dedup_focus); @@ -607,7 +613,9 @@ auto aqhook = + arg::add3("-d:aq", [] { arg::launch_dialog(show_dialog); }) + addHook(hooks_configfile, 100, [] { param_i(aq_max, "aq_max") - -> editable(1, 500, 10, "limit on the quotient size", "", 'm'); + -> editable(1, 500, 10, "limit on the quotient size", "", 'l'); + param_i(min_distance, "aq_min_distance", 1) + -> editable(1, 10, 1, "minimum distance between identified tiles", "", 'd'); param_b(block_cones, "aq_block_cones") -> editable("block cone points", 'c'); param_b(block_selfedges, "aq_block_selfedges")