"""Build the geometry (tg_geom.py) and compare it with the picture through the fitted camera. python tg_try.py [tag] -> previews/compare/_classes.png, _over.png """ import sys import numpy as np import tg_geom from tg_compare import compare tag = sys.argv[1] if len(sys.argv) > 1 else "try" T, C = [], [] for p in tg_geom.build(): t, c = p.tris() if len(t): T.append(t) C.append(c) print(f"{p.name:14s} verts {len(p.verts):6d} faces {len(p.faces):6d}") compare(np.concatenate(T), np.concatenate(C), tag)