mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
FIX: tree support detect overhang inaccurate
Jira: STUDIO-3657
Change-Id: I1ef4ca3ec299b121eb467afc12acee68e0f12b39
(cherry picked from commit 36f8937ae0d0d79c7558662903fffef20b528cb8)
(cherry picked from commit a631e6cb99
)
This commit is contained in:
parent
715e8e1c32
commit
c199730004
1 changed files with 2 additions and 8 deletions
|
@ -800,20 +800,15 @@ void TreeSupport::detect_overhangs(bool check_support_necessity/* = false*/)
|
|||
ExPolygons lower_layer_offseted = offset_ex(lower_polys, support_offset_scaled, SUPPORT_SURFACES_OFFSET_PARAMETERS);
|
||||
ExPolygons overhang_areas = diff_ex(curr_polys, lower_layer_offseted);
|
||||
|
||||
overhang_areas.erase(std::remove_if(overhang_areas.begin(), overhang_areas.end(),
|
||||
[extrusion_width_scaled](ExPolygon& area) { return offset_ex(area, -0.1 * extrusion_width_scaled).empty(); }),
|
||||
overhang_areas.end());
|
||||
|
||||
|
||||
if (is_auto(stype) && g_config_support_sharp_tails)
|
||||
{
|
||||
// BBS detect sharp tail
|
||||
for (const ExPolygon* expoly : curr_poly_ptrs) {
|
||||
bool is_sharp_tail = false;
|
||||
// 1. nothing below
|
||||
// this is a sharp tail region if it's small but non-ignorable
|
||||
// this is a sharp tail region if it's floating and non-ignorable
|
||||
if (!overlaps(offset_ex(*expoly, 0.5 * extrusion_width_scaled), lower_polys)) {
|
||||
is_sharp_tail = expoly->area() < area_thresh_well_supported && !offset_ex(*expoly, -0.1 * extrusion_width_scaled).empty();
|
||||
is_sharp_tail = !offset_ex(*expoly, -0.1 * extrusion_width_scaled).empty();
|
||||
}
|
||||
|
||||
if (is_sharp_tail) {
|
||||
|
@ -834,7 +829,6 @@ void TreeSupport::detect_overhangs(bool check_support_necessity/* = false*/)
|
|||
|
||||
SupportLayer* ts_layer = m_object->get_support_layer(layer_nr + m_raft_layers);
|
||||
for (ExPolygon& poly : overhang_areas) {
|
||||
if (offset_ex(poly, -0.1 * extrusion_width_scaled).empty()) continue;
|
||||
ts_layer->overhang_areas.emplace_back(poly);
|
||||
|
||||
// check cantilever
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue