mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 14:20:58 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5efb3bef45 | ||
|
|
90ac58d3cd | ||
|
|
88346efceb | ||
|
|
5a95ba4bd5 |
@@ -37,6 +37,7 @@
|
||||
#include "libslic3r/TriangleSelector.hpp"
|
||||
#include <algorithm>
|
||||
#include "libslic3r/Format/bbs_3mf.hpp"
|
||||
#include "libslic3r/Format/AssembleList.hpp"
|
||||
#include <cstdlib>
|
||||
#include <stdlib.h>
|
||||
#include <stdexcept>
|
||||
@@ -141,6 +142,8 @@ using namespace nlohmann;
|
||||
#include "slic3r/GUI/GuiColor.hpp"
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#if __has_include(<X11/Xlib.h>)
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
using namespace Slic3r;
|
||||
namespace po = boost::program_options;
|
||||
|
||||
|
||||
@@ -3,9 +3,16 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <exception>
|
||||
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
#include "BRepTools.hxx"
|
||||
#include <IMeshTools_Parameters.hxx>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -104,7 +103,7 @@ public:
|
||||
MESH_SUCCESS,
|
||||
MESH_ERROR
|
||||
};
|
||||
Step(fs::path path, ImportStepProgressFn stepFn = nullptr, StepIsUtf8Fn isUtf8Fn = nullptr);
|
||||
Step(boost::filesystem::path path, ImportStepProgressFn stepFn = nullptr, StepIsUtf8Fn isUtf8Fn = nullptr);
|
||||
Step(std::string path, ImportStepProgressFn stepFn = nullptr, StepIsUtf8Fn isUtf8Fn = nullptr);
|
||||
~Step();
|
||||
Step_Status load();
|
||||
|
||||
@@ -133,6 +133,8 @@ using namespace std::literals::string_view_literals;
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
//! macro used to mark string used at localization,
|
||||
@@ -4412,11 +4414,6 @@ struct PrecomputedLayer
|
||||
};
|
||||
} // namespace
|
||||
|
||||
template<typename BoolsOption> static bool any_enabled(const BoolsOption &option)
|
||||
{
|
||||
return std::any_of(option.values.begin(), option.values.end(), [](unsigned char enabled) { return enabled != 0; });
|
||||
}
|
||||
|
||||
// Whether process_layer() prepares the overhang estimator for `layer`.
|
||||
template<typename OverhangSpeed>
|
||||
static bool prepares_overhang_estimator(const Layer &layer, bool overhang_fan, OverhangSpeed overhang_speed)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <cmath>
|
||||
#include <cctype>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "../ClipperUtils.hpp"
|
||||
#include "../Flow.hpp"
|
||||
#include "../Config.hpp"
|
||||
#include "libslic3r/ExtrusionEntityCollection.hpp"
|
||||
#include "libslic3r/Line.hpp"
|
||||
#include "libslic3r/ExPolygon.hpp"
|
||||
|
||||
@@ -22,6 +23,7 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
@@ -87,6 +87,8 @@
|
||||
#include "PlaceholderParser.hpp"
|
||||
#include "libslic3r/GCode/Thumbnails.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
using boost::property_tree::ptree;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -473,8 +473,8 @@ public:
|
||||
|
||||
// Orca: Bundle metadata and cached preset names
|
||||
// std::map<std::string, BundleMetadata> m_bundles;
|
||||
fs::path dir_user_presets_local;
|
||||
fs::path dir_user_presets_subscribed;
|
||||
boost::filesystem::path dir_user_presets_local;
|
||||
boost::filesystem::path dir_user_presets_subscribed;
|
||||
PresetBundleMetadata bundles;
|
||||
|
||||
struct ObsoletePresets
|
||||
|
||||
@@ -102,6 +102,8 @@
|
||||
|
||||
#include <codecvt>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
// Mark string for localization and translate.
|
||||
|
||||
@@ -789,6 +789,12 @@ class StaticPrintConfig;
|
||||
// Minimum object distance for arrangement, based on printer technology.
|
||||
double min_object_distance(const ConfigBase &cfg);
|
||||
|
||||
// Whether any value is set, a nil value included.
|
||||
template<bool NULLABLE> bool any_enabled(const ConfigOptionBoolsTempl<NULLABLE> &option)
|
||||
{
|
||||
return std::any_of(option.values.begin(), option.values.end(), [](unsigned char enabled) { return enabled != 0; });
|
||||
}
|
||||
|
||||
// One (extruder type x nozzle volume type) parameter variant a filament prints through, plus a
|
||||
// representative physical extruder observed using it. Ordering (and set-dedup identity) covers
|
||||
// the variant pair only, so the same variant reached through two extruders keeps one config slot.
|
||||
|
||||
@@ -1025,10 +1025,13 @@ void PrintObject::generate_support_material()
|
||||
void PrintObject::estimate_curled_extrusions()
|
||||
{
|
||||
if (this->set_started(posEstimateCurledExtrusions)) {
|
||||
if ( std::any_of(this->print()->m_print_regions.begin(), this->print()->m_print_regions.end(), [](const PrintRegion* region) {
|
||||
const auto& cfg = region->config().enable_overhang_speed.values;
|
||||
return std::any_of(cfg.begin(), cfg.end(), [](const unsigned char v) { return (bool) v; });
|
||||
})) {
|
||||
const auto any_region_enables = [this](ConfigOptionBoolsNullable PrintRegionConfig::*option) {
|
||||
return std::any_of(this->print()->m_print_regions.begin(), this->print()->m_print_regions.end(),
|
||||
[option](const PrintRegion* region) { return any_enabled(region->config().*option); });
|
||||
};
|
||||
// Only the slowdown for curled perimeters reads the curled lines, and they stay empty unless some region has overhang speed on.
|
||||
if (any_region_enables(&PrintRegionConfig::enable_overhang_speed) &&
|
||||
any_region_enables(&PrintRegionConfig::slowdown_for_curled_perimeters)) {
|
||||
|
||||
// Estimate curling of support material and add it to the malformaition lines of each layer
|
||||
float support_flow_width = support_material_flow(this, this->config().layer_height).width();
|
||||
@@ -1038,6 +1041,9 @@ void PrintObject::estimate_curled_extrusions()
|
||||
float(this->config().brim_width.getFloat())};
|
||||
SupportSpotsGenerator::estimate_malformations(this->layers(), params);
|
||||
m_print->throw_if_canceled();
|
||||
} else {
|
||||
for (Layer *layer : m_layers)
|
||||
layer->curled_lines.clear();
|
||||
}
|
||||
//this->set_done(posEstimateCurledExtrusions);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "Types.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
///|/
|
||||
#include "../include/Viewer.hpp"
|
||||
#include "ViewerImpl.hpp"
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include "../include/Types.hpp"
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
#include "MainFrame.hpp"
|
||||
#include "Widgets/Label.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
wxDEFINE_EVENT(EVT_AUXILIARY_IMPORT, wxCommandEvent);
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
bool m_cover{false};
|
||||
wxStaticText* m_text_name {nullptr};
|
||||
::TextInput* m_input_name {nullptr};
|
||||
fs::path m_file_path;
|
||||
boost::filesystem::path m_file_path;
|
||||
wxString m_add_file;
|
||||
wxString m_file_name;
|
||||
wxString cover_text_left;
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
ScalableBitmap m_bitmap_txt;
|
||||
|
||||
public:
|
||||
AuFile(wxWindow *parent, fs::path file_path, wxString file_name, AuxiliaryFolderType type, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxTAB_TRAVERSAL);
|
||||
AuFile(wxWindow *parent, boost::filesystem::path file_path, wxString file_name, AuxiliaryFolderType type, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxTAB_TRAVERSAL);
|
||||
void enter_rename_mode();
|
||||
void exit_rename_mode();
|
||||
void OnPaint(wxPaintEvent &evt);
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
|
||||
void clear();
|
||||
void update_cover();
|
||||
void update(std::vector<fs::path> paths);
|
||||
void update(std::vector<boost::filesystem::path> paths);
|
||||
void msw_rescale();
|
||||
|
||||
public:
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
bool Show(bool show);
|
||||
|
||||
// core logic
|
||||
std::map<std::string, std::vector<fs::path>> m_paths_list;
|
||||
std::map<std::string, std::vector<boost::filesystem::path>> m_paths_list;
|
||||
wxString m_root_dir;
|
||||
void init_auxiliary();
|
||||
void create_folder(wxString name = wxEmptyString);
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <wx/variant.h>
|
||||
#include <wx/types.h>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
const static std::array<wxString, 4> s_default_folders = {
|
||||
_L("Model Pictures"),
|
||||
_L("Bill of Materials"),
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
#include "UnsavedChangesDialog.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
#if defined(__linux__) && defined(__WXGTK3__)
|
||||
#define wxLinux_gtk3 true
|
||||
#else
|
||||
|
||||
@@ -276,8 +276,9 @@ void DailyTipsPanel::set_position(const ImVec2& pos)
|
||||
void DailyTipsPanel::set_size(const ImVec2& size)
|
||||
{
|
||||
m_width = size.x;
|
||||
m_height = size.y;
|
||||
m_content_height = m_height - m_footer_height;
|
||||
//Orca: Keep the requested content height so expanding a collapsed panel restores its full size.
|
||||
m_content_height = size.y - m_footer_height;
|
||||
m_height = m_can_expand && !m_is_expanded ? m_footer_height : size.y;
|
||||
}
|
||||
|
||||
void DailyTipsPanel::set_can_expand(bool can_expand)
|
||||
@@ -647,4 +648,4 @@ void DailyTipsWindow::on_change_color_mode(bool is_dark)
|
||||
m_panel->on_change_color_mode(is_dark);
|
||||
}
|
||||
|
||||
}}
|
||||
}}
|
||||
|
||||
@@ -108,6 +108,8 @@
|
||||
|
||||
#include "IPrinterAgent.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
#define CALI_DEBUG
|
||||
#define MINUTE_30 1800000 //ms
|
||||
#define TIME_OUT 5000 //ms
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
|
||||
#include "3DScene.hpp"
|
||||
|
||||
#include <chrono>
|
||||
#include <array>
|
||||
#include <glad/gl.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <ratio>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "libslic3r/Layer.hpp"
|
||||
#include "Widgets/ProgressDialog.hpp"
|
||||
#include "MsgDialog.hpp"
|
||||
#include <boost/container_hash/hash.hpp>
|
||||
#include "slic3r/GUI/MeshUtils.hpp"
|
||||
#include <string>
|
||||
#include "libvgcode/include/Types.hpp"
|
||||
#include <vector>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <cstdint>
|
||||
#include <float.h>
|
||||
#include <set>
|
||||
#include "slic3r/GUI/MeshUtils.hpp"
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "libslic3r/Point.hpp"
|
||||
#include "slic3r/GUI/3DScene.hpp"
|
||||
#include <cstdlib>
|
||||
#include <imgui.h>
|
||||
#include <map>
|
||||
#include <cmath>
|
||||
#include "libslic3r/Geometry.hpp"
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
#include "libslic3r/Print.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class AppConfig;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "slic3r/GUI/Gizmos/GLGizmoSVG.hpp"
|
||||
#include "slic3r/GUI/Gizmos/GLGizmoMeshBoolean.hpp"
|
||||
#include "slic3r/GUI/Gizmos/GLGizmoAssembly.hpp"
|
||||
#include <initializer_list>
|
||||
#include <wx/timer.h>
|
||||
#include <vector>
|
||||
#include <cstddef>
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <mutex>
|
||||
#include <ctime>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
static const char* HMS_PATH = "hms";
|
||||
static const char* HMS_LOCAL_IMG_PATH = "hms/local_image";
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include "slic3r/GUI/DeviceCore/DevStorage.h"
|
||||
#include <wx/event.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
#include <wx/event.h>
|
||||
#include <functional>
|
||||
#include <exception>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include <exception>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -2880,17 +2880,24 @@ void NotificationManager::update_slicing_notif_dailytips(bool need_change)
|
||||
// Slicing progress notification was not found - init it thru plater so correct cancel callback function is appended
|
||||
wxGetApp().plater()->init_notification_manager();
|
||||
}
|
||||
// Orca: Ensures the slicing-progress controller exists before applying the first slicing transition.
|
||||
void NotificationManager::set_slicing_progress_began()
|
||||
{
|
||||
for (std::unique_ptr<PopNotification> & notification : m_pop_notifications) {
|
||||
if (notification->get_type() == NotificationType::SlicingProgress) {
|
||||
SlicingProgressNotification* spn = dynamic_cast<SlicingProgressNotification*>(notification.get());
|
||||
spn->set_progress_state(SlicingProgressNotification::SlicingProgressState::SP_BEGAN);
|
||||
return;
|
||||
auto find_slicing_progress = [this]() -> SlicingProgressNotification* {
|
||||
for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
|
||||
if (notification->get_type() == NotificationType::SlicingProgress)
|
||||
return dynamic_cast<SlicingProgressNotification*>(notification.get());
|
||||
}
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
SlicingProgressNotification* notification = find_slicing_progress();
|
||||
if (notification == nullptr) {
|
||||
wxGetApp().plater()->init_notification_manager();
|
||||
notification = find_slicing_progress();
|
||||
}
|
||||
// Slicing progress notification was not found - init it thru plater so correct cancel callback function is appended
|
||||
wxGetApp().plater()->init_notification_manager();
|
||||
if (notification != nullptr)
|
||||
notification->set_progress_state(SlicingProgressNotification::SlicingProgressState::SP_BEGAN);
|
||||
}
|
||||
void NotificationManager::set_slicing_progress_percentage(const std::string& text, float percentage)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include "slic3r/GUI/GUI_Utils.hpp"
|
||||
#include "libslic3r/Preset.hpp"
|
||||
#include <wx/wx.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/toplevel.h>
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
|
||||
#include "DeviceCore/DevManager.h"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
extern wxString hide_passwd(wxString url, std::vector<wxString> const &passwords);
|
||||
|
||||
@@ -376,8 +376,8 @@ public:
|
||||
// BBS: check snapshot
|
||||
bool up_to_date(bool saved, bool backup);
|
||||
|
||||
bool open_3mf_file(const fs::path &file_path);
|
||||
int get_3mf_file_count(std::vector<fs::path> paths);
|
||||
bool open_3mf_file(const boost::filesystem::path &file_path);
|
||||
int get_3mf_file_count(std::vector<boost::filesystem::path> paths);
|
||||
void add_file();
|
||||
// Returns false when no object was added (e.g. the user cancelled the load dialog).
|
||||
bool add_model(bool imperial_units = false, std::string fname = "");
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "libslic3r_version.h"
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <utility>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <memory>
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
#include <wx/log.h>
|
||||
#include <wx/webview.h>
|
||||
#include <wx/utils.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <boost/algorithm/string/case_conv.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "slic3r/GUI/GUI.hpp"
|
||||
@@ -57,6 +58,8 @@
|
||||
#include "MainFrame.hpp"
|
||||
#include <slic3r/GUI/Widgets/WebView.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
wxDEFINE_EVENT(EVT_PROJECT_RELOAD, wxCommandEvent);
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
#include "DeviceCore/DevStorage.h"
|
||||
#include "../Utils/Http.hpp"
|
||||
#include "md4c/src/md4c-html.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
|
||||
@@ -21,12 +21,30 @@
|
||||
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
#include "libslic3r/libslic3r.h"
|
||||
#include "libslic3r_version.h"
|
||||
|
||||
#include <array>
|
||||
#include <glad/gl.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "slic3r/GUI/FrameProfiler.hpp"
|
||||
#include "slic3r/GUI/GUI_Utils.hpp"
|
||||
#include "libslic3r/Point.hpp"
|
||||
#include "libslic3r/BoundingBox.hpp"
|
||||
#include <ratio>
|
||||
#include "libslic3r/Preset.hpp"
|
||||
#include <ios>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/dcclient.h>
|
||||
#include <wx/dataobj.h>
|
||||
#include <wx/glcanvas.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/toplevel.h>
|
||||
#include <wx/utils.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -120,6 +120,9 @@
|
||||
#include "Notebook.hpp"
|
||||
#include "BitmapCache.hpp"
|
||||
#include "BindDialog.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
|
||||
#include "DeviceCore/DevManager.h"
|
||||
#include "DeviceCore/DevStorage.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -77,6 +77,9 @@
|
||||
#include "DeviceCore/DevStorage.h"
|
||||
#include "libslic3r_version.h"
|
||||
#include "slic3r/Utils/FileTransferUtils.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -239,12 +239,15 @@ void NotificationManager::SlicingProgressNotification::render(GLCanvas3D& canvas
|
||||
const float gcodeviewer_height = wxGetApp().plater()->get_preview_canvas3D()->get_gcode_viewer().get_legend_height();
|
||||
//const float dailytips_panel_height = std::min(380.0f * scale, std::max(90.0f, (cnv_size.get_height() - gcodeviewer_height - progress_panel_height - dailytips_child_window_padding.y - initial_y - m_line_height * 4)));
|
||||
const float dailytips_panel_height = 125.0f * scale;
|
||||
const ImVec2 dailytips_size = ImVec2(dailytips_panel_width, dailytips_panel_height);
|
||||
//Orca: Update the child's effective height before positioning this parent window.
|
||||
m_dailytips_panel->set_size(dailytips_size);
|
||||
|
||||
float right_gap = right_margin + (move_from_overlay ? overlay_width + m_line_height * 5 : 0);
|
||||
m_window_pos = ImVec2((float)cnv_size.get_width() - right_gap - m_window_width, (float)cnv_size.get_height() - m_top_y);
|
||||
imgui.set_next_window_pos(m_window_pos.x, m_window_pos.y, ImGuiCond_Always, 0.0f, 0.0f);
|
||||
m_window_height = progress_panel_height + m_dailytips_panel->get_size().y + progress_child_window_padding.y + dailytips_child_window_padding.y + bottom_padding.y;
|
||||
m_top_y = initial_y + m_window_height;
|
||||
m_window_pos = ImVec2((float)cnv_size.get_width() - right_gap - m_window_width, (float)cnv_size.get_height() - m_top_y);
|
||||
imgui.set_next_window_pos(m_window_pos.x, m_window_pos.y, ImGuiCond_Always, 0.0f, 0.0f);
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(m_window_width, m_window_height), ImVec2(m_window_width, m_window_height));
|
||||
|
||||
// name of window indentifies window - has to be unique string
|
||||
@@ -307,9 +310,7 @@ void NotificationManager::SlicingProgressNotification::render(GLCanvas3D& canvas
|
||||
|
||||
child_name = "##DailyTipsPanel" + std::to_string(parent_window->ID);
|
||||
ImVec2 dailytips_pos = ImGui::GetCursorScreenPos() + dailytips_child_window_padding;
|
||||
ImVec2 dailytips_size = ImVec2(dailytips_panel_width, dailytips_panel_height);
|
||||
m_dailytips_panel->set_position(dailytips_pos);
|
||||
m_dailytips_panel->set_size(dailytips_size);
|
||||
m_dailytips_panel->set_fade_opacity(m_current_fade_opacity);
|
||||
ImGui::SetNextWindowPos(dailytips_pos);
|
||||
if (ImGui::BeginChild(child_name.c_str(), ImVec2(dailytips_panel_width, dailytips_panel_height), false, child_window_flags)) {
|
||||
@@ -504,4 +505,4 @@ void NotificationManager::SlicingProgressNotification::render_progress_close_but
|
||||
}
|
||||
}
|
||||
|
||||
}}
|
||||
}}
|
||||
|
||||
@@ -78,6 +78,8 @@
|
||||
#include "DeviceCore/DevStorage.h"
|
||||
#include "FilamentBitmapUtils.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
using namespace Slic3r;
|
||||
using namespace Slic3r::GUI;
|
||||
|
||||
|
||||
@@ -79,6 +79,8 @@
|
||||
#include <libslic3r/Utils.hpp>
|
||||
#include "CreatePresetsDialog.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/json_parser.hpp>
|
||||
|
||||
#include <utility>
|
||||
#include <wx/event.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/gdicmn.h>
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
#include <wx/webview.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/timer.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
#include <wx/uri.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/stdpaths.h>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
#if defined(__WIN32__) || defined(__WXMAC__)
|
||||
#include "wx/private/jsscriptwrapper.h"
|
||||
#endif
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include "Widgets/Label.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
using namespace Slic3r;
|
||||
using namespace Slic3r::GUI;
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
#include "slic3r/GUI/OpenGLManager.hpp"
|
||||
#include <utility>
|
||||
#include "slic3r/GUI/Jobs/PrintJob.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "slic3r/GUI/WebPanel.hpp"
|
||||
#include <optional>
|
||||
#include "slic3r/plugin/PythonPluginInterface.hpp"
|
||||
#include "slic3r/GUI/LazyPage.hpp"
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <wx/app.h>
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "libslic3r/Print.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include "libslic3r/Layer.hpp"
|
||||
#include "libslic3r/ExtrusionEntityCollection.hpp"
|
||||
#include "libslic3r/ExtrusionEntity.hpp"
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
@@ -562,6 +566,12 @@ struct SlicedCage
|
||||
|
||||
using Walls = std::vector<std::vector<ProcessedPoint>>;
|
||||
|
||||
bool has_curled_lines(const PrintObject &object)
|
||||
{
|
||||
const auto layers = object.layers();
|
||||
return std::any_of(layers.begin(), layers.end(), [](const Layer *layer) { return !layer->curled_lines.empty(); });
|
||||
}
|
||||
|
||||
// Estimates every wall of `layer` against whatever layer `estimator` was last prepared with before it.
|
||||
Walls estimate_walls(ExtrusionQualityEstimator &estimator, const PrintObject *object, const Layer &layer)
|
||||
{
|
||||
@@ -703,6 +713,53 @@ TEST_CASE("Precomputed overhang data has the curled-line tree exactly when a reg
|
||||
CHECK((precomputed.front().lower_curled_lines != nullptr) == slowdown);
|
||||
}
|
||||
|
||||
TEST_CASE("Curled walls are estimated only when overhang speed and the slowdown for curled perimeters are both on", "[ExtrusionProcessor]")
|
||||
{
|
||||
const auto [overhang_speed, slowdown, estimated] = GENERATE(table<bool, bool, bool>({
|
||||
{true, true, true},
|
||||
{true, false, false},
|
||||
{false, true, false},
|
||||
}));
|
||||
DynamicPrintConfig config = caged_overhang_config("classic");
|
||||
config.set_deserialize_strict({{"enable_overhang_speed", overhang_speed ? "1" : "0"},
|
||||
{"slowdown_for_curled_perimeters", slowdown ? "1" : "0"}});
|
||||
const SlicedCage cage(config);
|
||||
|
||||
CHECK(has_curled_lines(*cage.object) == estimated);
|
||||
}
|
||||
|
||||
TEST_CASE("Curled walls are estimated when overhang speed and the slowdown for curled perimeters are on in different objects", "[ExtrusionProcessor]")
|
||||
{
|
||||
const std::vector<std::vector<ConfigBase::SetDeserializeItem>> overrides{
|
||||
{{"enable_overhang_speed", "1"}, {"slowdown_for_curled_perimeters", "0"}},
|
||||
{{"enable_overhang_speed", "0"}, {"slowdown_for_curled_perimeters", "1"}},
|
||||
};
|
||||
Print print;
|
||||
Model model;
|
||||
init_print(std::vector<TriangleMesh>{caged_overhang_mesh(), caged_overhang_mesh()}, print, model, caged_overhang_config("classic"),
|
||||
&overrides);
|
||||
print.process();
|
||||
|
||||
REQUIRE(print.objects().size() == 2);
|
||||
for (const PrintObject *object : print.objects())
|
||||
CHECK(has_curled_lines(*object));
|
||||
}
|
||||
|
||||
TEST_CASE("Curled walls from an earlier slice are dropped once overhang speed is off", "[ExtrusionProcessor]")
|
||||
{
|
||||
DynamicPrintConfig config = caged_overhang_config("classic");
|
||||
config.set_deserialize_strict("slowdown_for_curled_perimeters", "1");
|
||||
SlicedCage cage(config);
|
||||
const Layer *first_layer = cage.print.objects().front()->layers().front();
|
||||
REQUIRE(has_curled_lines(*cage.print.objects().front()));
|
||||
|
||||
config.set_deserialize_strict("enable_overhang_speed", "0");
|
||||
cage.print.apply(cage.model, config);
|
||||
cage.print.process();
|
||||
REQUIRE(cage.print.objects().front()->layers().front() == first_layer);
|
||||
CHECK_FALSE(has_curled_lines(*cage.print.objects().front()));
|
||||
}
|
||||
|
||||
TEST_CASE("Caged external overhangs are slowed when printed by object or through the pressure equalizer", "[ExtrusionProcessor]")
|
||||
{
|
||||
const auto [key, value] = GENERATE(table<const char *, const char *>({
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
|
||||
#include <catch2/catch_message.hpp>
|
||||
#include "libslic3r/BoundingBox.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/ModelArrange.hpp"
|
||||
@@ -9,6 +10,8 @@
|
||||
|
||||
#include "test_helpers.hpp"
|
||||
|
||||
#include "libslic3r/TriangleMesh.hpp"
|
||||
#include "libslic3r/Point.hpp"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -2,15 +2,21 @@
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
#include <catch2/matchers/catch_matchers_floating_point.hpp>
|
||||
#include "libslic3r/libslic3r.h"
|
||||
#include "libslic3r/GCode/GCodeProcessor.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
|
||||
#include "test_utils.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <fstream>
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "libslic3r/Point.hpp"
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using namespace Slic3r;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <catch2/catch_all.hpp>
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
|
||||
using namespace Slic3r;
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
#include <catch2/catch_all.hpp>
|
||||
|
||||
#include <catch2/matchers/catch_matchers_floating_point.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
#include <catch2/catch_message.hpp>
|
||||
#include "libslic3r/Format/AssembleList.hpp"
|
||||
|
||||
#include "test_utils.hpp"
|
||||
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <cstddef>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <numeric>
|
||||
#include <iostream>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <iterator>
|
||||
@@ -29,6 +30,8 @@
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
using namespace Slic3r;
|
||||
|
||||
SCENARIO("Generic config validation performs as expected.", "[Config]") {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
#include <catch2/matchers/catch_matchers_floating_point.hpp>
|
||||
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include "libslic3r/GCodeReader.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
#include <catch2/catch_message.hpp>
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
#include <catch2/matchers/catch_matchers_floating_point.hpp>
|
||||
#include "libslic3r/LocalesUtils.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include "libslic3r/GCode/ToolOrderUtils.hpp"
|
||||
#include "libslic3r/PrintBase.hpp"
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
#include <algorithm>
|
||||
#include <catch2/catch_all.hpp>
|
||||
|
||||
#include "libslic3r/Point.hpp"
|
||||
#include "libslic3r/Polygon.hpp"
|
||||
#include <tbb/global_control.h>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include "libslic3r/TriangleMesh.hpp"
|
||||
#include "libslic3r/TriangleMeshSlicer.hpp"
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include <catch2/catch_all.hpp>
|
||||
|
||||
#include <catch2/matchers/catch_matchers_floating_point.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
#include "slic3r/GUI/SceneBenchmark.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
Reference in New Issue
Block a user