fixed a bug in twisted non-cube

This commit is contained in:
Zeno Rogue 2019-04-16 04:15:00 +02:00
parent 21985e4317
commit 5b87088ade
1 changed files with 9 additions and 1 deletions

View File

@ -611,7 +611,15 @@ namespace euclid3 {
heptagon *build(heptagon *parent, int d, coord at) {
auto h = get_at(at);
h->c.connect((d+S7/2)%S7, parent, d, false);
int d1 = (d+S7/2)%S7;
if(twisted) {
coord a = ispacemap[parent];
coord b = ispacemap[h];
for(int i=0; i<S7; i++)
if(canonicalize(b + shifttable[i]) == a)
d1 = i;
}
h->c.connect(d1, parent, d, false);
return h;
}