mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
Fix bed mesh algorithm for 3 point bicubic algorightm (#5296)
* Fix bed mesh algorithm for 3 point bicubic algorightm * Corrected + to * * Amended algo to mirror KAMP * Updated from feedbacl
This commit is contained in:
parent
29f9d5dd03
commit
de5c1c80e3
1 changed files with 8 additions and 2 deletions
|
@ -2352,11 +2352,17 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
auto probe_dist_y = std::max(1., m_config.bed_mesh_probe_distance.value.y());
|
||||
int probe_count_x = std::max(3, (int) std::ceil(mesh_bbox.size().x() / probe_dist_x));
|
||||
int probe_count_y = std::max(3, (int) std::ceil(mesh_bbox.size().y() / probe_dist_y));
|
||||
this->placeholder_parser().set("bed_mesh_probe_count", new ConfigOptionInts({probe_count_x, probe_count_y}));
|
||||
auto bed_mesh_algo = "bicubic";
|
||||
if (probe_count_x < 4 || probe_count_y < 4) {
|
||||
if (probe_count_x * probe_count_y <= 6) { // lagrange needs up to a total of 6 mesh points
|
||||
bed_mesh_algo = "lagrange";
|
||||
}
|
||||
else
|
||||
if(print.config().gcode_flavor == gcfKlipper){
|
||||
// bicubic needs 4 probe points per axis
|
||||
probe_count_x = std::max(probe_count_x,4);
|
||||
probe_count_y = std::max(probe_count_y,4);
|
||||
}
|
||||
this->placeholder_parser().set("bed_mesh_probe_count", new ConfigOptionInts({probe_count_x, probe_count_y}));
|
||||
this->placeholder_parser().set("bed_mesh_algo", bed_mesh_algo);
|
||||
// get center without wipe tower
|
||||
BoundingBoxf bbox_wo_wt; // bounding box without wipe tower
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue