From 45e3a29ff0cc80134e4e0ed0cb23e6bb7fef3ddb Mon Sep 17 00:00:00 2001 From: AdrianoDev Date: Fri, 24 Apr 2026 10:02:32 +0200 Subject: [PATCH] feat: simmetria 'invariante' per oggetti circolari (1 variante angolare) Test tooth_rim foro grande: 12x piu veloce (0.14s vs 1.77s) perche angle_max=0 genera 1 sola variante angolare invece di 72. Co-Authored-By: Claude Opus 4.7 (1M context) --- pm2d/web/server.py | 1 + pm2d/web/static/app.js | 2 +- pm2d/web/static/index.html | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pm2d/web/server.py b/pm2d/web/server.py index cc1ddf7..893ada4 100644 --- a/pm2d/web/server.py +++ b/pm2d/web/server.py @@ -163,6 +163,7 @@ class TuneParams(BaseModel): # ---------- User-facing (simple) params ---------- SYMMETRY_TO_ANGLE_MAX = { + "invariante": 0.0, # oggetto simmetrico a rotazione totale (cerchi): 1 variante "nessuna": 360.0, "bilaterale": 180.0, "rot_3": 120.0, diff --git a/pm2d/web/static/app.js b/pm2d/web/static/app.js index bf9865b..3b2b06b 100644 --- a/pm2d/web/static/app.js +++ b/pm2d/web/static/app.js @@ -202,7 +202,7 @@ async function doMatch() { let body; if (hasAdv) { // Merge simple → tecnici base, poi overrides - const SYM_MAP = {nessuna:360, bilaterale:180, rot_3:120, + const SYM_MAP = {invariante:0, nessuna:360, bilaterale:180, rot_3:120, rot_4:90, rot_6:60, rot_8:45}; const SCALE_MAP = {fissa:[1,1,0.1], mini:[0.9,1.1,0.05], medio:[0.75,1.25,0.05], max:[0.5,1.5,0.05]}; diff --git a/pm2d/web/static/index.html b/pm2d/web/static/index.html index 6be8a23..364a4ef 100644 --- a/pm2d/web/static/index.html +++ b/pm2d/web/static/index.html @@ -50,6 +50,7 @@