Merge branch 'master' of https://github.com/prusa3d/Slic3r into et_selection_rectangle

This commit is contained in:
Enrico Turri 2019-04-26 12:41:32 +02:00
commit 92aab039d2
14 changed files with 1038 additions and 970 deletions

View file

@ -213,7 +213,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("clip_multipart_objects", coBool);
def->label = L("Clip multi-part objects");
def->tooltip = L("When printing multi-material objects, this settings will make slic3r "
def->tooltip = L("When printing multi-material objects, this settings will make Slic3r "
"to clip the overlapping object parts one by the other "
"(2nd part will be clipped by the 1st, 3rd part will be clipped by the 1st and 2nd etc).");
def->mode = comExpert;

View file

@ -674,7 +674,7 @@ void SLAPrint::process()
// Slicing the model object. This method is oversimplified and needs to
// be compared with the fff slicing algorithm for verification
auto slice_model = [this, ilhs, ilh](SLAPrintObject& po) {
auto slice_model = [this, ilhs, ilh, ilhd](SLAPrintObject& po) {
const TriangleMesh& mesh = po.transformed_mesh();
// We need to prepare the slice index...
@ -691,13 +691,15 @@ void SLAPrint::process()
auto maxZs = coord_t(maxZ / SCALING_FACTOR);
po.m_slice_index.clear();
po.m_slice_index.reserve(size_t(maxZs - (minZs + ilhs) / lhs) + 1);
po.m_slice_index.emplace_back(minZs + ilhs, float(minZ) + ilh / 2.f, ilh);
for(coord_t h = minZs + ilhs + lhs; h <= maxZs; h += lhs) {
po.m_slice_index.emplace_back(h, float(h*SCALING_FACTOR) - lh / 2.f, lh);
}
size_t cap = size_t(1 + (maxZs - minZs - ilhs) / lhs);
po.m_slice_index.reserve(cap);
po.m_slice_index.emplace_back(minZs + ilhs, minZ + ilhd / 2.0, ilh);
for(coord_t h = minZs + ilhs + lhs; h <= maxZs; h += lhs)
po.m_slice_index.emplace_back(h, h*SCALING_FACTOR - lhd / 2.0, lh);
// Just get the first record that is form the model:
auto slindex_it =
po.closest_slice_record(po.m_slice_index, float(bb3d.min(Z)));
@ -710,11 +712,8 @@ void SLAPrint::process()
po.m_model_height_levels.clear();
po.m_model_height_levels.reserve(po.m_slice_index.size());
for(auto it = slindex_it; it != po.m_slice_index.end(); ++it)
{
po.m_model_height_levels.emplace_back(it->slice_level());
}
// mesh.require_shared_vertices(); // TriangleMeshSlicer needs this
TriangleMeshSlicer slicer(&mesh);
po.m_model_slices.clear();