Fix errors when slicing A1 mini

This commit is contained in:
SoftFever 2023-10-29 12:16:16 +08:00
parent 363c256668
commit 7ff4005c22
3 changed files with 13 additions and 1 deletions

View file

@ -2179,6 +2179,15 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
this->placeholder_parser().set("first_layer_print_min", new ConfigOptionFloats({bbox.min.x(), bbox.min.y()}));
this->placeholder_parser().set("first_layer_print_max", new ConfigOptionFloats({bbox.max.x(), bbox.max.y()}));
this->placeholder_parser().set("first_layer_print_size", new ConfigOptionFloats({ bbox.size().x(), bbox.size().y() }));
// get center without wipe tower
BoundingBoxf bbox_wo_wt; // bounding box without wipe tower
for (auto &objPtr : print.objects()) {
BBoxData data;
bbox_wo_wt.merge(unscaled(objPtr->get_first_layer_bbox(data.area, data.layer_height, data.name)));
}
auto center = bbox_wo_wt.center();
this->placeholder_parser().set("first_layer_center_no_wipe_tower", new ConfigOptionFloats(center.x(), center.y()));
}
float outer_wall_volumetric_speed = 0.0f;
{