Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique-id into object label. #13641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
6 changes: 3 additions & 3 deletions src/libslic3r/GCode/LabelObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ std::string LabelObjects::all_objects_header() const
out += "\n";
for (const LabelData& label : m_label_data) {
if (m_label_objects_style == LabelObjectsStyle::Firmware && m_flavor == gcfKlipper)
out += "EXCLUDE_OBJECT_DEFINE NAME='" + label.name + "' CENTER=" + label.center + " POLYGON=" + label.polygon + "\n";
out += "EXCLUDE_OBJECT_DEFINE NAME='" + label.name + "-" + std::to_string(label.unique_id) + "' CENTER=" + label.center + " POLYGON=" + label.polygon + "\n";
else {
out += start_object(*label.pi, IncludeName::Yes);
out += stop_object(*label.pi);
Expand Down Expand Up @@ -219,7 +219,7 @@ std::string LabelObjects::start_object(const PrintInstance& print_instance, Incl
}
out += "\n";
} else if (m_flavor == gcfKlipper)
out += "EXCLUDE_OBJECT_START NAME='" + label.name + "'\n";
out += "EXCLUDE_OBJECT_START NAME='" + label.name + "-" + std::to_string(label.unique_id) + "'\n";
else {
// Not supported by / implemented for the other firmware flavors.
}
Expand All @@ -243,7 +243,7 @@ std::string LabelObjects::stop_object(const PrintInstance& print_instance) const
if (m_flavor == GCodeFlavor::gcfMarlinFirmware || m_flavor == GCodeFlavor::gcfMarlinLegacy || m_flavor == GCodeFlavor::gcfRepRapFirmware)
out += std::string("M486 S-1\n");
else if (m_flavor ==gcfKlipper)
out += "EXCLUDE_OBJECT_END NAME='" + label.name + "'\n";
out += "EXCLUDE_OBJECT_END NAME='" + label.name + "-" + std::to_string(label.unique_id) + "'\n";
else {
// Not supported by / implemented for the other firmware flavors.
}
Expand Down