diff options
| author | Anthony LaTorre <telatorre@gmail.com> | 2011-05-06 18:43:38 -0400 |
|---|---|---|
| committer | Anthony LaTorre <telatorre@gmail.com> | 2011-05-06 18:43:38 -0400 |
| commit | 76a6dd33cdaf4b583b7e8353f198925ddb4a4685 (patch) | |
| tree | 5613cd1934763d9f452088f7f905d1fd78fe3b12 /stl.py | |
| parent | 53c20f9b347e9aa3b1844f194d86eb056afc2341 (diff) | |
| download | chroma-76a6dd33cdaf4b583b7e8353f198925ddb4a4685.tar.gz chroma-76a6dd33cdaf4b583b7e8353f198925ddb4a4685.tar.bz2 chroma-76a6dd33cdaf4b583b7e8353f198925ddb4a4685.zip | |
triangle mesh intersection, stl reader, stl model of a lego minifigure
Diffstat (limited to 'stl.py')
| -rw-r--r-- | stl.py | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +import numpy as np + +def pull_vertices(filename): + f = open(filename) + + vertices = [] + for line in f: + if not line.strip().startswith('vertex'): + continue + vertices.append([float(s) for s in line.strip().split()[1:]]) + + return np.array(vertices) + +if __name__ == '__main__': + print pull_vertices('models/MiniFig.STL') |
