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:
SoftFever 2025-03-29 20:27:04 +08:00 committed by GitHub
parent 782adafc39
commit 5dac629712
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 6 deletions

View file

@ -153,6 +153,12 @@ void Fill::fill_surface_extrusion(const Surface* surface, const FillParams& para
out.push_back(eec = new ExtrusionEntityCollection());
// Only concentric fills are not sorted.
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();
if (params.use_arachne) {
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,
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++)
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
this->_create_gap_fill(surface, params, eec);
}