mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-09 21:59:08 +08:00
Fixed trimming of support volumes by objects for the soluble supports
and for the raft contact layer over soluble supports. https://github.com/prusa3d/Slic3r/issues/120
This commit is contained in:
parent
35490216a7
commit
d2d7c5bead
@ -268,7 +268,7 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
|
|||||||
MyLayersPtr intermediate_layers = this->raft_and_intermediate_support_layers(
|
MyLayersPtr intermediate_layers = this->raft_and_intermediate_support_layers(
|
||||||
object, bottom_contacts, top_contacts, layer_storage, max_object_layer_height);
|
object, bottom_contacts, top_contacts, layer_storage, max_object_layer_height);
|
||||||
|
|
||||||
this->trim_support_layers_by_object(object, top_contacts, m_support_layer_height_min, 0., m_gap_xy);
|
this->trim_support_layers_by_object(object, top_contacts, m_slicing_params.soluble_interface ? 0. : m_support_layer_height_min, 0., m_gap_xy);
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << "Support generator - Creating base layers";
|
BOOST_LOG_TRIVIAL(info) << "Support generator - Creating base layers";
|
||||||
|
|
||||||
@ -683,13 +683,17 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::top_contact_
|
|||||||
new_layer.idx_object_layer_above = layer_id;
|
new_layer.idx_object_layer_above = layer_id;
|
||||||
if (m_slicing_params.soluble_interface) {
|
if (m_slicing_params.soluble_interface) {
|
||||||
// Align the contact surface height with a layer immediately below the supported layer.
|
// Align the contact surface height with a layer immediately below the supported layer.
|
||||||
new_layer.height = layer_below ?
|
new_layer.print_z = layer.print_z - layer.height;
|
||||||
// Interface layer will be synchronized with the object.
|
if (layer_id == 0) {
|
||||||
object.layers[layer_id-1]->height :
|
// This is a raft contact layer sitting directly on the print bed.
|
||||||
// Don't know the thickness of the raft layer yet.
|
new_layer.height = m_slicing_params.contact_raft_layer_height;
|
||||||
0.;
|
new_layer.bottom_z = m_slicing_params.raft_interface_top_z;
|
||||||
new_layer.print_z = layer.print_z - layer.height;
|
} else {
|
||||||
new_layer.bottom_z = new_layer.print_z - new_layer.height;
|
// Interface layer will be synchronized with the object.
|
||||||
|
assert(layer_below != nullptr);
|
||||||
|
new_layer.height = object.layers[layer_id - 1]->height;
|
||||||
|
new_layer.bottom_z = new_layer.print_z - new_layer.height;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Contact layer will be printed with a normal flow, but
|
// Contact layer will be printed with a normal flow, but
|
||||||
// it will support layers printed with a bridging flow.
|
// it will support layers printed with a bridging flow.
|
||||||
@ -958,7 +962,7 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::bottom_conta
|
|||||||
std::reverse(bottom_contacts.begin(), bottom_contacts.end());
|
std::reverse(bottom_contacts.begin(), bottom_contacts.end());
|
||||||
} // ! top_contacts.empty()
|
} // ! top_contacts.empty()
|
||||||
|
|
||||||
trim_support_layers_by_object(object, bottom_contacts, m_support_layer_height_min, 0., m_gap_xy);
|
trim_support_layers_by_object(object, bottom_contacts, m_slicing_params.soluble_interface ? 0. : m_support_layer_height_min, 0., m_gap_xy);
|
||||||
|
|
||||||
return bottom_contacts;
|
return bottom_contacts;
|
||||||
}
|
}
|
||||||
@ -1269,7 +1273,7 @@ void PrintObjectSupportMaterial::generate_base_layers(
|
|||||||
++ iRun;
|
++ iRun;
|
||||||
#endif /* SLIC3R_DEBUG */
|
#endif /* SLIC3R_DEBUG */
|
||||||
|
|
||||||
trim_support_layers_by_object(object, intermediate_layers, m_support_layer_height_min, m_support_layer_height_min, m_gap_xy);
|
trim_support_layers_by_object(object, intermediate_layers, m_slicing_params.soluble_interface ? 0. : m_support_layer_height_min, m_slicing_params.soluble_interface ? 0. : m_support_layer_height_min, m_gap_xy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintObjectSupportMaterial::trim_support_layers_by_object(
|
void PrintObjectSupportMaterial::trim_support_layers_by_object(
|
||||||
@ -1288,8 +1292,8 @@ void PrintObjectSupportMaterial::trim_support_layers_by_object(
|
|||||||
(it_layer - support_layers.begin()) << " of " << support_layers.size();
|
(it_layer - support_layers.begin()) << " of " << support_layers.size();
|
||||||
|
|
||||||
MyLayer &support_layer = *(*it_layer);
|
MyLayer &support_layer = *(*it_layer);
|
||||||
if (support_layer.polygons.empty())
|
if (support_layer.polygons.empty() || support_layer.print_z < m_slicing_params.raft_contact_top_z + EPSILON)
|
||||||
// Empty support layer, nothing to trim.
|
// Empty support layer or a raft layer, nothing to trim.
|
||||||
continue;
|
continue;
|
||||||
// Find the overlapping object layers including the extra above / below gap.
|
// Find the overlapping object layers including the extra above / below gap.
|
||||||
while (idx_object_layer_overlapping < object.layer_count() &&
|
while (idx_object_layer_overlapping < object.layer_count() &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user