mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 18:58:00 -06:00
FIX: improve cantilever detection of tree support
github: #3667 Change-Id: I5fd6d7d5a6e80aaa563f7d033381e6b8cb9093e0 (cherry picked from commit 3f5fdf82dcaa8636d295794a1113aab78f7327af) (cherry picked from commit 58bba45bc2294ac80c624c0032bfa284228eaa2f)
This commit is contained in:
parent
562dc76ab0
commit
715e8e1c32
1 changed files with 3 additions and 1 deletions
|
@ -778,6 +778,7 @@ void TreeSupport::detect_overhangs(bool check_support_necessity/* = false*/)
|
|||
|
||||
Layer* lower_layer = layer->lower_layer;
|
||||
coordf_t lower_layer_offset = layer_nr < enforce_support_layers ? -0.15 * extrusion_width : (float)lower_layer->height / tan(threshold_rad);
|
||||
//lower_layer_offset = std::min(lower_layer_offset, extrusion_width);
|
||||
coordf_t support_offset_scaled = scale_(lower_layer_offset);
|
||||
// Filter out areas whose diameter that is smaller than extrusion_width. Do not use offset2() for this purpose!
|
||||
ExPolygons lower_polys;
|
||||
|
@ -838,7 +839,8 @@ void TreeSupport::detect_overhangs(bool check_support_necessity/* = false*/)
|
|||
|
||||
// check cantilever
|
||||
{
|
||||
auto cluster_boundary_ex = intersection_ex(poly, offset_ex(lower_layer->lslices, scale_(0.5)));
|
||||
// lower_layer_offset may be very small, so we need to do max and then add 0.1
|
||||
auto cluster_boundary_ex = intersection_ex(poly, offset_ex(lower_layer->lslices, scale_(std::max(extrusion_width,lower_layer_offset)+0.1)));
|
||||
Polygons cluster_boundary = to_polygons(cluster_boundary_ex);
|
||||
if (cluster_boundary.empty()) continue;
|
||||
double dist_max = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue