mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 02:35:54 +08:00
Merge branch 'master' of https://github.com/Prusa-Development/PrusaSlicerPrivate
This commit is contained in:
commit
2cebbe72e7
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -9,19 +9,26 @@ src/slic3r/GUI/ConfigSnapshotDialog.cpp
|
|||||||
src/slic3r/GUI/ConfigWizard.cpp
|
src/slic3r/GUI/ConfigWizard.cpp
|
||||||
src/slic3r/GUI/DesktopIntegrationDialog.cpp
|
src/slic3r/GUI/DesktopIntegrationDialog.cpp
|
||||||
src/slic3r/GUI/DoubleSlider.cpp
|
src/slic3r/GUI/DoubleSlider.cpp
|
||||||
|
src/slic3r/GUI/Downloader.cpp
|
||||||
|
src/slic3r/GUI/DownloaderFileGet.cpp
|
||||||
src/slic3r/GUI/ExtraRenderers.cpp
|
src/slic3r/GUI/ExtraRenderers.cpp
|
||||||
src/slic3r/GUI/ExtruderSequenceDialog.cpp
|
src/slic3r/GUI/ExtruderSequenceDialog.cpp
|
||||||
src/slic3r/GUI/Field.cpp
|
src/slic3r/GUI/Field.cpp
|
||||||
|
src/slic3r/GUI/FileArchiveDialog.cpp
|
||||||
src/slic3r/GUI/FirmwareDialog.cpp
|
src/slic3r/GUI/FirmwareDialog.cpp
|
||||||
src/slic3r/GUI/GalleryDialog.cpp
|
src/slic3r/GUI/GalleryDialog.cpp
|
||||||
src/slic3r/GUI/GCodeViewer.cpp
|
src/slic3r/GUI/GCodeViewer.cpp
|
||||||
src/slic3r/GUI/GLCanvas3D.cpp
|
src/slic3r/GUI/GLCanvas3D.cpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoCut.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoCut.cpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoCut.hpp
|
src/slic3r/GUI/Gizmos/GLGizmoCut.hpp
|
||||||
|
src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp
|
||||||
|
src/slic3r/GUI/Gizmos/GLGizmoEmboss.hpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp
|
src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp
|
||||||
|
src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp
|
||||||
|
src/slic3r/GUI/Gizmos/GLGizmoMeasure.hpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.hpp
|
src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.hpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoMove.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoMove.cpp
|
||||||
@ -32,7 +39,6 @@ src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp
|
|||||||
src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp
|
src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp
|
|
||||||
src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
|
src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
|
||||||
src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp
|
src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp
|
||||||
src/slic3r/GUI/GUI.cpp
|
src/slic3r/GUI/GUI.cpp
|
||||||
@ -48,8 +54,7 @@ src/slic3r/GUI/HintNotification.cpp
|
|||||||
src/slic3r/GUI/ImGuiWrapper.cpp
|
src/slic3r/GUI/ImGuiWrapper.cpp
|
||||||
src/slic3r/GUI/Jobs/ArrangeJob.cpp
|
src/slic3r/GUI/Jobs/ArrangeJob.cpp
|
||||||
src/slic3r/GUI/Jobs/FillBedJob.cpp
|
src/slic3r/GUI/Jobs/FillBedJob.cpp
|
||||||
src/slic3r/GUI/Jobs/Job.cpp
|
src/slic3r/GUI/Jobs/EmbossJob.cpp
|
||||||
src/slic3r/GUI/Jobs/PlaterJob.cpp
|
|
||||||
src/slic3r/GUI/Jobs/RotoptimizeJob.hpp
|
src/slic3r/GUI/Jobs/RotoptimizeJob.hpp
|
||||||
src/slic3r/GUI/Jobs/RotoptimizeJob.cpp
|
src/slic3r/GUI/Jobs/RotoptimizeJob.cpp
|
||||||
src/slic3r/GUI/Jobs/SLAImportJob.cpp
|
src/slic3r/GUI/Jobs/SLAImportJob.cpp
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1200,7 +1200,7 @@ void Print::alert_when_supports_needed()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message += "\n" + L("Consider enabling supports") + (recommend_brim ? (" " + L("and brim")) : "") + ".";
|
message += "\n" + L("Consider enabling supports") + (recommend_brim ? (" " + L("and/or brim")) : "") + ".";
|
||||||
|
|
||||||
if (objects_isssues.size() > 0) {
|
if (objects_isssues.size() > 0) {
|
||||||
this->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, message);
|
this->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, message);
|
||||||
|
@ -217,7 +217,7 @@ float estimate_curled_up_height(
|
|||||||
float dist_factor = std::max(point.distance - params.malformation_distance_factors.first * flow_width, 0.01f) /
|
float dist_factor = std::max(point.distance - params.malformation_distance_factors.first * flow_width, 0.01f) /
|
||||||
((params.malformation_distance_factors.second - params.malformation_distance_factors.first) * flow_width);
|
((params.malformation_distance_factors.second - params.malformation_distance_factors.first) * flow_width);
|
||||||
|
|
||||||
curled_up_height = layer_height * 2.0f * sqrt(sqrt(dist_factor)) * std::clamp(6.0f * point.curvature, 1.0f, 6.0f);
|
curled_up_height = layer_height * sqrt(sqrt(dist_factor)) * std::clamp(3.0f * point.curvature, 1.0f, 3.0f);
|
||||||
curled_up_height = std::min(curled_up_height, params.max_curled_height_factor * layer_height);
|
curled_up_height = std::min(curled_up_height, params.max_curled_height_factor * layer_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1183,23 +1183,22 @@ std::vector<std::pair<SupportPointCause, bool>> gather_issues(const SupportPoint
|
|||||||
[](const PartialObject &left, const PartialObject &right) { return left.volume > right.volume; });
|
[](const PartialObject &left, const PartialObject &right) { return left.volume > right.volume; });
|
||||||
|
|
||||||
float max_volume_part = partial_objects.front().volume;
|
float max_volume_part = partial_objects.front().volume;
|
||||||
bool unstable_floating_part_added = false;
|
|
||||||
for (const PartialObject &p : partial_objects) {
|
for (const PartialObject &p : partial_objects) {
|
||||||
if (p.volume > max_volume_part / 500.0f && !p.connected_to_bed) {
|
if (p.volume > max_volume_part / 200.0f && !p.connected_to_bed) {
|
||||||
result.emplace_back(SupportPointCause::UnstableFloatingPart, true);
|
result.emplace_back(SupportPointCause::UnstableFloatingPart, true);
|
||||||
unstable_floating_part_added = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!unstable_floating_part_added) {
|
// should be detected in previous step
|
||||||
for (const SupportPoint &sp : support_points) {
|
// if (!unstable_floating_part_added) {
|
||||||
if (sp.cause == SupportPointCause::UnstableFloatingPart) {
|
// for (const SupportPoint &sp : support_points) {
|
||||||
result.emplace_back(SupportPointCause::UnstableFloatingPart, true);
|
// if (sp.cause == SupportPointCause::UnstableFloatingPart) {
|
||||||
break;
|
// result.emplace_back(SupportPointCause::UnstableFloatingPart, true);
|
||||||
}
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
std::vector<SupportPoint> ext_supp_points{};
|
std::vector<SupportPoint> ext_supp_points{};
|
||||||
ext_supp_points.reserve(support_points.size());
|
ext_supp_points.reserve(support_points.size());
|
||||||
@ -1245,7 +1244,7 @@ std::vector<std::pair<SupportPointCause, bool>> gather_issues(const SupportPoint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ext_supp_points.size() > 5) {
|
if (ext_supp_points.size() > max_volume_part / 200.0f) {
|
||||||
result.emplace_back(SupportPointCause::FloatingExtrusion, false);
|
result.emplace_back(SupportPointCause::FloatingExtrusion, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ struct Params
|
|||||||
}
|
}
|
||||||
|
|
||||||
// the algorithm should use the following units for all computations: distance [mm], mass [g], time [s], force [g*mm/s^2]
|
// the algorithm should use the following units for all computations: distance [mm], mass [g], time [s], force [g*mm/s^2]
|
||||||
const float bridge_distance = 12.0f; // mm
|
const float bridge_distance = 16.0f; // mm
|
||||||
const float max_acceleration; // mm/s^2 ; max acceleration of object in XY -- should be applicable only to printers with bed slinger,
|
const float max_acceleration; // mm/s^2 ; max acceleration of object in XY -- should be applicable only to printers with bed slinger,
|
||||||
// however we do not have such info yet. The force is usually small anyway, so not such a big deal to include it everytime
|
// however we do not have such info yet. The force is usually small anyway, so not such a big deal to include it everytime
|
||||||
const int raft_layers_count;
|
const int raft_layers_count;
|
||||||
@ -42,7 +42,7 @@ struct Params
|
|||||||
BrimType brim_type;
|
BrimType brim_type;
|
||||||
const float brim_width;
|
const float brim_width;
|
||||||
|
|
||||||
const std::pair<float,float> malformation_distance_factors = std::pair<float, float> { 0.4, 1.2 };
|
const std::pair<float,float> malformation_distance_factors = std::pair<float, float> { 0.5, 1.1 };
|
||||||
const float max_curled_height_factor = 10.0f;
|
const float max_curled_height_factor = 10.0f;
|
||||||
|
|
||||||
const float min_distance_between_support_points = 3.0f; //mm
|
const float min_distance_between_support_points = 3.0f; //mm
|
||||||
@ -52,8 +52,8 @@ struct Params
|
|||||||
const float gravity_constant = 9806.65f; // mm/s^2; gravity acceleration on Earth's surface, algorithm assumes that printer is in upwards position.
|
const float gravity_constant = 9806.65f; // mm/s^2; gravity acceleration on Earth's surface, algorithm assumes that printer is in upwards position.
|
||||||
const double filament_density = 1.25e-3f; // g/mm^3 ; Common filaments are very lightweight, so precise number is not that important
|
const double filament_density = 1.25e-3f; // g/mm^3 ; Common filaments are very lightweight, so precise number is not that important
|
||||||
const double material_yield_strength = 33.0f * 1e6f; // (g*mm/s^2)/mm^2; 33 MPa is yield strength of ABS, which has the lowest yield strength from common materials.
|
const double material_yield_strength = 33.0f * 1e6f; // (g*mm/s^2)/mm^2; 33 MPa is yield strength of ABS, which has the lowest yield strength from common materials.
|
||||||
const float standard_extruder_conflict_force = 5.0f * gravity_constant; // force that can occasionally push the model due to various factors (filament leaks, small curling, ... );
|
const float standard_extruder_conflict_force = 10.0f * gravity_constant; // force that can occasionally push the model due to various factors (filament leaks, small curling, ... );
|
||||||
const float malformations_additive_conflict_extruder_force = 100.0f * gravity_constant; // for areas with possible high layered curled filaments
|
const float malformations_additive_conflict_extruder_force = 65.0f * gravity_constant; // for areas with possible high layered curled filaments
|
||||||
|
|
||||||
// MPa * 1e^6 = (g*mm/s^2)/mm^2 = g/(mm*s^2); yield strength of the bed surface
|
// MPa * 1e^6 = (g*mm/s^2)/mm^2 = g/(mm*s^2); yield strength of the bed surface
|
||||||
double get_bed_adhesion_yield_strength() const {
|
double get_bed_adhesion_yield_strength() const {
|
||||||
@ -72,9 +72,8 @@ struct Params
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//just return PLA adhesion value as value for supports
|
|
||||||
double get_support_spots_adhesion_strength() const {
|
double get_support_spots_adhesion_strength() const {
|
||||||
return 0.02f * 1e6;
|
return 0.016f * 1e6;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3589,9 +3589,9 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
|
|
||||||
// extrusion paths section -> title
|
// extrusion paths section -> title
|
||||||
if (m_view_type == EViewType::FeatureType)
|
if (m_view_type == EViewType::FeatureType)
|
||||||
append_headers({ _u8L(""), _u8L("Time"), _u8L("Percentage"), _u8L("Used filament") }, offsets);
|
append_headers({ "", _u8L("Time"), _u8L("Percentage"), _u8L("Used filament") }, offsets);
|
||||||
else if (m_view_type == EViewType::Tool)
|
else if (m_view_type == EViewType::Tool)
|
||||||
append_headers({ _u8L(""), _u8L("Used filament"), _u8L(""), _u8L("") }, offsets);
|
append_headers({ "", _u8L("Used filament"), "", ""}, offsets);
|
||||||
else
|
else
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
@ -352,8 +352,8 @@ void GLCanvas3D::LayersEditing::render_active_object_annotations(const GLCanvas3
|
|||||||
glsafe(::glBindTexture(GL_TEXTURE_2D, m_z_texture_id));
|
glsafe(::glBindTexture(GL_TEXTURE_2D, m_z_texture_id));
|
||||||
|
|
||||||
// Render the color bar
|
// Render the color bar
|
||||||
if (!m_profile.background.is_initialized() || m_profile.old_canvas_width != cnv_width) {
|
if (!m_profile.background.is_initialized() || m_profile.old_canvas_width.background != cnv_width) {
|
||||||
m_profile.old_canvas_width = cnv_width;
|
m_profile.old_canvas_width.background = cnv_width;
|
||||||
m_profile.background.reset();
|
m_profile.background.reset();
|
||||||
|
|
||||||
GLModel::Geometry init_data;
|
GLModel::Geometry init_data;
|
||||||
@ -404,9 +404,11 @@ void GLCanvas3D::LayersEditing::render_profile(const GLCanvas3D& canvas)
|
|||||||
|
|
||||||
const float cnv_inv_width = 1.0f / cnv_width;
|
const float cnv_inv_width = 1.0f / cnv_width;
|
||||||
const float cnv_inv_height = 1.0f / cnv_height;
|
const float cnv_inv_height = 1.0f / cnv_height;
|
||||||
|
const float left = 1.0f - 2.0f * THICKNESS_BAR_WIDTH * cnv_inv_width;
|
||||||
|
|
||||||
// Baseline
|
// Baseline
|
||||||
if (!m_profile.baseline.is_initialized() || m_profile.old_layer_height_profile != m_layer_height_profile) {
|
if (!m_profile.baseline.is_initialized() || m_profile.old_layer_height_profile != m_layer_height_profile || m_profile.old_canvas_width.baseline != cnv_width) {
|
||||||
|
m_profile.old_canvas_width.baseline = cnv_width;
|
||||||
m_profile.baseline.reset();
|
m_profile.baseline.reset();
|
||||||
|
|
||||||
GLModel::Geometry init_data;
|
GLModel::Geometry init_data;
|
||||||
@ -416,7 +418,7 @@ void GLCanvas3D::LayersEditing::render_profile(const GLCanvas3D& canvas)
|
|||||||
init_data.reserve_indices(2);
|
init_data.reserve_indices(2);
|
||||||
|
|
||||||
// vertices
|
// vertices
|
||||||
const float axis_x = 2.0f * ((cnv_width - THICKNESS_BAR_WIDTH + float(m_slicing_parameters->layer_height) * scale_x) * cnv_inv_width - 0.5f);
|
const float axis_x = left + 2.0f * float(m_slicing_parameters->layer_height) * scale_x * cnv_inv_width;
|
||||||
init_data.add_vertex(Vec2f(axis_x, -1.0f));
|
init_data.add_vertex(Vec2f(axis_x, -1.0f));
|
||||||
init_data.add_vertex(Vec2f(axis_x, 1.0f));
|
init_data.add_vertex(Vec2f(axis_x, 1.0f));
|
||||||
|
|
||||||
@ -426,7 +428,8 @@ void GLCanvas3D::LayersEditing::render_profile(const GLCanvas3D& canvas)
|
|||||||
m_profile.baseline.init_from(std::move(init_data));
|
m_profile.baseline.init_from(std::move(init_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_profile.profile.is_initialized() || m_profile.old_layer_height_profile != m_layer_height_profile) {
|
if (!m_profile.profile.is_initialized() || m_profile.old_layer_height_profile != m_layer_height_profile || m_profile.old_canvas_width.profile != cnv_width) {
|
||||||
|
m_profile.old_canvas_width.profile = cnv_width;
|
||||||
m_profile.old_layer_height_profile = m_layer_height_profile;
|
m_profile.old_layer_height_profile = m_layer_height_profile;
|
||||||
m_profile.profile.reset();
|
m_profile.profile.reset();
|
||||||
|
|
||||||
@ -438,7 +441,7 @@ void GLCanvas3D::LayersEditing::render_profile(const GLCanvas3D& canvas)
|
|||||||
|
|
||||||
// vertices + indices
|
// vertices + indices
|
||||||
for (unsigned int i = 0; i < (unsigned int)m_layer_height_profile.size(); i += 2) {
|
for (unsigned int i = 0; i < (unsigned int)m_layer_height_profile.size(); i += 2) {
|
||||||
init_data.add_vertex(Vec2f(2.0f * ((cnv_width - THICKNESS_BAR_WIDTH + float(m_layer_height_profile[i + 1]) * scale_x) * cnv_inv_width - 0.5f),
|
init_data.add_vertex(Vec2f(left + 2.0f * float(m_layer_height_profile[i + 1]) * scale_x * cnv_inv_width,
|
||||||
2.0f * (float(m_layer_height_profile[i]) * scale_y * cnv_inv_height - 0.5)));
|
2.0f * (float(m_layer_height_profile[i]) * scale_y * cnv_inv_height - 0.5)));
|
||||||
init_data.add_index(i / 2);
|
init_data.add_index(i / 2);
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,13 @@ class GLCanvas3D
|
|||||||
GLModel baseline;
|
GLModel baseline;
|
||||||
GLModel profile;
|
GLModel profile;
|
||||||
GLModel background;
|
GLModel background;
|
||||||
float old_canvas_width{ 0.0f };
|
struct OldCanvasWidth
|
||||||
|
{
|
||||||
|
float background{ 0.0f };
|
||||||
|
float baseline{ 0.0f };
|
||||||
|
float profile{ 0.0f };
|
||||||
|
};
|
||||||
|
OldCanvasWidth old_canvas_width;
|
||||||
std::vector<double> old_layer_height_profile;
|
std::vector<double> old_layer_height_profile;
|
||||||
};
|
};
|
||||||
Profile m_profile;
|
Profile m_profile;
|
||||||
|
@ -4367,10 +4367,17 @@ void Plater::priv::clear_warnings()
|
|||||||
}
|
}
|
||||||
bool Plater::priv::warnings_dialog()
|
bool Plater::priv::warnings_dialog()
|
||||||
{
|
{
|
||||||
if (current_warnings.empty())
|
std::vector<std::pair<Slic3r::PrintStateBase::Warning, size_t>> current_critical_warnings{};
|
||||||
|
for (const auto& w : current_warnings) {
|
||||||
|
if (w.first.level == PrintStateBase::WarningLevel::CRITICAL) {
|
||||||
|
current_critical_warnings.push_back(w);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current_critical_warnings.empty())
|
||||||
return true;
|
return true;
|
||||||
std::string text = _u8L("There are active warnings concerning sliced models:") + "\n";
|
std::string text = _u8L("There are active warnings concerning sliced models:") + "\n";
|
||||||
for (auto const& it : current_warnings) {
|
for (auto const& it : current_critical_warnings) {
|
||||||
size_t next_n = it.first.message.find_first_of('\n', 0);
|
size_t next_n = it.first.message.find_first_of('\n', 0);
|
||||||
text += "\n";
|
text += "\n";
|
||||||
if (next_n != std::string::npos)
|
if (next_n != std::string::npos)
|
||||||
|
@ -2764,7 +2764,7 @@ void TabPrinter::build_extruder_pages(size_t n_before_extruders)
|
|||||||
line.append_widget(reset_to_filament_color);
|
line.append_widget(reset_to_filament_color);
|
||||||
optgroup->append_line(line);
|
optgroup->append_line(line);
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L(""));
|
optgroup = page->new_optgroup("");
|
||||||
|
|
||||||
auto copy_settings_btn =
|
auto copy_settings_btn =
|
||||||
line = { "", ""};
|
line = { "", ""};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user