From e7c6b401437e0d5abd2f1259e962793251a3e76b Mon Sep 17 00:00:00 2001 From: gdamms Date: Wed, 19 Oct 2022 15:55:34 +0200 Subject: [PATCH] :) --- main.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 5f1674b..97a91be 100644 --- a/main.py +++ b/main.py @@ -356,7 +356,7 @@ class MAPS(obja.Model): break if not broke: - raise Exception('Ring not corrupted') + raise Exception('Ring corrupted') return ring @@ -688,8 +688,12 @@ class MAPS(obja.Model): # Check if point is in triangle return (u >= 0) and (v >= 0) and (u + v < 1) - def debug(self, output): + def debug(self, output: io.TextIOWrapper) -> None: + """Debug function to plot colors + Args: + output (io.TextIOWrapper): output file + """ self.update() priorities = self.compute_priority() @@ -718,6 +722,7 @@ class MAPS(obja.Model): if vertex is None: continue self.operations.append(('av', i, vertex.to_obja())) + self.operations.reverse() # Write the result in output file @@ -830,7 +835,7 @@ class MAPS(obja.Model): ) -def main(args): +def main(args: argparse.Namespace) -> None: """Run MAPS model compression Args: