summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-08-16 17:26:09 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-08-16 17:26:09 -0400
commit5fb850b72334fe61c72608bd74a8d3b792a800a5 (patch)
treedce9960f6dadcf171503b9dce450a21f8a216490
parent316cc62018ab3922bca0367ef7132ba93a42bbbf (diff)
downloadchroma-5fb850b72334fe61c72608bd74a8d3b792a800a5.tar.gz
chroma-5fb850b72334fe61c72608bd74a8d3b792a800a5.tar.bz2
chroma-5fb850b72334fe61c72608bd74a8d3b792a800a5.zip
add document\ation to stl.py.
-rw-r--r--stl.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/stl.py b/stl.py
index 9a63306..9bc14de 100644
--- a/stl.py
+++ b/stl.py
@@ -5,6 +5,7 @@ from geometry import Mesh
import bz2
def mesh_from_stl(filename):
+ "Return a mesh from an stl file."
if filename.endswith('.bz2'):
f = bz2.BZ2File(filename)
else:
@@ -19,6 +20,7 @@ def mesh_from_stl(filename):
return mesh_from_ascii_stl(filename)
def mesh_from_ascii_stl(filename):
+ "Return a mesh from an ascii stl file."
if filename.endswith('.bz2'):
f = bz2.BZ2File(filename)
else:
@@ -57,6 +59,7 @@ def mesh_from_ascii_stl(filename):
return Mesh(np.array(vertices), np.array(triangles, dtype=np.uint32))
def mesh_from_binary_stl(filename):
+ "Return a mesh from a binary stl file."
f = open(filename)
vertices = []