mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-06 00:06:03 +08:00
FIX: reverse the logic of narrow area detect
1. Add reorder function for floating concentric jira: STUDIO-11675,STUDIO-11691 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Ia2f5e8d6ca631794fb4bc8f4abcb541f92e52c78
This commit is contained in:
parent
dd796026b3
commit
d42b492439
@ -135,6 +135,16 @@ struct SurfaceFill {
|
||||
ExPolygons no_overlap_expolygons;
|
||||
};
|
||||
|
||||
// BBS: used to judge whether the internal solid infill area is narrow
|
||||
static bool is_narrow_infill_area(const ExPolygon& expolygon)
|
||||
{
|
||||
ExPolygons offsets = offset_ex(expolygon, -scale_(NARROW_INFILL_AREA_THRESHOLD));
|
||||
if (offsets.empty())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<SurfaceFill> group_fills(const Layer &layer)
|
||||
{
|
||||
std::vector<SurfaceFill> surface_fills;
|
||||
@ -384,7 +394,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
||||
auto bbox = get_extents(surface_fills[i].expolygons[j]);
|
||||
auto clipped_internals = ClipperUtils::clip_clipper_polygons_with_subject_bbox(lower_internal_areas, bbox.inflated(scale_(2))); // expand a little
|
||||
auto clipped_internal_bbox = get_extents(clipped_internals);
|
||||
if (is_narrow_expolygon(surface_fills[i].expolygons[j], narrow_threshold)) {
|
||||
if (is_narrow_infill_area(surface_fills[i].expolygons[j])) {
|
||||
if (!clipped_internals.empty() && bbox.overlap(clipped_internal_bbox) && !intersection_ex(offset_ex(surface_fills[i].expolygons[j],SCALED_EPSILON), clipped_internals).empty()) {
|
||||
narrow_floating_expoly_idx.emplace_back(j);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "../format.hpp"
|
||||
#include "FillFloatingConcentric.hpp"
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <libslic3r/ShortestPath.hpp>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@ -855,6 +856,7 @@ FloatingThickPolylines FillFloatingConcentric::fill_surface_arachne_floating(con
|
||||
void FillFloatingConcentric::fill_surface_extrusion(const Surface* surface, const FillParams& params, ExtrusionEntitiesPtr& out)
|
||||
{
|
||||
FloatingThickPolylines floating_lines = this->fill_surface_arachne_floating(surface, params);
|
||||
//reorder_by_shortest_traverse(floating_lines);
|
||||
if (floating_lines.empty())
|
||||
return;
|
||||
Flow new_flow = params.flow.with_spacing(this->spacing);
|
||||
|
Loading…
x
Reference in New Issue
Block a user