Skip to content

Commit f24c4f3

Browse files
committed
made auto-rotation toggle-able
1 parent 8d356d2 commit f24c4f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stl_tools/numpy2stl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def numpy2stl(A, fn, scale=0.1, mask_val=None, ascii=False,
6565
max_depth=140.,
6666
max_height=150.,
6767
solid=False,
68+
rotate=True,
6869
min_thickness_percent=0.1,
6970
force_python=False):
7071
"""
@@ -100,7 +101,7 @@ def numpy2stl(A, fn, scale=0.1, mask_val=None, ascii=False,
100101
"""
101102

102103
m, n = A.shape
103-
if n >= m:
104+
if n >= m and rotate:
104105
# rotate to best fit a printing platform
105106
A = np.rot90(A, k=3)
106107
m, n = n, m

0 commit comments

Comments
 (0)