diff options
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') |