Commit 0cae044e authored by Guillaume Seguin's avatar Guillaume Seguin

Fix STL export after numpy rewrite

parent 3a06a2eb
...@@ -51,12 +51,11 @@ def emitstl(filename, facets = [], objname = "stltool_export", binary = 1): ...@@ -51,12 +51,11 @@ def emitstl(filename, facets = [], objname = "stltool_export", binary = 1):
buf = "".join(["\0"] * 80) buf = "".join(["\0"] * 80)
buf += struct.pack("<I", len(facets)) buf += struct.pack("<I", len(facets))
facetformat = struct.Struct("<ffffffffffffH") facetformat = struct.Struct("<ffffffffffffH")
for i in facets: for facet in facets:
l = list(i[0][:]) l = list(facet[0][:])
for j in i[1]: for vertex in facet[1]:
l += j[:] l += list(vertex[:])
l += [0] l.append(0)
# print len(l)
buf += facetformat.pack(*l) buf += facetformat.pack(*l)
f.write(buf) f.write(buf)
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment