Skip to content

Instantly share code, notes, and snippets.

@whitegfx
Created October 31, 2023 11:27
Show Gist options
  • Save whitegfx/bf57fac142be81ecb1b6ce474bd7c617 to your computer and use it in GitHub Desktop.
Save whitegfx/bf57fac142be81ecb1b6ce474bd7c617 to your computer and use it in GitHub Desktop.
Orcaslicer wider sidebar, top perimeters speed
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp
index 10663452e..fd8378ac5 100644
--- a/src/libslic3r/GCode.cpp
+++ b/src/libslic3r/GCode.cpp
@@ -4582,20 +4582,29 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
if (speed == -1) {
int overhang_degree = path.get_overhang_degree();
if (path.role() == erPerimeter) {
- speed = m_config.get_abs_value("inner_wall_speed");
- if (m_config.overhang_speed_classic.value && m_config.enable_overhang_speed.value && overhang_degree > 0 &&
- overhang_degree <= 5) {
- double new_speed = m_config.get_abs_value(overhang_speed_key_map[overhang_degree].c_str());
- speed = new_speed == 0.0 ? speed : new_speed;
+ if (this->m_layer->id() == this->m_layer->object()->layers().size() -1){
+ speed = m_config.get_abs_value("top_surface_speed");
+ }else {
+ speed = m_config.get_abs_value("inner_wall_speed");
+ if (m_config.overhang_speed_classic.value && m_config.enable_overhang_speed.value && overhang_degree > 0 &&
+ overhang_degree <= 5) {
+ double new_speed = m_config.get_abs_value(overhang_speed_key_map[overhang_degree].c_str());
+ speed = new_speed == 0.0 ? speed : new_speed;
+ }
}
} else if (path.role() == erExternalPerimeter) {
- speed = m_config.get_abs_value("outer_wall_speed");
- if (m_config.overhang_speed_classic.value && m_config.enable_overhang_speed.value &&
- overhang_degree > 0 && overhang_degree <= 5) {
- double new_speed = m_config.get_abs_value(overhang_speed_key_map[overhang_degree].c_str());
- speed = new_speed == 0.0 ? speed : new_speed;
- }
- }
+ if (this->m_layer->id() == this->m_layer->object()->layers().size() -1){
+ speed = m_config.get_abs_value("top_surface_speed");
+ }else {
+ speed = m_config.get_abs_value("outer_wall_speed");
+ if (m_config.overhang_speed_classic.value && m_config.enable_overhang_speed.value &&
+ overhang_degree > 0 && overhang_degree <= 5) {
+ double new_speed = m_config.get_abs_value(overhang_speed_key_map[overhang_degree].c_str());
+ speed = new_speed == 0.0 ? speed : new_speed;
+ }
+ }
+ }
+
else if(path.role() == erInternalBridgeInfill) {
speed = m_config.get_abs_value("internal_bridge_speed");
} else if (path.role() == erOverhangPerimeter || path.role() == erSupportTransition || path.role() == erBridgeInfill) {
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index c7619866f..703cf97a6 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -485,7 +485,7 @@ static struct DynamicFilamentList : DynamicList
} dynamic_filament_list;
Sidebar::Sidebar(Plater *parent)
- : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(42 * wxGetApp().em_unit(), -1)), p(new priv(parent))
+ : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(62 * wxGetApp().em_unit(), -1)), p(new priv(parent))
{
Choice::register_dynamic_list("support_filament", &dynamic_filament_list);
Choice::register_dynamic_list("support_interface_filament", &dynamic_filament_list);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment