Fix errors when slicing A1 mini
This commit is contained in:
parent
363c256668
commit
7ff4005c22
3 changed files with 13 additions and 1 deletions
|
@ -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;
|
||||
{
|
||||
|
|
|
@ -1366,7 +1366,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
|||
bool before_layer_gcode_resets_extruder =
|
||||
boost::regex_search(m_config.before_layer_change_gcode.value, regex_g92e0);
|
||||
bool layer_gcode_resets_extruder = boost::regex_search(m_config.layer_change_gcode.value, regex_g92e0);
|
||||
if (m_config.use_relative_e_distances) {
|
||||
if (m_config.use_relative_e_distances && !is_BBL_printer()) {
|
||||
// See GH issues #6336 #5073
|
||||
if ((m_config.gcode_flavor == gcfMarlinLegacy || m_config.gcode_flavor == gcfMarlinFirmware) &&
|
||||
!before_layer_gcode_resets_extruder && !layer_gcode_resets_extruder)
|
||||
|
|
|
@ -664,6 +664,9 @@ bool BackgroundSlicingProcess::empty() const
|
|||
StringObjectException BackgroundSlicingProcess::validate(StringObjectException *warning, Polygons* collison_polygons, std::vector<std::pair<Polygon, float>>* height_polygons)
|
||||
{
|
||||
assert(m_print != nullptr);
|
||||
assert(m_print == m_fff_print);
|
||||
|
||||
m_fff_print->is_BBL_printer() = wxGetApp().preset_bundle->is_bbl_vendor();
|
||||
return m_print->validate(warning, collison_polygons, height_polygons);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue