mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-22 08:22:58 +00:00
Fix some overhang detection (#15694)
This commit is contained in:
@@ -120,9 +120,6 @@ void LayerRegion::make_perimeters(const SurfaceCollection &slices, const LayerRe
|
||||
fill_no_overlap
|
||||
);
|
||||
|
||||
if (this->layer()->lower_layer != nullptr)
|
||||
// Cummulative sum of polygons over all the regions.
|
||||
g.lower_slices = &this->layer()->lower_layer->lslices;
|
||||
if (this->layer()->upper_layer != NULL)
|
||||
g.upper_slices = &this->layer()->upper_layer->lslices;
|
||||
|
||||
@@ -135,6 +132,13 @@ void LayerRegion::make_perimeters(const SurfaceCollection &slices, const LayerRe
|
||||
g.overhang_flow = this->bridging_flow(frPerimeter, object_config.thick_bridges);
|
||||
g.solid_infill_flow = this->flow(frSolidInfill);
|
||||
|
||||
// Cumulative sum of polygons over all the regions, less what the lower layer could not print.
|
||||
ExPolygons lower_slices;
|
||||
if (this->layer()->lower_layer != nullptr) {
|
||||
lower_slices = g.printable_slices(this->layer()->lower_layer->lslices);
|
||||
g.lower_slices = &lower_slices;
|
||||
}
|
||||
|
||||
if (this->layer()->object()->config().wall_generator.value == PerimeterGeneratorType::Arachne && !spiral_mode)
|
||||
g.process_arachne();
|
||||
else
|
||||
|
||||
@@ -2885,6 +2885,21 @@ bool PerimeterGeneratorLoop::is_internal_contour() const
|
||||
return true;
|
||||
}
|
||||
|
||||
// ORCA: Arachne drops features below min_feature_size, classic builds nothing thinner than a third of the
|
||||
// nozzle. Both describe the layer below, a union of regions sharing neither nozzle nor generator, so every
|
||||
// ambiguity resolves low: it may keep a sliver that was never printed, but it never drops one that was.
|
||||
ExPolygons PerimeterGenerator::printable_slices(const ExPolygons &slices) const
|
||||
{
|
||||
double min_width = *std::min_element(print_config->nozzle_diameter.values.begin(),
|
||||
print_config->nozzle_diameter.values.end()) / 3.;
|
||||
if (object_config->wall_generator.value == PerimeterGeneratorType::Arachne) {
|
||||
const double min_feature_size = Arachne::make_paths_params(layer_id, *object_config, *print_config).min_feature_size;
|
||||
// Spiral vase can put a classic layer under an Arachne one, so there both limits apply.
|
||||
min_width = print_config->spiral_mode ? std::min(min_width, min_feature_size) : min_feature_size;
|
||||
}
|
||||
return min_width > EPSILON ? opening_ex(slices, float(scale_(min_width / 2.))) : slices;
|
||||
}
|
||||
|
||||
std::vector<Polygons> PerimeterGenerator::generate_lower_polygons_series(float width)
|
||||
{
|
||||
float nozzle_diameter = print_config->nozzle_diameter.get_at(config->outer_wall_filament_id - 1);
|
||||
|
||||
@@ -149,6 +149,8 @@ public:
|
||||
//BBS
|
||||
double smaller_width_ext_mm3_per_mm() const { return m_ext_mm3_per_mm_smaller_width; }
|
||||
Polygons lower_slices_polygons() const { return m_lower_slices_polygons; }
|
||||
// ORCA: the slices less the slivers the wall generator prints nothing for, so they never count as support.
|
||||
ExPolygons printable_slices(const ExPolygons &slices) const;
|
||||
|
||||
private:
|
||||
std::vector<Polygons> generate_lower_polygons_series(float width);
|
||||
|
||||
Reference in New Issue
Block a user