summaryrefslogtreecommitdiff
path: root/stl.py
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-06-19 18:29:27 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-06-19 18:29:27 -0400
commita149f96a766c4d8d63919535cc468c539036165e (patch)
treefa6eece7b811e098e58fc4aa53d97a8c3dc1885e /stl.py
parentad56515169bab5f069344e960d9582412c3672f4 (diff)
downloadchroma-a149f96a766c4d8d63919535cc468c539036165e.tar.gz
chroma-a149f96a766c4d8d63919535cc468c539036165e.tar.bz2
chroma-a149f96a766c4d8d63919535cc468c539036165e.zip
reverse the face orientation on all triangles in the stl files exported from sketchup.
Diffstat (limited to 'stl.py')
-rw-r--r--stl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/stl.py b/stl.py
index 9bd3a38..f88c3fa 100644
--- a/stl.py
+++ b/stl.py
@@ -60,7 +60,7 @@ def mesh_from_binary_stl(filename):
ntriangles = struct.unpack('<I', f.read(4))[0]
for i in range(ntriangles):
- f.read(12)
+ normal = tuple(struct.unpack('<fff', f.read(12)))
triangle = [None]*3
for j in range(3):