march generator: add reverse activated points
This commit is contained in:
parent
39d12ef8a4
commit
1dece061a3
1 changed files with 21 additions and 5 deletions
|
@ -83,6 +83,19 @@ class TriangulatedCube:
|
||||||
n_act.add(transf(act))
|
n_act.add(transf(act))
|
||||||
return TriangulatedCube(n_act, n_tri)
|
return TriangulatedCube(n_act, n_tri)
|
||||||
|
|
||||||
|
def reverse_activated(self):
|
||||||
|
all_elts = {
|
||||||
|
Vert.frnt_bot_l,
|
||||||
|
Vert.frnt_bot_r,
|
||||||
|
Vert.frnt_top_l,
|
||||||
|
Vert.frnt_top_r,
|
||||||
|
Vert.back_bot_l,
|
||||||
|
Vert.back_bot_r,
|
||||||
|
Vert.back_top_l,
|
||||||
|
Vert.back_top_r,
|
||||||
|
}
|
||||||
|
self.activated = all_elts - self.activated
|
||||||
|
|
||||||
def activated_code(self):
|
def activated_code(self):
|
||||||
out = 0
|
out = 0
|
||||||
for act in self.activated:
|
for act in self.activated:
|
||||||
|
@ -181,8 +194,11 @@ def do_main(base_cases):
|
||||||
index[code] = case
|
index[code] = case
|
||||||
|
|
||||||
for transf in transforms:
|
for transf in transforms:
|
||||||
|
for rev_activated in [False, True]:
|
||||||
for case in base_cases:
|
for case in base_cases:
|
||||||
tr_case = case.transform(transf)
|
tr_case = case.transform(transf)
|
||||||
|
if rev_activated:
|
||||||
|
tr_case.reverse_activated()
|
||||||
code = tr_case.activated_code()
|
code = tr_case.activated_code()
|
||||||
if index[code] is None:
|
if index[code] is None:
|
||||||
index[code] = tr_case
|
index[code] = tr_case
|
||||||
|
|
Loading…
Reference in a new issue