ldverify.py

changeset 6
6da1e81c5652
parent 3
1dc58f44d556
child 7
0ab0d61ccee8
equal deleted inserted replaced
5:e340e35d6e4c 6:6da1e81c5652
11 from sys import argv 11 from sys import argv
12 libraries = [{'path': '/home/teemu/ldraw', 'role': 'official'}] 12 libraries = [{'path': '/home/teemu/ldraw', 'role': 'official'}]
13 with open(argv[1], 'r') as file: 13 with open(argv[1], 'r') as file:
14 model = read_ldraw(file, libraries = libraries) 14 model = read_ldraw(file, libraries = libraries)
15 for entry in model: 15 for entry in model:
16 #print(repr(entry)) 16 if hasattr(entry, 'geometry') and len(entry.geometry) >= 3:
17 print(entry.textual_representation().strip(), end = '\r\n') 17 print(repr(entry))
18 print(entry.geometry.area())
19 #print(entry.textual_representation().strip(), end = '\r\n')

mercurial