Merge branch 'stable' (no conflicts fixed)
This commit is contained in:
commit
09fe421fe8
Binary file not shown.
@ -8412,7 +8412,7 @@ msgstr "Überlauf"
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:241 src/libslic3r/ExtrusionEntity.cpp:320
|
||||
#: src/libslic3r/ExtrusionEntity.cpp:344
|
||||
msgid "Overhang perimeter"
|
||||
msgstr "Überhängende Außenkontur"
|
||||
msgstr "Überhängende Kontur"
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:2767
|
||||
msgid "Overhang threshold"
|
||||
@ -8731,7 +8731,7 @@ msgstr ""
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:239 src/libslic3r/ExtrusionEntity.cpp:318
|
||||
#: src/libslic3r/ExtrusionEntity.cpp:340
|
||||
msgid "Perimeter"
|
||||
msgstr "Außenkontur"
|
||||
msgstr "Kontur"
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:1946
|
||||
msgid "Perimeter extruder"
|
||||
@ -10848,8 +10848,8 @@ msgstr ""
|
||||
"Setzen Sie dies auf einen Nicht-Nullwert, um eine manuelle Extrusionsbreite "
|
||||
"zuzulassen. Falls auf null belassen, wird PrusaSlicer die Extrusionsbreiten "
|
||||
"vom Durchmesser der Druckdüse ableiten (siehe die Hilfstexte für die "
|
||||
"Extrusionsbreite für Außenkonturen, Infill usw.). Falls als Prozentwert (z."
|
||||
"B. 230%) angegeben, wird dieser ausgehend von der Schichthöhe berechnet."
|
||||
"Extrusionsbreite für Konturen, Infill usw.). Falls als Prozentwert (z.B. "
|
||||
"230%) angegeben, wird dieser ausgehend von der Schichthöhe berechnet."
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:729
|
||||
msgid ""
|
||||
@ -10859,10 +10859,10 @@ msgid ""
|
||||
"(for example 200%), it will be computed over layer height."
|
||||
msgstr ""
|
||||
"Setzen Sie dies auf einen Nicht-Nullwert, um eine manuelle Extrusionsbreite "
|
||||
"für externe Außenkonturen anzugeben. Falls auf null belassen, wird die "
|
||||
"Standard-Extrusionsbreite verwendet (falls angeben), ansonsten wird der "
|
||||
"Durchmesser der Druckdüse x 1,125 verwendet. Falls als Prozentwert (z.B. "
|
||||
"200%) angegeben, wird dieser ausgehend von der Schichthöhe berechnet."
|
||||
"für Außenkonturen anzugeben. Falls auf null belassen, wird die Standard-"
|
||||
"Extrusionsbreite verwendet (falls angeben), ansonsten wird der Durchmesser "
|
||||
"der Druckdüse x 1,125 verwendet. Falls als Prozentwert (z.B. 200%) "
|
||||
"angegeben, wird dieser ausgehend von der Schichthöhe berechnet."
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:1196
|
||||
msgid ""
|
||||
@ -10931,7 +10931,7 @@ msgid ""
|
||||
"it will be computed over layer height."
|
||||
msgstr ""
|
||||
"Setzen Sie dies auf einen Nicht-Nullwert, um eine manuelle Extrusionsbreite "
|
||||
"für Außenkonturen anzugeben. Dünnere Extrusionsbreiten sind vorteilhaft, um "
|
||||
"für Konturen anzugeben. Dünnere Extrusionsbreiten sind vorteilhaft, um "
|
||||
"genauere Oberflächen zu erhalten. Falls auf null belassen, wird die Standard-"
|
||||
"Extrusionsbreite verwendet (falls angeben), ansonsten wird der Durchmesser "
|
||||
"der Druckdüse x 1,125 verwendet. Falls als Prozentwert (z.B. 200%) "
|
||||
@ -11797,7 +11797,7 @@ msgid ""
|
||||
"for auto."
|
||||
msgstr ""
|
||||
"Druckgeschwindigkeit für die oberen massiven Schichten (betrifft nur die "
|
||||
"obersten Außenkonturen und nicht deren innenliegende massiven Schichten). "
|
||||
"obersten Außenschichten und nicht deren innenliegende massiven Schichten). "
|
||||
"Wir empfehlen, diesen Wert zu reduzieren, um eine schönere Oberfläche zu "
|
||||
"erhalten. Dies kann als Prozentwert (z.B. 80%) der oben eingegebenen "
|
||||
"Geschwindigkeit für massives Infill angegeben werden. Für Automatik auf null "
|
||||
@ -12613,8 +12613,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Der Extruder, der verwendet werden soll, falls keine sonstigen "
|
||||
"Extrudereinstellungen angegeben wurden. Dies übersteuert die Angaben für die "
|
||||
"Außenkontur- und Infill-Extruder, aber nicht die Angabe des Extruders für "
|
||||
"die Stützen."
|
||||
"Kontur- und Infill-Extruder, aber nicht die Angabe des Extruders für die "
|
||||
"Stützen."
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:1448
|
||||
msgid "The extruder to use when printing infill."
|
||||
@ -13554,8 +13554,8 @@ msgid ""
|
||||
"prevent resetting acceleration at all."
|
||||
msgstr ""
|
||||
"Dies ist der Beschleunigungswert, auf den Ihr Drucker zurückgesetzt wird, "
|
||||
"nachdem aufgabenspezifische Beschleunigungswerte (Außenkonturen/Infill) "
|
||||
"verwendet wurden. Setzen Sie dies auf null, um ein Zurückstellen der "
|
||||
"nachdem aufgabenspezifische Beschleunigungswerte (Konturen/Infill) verwendet "
|
||||
"wurden. Setzen Sie dies auf null, um ein Zurückstellen der "
|
||||
"Beschleunigungswerte zu deaktivieren."
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:443
|
||||
@ -13679,11 +13679,11 @@ msgid ""
|
||||
"surfaces which benefit from a higher number of perimeters if the Extra "
|
||||
"Perimeters option is enabled."
|
||||
msgstr ""
|
||||
"Diese Stellung bestimmt die Anzahl der Außenkonturen, die für jede Schicht "
|
||||
"Diese Stellung bestimmt die Anzahl der Konturen, die für jede Schicht "
|
||||
"erzeugt werden. PusaSlicer kann diese Zahl automatisch vergrößern, wenn es "
|
||||
"schräge Oberflächen erkennt, die sich mit einer höheren Zahl von "
|
||||
"Außenkonturen besser drucken lassen, wenn die \"Zusätzliche Außenkonturen "
|
||||
"falls notwendig\" Option aktiviert ist."
|
||||
"schräge Oberflächen erkennt, die sich mit einer höheren Zahl von Konturen "
|
||||
"besser drucken lassen, wenn die \"Zusätzliche Konturen falls notwendig\" "
|
||||
"Option aktiviert ist."
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:1895
|
||||
msgid ""
|
||||
@ -13712,8 +13712,8 @@ msgid ""
|
||||
"This option will switch the print order of perimeters and infill, making the "
|
||||
"latter first."
|
||||
msgstr ""
|
||||
"Diese Einstellungen kehrt die Druckreihenfolge von Außenkonturen und Infill "
|
||||
"um, sodass der Infill zuerst gedruckt wird."
|
||||
"Diese Einstellungen kehrt die Druckreihenfolge von Konturen und Infill um, "
|
||||
"sodass der Infill zuerst gedruckt wird."
|
||||
|
||||
#: src/slic3r/GUI/PhysicalPrinterDialog.cpp:83
|
||||
msgid "This printer will be shown in the presets list as"
|
||||
@ -13726,9 +13726,9 @@ msgid ""
|
||||
"calculated on the perimeters speed setting above. Set to zero for auto."
|
||||
msgstr ""
|
||||
"Diese separate Einstellung wirkt sich auf die Geschwindigkeit der äußeren "
|
||||
"(sichtbaren) Außenkonturen aus. Als Prozentwert eingegeben (z.B. 80%), wird "
|
||||
"sie ausgehend von der obigen Geschwindigkeitseinstellung für Außenkonturen "
|
||||
"berechnet. Für die automatische Berechnung auf null setzen."
|
||||
"(sichtbaren) Konturen aus. Als Prozentwert eingegeben (z.B. 80%), wird sie "
|
||||
"ausgehend von der obigen Geschwindigkeitseinstellung für Konturen berechnet. "
|
||||
"Für die automatische Berechnung auf null setzen."
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:2303
|
||||
msgid ""
|
||||
@ -13736,11 +13736,11 @@ msgid ""
|
||||
"6.5mm (usually holes). If expressed as percentage (for example: 80%) it will "
|
||||
"be calculated on the perimeters speed setting above. Set to zero for auto."
|
||||
msgstr ""
|
||||
"Diese separate Einstellung wirkt sich auf die Geschwindigkeit von "
|
||||
"Außenkonturen mit einem Radius <= 6,5 mm (üblicherweise Bohrungen) aus. Als "
|
||||
"Prozentwert eingegeben (z.B. 80%), wird sie ausgehend von der obigen "
|
||||
"Geschwindigkeitseinstellung für Außenkonturen berechnet. Für eine "
|
||||
"automatische Berechnung setzen Sie dies auf null."
|
||||
"Diese separate Einstellung wirkt sich auf die Geschwindigkeit von Konturen "
|
||||
"mit einem Radius <= 6,5 mm (üblicherweise Bohrungen) aus. Als Prozentwert "
|
||||
"eingegeben (z.B. 80%), wird sie ausgehend von der obigen "
|
||||
"Geschwindigkeitseinstellung für Konturen berechnet. Für eine automatische "
|
||||
"Berechnung setzen Sie dies auf null."
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:1484
|
||||
msgid ""
|
||||
@ -13749,11 +13749,11 @@ msgid ""
|
||||
"cause gaps. If expressed as percentage (example: 15%) it is calculated over "
|
||||
"perimeter extrusion width."
|
||||
msgstr ""
|
||||
"Diese Einstellung fügt eine zusätzliche Überlappung zwischen Außenkonturen "
|
||||
"und Infill ein, um die Haftung zu verbessern. Theoretisch sollte dies nicht "
|
||||
"Diese Einstellung fügt eine zusätzliche Überlappung zwischen Konturen und "
|
||||
"Infill ein, um die Haftung zu verbessern. Theoretisch sollte dies nicht "
|
||||
"notwendig sein, doch vorhandenes Getriebespiel könnte Lücken erzeugen. Als "
|
||||
"Prozentwert eingegeben (z.B. 15%) wird sie ausgehend von der "
|
||||
"Extrusionsbreite für die Außenkontur ausgerechnet."
|
||||
"Extrusionsbreite für die Kontur ausgerechnet."
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:265
|
||||
msgid ""
|
||||
@ -15816,7 +15816,7 @@ msgstr "Parametername"
|
||||
|
||||
#: src/slic3r/GUI/PresetHints.cpp:171
|
||||
msgid "perimeters"
|
||||
msgstr "Außenkonturen"
|
||||
msgstr "Konturen"
|
||||
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:64 src/libslic3r/Preset.cpp:1338
|
||||
msgid "print"
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -470,4 +470,8 @@ max_print_height = 235
|
||||
start_gcode = M82 ;absolute extrusion mode\n;Start GCode begin\nM140 S[first_layer_bed_temperature] ;Start Warming Bed\nM104 S160 ;Preheat Nozzle\nG28 ; home all axes\nG90 ;absolute positioning\nG1 X-10 Y-10 F3000\nG1 Z0 F1800\nG1 Z5 F5000 ; lift nozzle\nM190 S[first_layer_bed_temperature] ;Wait For Bed Temperature\nM109 S[first_layer_temperature] ;Wait for Hotend Temperature\nG92 E0\nG1 E10 F200\nG1 E-2 F300\nG92 E0\n;Start GCode end\nG1 F3600 E-2
|
||||
end_gcode = M140 S0\n;End GCode begin\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG90 ;absolute positioning\nG92 E0\nG1 E-2 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z330 E-1 F80 ;move Z up a bit and retract filament even more\nG1 X0 F3000 ;move X to min endstops, so the head is out of the way\nG1 Y250 F3000 ;so the head is out of the way and Plate is moved forward\nM84 ;steppers off\n;End GCode end\nM82 ;absolute extrusion mode\nM104 S0\nM107\n;End of Gcode
|
||||
default_filament_profile = Generic PLA @Snapmaker
|
||||
<<<<<<< HEAD
|
||||
default_print_profile = 0.20mm NORMAL @SnapmakerA250
|
||||
=======
|
||||
default_print_profile = 0.20mm NORMAL @SnapmakerA250
|
||||
>>>>>>> stable
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
BIN
resources/shapes/PLA_recycling_symbol.png
Normal file
BIN
resources/shapes/PLA_recycling_symbol.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
resources/shapes/PLA_recycling_symbol.stl
Normal file
BIN
resources/shapes/PLA_recycling_symbol.stl
Normal file
Binary file not shown.
@ -824,6 +824,7 @@ public:
|
||||
m_ifs.seekg(m_file_pos, m_ifs.beg);
|
||||
if (! m_ifs.read(m_block.data(), m_block_len))
|
||||
return false;
|
||||
assert(m_block_len == m_ifs.gcount());
|
||||
}
|
||||
|
||||
assert(m_block_len > 0);
|
||||
@ -866,7 +867,7 @@ private:
|
||||
ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule)
|
||||
{
|
||||
// Read a 64k block from the end of the G-code.
|
||||
boost::nowide::ifstream ifs(file);
|
||||
boost::nowide::ifstream ifs(file, std::ifstream::binary);
|
||||
// Look for Slic3r or PrusaSlicer header.
|
||||
// Look for the header across the whole file as the G-code may have been extended at the start by a post-processing script or the user.
|
||||
bool has_delimiters = false;
|
||||
|
@ -194,7 +194,8 @@ enum ConfigOptionType {
|
||||
enum ConfigOptionMode {
|
||||
comSimple = 0,
|
||||
comAdvanced,
|
||||
comExpert
|
||||
comExpert,
|
||||
comUndef
|
||||
};
|
||||
|
||||
enum PrinterTechnology : unsigned char
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -153,8 +153,8 @@ public:
|
||||
float layer_height,
|
||||
// Maximum number of tool changes on this layer or the layers below.
|
||||
size_t max_tool_changes,
|
||||
// Is this the first layer of the print? In that case print the brim first.
|
||||
bool is_first_layer,
|
||||
// Is this the first layer of the print? In that case print the brim first. (OBSOLETE)
|
||||
bool /*is_first_layer*/,
|
||||
// Is this the last layer of the waste tower?
|
||||
bool is_last_layer)
|
||||
{
|
||||
@ -162,8 +162,14 @@ public:
|
||||
m_layer_height = layer_height;
|
||||
m_depth_traversed = 0.f;
|
||||
m_current_layer_finished = false;
|
||||
m_current_shape = (! is_first_layer && m_current_shape == SHAPE_NORMAL) ? SHAPE_REVERSED : SHAPE_NORMAL;
|
||||
if (is_first_layer) {
|
||||
|
||||
|
||||
// Advance m_layer_info iterator, making sure we got it right
|
||||
while (!m_plan.empty() && m_layer_info->z < print_z - WT_EPSILON && m_layer_info+1 != m_plan.end())
|
||||
++m_layer_info;
|
||||
|
||||
m_current_shape = (! this->is_first_layer() && m_current_shape == SHAPE_NORMAL) ? SHAPE_REVERSED : SHAPE_NORMAL;
|
||||
if (this->is_first_layer()) {
|
||||
m_num_layer_changes = 0;
|
||||
m_num_tool_changes = 0;
|
||||
} else
|
||||
@ -171,10 +177,6 @@ public:
|
||||
|
||||
// Calculate extrusion flow from desired line width, nozzle diameter, filament diameter and layer_height:
|
||||
m_extrusion_flow = extrusion_flow(layer_height);
|
||||
|
||||
// Advance m_layer_info iterator, making sure we got it right
|
||||
while (!m_plan.empty() && m_layer_info->z < print_z - WT_EPSILON && m_layer_info+1 != m_plan.end())
|
||||
++m_layer_info;
|
||||
}
|
||||
|
||||
// Return the wipe tower position.
|
||||
|
@ -538,8 +538,21 @@ std::string Print::validate(std::string* warning) const
|
||||
for (size_t idx_object = 0; idx_object < m_objects.size(); ++ idx_object) {
|
||||
if (idx_object == tallest_object_idx)
|
||||
continue;
|
||||
if (layer_height_profiles[idx_object] != layer_height_profiles[tallest_object_idx])
|
||||
return L("The Wipe tower is only supported if all objects have the same variable layer height");
|
||||
// Check that the layer height profiles are equal. This will happen when one object is
|
||||
// a copy of another, or when a layer height modifier is used the same way on both objects.
|
||||
// The latter case might create a floating point inaccuracy mismatch, so compare
|
||||
// element-wise using an epsilon check.
|
||||
size_t i = 0;
|
||||
const coordf_t eps = 0.5 * EPSILON; // layers closer than EPSILON will be merged later. Let's make
|
||||
// this check a bit more sensitive to make sure we never consider two different layers as one.
|
||||
while (i < layer_height_profiles[idx_object].size()
|
||||
&& i < layer_height_profiles[tallest_object_idx].size()) {
|
||||
if (i%2 == 0 && layer_height_profiles[tallest_object_idx][i] > layer_height_profiles[idx_object][layer_height_profiles[idx_object].size() - 2 ])
|
||||
break;
|
||||
if (std::abs(layer_height_profiles[idx_object][i] - layer_height_profiles[tallest_object_idx][i]) > eps)
|
||||
return L("The Wipe tower is only supported if all objects have the same variable layer height");
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2176,7 +2176,8 @@ void Control::auto_color_change()
|
||||
|
||||
const Print& print = GUI::wxGetApp().plater()->fff_print();
|
||||
for (auto object : print.objects()) {
|
||||
if (object->layer_count() == 0)
|
||||
// An object should to have at least 2 layers to apply an auto color change
|
||||
if (object->layer_count() < 2)
|
||||
continue;
|
||||
|
||||
check_color_change(object, 1, object->layers().size(), false, [this, extruders_cnt](Layer* layer)
|
||||
|
@ -1050,8 +1050,6 @@ bool GUI_App::OnInit()
|
||||
}
|
||||
}
|
||||
|
||||
static bool update_gui_after_init = true;
|
||||
|
||||
bool GUI_App::on_init_inner()
|
||||
{
|
||||
// Set initialization of image handlers before any UI actions - See GH issue #7469
|
||||
@ -1327,18 +1325,18 @@ bool GUI_App::on_init_inner()
|
||||
// An ugly solution to GH #5537 in which GUI_App::init_opengl (normally called from events wxEVT_PAINT
|
||||
// and wxEVT_SET_FOCUS before GUI_App::post_init is called) wasn't called before GUI_App::post_init and OpenGL wasn't initialized.
|
||||
#ifdef __linux__
|
||||
if (update_gui_after_init && m_opengl_initialized) {
|
||||
if (! m_post_initialized && m_opengl_initialized) {
|
||||
#else
|
||||
if (update_gui_after_init) {
|
||||
if (! m_post_initialized) {
|
||||
#endif
|
||||
update_gui_after_init = false;
|
||||
m_post_initialized = true;
|
||||
#ifdef WIN32
|
||||
this->mainframe->register_win32_callbacks();
|
||||
#endif
|
||||
this->post_init();
|
||||
}
|
||||
|
||||
if (! update_gui_after_init && app_config->dirty() && app_config->get("autosave") == "1")
|
||||
if (m_post_initialized && app_config->dirty() && app_config->get("autosave") == "1")
|
||||
app_config->save();
|
||||
});
|
||||
|
||||
@ -2726,17 +2724,25 @@ void GUI_App::MacOpenFiles(const wxArrayString &fileNames)
|
||||
// Running in G-code viewer.
|
||||
// Load the first G-code into the G-code viewer.
|
||||
// Or if no G-codes, send other files to slicer.
|
||||
if (! gcode_files.empty())
|
||||
this->plater()->load_gcode(gcode_files.front());
|
||||
if (! gcode_files.empty()) {
|
||||
if (m_post_initialized)
|
||||
this->plater()->load_gcode(gcode_files.front());
|
||||
else
|
||||
this->init_params->input_files = { into_u8(gcode_files.front()) };
|
||||
}
|
||||
if (!non_gcode_files.empty())
|
||||
start_new_slicer(non_gcode_files, true);
|
||||
} else {
|
||||
if (! files.empty()) {
|
||||
wxArrayString input_files;
|
||||
for (size_t i = 0; i < non_gcode_files.size(); ++i) {
|
||||
input_files.push_back(non_gcode_files[i]);
|
||||
if (m_post_initialized) {
|
||||
wxArrayString input_files;
|
||||
for (size_t i = 0; i < non_gcode_files.size(); ++i)
|
||||
input_files.push_back(non_gcode_files[i]);
|
||||
this->plater()->load_files(input_files);
|
||||
} else {
|
||||
for (const auto &f : non_gcode_files)
|
||||
this->init_params->input_files.emplace_back(into_u8(f));
|
||||
}
|
||||
this->plater()->load_files(input_files);
|
||||
}
|
||||
for (const wxString &filename : gcode_files)
|
||||
start_new_gcodeviewer(&filename);
|
||||
|
@ -116,6 +116,7 @@ public:
|
||||
|
||||
private:
|
||||
bool m_initialized { false };
|
||||
bool m_post_initialized { false };
|
||||
bool m_app_conf_exists{ false };
|
||||
EAppMode m_app_mode{ EAppMode::Editor };
|
||||
bool m_is_recreating_gui{ false };
|
||||
|
@ -119,6 +119,7 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking)
|
||||
|
||||
const GLVolume* vol = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||
Geometry::Transformation trafo = vol->get_instance_transformation() * vol->get_volume_transformation();
|
||||
<<<<<<< HEAD
|
||||
|
||||
#if ENABLE_GL_SHADERS_ATTRIBUTES
|
||||
const Transform3d instance_scaling_matrix_inverse = vol->get_instance_transformation().get_matrix(true, true, false, true).inverse();
|
||||
@ -130,6 +131,8 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking)
|
||||
|
||||
shader->set_uniform("projection_matrix", projection_matrix);
|
||||
#else
|
||||
=======
|
||||
>>>>>>> stable
|
||||
const Transform3d& instance_scaling_matrix_inverse = trafo.get_matrix(true, true, false, true).inverse();
|
||||
const Transform3d& instance_matrix = trafo.get_matrix();
|
||||
|
||||
|
@ -149,6 +149,7 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking)
|
||||
const GLVolume* vol = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||
Geometry::Transformation transformation(vol->get_instance_transformation().get_matrix() * vol->get_volume_transformation().get_matrix());
|
||||
const Transform3d& instance_scaling_matrix_inverse = transformation.get_matrix(true, true, false, true).inverse();
|
||||
<<<<<<< HEAD
|
||||
#if ENABLE_GL_SHADERS_ATTRIBUTES
|
||||
const Transform3d instance_matrix = Geometry::assemble_transform(m_c->selection_info()->get_sla_shift() * Vec3d::UnitZ()) * transformation.get_matrix();
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
@ -157,6 +158,8 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking)
|
||||
|
||||
shader->set_uniform("projection_matrix", projection_matrix);
|
||||
#else
|
||||
=======
|
||||
>>>>>>> stable
|
||||
const Transform3d& instance_matrix = transformation.get_matrix();
|
||||
const float z_shift = m_c->selection_info()->get_sla_shift();
|
||||
glsafe(::glPushMatrix());
|
||||
|
@ -1227,6 +1227,15 @@ void ImGuiWrapper::init_font(bool compress)
|
||||
ImVector<ImWchar> ranges;
|
||||
ImFontAtlas::GlyphRangesBuilder builder;
|
||||
builder.AddRanges(m_glyph_ranges);
|
||||
|
||||
if (m_font_cjk) {
|
||||
// This is a temporary fix of https://github.com/prusa3d/PrusaSlicer/issues/8171. The translation
|
||||
// contains characters not in the ImGui ranges for simplified Chinese. For now, just add them manually.
|
||||
// In future, it might be worth to parse the dictionary and add all the necessary characters.
|
||||
builder.AddChar(ImWchar(0x5ED3));
|
||||
builder.AddChar(ImWchar(0x8F91));
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (m_font_cjk)
|
||||
// Apple keyboard shortcuts are only contained in the CJK fonts.
|
||||
|
@ -53,7 +53,7 @@ void SLAImportJob::process(Ctl &ctl)
|
||||
return !ctl.was_canceled();
|
||||
};
|
||||
|
||||
if (p->path.empty()) return;
|
||||
if (p->path.empty() || ! p->err.empty()) return;
|
||||
|
||||
std::string path = p->path.ToUTF8().data();
|
||||
std::string format_id = p->import_dlg->get_archive_format();
|
||||
@ -75,11 +75,16 @@ void SLAImportJob::process(Ctl &ctl)
|
||||
}
|
||||
} catch (MissingProfileError &) {
|
||||
p->err = _u8L("The SLA archive doesn't contain any presets. "
|
||||
<<<<<<< HEAD
|
||||
"Please activate some SLA printer preset first before "
|
||||
"importing that SLA archive.");
|
||||
} catch (ReaderUnimplementedError &) {
|
||||
p->err = _u8L("Import is unavailable for this archive format.");
|
||||
}catch (std::exception &ex) {
|
||||
=======
|
||||
"Please activate some SLA printer preset first before importing that SLA archive.");
|
||||
} catch (std::exception &ex) {
|
||||
>>>>>>> stable
|
||||
p->err = ex.what();
|
||||
}
|
||||
|
||||
@ -94,12 +99,14 @@ void SLAImportJob::reset()
|
||||
p->profile = p->plater->sla_print().full_print_config();
|
||||
p->quality = SLAImportQuality::Balanced;
|
||||
p->path.Clear();
|
||||
p->err = "";
|
||||
}
|
||||
|
||||
void SLAImportJob::prepare()
|
||||
{
|
||||
reset();
|
||||
|
||||
<<<<<<< HEAD
|
||||
auto path = p->import_dlg->get_path();
|
||||
auto nm = wxFileName(path);
|
||||
p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : nm.GetFullPath();
|
||||
@ -107,6 +114,22 @@ void SLAImportJob::prepare()
|
||||
p->quality = p->import_dlg->get_quality();
|
||||
|
||||
p->config_substitutions.clear();
|
||||
=======
|
||||
if (p->import_dlg.ShowModal() == wxID_OK) {
|
||||
auto path = p->import_dlg.get_path();
|
||||
auto nm = wxFileName(path);
|
||||
p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : nm.GetFullPath();
|
||||
if (p->path.empty()) {
|
||||
p->err = _u8L("The file does not exist.");
|
||||
return;
|
||||
}
|
||||
p->sel = p->import_dlg.get_selection();
|
||||
p->win = p->import_dlg.get_marchsq_windowsize();
|
||||
p->config_substitutions.clear();
|
||||
} else {
|
||||
p->path = "";
|
||||
}
|
||||
>>>>>>> stable
|
||||
}
|
||||
|
||||
void SLAImportJob::finalize(bool canceled, std::exception_ptr &eptr)
|
||||
@ -121,6 +144,12 @@ void SLAImportJob::finalize(bool canceled, std::exception_ptr &eptr)
|
||||
return;
|
||||
}
|
||||
|
||||
if (p->path.empty()) {
|
||||
// This happens when the user cancels the import dialog. That is not
|
||||
// an error to report, but we cannot continue either.
|
||||
return;
|
||||
}
|
||||
|
||||
std::string name = wxFileName(p->path).GetName().ToUTF8().data();
|
||||
|
||||
if (p->profile.empty()) {
|
||||
|
@ -1491,22 +1491,18 @@ bool Sidebar::is_multifilament()
|
||||
return p->combos_filament.size() > 1;
|
||||
}
|
||||
|
||||
static std::vector<Search::InputInfo> get_search_inputs(ConfigOptionMode mode)
|
||||
void Sidebar::check_and_update_searcher(bool respect_mode /*= false*/)
|
||||
{
|
||||
std::vector<Search::InputInfo> ret {};
|
||||
std::vector<Search::InputInfo> search_inputs{};
|
||||
|
||||
auto& tabs_list = wxGetApp().tabs_list;
|
||||
auto print_tech = wxGetApp().preset_bundle->printers.get_selected_preset().printer_technology();
|
||||
for (auto tab : tabs_list)
|
||||
if (tab->supports_printer_technology(print_tech))
|
||||
ret.emplace_back(Search::InputInfo {tab->get_config(), tab->type(), mode});
|
||||
search_inputs.emplace_back(Search::InputInfo{ tab->get_config(), tab->type() });
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Sidebar::update_searcher()
|
||||
{
|
||||
p->searcher.init(get_search_inputs(m_mode));
|
||||
p->searcher.check_and_update(wxGetApp().preset_bundle->printers.get_selected_preset().printer_technology(),
|
||||
respect_mode ? m_mode : comExpert, search_inputs);
|
||||
}
|
||||
|
||||
void Sidebar::update_mode()
|
||||
@ -1515,7 +1511,6 @@ void Sidebar::update_mode()
|
||||
|
||||
update_reslice_btn_tooltip();
|
||||
update_mode_sizer();
|
||||
update_searcher();
|
||||
|
||||
wxWindowUpdateLocker noUpdates(this);
|
||||
|
||||
@ -1573,6 +1568,8 @@ Search::OptionsSearcher& Sidebar::get_searcher()
|
||||
|
||||
std::string& Sidebar::get_search_line()
|
||||
{
|
||||
// update searcher before show imGui search dialog on the plater, if printer technology or mode was changed
|
||||
check_and_update_searcher(true);
|
||||
return p->searcher.search_string();
|
||||
}
|
||||
|
||||
@ -1716,8 +1713,11 @@ struct Plater::priv
|
||||
res = (act == "1") ? wxID_YES : wxID_NO;
|
||||
|
||||
if (res == wxID_YES)
|
||||
if (!mainframe->save_project_as(project_name))
|
||||
res = wxID_CANCEL;
|
||||
if (!mainframe->save_project_as(project_name)) {
|
||||
// Return Cancel only, when we don't remember a choice for closing the application.
|
||||
// Elsewhere it can causes an impossibility to close the application at all.
|
||||
res = act.empty() ? wxID_CANCEL : wxID_NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
@ -2399,7 +2399,11 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
}
|
||||
|
||||
const auto loading = _L("Loading") + dots;
|
||||
wxProgressDialog progress_dlg(loading, "", 100, find_toplevel_parent(q), wxPD_AUTO_HIDE);
|
||||
|
||||
// Create wxProgressDialog on heap, see the linux ifdef below.
|
||||
auto progress_dlg = new wxProgressDialog(loading, "", 100, find_toplevel_parent(q), wxPD_AUTO_HIDE);
|
||||
Slic3r::ScopeGuard([&progress_dlg](){ if (progress_dlg) progress_dlg->Destroy(); progress_dlg = nullptr; });
|
||||
|
||||
wxBusyCursor busy;
|
||||
|
||||
auto *new_model = (!load_model || one_by_one) ? nullptr : new Slic3r::Model();
|
||||
@ -2419,8 +2423,10 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
const auto &path = input_files[i];
|
||||
#endif // _WIN32
|
||||
const auto filename = path.filename();
|
||||
progress_dlg.Update(static_cast<int>(100.0f * static_cast<float>(i) / static_cast<float>(input_files.size())), _L("Loading file") + ": " + from_path(filename));
|
||||
progress_dlg.Fit();
|
||||
if (progress_dlg) {
|
||||
progress_dlg->Update(static_cast<int>(100.0f * static_cast<float>(i) / static_cast<float>(input_files.size())), _L("Loading file") + ": " + from_path(filename));
|
||||
progress_dlg->Fit();
|
||||
}
|
||||
|
||||
const bool type_3mf = std::regex_match(path.string(), pattern_3mf);
|
||||
const bool type_zip_amf = !type_3mf && std::regex_match(path.string(), pattern_zip_amf);
|
||||
@ -2438,8 +2444,10 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
// then related SLA Print and Materials Settings or FFF Print and Filaments Settings will be unparent from the wxNoteBook
|
||||
// and that is why they will never be enabled after destruction of the ProgressDialog.
|
||||
// So, distroy progress_gialog if we are loading project file
|
||||
if (input_files_size == 1)
|
||||
progress_dlg.Destroy();
|
||||
if (input_files_size == 1 && progress_dlg) {
|
||||
progress_dlg->Destroy();
|
||||
progress_dlg = nullptr;
|
||||
}
|
||||
#endif
|
||||
DynamicPrintConfig config;
|
||||
PrinterTechnology loaded_printer_technology {ptFFF};
|
||||
@ -5822,6 +5830,10 @@ void Plater::convert_unit(ConversionType conv_type)
|
||||
if (obj_idxs.empty() && volume_idxs.empty())
|
||||
return;
|
||||
|
||||
// We will remove object indexes after convertion
|
||||
// So, resort object indexes descending to avoid the crash after remove
|
||||
std::sort(obj_idxs.begin(), obj_idxs.end(), std::greater<int>());
|
||||
|
||||
TakeSnapshot snapshot(this, conv_type == ConversionType::CONV_FROM_INCH ? _L("Convert from imperial units") :
|
||||
conv_type == ConversionType::CONV_TO_INCH ? _L("Revert conversion from imperial units") :
|
||||
conv_type == ConversionType::CONV_FROM_METER ? _L("Convert from meters") : _L("Revert conversion from meters"));
|
||||
@ -6497,8 +6509,6 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
||||
p->config->set_key_value(opt_key, config.option(opt_key)->clone());
|
||||
if (opt_key == "printer_technology") {
|
||||
this->set_printer_technology(config.opt_enum<PrinterTechnology>(opt_key));
|
||||
// print technology is changed, so we should to update a search list
|
||||
p->sidebar->update_searcher();
|
||||
p->sidebar->show_sliced_info_sizer(false);
|
||||
p->reset_gcode_toolpaths();
|
||||
p->view3D->get_canvas3d()->reset_sequential_print_clearance();
|
||||
@ -6747,8 +6757,6 @@ bool Plater::set_printer_technology(PrinterTechnology printer_technology)
|
||||
|
||||
p->update_main_toolbar_tooltips();
|
||||
|
||||
p->sidebar->get_searcher().set_printer_technology(printer_technology);
|
||||
|
||||
p->notification_manager->set_fff(printer_technology == ptFFF);
|
||||
p->notification_manager->set_slicing_progress_hidden();
|
||||
|
||||
@ -6912,8 +6920,10 @@ void Plater::search(bool plater_is_active)
|
||||
evt.SetControlDown(true);
|
||||
canvas3D()->on_char(evt);
|
||||
}
|
||||
else
|
||||
else {
|
||||
p->sidebar->check_and_update_searcher(true);
|
||||
p->sidebar->get_searcher().show_dialog();
|
||||
}
|
||||
}
|
||||
|
||||
void Plater::msw_rescale()
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
void update_mode();
|
||||
bool is_collapsed();
|
||||
void collapse(bool collapse);
|
||||
void update_searcher();
|
||||
void check_and_update_searcher(bool respect_mode = false);
|
||||
void update_ui_from_settings();
|
||||
|
||||
#ifdef _MSW_DARK_MODE
|
||||
|
@ -78,7 +78,7 @@ static std::string get_key(const std::string& opt_key, Preset::Type type)
|
||||
return std::to_string(int(type)) + ";" + opt_key;
|
||||
}
|
||||
|
||||
void OptionsSearcher::append_options(DynamicPrintConfig* config, Preset::Type type, ConfigOptionMode mode)
|
||||
void OptionsSearcher::append_options(DynamicPrintConfig* config, Preset::Type type)
|
||||
{
|
||||
auto emplace = [this, type](const std::string key, const wxString& label)
|
||||
{
|
||||
@ -299,8 +299,9 @@ OptionsSearcher::~OptionsSearcher()
|
||||
{
|
||||
}
|
||||
|
||||
void OptionsSearcher::init(std::vector<InputInfo> input_values)
|
||||
void OptionsSearcher::check_and_update(PrinterTechnology pt_in, ConfigOptionMode mode_in, std::vector<InputInfo> input_values)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
options.clear();
|
||||
for (auto i : input_values)
|
||||
append_options(i.config, i.type, i.mode);
|
||||
@ -315,14 +316,18 @@ void OptionsSearcher::init(std::vector<InputInfo> input_values)
|
||||
void OptionsSearcher::apply(DynamicPrintConfig* config, Preset::Type type, ConfigOptionMode mode)
|
||||
{
|
||||
if (options.empty())
|
||||
=======
|
||||
if (printer_technology == pt_in && mode == mode_in)
|
||||
>>>>>>> stable
|
||||
return;
|
||||
|
||||
options.erase(std::remove_if(options.begin(), options.end(), [type](Option opt) {
|
||||
return opt.type == type;
|
||||
}), options.end());
|
||||
options.clear();
|
||||
|
||||
append_options(config, type, mode);
|
||||
printer_technology = pt_in;
|
||||
mode = mode_in;
|
||||
|
||||
for (auto i : input_values)
|
||||
append_options(i.config, i.type);
|
||||
sort_options();
|
||||
|
||||
search(search_line, true);
|
||||
|
@ -33,7 +33,6 @@ struct InputInfo
|
||||
{
|
||||
DynamicPrintConfig* config {nullptr};
|
||||
Preset::Type type {Preset::TYPE_INVALID};
|
||||
ConfigOptionMode mode {comSimple};
|
||||
};
|
||||
|
||||
struct GroupAndCategory {
|
||||
@ -83,13 +82,14 @@ class OptionsSearcher
|
||||
{
|
||||
std::string search_line;
|
||||
std::map<std::string, GroupAndCategory> groups_and_categories;
|
||||
PrinterTechnology printer_technology;
|
||||
PrinterTechnology printer_technology {ptAny};
|
||||
ConfigOptionMode mode{ comUndef };
|
||||
|
||||
std::vector<Option> options {};
|
||||
std::vector<Option> preferences_options {};
|
||||
std::vector<FoundOption> found {};
|
||||
|
||||
void append_options(DynamicPrintConfig* config, Preset::Type type, ConfigOptionMode mode);
|
||||
void append_options(DynamicPrintConfig* config, Preset::Type type);
|
||||
|
||||
void sort_options() {
|
||||
std::sort(options.begin(), options.end(), [](const Option& o1, const Option& o2) {
|
||||
@ -111,12 +111,18 @@ public:
|
||||
OptionsSearcher();
|
||||
~OptionsSearcher();
|
||||
|
||||
<<<<<<< HEAD
|
||||
void init(std::vector<InputInfo> input_values);
|
||||
void apply(DynamicPrintConfig *config,
|
||||
Preset::Type type,
|
||||
ConfigOptionMode mode);
|
||||
void append_preferences_option(const GUI::Line& opt_line);
|
||||
void append_preferences_options(const std::vector<GUI::Line>& opt_lines);
|
||||
=======
|
||||
void check_and_update( PrinterTechnology pt_in,
|
||||
ConfigOptionMode mode_in,
|
||||
std::vector<InputInfo> input_values);
|
||||
>>>>>>> stable
|
||||
bool search();
|
||||
bool search(const std::string& search, bool force = false);
|
||||
|
||||
@ -133,8 +139,6 @@ public:
|
||||
const GroupAndCategory& get_group_and_category (const std::string& opt_key) { return groups_and_categories[opt_key]; }
|
||||
std::string& search_string() { return search_line; }
|
||||
|
||||
void set_printer_technology(PrinterTechnology pt) { printer_technology = pt; }
|
||||
|
||||
void sort_options_by_key() {
|
||||
std::sort(options.begin(), options.end(), [](const Option& o1, const Option& o2) {
|
||||
return o1.key < o2.key; });
|
||||
|
@ -1191,11 +1191,6 @@ void Tab::activate_option(const std::string& opt_key, const wxString& category)
|
||||
m_highlighter.init(get_custom_ctrl_with_blinking_ptr(opt_key));
|
||||
}
|
||||
|
||||
void Tab::apply_searcher()
|
||||
{
|
||||
wxGetApp().sidebar().get_searcher().apply(m_config, m_type, m_mode);
|
||||
}
|
||||
|
||||
void Tab::cache_config_diff(const std::vector<std::string>& selected_options)
|
||||
{
|
||||
m_cache_config.apply_only(m_presets->get_edited_preset().config, selected_options);
|
||||
@ -2836,9 +2831,6 @@ void TabPrinter::build_unregular_pages(bool from_initial_build/* = false*/)
|
||||
|
||||
// Reload preset pages with current configuration values
|
||||
reload_config();
|
||||
|
||||
// apply searcher with current configuration
|
||||
apply_searcher();
|
||||
}
|
||||
|
||||
// this gets executed after preset is loaded and before GUI fields are updated
|
||||
|
@ -377,7 +377,6 @@ public:
|
||||
|
||||
void update_wiping_button_visibility();
|
||||
void activate_option(const std::string& opt_key, const wxString& category);
|
||||
void apply_searcher();
|
||||
void cache_config_diff(const std::vector<std::string>& selected_options);
|
||||
void apply_config_from_cache();
|
||||
|
||||
|
@ -1243,6 +1243,8 @@ void UnsavedChangesDialog::update(Preset::Type type, PresetCollection* dependent
|
||||
|
||||
void UnsavedChangesDialog::update_tree(Preset::Type type, PresetCollection* presets_)
|
||||
{
|
||||
// update searcher befofre update of tree
|
||||
wxGetApp().sidebar().check_and_update_searcher();
|
||||
Search::OptionsSearcher& searcher = wxGetApp().sidebar().get_searcher();
|
||||
searcher.sort_options_by_key();
|
||||
|
||||
@ -1298,9 +1300,6 @@ void UnsavedChangesDialog::update_tree(Preset::Type type, PresetCollection* pres
|
||||
get_string_value(opt_key, old_config), get_string_value(opt_key, new_config), category_icon_map.at(option.category));
|
||||
}
|
||||
}
|
||||
|
||||
// Revert sort of searcher back
|
||||
searcher.sort_options_by_label();
|
||||
}
|
||||
|
||||
void UnsavedChangesDialog::on_dpi_changed(const wxRect& suggested_rect)
|
||||
@ -1606,6 +1605,8 @@ void DiffPresetDialog::update_presets(Preset::Type type)
|
||||
|
||||
void DiffPresetDialog::update_tree()
|
||||
{
|
||||
// update searcher befofre update of tree
|
||||
wxGetApp().sidebar().check_and_update_searcher();
|
||||
Search::OptionsSearcher& searcher = wxGetApp().sidebar().get_searcher();
|
||||
searcher.sort_options_by_key();
|
||||
|
||||
@ -1708,9 +1709,6 @@ void DiffPresetDialog::update_tree()
|
||||
Fit();
|
||||
Refresh();
|
||||
}
|
||||
|
||||
// Revert sort of searcher back
|
||||
searcher.sort_options_by_label();
|
||||
}
|
||||
|
||||
void DiffPresetDialog::on_dpi_changed(const wxRect&)
|
||||
|
Loading…
Reference in New Issue
Block a user