Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,8 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
if (need_travel_after_change_filament_gcode) {
// After a filament change, the travel path leading to the wipe tower:
// start_point inside the previous printed object,
// end_point at the tower��s start_pos or at the starting point of the tower��s detour path.
// In this case, disable ��avoid crossing perimeters�� to prevent inserting additional path points inside the previous printed object.
// end_point at the tower’s start_pos or at the starting point of the tower’s detour path.
// In this case, disable “avoid crossing perimeters” to prevent inserting additional path points inside the previous printed object.
gcodegen.m_avoid_crossing_perimeters.disable_once();
// move to start_pos for wiping after toolchange
if (!is_used_travel_avoid_perimeter) {
Expand Down Expand Up @@ -3914,7 +3914,7 @@ int GCode::get_highest_bed_temperature(const bool is_first_layer, const Print& p
{
auto bed_type = m_config.curr_bed_type;
int bed_temp = 0;
// ����ȡ�����ײ�IJ����¶���ߵģ���֤���ȶ�
// 总是取所有首层耗材中温度最高的,保证热稳定
for (auto fidx : print.get_slice_used_filaments(true)) {
bed_temp = std::max(bed_temp, get_bed_temperature(fidx, is_first_layer, bed_type));
}
Expand Down Expand Up @@ -8158,7 +8158,12 @@ inline std::string polygon_to_string(const Polygon& polygon, Print* print) {
return gcode.str();
}
// this function iterator PrintObject and assign a seqential id to each object.
// this id is used to generate unique object id for each object.
/**
* @brief Assigns unique object and instance identifiers and generates Klipper exclusion definitions.
*
* @param print Print data containing the objects, instances, calibration settings, and wipe-tower configuration.
* @return std::string G-code defining exclusion areas for eligible objects, calibration areas, and the wipe tower.
*/
std::string GCode::set_object_info(Print* print)
{
std::ostringstream gcode;
Expand Down Expand Up @@ -8213,15 +8218,14 @@ std::string GCode::set_object_info(Print* print)

double sum_x = 0;
double sum_y = 0;
Vec2d first_v(print->translate_to_print_space(polygon.points.at(0)).x()+ ext_x, print->translate_to_print_space(polygon.points.at(0)).y());
const Vec2d first_v(print->translate_to_print_space(polygon.points.at(0)).x()+ ext_x, print->translate_to_print_space(polygon.points.at(0)).y());

for (int i = 0; i < polygon.points.size(); i++) {
const auto v = print->translate_to_print_space(polygon.points.at(i));
if (i == 0 || i == 3) {
pa_area_poly_gcode << "[" << v.x() + ext_x << "," << v.y() << "],";
sum_x += v.x() + ext_x;
sum_y += v.y();
first_v(v.x() + ext_x, v.y());
}
else if(i==1 || i == 2){
pa_area_poly_gcode << "[" << v.x()+ box_width << "," << v.y() << "],";
Expand Down