From 4c3a348666b1a58a5aa855687d6de58daad45a01 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 16 Jun 2024 17:59:04 +0200 Subject: [PATCH] twisted product now actually appears for spherical space, and automatically sets csteps if it was illegal --- geom-exp.cpp | 9 +++++++-- nonisotropic.cpp | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/geom-exp.cpp b/geom-exp.cpp index 397108c9..a54fd44e 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -262,7 +262,7 @@ bool forced_quotient() { return quotient && !(cgflags & qOPTQ); } EX geometry_filter gf_hyperbolic = {"hyperbolic", 'h', [] { return (arcm::in() || arb::in() || hyperbolic) && !forced_quotient(); }}; EX geometry_filter gf_spherical = {"spherical", 's', [] { return (arcm::in() || arb::in() || sphere) && !forced_quotient(); }}; EX geometry_filter gf_euclidean = {"Euclidean", 'e', [] { return (arcm::in() || arb::in() || euclid) && !forced_quotient(); }}; -EX geometry_filter gf_other = {"non-isotropic", 'n', [] { return mproduct || nonisotropic; }}; +EX geometry_filter gf_other = {"non-isotropic", 'n', [] { return mproduct || mtwisted || nonisotropic; }}; EX geometry_filter gf_regular_2d = {"regular 2D tesselations", 'r', [] { return standard_tiling() && WDIM == 2 && !forced_quotient(); }}; @@ -314,6 +314,7 @@ void set_or_configure_geometry(eGeometry g) { else if(g == gArbitrary) arb::choose(); else { + bool quo = false; if(among(g, gProduct, gTwistedProduct)) { if(WDIM == 3 || (g == gTwistedProduct && euclid)) { addMessage( @@ -325,6 +326,7 @@ void set_or_configure_geometry(eGeometry g) { } if(g == gTwistedProduct) { bool ok = true; + quo = sphere || quotient; if(arcm::in()) ok = PURE; else if(bt::in() || aperiodic) ok = false; else ok = PURE || BITRUNCATED; @@ -343,7 +345,10 @@ void set_or_configure_geometry(eGeometry g) { #endif } } - dual::may_split_or_do([g] { set_geometry(g); }); + dual::may_split_or_do([g, quo] { + set_geometry(g); + if(quo) hybrid::fixup_csteps(); + }); start_game(); } } diff --git a/nonisotropic.cpp b/nonisotropic.cpp index b4c811e3..1ec13b55 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -1249,6 +1249,14 @@ EX namespace hybrid { } } + EX void fixup_csteps() { + check_cgi(); cgi.require_basics(); + if(!hybrid::csteps || gmod(cgi.psl_steps, hybrid::csteps)) { + hybrid::csteps = cgi.psl_steps; + hybrid::reconfigure(); + } + } + EX hrmap *pmap; EX geometry_information *pcgip; EX eGeometry actual_geometry;