Commit 3822f076 authored by Guillaume Seguin's avatar Guillaume Seguin

Sort models in gcodeplater to print smaller ones first

parent ebaf4c6c
......@@ -72,6 +72,8 @@ class GcodePlater(Plater):
with open(name, "w") as f:
models = self.models.values()
last_real_position = None
# Sort models by Z max to print smaller objects first
models.sort(key = lambda x: x.dims[-1])
for model in models:
r = model.rot # no rotation support for now
if r != 0:
......
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