NEW: Open "Bottom Z distance" setting for users

Users can set distance between support bottom contacts and object
once enable normal/tree support.

Jira: STUDIO-1383

TODO:Func seems good though, some details (e.g., bottom_interface
detection) need to be optimized furthur. Will keep follow-up.

Change-Id: I85815e7aa6cf1a5d0249633cd8ab995873461e8a
(cherry picked from commit eab39e89c94d749ebe6266ab745cbb70a068277d)
This commit is contained in:
MusangKing 2022-11-20 22:45:29 +08:00 committed by Lane.Wei
parent 63ea4179e4
commit 2a8fe9ec54
11 changed files with 25 additions and 10 deletions

View file

@ -2150,9 +2150,12 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
{
if (layer_nr >= bottom_interface_layers + bottom_gap_layers)
{
const Layer* below_layer = m_object->get_layer(layer_nr - bottom_interface_layers);
ExPolygons bottom_interface = std::move(intersection_ex(base_areas, below_layer->lslices));
floor_areas.insert(floor_areas.end(), bottom_interface.begin(), bottom_interface.end());
for (size_t i = 0; i <= bottom_gap_layers; i++)
{
const Layer* below_layer = m_object->get_layer(layer_nr - bottom_interface_layers - i);
ExPolygons bottom_interface = std::move(intersection_ex(base_areas, below_layer->lslices));
floor_areas.insert(floor_areas.end(), bottom_interface.begin(), bottom_interface.end());
}
}
if (floor_areas.empty() == false) {
floor_areas = std::move(diff_ex(floor_areas, avoid_region_interface));