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') |