From 9ad5d9bb3d1c61b703d2e56a2a547d363a7f64a2 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 28 Jan 2015 23:35:00 +0100 Subject: [PATCH] Fixed minor issue in 3D preview causing single-line toolpaths to miss the cap on one endpoint --- xs/src/libslic3r/GUI/3DScene.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xs/src/libslic3r/GUI/3DScene.cpp b/xs/src/libslic3r/GUI/3DScene.cpp index d7513d2fe..5f61b37b3 100644 --- a/xs/src/libslic3r/GUI/3DScene.cpp +++ b/xs/src/libslic3r/GUI/3DScene.cpp @@ -147,7 +147,9 @@ _3DScene::_extrusionentity_to_verts_do(const Lines &lines, const std::vectorpush_norm(xy_left_normal); qverts->push_vert(a2.x, a2.y, middle_z); - } else if (i == lines.size()-1) { + } + // we don't use 'else' because both cases are true if we have only one line + if (i == lines.size()-1) { // normal pointing downwards qverts->push_norm(0,0,-1); qverts->push_vert(b.x, b.y, bottom_z);