This commit is contained in:
enricoturri1966 2020-12-04 14:19:08 +01:00
commit 75a1a699a7
12 changed files with 5197 additions and 3630 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
#define FLAVOR_IS(val) this->config.gcode_flavor == val
#define FLAVOR_IS_NOT(val) this->config.gcode_flavor != val
#define COMMENT(comment) if (this->config.gcode_comments && !comment.empty()) gcode << " ; " << comment;
#define PRECISION(val, precision) std::fixed << std::setprecision(precision) << val
#define PRECISION(val, precision) std::fixed << std::setprecision(precision) << (val)
#define XYZF_NUM(val) PRECISION(val, 3)
#define E_NUM(val) PRECISION(val, 5)
@ -458,7 +458,7 @@ std::string GCodeWriter::_retract(double length, double restart_extra, const std
gcode << "G10 ; retract\n";
} else {
gcode << "G1 " << m_extrusion_axis << E_NUM(m_extruder->E())
<< " F" << float(m_extruder->retract_speed() * 60.);
<< " F" << XYZF_NUM(m_extruder->retract_speed() * 60.);
COMMENT(comment);
gcode << "\n";
}
@ -488,7 +488,7 @@ std::string GCodeWriter::unretract()
} else {
// use G1 instead of G0 because G0 will blend the restart with the previous travel move
gcode << "G1 " << m_extrusion_axis << E_NUM(m_extruder->E())
<< " F" << float(m_extruder->deretract_speed() * 60.);
<< " F" << XYZF_NUM(m_extruder->deretract_speed() * 60.);
if (this->config.gcode_comments) gcode << " ; unretract";
gcode << "\n";
}

View File

@ -5,6 +5,7 @@
#include "GUI.hpp"
#include "GUI_App.hpp"
#include "MainFrame.hpp"
#include "format.hpp"
namespace Slic3r {
namespace GUI {
@ -150,9 +151,8 @@ wxString CopyrightsDialog::get_html_text()
, entry.link, entry.lib_name);
if (!entry.copyright.empty())
text += wxString::Format(
"%s %s"
"<br/><br/>"
text += format_wxstr(
"%1% %2%<br/><br/>"
, copyright_str, entry.copyright);
}

View File

@ -1217,9 +1217,11 @@ wxString Control::get_tooltip(int tick/*=-1*/)
return _L("Jump to move") + " (Shift + G)";
else
return m_mode == MultiAsSingle ?
GUI::from_u8((boost::format(_u8L("Jump to height %s Set ruler mode\n or "
"Set extruder sequence for the entire print")) % " (Shift + G)\n").str()) :
GUI::from_u8((boost::format(_u8L("Jump to height %s or Set ruler mode")) % " (Shift + G)\n").str());
GUI::from_u8((boost::format(_u8L("Jump to height %s\n"
"Set ruler mode\n"
"or Set extruder sequence for the entire print")) % "(Shift + G)").str()) :
GUI::from_u8((boost::format(_u8L("Jump to height %s\n"
"or Set ruler mode")) % "(Shift + G)").str());
}
if (m_focus == fiColorBand)
return m_mode != SingleExtruder ? "" :
@ -1844,7 +1846,7 @@ void Control::show_cog_icon_context_menu()
wxMenu* ruler_mode_menu = new wxMenu();
if (ruler_mode_menu) {
append_menu_check_item(ruler_mode_menu, wxID_ANY, _L("None"), _L("Supprese show the ruler"),
append_menu_check_item(ruler_mode_menu, wxID_ANY, _L("None"), _L("Hide ruler"),
[this](wxCommandEvent&) { if (m_extra_style != 0) m_extra_style = 0; }, ruler_mode_menu,
[]() { return true; }, [this]() { return m_extra_style == 0; }, GUI::wxGetApp().plater());

View File

@ -3983,7 +3983,7 @@ bool GLCanvas3D::_render_arrange_menu(float pos_x)
imgui->text(_L("Use CTRL+left mouse key to enter text edit mode:"));
if (imgui->slider_float(_L("Clearance size"), &settings.distance, dist_min, 100.0f, "%5.2f") || dist_min > settings.distance) {
if (imgui->slider_float(_L("Spacing"), &settings.distance, dist_min, 100.0f, "%5.2f") || dist_min > settings.distance) {
settings.distance = std::max(dist_min, settings.distance);
settings_out.distance = settings.distance;
appcfg->set("arrange", dist_key.c_str(), std::to_string(settings_out.distance));

View File

@ -204,15 +204,15 @@ void KBShortcutsDialog::fill_shortcuts()
Shortcuts preview_shortcuts = {
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
{ L("Arrow Up"), L("Move vertical slider current thumb Up") },
{ L("Arrow Down"), L("Move vertical slider current thumb Down") },
{ L("Arrow Left"), L("Move horizontal slider current thumb Left") },
{ L("Arrow Right"), L("Move horizontal slider current thumb Right") },
{ "W", L("Move vertical slider current thumb Up") },
{ "S", L("Move vertical slider current thumb Down") },
{ "A", L("Move horizontal slider current thumb Left") },
{ "D", L("Move horizontal slider current thumb Right") },
{ "X", L("Toggle vertical slider one layer mode ON/OFF") },
{ L("Arrow Up"), L("Vertical slider - Move active thumb Up") },
{ L("Arrow Down"), L("Vertical slider - Move active thumb Down") },
{ L("Arrow Left"), L("Horizontal slider - Move active thumb Left") },
{ L("Arrow Right"), L("Horizontal slider - Move active thumb Right") },
{ "W", L("Vertical slider - Move active thumb Up") },
{ "S", L("Vertical slider - Move active thumb Down") },
{ "A", L("Horizontal slider - Move active thumb Left") },
{ "D", L("Horizontal slider - Move active thumb Right") },
{ "X", L("On/Off one layer mode of the vertical slider") },
{ "L", L("Show/Hide Legend and Estimated printing time") },
#else
{ L("Arrow Up"), L("Upper layer") },
@ -227,16 +227,16 @@ void KBShortcutsDialog::fill_shortcuts()
Shortcuts layers_slider_shortcuts = {
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
{ L("Arrow Up"), L("Vertical slider - Move current thumb Up") },
{ L("Arrow Down"), L("Vertical slider - Move current thumb Down") },
{ L("Arrow Left"), L("Vertical slider - Set upper thumb to current thumb") },
{ L("Arrow Right"), L("Vertical slider - Set lower thumb to current thumb") },
{ L("Arrow Up"), L("Vertical slider - Move active thumb Up") },
{ L("Arrow Down"), L("Vertical slider - Move active thumb Down") },
{ L("Arrow Left"), L("Vertical slider - Set upper thumb as active") },
{ L("Arrow Right"), L("Vertical slider - Set lower thumb as active") },
{ "+", L("Vertical slider - Add color change marker for current layer") },
{ "-", L("Vertical slider - Delete color change marker for current layer") },
{ L("Arrow Up"), L("Horizontal slider - Set left thumb to current thumb") },
{ L("Arrow Down"), L("Horizontal slider - Set right thumb to current thumb") },
{ L("Arrow Left"), L("Horizontal slider - Move current thumb Left") },
{ L("Arrow Right"), L("Horizontal slider - Move current thumb Right") },
{ L("Arrow Up"), L("Horizontal slider - Set left thumb as active") },
{ L("Arrow Down"), L("Horizontal slider - Set right thumb as active") },
{ L("Arrow Left"), L("Horizontal slider - Move active thumb Left") },
{ L("Arrow Right"), L("Horizontal slider - Move active thumb Right") },
#else
{ L("Arrow Up"), L("Move current slider thumb Up") },
{ L("Arrow Down"), L("Move current slider thumb Down") },
@ -252,8 +252,8 @@ void KBShortcutsDialog::fill_shortcuts()
m_full_shortcuts.push_back(std::make_pair(_L("Layers Slider"), layers_slider_shortcuts));
Shortcuts sequential_slider_shortcuts = {
{ L("Arrow Left"), L("Move current slider thumb Left") },
{ L("Arrow Right"), L("Move current slider thumb Right") },
{ L("Arrow Left"), L("Move active slider thumb Left") },
{ L("Arrow Right"), L("Move active slider thumb Right") },
{ "Shift+", L("Press to speed up 5 times while moving thumb\nwith arrow keys or mouse wheel") },
{ ctrl, L("Press to speed up 5 times while moving thumb\nwith arrow keys or mouse wheel") },
};

View File

@ -623,7 +623,7 @@ void PhysicalPrinterDialog::DeletePreset(PresetForPrinter* preset_for_printer)
{
if (m_presets.size() == 1) {
wxString msg_text = _L("It's not possible to delete the last related preset for the printer.");
wxMessageDialog dialog(nullptr, msg_text, _L("Infornation"), wxICON_INFORMATION | wxOK);
wxMessageDialog dialog(nullptr, msg_text, _L("Information"), wxICON_INFORMATION | wxOK);
dialog.ShowModal();
return;
}

View File

@ -1192,7 +1192,7 @@ void Sidebar::update_sliced_info_sizer()
double spool_weight = filament_preset->config.opt_float("filament_spool_weight", 0);
if (spool_weight != 0.0) {
new_label += "\n " + _L("(weight with spool)");
new_label += "\n " + _L("(including spool)");
info_text += wxString::Format(" (%.2f)\n", filament_weight + spool_weight);
}
}

View File

@ -9,6 +9,7 @@
#include <wx/intl.h>
#include "GUI.hpp"
#include "format.hpp"
#include "I18N.hpp"
namespace Slic3r {
@ -44,7 +45,7 @@ std::string PresetHints::cooling_description(const Preset &preset)
int disable_fan_first_layers = preset.config.opt_int("disable_fan_first_layers", 0);
int min_fan_speed = preset.config.opt_int("min_fan_speed", 0);
if (full_fan_speed_layer > fan_below_layer_time + 1)
if (full_fan_speed_layer > disable_fan_first_layers + 1)
out += GUI::format(_L("Fan speed will be ramped from zero at layer %1% to %2%%% at layer %3%."), disable_fan_first_layers, min_fan_speed, full_fan_speed_layer);
else {
out += GUI::format(cooling ? _L("During the other layers, fan will always run at %1%%%") : _L("Fan will always run at %1%%%"), min_fan_speed) + " ";

View File

@ -19,6 +19,7 @@
#include "I18N.hpp"
#include "../Utils/PrintHost.hpp"
#include "wxExtensions.hpp"
#include "MainFrame.hpp"
#include "libslic3r/AppConfig.hpp"
namespace fs = boost::filesystem;
@ -31,7 +32,7 @@ static const char *CONFIG_KEY_PRINT = "printhost_print";
static const char *CONFIG_KEY_GROUP = "printhost_group";
PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, bool can_start_print, const wxArrayString &groups)
: MsgDialog(nullptr, _L("Send G-Code to printer host"), _L("Upload to Printer Host with the following filename:"), wxID_NONE)
: MsgDialog(static_cast<wxWindow*>(wxGetApp().mainframe), _L("Send G-Code to printer host"), _L("Upload to Printer Host with the following filename:"), wxID_NONE)
, txt_filename(new wxTextCtrl(this, wxID_ANY))
, box_print(can_start_print ? new wxCheckBox(this, wxID_ANY, _L("Start printing after upload")) : nullptr)
, combo_groups(!groups.IsEmpty() ? new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, groups, wxCB_READONLY) : nullptr)
@ -77,6 +78,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, bool can_start_pr
txt_filename->SetFocus();
Fit();
CenterOnParent();
Bind(wxEVT_SHOW, [=](const wxShowEvent &) {
// Another similar case where the function only works with EVT_SHOW + CallAfter,

View File

@ -1586,7 +1586,7 @@ void TabPrint::build()
page = add_options_page(L("Output options"), "output+page_white");
optgroup = page->new_optgroup(L("Sequential printing"));
optgroup->append_single_option_line("complete_objects", "sequential-printing_124589");
line = { L("Extruder clearance (mm)"), "" };
line = { L("Extruder clearance"), "" };
line.append_option(optgroup->get_option("extruder_clearance_radius"));
line.append_option(optgroup->get_option("extruder_clearance_height"));
optgroup->append_line(line);