Merge branch 'master' of https://github.com/Prusa-Development/PrusaSlicerPrivate into et_sla_switch_view

This commit is contained in:
enricoturri1966 2023-04-04 14:38:17 +02:00
commit 61d45cf3b5
44 changed files with 47855 additions and 48177 deletions

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

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

View File

@ -1,3 +1,5 @@
min_slic3r_version = 2.6.0-alpha5
1.0.1 General rework. Fix start gcodes.
min_slic3r_version = 2.6.0-alpha0 min_slic3r_version = 2.6.0-alpha0
1.0.0 Initial Rigid3D bundle 1.0.0 Initial Rigid3D bundle

View File

@ -5,7 +5,7 @@
name = Rigid3D name = Rigid3D
# Configuration version of this file. Config file will only be installed, if the config_version differs. # Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded. # This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 1.0.0 config_version = 1.0.1
# Where to get the updates from? # Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Rigid3D/ config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Rigid3D/
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1% # changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
@ -64,7 +64,7 @@ bridge_angle = 0
bridge_flow_ratio = 1 bridge_flow_ratio = 1
bridge_speed = 60 bridge_speed = 60
brim_separation = 0 brim_separation = 0
brim_type = no_brim brim_type = outer_only
brim_width = 0 brim_width = 0
clip_multipart_objects = 1 clip_multipart_objects = 1
compatible_printers = compatible_printers =
@ -75,19 +75,19 @@ dont_support_bridges = 1
draft_shield = disabled draft_shield = disabled
elefant_foot_compensation = 0 elefant_foot_compensation = 0
ensure_vertical_shell_thickness = 0 ensure_vertical_shell_thickness = 0
external_perimeter_extrusion_width = 0.45 external_perimeter_extrusion_width = 0
external_perimeter_speed = 50% external_perimeter_speed = 50%
external_perimeters_first = 1 external_perimeters_first = 1
extra_perimeters = 1 extra_perimeters = 1
extruder_clearance_height = 20 extruder_clearance_height = 20
extruder_clearance_radius = 20 extruder_clearance_radius = 20
extrusion_width = 0.45 extrusion_width = 0
fill_angle = 45 fill_angle = 45
fill_density = 10% fill_density = 10%
fill_pattern = line fill_pattern = line
first_layer_acceleration = 0 first_layer_acceleration = 0
first_layer_acceleration_over_raft = 0 first_layer_acceleration_over_raft = 0
first_layer_extrusion_width = 0.42 first_layer_extrusion_width = 0
first_layer_height = 0.2 first_layer_height = 0.2
first_layer_speed = 50% first_layer_speed = 50%
first_layer_speed_over_raft = 30 first_layer_speed_over_raft = 30
@ -105,8 +105,8 @@ infill_anchor = 2.5
infill_anchor_max = 12 infill_anchor_max = 12
infill_every_layers = 1 infill_every_layers = 1
infill_extruder = 1 infill_extruder = 1
infill_extrusion_width = 0.45 infill_extrusion_width = 0
infill_first = 1 infill_first = 0
infill_only_where_needed = 0 infill_only_where_needed = 0
infill_overlap = 25% infill_overlap = 25%
infill_speed = 60 infill_speed = 60
@ -124,11 +124,11 @@ mmu_segmented_region_max_width = 0
notes = notes =
only_retract_when_crossing_perimeters = 0 only_retract_when_crossing_perimeters = 0
ooze_prevention = 0 ooze_prevention = 0
output_filename_format = {input_filename_base}_{layer_height}mm_{initial_filament_type}_{printer_model}_{print_time}.gcode output_filename_format = {input_filename_base}_{layer_height}mm_{initial_filament_type}_{printer_model}.gcode
overhangs = 1 overhangs = 1
perimeter_acceleration = 0 perimeter_acceleration = 0
perimeter_extruder = 1 perimeter_extruder = 1
perimeter_extrusion_width = 0.45 perimeter_extrusion_width = 0
perimeter_speed = 60 perimeter_speed = 60
perimeters = 2 perimeters = 2
post_process = post_process =
@ -139,7 +139,7 @@ raft_first_layer_density = 90%
raft_first_layer_expansion = 3 raft_first_layer_expansion = 3
raft_layers = 0 raft_layers = 0
resolution = 0 resolution = 0
seam_position = rear seam_position = random
single_extruder_multi_material_priming = 1 single_extruder_multi_material_priming = 1
skirt_distance = 6 skirt_distance = 6
skirt_height = 1 skirt_height = 1
@ -147,14 +147,14 @@ skirts = 0
slice_closing_radius = 0.049 slice_closing_radius = 0.049
slicing_mode = regular slicing_mode = regular
small_perimeter_speed = 15 small_perimeter_speed = 15
solid_infill_below_area = 70 solid_infill_below_area = 0
solid_infill_every_layers = 0 solid_infill_every_layers = 0
solid_infill_extruder = 1 solid_infill_extruder = 1
solid_infill_extrusion_width = 0.45 solid_infill_extrusion_width = 0
solid_infill_speed = 100% solid_infill_speed = 100%
spiral_vase = 0 spiral_vase = 0
standby_temperature_delta = -5 standby_temperature_delta = -5
support_material = 0 support_material = 1
support_material_angle = 0 support_material_angle = 0
support_material_auto = 1 support_material_auto = 1
support_material_bottom_contact_distance = 0 support_material_bottom_contact_distance = 0
@ -164,7 +164,7 @@ support_material_closing_radius = 2
support_material_contact_distance = 0.2 support_material_contact_distance = 0.2
support_material_enforce_layers = 0 support_material_enforce_layers = 0
support_material_extruder = 1 support_material_extruder = 1
support_material_extrusion_width = 0.35 support_material_extrusion_width = 0
support_material_interface_contact_loops = 0 support_material_interface_contact_loops = 0
support_material_interface_extruder = 1 support_material_interface_extruder = 1
support_material_interface_layers = 3 support_material_interface_layers = 3
@ -174,7 +174,7 @@ support_material_interface_speed = 100%
support_material_pattern = rectilinear support_material_pattern = rectilinear
support_material_spacing = 2.5 support_material_spacing = 2.5
support_material_speed = 60 support_material_speed = 60
support_material_style = grid support_material_style = organic
support_material_synchronize_layers = 0 support_material_synchronize_layers = 0
support_material_threshold = 0 support_material_threshold = 0
support_material_with_sheath = 1 support_material_with_sheath = 1
@ -182,7 +182,7 @@ support_material_xy_spacing = 50%
thick_bridges = 0 thick_bridges = 0
thin_walls = 1 thin_walls = 1
top_fill_pattern = monotonic top_fill_pattern = monotonic
top_infill_extrusion_width = 0.4 top_infill_extrusion_width = 0
top_solid_infill_speed = 100% top_solid_infill_speed = 100%
top_solid_min_thickness = 0.8 top_solid_min_thickness = 0.8
travel_speed = 80 travel_speed = 80
@ -408,7 +408,7 @@ pause_print_gcode = M0
printer_settings_id = printer_settings_id =
printer_technology = FFF printer_technology = FFF
printer_variant = 0.4 printer_variant = 0.4
remaining_times = 1 remaining_times = 0
retract_before_travel = 2 retract_before_travel = 2
retract_before_wipe = 0% retract_before_wipe = 0%
retract_layer_change = 0 retract_layer_change = 0
@ -438,7 +438,7 @@ bed_shape = 0x0,200x0,200x200,0x200
max_print_height = 190 max_print_height = 190
printer_model = Zero2 printer_model = Zero2
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_RIGID3D\nPRINTER_MODEL_ZERO2\nPRINTER_HAS_HEATEDBED\n printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_RIGID3D\nPRINTER_MODEL_ZERO2\nPRINTER_HAS_HEATEDBED\n
start_gcode = G21\nG92 E0\nG28\nM420 S1\nM107\nG90\nG1 X10.0 Y0.1 Z0.3 F3000.0\nG1 X190.0 Y0.1 Z0.3 F1500.0 E15\nG1 X190 Y0.4 Z0.3 F3000.0\nG1 X10.0 Y0.4 Z0.3 F1500.0 E30\nG1 Z2.0 F1500.0\nG92 E0\n start_gcode = G21\nG92 E0\nM140 S[first_layer_bed_temperature]\nM104 S[first_layer_temperature]\nG28\nM420 S1\nM107\nG90\nM190 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nG1 X10.0 Y0.1 Z0.3 F3000.0\nG1 X190.0 Y0.1 Z0.3 F1500.0 E15\nG1 X190 Y0.4 Z0.3 F3000.0\nG1 X10.0 Y0.4 Z0.3 F1500.0 E30\nG1 Z2.0 F1500.0\nG92 E0\n
end_gcode = G1 X0 Y180\nM107\nG91\nG0 Z20\nT0\nG1 E-1\nM104 T0 S0\nG90\nG92 E0\nM140 S0\nM84\nM300 S2093 P150\nM300 S2637 P150\nM300 S3135 P150\nM300 S4186 P150\nM300 S3135 P150\nM300 S2637 P150\nM300 S2793 P150\nM300 S2349 P150\nM300 S1975 P150\nM300 S2093 P450\n end_gcode = G1 X0 Y180\nM107\nG91\nG0 Z20\nT0\nG1 E-1\nM104 T0 S0\nG90\nG92 E0\nM140 S0\nM84\nM300 S2093 P150\nM300 S2637 P150\nM300 S3135 P150\nM300 S4186 P150\nM300 S3135 P150\nM300 S2637 P150\nM300 S2793 P150\nM300 S2349 P150\nM300 S1975 P150\nM300 S2093 P450\n
[printer:Rigid3D Zero3] [printer:Rigid3D Zero3]
@ -447,7 +447,7 @@ bed_shape = 0x0,200x0,200x200,0x200
max_print_height = 200 max_print_height = 200
printer_model = Zero3 printer_model = Zero3
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_RIGID3D\nPRINTER_MODEL_ZERO3\nPRINTER_HAS_HEATEDBED\n printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_RIGID3D\nPRINTER_MODEL_ZERO3\nPRINTER_HAS_HEATEDBED\n
start_gcode = G21\nG92 E0\nG28\nM420 S1\nM107\nG90\nG1 X10.0 Y0.1 Z0.3 F3000.0\nG1 X190.0 Y0.1 Z0.3 F1500.0 E15\nG1 X190 Y0.4 Z0.3 F3000.0\nG1 X10.0 Y0.4 Z0.3 F1500.0 E30\nG1 Z2.0 F1500.0\nG92 E0\n start_gcode = G21\nG92 E0\nM140 S[first_layer_bed_temperature]\nM104 S[first_layer_temperature]\nG28\nM420 S1\nM107\nG90\nM190 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nG1 X10.0 Y0.1 Z0.3 F3000.0\nG1 X190.0 Y0.1 Z0.3 F1500.0 E15\nG1 X190 Y0.4 Z0.3 F3000.0\nG1 X10.0 Y0.4 Z0.3 F1500.0 E30\nG1 Z2.0 F1500.0\nG92 E0\n
end_gcode = G92 E0\nT0\nG1 F1800 E-2\nG27 P2\nM107\nM104 T0 S0\nM140 S0\nG90\nG92 E0\nM18\n end_gcode = G92 E0\nT0\nG1 F1800 E-2\nG27 P2\nM107\nM104 T0 S0\nM140 S0\nG90\nG92 E0\nM18\n
[printer:Rigid3D Mucit] [printer:Rigid3D Mucit]
@ -456,7 +456,7 @@ bed_shape = 0x0,150x0,150x150,0x150
max_print_height = 150 max_print_height = 150
printer_model = Mucit printer_model = Mucit
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_RIGID3D\nPRINTER_MODEL_MUCIT\n printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_RIGID3D\nPRINTER_MODEL_MUCIT\n
start_gcode = G21\nG92 E0\nG28\nM420 S1\nM107\nG90\nG1 X10.0 Y0.1 Z0.3 F3000.0\nG1 X140.0 Y0.1 Z0.3 F1500.0 E10\nG1 X140 Y0.4 Z0.3 F3000.0\nG1 X10.0 Y0.4 Z0.3 F1500.0 E20\nG1 Z2.0 F1500.0\nG92 E0\n start_gcode = G21\nG92 E0\nM140 S[first_layer_bed_temperature]\nM104 S[first_layer_temperature]\nG28\nM420 S1\nM107\nG90\nM190 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nG1 X10.0 Y0.1 Z0.3 F3000.0\nG1 X140.0 Y0.1 Z0.3 F1500.0 E10\nG1 X140 Y0.4 Z0.3 F3000.0\nG1 X10.0 Y0.4 Z0.3 F1500.0 E20\nG1 Z2.0 F1500.0\nG92 E0\n
end_gcode = G1 X0 Y140\nM107\nG91\nG0 Z20\nT0\nG1 E-2\nM104 T0 S0\nG90\nG92 E0\nM140 S0\nM84\nM300 S2093 P150\nM300 S2637 P150\nM300 S3135 P150\nM300 S4186 P150\nM300 S3135 P150\nM300 S2637 P150\nM300 S2793 P150\nM300 S2349 P150\nM300 S1975 P150\nM300 S2093 P450\n end_gcode = G1 X0 Y140\nM107\nG91\nG0 Z20\nT0\nG1 E-2\nM104 T0 S0\nG90\nG92 E0\nM140 S0\nM84\nM300 S2093 P150\nM300 S2637 P150\nM300 S3135 P150\nM300 S4186 P150\nM300 S3135 P150\nM300 S2637 P150\nM300 S2793 P150\nM300 S2349 P150\nM300 S1975 P150\nM300 S2093 P450\n
[printer:Rigid3D Mucit2] [printer:Rigid3D Mucit2]
@ -465,5 +465,5 @@ bed_shape = 0x0,150x0,150x150,0x150
max_print_height = 150 max_print_height = 150
printer_model = Mucit2 printer_model = Mucit2
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_RIGID3D\nPRINTER_MODEL_MUCIT2\nPRINTER_HAS_HEATEDBED\n printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_RIGID3D\nPRINTER_MODEL_MUCIT2\nPRINTER_HAS_HEATEDBED\n
start_gcode = G21\nG92 E0\nG28\nM420 S1\nM107\nG90\nG1 X10.0 Y0.1 Z0.3 F3000.0\nG1 X140.0 Y0.1 Z0.3 F1500.0 E10\nG1 X140 Y0.4 Z0.3 F3000.0\nG1 X10.0 Y0.4 Z0.3 F1500.0 E20\nG1 Z2.0 F1500.0\nG92 E0\n start_gcode = G21\nG92 E0\nM140 S[first_layer_bed_temperature]\nM104 S[first_layer_temperature]\nG28\nM420 S1\nM107\nG90\nM190 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nG1 X10.0 Y0.1 Z0.3 F3000.0\nG1 X140.0 Y0.1 Z0.3 F1500.0 E10\nG1 X140 Y0.4 Z0.3 F3000.0\nG1 X10.0 Y0.4 Z0.3 F1500.0 E20\nG1 Z2.0 F1500.0\nG92 E0\n
end_gcode = G92 E0\nT0\nG1 F1800 E-2\nG27 P2\nM107\nM104 T0 S0\nM140 S0\nG90\nG92 E0\nM18\n end_gcode = G92 E0\nT0\nG1 F1800 E-2\nG27 P2\nM107\nM104 T0 S0\nM140 S0\nG90\nG92 E0\nM18\n

View File

@ -506,9 +506,9 @@ bool priv::remove_self_intersections(ExPolygons &shape, unsigned max_iteration)
hole.translate(p); hole.translate(p);
holes.push_back(hole); holes.push_back(hole);
} }
// union overlapped holes // Union of overlapped holes is not neccessary
if (holes.size() > 1) // Clipper calculate winding number separately for each input parameter
holes = Slic3r::union_(holes); // if (holes.size() > 1) holes = Slic3r::union_(holes);
shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes); shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes);
// TODO: find where diff ex could create same neighbor // TODO: find where diff ex could create same neighbor
@ -634,7 +634,6 @@ bool priv::heal_dupl_inter(ExPolygons &shape, unsigned max_iteration)
holes.push_back(hole); holes.push_back(hole);
} }
holes = Slic3r::union_(holes);
shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes); shape = Slic3r::diff_ex(shape, holes, ApplySafetyOffset::Yes);
// prepare for next loop // prepare for next loop

View File

@ -975,7 +975,7 @@ namespace Slic3r {
} }
if (res == 0) { if (res == 0) {
add_error("Error while extracting model data from zip archive"); add_error("Error while extracting model data from ZIP archive");
return false; return false;
} }

View File

@ -584,8 +584,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionBools{false}); def->set_default_value(new ConfigOptionBools{false});
// TRN FilamentSettings : "Dynamic fan speeds" // TRN FilamentSettings : "Dynamic fan speeds"
auto fan_speed_setting_description = L( auto fan_speed_setting_description = L("Overhang size is expressed as a percentage of overlap of the extrusion with the previous layer: "
"Overhang size is expressed as a percentage of overlap of the extrusion with the previous layer: "
"100% would be full overlap (no overhang), while 0% represents full overhang (floating extrusion, bridge). " "100% would be full overlap (no overhang), while 0% represents full overhang (floating extrusion, bridge). "
"Fan speeds for overhang sizes in between are calculated via linear interpolation."); "Fan speeds for overhang sizes in between are calculated via linear interpolation.");
@ -2907,7 +2906,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Tip Diameter"); def->label = L("Tip Diameter");
def->category = L("Support material"); def->category = L("Support material");
// TRN PrintSettings: "Organic supports" > "Tip Diameter" // TRN PrintSettings: "Organic supports" > "Tip Diameter"
def->tooltip = L("The diameter of the top of the tip of the branches of organic support."); def->tooltip = L("Branch tip diameter for organic supports.");
def->sidetext = L("mm"); def->sidetext = L("mm");
def->min = 0; def->min = 0;
def->mode = comAdvanced; def->mode = comAdvanced;
@ -4666,7 +4665,7 @@ CLIActionsConfigDef::CLIActionsConfigDef()
#if ENABLE_GL_CORE_PROFILE #if ENABLE_GL_CORE_PROFILE
def = this->add("opengl-version", coString); def = this->add("opengl-version", coString);
def->label = L("OpenGL version"); def->label = L("OpenGL version");
def->tooltip = L("Select the specified OpenGL version"); def->tooltip = L("Select a specific version of OpenGL");
def->cli = "opengl-version"; def->cli = "opengl-version";
def->set_default_value(new ConfigOptionString()); def->set_default_value(new ConfigOptionString());

View File

@ -290,8 +290,7 @@ void SLAPrint::Steps::generate_preview(SLAPrintObject &po, SLAPrintObjectStep st
if (!handled) { // Last resort to voxelization. if (!handled) { // Last resort to voxelization.
po.active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL, po.active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL,
_u8L("Can't perform full mesh booleans! " _u8L("Some parts of the print will be previewed with approximated meshes. "
"Some parts of the print will be previewed with approximated meshes. "
"This does not affect the quality of slices or the physical print in any way.")); "This does not affect the quality of slices or the physical print in any way."));
m = generate_preview_vdb(po, step); m = generate_preview_vdb(po, step);
} }
@ -510,8 +509,7 @@ void SLAPrint::Steps::slice_model(SLAPrintObject &po)
if(slindex_it == po.m_slice_index.end()) if(slindex_it == po.m_slice_index.end())
//TRN To be shown at the status bar on SLA slicing error. //TRN To be shown at the status bar on SLA slicing error.
throw Slic3r::RuntimeError( throw Slic3r::RuntimeError(format("Model named: %s can not be sliced. Please check if the model is sane.", po.model_object()->name));
format(_u8L("Model named: %s can not be sliced. Please check if the model is sane."), po.model_object()->name));
po.m_model_height_levels.clear(); po.m_model_height_levels.clear();
po.m_model_height_levels.reserve(po.m_slice_index.size()); po.m_model_height_levels.reserve(po.m_slice_index.size());

View File

@ -20,7 +20,7 @@ public:
std::string formatted_errorstr() const std::string formatted_errorstr() const
{ {
return _u8L("Error with zip archive") + " " + m_zipname + ": " + return _u8L("Error with ZIP archive") + " " + m_zipname + ": " +
get_errorstr(); get_errorstr();
} }

View File

@ -719,7 +719,7 @@ void BackgroundSlicingProcess::prepare_upload()
m_print->set_status(95, _u8L("Running post-processing scripts")); m_print->set_status(95, _u8L("Running post-processing scripts"));
std::string error_message; std::string error_message;
if (copy_file(m_temp_output_path, source_path.string(), error_message) != SUCCESS) if (copy_file(m_temp_output_path, source_path.string(), error_message) != SUCCESS)
throw Slic3r::RuntimeError(_u8L("Copying of the temporary G-code to the output G-code failed")); throw Slic3r::RuntimeError("Copying of the temporary G-code to the output G-code failed");
m_upload_job.upload_data.upload_path = m_fff_print->print_statistics().finalize_output_path(m_upload_job.upload_data.upload_path.string()); m_upload_job.upload_data.upload_path = m_fff_print->print_statistics().finalize_output_path(m_upload_job.upload_data.upload_path.string());
// Make a copy of the source path, as run_post_process_scripts() is allowed to change it when making a copy of the source file // Make a copy of the source path, as run_post_process_scripts() is allowed to change it when making a copy of the source file
// (not here, but when the final target is a file). // (not here, but when the final target is a file).

View File

@ -1425,8 +1425,7 @@ PageDownloader::PageDownloader(ConfigWizard* parent)
append(box_allow_downloads); append(box_allow_downloads);
// TRN ConfigWizard : Downloader : %1% = "PrusaSlicer" // TRN ConfigWizard : Downloader : %1% = "PrusaSlicer"
append_text(format_wxstr(_L( append_text(format_wxstr(_L("If enabled, %1% registers to start on custom URL on www.printables.com."
"If enabled, %1% registers to start on custom URL on www.printables.com."
" You will be able to use button with %1% logo to open models in this %1%." " You will be able to use button with %1% logo to open models in this %1%."
" The model will be downloaded into folder you choose bellow." " The model will be downloaded into folder you choose bellow."
), SLIC3R_APP_NAME)); ), SLIC3R_APP_NAME));
@ -1761,7 +1760,7 @@ PageBuildVolume::PageBuildVolume(ConfigWizard* parent)
: ConfigWizardPage(parent, _L("Build Volume"), _L("Build Volume"), 1) : ConfigWizardPage(parent, _L("Build Volume"), _L("Build Volume"), 1)
, build_volume(new DiamTextCtrl(this)) , build_volume(new DiamTextCtrl(this))
{ {
append_text(_L("Set vertical size of your printer.")); append_text(_L("Set the printer height."));
wxString value = "200"; wxString value = "200";
build_volume->SetValue(value); build_volume->SetValue(value);

View File

@ -191,7 +191,7 @@ void FileGet::priv::get_perform()
if (file == NULL) { if (file == NULL) {
wxCommandEvent* evt = new wxCommandEvent(EVT_DWNLDR_FILE_ERROR); wxCommandEvent* evt = new wxCommandEvent(EVT_DWNLDR_FILE_ERROR);
// TRN %1% = file path // TRN %1% = file path
evt->SetString(GUI::format_wxstr(_L("Can't create file at %1%."), temp_path_wstring)); evt->SetString(GUI::format_wxstr(_L("Can't create file at %1%"), temp_path_wstring));
evt->SetInt(m_id); evt->SetInt(m_id);
m_evt_handler->QueueEvent(evt); m_evt_handler->QueueEvent(evt);
return; return;

View File

@ -216,7 +216,11 @@ public:
// load bitmap for logo // load bitmap for logo
BitmapCache bmp_cache; BitmapCache bmp_cache;
int logo_size = lround(width * 0.25); int logo_size = lround(width * 0.25);
wxBitmap logo_bmp = *bmp_cache.load_svg(wxGetApp().logo_name(), logo_size, logo_size); wxBitmap* logo_bmp_ptr = bmp_cache.load_svg(wxGetApp().logo_name(), logo_size, logo_size);
if (logo_bmp_ptr == nullptr)
return;
wxBitmap logo_bmp = *logo_bmp_ptr;
wxCoord margin = int(m_scale * 20); wxCoord margin = int(m_scale * 20);
@ -957,16 +961,14 @@ void GUI_App::init_app_config()
if (!error.empty()) { if (!error.empty()) {
// Error while parsing config file. We'll customize the error message and rethrow to be displayed. // Error while parsing config file. We'll customize the error message and rethrow to be displayed.
if (is_editor()) { if (is_editor()) {
throw Slic3r::RuntimeError( throw Slic3r::RuntimeError(format("Error parsing PrusaSlicer config file, it is probably corrupted. "
_u8L("Error parsing PrusaSlicer config file, it is probably corrupted. " "Try to manually delete the file to recover from the error. Your user profiles will not be affected."
"Try to manually delete the file to recover from the error. Your user profiles will not be affected.") + "\n\n%1%\n\n%2%", app_config->config_path(), error));
"\n\n" + app_config->config_path() + "\n\n" + error);
} }
else { else {
throw Slic3r::RuntimeError( throw Slic3r::RuntimeError(format("Error parsing PrusaGCodeViewer config file, it is probably corrupted. "
_u8L("Error parsing PrusaGCodeViewer config file, it is probably corrupted. " "Try to manually delete the file to recover from the error."
"Try to manually delete the file to recover from the error.") + "\n\n%1%\n\n%2%", app_config->config_path(), error));
"\n\n" + app_config->config_path() + "\n\n" + error);
} }
} }
} }
@ -1054,16 +1056,14 @@ std::string GUI_App::check_older_app_config(Semver current_version, bool backup)
if (!error.empty()) { if (!error.empty()) {
// Error while parsing config file. We'll customize the error message and rethrow to be displayed. // Error while parsing config file. We'll customize the error message and rethrow to be displayed.
if (is_editor()) { if (is_editor()) {
throw Slic3r::RuntimeError( throw Slic3r::RuntimeError(format("Error parsing PrusaSlicer config file, it is probably corrupted. "
_u8L("Error parsing PrusaSlicer config file, it is probably corrupted. " "Try to manually delete the file to recover from the error. Your user profiles will not be affected."
"Try to manually delete the file to recover from the error. Your user profiles will not be affected.") + "\n\n%1%\n\n%2%", app_config->config_path(), error));
"\n\n" + app_config->config_path() + "\n\n" + error);
} }
else { else {
throw Slic3r::RuntimeError( throw Slic3r::RuntimeError(format("Error parsing PrusaGCodeViewer config file, it is probably corrupted. "
_u8L("Error parsing PrusaGCodeViewer config file, it is probably corrupted. " "Try to manually delete the file to recover from the error."
"Try to manually delete the file to recover from the error.") + "\n\n%1%\n\n%2%", app_config->config_path(), error));
"\n\n" + app_config->config_path() + "\n\n" + error);
} }
} }
if (!snapshot_id.empty()) if (!snapshot_id.empty())
@ -2316,7 +2316,7 @@ bool GUI_App::load_language(wxString language, bool initial)
m_imgui->set_language(into_u8(language_info->CanonicalName)); m_imgui->set_language(into_u8(language_info->CanonicalName));
//FIXME This is a temporary workaround, the correct solution is to switch to "C" locale during file import / export only. //FIXME This is a temporary workaround, the correct solution is to switch to "C" locale during file import / export only.
//wxSetlocale(LC_NUMERIC, "C"); //wxSetlocale(LC_NUMERIC, "C");
Preset::update_suffix_modified((" (" + _L("modified") + ")").ToUTF8().data()); Preset::update_suffix_modified(format(" (%1%)", _L("modified")));
return true; return true;
} }
@ -3378,8 +3378,8 @@ void GUI_App::on_version_read(wxCommandEvent& evt)
if (m_app_updater->get_triggered_by_user()) if (m_app_updater->get_triggered_by_user())
{ {
std::string text = (*Semver::parse(into_u8(evt.GetString())) == Semver()) std::string text = (*Semver::parse(into_u8(evt.GetString())) == Semver())
? Slic3r::format(_u8L("Check for application update has failed.")) ? _u8L("Check for application update has failed.")
: Slic3r::format(_u8L("No new version is available. Latest release version is %1%."), evt.GetString()); : Slic3r::format(_u8L("You are currently running the latest released version %1%."), evt.GetString());
this->plater_->get_notification_manager()->push_version_notification(NotificationType::NoNewReleaseAvailable this->plater_->get_notification_manager()->push_version_notification(NotificationType::NoNewReleaseAvailable
, NotificationManager::NotificationLevel::RegularNotificationLevel , NotificationManager::NotificationLevel::RegularNotificationLevel
@ -3450,7 +3450,7 @@ void GUI_App::app_version_check(bool from_user)
{ {
if (from_user) { if (from_user) {
if (m_app_updater->get_download_ongoing()) { if (m_app_updater->get_download_ongoing()) {
MessageDialog msgdlg(nullptr, _L("Download of new version is already ongoing. Do you wish to continue?"), _L("Notice"), wxYES_NO); MessageDialog msgdlg(nullptr, _L("Downloading of the new version is in progress. Do you want to continue?"), _L("Notice"), wxYES_NO);
if (msgdlg.ShowModal() != wxID_YES) if (msgdlg.ShowModal() != wxID_YES)
return; return;
} }

View File

@ -420,7 +420,7 @@ MeshErrorsInfo ObjectList::get_mesh_errors_info(const int obj_idx, const int vol
const ModelObject* object = (*m_objects)[obj_idx]; const ModelObject* object = (*m_objects)[obj_idx];
if (vol_idx != -1 && vol_idx >= int(object->volumes.size())) { if (vol_idx != -1 && vol_idx >= int(object->volumes.size())) {
if (sidebar_info) if (sidebar_info)
*sidebar_info = _L("Wrong volume index") + " "; *sidebar_info = _L("Invalid object part index") + " ";
return { {}, {} }; // hide tooltip return { {}, {} }; // hide tooltip
} }
@ -2048,7 +2048,7 @@ bool ObjectList::del_from_cut_object(bool is_cut_connector, bool is_model_part/*
InfoDialog dialog(wxGetApp().plater(), title, InfoDialog dialog(wxGetApp().plater(), title,
_L("This action will break a cut information.\n" _L("This action will break a cut information.\n"
"After that PrusaSlicer can't guarantee model consistency.") + "\n\n" + "After that PrusaSlicer can't guarantee model consistency.") + "\n\n" +
_L("To manipulate with solid parts or negative volumes you have to invalidate cut infornation first." + msg_end ), _L("To manipulate with solid parts or negative volumes you have to invalidate cut information first." + msg_end ),
false, buttons_style | wxCANCEL_DEFAULT | wxICON_WARNING); false, buttons_style | wxCANCEL_DEFAULT | wxICON_WARNING);
dialog.SetButtonLabel(wxID_YES, _L("Invalidate cut info")); dialog.SetButtonLabel(wxID_YES, _L("Invalidate cut info"));

View File

@ -219,7 +219,7 @@ GLGizmoCut3D::GLGizmoCut3D(GLCanvas3D& parent, const std::string& icon_filename,
{"Type" , _u8L("Type")}, {"Type" , _u8L("Type")},
{"Style" , _u8L("Style")}, {"Style" , _u8L("Style")},
{"Shape" , _u8L("Shape")}, {"Shape" , _u8L("Shape")},
{"Depth ratio" , _u8L("Depth ratio")}, {"Depth" , _u8L("Depth")},
{"Size" , _u8L("Size")}, {"Size" , _u8L("Size")},
}; };
@ -1413,7 +1413,7 @@ void GLGizmoCut3D::render_debug_input_window(float x)
ImGui::Separator(); ImGui::Separator();
if (m_imgui->checkbox(_L("Render cut plane as circle"), m_cut_plane_as_circle)) if (m_imgui->checkbox(("Render cut plane as disc"), m_cut_plane_as_circle))
m_plane.reset(); m_plane.reset();
ImGui::PushItemWidth(0.5f * m_label_width); ImGui::PushItemWidth(0.5f * m_label_width);
@ -1765,7 +1765,7 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors)
m_imgui->disabled_end(); m_imgui->disabled_end();
}; };
ImGuiWrapper::text(_L("After cut") + ": "); ImGuiWrapper::text(_L("Cut result") + ": ");
add_vertical_scaled_interval(0.5f); add_vertical_scaled_interval(0.5f);
m_imgui->disabled_begin(has_connectors || m_keep_as_parts); m_imgui->disabled_begin(has_connectors || m_keep_as_parts);
@ -1785,14 +1785,14 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors)
add_vertical_scaled_interval(0.75f); add_vertical_scaled_interval(0.75f);
m_imgui->disabled_begin(has_connectors); m_imgui->disabled_begin(has_connectors);
ImGuiWrapper::text(_L("Cut to") + ":"); ImGuiWrapper::text(_L("Cut into") + ":");
add_horizontal_scaled_interval(1.2f); add_horizontal_scaled_interval(1.2f);
// TRN CutGizmo: RadioButton Cut to ... // TRN CutGizmo: RadioButton Cut into ...
if (m_imgui->radio_button(_L("Objects"), !m_keep_as_parts)) if (m_imgui->radio_button(_L("Objects"), !m_keep_as_parts))
m_keep_as_parts = false; m_keep_as_parts = false;
ImGui::SameLine(); ImGui::SameLine();
// TRN CutGizmo: RadioButton Cut to ... // TRN CutGizmo: RadioButton Cut into ...
if (m_imgui->radio_button(_L("Parts"), m_keep_as_parts)) if (m_imgui->radio_button(_L("Parts"), m_keep_as_parts))
m_keep_as_parts = true; m_keep_as_parts = true;
@ -1917,9 +1917,9 @@ void GLGizmoCut3D::render_input_window_warning() const
m_imgui->text(out); m_imgui->text(out);
} }
if (!m_keep_upper && !m_keep_lower) if (!m_keep_upper && !m_keep_lower)
m_imgui->text(wxString(ImGui::WarningMarkerSmall) + _L("Invalid state. \nNo one part is selected for keep after cut")); m_imgui->text(wxString(ImGui::WarningMarkerSmall) + _L("Select at least one object to keep after cutting."));
if (!has_valid_contour()) if (!has_valid_contour())
m_imgui->text(wxString(ImGui::WarningMarkerSmall) + _L("Warning state. \nCut plane is placed out of object")); m_imgui->text(wxString(ImGui::WarningMarkerSmall) + _L("Cut plane is placed out of object"));
} }
void GLGizmoCut3D::on_render_input_window(float x, float y, float bottom_limit) void GLGizmoCut3D::on_render_input_window(float x, float y, float bottom_limit)

View File

@ -1886,7 +1886,7 @@ void GLGizmoEmboss::draw_font_list()
if (ImGui::Selectable(face.name_truncated.c_str(), is_selected, flags, selectable_size)) { if (ImGui::Selectable(face.name_truncated.c_str(), is_selected, flags, selectable_size)) {
if (!select_facename(wx_face_name)) { if (!select_facename(wx_face_name)) {
del_index = index; del_index = index;
wxMessageBox(GUI::format(_L("Font face \"%1%\" can't be selected."), wx_face_name)); MessageDialog(wxGetApp().plater(), GUI::format_wxstr(_L("Font \"%1%\" can't be selected."), wx_face_name));
} }
} }
// tooltip as full name of font face // tooltip as full name of font face
@ -2218,7 +2218,7 @@ void GLGizmoEmboss::draw_delete_style_button() {
active_index + 1; active_index + 1;
if (next_style_index >= m_style_manager.get_styles().size()) { if (next_style_index >= m_style_manager.get_styles().size()) {
MessageDialog msg(plater, _L("Can't remove the last exising style."), dialog_title, wxICON_ERROR | wxOK); MessageDialog msg(plater, _L("Can't remove the last existing style."), dialog_title, wxICON_ERROR | wxOK);
msg.ShowModal(); msg.ShowModal();
break; break;
} }
@ -2231,7 +2231,7 @@ void GLGizmoEmboss::draw_delete_style_button() {
continue; continue;
} }
wxString message = GUI::format_wxstr(_L("Are you sure,\nthat you want permanently and unrecoverable \nremove \"%1%\" style?"), style_name); wxString message = GUI::format_wxstr(_L("Are you sure you want to permanently remove the \"%1%\" style?"), style_name);
MessageDialog msg(plater, message, dialog_title, wxICON_WARNING | wxYES | wxNO); MessageDialog msg(plater, message, dialog_title, wxICON_WARNING | wxYES | wxNO);
if (msg.ShowModal() == wxID_YES) { if (msg.ShowModal() == wxID_YES) {
// delete style // delete style
@ -2372,10 +2372,9 @@ void GLGizmoEmboss::draw_style_list() {
// Check whether user wants lose actual style modification // Check whether user wants lose actual style modification
if (selected_style_index.has_value() && is_modified) { if (selected_style_index.has_value() && is_modified) {
wxString title = _L("Style modification will be lost.");
const EmbossStyle &style = m_style_manager.get_styles()[*selected_style_index].style; const EmbossStyle &style = m_style_manager.get_styles()[*selected_style_index].style;
wxString message = GUI::format_wxstr(_L("Changing style to '%1%' will discard current style modification.\n\n Would you like to continue anyway?"), style.name); wxString message = GUI::format_wxstr(_L("Changing style to \"%1%\" will discard current style modification.\n\nWould you like to continue anyway?"), style.name);
MessageDialog not_loaded_style_message(nullptr, message, title, wxICON_WARNING | wxYES|wxNO); MessageDialog not_loaded_style_message(nullptr, message, _L("Warning"), wxICON_WARNING | wxYES | wxNO);
if (not_loaded_style_message.ShowModal() != wxID_YES) if (not_loaded_style_message.ShowModal() != wxID_YES)
selected_style_index.reset(); selected_style_index.reset();
} }
@ -2391,7 +2390,7 @@ void GLGizmoEmboss::draw_style_list() {
process(); process();
} else { } else {
wxString title = _L("Not valid style."); wxString title = _L("Not valid style.");
wxString message = GUI::format_wxstr(_L("Style '%1%' can't be used and will be removed from a list."), style.name); wxString message = GUI::format_wxstr(_L("Style \"%1%\" can't be used and will be removed from a list."), style.name);
MessageDialog not_loaded_style_message(nullptr, message, title, wxOK); MessageDialog not_loaded_style_message(nullptr, message, title, wxOK);
not_loaded_style_message.ShowModal(); not_loaded_style_message.ShowModal();
m_style_manager.erase(*selected_style_index); m_style_manager.erase(*selected_style_index);
@ -2790,8 +2789,8 @@ void GLGizmoEmboss::draw_advanced()
{ {
const auto &ff = m_style_manager.get_font_file_with_cache(); const auto &ff = m_style_manager.get_font_file_with_cache();
if (!ff.has_value()) { if (!ff.has_value()) {
ImGui::Text("%s", _u8L("Advanced font options could be changed only for correct font.\n" ImGui::Text("%s", _u8L("Advanced options cannot be changed for the selected font.\n"
"Start with select correct font.").c_str()); "Select another font.").c_str());
return; return;
} }
@ -3038,7 +3037,7 @@ void GLGizmoEmboss::draw_advanced()
if (priv::apply_camera_dir(cam, m_parent) && use_surface) if (priv::apply_camera_dir(cam, m_parent) && use_surface)
process(); process();
} else if (ImGui::IsItemHovered()) { } else if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("%s", _u8L("Use camera direction for text orientation").c_str()); ImGui::SetTooltip("%s", _u8L("Orient the text towards the camera.").c_str());
} }
#ifdef ALLOW_DEBUG_MODE #ifdef ALLOW_DEBUG_MODE
ImGui::Text("family = %s", (font_prop.family.has_value() ? ImGui::Text("family = %s", (font_prop.family.has_value() ?
@ -3121,7 +3120,7 @@ bool GLGizmoEmboss::choose_font_by_wxdialog()
(!use_deserialized_font && !m_style_manager.load_style(emboss_style, wx_font))) { (!use_deserialized_font && !m_style_manager.load_style(emboss_style, wx_font))) {
m_style_manager.erase(font_index); m_style_manager.erase(font_index);
wxString message = GUI::format_wxstr( wxString message = GUI::format_wxstr(
"Font '%1%' can't be used. Please select another.", "Font \"%1%\" can't be used. Please select another.",
emboss_style.name); emboss_style.name);
wxString title = "Selected font is NOT True-type."; wxString title = "Selected font is NOT True-type.";
MessageDialog not_loaded_font_message(nullptr, message, title, wxOK); MessageDialog not_loaded_font_message(nullptr, message, title, wxOK);

View File

@ -60,7 +60,7 @@ static std::string surface_feature_type_as_string(Measure::SurfaceFeatureType ty
switch (type) switch (type)
{ {
default: default:
case Measure::SurfaceFeatureType::Undef: { return _u8L("No feature"); } case Measure::SurfaceFeatureType::Undef: { return ("No feature"); }
case Measure::SurfaceFeatureType::Point: { return _u8L("Vertex"); } case Measure::SurfaceFeatureType::Point: { return _u8L("Vertex"); }
case Measure::SurfaceFeatureType::Edge: { return _u8L("Edge"); } case Measure::SurfaceFeatureType::Edge: { return _u8L("Edge"); }
case Measure::SurfaceFeatureType::Circle: { return _u8L("Circle"); } case Measure::SurfaceFeatureType::Circle: { return _u8L("Circle"); }

View File

@ -104,7 +104,7 @@ GLGizmoSimplify::GLGizmoSimplify(GLCanvas3D &parent)
// translation for GUI size // translation for GUI size
, tr_mesh_name(_u8L("Mesh name")) , tr_mesh_name(_u8L("Mesh name"))
, tr_triangles(_u8L("Triangles")) , tr_triangles(_u8L("Triangles"))
, tr_detail_level(_u8L("Detail level")) , tr_detail_level(_u8L("Level of detail"))
, tr_decimate_ratio(_u8L("Decimate ratio")) , tr_decimate_ratio(_u8L("Decimate ratio"))
{} {}
@ -144,7 +144,7 @@ void GLGizmoSimplify::add_simplify_suggestion_notification(
for (size_t object_id : big_ids) { for (size_t object_id : big_ids) {
std::string t = GUI::format(_L( std::string t = GUI::format(_L(
"Processing model '%1%' with more than 1M triangles " "Processing model \"%1%\" with more than 1M triangles "
"could be slow. It is highly recommended to reduce " "could be slow. It is highly recommended to reduce "
"amount of triangles."), objects[object_id]->name); "amount of triangles."), objects[object_id]->name);
std::string hypertext = _u8L("Simplify model"); std::string hypertext = _u8L("Simplify model");
@ -318,11 +318,8 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi
m_configuration.use_count = !m_configuration.use_count; m_configuration.use_count = !m_configuration.use_count;
start_process = true; start_process = true;
} else if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && is_multipart) } else if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && is_multipart)
// TRN %1% = "Detail level", %2% = "Decimate ratio" ImGui::SetTooltip("%s", _u8L("A multipart object can be simplified using only a Level of detail. "
ImGui::SetTooltip("%s", GUI::format(_L( "If you want to enter a Decimate ratio, do the simplification separately.").c_str());
"Multipart object can be simplified only by %1%. "
"If you want specify %2% process it separately."),
tr_detail_level, tr_decimate_ratio).c_str());
ImGui::SameLine(); ImGui::SameLine();
// show preview result triangle count (percent) // show preview result triangle count (percent)

View File

@ -1692,52 +1692,36 @@ void ImGuiWrapper::init_font(bool compress)
int width, height; int width, height;
io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); // Load as RGBA 32-bits (75% of the memory is wasted, but default font is so small) because it is more likely to be compatible with user's existing shaders. If your ImTextureId represent a higher-level concept than just a GL texture id, consider calling GetTexDataAsAlpha8() instead to save on GPU memory. io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); // Load as RGBA 32-bits (75% of the memory is wasted, but default font is so small) because it is more likely to be compatible with user's existing shaders. If your ImTextureId represent a higher-level concept than just a GL texture id, consider calling GetTexDataAsAlpha8() instead to save on GPU memory.
// Fill rectangles from the SVG-icons auto load_icon_from_svg = [this, &io, pixels, width, &rect_id](const std::pair<const wchar_t, std::string> icon, int icon_sz) {
for (auto icon : font_icons) {
if (const ImFontAtlas::CustomRect* rect = io.Fonts->GetCustomRectByIndex(rect_id)) { if (const ImFontAtlas::CustomRect* rect = io.Fonts->GetCustomRectByIndex(rect_id)) {
assert(rect->Width == icon_sz); assert(rect->Width == icon_sz);
assert(rect->Height == icon_sz); assert(rect->Height == icon_sz);
std::vector<unsigned char> raw_data = load_svg(icon.second, icon_sz, icon_sz); std::vector<unsigned char> raw_data = load_svg(icon.second, icon_sz, icon_sz);
const ImU32* pIn = (ImU32*)raw_data.data(); if (!raw_data.empty()) {
for (int y = 0; y < icon_sz; y++) { const ImU32* pIn = (ImU32*)raw_data.data();
ImU32* pOut = (ImU32*)pixels + (rect->Y + y) * width + (rect->X); for (int y = 0; y < icon_sz; y++) {
for (int x = 0; x < icon_sz; x++) ImU32* pOut = (ImU32*)pixels + (rect->Y + y) * width + (rect->X);
*pOut++ = *pIn++; for (int x = 0; x < icon_sz; x++)
*pOut++ = *pIn++;
}
} }
} }
rect_id++; rect_id++;
};
// Fill rectangles from the SVG-icons
for (auto icon : font_icons) {
load_icon_from_svg(icon, icon_sz);
} }
icon_sz *= 2; // default size of large icon is 32 px icon_sz *= 2; // default size of large icon is 32 px
for (auto icon : font_icons_large) { for (auto icon : font_icons_large) {
if (const ImFontAtlas::CustomRect* rect = io.Fonts->GetCustomRectByIndex(rect_id)) { load_icon_from_svg(icon, icon_sz);
assert(rect->Width == icon_sz);
assert(rect->Height == icon_sz);
std::vector<unsigned char> raw_data = load_svg(icon.second, icon_sz, icon_sz);
const ImU32* pIn = (ImU32*)raw_data.data();
for (int y = 0; y < icon_sz; y++) {
ImU32* pOut = (ImU32*)pixels + (rect->Y + y) * width + (rect->X);
for (int x = 0; x < icon_sz; x++)
*pOut++ = *pIn++;
}
}
rect_id++;
} }
icon_sz *= 2; // default size of extra large icon is 64 px icon_sz *= 2; // default size of extra large icon is 64 px
for (auto icon : font_icons_extra_large) { for (auto icon : font_icons_extra_large) {
if (const ImFontAtlas::CustomRect* rect = io.Fonts->GetCustomRectByIndex(rect_id)) { load_icon_from_svg(icon, icon_sz);
assert(rect->Width == icon_sz);
assert(rect->Height == icon_sz);
std::vector<unsigned char> raw_data = load_svg(icon.second, icon_sz, icon_sz);
const ImU32* pIn = (ImU32*)raw_data.data();
for (int y = 0; y < icon_sz; y++) {
ImU32* pOut = (ImU32*)pixels + (rect->Y + y) * width + (rect->X);
for (int x = 0; x < icon_sz; x++)
*pOut++ = *pIn++;
}
}
rect_id++;
} }
// Upload texture to graphics system // Upload texture to graphics system

View File

@ -244,7 +244,7 @@ void UpdateJob::process(Ctl &ctl)
m_result = priv::try_create_mesh(m_input, was_canceled); m_result = priv::try_create_mesh(m_input, was_canceled);
if (was_canceled()) return; if (was_canceled()) return;
if (m_result.its.empty()) if (m_result.its.empty())
throw priv::JobException(_u8L("Created text volume is empty. Change text or font.").c_str()); throw priv::JobException("Created text volume is empty. Change text or font.");
// center triangle mesh // center triangle mesh
Vec3d shift = m_result.bounding_box().center(); Vec3d shift = m_result.bounding_box().center();

View File

@ -1768,7 +1768,7 @@ void MainFrame::quick_slice(const int qs)
wxGetApp().app_config->update_last_output_dir(get_dir_name(output_file)); wxGetApp().app_config->update_last_output_dir(get_dir_name(output_file));
} }
else if (qs & qsExportPNG) { else if (qs & qsExportPNG) {
wxFileDialog dlg(this, _L("Save zip file as:"), wxFileDialog dlg(this, _L("Save ZIP file as:"),
wxGetApp().app_config->get_last_output_dir(get_dir_name(output_file)), wxGetApp().app_config->get_last_output_dir(get_dir_name(output_file)),
get_base_name(output_file), "*.sl1", wxFD_SAVE | wxFD_OVERWRITE_PROMPT); get_base_name(output_file), "*.sl1", wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (dlg.ShowModal() != wxID_OK) if (dlg.ShowModal() != wxID_OK)

View File

@ -701,11 +701,7 @@ void PhysicalPrinterDialog::on_sys_color_changed()
void PhysicalPrinterDialog::OnOK(wxEvent& event) void PhysicalPrinterDialog::OnOK(wxEvent& event)
{ {
wxString printer_name = m_printer_name->GetValue(); wxString printer_name = m_printer_name->GetValue();
if (printer_name.IsEmpty()) { if (printer_name.IsEmpty() || printer_name == m_default_name) {
warning_catcher(this, _L("The supplied name is empty. It can't be saved."));
return;
}
if (printer_name == m_default_name) {
warning_catcher(this, _L("You have to enter a printer name.")); warning_catcher(this, _L("You have to enter a printer name."));
return; return;
} }

View File

@ -810,7 +810,7 @@ Sidebar::Sidebar(Plater *parent)
const int margin_5 = int(0.5 * wxGetApp().em_unit());// 5; const int margin_5 = int(0.5 * wxGetApp().em_unit());// 5;
auto init_combo = [this, margin_5](PlaterPresetComboBox **combo, wxString label, Preset::Type preset_type, bool filament) { auto init_combo = [this, margin_5](PlaterPresetComboBox **combo, wxString label, Preset::Type preset_type, bool filament) {
auto *text = new wxStaticText(p->presets_panel, wxID_ANY, label + " :"); auto *text = new wxStaticText(p->presets_panel, wxID_ANY, label + ":");
text->SetFont(wxGetApp().small_font()); text->SetFont(wxGetApp().small_font());
*combo = new PlaterPresetComboBox(p->presets_panel, preset_type); *combo = new PlaterPresetComboBox(p->presets_panel, preset_type);
@ -5455,7 +5455,7 @@ LoadProjectsDialog::LoadProjectsDialog(const std::vector<fs::path>& paths)
int id = 0; int id = 0;
// all geometry // all geometry
wxRadioButton* btn = new wxRadioButton(this, wxID_ANY, _L("Import geometry"), wxDefaultPosition, wxDefaultSize, id == 0 ? wxRB_GROUP : 0); wxRadioButton* btn = new wxRadioButton(this, wxID_ANY, _L("Import 3D models"), wxDefaultPosition, wxDefaultSize, id == 0 ? wxRB_GROUP : 0);
btn->SetValue(id == m_action); btn->SetValue(id == m_action);
btn->Bind(wxEVT_RADIOBUTTON, [this, id, contains_projects](wxCommandEvent&) { btn->Bind(wxEVT_RADIOBUTTON, [this, id, contains_projects](wxCommandEvent&) {
m_action = id; m_action = id;
@ -5468,7 +5468,7 @@ LoadProjectsDialog::LoadProjectsDialog(const std::vector<fs::path>& paths)
id++; id++;
// all new window // all new window
if (instances_allowed) { if (instances_allowed) {
btn = new wxRadioButton(this, wxID_ANY, _L("Start new PrusaSlicer instance"), wxDefaultPosition, wxDefaultSize, id == 0 ? wxRB_GROUP : 0); btn = new wxRadioButton(this, wxID_ANY, _L("Start a new instance of PrusaSlicer"), wxDefaultPosition, wxDefaultSize, id == 0 ? wxRB_GROUP : 0);
btn->SetValue(id == m_action); btn->SetValue(id == m_action);
btn->Bind(wxEVT_RADIOBUTTON, [this, id, contains_projects](wxCommandEvent&) { btn->Bind(wxEVT_RADIOBUTTON, [this, id, contains_projects](wxCommandEvent&) {
m_action = id; m_action = id;
@ -5493,7 +5493,7 @@ LoadProjectsDialog::LoadProjectsDialog(const std::vector<fs::path>& paths)
stb_sizer->Add(m_combo_project, 0, wxEXPAND | wxTOP, 5); stb_sizer->Add(m_combo_project, 0, wxEXPAND | wxTOP, 5);
// one config // one config
id++; id++;
btn = new wxRadioButton(this, wxID_ANY, _L("Select one to load config only"), wxDefaultPosition, wxDefaultSize, id == 0 ? wxRB_GROUP : 0); btn = new wxRadioButton(this, wxID_ANY, _L("Select only one file to load the configuration."), wxDefaultPosition, wxDefaultSize, id == 0 ? wxRB_GROUP : 0);
btn->SetValue(id == m_action); btn->SetValue(id == m_action);
btn->Bind(wxEVT_RADIOBUTTON, [this, id, instances_allowed](wxCommandEvent&) { btn->Bind(wxEVT_RADIOBUTTON, [this, id, instances_allowed](wxCommandEvent&) {
m_action = id; m_action = id;
@ -5539,7 +5539,8 @@ bool Plater::preview_zip_archive(const boost::filesystem::path& archive_path)
mz_zip_zero_struct(&archive); mz_zip_zero_struct(&archive);
if (!open_zip_reader(&archive, archive_path.string())) { if (!open_zip_reader(&archive, archive_path.string())) {
std::string err_msg = GUI::format(_u8L("Loading of a zip archive on path %1% has failed."), archive_path.string()); // TRN %1% is archive path
std::string err_msg = GUI::format(_u8L("Loading of a ZIP archive on path %1% has failed."), archive_path.string());
throw Slic3r::FileIOError(err_msg); throw Slic3r::FileIOError(err_msg);
} }
mz_uint num_entries = mz_zip_reader_get_num_files(&archive); mz_uint num_entries = mz_zip_reader_get_num_files(&archive);
@ -5818,7 +5819,7 @@ ProjectDropDialog::ProjectDropDialog(const std::string& filename)
wxArrayString choices; wxArrayString choices;
choices.reserve(4); choices.reserve(4);
choices.Add(_L("Open as project")); choices.Add(_L("Open as project"));
choices.Add(_L("Import geometry only")); choices.Add(_L("Import 3D models only"));
choices.Add(_L("Import config only")); choices.Add(_L("Import config only"));
if (!single_instance_only) if (!single_instance_only)
choices.Add(_L("Start new PrusaSlicer instance")); choices.Add(_L("Start new PrusaSlicer instance"));

View File

@ -776,7 +776,7 @@ void PlaterPresetComboBox::show_edit_menu()
const PhysicalPrinter& pp = m_preset_bundle->physical_printers.get_selected_printer(); const PhysicalPrinter& pp = m_preset_bundle->physical_printers.get_selected_printer();
std::string host = pp.config.opt_string("print_host"); std::string host = pp.config.opt_string("print_host");
if (!host.empty()) { if (!host.empty()) {
append_menu_item(menu, wxID_ANY, _L("Open physical printer URL"), "", append_menu_item(menu, wxID_ANY, _L("Open the physical printer URL"), "",
[this](wxCommandEvent&) { this->open_physical_printer_url(); }, "open_browser", menu, []() { return true; }, wxGetApp().plater()); [this](wxCommandEvent&) { this->open_physical_printer_url(); }, "open_browser", menu, []() { return true; }, wxGetApp().plater());
} }

View File

@ -166,34 +166,32 @@ void SavePresetDialog::Item::update()
const std::string unusable_suffix = PresetCollection::get_suffix_modified();//"(modified)"; const std::string unusable_suffix = PresetCollection::get_suffix_modified();//"(modified)";
for (size_t i = 0; i < std::strlen(unusable_symbols); i++) { for (size_t i = 0; i < std::strlen(unusable_symbols); i++) {
if (m_preset_name.find_first_of(unusable_symbols[i]) != std::string::npos) { if (m_preset_name.find_first_of(unusable_symbols[i]) != std::string::npos) {
info_line = _L("The supplied name is not valid;") + "\n" + info_line = _L("The following characters are not allowed in the name") + ": " + unusable_symbols;
_L("the following characters are not allowed:") + " " + unusable_symbols;
m_valid_type = ValidationType::NoValid; m_valid_type = ValidationType::NoValid;
break; break;
} }
} }
if (m_valid_type == ValidationType::Valid && m_preset_name.find(unusable_suffix) != std::string::npos) { if (m_valid_type == ValidationType::Valid && m_preset_name.find(unusable_suffix) != std::string::npos) {
info_line = _L("The supplied name is not valid;") + "\n" + info_line = _L("The following suffix is not allowed in the name") + ":\n\t" +
_L("the following suffix is not allowed:") + "\n\t" +
from_u8(unusable_suffix); from_u8(unusable_suffix);
m_valid_type = ValidationType::NoValid; m_valid_type = ValidationType::NoValid;
} }
if (m_valid_type == ValidationType::Valid && m_preset_name == "- default -") { if (m_valid_type == ValidationType::Valid && m_preset_name == "- default -") {
info_line = _L("The supplied name is not available."); info_line = _L("This name is reserved, use another.");
m_valid_type = ValidationType::NoValid; m_valid_type = ValidationType::NoValid;
} }
const Preset* existing = get_existing_preset(); const Preset* existing = get_existing_preset();
if (m_valid_type == ValidationType::Valid && existing && (existing->is_default || existing->is_system)) { if (m_valid_type == ValidationType::Valid && existing && (existing->is_default || existing->is_system)) {
info_line = m_use_text_ctrl ? _L("The supplied name is used for a system profile.") : info_line = m_use_text_ctrl ? _L("This name is used for a system profile name, use another.") :
_L("Cannot overwrite a system profile."); _L("Cannot overwrite a system profile.");
m_valid_type = ValidationType::NoValid; m_valid_type = ValidationType::NoValid;
} }
if (m_valid_type == ValidationType::Valid && existing && (existing->is_external)) { if (m_valid_type == ValidationType::Valid && existing && (existing->is_external)) {
info_line = m_use_text_ctrl ? _L("The supplied name is used for a external profile.") : info_line = m_use_text_ctrl ? _L("This name is used for an external profile name, use another.") :
_L("Cannot overwrite an external profile."); _L("Cannot overwrite an external profile.");
m_valid_type = ValidationType::NoValid; m_valid_type = ValidationType::NoValid;
} }

View File

@ -3,6 +3,8 @@
#include "Camera.hpp" #include "Camera.hpp"
#include "GUI_App.hpp" #include "GUI_App.hpp"
#include "Selection.hpp"
#include "Plater.hpp"
namespace Slic3r { namespace Slic3r {
namespace GUI { namespace GUI {
@ -88,10 +90,48 @@ void SceneRaycaster::remove_raycaster(std::shared_ptr<SceneRaycasterItem> item)
SceneRaycaster::HitResult SceneRaycaster::hit(const Vec2d& mouse_pos, const Camera& camera, const ClippingPlane* clipping_plane) const SceneRaycaster::HitResult SceneRaycaster::hit(const Vec2d& mouse_pos, const Camera& camera, const ClippingPlane* clipping_plane) const
{ {
// helper class used to return currently selected volume as hit when overlapping with other volumes
// to allow the user to click and drag on a selected volume
class VolumeKeeper
{
std::optional<unsigned int> m_selected_volume_id;
Vec3f m_closest_hit_pos{ std::numeric_limits<float>::max(), std::numeric_limits<float>::max(), std::numeric_limits<float>::max() };
bool m_selected_volume_already_found{ false };
public:
VolumeKeeper() {
const Selection& selection = wxGetApp().plater()->get_selection();
if (selection.is_single_volume() || selection.is_single_modifier()) {
const GLVolume* volume = selection.get_first_volume();
if (!volume->is_wipe_tower && !volume->is_sla_pad() && !volume->is_sla_support())
m_selected_volume_id = *selection.get_volume_idxs().begin();
}
}
bool is_active() const { return m_selected_volume_id.has_value(); }
const Vec3f& get_closest_hit_pos() const { return m_closest_hit_pos; }
bool check_hit_result(const HitResult& hit) {
assert(is_active());
if (m_selected_volume_already_found && hit.type == SceneRaycaster::EType::Volume && hit.position.isApprox(m_closest_hit_pos))
return false;
if (hit.type == SceneRaycaster::EType::Volume)
m_selected_volume_already_found = *m_selected_volume_id == decode_id(hit.type, hit.raycaster_id);
m_closest_hit_pos = hit.position;
return true;
}
};
VolumeKeeper volume_keeper;
double closest_hit_squared_distance = std::numeric_limits<double>::max(); double closest_hit_squared_distance = std::numeric_limits<double>::max();
auto is_closest = [&closest_hit_squared_distance](const Camera& camera, const Vec3f& hit) { auto is_closest = [&closest_hit_squared_distance, &volume_keeper](const Camera& camera, const Vec3f& hit) {
const double hit_squared_distance = (camera.get_position() - hit.cast<double>()).squaredNorm(); const double hit_squared_distance = (camera.get_position() - hit.cast<double>()).squaredNorm();
const bool ret = hit_squared_distance < closest_hit_squared_distance; bool ret = hit_squared_distance < closest_hit_squared_distance;
if (volume_keeper.is_active())
ret |= hit.isApprox(volume_keeper.get_closest_hit_pos());
if (ret) if (ret)
closest_hit_squared_distance = hit_squared_distance; closest_hit_squared_distance = hit_squared_distance;
return ret; return ret;
@ -103,7 +143,7 @@ SceneRaycaster::HitResult SceneRaycaster::hit(const Vec2d& mouse_pos, const Came
HitResult ret; HitResult ret;
auto test_raycasters = [this, is_closest, clipping_plane](EType type, const Vec2d& mouse_pos, const Camera& camera, HitResult& ret) { auto test_raycasters = [this, is_closest, clipping_plane, &volume_keeper](EType type, const Vec2d& mouse_pos, const Camera& camera, HitResult& ret) {
const ClippingPlane* clip_plane = (clipping_plane != nullptr && type == EType::Volume) ? clipping_plane : nullptr; const ClippingPlane* clip_plane = (clipping_plane != nullptr && type == EType::Volume) ? clipping_plane : nullptr;
const std::vector<std::shared_ptr<SceneRaycasterItem>>* raycasters = get_raycasters(type); const std::vector<std::shared_ptr<SceneRaycasterItem>>* raycasters = get_raycasters(type);
const Vec3f camera_forward = camera.get_dir_forward().cast<float>(); const Vec3f camera_forward = camera.get_dir_forward().cast<float>();
@ -117,9 +157,14 @@ SceneRaycaster::HitResult SceneRaycaster::hit(const Vec2d& mouse_pos, const Came
if (item->get_raycaster()->closest_hit(mouse_pos, trafo, camera, current_hit.position, current_hit.normal, clip_plane)) { if (item->get_raycaster()->closest_hit(mouse_pos, trafo, camera, current_hit.position, current_hit.normal, clip_plane)) {
current_hit.position = (trafo * current_hit.position.cast<double>()).cast<float>(); current_hit.position = (trafo * current_hit.position.cast<double>()).cast<float>();
current_hit.normal = (trafo.matrix().block(0, 0, 3, 3).inverse().transpose() * current_hit.normal.cast<double>()).normalized().cast<float>(); current_hit.normal = (trafo.matrix().block(0, 0, 3, 3).inverse().transpose() * current_hit.normal.cast<double>()).normalized().cast<float>();
if (item->use_back_faces() || current_hit.normal.dot(camera_forward) < 0.0f){ if (item->use_back_faces() || current_hit.normal.dot(camera_forward) < 0.0f) {
if (is_closest(camera, current_hit.position)) { if (is_closest(camera, current_hit.position)) {
ret = current_hit; if (volume_keeper.is_active()) {
if (volume_keeper.check_hit_result(current_hit))
ret = current_hit;
}
else
ret = current_hit;
} }
} }
} }

View File

@ -163,13 +163,15 @@ void Tab::create_preset_tab()
add_scaled_button(panel, &m_btn_hide_incompatible_presets, "flag_green"); add_scaled_button(panel, &m_btn_hide_incompatible_presets, "flag_green");
m_btn_compare_preset->SetToolTip(_L("Compare this preset with some another")); //TRN Settings Tab: tooltip for toolbar button
// TRN Settings Tabs: Tooltip for save button: "Settings" m_btn_compare_preset->SetToolTip(_L("Compare preset with another"));
m_btn_save_preset->SetToolTip(format_wxstr(_L("Save current %s"), m_title)); //TRN Settings Tab: tooltip for toolbar button
// TRN Settings Tabs: Tooltip for rename button: "Settings" m_btn_save_preset ->SetToolTip(_L("Save preset"));
m_btn_rename_preset->SetToolTip(format_wxstr(_L("Rename current %1%"), m_title)); //TRN Settings Tab: tooltip for toolbar button
m_btn_rename_preset->SetToolTip(_L("Rename preset"));
m_btn_rename_preset->Hide(); m_btn_rename_preset->Hide();
m_btn_delete_preset->SetToolTip(_(L("Delete this preset"))); //TRN Settings Tab: tooltip for toolbar button
m_btn_delete_preset->SetToolTip(_(L("Delete preset")));
m_btn_delete_preset->Hide(); m_btn_delete_preset->Hide();
add_scaled_button(panel, &m_question_btn, "question"); add_scaled_button(panel, &m_question_btn, "question");
@ -2411,8 +2413,8 @@ void TabPrinter::build_fff()
if (!m_supports_min_feedrates && m_use_silent_mode) { if (!m_supports_min_feedrates && m_use_silent_mode) {
if (!msg.IsEmpty()) if (!msg.IsEmpty())
msg += "\n\n"; msg += "\n\n";
msg += _L("Stealth mode for machine limits to G-code is not supported with selected G-code flavor.\n" msg += _L("The selected G-code flavor does not support the machine limitation for Stealth mode.\n"
"The Stealth mode was suppressed."); "Stealth mode will not be applied and will be disabled.");
auto silent_mode = static_cast<ConfigOptionBool*>(m_config->option("silent_mode")->clone()); auto silent_mode = static_cast<ConfigOptionBool*>(m_config->option("silent_mode")->clone());
silent_mode->value = false; silent_mode->value = false;

View File

@ -857,10 +857,10 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection* dependent_
m_tree = new DiffViewCtrl(this, wxSize(em * (add_new_value_column ? 80 : 60), em * 30)); m_tree = new DiffViewCtrl(this, wxSize(em * (add_new_value_column ? 80 : 60), em * 30));
m_tree->AppendToggleColumn_(L"\u2714" , DiffModel::colToggle, wxLinux ? 9 : 6); m_tree->AppendToggleColumn_(L"\u2714" , DiffModel::colToggle, wxLinux ? 9 : 6);
m_tree->AppendBmpTextColumn("" , DiffModel::colIconText, 28); m_tree->AppendBmpTextColumn("" , DiffModel::colIconText, 28);
m_tree->AppendBmpTextColumn(_L("Original Value"), DiffModel::colOldValue, 12); m_tree->AppendBmpTextColumn(_L("Original value"), DiffModel::colOldValue, 12);
m_tree->AppendBmpTextColumn(_L("Modified Value"), DiffModel::colModValue, 12); m_tree->AppendBmpTextColumn(_L("Modified value"), DiffModel::colModValue, 12);
if (add_new_value_column) if (add_new_value_column)
m_tree->AppendBmpTextColumn(_L("New Value"), DiffModel::colNewValue, 12); m_tree->AppendBmpTextColumn(_L("New value"), DiffModel::colNewValue, 12);
// Add Buttons // Add Buttons
wxFont btn_font = this->GetFont().Scaled(1.4f); wxFont btn_font = this->GetFont().Scaled(1.4f);

View File

@ -455,6 +455,7 @@ MsgDataLegacy::MsgDataLegacy() :
auto *text2 = new wxStaticText(this, wxID_ANY, _(L("For more information please visit our wiki page:"))); auto *text2 = new wxStaticText(this, wxID_ANY, _(L("For more information please visit our wiki page:")));
static const wxString url("https://github.com/prusa3d/PrusaSlicer/wiki/Slic3r-PE-1.40-configuration-update"); static const wxString url("https://github.com/prusa3d/PrusaSlicer/wiki/Slic3r-PE-1.40-configuration-update");
// The wiki page name is intentionally not localized: // The wiki page name is intentionally not localized:
// TRN %s = PrusaSlicer
auto *link = new wxHyperlinkCtrl(this, wxID_ANY, format_wxstr(_L("%s 1.40 configuration update"), SLIC3R_APP_NAME), CONFIG_UPDATE_WIKI_URL); auto *link = new wxHyperlinkCtrl(this, wxID_ANY, format_wxstr(_L("%s 1.40 configuration update"), SLIC3R_APP_NAME), CONFIG_UPDATE_WIKI_URL);
content_sizer->Add(text2); content_sizer->Add(text2);
content_sizer->Add(link); content_sizer->Add(link);
@ -491,13 +492,8 @@ MsgNoUpdates::~MsgNoUpdates() {}
MsgNoAppUpdates::MsgNoAppUpdates() : MsgNoAppUpdates::MsgNoAppUpdates() :
MsgDialog(nullptr, _(L("App update")), _(L("No updates available")), wxICON_ERROR | wxOK) MsgDialog(nullptr, _(L("App update")), _(L("No updates available")), wxICON_ERROR | wxOK)
{ {
//TRN %1% is PrusaSlicer
auto* text = new wxStaticText(this, wxID_ANY, wxString::Format( auto* text = new wxStaticText(this, wxID_ANY, format_wxstr(_L("Your %1% is up to date."),SLIC3R_APP_NAME));
_(L(
"%s has no version updates available."
)),
SLIC3R_APP_NAME
));
text->Wrap(CONTENT_WIDTH * wxGetApp().em_unit()); text->Wrap(CONTENT_WIDTH * wxGetApp().em_unit());
content_sizer->Add(text); content_sizer->Add(text);
content_sizer->AddSpacer(VERT_SPACING); content_sizer->AddSpacer(VERT_SPACING);

View File

@ -221,7 +221,7 @@ boost::filesystem::path AppUpdater::priv::download_file(const DownloadAppData& d
assert(file != NULL); assert(file != NULL);
if (file == NULL) { if (file == NULL) {
std::string line1 = GUI::format(_u8L("Download from %1% couldn't start:"), data.url); std::string line1 = GUI::format(_u8L("Download from %1% couldn't start:"), data.url);
std::string line2 = GUI::format(_u8L("Can't create file at %1%."), tmp_path.string()); std::string line2 = GUI::format(_u8L("Can't create file at %1%"), tmp_path.string());
std::string message = GUI::format("%1%\n%2%", line1, line2); std::string message = GUI::format("%1%\n%2%", line1, line2);
BOOST_LOG_TRIVIAL(error) << message; BOOST_LOG_TRIVIAL(error) << message;
wxCommandEvent* evt = new wxCommandEvent(EVT_SLIC3R_APP_DOWNLOAD_FAILED); wxCommandEvent* evt = new wxCommandEvent(EVT_SLIC3R_APP_DOWNLOAD_FAILED);
@ -266,7 +266,7 @@ boost::filesystem::path AppUpdater::priv::download_file(const DownloadAppData& d
return false; return false;
} }
if (file == NULL) { if (file == NULL) {
error_message = GUI::format(_u8L("Can't create file at %1%."), tmp_path.string()); error_message = GUI::format(_u8L("Can't create file at %1%"), tmp_path.string());
return false; return false;
} }
try try

View File

@ -234,7 +234,7 @@ void fix_model_by_win10_sdk(const std::string &path_src, const std::string &path
if (status == AsyncStatus::Completed) if (status == AsyncStatus::Completed)
hr = modelAsync->GetResults(model.GetAddressOf()); hr = modelAsync->GetResults(model.GetAddressOf());
else else
throw Slic3r::RuntimeError(L("Failed loading the input model.")); throw Slic3r::RuntimeError("Failed loading the input model.");
Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Collections::IVector<ABI::Windows::Graphics::Printing3D::Printing3DMesh*>> meshes; Microsoft::WRL::ComPtr<ABI::Windows::Foundation::Collections::IVector<ABI::Windows::Graphics::Printing3D::Printing3DMesh*>> meshes;
hr = model->get_Meshes(meshes.GetAddressOf()); hr = model->get_Meshes(meshes.GetAddressOf());
@ -247,7 +247,7 @@ void fix_model_by_win10_sdk(const std::string &path_src, const std::string &path
hr = model->RepairAsync(repairAsync.GetAddressOf()); hr = model->RepairAsync(repairAsync.GetAddressOf());
status = winrt_async_await(repairAsync, throw_on_cancel); status = winrt_async_await(repairAsync, throw_on_cancel);
if (status != AsyncStatus::Completed) if (status != AsyncStatus::Completed)
throw Slic3r::RuntimeError(L("Mesh repair failed.")); throw Slic3r::RuntimeError("Mesh repair failed.");
repairAsync->GetResults(); repairAsync->GetResults();
on_progress(L("Loading repaired model"), 60); on_progress(L("Loading repaired model"), 60);
@ -262,14 +262,14 @@ void fix_model_by_win10_sdk(const std::string &path_src, const std::string &path
hr = printing3d3mfpackage->SaveModelToPackageAsync(model.Get(), saveToPackageAsync.GetAddressOf()); hr = printing3d3mfpackage->SaveModelToPackageAsync(model.Get(), saveToPackageAsync.GetAddressOf());
status = winrt_async_await(saveToPackageAsync, throw_on_cancel); status = winrt_async_await(saveToPackageAsync, throw_on_cancel);
if (status != AsyncStatus::Completed) if (status != AsyncStatus::Completed)
throw Slic3r::RuntimeError(L("Saving mesh into the 3MF container failed.")); throw Slic3r::RuntimeError("Saving mesh into the 3MF container failed.");
hr = saveToPackageAsync->GetResults(); hr = saveToPackageAsync->GetResults();
Microsoft::WRL::ComPtr<ABI::Windows::Foundation::IAsyncOperation<ABI::Windows::Storage::Streams::IRandomAccessStream*>> generatorStreamAsync; Microsoft::WRL::ComPtr<ABI::Windows::Foundation::IAsyncOperation<ABI::Windows::Storage::Streams::IRandomAccessStream*>> generatorStreamAsync;
hr = printing3d3mfpackage->SaveAsync(generatorStreamAsync.GetAddressOf()); hr = printing3d3mfpackage->SaveAsync(generatorStreamAsync.GetAddressOf());
status = winrt_async_await(generatorStreamAsync, throw_on_cancel); status = winrt_async_await(generatorStreamAsync, throw_on_cancel);
if (status != AsyncStatus::Completed) if (status != AsyncStatus::Completed)
throw Slic3r::RuntimeError(L("Saving mesh into the 3MF container failed.")); throw Slic3r::RuntimeError("Saving mesh into the 3MF container failed.");
Microsoft::WRL::ComPtr<ABI::Windows::Storage::Streams::IRandomAccessStream> generatorStream; Microsoft::WRL::ComPtr<ABI::Windows::Storage::Streams::IRandomAccessStream> generatorStream;
hr = generatorStreamAsync->GetResults(generatorStream.GetAddressOf()); hr = generatorStreamAsync->GetResults(generatorStream.GetAddressOf());
@ -300,7 +300,7 @@ void fix_model_by_win10_sdk(const std::string &path_src, const std::string &path
hr = inputStream->ReadAsync(buffer.Get(), 65536 * 2048, ABI::Windows::Storage::Streams::InputStreamOptions_ReadAhead, asyncRead.GetAddressOf()); hr = inputStream->ReadAsync(buffer.Get(), 65536 * 2048, ABI::Windows::Storage::Streams::InputStreamOptions_ReadAhead, asyncRead.GetAddressOf());
status = winrt_async_await(asyncRead, throw_on_cancel); status = winrt_async_await(asyncRead, throw_on_cancel);
if (status != AsyncStatus::Completed) if (status != AsyncStatus::Completed)
throw Slic3r::RuntimeError(L("Saving mesh into the 3MF container failed.")); throw Slic3r::RuntimeError("Saving mesh into the 3MF container failed.");
hr = buffer->get_Length(&length); hr = buffer->get_Length(&length);
if (length == 0) if (length == 0)
break; break;
@ -375,7 +375,7 @@ bool fix_model_by_win10_sdk_gui(ModelObject &model_object, int volume_idx, wxPro
mo->add_instance(); mo->add_instance();
if (!Slic3r::store_3mf(path_src.string().c_str(), &model, nullptr, false, nullptr, false)) { if (!Slic3r::store_3mf(path_src.string().c_str(), &model, nullptr, false, nullptr, false)) {
boost::filesystem::remove(path_src); boost::filesystem::remove(path_src);
throw Slic3r::RuntimeError(L("Export of a temporary 3mf file failed")); throw Slic3r::RuntimeError("Export of a temporary 3mf file failed");
} }
model.clear_objects(); model.clear_objects();
model.clear_materials(); model.clear_materials();
@ -391,15 +391,15 @@ bool fix_model_by_win10_sdk_gui(ModelObject &model_object, int volume_idx, wxPro
bool loaded = Slic3r::load_3mf(path_dst.string().c_str(), config, config_substitutions, &model, false); bool loaded = Slic3r::load_3mf(path_dst.string().c_str(), config, config_substitutions, &model, false);
boost::filesystem::remove(path_dst); boost::filesystem::remove(path_dst);
if (! loaded) if (! loaded)
throw Slic3r::RuntimeError(L("Import of the repaired 3mf file failed")); throw Slic3r::RuntimeError("Import of the repaired 3mf file failed");
if (model.objects.size() == 0) if (model.objects.size() == 0)
throw Slic3r::RuntimeError(L("Repaired 3MF file does not contain any object")); throw Slic3r::RuntimeError("Repaired 3MF file does not contain any object");
if (model.objects.size() > 1) if (model.objects.size() > 1)
throw Slic3r::RuntimeError(L("Repaired 3MF file contains more than one object")); throw Slic3r::RuntimeError("Repaired 3MF file contains more than one object");
if (model.objects.front()->volumes.size() == 0) if (model.objects.front()->volumes.size() == 0)
throw Slic3r::RuntimeError(L("Repaired 3MF file does not contain any volume")); throw Slic3r::RuntimeError("Repaired 3MF file does not contain any volume");
if (model.objects.front()->volumes.size() > 1) if (model.objects.front()->volumes.size() > 1)
throw Slic3r::RuntimeError(L("Repaired 3MF file contains more than one volume")); throw Slic3r::RuntimeError("Repaired 3MF file contains more than one volume");
meshes_repaired.emplace_back(std::move(model.objects.front()->volumes.front()->mesh())); meshes_repaired.emplace_back(std::move(model.objects.front()->volumes.front()->mesh()));
} }
for (size_t i = 0; i < volumes.size(); ++ i) { for (size_t i = 0; i < volumes.size(); ++ i) {

View File

@ -1119,12 +1119,12 @@ void PrusaConnect::set_http_post_header_args(Http& http, PrintHostPostUploadActi
wxString PrusaConnect::get_test_ok_msg() const wxString PrusaConnect::get_test_ok_msg() const
{ {
return _(L("Connection to PrusaConnect works correctly.")); return _(L("Connection to Prusa Connect works correctly."));
} }
wxString PrusaConnect::get_test_failed_msg(wxString& msg) const wxString PrusaConnect::get_test_failed_msg(wxString& msg) const
{ {
return GUI::format_wxstr("%s: %s", _L("Could not connect to PrusaConnect"), msg); return GUI::format_wxstr("%s: %s", _L("Could not connect to Prusa Connect"), msg);
} }
} }