This commit is contained in:
gdamms 2022-10-19 15:55:34 +02:00
parent 7318207dbd
commit e7c6b40143

11
main.py
View file

@ -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: