diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-05-24 15:38:05 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-05-24 15:38:05 +0300 |
commit | 9f3a05eef3beea17ab566137cdbb83d3e1c2d9c9 (patch) | |
tree | ea484ef32b69340af4fd061f32080fedf270b24b /src | |
parent | abdd76de4402e6e3bde09c0a5a483f794c2cf6ce (diff) |
Fixed false detection of out of print volume for sla supports
Diffstat (limited to 'src')
-rw-r--r-- | src/slic3r/GUI/GLCanvas3D.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 161cdea0c..b8ca905d2 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -2022,7 +2022,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re if (it->new_geometry()) instances[istep].emplace_back(std::pair<size_t, size_t>(instance_idx, print_instance_idx)); else - // Recycling an old GLVolume. Update the Object/Instance indices into the current Model. + // Recycling an old GLVolume. Update the Object/Instance indices into the current Model. m_volumes.volumes[it->volume_idx]->composite_id = GLVolume::CompositeID(object_idx, m_volumes.volumes[it->volume_idx]->volume_idx(), instance_idx); } } @@ -5498,6 +5498,7 @@ void GLCanvas3D::_load_sla_shells() v.set_instance_offset(unscale(instance.shift(0), instance.shift(1), 0)); v.set_instance_rotation(Vec3d(0.0, 0.0, (double)instance.rotation)); v.set_instance_mirror(X, object.is_left_handed() ? -1. : 1.); + v.set_convex_hull(new TriangleMesh(std::move(mesh.convex_hull_3d())), true); }; // adds objects' volumes @@ -5512,7 +5513,7 @@ void GLCanvas3D::_load_sla_shells() if (obj->is_step_done(slaposSupportTree) && obj->has_mesh(slaposSupportTree)) add_volume(*obj, -int(slaposSupportTree), instance, obj->support_mesh(), GLVolume::SLA_SUPPORT_COLOR, true); if (obj->is_step_done(slaposBasePool) && obj->has_mesh(slaposBasePool)) - add_volume(*obj, -int(slaposBasePool), instance, obj->pad_mesh(), GLVolume::SLA_PAD_COLOR, true); + add_volume(*obj, -int(slaposBasePool), instance, obj->pad_mesh(), GLVolume::SLA_PAD_COLOR, false); } double shift_z = obj->get_current_elevation(); for (unsigned int i = initial_volumes_count; i < m_volumes.volumes.size(); ++ i) { @@ -5635,7 +5636,7 @@ void GLCanvas3D::_update_sla_shells_outside_state() for (GLVolume* volume : m_volumes.volumes) { - volume->is_outside = ((print_volume.radius() > 0.0) && volume->is_sla_support()) ? !print_volume.contains(volume->transformed_convex_hull_bounding_box()) : false; + volume->is_outside = ((print_volume.radius() > 0.0) && volume->shader_outside_printer_detection_enabled) ? !print_volume.contains(volume->transformed_convex_hull_bounding_box()) : false; } } |