diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2019-07-09 14:21:26 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2019-07-09 14:21:26 +0300 |
commit | af89bcee5399c55674f35494158916253240cf17 (patch) | |
tree | d622405f7a8d363f37747e37c368cb15097e138c /src/libslic3r/SLA | |
parent | f0ac54ba32793163d49a89407d89281e12d4b5ea (diff) | |
parent | 18fcb6468120d76e524ea54e4a0cf569bf19292c (diff) |
Merge branch 'master' into tm_builtin_pad
Diffstat (limited to 'src/libslic3r/SLA')
-rw-r--r-- | src/libslic3r/SLA/SLABasePool.cpp | 1 | ||||
-rw-r--r-- | src/libslic3r/SLA/SLASupportTree.cpp | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libslic3r/SLA/SLABasePool.cpp b/src/libslic3r/SLA/SLABasePool.cpp index 55b2e0e5b..4ce84ba02 100644 --- a/src/libslic3r/SLA/SLABasePool.cpp +++ b/src/libslic3r/SLA/SLABasePool.cpp @@ -673,6 +673,7 @@ void base_plate(const TriangleMesh & mesh, const std::vector<float> &heights, ThrowOnCancel thrfn) { + if (mesh.empty()) return; // m.require_shared_vertices(); // TriangleMeshSlicer needs this TriangleMeshSlicer slicer(&mesh); diff --git a/src/libslic3r/SLA/SLASupportTree.cpp b/src/libslic3r/SLA/SLASupportTree.cpp index 4de5c4c59..4751dad6c 100644 --- a/src/libslic3r/SLA/SLASupportTree.cpp +++ b/src/libslic3r/SLA/SLASupportTree.cpp @@ -896,7 +896,6 @@ public: merged.merge(bs.mesh); } - if(m_ctl.stopcondition()) { // In case of failure we have to return an empty mesh meshcache = TriangleMesh(); @@ -907,7 +906,7 @@ public: // The mesh will be passed by const-pointer to TriangleMeshSlicer, // which will need this. - meshcache.require_shared_vertices(); + if (!meshcache.empty()) meshcache.require_shared_vertices(); // TODO: Is this necessary? //meshcache.repair(); @@ -2514,7 +2513,7 @@ std::vector<ExPolygons> SLASupportTree::slice(float layerh, float init_layerh) c TriangleMesh fullmesh = m_impl->merged_mesh(); fullmesh.merge(get_pad()); - fullmesh.require_shared_vertices(); // TriangleMeshSlicer needs this + if (!fullmesh.empty()) fullmesh.require_shared_vertices(); TriangleMeshSlicer slicer(&fullmesh); std::vector<ExPolygons> ret; slicer.slice(heights, 0.f, &ret, get().ctl().cancelfn); @@ -2527,7 +2526,7 @@ std::vector<ExPolygons> SLASupportTree::slice(const std::vector<float> &heights, { TriangleMesh fullmesh = m_impl->merged_mesh(); fullmesh.merge(get_pad()); - fullmesh.require_shared_vertices(); // TriangleMeshSlicer needs this + if (!fullmesh.empty()) fullmesh.require_shared_vertices(); TriangleMeshSlicer slicer(&fullmesh); std::vector<ExPolygons> ret; slicer.slice(heights, cr, &ret, get().ctl().cancelfn); |