Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/local_27/dev' into nightly_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jul 31, 2024
2 parents 2f8db4f + ff639ca commit 2669fe2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
9 changes: 5 additions & 4 deletions src/libslic3r/GCode/FanMover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ void FanMover::_process_T(const std::string_view command)
void FanMover::_process_ACTIVATE_EXTRUDER(const std::string_view cmd)
{
if (size_t cmd_end = cmd.find("ACTIVATE_EXTRUDER"); cmd_end != std::string::npos) {
bool error = false;
size_t extruder_pos_start = cmd.find("EXTRUDER", cmd_end + std::string_view("ACTIVATE_EXTRUDER").size()) + std::string_view("EXTRUDER").size();
assert(cmd[extruder_pos_start - 1] == 'R');
if (extruder_pos_start != std::string::npos) {
Expand Down Expand Up @@ -472,11 +471,13 @@ void FanMover::_process_gcode_line(GCodeReader& reader, const GCodeReader::GCode
assert(current_role != GCodeExtrusionRole::None);
}
if (line.raw().size() > 16) {
if (line.raw().rfind("; custom gcode", 0) != std::string::npos)
if (line.raw().rfind("; custom gcode end", 0) != std::string::npos)
if (line.raw().rfind("; custom gcode", 0) != std::string::npos) {
if (line.raw().rfind("; custom gcode end", 0) != std::string::npos) {
m_is_custom_gcode = false;
else
} else {
m_is_custom_gcode = true;
}
}
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/libslic3r/GCode/LabelObjects.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "LabelObjects.hpp"

#include "ClipperUtils.hpp"
#include "Geometry\ConvexHull.hpp"
#include "Model.hpp"
#include "Print.hpp"
#include "TriangleMeshSlicer.hpp"
#include "libslic3r/ClipperUtils.hpp"
#include "libslic3r/Geometry/ConvexHull.hpp"
#include "libslic3r/Model.hpp"
#include "libslic3r/Print.hpp"
#include "libslic3r/TriangleMeshSlicer.hpp"

#include <boost/regex.hpp>

Expand Down
5 changes: 3 additions & 2 deletions src/slic3r/GUI/GUI_Tags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "libslic3r/Config.hpp"

#include "BitmapCache.hpp"
#include "format.hpp"
#include "GUI.hpp"
#include "GUI_App.hpp"
#include "GUI_ObjectList.hpp"
Expand Down Expand Up @@ -81,8 +82,8 @@ ModeButton::ModeButton(wxWindow *parent, const std::string &mode_name, int px_cn

void ModeButton::Init(const wxString &mode)
{
m_tt_focused = Slic3r::GUI::format_wxstr(_L("Switch to the %s mode"), mode);
m_tt_selected = Slic3r::GUI::format_wxstr(_L("Current mode is %s"), mode);
m_tt_focused = format_wxstr(_L("Switch to the %s mode"), mode);
m_tt_selected = format_wxstr(_L("Current mode is %s"), mode);

SetBitmapMargins(3, 0);

Expand Down
4 changes: 2 additions & 2 deletions src/slic3r/GUI/Preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ std::shared_ptr<ConfigOptionsGroup> PreferencesDialog::create_options_group(cons
int val_int = boost::any_cast<int>(value);
auto vector = field->m_opt.enum_def->enums();
assert(vector.size() > val_int && val_int >= 0);
if(vector.size() > val_int && val_int >= 0){
if(int(vector.size()) > val_int && val_int >= 0){
m_values[opt_key] = vector[val_int];
}
}
Expand Down Expand Up @@ -1662,7 +1662,7 @@ void PreferencesDialog::create_settings_font_widget(wxWindow* tab, std::shared_p
m_values[opt_key] = format("%1%", val);
stb_sizer->Layout();
#ifdef __linux__
CallAfter([this]() { refresh_og(opt_grp); });
CallAfter([this, opt_grp]() { refresh_og(opt_grp); });
#else
refresh_og(opt_grp);
#endif
Expand Down
6 changes: 3 additions & 3 deletions src/test-utils/stl_to_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include <fstream>
#include <cstdlib>

#include <libslic3r/AABBMesh.hpp>
#include <libslic3r/Format/STL.hpp>
#include <libslic3r/Model.hpp>
#include <libslic3r/LocalesUtils.hpp>
#include <libslic3r/SLA/IndexedMesh.hpp>

#include "ClipboardXX/include/clipboardxx.hpp"

Expand All @@ -34,8 +34,8 @@ int main(int argc, char const *argv[])
int idx_vol = 0;
for(Slic3r::ModelVolume *vol : obj->volumes) {
Slic3r::TriangleMesh mesh = vol->mesh();
Slic3r::sla::IndexedMesh indexed_mesh(mesh); // more user-friendly
out_cpp << "TriangleMesh vol_"<< idx_obj << "_" << idx_vol <<" = TriangleMesh(std::vector<Vec3f>{";
Slic3r::AABBMesh indexed_mesh(mesh); // more user-friendly
out_cpp << "AABBMesh vol_"<< idx_obj << "_" << idx_vol <<" = AABBMesh(std::vector<Vec3f>{";
int ptidx= 0;
for(const Slic3r::Vec3f &pt : indexed_mesh.vertices())
out_cpp << (0==ptidx++?"{":",{") << Slic3r::to_string_nozero(pt.x(), 7)
Expand Down

0 comments on commit 2669fe2

Please sign in to comment.