ldverify.py

changeset 6
6da1e81c5652
parent 3
1dc58f44d556
child 7
0ab0d61ccee8
--- a/ldverify.py	Tue Dec 12 13:46:17 2017 +0200
+++ b/ldverify.py	Wed Dec 20 17:25:09 2017 +0200
@@ -13,5 +13,7 @@
     with open(argv[1], 'r') as file:
         model = read_ldraw(file, libraries = libraries)
         for entry in model:
-            #print(repr(entry))
-            print(entry.textual_representation().strip(), end = '\r\n')
+            if hasattr(entry, 'geometry') and len(entry.geometry) >= 3:
+                print(repr(entry))
+                print(entry.geometry.area())
+            #print(entry.textual_representation().strip(), end = '\r\n')

mercurial