diff --git a/resources/localization/de/PrusaSlicer.mo b/resources/localization/de/PrusaSlicer.mo index c44931e233..862bdfae01 100644 Binary files a/resources/localization/de/PrusaSlicer.mo and b/resources/localization/de/PrusaSlicer.mo differ diff --git a/resources/localization/de/PrusaSlicer_de.po b/resources/localization/de/PrusaSlicer_de.po index 5a6d278c3b..629b9ade2f 100644 --- a/resources/localization/de/PrusaSlicer_de.po +++ b/resources/localization/de/PrusaSlicer_de.po @@ -5091,7 +5091,7 @@ msgstr "Äußere Perimeter" #: src/libslic3r/PrintConfig.cpp:861 msgid "External perimeters first" -msgstr "Aüßere Perimeter zuerst drucken" +msgstr "Äußere Perimeter zuerst drucken" #: src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp:294 msgid "Extra high" diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index 2e7c35c214..9f9ecebadc 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -1,4 +1,5 @@ min_slic3r_version = 2.6.0-beta2 +1.9.0-beta3 Updated start g-code for MK4 (modified purge line and nozzle cleaning). 1.9.0-beta2 Added profiles for Original Prusa MK4 Input Shaper (Alpha). min_slic3r_version = 2.6.0-beta0 1.9.0-beta1 Updated cooling settings for some ASA filaments to increase interlayer adhesion (XL/MK4). @@ -17,6 +18,7 @@ min_slic3r_version = 2.6.0-alpha1 1.6.0-alpha1 Updated FW version notification. Decreased min layer time for PLA. 1.6.0-alpha0 Default top fill set to monotonic lines. Updated infill/perimeter overlap values. Updated output filename format. Enabled dynamic overhang speeds. min_slic3r_version = 2.5.2-rc0 +1.7.6 Updated start g-code for MK4 (modified purge line and nozzle cleaning). 1.7.5 Updated cooling settings for some ASA filaments to increase interlayer adhesion (XL/MK4). Updated LA values (XL/MK4). 1.7.4 Updated start g-code script for MK4/XL (fixed pre-print temperature for PA filaments). 1.7.3 Updated XL and MK4 profiles. Updated PC Blend Carbon Fiber density. @@ -24,6 +26,7 @@ min_slic3r_version = 2.5.2-rc0 1.7.1 Added SLA materials. Updated MK4 and XL profiles. 1.7.0 Added profiles for Original Prusa MK4. min_slic3r_version = 2.5.1-rc0 +1.6.7 Updated Prusament PETG Carbon Fiber profile (XL 0.4 nozzle). 1.6.6 Updated cooling settings for some ASA filaments to increase interlayer adhesion (XL/MK4). 1.6.5 Updated start g-code script for MK4/XL (fixed pre-print temperature for PA filaments). 1.6.4 Fixed compatibility condition for MMU1 filaments. diff --git a/resources/profiles/PrusaResearch.ini b/resources/profiles/PrusaResearch.ini index 9b49f8706e..3150d0032e 100644 --- a/resources/profiles/PrusaResearch.ini +++ b/resources/profiles/PrusaResearch.ini @@ -5,7 +5,7 @@ name = Prusa Research # 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. -config_version = 1.9.0-beta2 +config_version = 1.9.0-beta3 # Where to get the updates from? config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/PrusaResearch/ changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1% @@ -8474,7 +8474,7 @@ filament_colour = #BBBBBB compatible_printers_condition = nozzle_diameter[0]>=0.4 and nozzle_diameter[0]!=0.8 and nozzle_diameter[0]!=0.6 and printer_model!="MK2SMM" and printer_model!="MINI" and printer_notes!~/.*PG.*/ and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material) [filament:Prusament PETG Carbon Fiber @PG] -inherits = Prusament PETG; *PETPG*; *04PLUSPG* +inherits = Prusament PETG Carbon Fiber; *PETPG*; *04PLUSPG* [filament:Prusament PETG Carbon Fiber @PG 0.6] inherits = Prusament PETG Carbon Fiber @PG; *PET06PG* @@ -16127,7 +16127,7 @@ retract_before_travel = 1.5 retract_before_wipe = 80% retract_layer_change = 1 retract_length = 0.8 -start_gcode = M17 ; enable steppers\nM862.3 P "[printer_model]" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM555 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) - ((min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))} H{((first_layer_print_max[1])) - ((max(0, first_layer_print_min[1]) - 4))}\n\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n\nM140 S[first_layer_bed_temperature] ; set bed temp\n{if filament_type[initial_tool]=="PC" or filament_type[initial_tool]=="PA"}\nM104 S{first_layer_temperature[initial_tool]-25} ; set extruder temp for bed leveling\nM109 R{first_layer_temperature[initial_tool]-25} ; wait for temp\n{elsif filament_type[initial_tool]=="FLEX"}\nM104 S210 ; set extruder temp for bed leveling\nM109 R210 ; wait for temp\n{else}\nM104 S170 ; set extruder temp for bed leveling\nM109 R170 ; wait for temp\n{endif}\n\nM84 E ; turn off E motor\n\nG28 ; home all without mesh bed level\n\n; probe to clean the nozzle\nG1 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)+32} Y{((first_layer_print_min[1]) - 4)} Z{5} F4800\n\nM302 S160 ; lower cold extrusion limit to 160C\n\n{if filament_type[initial_tool]=="FLEX"}\nG1 E-4 F2400 ; retraction\n{else}\nG1 E-2 F2400 ; retraction\n{endif}\n\nM84 E ; turn off E motor\n\nG29 P9 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{32} H{4}\n\n{if first_layer_bed_temperature[initial_tool]<=60}M106 S100{endif}\n\nG0 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} Z{40} F10000\n\nM190 S[first_layer_bed_temperature] ; wait for bed temp\n\nM107\n\n;\n; MBL\n;\nM84 E ; turn off E motor\nG29 ; mesh bed leveling\nM104 S[first_layer_temperature] ; set extruder temp\nG0 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4) + 4 - 4.5} Z{30} F4800\n\nM109 S[first_layer_temperature] ; wait for extruder temp\nG1 Z0.2 F720\nG92 E0\n\nM569 S0 E ; set spreadcycle mode for extruder\n\n;\n; Extrude purge line\n;\n{if filament_type[initial_tool]=="FLEX"}\nG1 E4 F2400 ; deretraction\n{else}\nG1 E2 F2400 ; deretraction\n{endif}\n\n; move right\nG1 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) + 32} E{32 * 0.15} F1000\n; move down\nG1 Y{(max(0, first_layer_print_min[1]) - 4) + 4 - 4.5 - 1.5} E{1.5 * 0.15} F1000\n; move left\nG1 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} E{32 * 0.30} F800\n\nG92 E0\nM221 S100 ; set flow to 100% +start_gcode = M17 ; enable steppers\nM862.3 P "[printer_model]" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM555 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) - ((min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))} H{((first_layer_print_max[1])) - ((max(0, first_layer_print_min[1]) - 4))}\n\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n\nM140 S[first_layer_bed_temperature] ; set bed temp\n{if filament_type[initial_tool]=="PC" or filament_type[initial_tool]=="PA"}\nM104 S{first_layer_temperature[initial_tool]-25} ; set extruder temp for bed leveling\nM109 R{first_layer_temperature[initial_tool]-25} ; wait for temp\n{elsif filament_type[initial_tool]=="FLEX"}\nM104 S210 ; set extruder temp for bed leveling\nM109 R210 ; wait for temp\n{else}\nM104 S170 ; set extruder temp for bed leveling\nM109 R170 ; wait for temp\n{endif}\n\nM84 E ; turn off E motor\n\nG28 ; home all without mesh bed level\n\nG1 X{10 + 32} Y-4 Z5 F4800\n\nM302 S160 ; lower cold extrusion limit to 160C\n\n{if filament_type[initial_tool]=="FLEX"}\nG1 E-4 F2400 ; retraction\n{else}\nG1 E-2 F2400 ; retraction\n{endif}\n\nM84 E ; turn off E motor\n\nG29 P9 X10 Y-4 W32 H4\n\n{if first_layer_bed_temperature[initial_tool]<=60}M106 S100{endif}\n\nG0 Z40 F10000\n\nM190 S[first_layer_bed_temperature] ; wait for bed temp\n\nM107\n\n;\n; MBL\n;\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X0 Y0 W50 H20 C ; probe near purge place\nG29 P3.2 ; interpolate mbl probes\nG29 P3.13 ; extrapolate mbl outside probe area\nG29 A ; activate mbl\n\n; prepare for purge\nM104 S{first_layer_temperature[0]}\nG0 X0 Y-4 Z15 F4800 ; move away and ready for the purge\nM109 S{first_layer_temperature[0]}\n\nG92 E0\nM569 S0 E ; set spreadcycle mode for extruder\n\n;\n; Extrude purge line\n;\nG92 E0 ; reset extruder position\nG1 E{(filament_type[0] == "FLEX" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E7 X15 Z0.2 F500 ; purge\nG0 X25 E4 F500 ; purge\nG0 X35 E4 F650 ; purge\nG0 X45 E4 F800 ; purge\nG0 X{45 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{45 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\n\nG92 E0\nM221 S100 ; set flow to 100% default_print_profile = 0.20mm QUALITY @MK4 0.4 default_filament_profile = "Prusament PLA @PG" thumbnails = 16x16,313x173,440x240 @@ -16222,7 +16222,7 @@ retract_length = 0.7 wipe = 0 retract_speed = 35 deretract_speed = 0 -start_gcode = M17 ; enable steppers\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM862.3 P "MK4" ; printer model check\nM862.5 P2 ; g-code level check\nM862.6 P"Input shaper" ; firmware feature check\n\nM555 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) - ((min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))} H{((first_layer_print_max[1])) - ((max(0, first_layer_print_min[1]) - 4))}\n\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n\nM140 S[first_layer_bed_temperature] ; set bed temp\n{if filament_type[initial_tool]=="PC" or filament_type[initial_tool]=="PA"}\nM104 S{first_layer_temperature[initial_tool]-25} ; set extruder temp for bed leveling\nM109 R{first_layer_temperature[initial_tool]-25} ; wait for temp\n{elsif filament_type[initial_tool]=="FLEX"}\nM104 S210 ; set extruder temp for bed leveling\nM109 R210 ; wait for temp\n{else}\nM104 S170 ; set extruder temp for bed leveling\nM109 R170 ; wait for temp\n{endif}\n\nM84 E ; turn off E motor\n\nG28 ; home all without mesh bed level\n\n; probe to clean the nozzle\nG1 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)+32} Y{((first_layer_print_min[1]) - 4)} Z{5} F4800\n\nM302 S160 ; lower cold extrusion limit to 160C\n\n{if filament_type[initial_tool]=="FLEX"}\nG1 E-4 F2400 ; retraction\n{else}\nG1 E-2 F2400 ; retraction\n{endif}\n\nM84 E ; turn off E motor\n\nG29 P9 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{32} H{4}\n\n{if first_layer_bed_temperature[initial_tool]<=60}M106 S100{endif}\n\nG0 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} Z{40} F10000\n\nM190 S[first_layer_bed_temperature] ; wait for bed temp\n\nM107\n\n;\n; MBL\n;\nM84 E ; turn off E motor\nG29 ; mesh bed leveling\nM104 S[first_layer_temperature] ; set extruder temp\nG0 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4) + 4 - 4.5} Z{30} F4800\n\nM109 S[first_layer_temperature] ; wait for extruder temp\nG1 Z0.2 F720\nG92 E0\n\nM569 S0 E ; set spreadcycle mode for extruder\n\n;\n; Extrude purge line\n;\n{if filament_type[initial_tool]=="FLEX"}\nG1 E4 F2400 ; deretraction\n{else}\nG1 E2 F2400 ; deretraction\n{endif}\n\n; move right\nG1 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) + 32} E{32 * 0.15} F1000\n; move down\nG1 Y{(max(0, first_layer_print_min[1]) - 4) + 4 - 4.5 - 1.5} E{1.5 * 0.15} F1000\n; move left\nG1 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} E{32 * 0.30} F800\n\nG92 E0\nM221 S100 ; set flow to 100%\n\nM593 X T2 F50.7\nM593 Y T2 F40.6 +start_gcode = M17 ; enable steppers\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM862.3 P "MK4" ; printer model check\nM862.5 P2 ; g-code level check\nM862.6 P"Input shaper" ; firmware feature check\n\nM555 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) - ((min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))} H{((first_layer_print_max[1])) - ((max(0, first_layer_print_min[1]) - 4))}\n\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n\nM140 S[first_layer_bed_temperature] ; set bed temp\n{if filament_type[initial_tool]=="PC" or filament_type[initial_tool]=="PA"}\nM104 S{first_layer_temperature[initial_tool]-25} ; set extruder temp for bed leveling\nM109 R{first_layer_temperature[initial_tool]-25} ; wait for temp\n{elsif filament_type[initial_tool]=="FLEX"}\nM104 S210 ; set extruder temp for bed leveling\nM109 R210 ; wait for temp\n{else}\nM104 S170 ; set extruder temp for bed leveling\nM109 R170 ; wait for temp\n{endif}\n\nM84 E ; turn off E motor\n\nG28 ; home all without mesh bed level\n\nG1 X{10 + 32} Y-4 Z5 F4800\n\nM302 S160 ; lower cold extrusion limit to 160C\n\n{if filament_type[initial_tool]=="FLEX"}\nG1 E-4 F2400 ; retraction\n{else}\nG1 E-2 F2400 ; retraction\n{endif}\n\nM84 E ; turn off E motor\n\nG29 P9 X10 Y-4 W32 H4\n\n{if first_layer_bed_temperature[initial_tool]<=60}M106 S100{endif}\n\nG0 Z40 F10000\n\nM190 S[first_layer_bed_temperature] ; wait for bed temp\n\nM107\n\n;\n; MBL\n;\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X0 Y0 W50 H20 C ; probe near purge place\nG29 P3.2 ; interpolate mbl probes\nG29 P3.13 ; extrapolate mbl outside probe area\nG29 A ; activate mbl\n\n; prepare for purge\nM104 S{first_layer_temperature[0]}\nG0 X0 Y-4 Z15 F4800 ; move away and ready for the purge\nM109 S{first_layer_temperature[0]}\n\nG92 E0\nM569 S0 E ; set spreadcycle mode for extruder\n\n;\n; Extrude purge line\n;\nG92 E0 ; reset extruder position\nG1 E{(filament_type[0] == "FLEX" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E7 X15 Z0.2 F500 ; purge\nG0 X25 E4 F500 ; purge\nG0 X35 E4 F650 ; purge\nG0 X45 E4 F800 ; purge\nG0 X{45 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{45 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\n\nG92 E0\nM221 S100 ; set flow to 100%\n\nM593 X T2 F50.7\nM593 Y T2 F40.6 end_gcode = {if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X241 Y170 F3600 ; park\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+23, max_print_height)} F300 ; Move print head up{endif}\nG4 ; wait\nM572 S0 ; reset PA\nM593 X T2 F0 ; disable IS\nM593 Y T2 F0 ; disable IS\nM84 X Y E ; disable motors\n; max_layer_z = [max_layer_z] before_layer_gcode = ;BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]\nM593 Y T2 F{interpolate_table(extruded_weight_total, (0,40), (300,30), (800,20), (10000,20)) }\nM201 X{interpolate_table(extruded_weight_total, (0,4000), (1400,2500), (10000,2500))} Y{interpolate_table(extruded_weight_total, (0,4000), (1400,2500), (10000,2500))}\nM74 W[extruded_weight_total] default_print_profile = 0.20mm Input Shaper @MK4IS 0.4 diff --git a/resources/profiles/Trimaker.idx b/resources/profiles/Trimaker.idx new file mode 100644 index 0000000000..6bd4045483 --- /dev/null +++ b/resources/profiles/Trimaker.idx @@ -0,0 +1,2 @@ +min_slic3r_version = 2.6.0-beta2 +1.0.0 Initial version diff --git a/resources/profiles/Trimaker.ini b/resources/profiles/Trimaker.ini new file mode 100644 index 0000000000..742b825277 --- /dev/null +++ b/resources/profiles/Trimaker.ini @@ -0,0 +1,376 @@ +# Print profiles for the Trimaker printers. + +[vendor] +# Vendor name will be shown by the Config Wizard. +name = Trimaker +# 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. +config_version = 1.0.0 +# Where to get the updates from? +config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Trimaker/ +# changelog_url = + +# The printer models will be shown by the Configuration Wizard in this order, +# also the first model installed & the first nozzle installed will be activated after install. +# Printer model name will be shown by the installation wizard. + +[printer_model:Trimaker Nebula Cloud] +name = Trimaker Nebula Cloud +family = Nebula +variants = 0.4 +technology = FFF +bed_model = NebulaCloud_bed.stl +bed_texture = NebulaCloud.svg +thumbnail = NPC_thumbnail.png +default_materials = Generic PLA @Trimaker Nebula Cloud + +[printer_model:Trimaker Cosmos II] +name = Trimaker Cosmos II +family = Cosmos +variants = 0.4 +technology = FFF +bed_model = CosmosII_bed.stl +bed_texture = NebulaCosmosII.svg +thumbnail = Cosmos_II_thumbnail.png +default_materials = Generic PLA @Trimaker Nebula Cloud + +[printer_model:Trimaker Nebula ] +name = Trimaker Nebula +family = Nebula +variants = 0.4 +technology = FFF +bed_model = NebulaCloud_bed.stl +bed_texture = NebulaCloud.svg +thumbnail = Nebula_thumbnail.png +default_materials = Generic PLA @Trimaker Nebula Cloud + +# All presets starting with asterisk, for example *common*, are intermediate and they will +# not make it into the user interface. + +# Common print preset +[print:*common*] +avoid_crossing_perimeters = 0 +avoid_crossing_perimeters_max_detour = 0 +bridge_angle = 0 +bridge_flow_ratio = 0.95 +bridge_speed = 25 +brim_width = 0 +clip_multipart_objects = 1 +compatible_printers = +complete_objects = 0 +default_acceleration = 1000 +dont_support_bridges = 1 +elefant_foot_compensation = 0 +ensure_vertical_shell_thickness = 1 +external_fill_pattern = rectilinear +external_perimeters_first = 0 +external_perimeter_extrusion_width = 0.45 +extra_perimeters = 0 +extruder_clearance_height = 25 +extruder_clearance_radius = 45 +fill_angle = 45 +fill_density = 15% +fill_pattern = gyroid +first_layer_extrusion_width = 0.42 +first_layer_speed = 20 +first_layer_acceleration = 1000 +first_layer_acceleration_over_raft = 0 +fuzzy_skin = none +fuzzy_skin_point_dist = 0.8 +fuzzy_skin_thickness = 0.3 +gap_fill_enabled = 1 +gap_fill_speed = 30 +gcode_comments = 0 +gcode_label_objects = 1 +infill_anchor = 2.5 +infill_anchor_max = 12 +infill_every_layers = 1 +infill_extruder = 1 +infill_extrusion_width = 0.45 +infill_first = 0 +infill_only_where_needed = 0 +infill_overlap = 25% +interface_shells = 0 +max_print_speed = 150 +max_volumetric_extrusion_rate_slope_negative = 0 +max_volumetric_extrusion_rate_slope_positive = 0 +max_volumetric_speed = 0 +min_skirt_length = 4 +notes = +overhangs = 1 +only_retract_when_crossing_perimeters = 0 +ooze_prevention = 0 +output_filename_format = {input_filename_base}_{layer_height}mm_{filament_type[0]}_{print_time}.gcode +perimeters = 3 +perimeter_extruder = 1 +perimeter_extrusion_width = 0.45 +perimeter_generator = arachne +post_process = +print_settings_id = +raft_layers = 0 +resolution = 0 +top_fill_pattern = monotonic +bottom_fill_pattern = monotonic +seam_position = aligned +single_extruder_multi_material_priming = 1 +skirts = 1 +skirt_distance = 2 +skirt_height = 2 +small_perimeter_speed = 25 +solid_infill_below_area = 0 +solid_infill_every_layers = 0 +solid_infill_extruder = 1 +spiral_vase = 0 +standby_temperature_delta = -5 +auto_generated_supports = 0 +support_material = 1 +support_material_auto = 1 +support_material_style = snug +support_material_extruder = 0 +support_material_extrusion_width = 0 +support_material_interface_extruder = 0 +support_material_angle = 0 +support_material_buildplate_only = 0 +support_material_enforce_layers = 0 +support_material_contact_distance = 0.22 +support_material_interface_contact_loops = 0 +support_material_interface_layers = 2 +support_material_interface_pattern = rectilinear +support_material_interface_spacing = 0.3 +support_material_interface_speed = 80% +support_material_pattern = rectilinear +support_material_spacing = 2 +support_material_speed = 50 +support_material_synchronize_layers = 0 +support_material_threshold = 50 +support_material_with_sheath = 1 +support_material_xy_spacing = 0.5 +support_material_bottom_contact_distance = 0 +raft_first_layer_expansion = 0 +support_material_bottom_interface_layers = -1 +raft_contact_distance = 0.2 +thin_walls = 0 +top_infill_extrusion_width = 0.45 +travel_speed = 100 +wipe_tower = 0 +wipe_tower_bridging = 10 +wipe_tower_rotation_angle = 0 +wipe_tower_width = 60 +wipe_tower_x = 170 +wipe_tower_y = 140 +xy_size_compensation = 0 +infill_acceleration = 1000 +external_perimeter_speed = 30 +perimeter_speed = 45 +solid_infill_speed = 40 +top_solid_infill_speed = 30 +infill_speed = 50 + +#///////////////////////////////////////////////////////# +#---------------# LAYER HEIGHT SETTINGS #---------------# +#///////////////////////////////////////////////////////# + +[print:*0.10mm*] +inherits = *common* +layer_height = 0.1 +first_layer_height = 0.15 +bottom_solid_layers = 4 +top_solid_layers = 9 +perimeters = 5 +bridge_flow_ratio = 0.6 +infill_acceleration = 1500 +max_print_speed = 200 +bridge_speed = 30 +support_material_contact_distance = 0.10 +support_material_interface_layers = 2 +support_material_threshold = 55 + +[print:*0.20mm*] +inherits = *common* +layer_height = 0.2 +first_layer_height = 0.3 +bottom_solid_layers = 4 +top_solid_layers = 4 +bridge_flow_ratio = 0.8 +support_material_contact_distance = 0.20 + +[print:*0.30mm*] +inherits = *common* +layer_height = 0.3 +first_layer_height = 0.35 +bottom_solid_layers = 3 +top_solid_layers = 4 +bridge_flow_ratio = 0.9 +support_material_contact_distance = 0.25 +infill_extrusion_width = 0.61 + +#////////////////////////////////////////////////# +#---------------# PRINT SETTINGS #---------------# +#////////////////////////////////////////////////# + +#-----------# 0,4 NOZZLE #-----------# + +[print:0.1 Layer - 0,4 Nozzle] +inherits = *0.10mm* +# alias = 0.10mm DETAIL 0,4 +compatible_printers_condition = nozzle_diameter[0]==0.4 + +[print:0.2 Layer - 0,4 Nozzle] +inherits = *0.20mm* +# alias = 0.20mm NORMAL 0,4 +compatible_printers_condition = nozzle_diameter[0]==0.4 + +[print:0.3 Layer - 0,4 Nozzle] +inherits = *0.30mm* +# alias = 0.30mm DRAFT 0,4 +compatible_printers_condition = nozzle_diameter[0]==0.4 + +#///////////////////////////////////////////////////# +#---------------# FILAMENT SETTINGS #---------------# +#///////////////////////////////////////////////////# + +[filament:*common*] +cooling = 0 +compatible_printers = +extrusion_multiplier = 1 +filament_cost = 0 +filament_density = 0 +filament_diameter = 1.75 +filament_notes = "" +filament_settings_id = "" +filament_soluble = 0 +min_print_speed = 15 +slowdown_below_layer_time = 20 + +[filament:*PLA*] +inherits = *common* +bed_temperature = 60 +fan_below_layer_time = 100 +filament_max_volumetric_speed = 15 +filament_type = PLA +filament_density = 1.24 +filament_cost = 20 +first_layer_bed_temperature = 60 +first_layer_temperature = 200 +fan_always_on = 1 +cooling = 1 +max_fan_speed = 100 +min_fan_speed = 100 +bridge_fan_speed = 100 +disable_fan_first_layers = 1 +temperature = 200 + +[filament:Generic PLA @Trimaker Nebula Cloud] +inherits = *PLA* +filament_vendor = Generic + +#//////////////////////////////////////////////# +#---------------# Nozzle sizes #---------------# +#//////////////////////////////////////////////# + +[printer:*0.40nozzle*] +nozzle_diameter = 0.40 +max_layer_height = 0.35 +min_layer_height = 0.1 +retract_lift_above = 0.2 +printer_variant = 0.4 + +#//////////////////////////////////////////////////# +#---------------# PRINTER PROFILES #---------------# +#//////////////////////////////////////////////////# + +[printer:*common*] +printer_technology = FFF +before_layer_gcode = ;BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]\n\n +between_objects_gcode = +deretract_speed = 0 +extruder_colour = #FFFF00 +extruder_offset = 0x0 +gcode_flavor = marlin2 +silent_mode = 0 +remaining_times = 0 +machine_max_acceleration_e = 5000,5000 +machine_max_acceleration_extruding = 1250,12500 +machine_max_acceleration_retracting = 1250,1250 +machine_max_acceleration_x = 1000,960 +machine_max_acceleration_y = 1000,960 +machine_max_acceleration_z = 200,200 +machine_max_feedrate_e = 120,120 +machine_max_feedrate_x = 200,100 +machine_max_feedrate_y = 200,100 +machine_max_feedrate_z = 12,12 +machine_max_jerk_e = 4.5,4.5 +machine_max_jerk_x = 8,8 +machine_max_jerk_y = 8,8 +machine_max_jerk_z = 0.4,0.4 +machine_min_extruding_rate = 0 +machine_min_travel_rate = 0 +layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] +max_layer_height = 0.5 +min_layer_height = 0.07 +octoprint_apikey = +octoprint_host = +printer_notes = +printer_settings_id = +retract_before_travel = 1 +retract_before_wipe = 0% +retract_layer_change = 1 +retract_length = 1 +retract_length_toolchange = 1 +retract_lift = 0 +retract_lift_above = 0 +retract_lift_below = 0 +retract_restart_extra = 0 +retract_restart_extra_toolchange = 0 +retract_speed = 35 +serial_port = +serial_speed = 250000 +single_extruder_multi_material = 0 +start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 ; home all\nG92 E0.0\nG29 ; bed leveling\nM500\nG1 Z0.15 F2400\nG1 F2000 X0.5 Y0.5 Z0.300\nG1 F900 X0.5 Y51.5 E2.56436 ; intro line\nG92 E0.0 +end_gcode =;Trimaker Nebula End Code\n M107; Apagamos fan\n G90\n G92 E0\n G1 X0 Y200\n G91\n G1 Z5\n G92 E0\n M140 S0; Enfriamos\n M104 S0; Enfriamos\n M84\n G90\n M117 Impresion finalizada\n M300 S440 P700\n +toolchange_gcode = +use_firmware_retraction = 0 +use_relative_e_distances = 1 +use_volumetric_e = 0 +variable_layer_height = 1 +z_offset = 0 +cooling_tube_length = 5 +cooling_tube_retraction = 91.5 + +[printer:*Trimaker Nebula Cloud*] +inherits = *common* +bed_shape = 0x0,230x0,230x230,0x230 +max_print_height = 260 +printer_model = Trimaker Nebula Cloud + +[printer:*Trimaker Nebula*] +inherits = *common* +bed_shape = 0x0,230x0,230x230,0x230 +max_print_height = 260 +start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 ; home all\nG92 E0.0\nG1 Z0.15 F2400\nG1 F200 X0.5 Y0.5 Z0.300\n G1 F900 X0.5 Y51.5 E2.56436 ; intro line\nG92 E0.0 +printer_model = Trimaker Nebula + +[printer:*Trimaker Cosmos II*] +inherits = *common* +bed_shape = 0x0,200x0,200x200,0x200 +max_print_height = 200 +printer_model = Trimaker Cosmos II + + + +#//////////////////////////////////////////////////# +#----------------# PRINTER MODELS #----------------# +#//////////////////////////////////////////////////# + + +[printer:Trimaker Nebula Cloud 0.4 nozzle] +inherits = *Trimaker Nebula Cloud*; *0.40nozzle* +default_print_profile = 0.2 Layer - 0,4 Nozzle + +[printer:Trimaker Nebula 0.4 nozzle] +inherits = *Trimaker Nebula*; *0.40nozzle* +default_print_profile = 0.2 Layer - 0,4 Nozzle + +[printer:Trimaker Cosmos II 0.4 nozzle] +inherits = *Trimaker Cosmos II*; *0.40nozzle* +default_print_profile = 0.2 Layer - 0,4 Nozzle \ No newline at end of file diff --git a/resources/profiles/Trimaker/CosmosII_bed.stl b/resources/profiles/Trimaker/CosmosII_bed.stl new file mode 100644 index 0000000000..ab7b036bc1 Binary files /dev/null and b/resources/profiles/Trimaker/CosmosII_bed.stl differ diff --git a/resources/profiles/Trimaker/Cosmos_II_thumbnail.png b/resources/profiles/Trimaker/Cosmos_II_thumbnail.png new file mode 100644 index 0000000000..5b698ae416 Binary files /dev/null and b/resources/profiles/Trimaker/Cosmos_II_thumbnail.png differ diff --git a/resources/profiles/Trimaker/NPC_thumbnail.png b/resources/profiles/Trimaker/NPC_thumbnail.png new file mode 100644 index 0000000000..5a5c8ff049 Binary files /dev/null and b/resources/profiles/Trimaker/NPC_thumbnail.png differ diff --git a/resources/profiles/Trimaker/NebulaCloud.svg b/resources/profiles/Trimaker/NebulaCloud.svg new file mode 100644 index 0000000000..6cb4c371b6 --- /dev/null +++ b/resources/profiles/Trimaker/NebulaCloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/profiles/Trimaker/NebulaCloud_bed.stl b/resources/profiles/Trimaker/NebulaCloud_bed.stl new file mode 100644 index 0000000000..db2f6aefb8 Binary files /dev/null and b/resources/profiles/Trimaker/NebulaCloud_bed.stl differ diff --git a/resources/profiles/Trimaker/Nebula_thumbnail.png b/resources/profiles/Trimaker/Nebula_thumbnail.png new file mode 100644 index 0000000000..1c85f96790 Binary files /dev/null and b/resources/profiles/Trimaker/Nebula_thumbnail.png differ diff --git a/src/libslic3r/LayerRegion.cpp b/src/libslic3r/LayerRegion.cpp index 4455d66340..9485998dc4 100644 --- a/src/libslic3r/LayerRegion.cpp +++ b/src/libslic3r/LayerRegion.cpp @@ -1,4 +1,5 @@ #include "ExPolygon.hpp" +#include "Flow.hpp" #include "Layer.hpp" #include "BridgeDetector.hpp" #include "ClipperUtils.hpp" @@ -169,7 +170,8 @@ static ExPolygons fill_surfaces_extract_expolygons(Surfaces &surfaces, std::init Surfaces expand_bridges_detect_orientations( Surfaces &surfaces, ExPolygons &shells, - const Algorithm::RegionExpansionParameters &expansion_params) + const Algorithm::RegionExpansionParameters &expansion_params, + const float closing_radius) { using namespace Slic3r::Algorithm; @@ -309,8 +311,13 @@ Surfaces expand_bridges_detect_orientations( } //FIXME try to be smart and pick the best bridging angle for all? templ.bridge_angle = bridges[bridge_id].angle; + //NOTE: The current regularization of the shells can create small unasigned regions in the object (E.G. benchy) + // without the following closing operation, those regions will stay unfilled and cause small holes in the expanded surface. + // look for narrow_ensure_vertical_wall_thickness_region_radius filter. + ExPolygons final = closing_ex(acc, closing_radius); // without safety offset, artifacts are generated (GH #2494) - for (ExPolygon &ex : union_safety_offset_ex(acc)) + // union_safety_offset_ex(acc) + for (ExPolygon &ex : final) out.emplace_back(templ, std::move(ex)); } } @@ -327,6 +334,7 @@ static Surfaces expand_merge_surfaces( SurfaceType surface_type, ExPolygons &shells, const Algorithm::RegionExpansionParameters ¶ms, + const float closing_radius, const double bridge_angle = -1.) { double thickness; @@ -335,6 +343,10 @@ static Surfaces expand_merge_surfaces( return {}; std::vector expanded = expand_merge_expolygons(std::move(src), shells, params); + //NOTE: The current regularization of the shells can create small unasigned regions in the object (E.G. benchy) + // without the following closing operation, those regions will stay unfilled and cause small holes in the expanded surface. + // look for narrow_ensure_vertical_wall_thickness_region_radius filter. + expanded = closing_ex(expanded, closing_radius); // Trim the shells by the expanded expolygons. shells = diff_ex(shells, expanded); @@ -373,6 +385,8 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly static constexpr const float expansion_step = scaled(0.1); // Don't take more than max_nr_steps for small expansion_step. static constexpr const size_t max_nr_expansion_steps = 5; + // Radius (with added epsilon) to absorb empty regions emering from regularization of ensuring, viz const float narrow_ensure_vertical_wall_thickness_region_radius = 0.5f * 0.65f * min_perimeter_infill_spacing; + const float closing_radius = 0.55f * 0.65f * 1.05f * this->flow(frSolidInfill).scaled_spacing(); // Expand the top / bottom / bridge surfaces into the shell thickness solid infills. double layer_thickness; @@ -384,8 +398,8 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly const double custom_angle = this->region().config().bridge_angle.value; const auto params = Algorithm::RegionExpansionParameters::build(expansion_bottom_bridge, expansion_step, max_nr_expansion_steps); bridges.surfaces = custom_angle > 0 ? - expand_merge_surfaces(m_fill_surfaces.surfaces, stBottomBridge, shells, params, Geometry::deg2rad(custom_angle)) : - expand_bridges_detect_orientations(m_fill_surfaces.surfaces, shells, params); + expand_merge_surfaces(m_fill_surfaces.surfaces, stBottomBridge, shells, params, closing_radius, Geometry::deg2rad(custom_angle)) : + expand_bridges_detect_orientations(m_fill_surfaces.surfaces, shells, params, closing_radius); BOOST_LOG_TRIVIAL(trace) << "Processing external surface, detecting bridges - done"; #if 0 { @@ -396,9 +410,9 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly } Surfaces bottoms = expand_merge_surfaces(m_fill_surfaces.surfaces, stBottom, shells, - Algorithm::RegionExpansionParameters::build(expansion_bottom, expansion_step, max_nr_expansion_steps)); + Algorithm::RegionExpansionParameters::build(expansion_bottom, expansion_step, max_nr_expansion_steps), closing_radius); Surfaces tops = expand_merge_surfaces(m_fill_surfaces.surfaces, stTop, shells, - Algorithm::RegionExpansionParameters::build(expansion_top, expansion_step, max_nr_expansion_steps)); + Algorithm::RegionExpansionParameters::build(expansion_top, expansion_step, max_nr_expansion_steps), closing_radius); m_fill_surfaces.remove_types({ stBottomBridge, stBottom, stTop, stInternalSolid }); reserve_more(m_fill_surfaces.surfaces, shells.size() + bridges.size() + bottoms.size() + tops.size()); diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index 265d256dc2..4f211323aa 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -1162,7 +1163,7 @@ void PageMaterials::sort_list_data(StringList* list, bool add_All_item, bool mat // in alphabetical order std::vector> prusa_profiles; - std::vector> other_profiles; + std::vector>> other_profiles; // first is lower case id for sorting bool add_TEMPLATES_item = false; for (int i = 0 ; i < list->size(); ++i) { const std::string& data = list->get_data(i); @@ -1175,7 +1176,7 @@ void PageMaterials::sort_list_data(StringList* list, bool add_All_item, bool mat if (!material_type_ordering && data.find("Prusa") != std::string::npos) prusa_profiles.push_back(data); else - other_profiles.push_back(data); + other_profiles.emplace_back(boost::algorithm::to_lower_copy(boost::nowide::widen(data)),data); } if (material_type_ordering) { @@ -1185,10 +1186,10 @@ void PageMaterials::sort_list_data(StringList* list, bool add_All_item, bool mat for (size_t profs = end_of_sorted; profs < other_profiles.size(); profs++) { // find instead compare because PET vs PETG - if (other_profiles[profs].get().find(value) != std::string::npos) { + if (other_profiles[profs].second.get().find(value) != std::string::npos) { //swap if(profs != end_of_sorted) { - std::reference_wrapper aux = other_profiles[end_of_sorted]; + std::pair> aux = other_profiles[end_of_sorted]; other_profiles[end_of_sorted] = other_profiles[profs]; other_profiles[profs] = aux; } @@ -1201,8 +1202,8 @@ void PageMaterials::sort_list_data(StringList* list, bool add_All_item, bool mat std::sort(prusa_profiles.begin(), prusa_profiles.end(), [](std::reference_wrapper a, std::reference_wrapper b) { return a.get() < b.get(); }); - std::sort(other_profiles.begin(), other_profiles.end(), [](std::reference_wrapper a, std::reference_wrapper b) { - return a.get() < b.get(); + std::sort(other_profiles.begin(), other_profiles.end(), [](const std::pair>& a, const std::pair>& b) { + return a.first append(item, &const_cast(item.get())); for (const auto& item : other_profiles) - list->append(item, &const_cast(item.get())); + list->append(item.second, &const_cast(item.second.get())); } @@ -1225,20 +1226,19 @@ void PageMaterials::sort_list_data(PresetList* list, const std::vector prusa_profiles; - std::vector other_profiles; - //for (int i = 0; i < data.size(); ++i) { + std::vector> other_profiles; // first is lower case id for sorting for (const auto& item : data) { const std::string& name = item.name; if (name.find("Prusa") != std::string::npos) prusa_profiles.emplace_back(item); else - other_profiles.emplace_back(item); + other_profiles.emplace_back(boost::algorithm::to_lower_copy(boost::nowide::widen(name)), item); } std::sort(prusa_profiles.begin(), prusa_profiles.end(), [](ProfilePrintData a, ProfilePrintData b) { return a.name.get() < b.name.get(); }); - std::sort(other_profiles.begin(), other_profiles.end(), [](ProfilePrintData a, ProfilePrintData b) { - return a.name.get() < b.name.get(); + std::sort(other_profiles.begin(), other_profiles.end(), [](const std::pair& a, const std::pair& b) { + return a.first < b.first; }); list->Clear(); for (size_t i = 0; i < prusa_profiles.size(); ++i) { @@ -1246,8 +1246,8 @@ void PageMaterials::sort_list_data(PresetList* list, const std::vectorCheck(i, prusa_profiles[i].checked); } for (size_t i = 0; i < other_profiles.size(); ++i) { - list->append(std::string(other_profiles[i].name) + (other_profiles[i].omnipresent || template_shown ? "" : " *"), &const_cast(other_profiles[i].name.get())); - list->Check(i + prusa_profiles.size(), other_profiles[i].checked); + list->append(std::string(other_profiles[i].second.name) + (other_profiles[i].second.omnipresent || template_shown ? "" : " *"), &const_cast(other_profiles[i].second.name.get())); + list->Check(i + prusa_profiles.size(), other_profiles[i].second.checked); } } @@ -1670,9 +1670,17 @@ PageVendors::PageVendors(ConfigWizard *parent) auto boldfont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); boldfont.SetWeight(wxFONTWEIGHT_BOLD); + // Copy vendors from bundle map to vector, so we can sort it without case sensitivity + std::vector> vendors; + for (const auto& pair : wizard_p()->bundles) { + vendors.emplace_back(boost::algorithm::to_lower_copy(boost::nowide::widen(pair.second.vendor_profile->name)),pair.second.vendor_profile); + } + std::sort(vendors.begin(), vendors.end(), [](const std::pair& a, const std::pair& b) { + return a.first < b.first; + }); - for (const auto &pair : wizard_p()->bundles) { - const VendorProfile *vendor = pair.second.vendor_profile; + for (const std::pair& v : vendors) { + const VendorProfile* vendor = v.second; if (vendor->id == PresetBundle::PRUSA_BUNDLE) { continue; } if (vendor && vendor->templates_profile) continue; @@ -1682,8 +1690,8 @@ PageVendors::PageVendors(ConfigWizard *parent) wizard_p()->on_3rdparty_install(vendor, cbox->IsChecked()); }); - const auto &vendors = appconfig.vendors(); - const bool enabled = vendors.find(pair.first) != vendors.end(); + const auto &acvendors = appconfig.vendors(); + const bool enabled = acvendors.find(vendor->id) != acvendors.end(); if (enabled) { cbox->SetValue(true); @@ -2316,8 +2324,21 @@ void ConfigWizard::priv::load_pages() index->add_page(page_msla); if (!only_sla_mode) { index->add_page(page_vendors); - for (const auto &pages : pages_3rdparty) { - for ( PagePrinters* page : { pages.second.first, pages.second.second }) + + // Copy pages names from map to vector, so we can sort it without case sensitivity + std::vector> sorted_vendors; + for (const auto& pages : pages_3rdparty) { + sorted_vendors.emplace_back(boost::algorithm::to_lower_copy(boost::nowide::widen(pages.first)), pages.first); + } + std::sort(sorted_vendors.begin(), sorted_vendors.end(), [](const std::pair& a, const std::pair& b) { + return a.first < b.first; + }); + + for (const std::pair v : sorted_vendors) { + const auto& pages = pages_3rdparty.find(v.second); + if (pages == pages_3rdparty.end()) + continue; // Should not happen + for ( PagePrinters* page : { pages->second.first, pages->second.second }) if (page && page->install) index->add_page(page); } diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 562d54db18..da6b25a285 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -1685,6 +1685,8 @@ void ObjectList::load_modifier(const wxArrayString& input_files, ModelObject& mo const Vec3d offset = Vec3d(instance_bb.max.x(), instance_bb.min.y(), instance_bb.min.z()) + 0.5 * mesh_bb.size() - instance_offset; new_volume->set_offset(inv_inst_transform * offset); } + else + new_volume->set_offset(new_volume->source.mesh_offset - model_object.volumes.front()->source.mesh_offset); added_volumes.push_back(new_volume); } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index 2f0d3508c9..737070607a 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -1323,6 +1323,10 @@ namespace { bool is_text_empty(std::string_view text) { return text.empty() || text.find_first_not_of(" \n\t\r") == std::string::npos; } } // namespace +namespace priv { +static bool is_text_empty(const std::string &text) { return text.empty() || text.find_first_not_of(" \n\t\r") == std::string::npos; } +} // namespace priv + bool GLGizmoEmboss::process() { // no volume is selected -> selection from right panel diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 3bceafe0b5..e3f2220cad 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -177,7 +177,7 @@ void ImGuiWrapper::set_language(const std::string &language) m_font_cjk = false; if (lang == "cs" || lang == "pl" || lang == "hu") { ranges = ranges_latin2; - } else if (lang == "ru" || lang == "uk") { + } else if (lang == "ru" || lang == "uk" || lang == "be") { ranges = ImGui::GetIO().Fonts->GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters } else if (lang == "tr") { ranges = ranges_turkish; diff --git a/src/slic3r/GUI/PresetComboBoxes.cpp b/src/slic3r/GUI/PresetComboBoxes.cpp index 7a2e0de69c..25beb87bc2 100644 --- a/src/slic3r/GUI/PresetComboBoxes.cpp +++ b/src/slic3r/GUI/PresetComboBoxes.cpp @@ -246,8 +246,15 @@ void PresetComboBox::update(std::string select_preset_name) const std::deque& presets = m_collection->get_presets(); - std::map> nonsys_presets; - std::map incomp_presets; + struct PresetData { + wxString name; + wxString lower_name; + wxBitmapBundle* bitmap; + bool enabled; // not used in incomp_presets + }; + std::vector system_presets; + std::vector nonsys_presets; + std::vector incomp_presets; wxString selected = ""; if (!presets.front().is_visible) @@ -276,28 +283,31 @@ void PresetComboBox::update(std::string select_preset_name) assert(bmp); if (!is_enabled) { - incomp_presets.emplace(get_preset_name(preset), bmp); + incomp_presets.push_back({get_preset_name(preset), get_preset_name(preset).Lower(), bmp, false}); if (preset.is_dirty && m_show_modif_preset_separately) - incomp_presets.emplace(get_preset_name_with_suffix(preset), bmp); + incomp_presets.push_back({get_preset_name_with_suffix(preset), get_preset_name_with_suffix(preset).Lower(), bmp, false}); } else if (preset.is_default || preset.is_system) { - Append(get_preset_name(preset), *bmp); - validate_selection(preset.name == select_preset_name); + system_presets.push_back({get_preset_name(preset), get_preset_name(preset).Lower(), bmp, is_enabled}); + if (preset.name == select_preset_name) + selected = preset.name; + if (preset.is_dirty && m_show_modif_preset_separately) { wxString preset_name = get_preset_name_with_suffix(preset); - Append(preset_name, *bmp); - validate_selection(into_u8(preset_name) == select_preset_name); + system_presets.push_back({preset_name, preset_name.Lower(), bmp, is_enabled}); + if (into_u8(preset_name) == select_preset_name) + selected = preset_name; } } else { - nonsys_presets.emplace(get_preset_name(preset), std::pair(bmp, is_enabled)); + nonsys_presets.push_back({get_preset_name(preset), get_preset_name(preset).Lower(), bmp, is_enabled}); if (preset.name == select_preset_name || (select_preset_name.empty() && is_enabled)) selected = get_preset_name(preset); if (preset.is_dirty && m_show_modif_preset_separately) { wxString preset_name = get_preset_name_with_suffix(preset); - nonsys_presets.emplace(preset_name, std::pair(bmp, is_enabled)); + nonsys_presets.push_back({preset_name, preset_name.Lower(), bmp, is_enabled}); if (preset_name == select_preset_name || (select_preset_name.empty() && is_enabled)) selected = preset_name; } @@ -305,25 +315,46 @@ void PresetComboBox::update(std::string select_preset_name) if (i + 1 == m_collection->num_default_presets()) set_label_marker(Append(separator(L("System presets")), NullBitmapBndl())); } + + if (!system_presets.empty()) + { + std::sort(system_presets.begin(), system_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + + for (std::vector::iterator it = system_presets.begin(); it != system_presets.end(); ++it) { + int item_id = Append(it->name, *it->bitmap); + if (!it->enabled) + set_label_marker(item_id, LABEL_ITEM_DISABLED); + validate_selection(it->name == selected); + } + } if (!nonsys_presets.empty()) { + std::sort(nonsys_presets.begin(), nonsys_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + set_label_marker(Append(separator(L("User presets")), NullBitmapBndl())); - for (std::map>::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) { - int item_id = Append(it->first, *it->second.first); - bool is_enabled = it->second.second; - if (!is_enabled) + for (std::vector::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) { + int item_id = Append(it->name, *it->bitmap); + if (!it->enabled) set_label_marker(item_id, LABEL_ITEM_DISABLED); - validate_selection(it->first == selected); + validate_selection(it->name == selected); } } if (!incomp_presets.empty()) { + std::sort(incomp_presets.begin(), incomp_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + set_label_marker(Append(separator(L("Incompatible presets")), NullBitmapBndl())); - for (std::map::iterator it = incomp_presets.begin(); it != incomp_presets.end(); ++it) { - set_label_marker(Append(it->first, *it->second), LABEL_ITEM_DISABLED); + for (std::vector ::iterator it = incomp_presets.begin(); it != incomp_presets.end(); ++it) { + set_label_marker(Append(it->name, *it->bitmap), LABEL_ITEM_DISABLED); } } - + update_selection(); Thaw(); } @@ -833,8 +864,14 @@ void PlaterPresetComboBox::update() null_icon_width = (wide_icons ? 3 : 2) * norm_icon_width + thin_space_icon_width + wide_space_icon_width; - std::map nonsys_presets; - std::map template_presets; + struct PresetData { + wxString name; + wxString lower_name; + wxBitmapBundle* bitmap; + }; + std::vector system_presets; + std::vector nonsys_presets; + std::vector template_presets; const bool allow_templates = !wxGetApp().app_config->get_bool("no_templates"); @@ -888,22 +925,23 @@ void PlaterPresetComboBox::update() if (preset.is_default || preset.is_system) { if (preset.vendor && preset.vendor->templates_profile) { if (allow_templates) { - template_presets.emplace(get_preset_name(preset), bmp); + template_presets.push_back({get_preset_name(preset), get_preset_name(preset).Lower(), bmp}); if (is_selected) { selected_user_preset = get_preset_name(preset); tooltip = from_u8(preset.name); } } } else { - Append(get_preset_name(preset), *bmp); - validate_selection(is_selected); - if (is_selected) + system_presets.push_back({ get_preset_name(preset), get_preset_name(preset).Lower(), bmp }); + if (is_selected) { + selected_user_preset = get_preset_name(preset); tooltip = from_u8(preset.name); + } } } else { - nonsys_presets.emplace(get_preset_name(preset), bmp); + nonsys_presets.push_back({ get_preset_name(preset), get_preset_name(preset).Lower(), bmp }); if (is_selected) { selected_user_preset = get_preset_name(preset); tooltip = from_u8(preset.name); @@ -912,22 +950,41 @@ void PlaterPresetComboBox::update() if (i + 1 == m_collection->num_default_presets()) set_label_marker(Append(separator(L("System presets")), NullBitmapBndl())); } - + + if(!system_presets.empty()) + { + std::sort(system_presets.begin(), system_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + + for (std::vector::iterator it = system_presets.begin(); it != system_presets.end(); ++it) { + Append(it->name, *it->bitmap); + validate_selection(it->name == selected_user_preset); + } + } if (!nonsys_presets.empty()) { + std::sort(nonsys_presets.begin(), nonsys_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + set_label_marker(Append(separator(L("User presets")), NullBitmapBndl())); - for (std::map::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) { - Append(it->first, *it->second); - validate_selection(it->first == selected_user_preset); + for (std::vector::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) { + Append(it->name, *it->bitmap); + validate_selection(it->name == selected_user_preset); } } if (!template_presets.empty()) { + std::sort(template_presets.begin(), template_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + set_label_marker(Append(separator(L("Template presets")), wxNullBitmap)); - for (std::map::iterator it = template_presets.begin(); it != template_presets.end(); ++it) { - Append(it->first, *it->second); - validate_selection(it->first == selected_user_preset); + for (std::vector::iterator it = template_presets.begin(); it != template_presets.end(); ++it) { + Append(it->name, *it->bitmap); + validate_selection(it->name == selected_user_preset); } } @@ -938,19 +995,37 @@ void PlaterPresetComboBox::update() set_label_marker(Append(separator(L("Physical printers")), NullBitmapBndl())); const PhysicalPrinterCollection& ph_printers = m_preset_bundle->physical_printers; + // Sort Physical printers in preset_data vector and than Append it in correct order + struct PhysicalPrinterPresetData + { + wxString lower_name; // just for sorting + std::string name; // preset_name + std::string fullname; // full name + bool selected; // is selected + }; + std::vector preset_data; for (PhysicalPrinterCollection::ConstIterator it = ph_printers.begin(); it != ph_printers.end(); ++it) { for (const std::string& preset_name : it->get_preset_names()) { - Preset* preset = m_collection->find_preset(preset_name); - if (!preset || !preset->is_visible) - continue; - std::string main_icon_name, bitmap_key = main_icon_name = preset->printer_technology() == ptSLA ? "sla_printer" : m_main_bitmap_name; - auto bmp = get_bmp(main_icon_name, wide_icons, main_icon_name); - assert(bmp); - - set_label_marker(Append(from_u8(it->get_full_name(preset_name) + suffix(preset)), *bmp), LABEL_ITEM_PHYSICAL_PRINTER); - validate_selection(ph_printers.is_selected(it, preset_name)); + preset_data.push_back({ wxString::FromUTF8(it->get_full_name(preset_name)).Lower(), preset_name, it->get_full_name(preset_name), ph_printers.is_selected(it, preset_name) }); } } + std::sort(preset_data.begin(), preset_data.end(), [](const PhysicalPrinterPresetData& a, const PhysicalPrinterPresetData& b) { + return a.lower_name < b.lower_name; + }); + + for (const PhysicalPrinterPresetData& data : preset_data) + { + Preset* preset = m_collection->find_preset(data.name); + if (!preset || !preset->is_visible) + continue; + std::string main_icon_name = preset->printer_technology() == ptSLA ? "sla_printer" : m_main_bitmap_name; + + auto bmp = get_bmp(main_icon_name, main_icon_name, "", true, true, false); + assert(bmp); + + set_label_marker(Append(from_u8(data.fullname + suffix(preset)), *bmp), LABEL_ITEM_PHYSICAL_PRINTER); + validate_selection(data.selected); + } } } @@ -1069,12 +1144,18 @@ void TabPresetComboBox::update() const ExtruderFilaments& extruder_filaments = m_preset_bundle->extruders_filaments[m_active_extruder_idx]; const std::deque& presets = m_collection->get_presets(); - - std::map> nonsys_presets; - std::map> template_presets; + + struct PresetData { + wxString name; + wxString lower_name; + wxBitmapBundle* bitmap; + bool enabled; + }; + std::vector system_presets; + std::vector nonsys_presets; + std::vector template_presets; const bool allow_templates = !wxGetApp().app_config->get_bool("no_templates"); - wxString selected = ""; if (!presets.front().is_visible) set_label_marker(Append(separator(L("System presets")), NullBitmapBndl())); @@ -1113,23 +1194,20 @@ void TabPresetComboBox::update() if (preset.is_default || preset.is_system) { if (preset.vendor && preset.vendor->templates_profile) { if (allow_templates) { - template_presets.emplace(get_preset_name(preset), std::pair(bmp, is_enabled)); + template_presets.push_back({get_preset_name(preset), get_preset_name(preset).Lower(), bmp, is_enabled}); if (i == idx_selected) selected = get_preset_name(preset); } } else { - int item_id = Append(get_preset_name(preset), *bmp); - if (!is_enabled) - set_label_marker(item_id, LABEL_ITEM_DISABLED); - validate_selection(i == idx_selected); + system_presets.push_back({get_preset_name(preset), get_preset_name(preset).Lower(), bmp, is_enabled}); + if (i == idx_selected) + selected = get_preset_name(preset); } - - } else { std::pair pair(bmp, is_enabled); - nonsys_presets.emplace(get_preset_name(preset), std::pair(bmp, is_enabled)); + nonsys_presets.push_back({get_preset_name(preset), get_preset_name(preset).Lower(), bmp, is_enabled}); if (i == idx_selected) selected = get_preset_name(preset); } @@ -1137,26 +1215,47 @@ void TabPresetComboBox::update() set_label_marker(Append(separator(L("System presets")), NullBitmapBndl())); } + if (!system_presets.empty()) + { + std::sort(system_presets.begin(), system_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + + for (std::vector::iterator it = system_presets.begin(); it != system_presets.end(); ++it) { + int item_id = Append(it->name, *it->bitmap); + if (!it->enabled) + set_label_marker(item_id, LABEL_ITEM_DISABLED); + validate_selection(it->name == selected); + } + } + if (!nonsys_presets.empty()) { + std::sort(nonsys_presets.begin(), nonsys_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + set_label_marker(Append(separator(L("User presets")), NullBitmapBndl())); - for (std::map>::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) { - int item_id = Append(it->first, *it->second.first); - bool is_enabled = it->second.second; - if (!is_enabled) + for (std::vector::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) { + int item_id = Append(it->name, *it->bitmap); + if (!it->enabled) set_label_marker(item_id, LABEL_ITEM_DISABLED); - validate_selection(it->first == selected); + validate_selection(it->name == selected); } } - if (!template_presets.empty()) { + if (!template_presets.empty()) + { + std::sort(template_presets.begin(), template_presets.end(), [](const PresetData& a, const PresetData& b) { + return a.lower_name < b.lower_name; + }); + set_label_marker(Append(separator(L("Template presets")), wxNullBitmap)); - for (std::map>::iterator it = template_presets.begin(); it != template_presets.end(); ++it) { - int item_id = Append(it->first, *it->second.first); - bool is_enabled = it->second.second; - if (!is_enabled) + for (std::vector::iterator it = template_presets.begin(); it != template_presets.end(); ++it) { + int item_id = Append(it->name, *it->bitmap); + if (!it->enabled) set_label_marker(item_id, LABEL_ITEM_DISABLED); - validate_selection(it->first == selected); + validate_selection(it->name == selected); } } @@ -1167,20 +1266,36 @@ void TabPresetComboBox::update() set_label_marker(Append(separator(L("Physical printers")), NullBitmapBndl())); const PhysicalPrinterCollection& ph_printers = m_preset_bundle->physical_printers; + // Sort Physical printers in preset_data vector and than Append it in correct order + struct PhysicalPrinterPresetData + { + wxString lower_name; // just for sorting + std::string name; // preset_name + std::string fullname; // full name + bool selected; // is selected + }; + std::vector preset_data; for (PhysicalPrinterCollection::ConstIterator it = ph_printers.begin(); it != ph_printers.end(); ++it) { for (const std::string& preset_name : it->get_preset_names()) { - Preset* preset = m_collection->find_preset(preset_name); - if (!preset || !preset->is_visible) - continue; - std::string main_icon_name = preset->printer_technology() == ptSLA ? "sla_printer" : m_main_bitmap_name; - - auto bmp = get_bmp(main_icon_name, main_icon_name, "", true, true, false); - assert(bmp); - - set_label_marker(Append(from_u8(it->get_full_name(preset_name) + suffix(preset)), *bmp), LABEL_ITEM_PHYSICAL_PRINTER); - validate_selection(ph_printers.is_selected(it, preset_name)); + preset_data.push_back({wxString::FromUTF8(it->get_full_name(preset_name)).Lower(), preset_name, it->get_full_name(preset_name), ph_printers.is_selected(it, preset_name)}); } } + std::sort(preset_data.begin(), preset_data.end(), [](const PhysicalPrinterPresetData& a, const PhysicalPrinterPresetData& b) { + return a.lower_name < b.lower_name; + }); + for (const PhysicalPrinterPresetData& data : preset_data) + { + Preset* preset = m_collection->find_preset(data.name); + if (!preset || !preset->is_visible) + continue; + std::string main_icon_name = preset->printer_technology() == ptSLA ? "sla_printer" : m_main_bitmap_name; + + auto bmp = get_bmp(main_icon_name, main_icon_name, "", true, true, false); + assert(bmp); + + set_label_marker(Append(from_u8(data.fullname + suffix(preset)), *bmp), LABEL_ITEM_PHYSICAL_PRINTER); + validate_selection(data.selected); + } } // add "Add/Remove printers" item diff --git a/src/slic3r/Utils/OctoPrint.cpp b/src/slic3r/Utils/OctoPrint.cpp index c97d148f9d..ab6e1a5e78 100644 --- a/src/slic3r/Utils/OctoPrint.cpp +++ b/src/slic3r/Utils/OctoPrint.cpp @@ -32,6 +32,7 @@ namespace pt = boost::property_tree; namespace Slic3r { namespace { +#ifdef WIN32 std::string get_host_from_url(const std::string& url_in) { std::string url = url_in; @@ -63,7 +64,7 @@ std::string get_host_from_url(const std::string& url_in) BOOST_LOG_TRIVIAL(error) << "OctoPrint get_host_from_url: failed to allocate curl_url"; return out; } -#ifdef WIN32 + // Workaround for Windows 10/11 mDNS resolve issue, where two mDNS resolves in succession fail. std::string substitute_host(const std::string& orig_addr, std::string sub_addr) { @@ -470,15 +471,17 @@ bool OctoPrint::upload_inner_with_host(PrintHostUpload upload_data, ProgressFn p % upload_parent_path.string() % (upload_data.post_action == PrintHostPostUploadAction::StartPrint ? "true" : "false"); - std::string host = get_host_from_url(m_host); auto http = Http::post(std::move(url)); +#ifdef WIN32 // "Host" header is necessary here. In the workaround above (two mDNS..) we have got IP address from test connection and subsituted it into "url" variable. // And when creating Http object above, libcurl automatically includes "Host" header from address it got. // Thus "Host" is set to the resolved IP instead of host filled by user. We need to change it back. // Not changing the host would work on the most cases (where there is 1 service on 1 hostname) but would break when f.e. reverse proxy is used (issue #9734). // Also when allow_ip_resolve = 0, this is not needed, but it should not break anything if it stays. // https://www.rfc-editor.org/rfc/rfc7230#section-5.4 + std::string host = get_host_from_url(m_host); http.header("Host", host); +#endif // _WIN32 set_auth(http); http.form_add("print", upload_data.post_action == PrintHostPostUploadAction::StartPrint ? "true" : "false") .form_add("path", upload_parent_path.string()) // XXX: slashes on windows ??? @@ -1036,14 +1039,16 @@ bool PrusaLink::put_inner(PrintHostUpload upload_data, std::string url, const st bool res = true; // Percent escape all filenames in on path and add it to the url. This is different from POST. url += "/" + escape_path_by_element(upload_data.upload_path); - std::string host = get_host_from_url(m_host); Http http = Http::put(std::move(url)); +#ifdef WIN32 // "Host" header is necessary here. We have resolved IP address and subsituted it into "url" variable. // And when creating Http object above, libcurl automatically includes "Host" header from address it got. // Thus "Host" is set to the resolved IP instead of host filled by user. We need to change it back. // Not changing the host would work on the most cases (where there is 1 service on 1 hostname) but would break when f.e. reverse proxy is used (issue #9734). // https://www.rfc-editor.org/rfc/rfc7230#section-5.4 + std::string host = get_host_from_url(m_host); http.header("Host", host); +#endif // _WIN32 set_auth(http); // This is ugly, but works. There was an error at PrusaLink side that accepts any string at Print-After-Upload as true, thus False was also triggering print after upload. if (upload_data.post_action == PrintHostPostUploadAction::StartPrint) @@ -1083,15 +1088,17 @@ bool PrusaLink::post_inner(PrintHostUpload upload_data, std::string url, const s bool res = true; const auto upload_filename = upload_data.upload_path.filename(); const auto upload_parent_path = upload_data.upload_path.parent_path(); - std::string host = get_host_from_url(m_host); Http http = Http::post(std::move(url)); +#ifdef WIN32 // "Host" header is necessary here. We have resolved IP address and subsituted it into "url" variable. // And when creating Http object above, libcurl automatically includes "Host" header from address it got. // Thus "Host" is set to the resolved IP instead of host filled by user. We need to change it back. // Not changing the host would work on the most cases (where there is 1 service on 1 hostname) but would break when f.e. reverse proxy is used (issue #9734). // https://www.rfc-editor.org/rfc/rfc7230#section-5.4 + std::string host = get_host_from_url(m_host); http.header("Host", host); +#endif // _WIN32 set_auth(http); set_http_post_header_args(http, upload_data.post_action); http.form_add("path", upload_parent_path.string()) // XXX: slashes on windows ??? diff --git a/version.inc b/version.inc index b3f1be0d1b..b8916bd685 100644 --- a/version.inc +++ b/version.inc @@ -3,7 +3,7 @@ set(SLIC3R_APP_NAME "PrusaSlicer") set(SLIC3R_APP_KEY "PrusaSlicer") -set(SLIC3R_VERSION "2.6.0-beta3") +set(SLIC3R_VERSION "2.6.0-beta4") set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN") set(SLIC3R_RC_VERSION "2,6,0,0") set(SLIC3R_RC_VERSION_DOTS "2.6.0.0")