Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2019-07-09 14:12:55 +0300
committertamasmeszaros <meszaros.q@gmail.com>2019-07-09 14:12:55 +0300
commit18fcb6468120d76e524ea54e4a0cf569bf19292c (patch)
tree7669f21e8d8e5da1c393ab6b9923ac1c557604fc /src/libslic3r/SLA
parent386a42b4c5aea6d7beeb55831c706d3680a77eb6 (diff)
Fixing broken SLA slicing: SPE-984
Diffstat (limited to 'src/libslic3r/SLA')
-rw-r--r--src/libslic3r/SLA/SLABasePool.cpp6
-rw-r--r--src/libslic3r/SLA/SLASupportTree.cpp7
2 files changed, 6 insertions, 7 deletions
diff --git a/src/libslic3r/SLA/SLABasePool.cpp b/src/libslic3r/SLA/SLABasePool.cpp
index 04cbd7824..b1fbec839 100644
--- a/src/libslic3r/SLA/SLABasePool.cpp
+++ b/src/libslic3r/SLA/SLABasePool.cpp
@@ -510,9 +510,9 @@ ExPolygons concave_hull(const ExPolygons& polys, double max_dist_mm = 50,
void base_plate(const TriangleMesh &mesh, ExPolygons &output, float h,
float layerh, ThrowOnCancel thrfn)
{
- TriangleMesh m = mesh;
- m.require_shared_vertices(); // TriangleMeshSlicer needs this
- TriangleMeshSlicer slicer(&m);
+ if (mesh.empty()) return;
+
+ TriangleMeshSlicer slicer(&mesh);
auto bb = mesh.bounding_box();
float gnd = float(bb.min(Z));
diff --git a/src/libslic3r/SLA/SLASupportTree.cpp b/src/libslic3r/SLA/SLASupportTree.cpp
index ae033c62f..1f7ef07cb 100644
--- a/src/libslic3r/SLA/SLASupportTree.cpp
+++ b/src/libslic3r/SLA/SLASupportTree.cpp
@@ -808,7 +808,6 @@ public:
merged.merge(bs.mesh);
}
-
if(m_ctl.stopcondition()) {
// In case of failure we have to return an empty mesh
meshcache = TriangleMesh();
@@ -819,7 +818,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();
@@ -2245,7 +2244,7 @@ SlicedSupports SLASupportTree::slice(float layerh, float init_layerh) const
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);
SlicedSupports ret;
slicer.slice(heights, 0.f, &ret, get().ctl().cancelfn);
@@ -2258,7 +2257,7 @@ SlicedSupports 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);
SlicedSupports ret;
slicer.slice(heights, cr, &ret, get().ctl().cancelfn);