Skip to content

Commit

Permalink
Adjust new gui for new settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Aug 1, 2024
1 parent 58f0ac4 commit 8e67a34
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 40 deletions.
5 changes: 2 additions & 3 deletions resources/ui_layout/default/extruder.ui
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ group:Travel lift
setting:idx:travel_max_lift
setting:idx:travel_slope
setting:idx:travel_lift_before_obstacle
group:Retraction
setting:idx:retract_length
setting:idx:retract_lift
line:Only lift Z
setting:idx:retract_lift_above
setting:idx:retract_lift_below
Expand All @@ -29,6 +26,8 @@ group:Retraction
setting:idx:retract_lift_first_layer
setting:idx:retract_lift_top
end_line
group:Retraction
setting:idx:retract_length
line:Retraction Speed
setting:idx:retract_speed
setting:idx:label$Deretraction:deretract_speed
Expand Down
5 changes: 2 additions & 3 deletions resources/ui_layout/default/filament.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ group:Temperature °C
line:Extruder
setting:id$0:first_layer_temperature
setting:id$0:temperature
setting:id$0:label$Idle:idle_temperature
end_line
line:toggle$idle_temperature:toggle_default$30:Idle temperature
setting:id$0:idle_temperature
line:Bed
setting:id$0:first_layer_bed_temperature
setting:id$0:label:Other layers:bed_temperature
setting:id$0:label$Other layers:bed_temperature
end_line
setting:id$0:chamber_temperature
group:Filament properties
Expand Down
39 changes: 21 additions & 18 deletions resources/ui_layout/default/print.ui
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ group:Quality
setting:label$Minimum width:sidetext_width$7:min_width_top_surface
end_line
line:Extra perimeters
setting:label_width$8:extra_perimeters_on_overhangs
setting:label$On overhangs:label_width$8:extra_perimeters_on_overhangs
setting:label_width$10:extra_perimeters_odd_layers
end_line
setting: avoid_crossing_curled_overhangs
line:Overlapping external perimeter
setting:label$_:thin_perimeters
setting:label_width$12:label$Also for all perimeters:thin_perimeters_all
Expand All @@ -62,6 +61,7 @@ group:Avoid crossing perimeters
setting:label_width$12:label$Not on first layer:avoid_crossing_not_first_layer
setting:avoid_crossing_top
end_line
setting:avoid_crossing_curled_overhangs
group:label_width$12:Overhangs
line:threshold for
setting:script:bool:advanced:depends$overhangs_width_speed$overhangs_width:label$_:label_width$0:tooltip$Simple widget to enable/disable the overhangs detection (using 55% and 75% for the two thresholds)\nUse the expert mode to get more detailled widgets:s_overhangs
Expand All @@ -81,7 +81,7 @@ group:sidetext_width$5:Seam
setting:tags$Advanced$Expert$SuSi:width$3:sidetext_width$0:seam_travel_cost
setting:tags$Expert$SuSi:sidetext_width$0:seam_visibility
end_line
staggered_inner_seams
setting:staggered_inner_seams
line:Seam notch
setting:seam_notch_inner
setting:seam_notch_outer
Expand Down Expand Up @@ -339,19 +339,21 @@ group:Options for support material interface
end_line
setting:support_material_interface_contact_loops

group:Organic supports"
line:tree angle
setting:support_tree_angle
setting:support_tree_angle_slow
end_line
line:branch diameter
setting:support_tree_branch_diameter
setting:support_tree_branch_diameter_angle
setting:support_tree_branch_diameter_double_wall
end_line
setting:support_tree_tip_diameter
setting:support_tree_branch_distance
setting:support_tree_top_rate
group:Organic supports
line:Tree Branch angle
setting:label$Maximum:support_tree_angle
setting:label$Preferred:support_tree_angle_slow
end_line
line:Branch diameter
setting:label$_:support_tree_branch_diameter
setting:label$Angle:support_tree_branch_diameter_angle
setting:support_tree_tip_diameter
end_line
setting:support_tree_branch_diameter_double_wall
line:Branch
setting:label$Distance:support_tree_branch_distance
setting:label$Density:support_tree_top_rate
end_line

page:Speed:time
group:label_width$8:sidetext_width$7:Speed for print moves
Expand Down Expand Up @@ -510,6 +512,7 @@ group:sidetext_width$2:Flow
setting:script:bool:advanced:depends$bridge_type$bridge_overlap$layer_height$nozzle_diameter:label$ Simulate Prusa 'no thick bridge':label_width$0:tooltip$Change the bridge type and the bridge overlap to compute the same extrusions as when the PrusaSlicer 'thick bridge' isn't selected.\nAs long as it's selected, it will modify them.\nUnselect it to deactivate this enforcement.:s_not_thick_bridge
end_line
setting:external_perimeter_cut_corners

page:Multiple extruders:funnel
group:Extruders
setting:perimeter_extruder
Expand Down Expand Up @@ -545,8 +548,8 @@ group:Wipe tower
group:Advanced
setting:interface_shells
line:Segmented regions
setting:mmu_segmented_region_max_width
setting:mmu_segmented_region_interlocking_depth
setting:label$Maximum width:mmu_segmented_region_max_width
setting:label$Interlocking depth:mmu_segmented_region_interlocking_depth
end_line

page:Output options:output+page_white
Expand Down
7 changes: 5 additions & 2 deletions resources/ui_layout/default/printer_fff.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ group:Print Host upload
print_host_upload_description
group:silent_mode_event:filename_format_event:Firmware
setting:gcode_flavor
setting:silent_mode
setting:binary_gcode
line:Supports
setting:silent_mode
setting:binary_gcode
end_line
line:Print remaining times
setting:label$:remaining_times
setting:remaining_times_type
Expand Down Expand Up @@ -78,6 +80,7 @@ group:Advanced
page:Custom G-code:cog
group:
setting:start_gcode_manual
setting:autoemit_temperature_commands
height:15
group:no_title:edit_gcode:validate_gcode:Start G-code
setting:is_gcode:full_width:height$21:start_gcode
Expand Down
5 changes: 3 additions & 2 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2696,19 +2696,20 @@ void GCodeGenerator::_print_first_layer_bed_temperature(std::string &out, const
// M191 - Set chamber Temperature and Wait
void GCodeGenerator::_print_first_layer_chamber_temperature(std::string &out, const Print &print, const std::string &gcode, uint16_t first_printing_extruder_id, bool wait)
{
bool autoemit = print.config().autoemit_temperature_commands;
// Initial bed temperature based on the first extruder.
int temp = print.config().chamber_temperature.get_at(first_printing_extruder_id);
//disable bed temp control if 0
if (temp == 0) return;
// Is the bed temperature set by the provided custom G-code?
int temp_by_gcode = -1;
bool temp_set_by_gcode = custom_gcode_sets_temperature(gcode, 141, 191, false, temp_by_gcode);
if (temp_set_by_gcode && temp_by_gcode >= 0 && temp_by_gcode < 1000)
if (autoemit && temp_set_by_gcode && temp_by_gcode >= 0 && temp_by_gcode < 1000)
temp = temp_by_gcode;
// Always call m_writer.set_chamber_temperature() so it will set the internal "current" state of the chamber temp as if
// the custom start G-code emited these.
std::string set_temp_gcode = m_writer.set_chamber_temperature(temp, wait);
if (!temp_set_by_gcode && !set_temp_gcode.empty())
if (autoemit && !temp_set_by_gcode && !set_temp_gcode.empty())
out += (set_temp_gcode);
}

Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/GCode/CoolingBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
#include "../GCode.hpp"
#include "libslic3r/GCode.hpp"
#include "CoolingBuffer.hpp"
#include <algorithm>
#include <boost/algorithm/string/predicate.hpp>
Expand Down
12 changes: 6 additions & 6 deletions src/libslic3r/GCode/FanMover.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
#define slic3r_GCode_FanMover_hpp_


#include "../libslic3r.h"
#include "../Point.hpp"
#include "../PrintConfig.hpp"
#include "../ExtrusionEntity.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/GCodeReader.hpp"
#include "libslic3r/GCode/GCodeWriter.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/libslic3r.h"

#include "GCodeReader.hpp"
#include "GCodeWriter.hpp"
#include <regex>

namespace Slic3r {
Expand Down
10 changes: 5 additions & 5 deletions src/slic3r/GUI/Field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,9 +1311,9 @@ wxWindow* CheckBox::GetNewWin(wxWindow* parent, const wxString& label /*= wxEmpt
void CheckBox::SetValue(wxWindow* win, bool value)
{
#ifdef __WXGTK2__
if (wxToggleButton* tgl = dynamic_cast<wxToggleButton*>(window)) {
tgl->SetValue(new_val);
if (new_val)
if (wxToggleButton* tgl = dynamic_cast<wxToggleButton*>(win)) {
tgl->SetValue(value);
if (value)
tgl->SetLabel("X");
else
tgl->SetLabel("");
Expand All @@ -1336,7 +1336,7 @@ void CheckBox::SetValue(wxWindow* win, bool value)
bool CheckBox::GetValue(wxWindow* win)
{
#ifdef __WXGTK2__
if (wxToggleButton* chk = dynamic_cast<wxToggleButton*>(window))
if (wxToggleButton* chk = dynamic_cast<wxToggleButton*>(win))
return chk->GetValue();
#endif
if (wxGetApp().suppress_round_corners())
Expand All @@ -1362,7 +1362,7 @@ void CheckBox::Rescale(wxWindow* win)
return;
}
#ifdef __WXGTK2__
if (wxToggleButton* chk = dynamic_cast<wxToggleButton*>(window))
if (wxToggleButton* chk = dynamic_cast<wxToggleButton*>(win))
chk->Rescale();
#endif
}
Expand Down

0 comments on commit 8e67a34

Please sign in to comment.