mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Improve flow rate calibration: use ipArchimedeanChords pattern for flow rate calibration (#8993)
* Use ipArchimedeanChords pattern for flow rate calibration * Merge branch 'main' into feature/different_pattern_flowrate * improve order * Merge branch 'main' into feature/different_pattern_flowrate
This commit is contained in:
parent
782adafc39
commit
5dac629712
5 changed files with 28 additions and 6 deletions
|
@ -153,6 +153,12 @@ void Fill::fill_surface_extrusion(const Surface* surface, const FillParams& para
|
||||||
out.push_back(eec = new ExtrusionEntityCollection());
|
out.push_back(eec = new ExtrusionEntityCollection());
|
||||||
// Only concentric fills are not sorted.
|
// Only concentric fills are not sorted.
|
||||||
eec->no_sort = this->no_sort();
|
eec->no_sort = this->no_sort();
|
||||||
|
// ORCA: special flag for flow rate calibration
|
||||||
|
auto is_flow_calib = params.extrusion_role == erTopSolidInfill && this->print_object_config->has("calib_flowrate_topinfill_special_order") &&
|
||||||
|
this->print_object_config->option("calib_flowrate_topinfill_special_order")->getBool();
|
||||||
|
if (is_flow_calib) {
|
||||||
|
eec->no_sort = true;
|
||||||
|
}
|
||||||
size_t idx = eec->entities.size();
|
size_t idx = eec->entities.size();
|
||||||
if (params.use_arachne) {
|
if (params.use_arachne) {
|
||||||
Flow new_flow = params.flow.with_spacing(float(this->spacing));
|
Flow new_flow = params.flow.with_spacing(float(this->spacing));
|
||||||
|
@ -165,11 +171,16 @@ void Fill::fill_surface_extrusion(const Surface* surface, const FillParams& para
|
||||||
params.extrusion_role,
|
params.extrusion_role,
|
||||||
flow_mm3_per_mm, float(flow_width), params.flow.height());
|
flow_mm3_per_mm, float(flow_width), params.flow.height());
|
||||||
}
|
}
|
||||||
if (!params.can_reverse) {
|
|
||||||
|
if (is_flow_calib) {
|
||||||
for (size_t i = idx; i < eec->entities.size(); i++)
|
for (size_t i = idx; i < eec->entities.size(); i++)
|
||||||
eec->entities[i]->set_reverse();
|
eec->entities[i]->reverse();
|
||||||
|
} else {
|
||||||
|
if (!params.can_reverse) {
|
||||||
|
for (size_t i = idx; i < eec->entities.size(); i++)
|
||||||
|
eec->entities[i]->set_reverse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Orca: run gap fill
|
// Orca: run gap fill
|
||||||
this->_create_gap_fill(surface, params, eec);
|
this->_create_gap_fill(surface, params, eec);
|
||||||
}
|
}
|
||||||
|
|
|
@ -835,7 +835,7 @@ static std::vector<std::string> s_Preset_print_options {
|
||||||
"hole_to_polyhole", "hole_to_polyhole_threshold", "hole_to_polyhole_twisted", "mmu_segmented_region_max_width", "mmu_segmented_region_interlocking_depth",
|
"hole_to_polyhole", "hole_to_polyhole_threshold", "hole_to_polyhole_twisted", "mmu_segmented_region_max_width", "mmu_segmented_region_interlocking_depth",
|
||||||
"small_area_infill_flow_compensation", "small_area_infill_flow_compensation_model",
|
"small_area_infill_flow_compensation", "small_area_infill_flow_compensation_model",
|
||||||
"seam_slope_type", "seam_slope_conditional", "scarf_angle_threshold", "scarf_joint_speed", "scarf_joint_flow_ratio", "seam_slope_start_height", "seam_slope_entire_loop", "seam_slope_min_length", "seam_slope_steps", "seam_slope_inner_walls", "scarf_overhang_threshold",
|
"seam_slope_type", "seam_slope_conditional", "scarf_angle_threshold", "scarf_joint_speed", "scarf_joint_flow_ratio", "seam_slope_start_height", "seam_slope_entire_loop", "seam_slope_min_length", "seam_slope_steps", "seam_slope_inner_walls", "scarf_overhang_threshold",
|
||||||
"interlocking_beam", "interlocking_orientation", "interlocking_beam_layer_count", "interlocking_depth", "interlocking_boundary_avoidance", "interlocking_beam_width",
|
"interlocking_beam", "interlocking_orientation", "interlocking_beam_layer_count", "interlocking_depth", "interlocking_boundary_avoidance", "interlocking_beam_width","calib_flowrate_topinfill_special_order"
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::vector<std::string> s_Preset_filament_options {
|
static std::vector<std::string> s_Preset_filament_options {
|
||||||
|
|
|
@ -3206,6 +3206,11 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionInt(2));
|
def->set_default_value(new ConfigOptionInt(2));
|
||||||
|
|
||||||
|
// ORCA: special flag for flow rate calibration
|
||||||
|
def = this->add("calib_flowrate_topinfill_special_order", coBool);
|
||||||
|
def->mode = comDevelop;
|
||||||
|
def->set_default_value(new ConfigOptionBool(false));
|
||||||
|
|
||||||
def = this->add("ironing_type", coEnum);
|
def = this->add("ironing_type", coEnum);
|
||||||
def->label = L("Ironing Type");
|
def->label = L("Ironing Type");
|
||||||
def->category = L("Quality");
|
def->category = L("Quality");
|
||||||
|
|
|
@ -907,6 +907,10 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||||
((ConfigOptionInt, interlocking_depth))
|
((ConfigOptionInt, interlocking_depth))
|
||||||
((ConfigOptionInt, interlocking_boundary_avoidance))
|
((ConfigOptionInt, interlocking_boundary_avoidance))
|
||||||
|
|
||||||
|
// Orca: internal use only
|
||||||
|
((ConfigOptionBool, calib_flowrate_topinfill_special_order)) // ORCA: special flag for flow rate calibration
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// This object is mapped to Perl as Slic3r::Config::PrintRegion.
|
// This object is mapped to Perl as Slic3r::Config::PrintRegion.
|
||||||
|
|
|
@ -9794,7 +9794,7 @@ void Plater::_calib_pa_select_added_objects() {
|
||||||
// For linear mode, pass 1 means normal version while pass 2 mean "for perfectionists" version
|
// For linear mode, pass 1 means normal version while pass 2 mean "for perfectionists" version
|
||||||
void adjust_settings_for_flowrate_calib(ModelObjectPtrs& objects, bool linear, int pass)
|
void adjust_settings_for_flowrate_calib(ModelObjectPtrs& objects, bool linear, int pass)
|
||||||
{
|
{
|
||||||
auto print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
auto print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
||||||
auto printerConfig = &wxGetApp().preset_bundle->printers.get_edited_preset().config;
|
auto printerConfig = &wxGetApp().preset_bundle->printers.get_edited_preset().config;
|
||||||
auto filament_config = &wxGetApp().preset_bundle->filaments.get_edited_preset().config;
|
auto filament_config = &wxGetApp().preset_bundle->filaments.get_edited_preset().config;
|
||||||
|
|
||||||
|
@ -9852,7 +9852,7 @@ auto print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config
|
||||||
_obj->config.set_key_value("sparse_infill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinear));
|
_obj->config.set_key_value("sparse_infill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinear));
|
||||||
_obj->config.set_key_value("top_surface_line_width", new ConfigOptionFloatOrPercent(nozzle_diameter * 1.2f, false));
|
_obj->config.set_key_value("top_surface_line_width", new ConfigOptionFloatOrPercent(nozzle_diameter * 1.2f, false));
|
||||||
_obj->config.set_key_value("internal_solid_infill_line_width", new ConfigOptionFloatOrPercent(nozzle_diameter * 1.2f, false));
|
_obj->config.set_key_value("internal_solid_infill_line_width", new ConfigOptionFloatOrPercent(nozzle_diameter * 1.2f, false));
|
||||||
_obj->config.set_key_value("top_surface_pattern", new ConfigOptionEnum<InfillPattern>(ipMonotonic));
|
_obj->config.set_key_value("top_surface_pattern", new ConfigOptionEnum<InfillPattern>(ipArchimedeanChords));
|
||||||
_obj->config.set_key_value("top_solid_infill_flow_ratio", new ConfigOptionFloat(1.0f));
|
_obj->config.set_key_value("top_solid_infill_flow_ratio", new ConfigOptionFloat(1.0f));
|
||||||
_obj->config.set_key_value("infill_direction", new ConfigOptionFloat(45));
|
_obj->config.set_key_value("infill_direction", new ConfigOptionFloat(45));
|
||||||
_obj->config.set_key_value("solid_infill_direction", new ConfigOptionFloat(135));
|
_obj->config.set_key_value("solid_infill_direction", new ConfigOptionFloat(135));
|
||||||
|
@ -9861,7 +9861,9 @@ auto print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config
|
||||||
_obj->config.set_key_value("internal_solid_infill_speed", new ConfigOptionFloat(internal_solid_speed));
|
_obj->config.set_key_value("internal_solid_infill_speed", new ConfigOptionFloat(internal_solid_speed));
|
||||||
_obj->config.set_key_value("top_surface_speed", new ConfigOptionFloat(top_surface_speed));
|
_obj->config.set_key_value("top_surface_speed", new ConfigOptionFloat(top_surface_speed));
|
||||||
_obj->config.set_key_value("seam_slope_type", new ConfigOptionEnum<SeamScarfType>(SeamScarfType::None));
|
_obj->config.set_key_value("seam_slope_type", new ConfigOptionEnum<SeamScarfType>(SeamScarfType::None));
|
||||||
|
_obj->config.set_key_value("gap_fill_target", new ConfigOptionEnum<GapFillTarget>(GapFillTarget::gftNowhere));
|
||||||
print_config->set_key_value("max_volumetric_extrusion_rate_slope", new ConfigOptionFloat(0));
|
print_config->set_key_value("max_volumetric_extrusion_rate_slope", new ConfigOptionFloat(0));
|
||||||
|
_obj->config.set_key_value("calib_flowrate_topinfill_special_order", new ConfigOptionBool(true));
|
||||||
|
|
||||||
// extract flowrate from name, filename format: flowrate_xxx
|
// extract flowrate from name, filename format: flowrate_xxx
|
||||||
std::string obj_name = _obj->name;
|
std::string obj_name = _obj->name;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue