diff --git a/resources/profiles/BIBO.idx b/resources/profiles/BIBO.idx index 85cc0fd1b..5e4c30b2c 100644 --- a/resources/profiles/BIBO.idx +++ b/resources/profiles/BIBO.idx @@ -1,4 +1,5 @@ min_slic3r_version = 2.4.1-beta3 +0.0.6 Correct start gcode, match profile and firmware settings, and other profile improvements. 0.0.5 Correct Marlin Error accumulation for Ditto printer profiles. 0.0.4 Correct Marlin Error accumulation min_slic3r_version = 2.3.0-beta2 diff --git a/resources/profiles/BIBO.ini b/resources/profiles/BIBO.ini index 15e9c51a6..7fc937e73 100644 --- a/resources/profiles/BIBO.ini +++ b/resources/profiles/BIBO.ini @@ -5,7 +5,7 @@ name = BIBO # 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 = 0.0.5 +config_version = 0.0.6 # Where to get the updates from? config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/BIBO/ @@ -37,7 +37,7 @@ clip_multipart_objects = 1 compatible_printers = complete_objects = 0 dont_support_bridges = 1 -elefant_foot_compensation = 0 +elefant_foot_compensation = 0.3 ensure_vertical_shell_thickness = 1 external_fill_pattern = rectilinear external_perimeters_first = 0 @@ -48,8 +48,8 @@ extruder_clearance_height = 12 extruder_clearance_radius = 45 extrusion_width = 0.45 fill_angle = 45 -fill_density = 20% -fill_pattern = grid +fill_density = 15% +fill_pattern = cubic first_layer_extrusion_width = 0.42 first_layer_height = 0.2 first_layer_speed = 20 @@ -72,7 +72,7 @@ overhangs = 1 only_retract_when_crossing_perimeters = 0 ooze_prevention = 0 output_filename_format = {input_filename_base}_{layer_height}mm_{if num_extruders==1}{filament_type[0]}{else}E1{filament_type[0]}_E2{filament_type[1]}{endif}_{printer_model}_{print_time}.gcode -perimeters = 2 +perimeters = 3 perimeter_extruder = 1 perimeter_extrusion_width = 0.45 post_process = @@ -389,6 +389,10 @@ support_material_interface_layers = 3 support_material_with_sheath = 0 support_material_xy_spacing = 80% +# XXXXXXXXXXXXXXXXXXXXXX +# XXX--- filament ---XXX +# XXXXXXXXXXXXXXXXXXXXXX + # Common filament preset [filament:*common*] cooling = 0 @@ -494,6 +498,17 @@ inherits = *PLA* filament_vendor = Generic filament_notes = "List of materials which typically use standard PLA print settings:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladec PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH" +[filament:BIBO White PLA @BIBO2] +inherits = *PLA* +filament_colour = #FFFFFF +filament_vendor = BIBO +filament_notes = "General Settings for the BIBO White Filament Which is included with the printer" +filament_cost = 20 +first_layer_bed_temperature = 30 +bed_temperature = 30 +first_layer_temperature = 200 +temperature = 190 + [filament:Generic PETG @BIBO2] inherits = *PET* filament_vendor = Generic @@ -690,6 +705,10 @@ min_print_speed = 15 slowdown_below_layer_time = 10 cooling = 1 +# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +# XXX--- Printer settings ---XXX +# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + # Common printer preset [printer:*common*] printer_technology = FFF @@ -702,20 +721,20 @@ extruder_offset = 0x0 gcode_flavor = marlin silent_mode = 0 remaining_times = 0 -machine_max_acceleration_e = 1100 -machine_max_acceleration_extruding = 5000 -machine_max_acceleration_retracting = 1100 -machine_max_acceleration_x = 500 -machine_max_acceleration_y = 500 +machine_max_acceleration_x = 1100 +machine_max_acceleration_y = 1100 machine_max_acceleration_z = 100 -machine_max_feedrate_e = 20 +machine_max_acceleration_e = 5000 +machine_max_acceleration_extruding = 1100 +machine_max_acceleration_retracting = 1100 machine_max_feedrate_x = 350 machine_max_feedrate_y = 350 machine_max_feedrate_z = 2 -machine_max_jerk_e = 5 -machine_max_jerk_x = 8 -machine_max_jerk_y = 8 +machine_max_feedrate_e = 25 +machine_max_jerk_x = 10 +machine_max_jerk_y = 10 machine_max_jerk_z = 0.3 +machine_max_jerk_e = 5 machine_min_extruding_rate = 0 machine_min_travel_rate = 0 layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] @@ -776,7 +795,7 @@ retract_lift_below = 0,0 retract_restart_extra = 0,0 retract_restart_extra_toolchange = 0,0 retract_speed = 20,20 -start_gcode = ;Start code PrusaSlicer BIBO 2 printers\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM190 S{max(first_layer_bed_temperature[0] - 5, first_layer_bed_temperature[1] - 5)} ; wait for bed temp\nM140 S{max(first_layer_bed_temperature[0], first_layer_bed_temperature[1])} ; continue bed heating to full temp while other things are happening\nM104 S{first_layer_temperature[0]} T0; set 1st nozzle heater to first layer temperature\nM104 S{first_layer_temperature[1]} T1; set 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0; wait for 1st nozzle heat to first layer temperature\nM109 S{first_layer_temperature[1]} T1; wait for 2nd nozzle heat to first layer temperature\nM105 ; Report Temperatures\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Z2.0 F400 ; move the platform down 2mm\nT[initial_tool]; switch to initial tool position\nG92 E0.0 ; reset extruder\nG28 ; Home all axis\nG1 Y0 F1200 E0 ; move Y to min endstop and extrude 0 filament\nG92 E0.0 ; reset extruder and zero the current extruder coordinate before printing\nM117 BIBO now Printing... ; Put now printing message on screen +start_gcode = ;Start code PrusaSlicer BIBO 2 printers\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM190 S{max(first_layer_bed_temperature[0] - 5, first_layer_bed_temperature[1] - 5)} ; wait for bed temp\nM140 S{max(first_layer_bed_temperature[0], first_layer_bed_temperature[1])} ; continue bed heating to full temp while other things are happening\nM104 S{first_layer_temperature[0]} T0; set 1st nozzle heater to first layer temperature\nM104 S{first_layer_temperature[1]} T1; set 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0; wait for 1st nozzle heat to first layer temperature\nM109 S{first_layer_temperature[1]} T1; wait for 2nd nozzle heat to first layer temperature\nM105 ; Report Temperatures\nT0 ; Start at T0 to avoid extruder nozzle offset issues\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Z2.0 F400 ; move the platform down 2mm\nG92 E0.0 ; reset extruder\nG1 Y0 F1200 E0 ; move Y to min endstop and extrude 0 filament\nT[initial_tool]; switch to initial tool position\nG92 E0.0 ; reset extruder and zero the current extruder coordinate before printing\nM117 BIBO now Printing... ; Put now printing message on screen end_gcode = ;BIBO End GCode\nM107 ; turn fans off\nG91 ; Relative positioning\nG1 Z1 F100\nM140 S0 ; Disable heated bed\nM104 T0 S0 ; extruder T0 heater off\nM104 T1 S0 ; extruder T1 heater off\nG1 Z+0.5 X-20 Y-20 F300 ; move Z down then move print head a bit out of the way\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nG90 ; Absolute positioning\nG92 E0.0 ; Reset extruder position\nM84 ; Turn steppers off\nM117 BIBO Print complete ; Put print complete message on screen thumbnails = toolchange_gcode = @@ -798,7 +817,7 @@ deretract_speed = 0 # Setting this value to 0 uses the retract speed retract_before_wipe = 100% default_print_profile = 0.20mm NORMAL @BIBO2 default_filament_profile = Generic PLA @BIBO2 -start_gcode = ;Start code PrusaSlicer BIBO 2 printers E1 only (i.e. T0)\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temp\nM140 S{first_layer_bed_temperature[0]} ; continue bed heating to full temp while other things are happening\nM104 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to first layer temperature\nM104 S{first_layer_temperature[0] * 0.791} T1 ; set 2nd nozzle heater to 79.1 percent standby temp\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0 ; wait for 1st nozzle heat to first layer temperature\nM109 S{first_layer_temperature[0] * 0.791} T1 ; wait for 2nd nozzle heat to 79.1 percent standby temp\nM105 ; Report Temperatures\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Y0 F1200 E0 ; move Y to min endstop and extrude 0 filament\nT[initial_tool] ; switch to initial tool position\nG92 E0.0 ; reset extruder\nG28 ; Home all axis\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nM117 Cleaning... ; Put Cleaning message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder and zero the current extruder coordinate before printing\nM117 BIBO E1 now Printing... ; Put now printing message on screen +start_gcode = ;Start code PrusaSlicer BIBO 2 printers E1 only (i.e. T0)\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temp\nM140 S{first_layer_bed_temperature[0]} ; continue bed heating to full temp while other things are happening\nM104 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to first layer temperature\nM104 S{first_layer_temperature[0] * 0.791} T1 ; set 2nd nozzle heater to 79.1 percent standby temp\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0 ; wait for 1st nozzle heat to first layer temperature\nM109 S{first_layer_temperature[0] * 0.791} T1 ; wait for 2nd nozzle heat to 79.1 percent standby temp\nM105 ; Report Temperatures\nT0 ; Start at T0 to avoid extruder nozzle offset issues\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Y0 F1200 E0 ; move Y to min endstop and extrude 0 filament\nT[initial_tool] ; switch to initial tool position\nG92 E0.0 ; reset extruder\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nM117 Cleaning... ; Put Cleaning message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder and zero the current extruder coordinate before printing\nM117 BIBO E1 now Printing... ; Put now printing message on screen end_gcode = ;BIBO End GCode\nM107 ; turn fans off\nG91 ; Relative positioning\nG1 Z1 F100\nM140 S0 ; Disable heated bed\nM104 T0 S0 ; extruder T0 heater off\nM104 T1 S0 ; extruder T1 heater off\nG1 Z+0.5 X-20 Y-20 F300 ; move Z down then move print head a bit out of the way\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nG90 ; Absolute positioning\nG92 E0.0 ; Reset extruder position\nM84 ; Turn steppers off\nM117 BIBO Print complete ; Put print complete message on screen thumbnails = toolchange_gcode = @@ -821,7 +840,7 @@ deretract_speed = 0 # Setting this value to 0 uses the retract speed retract_before_wipe = 100% default_print_profile = 0.20mm NORMAL @BIBO2 default_filament_profile = Generic PLA @BIBO2 -start_gcode = ;Start code PrusaSlicer BIBO 2 printers E2 only (i.e. T1)\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM140 S{first_layer_bed_temperature[0] - 5} ; set bed temp\nM105 ; Report Temperatures\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp\nM104 S{first_layer_temperature[0] * 0.791} T0 ; set 1st nozzle heater to 79.1 percent standby temp\nM104 S{first_layer_temperature[0]} T1 ; set 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0] * 0.791} T0 ; set 1st nozzle heater to 79.1 percent standby temp\nM109 S{first_layer_temperature[0]} T1 ; Wait for 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Z2 F400 ; move the print bed down 2mm\nT0 ; switch to tool position T0\nG90 ; absolute positioning\nG92 E0.0 ; zero the current extruder coordinate\nG28 ; Home all axis\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nT1 ; switch to tool position T1\nG92 E0.0 ; zero the current extruder coordinate\nM117 E2 nozzle wipe... ; Put Nozzle wipe message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder coordinate to zero before printing\nM117 BIBO Now Printing from E2... ; Put now printing message on screen +start_gcode = ;Start code PrusaSlicer BIBO 2 printers E2 only (i.e. T1)\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM140 S{first_layer_bed_temperature[0] - 5} ; set bed temp\nM105 ; Report Temperatures\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp\nM104 S{first_layer_temperature[0] * 0.791} T0 ; set 1st nozzle heater to 79.1 percent standby temp\nM104 S{first_layer_temperature[0]} T1 ; set 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0] * 0.791} T0 ; set 1st nozzle heater to 79.1 percent standby temp\nM109 S{first_layer_temperature[0]} T1 ; Wait for 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nT0 ; switch to tool position T0\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Z2 F400 ; move the print bed down 2mm\nG92 E0.0 ; zero the current extruder coordinate\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nT1 ; switch to tool position T1\nG92 E0.0 ; zero the current extruder coordinate\nM117 E2 nozzle wipe... ; Put Nozzle wipe message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder coordinate to zero before printing\nM117 BIBO Now Printing from E2... ; Put now printing message on screen end_gcode = ;BIBO End GCode\nM107 ; turn fans off\nG91 ; Relative positioning\nG1 Z1 F100\nM140 S0 ; Disable heated bed\nM104 T0 S0 ; extruder T0 heater off\nM104 T1 S0 ; extruder T1 heater off\nG1 Z+0.5 X-20 Y-20 F300 ; move Z down then move print head a bit out of the way\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nG90 ; Absolute positioning\nG92 E0.0 ; Reset extruder position\nM84 ; Turn steppers off\nM117 BIBO Print complete ; Put print complete message on screen thumbnails = toolchange_gcode = @@ -838,7 +857,7 @@ bed_shape = 0x-93,33x-93,33x93,0x93 #bed_model = BIBO2_bed.stl #bed_texture = BIBO2.svg before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nM104 S{temperature[0]} T1 ; set 2nd nozzle heater to print temperature\nG92 E0\n -start_gcode = ;Start code PrusaSlicer BIBO 2 printers E1 only (i.e. T0)\nM420 S1 ; Turn on Ditto Printing\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temp\nM140 S{first_layer_bed_temperature[0]} ; continue bed heating to full temp while other things are happening\nM104 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to first layer temperature\nM104 S{first_layer_temperature[0]} T1 ; set 2nd nozzle heater to same first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0 ; wait for 1st nozzle heat to first layer temperature\nM109 S{first_layer_temperature[0]} T1 ; wait for 2nd nozzle heat to same first layer temperature\nM105 ; Report Temperatures\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Y0 F1200 E0 ; move Y to min endstop and extrude 0 filament\nT[initial_tool] ; switch to initial tool position\nG92 E0.0 ; reset extruder\nG28 ; Home all axis\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nM117 Cleaning... ; Put Cleaning message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder and zero the current extruder coordinate before printing\nM117 BIBO E1 now Printing... ; Put now printing message on screen +start_gcode = ;Start code PrusaSlicer BIBO 2 printers E1 only (i.e. T0)\nM420 S1 ; Turn on Ditto Printing\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temp\nM140 S{first_layer_bed_temperature[0]} ; continue bed heating to full temp while other things are happening\nM104 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to first layer temperature\nM104 S{first_layer_temperature[0]} T1 ; set 2nd nozzle heater to same first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0 ; wait for 1st nozzle heat to first layer temperature\nM109 S{first_layer_temperature[0]} T1 ; wait for 2nd nozzle heat to same first layer temperature\nM105 ; Report Temperatures\nT0 ; Start at T0 to avoid extruder nozzle offset issues\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Y0 F1200 E0 ; move Y to min endstop and extrude 0 filament\nT[initial_tool] ; switch to initial tool position\nG92 E0.0 ; reset extruder\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nM117 Cleaning... ; Put Cleaning message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder and zero the current extruder coordinate before printing\nM117 BIBO E1 now Printing... ; Put now printing message on screen end_gcode = ;BIBO End GCode\nM107 ; turn fans off\nG91 ; Relative positioning\nG1 Z1 F100\nM140 S0 ; Disable heated bed\nM104 T0 S0 ; extruder T0 heater off\nM104 T1 S0 ; extruder T1 heater off\nG1 Z+0.5 X-20 Y-20 F300 ; move Z down then move print head a bit out of the way\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nG90 ; Absolute positioning\nG92 E0.0 ; Reset extruder position\nM84 ; Turn steppers off\nM420 S0 ; Turn off Ditto Printing function\nM117 BIBO Print complete ; Put print complete message on screen [printer:BIBO2 E2 left E1 Ditto] @@ -849,5 +868,5 @@ bed_shape = -33x-93,0x-93,0x93,-33x93 #bed_model = BIBO2_bed.stl #bed_texture = BIBO2.svg before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nM104 S{temperature[0]} T0 ; set 1st nozzle heater to print temperature\nG92 E0\n -start_gcode = ;Start code PrusaSlicer BIBO 2 printers E2 only (i.e. T1)\nM420 S1 ; Turn on Ditto Printing\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM140 S{first_layer_bed_temperature[0] - 5} ; set bed temp\nM105 ; Report Temperatures\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp\nM104 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to ditto print temperature\nM104 S{first_layer_temperature[0]} T1 ; set 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to ditto printing temperature\nM109 S{first_layer_temperature[0]} T1 ; Wait for 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Z2 F400 ; move the print bed down 2mm\nT0 ; switch to tool position T0\nG90 ; absolute positioning\nG92 E0.0 ; zero the current extruder coordinate\nG28 ; Home all axis\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nT1 ; switch to tool position T1\nG92 E0.0 ; zero the current extruder coordinate\nM117 E2 nozzle wipe... ; Put Nozzle wipe message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder coordinate to zero before printing\nM117 BIBO Now Printing from E2... ; Put now printing message on screen +start_gcode = ;Start code PrusaSlicer BIBO 2 printers E2 only (i.e. T1)\nM420 S1 ; Turn on Ditto Printing\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM140 S{first_layer_bed_temperature[0] - 5} ; set bed temp\nM105 ; Report Temperatures\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp\nM104 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to ditto print temperature\nM104 S{first_layer_temperature[0]} T1 ; set 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to ditto printing temperature\nM109 S{first_layer_temperature[0]} T1 ; Wait for 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nT0 ; Start at T0 to avoid extruder nozzle offset issues\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Z2 F400 ; move the print bed down 2mm\nG92 E0.0 ; zero the current extruder coordinate\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nT1 ; switch to tool position T1\nG92 E0.0 ; zero the current extruder coordinate\nM117 E2 nozzle wipe... ; Put Nozzle wipe message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder coordinate to zero before printing\nM117 BIBO Now Printing from E2... ; Put now printing message on screen end_gcode = ;BIBO End GCode\nM107 ; turn fans off\nG91 ; Relative positioning\nG1 Z1 F100\nM140 S0 ; Disable heated bed\nM104 T0 S0 ; extruder T0 heater off\nM104 T1 S0 ; extruder T1 heater off\nG1 Z+0.5 X-20 Y-20 F300 ; move Z down then move print head a bit out of the way\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nG90 ; Absolute positioning\nG92 E0.0 ; Reset extruder position\nM84 ; Turn steppers off\nM420 S0 ; Turn off Ditto Printing function\nM117 BIBO Print complete ; Put print complete message on screen diff --git a/src/libslic3r/Layer.cpp b/src/libslic3r/Layer.cpp index 378352be7..36716dde9 100644 --- a/src/libslic3r/Layer.cpp +++ b/src/libslic3r/Layer.cpp @@ -556,6 +556,9 @@ void Layer::sort_perimeters_into_islands( // If the current layer consists of multiple regions, then the fill_expolygons above are split by the source LayerRegion surfaces. const std::vector &layer_region_ids) { + assert(perimeter_and_gapfill_ranges.size() == fill_expolygons_ranges.size()); + assert(! layer_region_ids.empty()); + LayerRegion &this_layer_region = *m_regions[region_id]; // Bounding boxes of fill_expolygons. @@ -564,7 +567,6 @@ void Layer::sort_perimeters_into_islands( for (const ExPolygon &expolygon : fill_expolygons) fill_expolygons_bboxes.emplace_back(get_extents(expolygon)); - // Take one sample point for each source slice, to be used to sort source slices into layer slices. // source slice index + its sample. std::vector> perimeter_slices_queue; @@ -619,7 +621,11 @@ void Layer::sort_perimeters_into_islands( // Map of source fill_expolygon into region and fill_expolygon of that region. // -1: not set - std::vector> map_expolygon_to_region_and_fill; + struct RegionWithFillIndex { + int region_id{ -1 }; + int fill_in_region_id{ -1 }; + }; + std::vector map_expolygon_to_region_and_fill; const bool has_multiple_regions = layer_region_ids.size() > 1; assert(has_multiple_regions || layer_region_ids.size() == 1); // assign fill_surfaces to each layer @@ -633,7 +639,7 @@ void Layer::sort_perimeters_into_islands( const BoundingBox &bbr = fill_expolygons_bboxes[rhs]; return bbl.min < bbr.min || (bbl.min == bbr.min && bbl.max < bbr.max); }); - map_expolygon_to_region_and_fill.assign(fill_expolygons.size(), std::make_pair(-1, -1)); + map_expolygon_to_region_and_fill.assign(fill_expolygons.size(), {}); for (uint32_t region_idx : layer_region_ids) { LayerRegion &l = *m_regions[region_idx]; l.m_fill_expolygons = intersection_ex(l.slices().surfaces, fill_expolygons); @@ -649,23 +655,80 @@ void Layer::sort_perimeters_into_islands( if (uint32_t fill_id = *it_bbox; fill_expolygons_bboxes[fill_id] == bbox) { // With a very high probability the two expolygons match exactly. Confirm that. if (expolygons_match(expolygon, fill_expolygons[fill_id])) { - std::pair &ref = map_expolygon_to_region_and_fill[fill_id]; + RegionWithFillIndex &ref = map_expolygon_to_region_and_fill[fill_id]; // Only one expolygon produced by intersection with LayerRegion surface may match an expolygon of fill_expolygons. - assert(ref.first == -1); - ref.first = region_idx; - ref.second = int(&expolygon - l.fill_expolygons().data()); + assert(ref.region_id == -1 && ref.fill_in_region_id == -1); + ref.region_id = region_idx; + ref.fill_in_region_id = int(&expolygon - l.fill_expolygons().data()); } } } } + // Check whether any island contains multiple fills that fall into the same region, but not they are not contiguous. + // If so, sort fills in that particular region so that fills of an island become contiguous. + // Index of a region to sort. + int sort_region_id = -1; + // Temporary vector of fills for reordering. + ExPolygons fills_temp; + // Vector of new positions of the above. + std::vector new_positions; + do { + sort_region_id = -1; + for (size_t source_slice_idx = 0; source_slice_idx < fill_expolygons_ranges.size(); ++ source_slice_idx) + if (ExPolygonRange fill_range = fill_expolygons_ranges[source_slice_idx]; fill_range.size() > 1) { + // More than one expolygon exists for a single island. Check whether they are contiguous inside a single LayerRegion::fill_expolygons() vector. + uint32_t fill_idx = *fill_range.begin(); + if (const int fill_regon_id = map_expolygon_to_region_and_fill[fill_idx].region_id; fill_regon_id != -1) { + int fill_in_region_id = map_expolygon_to_region_and_fill[fill_idx].fill_in_region_id; + bool needs_sorting = false; + for (++ fill_idx; fill_idx != *fill_range.end(); ++ fill_idx) { + if (const RegionWithFillIndex &ref = map_expolygon_to_region_and_fill[fill_idx]; ref.region_id != fill_regon_id) { + // This island has expolygons split among multiple regions. + needs_sorting = false; + break; + } else if (ref.fill_in_region_id != ++ fill_in_region_id) { + // This island has all expolygons stored inside the same region, but not sorted. + needs_sorting = true; + } + } + if (needs_sorting) { + sort_region_id = fill_regon_id; + break; + } + } + } + if (sort_region_id != -1) { + // Reorder fills in region with sort_region index. + LayerRegion &layerm = *m_regions[sort_region_id]; + new_positions.assign(layerm.fill_expolygons().size(), -1); + int last = 0; + for (RegionWithFillIndex &ref : map_expolygon_to_region_and_fill) + if (ref.region_id == sort_region_id) { + new_positions[ref.fill_in_region_id] = last; + ref.fill_in_region_id = last ++; + } + for (auto &new_pos : new_positions) + if (new_pos == -1) + // Not referenced by any map_expolygon_to_region_and_fill. + new_pos = last ++; + // Move just the content of m_fill_expolygons to fills_temp, but don't move the container vector. + auto &fills = layerm.m_fill_expolygons; + assert(last == int(fills.size())); + fills_temp.reserve(fills.size()); + fills_temp.insert(fills_temp.end(), std::make_move_iterator(fills.begin()), std::make_move_iterator(fills.end())); + for (ExPolygon &ex : fills) + ex.clear(); + // Move / reoder the expolygons back into m_fill_expolygons. + for (size_t old_pos = 0; old_pos < new_positions.size(); ++ old_pos) + fills[new_positions[old_pos]] = std::move(fills_temp[old_pos]); + } + } while (sort_region_id != -1); } else { this_layer_region.m_fill_expolygons = std::move(fill_expolygons); this_layer_region.m_fill_expolygons_bboxes = std::move(fill_expolygons_bboxes); } } - // Sort perimeter extrusions, thin fill extrusions and fill expolygons into islands. - std::vector region_fill_sorted_last; auto insert_into_island = [ // Region where the perimeters, gap fills and fill expolygons are stored. region_id, @@ -678,10 +741,7 @@ void Layer::sort_perimeters_into_islands( // Mapping of fill_expolygon to region and its infill. &map_expolygon_to_region_and_fill, // Output - ®ions = m_regions, &lslices_ex = this->lslices_ex, - // fill_expolygons and fill_expolygons_bboxes need to be sorted into contiguous sequence by island, - // thus region_fill_sorted_last contains last fill_expolygon processed (meaning sorted). - ®ion_fill_sorted_last] + ®ions = m_regions, &lslices_ex = this->lslices_ex] (int lslice_idx, int source_slice_idx) { lslices_ex[lslice_idx].islands.push_back({}); LayerIsland &island = lslices_ex[lslice_idx].islands.back(); @@ -692,12 +752,12 @@ void Layer::sort_perimeters_into_islands( // Check whether the fill expolygons of this island were split into multiple regions. island.fill_region_id = LayerIsland::fill_region_composite_id; for (uint32_t fill_idx : fill_range) { - const std::pair &kvp = map_expolygon_to_region_and_fill[fill_idx]; - if (kvp.first == -1 || (island.fill_region_id != -1 && island.fill_region_id != kvp.second)) { + if (const int fill_regon_id = map_expolygon_to_region_and_fill[fill_idx].region_id; + fill_regon_id == -1 || (island.fill_region_id != LayerIsland::fill_region_composite_id && island.fill_region_id != fill_regon_id)) { island.fill_region_id = LayerIsland::fill_region_composite_id; break; } else - island.fill_region_id = kvp.second; + island.fill_region_id = fill_regon_id; } if (island.fill_expolygons_composite()) { // They were split, thus store the unsplit "composite" expolygons into the region of perimeters. @@ -709,23 +769,10 @@ void Layer::sort_perimeters_into_islands( fill_expolygons_bboxes.begin() + *fill_range.begin(), fill_expolygons_bboxes.begin() + *fill_range.end()); island.fill_expolygons = ExPolygonRange(begin, uint32_t(this_layer_region.fill_expolygons_composite().size())); } else { - if (region_fill_sorted_last.empty()) - region_fill_sorted_last.assign(regions.size(), 0); - uint32_t &last = region_fill_sorted_last[island.fill_region_id]; - // They were not split and they belong to the same region. - // Sort the region m_fill_expolygons to a continuous span. - uint32_t begin = last; - LayerRegion &layerm = *regions[island.fill_region_id]; - for (uint32_t fill_id : fill_range) { - uint32_t region_fill_id = map_expolygon_to_region_and_fill[fill_id].second; - assert(region_fill_id >= last); - if (region_fill_id > last) { - std::swap(layerm.m_fill_expolygons[region_fill_id], layerm.m_fill_expolygons[last]); - std::swap(layerm.m_fill_expolygons_bboxes[region_fill_id], layerm.m_fill_expolygons_bboxes[last]); - } - ++ last; - } - island.fill_expolygons = ExPolygonRange(begin, last); + // All expolygons are stored inside a single LayerRegion in a contiguous range. + island.fill_expolygons = ExPolygonRange( + map_expolygon_to_region_and_fill[*fill_range.begin()].fill_in_region_id, + map_expolygon_to_region_and_fill[*fill_range.end() - 1].fill_in_region_id + 1); } } else { // Layer island is made of one fill region only. diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 1f3066147..bdc51dea6 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -676,25 +676,61 @@ bool paths_touch(const ExtrusionPath &path_one, const ExtrusionPath &path_two, d ExtrusionPaths reconnect_extrusion_paths(const ExtrusionPaths& paths, double limit_distance) { if (paths.empty()) return paths; - ExtrusionPaths result; - result.push_back(paths.front()); - for (size_t pidx = 1; pidx < paths.size(); pidx++) { - if ((result.back().last_point() - paths[pidx].first_point()).cast().squaredNorm() < limit_distance * limit_distance) { - result.back().polyline.points.insert(result.back().polyline.points.end(), paths[pidx].polyline.points.begin(), - paths[pidx].polyline.points.end()); - } else { - result.push_back(paths[pidx]); + + std::unordered_map connected; + connected.reserve(paths.size()); + for (size_t i = 0; i < paths.size(); i++) { + if (!paths[i].empty()) { + connected.emplace(i, paths[i]); } } + + for (size_t a = 0; a < paths.size(); a++) { + if (connected.find(a) == connected.end()) { + continue; + } + ExtrusionPath &base = connected.at(a); + for (size_t b = a + 1; b < paths.size(); b++) { + if (connected.find(b) == connected.end()) { + continue; + } + ExtrusionPath &next = connected.at(b); + if ((base.last_point() - next.first_point()).cast().squaredNorm() < limit_distance * limit_distance) { + base.polyline.append(std::move(next.polyline)); + connected.erase(b); + } else if ((base.last_point() - next.last_point()).cast().squaredNorm() < limit_distance * limit_distance) { + base.polyline.points.insert(base.polyline.points.end(), next.polyline.points.rbegin(), next.polyline.points.rend()); + connected.erase(b); + } else if ((base.first_point() - next.last_point()).cast().squaredNorm() < limit_distance * limit_distance) { + next.polyline.append(std::move(base.polyline)); + base = std::move(next); + base.reverse(); + connected.erase(b); + } else if ((base.first_point() - next.first_point()).cast().squaredNorm() < limit_distance * limit_distance) { + base.reverse(); + base.polyline.append(std::move(next.polyline)); + base.reverse(); + connected.erase(b); + } + } + } + + ExtrusionPaths result; + for (auto& ext : connected) { + result.push_back(std::move(ext.second)); + } + return result; } -ExtrusionPaths sort_and_connect_extra_perimeters(const std::vector &extra_perims, double touch_distance) +ExtrusionPaths sort_and_connect_extra_perimeters(const std::vector &extra_perims, double extrusion_spacing) { std::vector connected_shells; - for (const ExtrusionPaths& ps : extra_perims) { - connected_shells.push_back(reconnect_extrusion_paths(ps, touch_distance)); + connected_shells.reserve(extra_perims.size()); + for (const ExtrusionPaths &ps : extra_perims) { + connected_shells.push_back(reconnect_extrusion_paths(ps, 1.0 * extrusion_spacing)); } + struct Pidx { size_t shell; @@ -708,8 +744,6 @@ ExtrusionPaths sort_and_connect_extra_perimeters(const std::vector, PidxHash>> dependencies; for (size_t shell = 0; shell < connected_shells.size(); shell++) { dependencies.push_back({}); @@ -719,29 +753,37 @@ ExtrusionPaths sort_and_connect_extra_perimeters(const std::vector current_dependencies{}; if (shell > 0) { for (const auto &prev_path : dependencies[shell - 1]) { - if (paths_touch(get_path(current_path), get_path(prev_path.first), touch_distance)) { + if (paths_touch(get_path(current_path), get_path(prev_path.first), extrusion_spacing * 2.0)) { current_dependencies.insert(prev_path.first); }; } - current_shell[current_path] = current_dependencies; - if (!any_point_found) { - current_point = get_path(current_path).first_point(); - any_point_found = true; - } } + current_shell[current_path] = current_dependencies; } } + Point current_point{}; + for (const ExtrusionPaths &ps : connected_shells) { + for (const ExtrusionPath &p : ps) { + if (!p.empty()) { + current_point = p.first_point(); + goto first_point_found; + } + } + } +first_point_found: + ExtrusionPaths sorted_paths{}; - Pidx npidx = Pidx{size_t(-1), 0}; - Pidx next_pidx = npidx; - bool reverse = false; + Pidx npidx = Pidx{size_t(-1), 0}; + Pidx next_pidx = npidx; + bool reverse = false; while (true) { if (next_pidx == npidx) { // find next pidx to print double dist = std::numeric_limits::max(); for (size_t shell = 0; shell < dependencies.size(); shell++) { for (const auto &p : dependencies[shell]) { - if (!p.second.empty()) continue; + if (!p.second.empty()) + continue; const auto &path = get_path(p.first); double dist_a = (path.first_point() - current_point).cast().squaredNorm(); if (dist_a < dist) { @@ -757,14 +799,21 @@ ExtrusionPaths sort_and_connect_extra_perimeters(const std::vector().squaredNorm(); + if (!p.second.empty()) + continue; + const ExtrusionPath &next_path = get_path(p.first); + double dist_a = (next_path.first_point() - current_point).cast().squaredNorm(); if (dist_a < dist) { dist = dist_a; next_pidx = p.first; @@ -789,17 +839,19 @@ ExtrusionPaths sort_and_connect_extra_perimeters(const std::vector scaled(5.0)){ + if (dist > scaled(5.0)) { next_pidx = npidx; } } } - ExtrusionPaths reconnected = reconnect_extrusion_paths(sorted_paths, touch_distance); + ExtrusionPaths reconnected = reconnect_extrusion_paths(sorted_paths, extrusion_spacing * 2.0); ExtrusionPaths filtered; filtered.reserve(reconnected.size()); for (ExtrusionPath &p : reconnected) { - if (p.length() > touch_distance) { filtered.push_back(p); } + if (p.length() > 3 * extrusion_spacing) { + filtered.push_back(p); + } } return filtered; @@ -936,7 +988,7 @@ std::tuple, Polygons> generate_extra_perimeters_over perimeter_polygon = intersection(offset(perimeter_polygon, -overhang_flow.scaled_spacing()), expanded_overhang_to_cover); if (perimeter_polygon.empty()) { // fill possible gaps of single extrusion width - Polygons shrinked = offset(prev, -0.4 * overhang_flow.scaled_spacing()); + Polygons shrinked = intersection(offset(prev, -0.3 * overhang_flow.scaled_spacing()), expanded_overhang_to_cover); if (!shrinked.empty()) { overhang_region.emplace_back(); extrusion_paths_append(overhang_region.back(), perimeter, ExtrusionRole::OverhangPerimeter, overhang_flow.mm3_per_mm(), @@ -944,15 +996,13 @@ std::tuple, Polygons> generate_extra_perimeters_over } Polylines fills; - ExPolygons gap = shrinked.empty() ? offset_ex(prev, overhang_flow.scaled_spacing() * 0.5) : - offset_ex(prev, -overhang_flow.scaled_spacing() * 0.5); + ExPolygons gap = shrinked.empty() ? offset_ex(prev, overhang_flow.scaled_spacing() * 0.5) : to_expolygons(shrinked); - //gap = expolygons_simplify(gap, overhang_flow.scaled_spacing()); for (const ExPolygon &ep : gap) { - ep.medial_axis(0.3 * overhang_flow.scaled_width(), overhang_flow.scaled_spacing() * 2.0, &fills); + ep.medial_axis(0.75 * overhang_flow.scaled_width(), 3.0 * overhang_flow.scaled_spacing(), &fills); } if (!fills.empty()) { - fills = intersection_pl(fills, inset_overhang_area); + fills = intersection_pl(fills, shrinked_overhang_to_cover); overhang_region.emplace_back(); extrusion_paths_append(overhang_region.back(), fills, ExtrusionRole::OverhangPerimeter, overhang_flow.mm3_per_mm(), overhang_flow.width(), overhang_flow.height()); @@ -981,9 +1031,11 @@ std::tuple, Polygons> generate_extra_perimeters_over } } Polylines perimeter = intersection_pl(to_polylines(perimeter_polygon), shrinked_overhang_to_cover); - overhang_region.emplace_back(); - extrusion_paths_append(overhang_region.back(), perimeter, ExtrusionRole::OverhangPerimeter, overhang_flow.mm3_per_mm(), - overhang_flow.width(), overhang_flow.height()); + if (!perimeter.empty()) { + overhang_region.emplace_back(); + extrusion_paths_append(overhang_region.back(), perimeter, ExtrusionRole::OverhangPerimeter, overhang_flow.mm3_per_mm(), + overhang_flow.width(), overhang_flow.height()); + } perimeter_polygon = expand(perimeter_polygon, 0.5 * overhang_flow.scaled_spacing()); perimeter_polygon = union_(perimeter_polygon, anchoring); @@ -1006,7 +1058,7 @@ std::tuple, Polygons> generate_extra_perimeters_over std::vector result{}; for (const std::vector &paths : extra_perims) { - result.push_back(sort_and_connect_extra_perimeters(paths, 2.0 * overhang_flow.scaled_spacing())); + result.push_back(sort_and_connect_extra_perimeters(paths, overhang_flow.scaled_spacing())); } #ifdef EXTRA_PERIM_DEBUG_FILES diff --git a/src/libslic3r/SupportSpotsGenerator.cpp b/src/libslic3r/SupportSpotsGenerator.cpp index 295d3fe07..33dce04a2 100644 --- a/src/libslic3r/SupportSpotsGenerator.cpp +++ b/src/libslic3r/SupportSpotsGenerator.cpp @@ -659,7 +659,10 @@ std::tuple build_object_part_from_slice(const size_t &slice_i if (params.brim_type == BrimType::btOuterAndInner || params.brim_type == BrimType::btOuterOnly) { Polygon brim_hole = slice_poly.contour; brim_hole.reverse(); - brim.push_back(ExPolygon{expand(slice_poly.contour, scale_(params.brim_width)).front(), brim_hole}); + Polygons c = expand(slice_poly.contour, scale_(params.brim_width)); // For very small polygons, the expand may result in empty vector, even thought the input is correct. + if (!c.empty()) { + brim.push_back(ExPolygon{c.front(), brim_hole}); + } } if (params.brim_type == BrimType::btOuterAndInner || params.brim_type == BrimType::btInnerOnly) { Polygons brim_contours = slice_poly.holes; @@ -1182,7 +1185,8 @@ std::vector> gather_issues(const SupportPoint std::sort(partial_objects.begin(), partial_objects.end(), [](const PartialObject &left, const PartialObject &right) { return left.volume > right.volume; }); - float max_volume_part = partial_objects.front().volume; + // Object may have zero extrusions and thus no partial objects. (e.g. very tiny object) + float max_volume_part = partial_objects.empty() ? 0.0f : partial_objects.front().volume; for (const PartialObject &p : partial_objects) { if (p.volume > max_volume_part / 200.0f && !p.connected_to_bed) { result.emplace_back(SupportPointCause::UnstableFloatingPart, true); diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 7312297b7..b00688059 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -2270,7 +2270,14 @@ bool GUI_App::load_language(wxString language, bool initial) } #endif +#ifdef __APPLE__ + // ysFIXME after fix for wxWidgets issue (https://github.com/wxWidgets/wxWidgets/issues/23209) + // Workaround for wxLANGUAGE_CHINESE(...) languages => Allow to continue even if wxLocale is not available. + // Because of translation will works fine, just locales will set to EN + if (! wxLocale::IsAvailable(language_info->Language) && language_info->CanonicalName.BeforeFirst('_') != "zh" ) { +#else if (! wxLocale::IsAvailable(language_info->Language)) { +#endif // Loading the language dictionary failed. wxString message = "Switching PrusaSlicer to language " + language_info->CanonicalName + " failed."; #if !defined(_WIN32) && !defined(__APPLE__) @@ -2295,10 +2302,11 @@ bool GUI_App::load_language(wxString language, bool initial) // to load possibly different dictionary, for example, load Czech dictionary for Slovak language. wxTranslations::Get()->SetLanguage(language_dict); { + // ysFIXME after fix for wxWidgets issue (https://github.com/wxWidgets/wxWidgets/issues/23210) // UKR Localization specific workaround till the wxWidgets doesn't fixed: // From wxWidgets 3.1.6 calls setlocation(0, wxInfoLanguage->LocaleTag), see (https://github.com/prusa3d/wxWidgets/commit/deef116a09748796711d1e3509965ee208dcdf0b#diff-7de25e9a71c4dce61bbf76492c589623d5b93fd1bb105ceaf0662075d15f4472), // where LocaleTag is a Tag of locale in BCP 47 - like notation. - // For Ukrainian Language LocaleTag == "uk". + // For Ukrainian Language LocaleTag is "uk". // But setlocale(0, "uk") returns "English_United Kingdom.1252" instead of "uk", // and, as a result, locales are set to English_United Kingdom