Skip to content

Commit

Permalink
Fix errors when slicing A1 mini
Browse files Browse the repository at this point in the history
  • Loading branch information
SoftFever committed Oct 29, 2023
1 parent 363c256 commit 7ff4005
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
{
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/slic3r/GUI/BackgroundSlicingProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7ff4005

Please sign in to comment.