mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Detection of curled edges to enhance slowdown for overhangs algorithm (#2056)
* Overhang perimeter handling Updated code to handle overhang perimeters as an overhang and not as a bridge. * Preparing to add curled extrusions identification * Porting curling calculations from Prusa Slier 2.6.1 * Prototype 1 - slowdown extended to detect curled edges and further reduce speed First prototype of the code submitted. * Working prototype - 2 Code is now finally working - external perimeters are slowed down as needed when there is likelyhood of curling up. ToDo: 1. Reslicing the model causes the algorithm not to run - need to find where this fails to trigger the call for this. 2. Slowdown of internal perimeters not working yet. * Updated to use overhang wall speed instead of bridging speed for this algorithm * Fixed bug in speed calculation and tweaked parameters for high speed printer Fixed bug in speed calculation and tweaked parameters for high speed printer * Attempting to fix "set started" not being set * Parameter tweak after print tests * Fixed estimation not running when model is re-sliced. * Removing debug printf statements and fixed threading flag. * Fixed threading * Parameter tweaks following print tests * Made this as an option in the GUI * Reintroduced handling of bridges as per original design * UI line toggling when option makes sense to be visible. * Fixed bug in field visibility & made it default to off * Code optimisation --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
bcedb431ab
commit
61437b2c76
16 changed files with 322 additions and 143 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "MutablePolygon.hpp"
|
||||
#include "PrintConfig.hpp"
|
||||
#include "SupportMaterial.hpp"
|
||||
#include "SupportSpotsGenerator.hpp"
|
||||
#include "Support/TreeSupport.hpp"
|
||||
#include "Surface.hpp"
|
||||
#include "Slicing.hpp"
|
||||
|
@ -499,6 +500,25 @@ void PrintObject::generate_support_material()
|
|||
}
|
||||
}
|
||||
|
||||
void PrintObject::estimate_curled_extrusions()
|
||||
{
|
||||
if (this->set_started(posEstimateCurledExtrusions)) {
|
||||
if ( std::any_of(this->print()->m_print_regions.begin(), this->print()->m_print_regions.end(),
|
||||
[](const PrintRegion *region) { return region->config().enable_overhang_speed.getBool(); })) {
|
||||
|
||||
// Estimate curling of support material and add it to the malformaition lines of each layer
|
||||
float support_flow_width = support_material_flow(this, this->config().layer_height).width();
|
||||
SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values,
|
||||
float(this->print()->m_config.inner_wall_acceleration.getFloat()),
|
||||
this->config().raft_layers.getInt(), this->config().brim_type.value,
|
||||
float(this->config().brim_width.getFloat())};
|
||||
SupportSpotsGenerator::estimate_malformations(this->layers(), params);
|
||||
m_print->throw_if_canceled();
|
||||
}
|
||||
//this->set_done(posEstimateCurledExtrusions);
|
||||
}
|
||||
}
|
||||
|
||||
void PrintObject::simplify_extrusion_path()
|
||||
{
|
||||
if (this->set_started(posSimplifyPath)) {
|
||||
|
@ -756,6 +776,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "raft_contact_distance"
|
||||
|| opt_key == "slice_closing_radius"
|
||||
|| opt_key == "slicing_mode"
|
||||
|| opt_key == "slowdown_for_curled_perimeters"
|
||||
|| opt_key == "make_overhang_printable"
|
||||
|| opt_key == "make_overhang_printable_angle"
|
||||
|| opt_key == "make_overhang_printable_hole_size") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue