Merge branch 'master' into et_tm_sla_volumes_6-SPE-1285

This commit is contained in:
tamasmeszaros 2023-01-17 14:48:37 +01:00
commit 57bdd8df6f
64 changed files with 2056 additions and 696 deletions

View File

@ -13,8 +13,8 @@ if (UNIX AND NOT APPLE) # wxWidgets will not use char as the underlying type for
endif()
prusaslicer_add_cmake_project(wxWidgets
URL https://github.com/prusa3d/wxWidgets/archive/34b524f8d5134a40a90d93a16360d533af2676ae.zip
URL_HASH SHA256=e76ca0dd998905c4dbb86f41f264e6e0468504dc2398f7e7e3bba8dc37de2f45
URL https://github.com/prusa3d/wxWidgets/archive/9c12f4f269e545bacc7a6418bc82bf10db5842a6.zip
URL_HASH SHA256=901ae1148855507968d5ecd09b5a6ce2e24400f77ba67467165c55053ac213fd
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG dep_NanoSVG
CMAKE_ARGS
-DwxBUILD_PRECOMP=ON

View File

@ -0,0 +1,2 @@
min_slic3r_version = 2.6.0-alpha1
0.1.0 Initial version

437
resources/profiles/BIQU.ini Normal file
View File

@ -0,0 +1,437 @@
# Print profiles for BIQU printers.
# Based on PR https://github.com/slic3r/slic3r-profiles/pull/32 by @bkonosky
[vendor]
name = BIQU
config_version = 0.1.0
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/BIQU/
# 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:BIQUBX]
name = BIQU BX
variants = 0.4
technology = FFF
bed_model = BX_Bed.stl
bed_texture = BX_Texture.png
default_materials = Generic PLA @BIQU; Generic PETG @BIQU; Generic ABS @BIQU
# 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
bottom_fill_pattern = monotonic
bridge_angle = 0
bridge_flow_ratio = 0.95
bridge_speed = 25
brim_width = 0
clip_multipart_objects = 1
complete_objects = 0
bridge_acceleration = 250
perimeter_acceleration = 500
infill_acceleration = 500
first_layer_acceleration = 500
default_acceleration = 500
dont_support_bridges = 1
ensure_vertical_shell_thickness = 1
external_perimeters_first = 0
external_perimeter_speed = 25
extra_perimeters = 0
extruder_clearance_height = 34
extruder_clearance_radius = 47
fill_angle = 45
fill_density = 15%
fill_pattern = gyroid
first_layer_height = 0.2
elefant_foot_compensation = 0.1
first_layer_speed = 20
gap_fill_speed = 30
gcode_comments = 0
infill_every_layers = 1
infill_extruder = 1
infill_first = 0
infill_only_where_needed = 0
infill_overlap = 25%
infill_speed = 50
interface_shells = 0
max_print_speed = 100
max_volumetric_extrusion_rate_slope_negative = 0
max_volumetric_extrusion_rate_slope_positive = 0
max_volumetric_speed = 0
min_skirt_length = 4
notes =
only_retract_when_crossing_perimeters = 0
ooze_prevention = 0
output_filename_format = {input_filename_base}_{print_time}_{digits(layer_height,1,2)}mm_{temperature[0]}C_{filament_type[0]}_{printer_model}.gcode
perimeters = 2
perimeter_extruder = 1
perimeter_speed = 40
raft_layers = 0
seam_position = nearest
single_extruder_multi_material_priming = 0
skirts = 1
skirt_distance = 3
skirt_height = 2
small_perimeter_speed = 25
solid_infill_below_area = 0
solid_infill_every_layers = 0
solid_infill_extruder = 1
solid_infill_speed = 40
spiral_vase = 0
standby_temperature_delta = -5
support_material = 0
support_material_extruder = 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.15
support_material_bottom_contact_distance = 0.15
support_material_interface_contact_loops = 0
support_material_interface_layers = 2
support_material_interface_pattern = rectilinear
support_material_interface_spacing = 0.2
support_material_interface_speed = 100%
support_material_pattern = rectilinear
support_material_solid_first_layer = 1
support_material_spacing = 2
support_material_speed = 40
support_material_synchronize_layers = 0
support_material_threshold = 40
support_material_with_sheath = 0
support_material_xy_spacing = 60%
thin_perimeters = 1
thin_walls = 1
top_fill_pattern = monotonic
top_solid_infill_speed = 30
travel_speed = 150
wipe_tower = 1
wipe_tower_bridging = 10
wipe_tower_rotation_angle = 0
wipe_tower_width = 60
wipe_tower_x = 160
wipe_tower_y = 160
xy_size_compensation = 0
extrusion_width = 0.45
external_perimeter_extrusion_width = 0.43
first_layer_extrusion_width = 0.55
support_material_extrusion_width = 0.38
top_infill_extrusion_width = 0.43
[print:*0.08mm*]
inherits = *common*
layer_height = 0.08
perimeters = 3
bottom_solid_layers = 9
top_solid_layers = 11
bridge_flow_ratio = 0.7
[print:*0.10mm*]
inherits = *common*
layer_height = 0.10
perimeters = 3
bottom_solid_layers = 7
top_solid_layers = 9
bridge_flow_ratio = 0.7
[print:*0.12mm*]
inherits = *common*
layer_height = 0.12
perimeters = 3
bottom_solid_layers = 6
top_solid_layers = 7
bridge_flow_ratio = 0.7
[print:*0.16mm*]
inherits = *common*
layer_height = 0.16
bottom_solid_layers = 5
top_solid_layers = 7
bridge_flow_ratio = 0.85
[print:*0.20mm*]
inherits = *common*
layer_height = 0.20
bottom_solid_layers = 4
top_solid_layers = 5
[print:*0.24mm*]
inherits = *common*
layer_height = 0.24
bottom_solid_layers = 3
top_solid_layers = 4
[print:*0.28mm*]
inherits = *common*
layer_height = 0.28
bottom_solid_layers = 3
top_solid_layers = 4
[print:*0.32mm*]
inherits = *common*
layer_height = 0.32
bottom_solid_layers = 3
top_solid_layers = 4
[print:0.08mm HIGHDETAIL @BIQU]
inherits = *0.08mm*
compatible_printers_condition = printer_model=~/(BIQUBX).*/
[print:0.10mm HIGHDETAIL @BIQU]
inherits = *0.10mm*
compatible_printers_condition = printer_model=~/(BIQUBX).*/
[print:0.12mm DETAIL @BIQU]
inherits = *0.12mm*
compatible_printers_condition = printer_model=~/(BIQUBX).*/
[print:0.16mm OPTIMAL @BIQU]
inherits = *0.16mm*
compatible_printers_condition = printer_model=~/(BIQUBX).*/
[print:0.20mm NORMAL @BIQU]
inherits = *0.20mm*
compatible_printers_condition = printer_model=~/(BIQUBX).*/
[print:0.24mm DRAFT @BIQU]
inherits = *0.24mm*
compatible_printers_condition = printer_model=~/(BIQUBX).*/
[print:0.28mm SUPERDRAFT @BIQU]
inherits = *0.28mm*
compatible_printers_condition = printer_model=~/(BIQUBX).*/
[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
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_BIQU.*/
[filament:*PLA*]
inherits = *common*
bed_temperature = 60
fan_below_layer_time = 100
filament_colour = #DDDDDD
filament_max_volumetric_speed = 15
filament_type = PLA
filament_density = 1.24
filament_cost = 20
first_layer_bed_temperature = 60
first_layer_temperature = 210
fan_always_on = 1
cooling = 1
max_fan_speed = 100
min_fan_speed = 100
bridge_fan_speed = 100
disable_fan_first_layers = 1
temperature = 205
[filament:*PET*]
inherits = *common*
bed_temperature = 70
cooling = 1
disable_fan_first_layers = 3
fan_below_layer_time = 20
filament_colour = #DDDDDD
filament_max_volumetric_speed = 8
filament_type = PETG
filament_density = 1.27
filament_cost = 30
first_layer_bed_temperature = 70
first_layer_temperature = 240
fan_always_on = 1
max_fan_speed = 50
min_fan_speed = 20
bridge_fan_speed = 100
temperature = 240
[filament:*ABS*]
inherits = *common*
bed_temperature = 100
cooling = 0
disable_fan_first_layers = 3
fan_below_layer_time = 20
filament_colour = #DDDDDD
filament_max_volumetric_speed = 11
filament_type = ABS
filament_density = 1.04
filament_cost = 20
first_layer_bed_temperature = 100
first_layer_temperature = 245
fan_always_on = 0
max_fan_speed = 0
min_fan_speed = 0
bridge_fan_speed = 30
top_fan_speed = 0
temperature = 245
[filament:Generic PLA @BIQU]
inherits = *PLA*
filament_vendor = Generic
[filament:Generic PETG @BIQU]
inherits = *PET*
filament_vendor = Generic
[filament:Generic ABS @BIQU]
inherits = *ABS*
first_layer_bed_temperature = 90
bed_temperature = 90
filament_vendor = Generic
# Common printer preset
[printer:*common*]
printer_technology = FFF
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;{layer_z}\n\n
between_objects_gcode =
pause_print_gcode =
deretract_speed = 40
extruder_colour = #FCE94F
extruder_offset = 0x0
gcode_flavor = marlin2
silent_mode = 0
remaining_times = 0
machine_max_acceleration_e = 10000
machine_max_acceleration_extruding = 1000
machine_max_acceleration_retracting = 1000
machine_max_acceleration_x = 1000
machine_max_acceleration_y = 1000
machine_max_acceleration_z = 100
machine_max_feedrate_e = 65
machine_max_feedrate_x = 200
machine_max_feedrate_y = 200
machine_max_feedrate_z = 10
machine_max_jerk_e = 5
machine_max_jerk_x = 10
machine_max_jerk_y = 10
machine_max_jerk_z = 2
machine_min_extruding_rate = 0
machine_min_travel_rate = 0
layer_gcode = ;AFTER_LAYER_CHANGE\n;{layer_z}
max_layer_height = 0.28
min_layer_height = 0.08
max_print_height = 250
nozzle_diameter = 0.4
printer_notes =
printer_settings_id =
retract_before_travel = 2
retract_before_wipe = 70%
retract_layer_change = 1
retract_length = 5
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 = 60
single_extruder_multi_material = 0
thumbnails = 16x16,220x124
thumbnails_color = #018aff
thumbnails_custom_color = 0
thumbnails_end_file = 0
thumbnails_format = PNG
thumbnails_with_bed = 0
toolchange_gcode =
use_firmware_retraction = 0
use_relative_e_distances = 0
use_volumetric_e = 0
variable_layer_height = 1
wipe = 1
z_offset = 0
z_step = 0.04
printer_model =
default_print_profile = 0.16mm OPTIMAL @BIQU
default_filament_profile = Generic PLA @BIQU
start_gcode = M117 Initial homing sequence. ; Home so that the probe is positioned to heat\nG28\n\nM117 Probe heating position\nG0 X65 Y5 Z1 ; Move the probe to the heating position.\n\nM117 Getting the heaters up to temp!\nM104 S140 ; Set Extruder temperature, no wait\nM140 S[first_layer_bed_temperature] ; Set Heat Bed temperature\nM190 S[first_layer_bed_temperature] ; Wait for Heat Bed temperature\n\nM117 Waiting for probe to warm!\nG4 S90 ; Wait another 90s for the probe to absorb heat.\n\nM117 Post warming re-home\nG28 ; Home all axes again after warming\n\nM117 Z-Align\nG34\n\nM117 ABL Probing\nG29\n\nM900 K0 L0 T0 ; Edit the K and L values if you have calibrated a k factor for your filament\nM900 T0 S0\n\nG1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed\nG1 X4.1 Y10 Z0.3 F5000.0 ; Move to start position\n\nM117 Getting the extruder up to temp\nM140 S[first_layer_bed_temperature] ; Set Heat Bed temperature\nM104 S{first_layer_temperature[initial_tool]} ; Set Extruder temperature\nM109 S{first_layer_temperature[initial_tool]} ; Wait for Extruder temperature\nM190 S[first_layer_bed_temperature] ; Wait for Heat Bed temperature\n\nG92 E0 ; Reset Extruder\nM117 Purging\nG1 X4.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line\nG1 X4.4 Y200.0 Z0.3 F5000.0 ; Move to side a little\nG1 X4.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line\nG92 E0 ; Reset Extruder\nM117 Printing...\nG1 X8 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
end_gcode = G91 ;Relative positioning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract a bit more and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z by 10mm\nG90 ;Return to absolute positioning\n\nG1 X0 Y{print_bed_max[1]*0.8} ;TaDaaaa\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n
[printer:*spriteextruder*]
retract_length = 0.6
retract_speed = 40
deretract_speed = 40
retract_before_travel = 1
retract_before_wipe = 0%
# Intended for printers with dual extruders and a single hotend/nozzle, like the CR-X series
[printer:*dualextruder*]
single_extruder_multi_material = 1
cooling_tube_length = 5
cooling_tube_retraction = 91.5
extra_loading_move = -2
parking_pos_retraction = 92
deretract_speed = 40,40
extruder_colour = #FCE94F;#729FCF
extruder_offset = 0x0,0x0
max_layer_height = 0.28,0.28
min_layer_height = 0.08,0.08
nozzle_diameter = 0.4,0.4
retract_before_travel = 2,2
retract_before_wipe = 70%,70%
retract_layer_change = 1,1
retract_length = 5,5
retract_length_toolchange = 1,1
retract_lift = 0,0
retract_lift_above = 0,0
retract_lift_below = 0,0
retract_restart_extra = 0,0
retract_restart_extra_toolchange = 0,0
retract_speed = 60,60
wipe = 1,1
[printer:*SmallBowden*]
inherits = *common*
machine_max_acceleration_e = 5000
machine_max_acceleration_extruding = 500
machine_max_acceleration_retracting = 1000
machine_max_acceleration_x = 500
machine_max_acceleration_y = 500
machine_max_acceleration_z = 100
machine_max_feedrate_e = 60
machine_max_feedrate_x = 500
machine_max_feedrate_y = 500
machine_max_feedrate_z = 10
machine_max_jerk_e = 5
machine_max_jerk_x = 8
machine_max_jerk_y = 8
machine_max_jerk_z = 0.4
machine_min_extruding_rate = 0
machine_min_travel_rate = 0
retract_before_travel = 2
retract_length = 5
retract_speed = 60
deretract_speed = 40
retract_before_wipe = 70%
default_filament_profile = Generic PLA @BIQU
[printer:*0.4nozzle*]
nozzle_diameter = 0.4
max_layer_height = 0.32
min_layer_height = 0.04
printer_variant = 0.4
default_print_profile = 0.20mm NORMAL @BIQU
[printer:*BIQU BX*]
inherits = *common*; *spriteextruder*
bed_shape = 0x0,250x0,250x250,0x250
max_print_height = 250
printer_model = BIQUBX
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_BIQU\nPRINTER_MODEL_BIQUBX
[printer:BIQU BX]
inherits = *BIQU BX*; *0.4nozzle*

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1,4 +1,8 @@
min_slic3r_version = 2.6.0-alpha0
0.2.6 Add Ender-5 Pro, Ender-5 S1, Sermoon-V1, Sermoon-V1 Pro. Unlock HIGHSPEED/SUPERSPEED presets for Ender-5 S1/Ender-6/Ender-7.
min_slic3r_version = 2.5.0-alpha0
0.2.4 Add SPEED presets. More conservative extruder clearance.
0.2.3 Improve start_gcode's. Object labeling. MatterHackers filament profiles.
0.2.2 General improvements.
0.2.1 Added Ender 3 Neo and Ender 3 S1 Plus. Various updates.
0.2.0 Added alternative nozzle support

View File

@ -5,7 +5,7 @@
name = Creality
# 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.2.2
config_version = 0.2.6
# Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Creality/
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
@ -131,14 +131,14 @@ bed_model = ender3_bed.stl
bed_texture = ender3.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA Matt @CREALITY; Devil Design PLA Galaxy @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 3DJAKE ecoPLA Matt @CREALITY; 3DJAKE ecoPLA Tough @CREALITY; 123-3D Jupiter PLA @CREALITY; Verbatim PLA @CREALITY
#[printer_model:ENDER5PRO]
#name = Creality Ender-5 Pro
#variants = 0.4; 0.3; 0.5; 0.6
#technology = FFF
#family = ENDER
#bed_model = ender3_bed.stl
#bed_texture = ender3.svg
#default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA Matt @CREALITY; Devil Design PLA Galaxy @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 3DJAKE ecoPLA Matt @CREALITY; 3DJAKE ecoPLA Tough @CREALITY; 123-3D Jupiter PLA @CREALITY; Verbatim PLA @CREALITY
[printer_model:ENDER5PRO]
name = Creality Ender-5 Pro
variants = 0.4; 0.3; 0.5; 0.6
technology = FFF
family = ENDER
bed_model = ender3_bed.stl
bed_texture = ender3.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA Matt @CREALITY; Devil Design PLA Galaxy @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 3DJAKE ecoPLA Matt @CREALITY; 3DJAKE ecoPLA Tough @CREALITY; 123-3D Jupiter PLA @CREALITY; Verbatim PLA @CREALITY
[printer_model:ENDER5PLUS]
name = Creality Ender-5 Plus
@ -149,6 +149,15 @@ bed_model = ender5plus_bed.stl
bed_texture = ender5plus.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA Matt @CREALITY; Devil Design PLA Galaxy @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 3DJAKE ecoPLA Matt @CREALITY; 3DJAKE ecoPLA Tough @CREALITY; 123-3D Jupiter PLA @CREALITY; Verbatim PLA @CREALITY
[printer_model:ENDER5S1]
name = Creality Ender-5 S1
variants = 0.4; 0.3; 0.5; 0.6
technology = FFF
family = ENDER
bed_model = ender3_bed.stl
bed_texture = ender3.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA Matt @CREALITY; Devil Design PLA Galaxy @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 3DJAKE ecoPLA Matt @CREALITY; 3DJAKE ecoPLA Tough @CREALITY; 123-3D Jupiter PLA @CREALITY; Verbatim PLA @CREALITY
[printer_model:ENDER6]
name = Creality Ender-6
variants = 0.4; 0.3; 0.5; 0.6
@ -394,6 +403,28 @@ default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @
[printer_model:SERMOONV1]
name = Creality Sermoon-V1
variants = 0.4; 0.3; 0.5; 0.6
technology = FFF
family = SERMOON
bed_model = sermoonv1_bed.stl
bed_texture = sermoonv1.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA Matt @CREALITY; Devil Design PLA Galaxy @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 3DJAKE ecoPLA Matt @CREALITY; 3DJAKE ecoPLA Tough @CREALITY; 123-3D Jupiter PLA @CREALITY; Verbatim PLA @CREALITY
[printer_model:SERMOONV1PRO]
name = Creality Sermoon-V1 Pro
variants = 0.4; 0.3; 0.5; 0.6
technology = FFF
family = SERMOON
bed_model = sermoonv1_bed.stl
bed_texture = sermoonv1.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA Matt @CREALITY; Devil Design PLA Galaxy @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 3DJAKE ecoPLA Matt @CREALITY; 3DJAKE ecoPLA Tough @CREALITY; 123-3D Jupiter PLA @CREALITY; Verbatim PLA @CREALITY
# All presets starting with asterisk, for example *common*, are intermediate and they will
# not make it into the user interface.
@ -416,8 +447,8 @@ external_fill_pattern = rectilinear
external_perimeters_first = 0
external_perimeter_speed = 25
extra_perimeters = 0
extruder_clearance_height = 34
extruder_clearance_radius = 47
extruder_clearance_height = 25
extruder_clearance_radius = 55
fill_angle = 45
fill_density = 15%
fill_pattern = grid
@ -425,6 +456,7 @@ first_layer_height = 0.2
first_layer_speed = 20
gap_fill_speed = 30
gcode_comments = 0
gcode_label_objects = 1
infill_every_layers = 1
infill_extruder = 1
infill_first = 0
@ -489,7 +521,62 @@ wipe_tower_x = 170
wipe_tower_y = 140
xy_size_compensation = 0
[print:*speed*]
perimeter_speed = 60
small_perimeter_speed = 30
external_perimeter_speed = 30
infill_speed = 60
solid_infill_speed = 60
top_solid_infill_speed = 30
support_material_speed = 40
support_material_interface_speed = 100%
bridge_speed = 25
ironing_speed = 15
travel_speed = 150
travel_speed_z = 0
first_layer_speed = 20
first_layer_speed_over_raft = 30
[print:*highspeed*]
perimeter_speed = 120
small_perimeter_speed = 60
external_perimeter_speed = 60
infill_speed = 120
solid_infill_speed = 120
top_solid_infill_speed = 60
support_material_speed = 80
support_material_interface_speed = 100%
bridge_speed = 50
ironing_speed = 30
travel_speed = 150
travel_speed_z = 0
first_layer_speed = 40
first_layer_speed_over_raft = 60
[print:*superspeed*]
perimeter_speed = 180
small_perimeter_speed = 90
external_perimeter_speed = 90
infill_speed = 180
solid_infill_speed = 180
top_solid_infill_speed = 90
support_material_speed = 120
support_material_interface_speed = 100%
bridge_speed = 75
ironing_speed = 45
travel_speed = 250
travel_speed_z = 0
first_layer_speed = 60
first_layer_speed_over_raft = 90
[print:*0.06mm*]
inherits = *common*
layer_height = 0.06
bottom_solid_layers = 11
top_solid_layers = 13
bridge_flow_ratio = 0.70
[print:*0.08mm*]
inherits = *common*
@ -609,6 +696,16 @@ support_material_extrusion_width = 0.54
[print:0.06 mm ULTRADETAIL (0.3 mm nozzle) @CREALITY]
inherits = *0.06mm*; *0.3nozzle*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3 and printer_notes=~/.*PRINTER_HAS_ULTRADETAIL.*/
[print:0.06 mm ULTRADETAIL (0.4 mm nozzle) @CREALITY]
inherits = *0.06mm*; *0.4nozzle*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_ULTRADETAIL.*/
[print:0.08 mm SUPERDETAIL (0.3 mm nozzle) @CREALITY]
inherits = *0.08mm*; *0.3nozzle*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3
@ -685,6 +782,60 @@ compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle
[print:0.16 mm OPTIMAL SPEED (0.3 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.3nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3
[print:0.16 mm OPTIMAL SPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.4nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4
[print:0.16 mm OPTIMAL SPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.5nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5
[print:0.16 mm OPTIMAL SPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.6nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6
[print:0.16 mm OPTIMAL HIGHSPEED (0.3 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.3nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.16 mm OPTIMAL HIGHSPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.4nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.16 mm OPTIMAL HIGHSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.5nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.16 mm OPTIMAL HIGHSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.6nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.16 mm OPTIMAL SUPERSPEED (0.3 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.3nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.16 mm OPTIMAL SUPERSPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.4nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.16 mm OPTIMAL SUPERSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.5nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.16 mm OPTIMAL SUPERSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.16mm*; *0.6nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.20 mm NORMAL (0.3 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.3nozzle*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3
@ -704,6 +855,60 @@ compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle
[print:0.20 mm NORMAL SPEED (0.3 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.3nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3
[print:0.20 mm NORMAL SPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.4nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4
[print:0.20 mm NORMAL SPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.5nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5
[print:0.20 mm NORMAL SPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.6nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6
[print:0.20 mm NORMAL HIGHSPEED (0.3 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.3nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.20 mm NORMAL HIGHSPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.4nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.20 mm NORMAL HIGHSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.5nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.20 mm NORMAL HIGHSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.6nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.20 mm NORMAL SUPERSPEED (0.3 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.3nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.3 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.20 mm NORMAL SUPERSPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.4nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.20 mm NORMAL SUPERSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.5nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.20 mm NORMAL SUPERSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.20mm*; *0.6nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.24 mm DRAFT (0.4 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.4nozzle*
renamed_from = "0.24mm DRAFT @CREALITY"; "0.24mm DRAFT @ENDER3"
@ -719,6 +924,48 @@ compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle
[print:0.24 mm DRAFT SPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.4nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4
[print:0.24 mm DRAFT SPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.5nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5
[print:0.24 mm DRAFT SPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.6nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6
[print:0.24 mm DRAFT HIGHSPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.4nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.24 mm DRAFT HIGHSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.5nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.24 mm DRAFT HIGHSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.6nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.24 mm DRAFT SUPERSPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.4nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.24 mm DRAFT SUPERSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.5nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.24 mm DRAFT SUPERSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.24mm*; *0.6nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.28 mm SUPERDRAFT (0.4 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.4nozzle*
renamed_from = "0.28mm SUPERDRAFT @CREALITY"
@ -734,6 +981,48 @@ compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle
[print:0.28 mm SUPERDRAFT SPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.4nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4
[print:0.28 mm SUPERDRAFT SPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.5nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5
[print:0.28 mm SUPERDRAFT SPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.6nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6
[print:0.28 mm SUPERDRAFT HIGHSPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.4nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.28 mm SUPERDRAFT HIGHSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.5nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.28 mm SUPERDRAFT HIGHSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.6nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.28 mm SUPERDRAFT SUPERSPEED (0.4 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.4nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.4 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.28 mm SUPERDRAFT SUPERSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.5nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.28 mm SUPERDRAFT SUPERSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.28mm*; *0.6nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.36 mm CHUNKY (0.5 mm nozzle) @CREALITY]
inherits = *0.36mm*; *0.5nozzle*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5
@ -744,12 +1033,60 @@ compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle
[print:0.36 mm CHUNKY SPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.36mm*; *0.5nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5
[print:0.36 mm CHUNKY SPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.36mm*; *0.6nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6
[print:0.36 mm CHUNKY HIGHSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.36mm*; *0.5nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.36 mm CHUNKY HIGHSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.36mm*; *0.6nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.36 mm CHUNKY SUPERSPEED (0.5 mm nozzle) @CREALITY]
inherits = *0.36mm*; *0.5nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.5 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.36 mm CHUNKY SUPERSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.36mm*; *0.6nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
[print:0.44 mm SUPERCHUNKY (0.6 mm nozzle) @CREALITY]
inherits = *0.44mm*; *0.6nozzle*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6
[print:0.44 mm SUPERCHUNKY SPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.44mm*; *0.6nozzle*; *speed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6
[print:0.44 mm SUPERCHUNKY HIGHSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.44mm*; *0.6nozzle*; *highspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_HIGHSPEED.*/
[print:0.44 mm SUPERCHUNKY SUPERSPEED (0.6 mm nozzle) @CREALITY]
inherits = *0.44mm*; *0.6nozzle*; *superspeed*
compatible_printers_condition = printer_model=~/(ENDER|CR|SERMOON).*/ and nozzle_diameter[0]==0.6 and printer_notes=~/.*PRINTER_HAS_SUPERSPEED.*/
# When submitting new filaments please print the following temperature tower at 0.1mm layer height:
# https://www.thingiverse.com/thing:2615842
# Pay particular attention to bridging, overhangs and retractions.
@ -830,6 +1167,26 @@ bridge_fan_speed = 30
top_fan_speed = 0
temperature = 245
[filament:*TPU*]
inherits = *common*
bed_temperature = 50
cooling = 0
disable_fan_first_layers = 3
fan_below_layer_time = 20
filament_colour = #DDDDDD
filament_max_volumetric_speed = 11
filament_type = TPU
filament_density = 1.2
filament_cost = 30
first_layer_bed_temperature = 55
first_layer_temperature = 245
fan_always_on = 0
max_fan_speed = 0
min_fan_speed = 0
bridge_fan_speed = 30
top_fan_speed = 0
temperature = 245
[filament:Generic PLA @CREALITY]
inherits = *PLA*
renamed_from = "Generic PLA @ENDER3"
@ -1109,6 +1466,50 @@ filament_cost = 16.99
filament_density = 1.24
filament_colour = #2862C4
[filament:MatterHackers MH Build Series PLA @CREALITY]
inherits = *PLA*
filament_vendor = MatterHackers
temperature = 205
bed_temperature = 60
first_layer_temperature = 210
first_layer_bed_temperature = 60
filament_cost = 20.87
filament_density = 1.25
filament_colour = #3598DB
[filament:MatterHackers MH Build Series PETG @CREALITY]
inherits = *PET*
filament_vendor = MatterHackers
temperature = 245
bed_temperature = 60
first_layer_temperature = 250
first_layer_bed_temperature = 65
filament_cost = 21.98
filament_density = 1.27
filament_colour = #3598DB
[filament:MatterHackers MH Build Series ABS @CREALITY]
inherits = *ABS*
filament_vendor = MatterHackers
temperature = 230
bed_temperature = 90
first_layer_temperature = 240
first_layer_bed_temperature = 100
filament_cost = 20.87
filament_density = 1.07
filament_colour = #3598DB
[filament:MatterHackers MH Build Series TPU @CREALITY]
inherits = *TPU*
filament_vendor = MatterHackers
temperature = 240
bed_temperature = 50
first_layer_temperature = 250
first_layer_bed_temperature = 60
filament_cost = 28.99
filament_density = 1.12
filament_colour = #3598DB
# Common printer preset
@ -1165,7 +1566,7 @@ wipe = 1
z_offset = 0
printer_model =
default_filament_profile = "Generic PLA @CREALITY"
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nG4 S30 ; allow partial nozzle warmup\nG28 ; home all axis\nG1 Z50 F240\nG1 X2.0 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 X2.0 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 Y140 F5000\nG92 E0\nG1 X2.3 Y10 E10 F1200 ; prime the nozzle\nG92 E0
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600 ; Move print head up{endif}\nG1 X5 Y{print_bed_max[1]*0.85} F{travel_speed*60} ; present print\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+min(max_layer_z+70, max_print_height-10)} F600 ; Move print head further up{endif}\n{if max_layer_z < max_print_height*0.6}G1 Z{max_print_height*0.6} F600 ; Move print head further up{endif}\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
# Intended for printers that have exclusively shipped with a 32bit mainboard
@ -1174,19 +1575,19 @@ gcode_flavor = marlin2
# Intended for printers equipped with a strain gauge mechanism, like the CR-6 series
[printer:*straingauge*]
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM109 S{first_layer_temperature[0]-50} ; set temporary nozzle temp to prevent oozing during homing\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nG28 ; home all axis\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM109 S{first_layer_temperature[0]-50} ; set temporary nozzle temp to prevent oozing during homing\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nG28 ; home all axis\nG1 Z50 F240\nG1 X2.0 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 X2.0 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 Y140 F5000\nG92 E0\nG1 X2.3 Y10 E10 F1200 ; prime the nozzle\nG92 E0
# Intended for printers with a smaller bed, like the Ender-3 series
[printer:*fastabl*]
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nG4 S30 ; allow partial nozzle warmup\nG28 ; home all axis\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2.0 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 X2.0 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 Y140 F5000\nG92 E0\nG1 X2.3 Y10 E10 F1200 ; prime the nozzle\nG92 E0
# Intended for printers with a larger bed, like the CR-10 series
[printer:*slowabl*]
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nG28 ; home all axis\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nG28 ; home all axis\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2.0 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 X2.0 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 Y140 F5000\nG92 E0\nG1 X2.3 Y10 E10 F1200 ; prime the nozzle\nG92 E0
# intended for printers that have RESTORE_LEVELING_AFTER_G28 enabled in firmware
[printer:*storedabl*]
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis and restore leveling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nG4 S30 ; allow partial nozzle warmup\nG28 ; home all axis and restore leveling\nG1 Z50 F240\nG1 X2.0 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 X2.0 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 Y140 F5000\nG92 E0\nG1 X2.3 Y10 E10 F1200 ; prime the nozzle\nG92 E0
# Intended for printers with vendor official firmware verified to support M25
[printer:*pauseprint*]
@ -1238,7 +1639,7 @@ retract_before_wipe = 0%
[printer:*0.3nozzle*]
nozzle_diameter = 0.3
printer_variant = 0.3
min_layer_height = 0.08
min_layer_height = 0.06
max_layer_height = 0.24
retract_lift_above = 0.2
default_print_profile = "0.12 mm DETAIL (0.3 mm nozzle) @CREALITY"
@ -1246,7 +1647,7 @@ default_print_profile = "0.12 mm DETAIL (0.3 mm nozzle) @CREALITY"
[printer:*0.4nozzle*]
nozzle_diameter = 0.4
printer_variant = 0.4
min_layer_height = 0.08
min_layer_height = 0.06
max_layer_height = 0.32
retract_lift_above = 0.2
default_print_profile = "0.16 mm OPTIMAL (0.4 mm nozzle) @CREALITY"
@ -1405,7 +1806,7 @@ inherits = *common*; *storedabl*; *spriteextruder*; *pauseprint*
bed_shape = 5x0,215x0,215x220,5x220
max_print_height = 270
printer_model = ENDER3S1
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3S1
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3S1\nPRINTER_HAS_ULTRADETAIL
[printer:Creality Ender-3 S1 (0.3 mm nozzle)]
inherits = *ENDER3S1*; *0.3nozzle*
@ -1427,7 +1828,7 @@ inherits = *common*; *storedabl*; *spriteextruder*; *pauseprint*
bed_shape = 5x0,215x0,215x220,5x220
max_print_height = 270
printer_model = ENDER3S1PRO
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3S1PRO
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3S1PRO\nPRINTER_HAS_ULTRADETAIL
[printer:Creality Ender-3 S1 Pro (0.3 mm nozzle)]
inherits = *ENDER3S1PRO*; *0.3nozzle*
@ -1449,7 +1850,7 @@ inherits = *common*; *storedabl*; *spriteextruder*; *pauseprint*
bed_shape = 5x5,295x5,295x295,5x295
max_print_height = 300
printer_model = ENDER3S1PLUS
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3S1PLUS
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3S1PLUS\nPRINTER_HAS_ULTRADETAIL
[printer:Creality Ender-3 S1 Plus (0.3 mm nozzle)]
inherits = *ENDER3S1PLUS*; *0.3nozzle*
@ -1554,26 +1955,26 @@ inherits = *ENDER5*; *0.6nozzle*
#[printer:*ENDER5PRO*]
#inherits = *common*; *bowdencapricorn*; *descendingz*
#bed_shape = 5x2.5,225x2.5,225x222.5,5x222.5
#max_print_height = 300
#printer_model = ENDER5PRO
#printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER5PRO\nPRINTER_HAS_BOWDEN
#machine_max_acceleration_e = 1000
#machine_max_feedrate_z = 5
#
#[printer:Creality Ender-5 Pro (0.3 mm nozzle)]
#inherits = *ENDER5PRO*; *0.3nozzle*
#
#[printer:Creality Ender-5 Pro (0.4 mm nozzle)]
#inherits = *ENDER5PRO*; *0.4nozzle*
#
#[printer:Creality Ender-5 Pro (0.5 mm nozzle)]
#inherits = *ENDER5PRO*; *0.5nozzle*
#
#[printer:Creality Ender-5 Pro (0.6 mm nozzle)]
#inherits = *ENDER5PRO*; *0.6nozzle*
[printer:*ENDER5PRO*]
inherits = *common*; *bowdencapricorn*; *descendingz*
bed_shape = 5x2.5,225x2.5,225x222.5,5x222.5
max_print_height = 300
printer_model = ENDER5PRO
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER5PRO\nPRINTER_HAS_BOWDEN
machine_max_acceleration_e = 1000
machine_max_feedrate_z = 5
[printer:Creality Ender-5 Pro (0.3 mm nozzle)]
inherits = *ENDER5PRO*; *0.3nozzle*
[printer:Creality Ender-5 Pro (0.4 mm nozzle)]
inherits = *ENDER5PRO*; *0.4nozzle*
[printer:Creality Ender-5 Pro (0.5 mm nozzle)]
inherits = *ENDER5PRO*; *0.5nozzle*
[printer:Creality Ender-5 Pro (0.6 mm nozzle)]
inherits = *ENDER5PRO*; *0.6nozzle*
@ -1603,12 +2004,33 @@ inherits = *ENDER5PLUS*; *0.6nozzle*
[printer:*ENDER5S1*]
inherits = *common*; *descendingz*; *spriteextruder*
bed_shape = 5x0,215x0,215x220,5x220
max_print_height = 280
printer_model = ENDER5S1
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER5S1\nPRINTER_HAS_ULTRADETAIL\nPRINTER_HAS_HIGHSPEED\nPRINTER_HAS_SUPERSPEED
[printer:Creality Ender-5 S1 (0.3 mm nozzle)]
inherits = *ENDER5S1*; *0.3nozzle*
[printer:Creality Ender-5 S1 (0.4 mm nozzle)]
inherits = *ENDER5S1*; *0.4nozzle*
[printer:Creality Ender-5 S1 (0.5 mm nozzle)]
inherits = *ENDER5S1*; *0.5nozzle*
[printer:Creality Ender-5 S1 (0.6 mm nozzle)]
inherits = *ENDER5S1*; *0.6nozzle*
[printer:*ENDER6*]
inherits = *common*; *bowden*; *descendingz*
bed_shape = 5x5,255x5,255x255,5x255
max_print_height = 400
printer_model = ENDER6
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER6\nPRINTER_HAS_BOWDEN
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER6\nPRINTER_HAS_BOWDEN\nPRINTER_HAS_HIGHSPEED
[printer:Creality Ender-6 (0.3 mm nozzle)]
inherits = *ENDER6*; *0.3nozzle*
@ -1630,7 +2052,7 @@ inherits = *common*; *bowden*; *descendingz*
bed_shape = 5x5,245x5,245x245,5x245
max_print_height = 300
printer_model = ENDER7
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER7\nPRINTER_HAS_BOWDEN
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER7\nPRINTER_HAS_BOWDEN\nPRINTER_HAS_HIGHSPEED\nPRINTER_HAS_SUPERSPEED
[printer:Creality Ender-7 (0.3 mm nozzle)]
inherits = *ENDER7*; *0.3nozzle*
@ -1805,7 +2227,7 @@ inherits = *common*; *slowabl*; *spriteextruder*
bed_shape = 5x5,295x5,295x295,5x295
max_print_height = 400
printer_model = CR10SMARTPRO
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_CR10SMARTPRO\nPRINTER_HAS_BOWDEN
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_CR10SMARTPRO\nPRINTER_HAS_ULTRADETAIL
[printer:Creality CR-10 SMART Pro (0.3 mm nozzle)]
inherits = *CR10SMARTPRO*; *0.3nozzle*
@ -2130,7 +2552,7 @@ inherits = *common*; *directdriveextruder*; *descendingz*
bed_shape = 5x5,275x5,275x255,5x255
max_print_height = 310
printer_model = SERMOOND1
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_SERMOOND1\nPRINTER_HAS_BOWDEN
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_SERMOOND1
[printer:Creality Sermoon-D1 (0.3 mm nozzle)]
inherits = *SERMOOND1*; *0.3nozzle*
@ -2144,3 +2566,45 @@ inherits = *SERMOOND1*; *0.5nozzle*
[printer:Creality Sermoon-D1 (0.6 mm nozzle)]
inherits = *SERMOOND1*; *0.6nozzle*
[printer:*SERMOONV1*]
inherits = *common*; *spriteextruder*; *descendingz*
bed_shape = 5x5,170x5,170x170,5x170
max_print_height = 165
printer_model = SERMOONV1
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_SERMOONV1\nPRINTER_HAS_ULTRADETAIL
[printer:Creality Sermoon-V1 (0.3 mm nozzle)]
inherits = *SERMOONV1*; *0.3nozzle*
[printer:Creality Sermoon-V1 (0.4 mm nozzle)]
inherits = *SERMOONV1*; *0.4nozzle*
[printer:Creality Sermoon-V1 (0.5 mm nozzle)]
inherits = *SERMOONV1*; *0.5nozzle*
[printer:Creality Sermoon-V1 (0.6 mm nozzle)]
inherits = *SERMOONV1*; *0.6nozzle*
[printer:*SERMOONV1PRO*]
inherits = *common*; *spriteextruder*; *descendingz*
bed_shape = 5x5,170x5,170x170,5x170
max_print_height = 165
printer_model = SERMOONV1PRO
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_SERMOONV1PRO\nPRINTER_HAS_ULTRADETAIL
[printer:Creality Sermoon-V1 Pro (0.3 mm nozzle)]
inherits = *SERMOONV1PRO*; *0.3nozzle*
[printer:Creality Sermoon-V1 Pro (0.4 mm nozzle)]
inherits = *SERMOONV1PRO*; *0.4nozzle*
[printer:Creality Sermoon-V1 Pro (0.5 mm nozzle)]
inherits = *SERMOONV1PRO*; *0.5nozzle*
[printer:Creality Sermoon-V1 Pro (0.6 mm nozzle)]
inherits = *SERMOONV1PRO*; *0.6nozzle*

View File

@ -1,3 +1,5 @@
min_slic3r_version = 2.6.0-alpha1
1.0.2 Added new printer models.
min_slic3r_version = 2.5.0-alpha3
1.0.1 Decreased bed size to 220x220.
1.0.0 Initial version

View File

@ -6,7 +6,7 @@
name = Elegoo
# 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.1
config_version = 1.0.2
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Elegoo/
# The printer models will be shown by the Configuration Wizard in this order,
@ -58,6 +58,33 @@ bed_model =
bed_texture =
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
[printer_model:NEPTUNE3MAX]
name = Elegoo Neptune-3 Max
variants = 0.4
technology = FFF
family = NEPTUNE
bed_model =
bed_texture =
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
[printer_model:NEPTUNE3PLUS]
name = Elegoo Neptune-3 Plus
variants = 0.4
technology = FFF
family = NEPTUNE
bed_model =
bed_texture =
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
[printer_model:NEPTUNE3PRO]
name = Elegoo Neptune-3 Pro
variants = 0.4
technology = FFF
family = NEPTUNE
bed_model =
bed_texture =
default_materials = Generic PLA @ELEGOO; Generic PETG @ELEGOO; Generic ABS @ELEGOO
[printer_model:NEPTUNEX]
name = Elegoo Neptune-X
variants = 0.4
@ -428,26 +455,9 @@ retract_length = 5
retract_speed = 60
deretract_speed = 40
retract_before_wipe = 70%
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
start_gcode = M413 S0 ; disable Power Loss Recovery\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600 ; Move print head up{endif}\nG1 X5 Y{print_bed_max[1]*0.8} F{travel_speed*60} ; present print\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+min(max_layer_z+70, max_print_height-10)} F600 ; Move print head further up{endif}\n{if max_layer_z < max_print_height*0.6}G1 Z{max_print_height*0.6} F600 ; Move print head further up{endif}\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
# Intended for printers with a smaller bed
# [printer:*fastabl*]
# start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
# Intended for printers with a larger bed
# [printer:*slowabl*]
# start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nG28 ; home all axis\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
# Intended for printers with vendor official firmware verified to support M25
# [printer:*pauseprint*]
# pause_print_gcode = M25 ; pause print
# Intended for printers where the Z-axis lowers the print bed during printing
# [printer:*invertedz*]
# end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600{endif} ; Move print bed down\nG1 X50 Y50 F{travel_speed*60} ; present print\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+max_print_height-10} F600{endif} ; Move print bed down further down\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
# Intended for printers with dual extruders and a single hotend/nozzle
[printer:*dualextruder*]
single_extruder_multi_material = 1
@ -473,7 +483,7 @@ retract_restart_extra = 0,0
retract_restart_extra_toolchange = 0,0
retract_speed = 60,60
wipe = 1,1
start_gcode = T[initial_tool] ; set active extruder\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\n;G29 ; auto bed levelling - remove ; at beginning of line to enable\n;M420 S1 ; enable mesh - remove ; at beginning of line to enable\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240 ; move down to prime nozzle\nG92 E0 ; reset extruder\nG1 E90 ; load filament\nG92 E0 ; reset extruder\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000 ; move over for second prime line\nG92 E0 ; reset extruder\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0 ; reset extruder
start_gcode = T[initial_tool] ; set active extruder\nM413 S0 ; disable Power Loss Recovery\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{first_layer_bed_temperature[0]} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\n;G29 ; auto bed levelling - remove ; at beginning of line to enable\n;M420 S1 ; enable mesh - remove ; at beginning of line to enable\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S{first_layer_temperature[0]} ; set final nozzle temp\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp to stabilize\nM109 S{first_layer_temperature[0]} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240 ; move down to prime nozzle\nG92 E0 ; reset extruder\nG1 E90 ; load filament\nG92 E0 ; reset extruder\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000 ; move over for second prime line\nG92 E0 ; reset extruder\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0 ; reset extruder
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600 ; Move print head up{endif}\nG1 X5 Y{print_bed_max[1]*0.8} F{travel_speed*60} ; present print\nG1 E-80 F2000 ; unload filament\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+min(max_layer_z+70, max_print_height-10)} F600 ; Move print head further up{endif}\n{if max_layer_z < max_print_height*0.6}G1 Z{max_print_height*0.6} F600 ; Move print head further up{endif}\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
# Copy of Creality CR-X config for the Neptune 2D (dual extruder, single hotend)
@ -482,29 +492,57 @@ end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2,
inherits = Elegoo Neptune-2; *dualextruder*
retract_length = 6,6
printer_model = NEPTUNE2D
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D
[printer:Elegoo Neptune-2S]
inherits = Elegoo Neptune-2
printer_model = NEPTUNE2S
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2S
[printer:Elegoo Neptune-X]
inherits = Elegoo Neptune-2
max_print_height = 300
printer_model = NEPTUNEX
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNEX
[printer:Elegoo Neptune-3]
inherits = Elegoo Neptune-2
max_print_height = 280
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nG29 ; run abl mesh\nM420 S1 ; load mesh\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
start_gcode = M413 S0 ; disable Power Loss Recovery\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nM140 S[first_layer_bed_temperature] ; set final bed temp\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\n;G29 ; run abl mesh\nM420 S1 ; load mesh\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set final nozzle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize\nM109 S[first_layer_temperature] ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0
printer_model = NEPTUNE3
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE3
[printer:Elegoo Neptune-1]
inherits = Elegoo Neptune-2
bed_shape = 0x0,210x0,210x210,0x210
max_print_height = 200
printer_model = NEPTUNE1
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE2D\nPRINTER_HAS_BOWDEN
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE1
[printer:Elegoo Neptune-3 Max]
inherits = Elegoo Neptune-3
retract_length = 2.5
retract_speed = 25
bed_shape = 0x0,420x0,420x420,0x420
max_print_height = 500
printer_model = NEPTUNE3MAX
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE3MAX
[printer:Elegoo Neptune-3 Plus]
inherits = Elegoo Neptune-3
retract_length = 2.5
retract_speed = 25
bed_shape = 0x0,320x0,320x320,0x320
max_print_height = 400
printer_model = NEPTUNE3PLUS
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE3PLUS
[printer:Elegoo Neptune-3 Pro]
inherits = Elegoo Neptune-3
bed_shape = 0x0,225x0,225x225,0x225
max_print_height = 280
retract_length = 2.5
retract_speed = 25
printer_model = NEPTUNE3PRO
printer_notes = Do not remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_ELEGOO\nPRINTER_MODEL_NEPTUNE3PRO

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,4 +1,5 @@
min_slic3r_version = 2.5.0-alpha0
1.5.5 Added new Prusament Resin material profiles. Enabled g-code thumbnails for MK2.5 family printers.
1.5.4 Added material profiles for Prusament Resin BioBased60.
1.5.3 Added filament profiles for ColorFabb VarioShore TPU, FormFutura PP, NinjaTek NinjaFlex/Cheetah TPU and for multiple Eolas Prints filaments. Updated bridging settings in 50um and 70um profiles.
1.5.2 Added SLA material profiles.

View File

@ -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.5.4
config_version = 1.5.5
# 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%
@ -4065,7 +4065,6 @@ inherits = *FLEX*
filament_vendor = Eolas Prints
filament_cost = 34.99
filament_density = 1.21
filament_spool_weight = 1000
filament_colour = #4D9398
filament_max_volumetric_speed = 1.2
temperature = 235
@ -5755,6 +5754,14 @@ material_type = Tough
material_vendor = BlueCast
material_colour = #007EFD
[sla_material:BlueCast X-One @0.025]
inherits = *common 0.025*
exposure_time = 25
initial_exposure_time = 35
material_type = Casting
material_vendor = BlueCast
material_colour = #C0C0C0
[sla_material:DruckWege Type D High Temp @0.025]
inherits = *common 0.025*
exposure_time = 6
@ -5957,6 +5964,14 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #FCB30E
[sla_material:Prusament Resin Tough Classic Red @0.025]
inherits = *common 0.025*
exposure_time = 3
initial_exposure_time = 35
material_type = Tough
material_vendor = Prusa Polymers
material_colour = #EC0000
[sla_material:Prusament Resin BioBased60 Herbal Green @0.025]
inherits = *common 0.025*
exposure_time = 7
@ -5981,6 +5996,22 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #ECDE05
[sla_material:Prusament Resin Flex80 Transparent Clear @0.025]
inherits = *common 0.025*
exposure_time = 10
initial_exposure_time = 30
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #F3F6F4
[sla_material:Prusament Resin Flex80 Black @0.025]
inherits = *common 0.025*
exposure_time = 8
initial_exposure_time = 30
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #595959
## Prusa 0.025
[sla_material:Prusa Orange Tough @0.025]
@ -6432,6 +6463,14 @@ material_type = Tough
material_vendor = BlueCast
material_colour = #007EFD
[sla_material:BlueCast X-One @0.05]
inherits = *common 0.05*
exposure_time = 27
initial_exposure_time = 35
material_type = Casting
material_vendor = BlueCast
material_colour = #C0C0C0
[sla_material:DruckWege Type D High Temp @0.05]
inherits = *common 0.05*
exposure_time = 10
@ -6938,6 +6977,14 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #FCB30E
[sla_material:Prusament Resin Tough Classic Red @0.05]
inherits = *common 0.05*
exposure_time = 4
initial_exposure_time = 35
material_type = Tough
material_vendor = Prusa Polymers
material_colour = #EC0000
[sla_material:Prusament Resin BioBased60 Herbal Green @0.05]
inherits = *common 0.05*
exposure_time = 8
@ -6962,6 +7009,22 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #ECDE05
[sla_material:Prusament Resin Flex80 Transparent Clear @0.05]
inherits = *common 0.05*
exposure_time = 15
initial_exposure_time = 30
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #F3F6F4
[sla_material:Prusament Resin Flex80 Black @0.05]
inherits = *common 0.05*
exposure_time = 10
initial_exposure_time = 30
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #595959
## Prusa 0.05
[sla_material:Prusa Beige Tough @0.05]
@ -7252,6 +7315,14 @@ material_type = Tough
material_vendor = BlueCast
material_colour = #FFEEE6
[sla_material:BlueCast X-One @0.1]
inherits = *common 0.1*
exposure_time = 30
initial_exposure_time = 45
material_type = Casting
material_vendor = BlueCast
material_colour = #C0C0C0
[sla_material:Ameralabs TGM-7 LED @0.1]
inherits = *common 0.1*
exposure_time = 10
@ -7286,6 +7357,14 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #808080
[sla_material:Prusament Resin Tough Classic Red @0.1]
inherits = *common 0.1*
exposure_time = 6
initial_exposure_time = 45
material_type = Tough
material_vendor = Prusa Polymers
material_colour = #EC0000
[sla_material:Prusament Resin Tough Sandstone Model @0.1]
inherits = *common 0.1*
exposure_time = 13
@ -7374,6 +7453,22 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #ECDE05
[sla_material:Prusament Resin Flex80 Transparent Clear @0.1]
inherits = *common 0.1*
exposure_time = 20
initial_exposure_time = 30
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #F3F6F4
[sla_material:Prusament Resin Flex80 Black @0.1]
inherits = *common 0.1*
exposure_time = 13
initial_exposure_time = 30
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #595959
## Prusa 0.1
[sla_material:Prusa Orange Tough @0.1]
@ -7590,6 +7685,14 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #FCB30E
[sla_material:Prusament Resin Tough Classic Red @0.025 SL1S]
inherits = *0.025_sl1s*
exposure_time = 1.8
initial_exposure_time = 25
material_type = Tough
material_vendor = Prusa Polymers
material_colour = #EC0000
[sla_material:Prusament Resin BioBased60 Herbal Green @0.025 SL1S]
inherits = *0.025_sl1s*
exposure_time = 3.5
@ -7615,6 +7718,24 @@ material_vendor = Prusa Polymers
material_colour = #ECDE05
material_print_speed = slow
[sla_material:Prusament Resin Flex80 Transparent Clear @0.025 SL1S]
inherits = *0.025_sl1s*
exposure_time = 4
initial_exposure_time = 25
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #F3F6F4
material_print_speed = slow
[sla_material:Prusament Resin Flex80 Black @0.025 SL1S]
inherits = *0.025_sl1s*
exposure_time = 2.6
initial_exposure_time = 25
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #595959
material_print_speed = slow
## Made for Prusa 0.025
[sla_material:Prusa Orange Tough @0.025 SL1S]
@ -8042,6 +8163,14 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #FCB30E
[sla_material:Prusament Resin Tough Classic Red @0.05 SL1S]
inherits = *0.05_sl1s*
exposure_time = 2
initial_exposure_time = 25
material_type = Tough
material_vendor = Prusa Polymers
material_colour = #EC0000
[sla_material:Prusament Resin BioBased60 Herbal Green @0.05 SL1S]
inherits = *0.05_sl1s*
exposure_time = 4
@ -8067,6 +8196,24 @@ material_vendor = Prusa Polymers
material_colour = #ECDE05
material_print_speed = slow
[sla_material:Prusament Resin Flex80 Transparent Clear @0.05 SL1S]
inherits = *0.05_sl1s*
exposure_time = 5
initial_exposure_time = 25
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #F3F6F4
material_print_speed = slow
[sla_material:Prusament Resin Flex80 Black @0.05 SL1S]
inherits = *0.05_sl1s*
exposure_time = 3
initial_exposure_time = 25
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #595959
material_print_speed = slow
## Made for Prusa 0.05
[sla_material:Prusa Orange Tough @0.05 SL1S]
@ -8798,6 +8945,14 @@ material_type = Tough
material_vendor = Prusa Polymers
material_colour = #FCB30E
[sla_material:Prusament Resin Tough Classic Red @0.1 SL1S]
inherits = *0.1_sl1s*
exposure_time = 2.6
initial_exposure_time = 25
material_type = Tough
material_vendor = Prusa Polymers
material_colour = #EC0000
[sla_material:Prusament Resin BioBased60 Herbal Green @0.1 SL1S]
inherits = *0.1_sl1s*
exposure_time = 5
@ -8823,6 +8978,24 @@ material_vendor = Prusa Polymers
material_colour = #ECDE05
material_print_speed = slow
[sla_material:Prusament Resin Flex80 Transparent Clear @0.1 SL1S]
inherits = *0.1_sl1s*
exposure_time = 6
initial_exposure_time = 25
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #F3F6F4
material_print_speed = slow
[sla_material:Prusament Resin Flex80 Black @0.1 SL1S]
inherits = *0.1_sl1s*
exposure_time = 3.5
initial_exposure_time = 25
material_type = Flexible
material_vendor = Prusa Polymers
material_colour = #595959
material_print_speed = slow
## Made for Prusa 0.1
[sla_material:Prusa Orange Tough @0.1 SL1S]
@ -9312,6 +9485,8 @@ printer_model = MK2.5
remaining_times = 1
machine_max_jerk_e = 4.5
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; 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 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y200 F3600 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM900 K0 ; reset LA\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
thumbnails = 160x120
[printer:Original Prusa i3 MK2.5 0.25 nozzle]
inherits = Original Prusa i3 MK2S 0.25 nozzle
@ -9319,6 +9494,8 @@ printer_model = MK2.5
remaining_times = 1
machine_max_jerk_e = 4.5
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; 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 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y200 F3600 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM900 K0 ; reset LA\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
thumbnails = 160x120
[printer:Original Prusa i3 MK2.5 0.6 nozzle]
inherits = Original Prusa i3 MK2S 0.6 nozzle
@ -9327,6 +9504,8 @@ remaining_times = 1
machine_max_jerk_e = 4.5
deretract_speed = 25
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; 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 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y200 F3600 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM900 K0 ; reset LA\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
thumbnails = 160x120
[printer:Original Prusa i3 MK2.5 0.8 nozzle]
inherits = Original Prusa i3 MK2S 0.6 nozzle
@ -9342,9 +9521,11 @@ retract_lift = 0.25
remaining_times = 1
machine_max_jerk_e = 4.5
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; 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 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n{if filament_settings_id[initial_tool]=~/.*Prusament PA11.*/}\nG1 Z0.3 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E9 F1000 ; intro line\n{else}\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\n{endif}\nG92 E0
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y200 F3600 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM900 K0 ; reset LA\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
default_print_profile = 0.40mm QUALITY @0.8 nozzle
default_filament_profile = Prusament PLA @0.8 nozzle
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
thumbnails = 160x120
[printer:Original Prusa i3 MK2.5 MMU2 Single]
inherits = *25mm2*
@ -9379,7 +9560,7 @@ single_extruder_multi_material = 1
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; 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 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\nG92 E0\n
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors\n
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
[printer:Original Prusa i3 MK2.5S]
inherits = Original Prusa i3 MK2.5
@ -9406,7 +9587,7 @@ default_print_profile = 0.15mm OPTIMAL @MK2.5
default_filament_profile = Prusament PLA
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2.5\n
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
[printer:Original Prusa i3 MK2.5S MMU2S Single 0.8 nozzle]
inherits = Original Prusa i3 MK2.5S MMU2S Single
@ -9457,7 +9638,7 @@ single_extruder_multi_material = 1
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; 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 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\nG92 E0\n
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors\n
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
[printer:Original Prusa i3 MK2.5S MMU2S 0.6 nozzle]
inherits = Original Prusa i3 MK2.5S MMU2S
@ -9527,7 +9708,7 @@ color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
[printer:Original Prusa i3 MK3]
inherits = *common*
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y200 F3600 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM84 ; disable motors
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y200 F3600 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
machine_max_acceleration_e = 5000,5000
machine_max_acceleration_extruding = 1250,1250
machine_max_acceleration_retracting = 1250,1250
@ -9659,7 +9840,7 @@ inherits = *mm2*
single_extruder_multi_material = 0
default_filament_profile = Prusament PLA
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
[printer:Original Prusa i3 MK3 MMU2 Single 0.6 nozzle]
inherits = Original Prusa i3 MK3 MMU2 Single
@ -9707,7 +9888,7 @@ machine_max_acceleration_e = 8000,8000
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; 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 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors\n
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
[printer:Original Prusa i3 MK3S & MK3S+ MMU2S Single]
inherits = *mm2s*
@ -9715,7 +9896,7 @@ renamed_from = "Original Prusa i3 MK3S MMU2S Single"
single_extruder_multi_material = 0
default_filament_profile = Prusament PLA
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
[printer:Original Prusa i3 MK3S & MK3S+ MMU2S Single 0.6 nozzle]
inherits = Original Prusa i3 MK3S & MK3S+ MMU2S Single
@ -9766,7 +9947,7 @@ machine_max_acceleration_e = 8000,8000
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.11.0 ; tell printer latest fw version\nG90 ; 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 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors\n
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nG1 X0 Y210 F7200 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+49, max_print_height)} F720 ; Move print head further up{endif}\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
## 0.6mm nozzle MMU2/S printer profiles
@ -9883,7 +10064,7 @@ retract_layer_change = 1
silent_mode = 0
remaining_times = 1
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S170 ; set extruder temp for bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nM109 R170 ; wait for bed leveling temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM204 T1250 ; set travel acceleration\nG28 ; home all without mesh bed level\nG29 ; mesh bed leveling \nM204 T[machine_max_acceleration_travel] ; restore travel acceleration\nM104 S[first_layer_temperature] ; set extruder temp\nG92 E0\nG1 Y-2 X179 F2400\nG1 Z3 F720\nM109 S[first_layer_temperature] ; wait for extruder temp\n\n; intro line\nG1 X170 F1000\nG1 Z0.2 F720\nG1 X110 E8 F900\nG1 X40 E10 F700\nG92 E0\n\nM221 S95 ; set flow
end_gcode = G1 E-1 F2100 ; retract\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720 ; Move print head up{endif}\nG1 X178 Y178 F4200 ; park print head\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM221 S100 ; reset flow\nM900 K0 ; reset LA\nM84 ; disable motors
end_gcode = G1 E-1 F2100 ; retract\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720 ; Move print head up{endif}\nG1 X178 Y178 F4200 ; park print head\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM221 S100 ; reset flow\nM900 K0 ; reset LA\nM84 ; disable motors\n; max_layer_z = [max_layer_z]
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MINI\n
extruder_colour =
color_change_gcode = M600

View File

@ -490,7 +490,7 @@ static void make_inner_brim(const Print &print,
loops = union_pt_chained_outside_in(loops);
std::reverse(loops.begin(), loops.end());
extrusion_entities_append_loops(brim.entities, std::move(loops), erSkirt, float(flow.mm3_per_mm()),
extrusion_entities_append_loops(brim.entities, std::move(loops), ExtrusionRole::Skirt, float(flow.mm3_per_mm()),
float(flow.width()), float(print.skirt_first_layer_height()));
}
@ -672,7 +672,7 @@ ExtrusionEntityCollection make_brim(const Print &print, PrintTryCancel try_cance
if (i + 1 == j && first_path.size() > 3 && first_path.front().x() == first_path.back().x() && first_path.front().y() == first_path.back().y()) {
auto *loop = new ExtrusionLoop();
brim.entities.emplace_back(loop);
loop->paths.emplace_back(erSkirt, float(flow.mm3_per_mm()), float(flow.width()), float(print.skirt_first_layer_height()));
loop->paths.emplace_back(ExtrusionRole::Skirt, float(flow.mm3_per_mm()), float(flow.width()), float(print.skirt_first_layer_height()));
Points &points = loop->paths.front().polyline.points;
points.reserve(first_path.size());
for (const ClipperLib_Z::IntPoint &pt : first_path)
@ -683,7 +683,7 @@ ExtrusionEntityCollection make_brim(const Print &print, PrintTryCancel try_cance
ExtrusionEntityCollection this_loop_trimmed;
this_loop_trimmed.entities.reserve(j - i);
for (; i < j; ++ i) {
this_loop_trimmed.entities.emplace_back(new ExtrusionPath(erSkirt, float(flow.mm3_per_mm()), float(flow.width()), float(print.skirt_first_layer_height())));
this_loop_trimmed.entities.emplace_back(new ExtrusionPath(ExtrusionRole::Skirt, float(flow.mm3_per_mm()), float(flow.width()), float(print.skirt_first_layer_height())));
const ClipperLib_Z::Path &path = *loops_trimmed_order[i].first;
Points &points = dynamic_cast<ExtrusionPath*>(this_loop_trimmed.entities.back())->polyline.points;
points.reserve(path.size());
@ -699,7 +699,7 @@ ExtrusionEntityCollection make_brim(const Print &print, PrintTryCancel try_cance
}
}
} else {
extrusion_entities_append_loops_and_paths(brim.entities, std::move(all_loops), erSkirt, float(flow.mm3_per_mm()), float(flow.width()), float(print.skirt_first_layer_height()));
extrusion_entities_append_loops_and_paths(brim.entities, std::move(all_loops), ExtrusionRole::Skirt, float(flow.mm3_per_mm()), float(flow.width()), float(print.skirt_first_layer_height()));
}
make_inner_brim(print, top_level_objects_with_brim, bottom_layers_expolygons, brim);

View File

@ -320,7 +320,7 @@ BuildVolume::ObjectState BuildVolume::volume_state_bbox(const BoundingBoxf3& vol
bool BuildVolume::all_paths_inside(const GCodeProcessorResult& paths, const BoundingBoxf3& paths_bbox, bool ignore_bottom) const
{
auto move_valid = [](const GCodeProcessorResult::MoveVertex &move) {
return move.type == EMoveType::Extrude && move.extrusion_role != erCustom && move.width != 0.f && move.height != 0.f;
return move.type == EMoveType::Extrude && move.extrusion_role != GCodeExtrusionRole::Custom && move.width != 0.f && move.height != 0.f;
};
static constexpr const double epsilon = BedEpsilon;

View File

@ -64,6 +64,8 @@ set(SLIC3R_SOURCES
ExtrusionEntity.hpp
ExtrusionEntityCollection.cpp
ExtrusionEntityCollection.hpp
ExtrusionRole.cpp
ExtrusionRole.hpp
ExtrusionSimulator.cpp
ExtrusionSimulator.hpp
FileParserError.hpp

View File

@ -768,6 +768,15 @@ void priv::set_skip_for_out_of_aoi(std::vector<bool> &skip_indicies,
point_normals[i] = {p1, normal};
}
// check that projection is not left handed
// Fix for reflected projection
if (is_out_of(point_normals[2].first, point_normals[0])) {
// projection is reflected so normals are reflected
for (auto &pn : point_normals)
pn.second *= -1;
}
// same meaning as point normal
IsOnSides is_on_sides(its.vertices.size(), {false,false,false,false});

View File

@ -8,8 +8,6 @@
#include <limits>
#include <sstream>
#define L(s) (s)
namespace Slic3r {
void ExtrusionPath::intersect_expolygons(const ExPolygons &collection, ExtrusionEntityCollection* retval) const
@ -52,7 +50,7 @@ void ExtrusionPath::polygons_covered_by_spacing(Polygons &out, const float scale
{
// Instantiating the Flow class to get the line spacing.
// Don't know the nozzle diameter, setting to zero. It shall not matter it shall be optimized out by the compiler.
bool bridge = is_bridge(this->role());
bool bridge = this->role().is_bridge();
assert(! bridge || this->width == this->height);
auto flow = bridge ? Flow::bridging_flow(this->width, 0.f) : Flow(this->width, this->height, 0.f);
polygons_append(out, offset(this->polyline, 0.5f * float(flow.scaled_spacing()) + scaled_epsilon));
@ -210,7 +208,7 @@ ExtrusionLoop::ClosestPathPoint ExtrusionLoop::get_closest_path_and_point(const
out.segment_idx = foot_pt_.first;
min2 = d2;
}
if (prefer_non_overhang && !is_bridge(path.role()) && d2 < min2_non_overhang) {
if (prefer_non_overhang && ! path.role().is_bridge() && d2 < min2_non_overhang) {
best_non_overhang.foot_pt = foot_pt_.second;
best_non_overhang.path_idx = &path - &this->paths.front();
best_non_overhang.segment_idx = foot_pt_.first;
@ -296,7 +294,7 @@ bool ExtrusionLoop::has_overhang_point(const Point &point) const
if (pos != -1) {
// point belongs to this path
// we consider it overhang only if it's not an endpoint
return (is_bridge(path.role()) && pos > 0 && pos != (int)(path.polyline.points.size())-1);
return (path.role().is_bridge() && pos > 0 && pos != int(path.polyline.points.size())-1);
}
}
return false;
@ -322,65 +320,4 @@ double ExtrusionLoop::min_mm3_per_mm() const
return min_mm3_per_mm;
}
std::string ExtrusionEntity::role_to_string(ExtrusionRole role)
{
switch (role) {
case erNone : return L("Unknown");
case erPerimeter : return L("Perimeter");
case erExternalPerimeter : return L("External perimeter");
case erOverhangPerimeter : return L("Overhang perimeter");
case erInternalInfill : return L("Internal infill");
case erSolidInfill : return L("Solid infill");
case erTopSolidInfill : return L("Top solid infill");
case erIroning : return L("Ironing");
case erBridgeInfill : return L("Bridge infill");
case erGapFill : return L("Gap fill");
case erSkirt : return L("Skirt/Brim");
case erSupportMaterial : return L("Support material");
case erSupportMaterialInterface : return L("Support material interface");
case erWipeTower : return L("Wipe tower");
case erCustom : return L("Custom");
case erMixed : return L("Mixed");
default : assert(false);
}
return "";
}
ExtrusionRole ExtrusionEntity::string_to_role(const std::string_view role)
{
if (role == L("Perimeter"))
return erPerimeter;
else if (role == L("External perimeter"))
return erExternalPerimeter;
else if (role == L("Overhang perimeter"))
return erOverhangPerimeter;
else if (role == L("Internal infill"))
return erInternalInfill;
else if (role == L("Solid infill"))
return erSolidInfill;
else if (role == L("Top solid infill"))
return erTopSolidInfill;
else if (role == L("Ironing"))
return erIroning;
else if (role == L("Bridge infill"))
return erBridgeInfill;
else if (role == L("Gap fill"))
return erGapFill;
else if (role == L("Skirt") || role == L("Skirt/Brim")) // "Skirt" is for backward compatibility with 2.3.1 and earlier
return erSkirt;
else if (role == L("Support material"))
return erSupportMaterial;
else if (role == L("Support material interface"))
return erSupportMaterialInterface;
else if (role == L("Wipe tower"))
return erWipeTower;
else if (role == L("Custom"))
return erCustom;
else if (role == L("Mixed"))
return erMixed;
else
return erNone;
}
}

View File

@ -2,6 +2,7 @@
#define slic3r_ExtrusionEntity_hpp_
#include "libslic3r.h"
#include "ExtrusionRole.hpp"
#include "Polygon.hpp"
#include "Polyline.hpp"
@ -16,65 +17,6 @@ using ExPolygons = std::vector<ExPolygon>;
class ExtrusionEntityCollection;
class Extruder;
// Each ExtrusionRole value identifies a distinct set of { extruder, speed }
enum ExtrusionRole : uint8_t {
erNone,
erPerimeter,
erExternalPerimeter,
erOverhangPerimeter,
erInternalInfill,
erSolidInfill,
erTopSolidInfill,
erIroning,
erBridgeInfill,
erGapFill,
erSkirt,
erSupportMaterial,
erSupportMaterialInterface,
erWipeTower,
erCustom,
// Extrusion role for a collection with multiple extrusion roles.
erMixed,
erCount
};
// Special flags describing loop
enum ExtrusionLoopRole {
elrDefault,
elrContourInternalPerimeter,
elrSkirt,
};
inline bool is_perimeter(ExtrusionRole role)
{
return role == erPerimeter
|| role == erExternalPerimeter
|| role == erOverhangPerimeter;
}
inline bool is_infill(ExtrusionRole role)
{
return role == erBridgeInfill
|| role == erInternalInfill
|| role == erSolidInfill
|| role == erTopSolidInfill
|| role == erIroning;
}
inline bool is_solid_infill(ExtrusionRole role)
{
return role == erBridgeInfill
|| role == erSolidInfill
|| role == erTopSolidInfill
|| role == erIroning;
}
inline bool is_bridge(ExtrusionRole role) {
return role == erBridgeInfill
|| role == erOverhangPerimeter;
}
class ExtrusionEntity
{
public:
@ -108,9 +50,6 @@ public:
virtual Polylines as_polylines() const { Polylines dst; this->collect_polylines(dst); return dst; }
virtual double length() const = 0;
virtual double total_volume() const = 0;
static std::string role_to_string(ExtrusionRole role);
static ExtrusionRole string_to_role(const std::string_view role);
};
typedef std::vector<ExtrusionEntity*> ExtrusionEntitiesPtr;
@ -217,7 +156,7 @@ public:
size_t size() const { return this->paths.size(); }
bool empty() const { return this->paths.empty(); }
double length() const override;
ExtrusionRole role() const override { return this->paths.empty() ? erNone : this->paths.front().role(); }
ExtrusionRole role() const override { return this->paths.empty() ? ExtrusionRole::None : this->paths.front().role(); }
// Produce a list of 2D polygons covered by the extruded paths, offsetted by the extrusion width.
// Increase the offset by scaled_epsilon to achieve an overlap, so a union will produce no gaps.
void polygons_covered_by_width(Polygons &out, const float scaled_epsilon) const override;
@ -279,7 +218,7 @@ public:
// Test, whether the point is extruded by a bridging flow.
// This used to be used to avoid placing seams on overhangs, but now the EdgeGrid is used instead.
bool has_overhang_point(const Point &point) const;
ExtrusionRole role() const override { return this->paths.empty() ? erNone : this->paths.front().role(); }
ExtrusionRole role() const override { return this->paths.empty() ? ExtrusionRole::None : this->paths.front().role(); }
ExtrusionLoopRole loop_role() const { return m_loop_role; }
// Produce a list of 2D polygons covered by the extruded paths, offsetted by the extrusion width.
// Increase the offset by scaled_epsilon to achieve an overlap, so a union will produce no gaps.
@ -304,8 +243,6 @@ public:
}
double total_volume() const override { double volume =0.; for (const auto& path : paths) volume += path.total_volume(); return volume; }
//static inline std::string role_to_string(ExtrusionLoopRole role);
#ifndef NDEBUG
bool validate() const {
assert(this->first_point() == this->paths.back().polyline.points.back());

View File

@ -8,7 +8,7 @@ namespace Slic3r {
void filter_by_extrusion_role_in_place(ExtrusionEntitiesPtr &extrusion_entities, ExtrusionRole role)
{
if (role != erMixed) {
if (role != ExtrusionRole::Mixed) {
auto first = extrusion_entities.begin();
auto last = extrusion_entities.end();
extrusion_entities.erase(

View File

@ -54,10 +54,10 @@ public:
bool is_collection() const override { return true; }
ExtrusionRole role() const override {
ExtrusionRole out = erNone;
ExtrusionRole out{ ExtrusionRole::None };
for (const ExtrusionEntity *ee : entities) {
ExtrusionRole er = ee->role();
out = (out == erNone || out == er) ? er : erMixed;
out = (out == ExtrusionRole::None || out == er) ? er : ExtrusionRole::Mixed;
}
return out;
}
@ -96,8 +96,8 @@ public:
}
void replace(size_t i, const ExtrusionEntity &entity);
void remove(size_t i);
static ExtrusionEntityCollection chained_path_from(const ExtrusionEntitiesPtr &extrusion_entities, const Point &start_near, ExtrusionRole role = erMixed);
ExtrusionEntityCollection chained_path_from(const Point &start_near, ExtrusionRole role = erMixed) const
static ExtrusionEntityCollection chained_path_from(const ExtrusionEntitiesPtr &extrusion_entities, const Point &start_near, ExtrusionRole role = ExtrusionRole::Mixed);
ExtrusionEntityCollection chained_path_from(const Point &start_near, ExtrusionRole role = ExtrusionRole::Mixed) const
{ return this->no_sort ? *this : chained_path_from(this->entities, start_near, role); }
void reverse() override;
const Point& first_point() const override { return this->entities.front()->first_point(); }

View File

@ -0,0 +1,91 @@
#include "ExtrusionRole.hpp"
#include <string>
#include <string_view>
#include <cassert>
#define L(s) (s)
namespace Slic3r {
// Convert a rich bitmask based ExtrusionRole to a less expressive ordinal GCodeExtrusionRole.
// GCodeExtrusionRole is to be serialized into G-code and deserialized by G-code viewer,
GCodeExtrusionRole extrusion_role_to_gcode_extrusion_role(ExtrusionRole role)
{
if (role == ExtrusionRole::None) return GCodeExtrusionRole::None;
if (role.is_perimeter()) {
return role.is_bridge() ? GCodeExtrusionRole::OverhangPerimeter :
role.is_external() ? GCodeExtrusionRole::ExternalPerimeter : GCodeExtrusionRole::Perimeter;
}
if (role == ExtrusionRole::InternalInfill) return GCodeExtrusionRole::InternalInfill;
if (role == ExtrusionRole::SolidInfill) return GCodeExtrusionRole::SolidInfill;
if (role == ExtrusionRole::TopSolidInfill) return GCodeExtrusionRole::TopSolidInfill;
if (role == ExtrusionRole::Ironing) return GCodeExtrusionRole::Ironing;
if (role == ExtrusionRole::BridgeInfill) return GCodeExtrusionRole::BridgeInfill;
if (role == ExtrusionRole::GapFill) return GCodeExtrusionRole::GapFill;
if (role == ExtrusionRole::Skirt) return GCodeExtrusionRole::Skirt;
if (role == ExtrusionRole::SupportMaterial) return GCodeExtrusionRole::SupportMaterial;
if (role == ExtrusionRole::SupportMaterialInterface) return GCodeExtrusionRole::SupportMaterialInterface;
if (role == ExtrusionRole::WipeTower) return GCodeExtrusionRole::WipeTower;
assert(false);
return GCodeExtrusionRole::None;
}
std::string gcode_extrusion_role_to_string(GCodeExtrusionRole role)
{
switch (role) {
case GCodeExtrusionRole::None : return L("Unknown");
case GCodeExtrusionRole::Perimeter : return L("Perimeter");
case GCodeExtrusionRole::ExternalPerimeter : return L("External perimeter");
case GCodeExtrusionRole::OverhangPerimeter : return L("Overhang perimeter");
case GCodeExtrusionRole::InternalInfill : return L("Internal infill");
case GCodeExtrusionRole::SolidInfill : return L("Solid infill");
case GCodeExtrusionRole::TopSolidInfill : return L("Top solid infill");
case GCodeExtrusionRole::Ironing : return L("Ironing");
case GCodeExtrusionRole::BridgeInfill : return L("Bridge infill");
case GCodeExtrusionRole::GapFill : return L("Gap fill");
case GCodeExtrusionRole::Skirt : return L("Skirt/Brim");
case GCodeExtrusionRole::SupportMaterial : return L("Support material");
case GCodeExtrusionRole::SupportMaterialInterface : return L("Support material interface");
case GCodeExtrusionRole::WipeTower : return L("Wipe tower");
case GCodeExtrusionRole::Custom : return L("Custom");
default : assert(false);
}
return {};
}
GCodeExtrusionRole string_to_gcode_extrusion_role(const std::string_view role)
{
if (role == L("Perimeter"))
return GCodeExtrusionRole::Perimeter;
else if (role == L("External perimeter"))
return GCodeExtrusionRole::ExternalPerimeter;
else if (role == L("Overhang perimeter"))
return GCodeExtrusionRole::OverhangPerimeter;
else if (role == L("Internal infill"))
return GCodeExtrusionRole::InternalInfill;
else if (role == L("Solid infill"))
return GCodeExtrusionRole::SolidInfill;
else if (role == L("Top solid infill"))
return GCodeExtrusionRole::TopSolidInfill;
else if (role == L("Ironing"))
return GCodeExtrusionRole::Ironing;
else if (role == L("Bridge infill"))
return GCodeExtrusionRole::BridgeInfill;
else if (role == L("Gap fill"))
return GCodeExtrusionRole::GapFill;
else if (role == L("Skirt") || role == L("Skirt/Brim")) // "Skirt" is for backward compatibility with 2.3.1 and earlier
return GCodeExtrusionRole::Skirt;
else if (role == L("Support material"))
return GCodeExtrusionRole::SupportMaterial;
else if (role == L("Support material interface"))
return GCodeExtrusionRole::SupportMaterialInterface;
else if (role == L("Wipe tower"))
return GCodeExtrusionRole::WipeTower;
else if (role == L("Custom"))
return GCodeExtrusionRole::Custom;
else
return GCodeExtrusionRole::None;
}
}

View File

@ -0,0 +1,128 @@
#ifndef slic3r_ExtrusionRole_hpp_
#define slic3r_ExtrusionRole_hpp_
#include "enum_bitmask.hpp"
#include <string>
#include <string_view>
namespace Slic3r {
enum class ExtrusionRoleModifier : uint16_t {
// 1) Extrusion types
// Perimeter (external, inner, ...)
Perimeter,
// Infill (top / bottom / solid inner / sparse inner / bridging inner ...)
Infill,
// Variable width extrusion
Thin,
// Support material extrusion
Support,
Skirt,
Wipe,
// 2) Extrusion modifiers
External,
Solid,
Ironing,
Bridge,
// 3) Special types
// Indicator that the extrusion role was mixed from multiple differing extrusion roles,
// for example from Support and SupportInterface.
Mixed,
// Stopper, there should be maximum 16 modifiers defined for uint16_t bit mask.
Count
};
// There should be maximum 16 modifiers defined for uint16_t bit mask.
static_assert(int(ExtrusionRoleModifier::Count) <= 16, "ExtrusionRoleModifier: there must be maximum 16 modifiers defined to fit a 16 bit bitmask");
using ExtrusionRoleModifiers = enum_bitmask<ExtrusionRoleModifier>;
ENABLE_ENUM_BITMASK_OPERATORS(ExtrusionRoleModifier);
struct ExtrusionRole : public ExtrusionRoleModifiers
{
constexpr ExtrusionRole(const ExtrusionRoleModifier bit) : ExtrusionRoleModifiers(bit) {}
constexpr ExtrusionRole(const ExtrusionRoleModifiers bits) : ExtrusionRoleModifiers(bits) {}
static constexpr const ExtrusionRoleModifiers None{};
// Internal perimeter, not bridging.
static constexpr const ExtrusionRoleModifiers Perimeter{ ExtrusionRoleModifier::Perimeter };
// External perimeter, not bridging.
static constexpr const ExtrusionRoleModifiers ExternalPerimeter{ ExtrusionRoleModifier::Perimeter | ExtrusionRoleModifier::External };
// Perimeter, bridging. To be or'ed with ExtrusionRoleModifier::External for external bridging perimeter.
static constexpr const ExtrusionRoleModifiers OverhangPerimeter{ ExtrusionRoleModifier::Perimeter | ExtrusionRoleModifier::Bridge };
// Sparse internal infill.
static constexpr const ExtrusionRoleModifiers InternalInfill{ ExtrusionRoleModifier::Infill };
// Solid internal infill.
static constexpr const ExtrusionRoleModifiers SolidInfill{ ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid };
// Top solid infill (visible).
//FIXME why there is no bottom solid infill type?
static constexpr const ExtrusionRoleModifiers TopSolidInfill{ ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid | ExtrusionRoleModifier::External };
// Ironing infill at the top surfaces.
static constexpr const ExtrusionRoleModifiers Ironing{ ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid | ExtrusionRoleModifier::Ironing | ExtrusionRoleModifier::External };
// Visible bridging infill at the bottom of an object.
static constexpr const ExtrusionRoleModifiers BridgeInfill{ ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid | ExtrusionRoleModifier::Bridge | ExtrusionRoleModifier::External };
// static constexpr const ExtrusionRoleModifiers InternalBridgeInfill{ ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid | ExtrusionRoleModifier::Bridge };
// Gap fill extrusion, currently used for any variable width extrusion: Thin walls outside of the outer extrusion,
// gap fill in between perimeters, gap fill between the inner perimeter and infill.
//FIXME revise GapFill and ThinWall types, split Gap Fill to Gap Fill and ThinWall.
static constexpr const ExtrusionRoleModifiers GapFill{ ExtrusionRoleModifier::Thin }; // | ExtrusionRoleModifier::External };
// static constexpr const ExtrusionRoleModifiers ThinWall{ ExtrusionRoleModifier::Thin };
static constexpr const ExtrusionRoleModifiers Skirt{ ExtrusionRoleModifier::Skirt };
// Support base material, printed with non-soluble plastic.
static constexpr const ExtrusionRoleModifiers SupportMaterial{ ExtrusionRoleModifier::Support };
// Support interface material, printed with soluble plastic.
static constexpr const ExtrusionRoleModifiers SupportMaterialInterface{ ExtrusionRoleModifier::Support | ExtrusionRoleModifier::External };
// Wipe tower material.
static constexpr const ExtrusionRoleModifiers WipeTower{ ExtrusionRoleModifier::Wipe };
// Extrusion role for a collection with multiple extrusion roles.
static constexpr const ExtrusionRoleModifiers Mixed{ ExtrusionRoleModifier::Mixed };
bool is_perimeter() const { return this->ExtrusionRoleModifiers::has(ExtrusionRoleModifier::Perimeter); }
bool is_external_perimeter() const { return this->is_perimeter() && this->is_external(); }
bool is_infill() const { return this->ExtrusionRoleModifiers::has(ExtrusionRoleModifier::Infill); }
bool is_solid_infill() const { return this->is_infill() && this->ExtrusionRoleModifiers::has(ExtrusionRoleModifier::Solid); }
bool is_external() const { return this->ExtrusionRoleModifiers::has(ExtrusionRoleModifier::External); }
bool is_bridge() const { return this->ExtrusionRoleModifiers::has(ExtrusionRoleModifier::Bridge); }
};
// Special flags describing loop
enum ExtrusionLoopRole {
elrDefault,
elrContourInternalPerimeter,
elrSkirt,
};
// Be careful when editing this list as many parts of the code depend
// on the values of these ordinars, for example
// GCodeViewer::Extrusion_Role_Colors
enum class GCodeExtrusionRole : uint8_t {
None,
Perimeter,
ExternalPerimeter,
OverhangPerimeter,
InternalInfill,
SolidInfill,
TopSolidInfill,
Ironing,
BridgeInfill,
GapFill,
Skirt,
SupportMaterial,
SupportMaterialInterface,
WipeTower,
// Custom (user defined) G-code block, for example start / end G-code.
Custom,
// Stopper to count number of enums.
Count
};
// Convert a rich bitmask based ExtrusionRole to a less expressive ordinal GCodeExtrusionRole.
// GCodeExtrusionRole is to be serialized into G-code and deserialized by G-code viewer,
GCodeExtrusionRole extrusion_role_to_gcode_extrusion_role(ExtrusionRole role);
std::string gcode_extrusion_role_to_string(GCodeExtrusionRole role);
GCodeExtrusionRole string_to_gcode_extrusion_role(const std::string_view role);
}
#endif // slic3r_ExtrusionRole_hpp_

View File

@ -52,7 +52,7 @@ struct SurfaceFillParams
Flow flow;
// For the output
ExtrusionRole extrusion_role = ExtrusionRole(0);
ExtrusionRole extrusion_role{ ExtrusionRole::None };
// Various print settings?
@ -81,8 +81,7 @@ struct SurfaceFillParams
RETURN_COMPARE_NON_EQUAL(flow.height());
RETURN_COMPARE_NON_EQUAL(flow.nozzle_diameter());
RETURN_COMPARE_NON_EQUAL_TYPED(unsigned, bridge);
RETURN_COMPARE_NON_EQUAL_TYPED(unsigned, extrusion_role);
return false;
return this->extrusion_role.lower(rhs.extrusion_role);
}
bool operator==(const SurfaceFillParams &rhs) const {
@ -145,10 +144,10 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
params.extrusion_role =
is_bridge ?
erBridgeInfill :
ExtrusionRole::BridgeInfill :
(surface.is_solid() ?
(surface.is_top() ? erTopSolidInfill : erSolidInfill) :
erInternalInfill);
(surface.is_top() ? ExtrusionRole::TopSolidInfill : ExtrusionRole::SolidInfill) :
ExtrusionRole::InternalInfill);
params.bridge_angle = float(surface.bridge_angle);
params.angle = float(Geometry::deg2rad(region_config.fill_angle.value));
@ -282,7 +281,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
params.extruder = layerm.region().extruder(frSolidInfill);
params.pattern = layerm.region().config().top_fill_pattern == ipMonotonic ? ipMonotonic : ipRectilinear;
params.density = 100.f;
params.extrusion_role = erInternalInfill;
params.extrusion_role = ExtrusionRole::InternalInfill;
params.angle = float(Geometry::deg2rad(layerm.region().config().fill_angle.value));
// calculate the actual flow we'll be using for this infill
params.flow = layerm.flow(frSolidInfill);
@ -785,7 +784,7 @@ void Layer::make_ironing()
eec->no_sort = true;
extrusion_entities_append_paths(
eec->entities, std::move(polylines),
erIroning,
ExtrusionRole::Ironing,
flow_mm3_per_mm, extrusion_width, float(extrusion_height));
insert_fills_into_islands(*this, ironing_params.region_id, fill_begin, uint32_t(ironing_params.layerm->fills().size()));
}

View File

@ -4,7 +4,7 @@
#include "libslic3r.h"
#include "Config.hpp"
#include "Exception.hpp"
#include "ExtrusionEntity.hpp"
#include "ExtrusionRole.hpp"
namespace Slic3r {

View File

@ -148,7 +148,7 @@ namespace Slic3r {
int
OozePrevention::_get_temp(GCode& gcodegen)
{
return (gcodegen.layer() != NULL && gcodegen.layer()->id() == 0)
return (gcodegen.layer() != nullptr && gcodegen.layer()->id() == 0)
? gcodegen.config().first_layer_temperature.get_at(gcodegen.writer().extruder()->id())
: gcodegen.config().temperature.get_at(gcodegen.writer().extruder()->id());
}
@ -244,7 +244,7 @@ namespace Slic3r {
gcodegen.m_avoid_crossing_perimeters.use_external_mp_once();
gcode += gcodegen.travel_to(
wipe_tower_point_to_object_point(gcodegen, start_pos),
erMixed,
ExtrusionRole::Mixed,
"Travel to a Wipe Tower");
gcode += gcodegen.unretract();
}
@ -740,7 +740,7 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu
// Does the file exist? If so, we hope that it is still valid.
{
PrintStateBase::StateWithTimeStamp state = print->step_state_with_timestamp(psGCodeExport);
if (! state.enabled || (state.state == PrintStateBase::DONE && boost::filesystem::exists(boost::filesystem::path(path))))
if (! state.enabled || (state.is_done() && boost::filesystem::exists(boost::filesystem::path(path))))
return;
}
@ -864,7 +864,7 @@ namespace DoExport {
auto min_mm3_per_mm_no_ironing = [](const ExtrusionEntityCollection& eec) -> double {
double min = std::numeric_limits<double>::max();
for (const ExtrusionEntity* ee : eec.entities)
if (ee->role() != erIroning)
if (ee->role() != ExtrusionRole::Ironing)
min = std::min(min, ee->min_mm3_per_mm());
return min;
};
@ -1271,7 +1271,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
this->_print_first_layer_extruder_temperatures(file, print, start_gcode, initial_extruder_id, false);
// adds tag for processor
file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(erCustom).c_str());
file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), gcode_extrusion_role_to_string(GCodeExtrusionRole::Custom).c_str());
// Write the custom start G-code
file.writeln(start_gcode);
@ -1320,7 +1320,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
m_enable_cooling_markers = false; // we're not filtering these moves through CoolingBuffer
m_avoid_crossing_perimeters.use_external_mp_once();
file.write(this->retract());
file.write(this->travel_to(Point(0, 0), erNone, "move to origin position for next object"));
file.write(this->travel_to(Point(0, 0), ExtrusionRole::None, "move to origin position for next object"));
m_enable_cooling_markers = true;
// Disable motion planner when traveling to first object point.
m_avoid_crossing_perimeters.disable_once();
@ -1407,7 +1407,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write(m_writer.set_fan(0));
// adds tag for processor
file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(erCustom).c_str());
file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), gcode_extrusion_role_to_string(GCodeExtrusionRole::Custom).c_str());
// Process filament-specific gcode in extruder order.
{
@ -2182,7 +2182,7 @@ LayerResult GCode::process_layer(
// let analyzer tag generator aware of a role type change
if (layer_tools.has_wipe_tower && m_wipe_tower)
m_last_processor_extrusion_role = erWipeTower;
m_last_processor_extrusion_role = GCodeExtrusionRole::WipeTower;
if (auto loops_it = skirt_loops_per_extruder.find(extruder_id); loops_it != skirt_loops_per_extruder.end()) {
const std::pair<size_t, size_t> loops = loops_it->second;
@ -2305,8 +2305,8 @@ void GCode::process_layer_single_object(
if (! print_wipe_extrusions && layer_to_print.support_layer != nullptr)
if (const SupportLayer &support_layer = *layer_to_print.support_layer; ! support_layer.support_fills.entities.empty()) {
ExtrusionRole role = support_layer.support_fills.role();
bool has_support = role == erMixed || role == erSupportMaterial;
bool has_interface = role == erMixed || role == erSupportMaterialInterface;
bool has_support = role == ExtrusionRole::Mixed || role == ExtrusionRole::SupportMaterial;
bool has_interface = role == ExtrusionRole::Mixed || role == ExtrusionRole::SupportMaterialInterface;
// Extruder ID of the support base. -1 if "don't care".
unsigned int support_extruder = print_object.config().support_material_extruder.value - 1;
// Shall the support be printed with the active extruder, preferably with non-soluble, to avoid tool changes?
@ -2340,8 +2340,8 @@ void GCode::process_layer_single_object(
m_layer = layer_to_print.support_layer;
m_object_layer_over_raft = false;
gcode += this->extrude_support(
// support_extrusion_role is erSupportMaterial, erSupportMaterialInterface or erMixed for all extrusion paths.
support_layer.support_fills.chained_path_from(m_last_pos, has_support ? (has_interface ? erMixed : erSupportMaterial) : erSupportMaterialInterface));
// support_extrusion_role is ExtrusionRole::SupportMaterial, ExtrusionRole::SupportMaterialInterface or ExtrusionRole::Mixed for all extrusion paths.
support_layer.support_fills.chained_path_from(m_last_pos, has_support ? (has_interface ? ExtrusionRole::Mixed : ExtrusionRole::SupportMaterial) : ExtrusionRole::SupportMaterialInterface));
}
}
@ -2385,7 +2385,7 @@ void GCode::process_layer_single_object(
for (uint32_t fill_id : *it_fill_range) {
assert(dynamic_cast<ExtrusionEntityCollection*>(fills.entities[fill_id]));
if (auto *eec = static_cast<ExtrusionEntityCollection*>(fills.entities[fill_id]);
(eec->role() == erIroning) == ironing && shall_print_this_extrusion_collection(eec, region)) {
(eec->role() == ExtrusionRole::Ironing) == ironing && shall_print_this_extrusion_collection(eec, region)) {
if (eec->can_reverse())
// Flatten the infill collection for better path planning.
for (auto *ee : eec->entities)
@ -2601,7 +2601,7 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, const std::string_view descr
if (paths.empty()) return "";
// apply the small perimeter speed
if (is_perimeter(paths.front().role()) && loop.length() <= SMALL_PERIMETER_LENGTH && speed == -1)
if (paths.front().role().is_perimeter() && loop.length() <= SMALL_PERIMETER_LENGTH && speed == -1)
speed = m_config.small_perimeter_speed.get_abs_value(m_config.perimeter_speed);
// extrude along the path
@ -2618,7 +2618,7 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, const std::string_view descr
m_wipe.path = paths.front().polyline;
for (auto it = std::next(paths.begin()); it != paths.end(); ++it) {
if (is_bridge(it->role()))
if (it->role().is_bridge())
break; // Don't perform a wipe on bridges.
assert(it->polyline.points.size() >= 2);
@ -2631,7 +2631,7 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, const std::string_view descr
}
// make a little move inwards before leaving loop
if (paths.back().role() == erExternalPerimeter && m_layer != NULL && m_config.perimeters.value > 1 && paths.front().size() >= 2 && paths.back().polyline.points.size() >= 3) {
if (paths.back().role().is_external_perimeter() && m_layer != NULL && m_config.perimeters.value > 1 && paths.front().size() >= 2 && paths.back().polyline.points.size() >= 3) {
// detect angle between last and first segment
// the side depends on the original winding order of the polygon (left for contours, right for holes)
//FIXME improve the algorithm in case the loop is tiny.
@ -2686,7 +2686,7 @@ std::string GCode::extrude_multi_path(ExtrusionMultiPath multipath, const std::s
m_wipe.path.reverse();
for (auto it = std::next(multipath.paths.rbegin()); it != multipath.paths.rend(); ++it) {
if (is_bridge(it->role()))
if (it->role().is_bridge())
break; // Do not perform a wipe on bridges.
assert(it->polyline.points.size() >= 2);
@ -2739,9 +2739,9 @@ std::string GCode::extrude_support(const ExtrusionEntityCollection &support_fill
const double support_interface_speed = m_config.support_material_interface_speed.get_abs_value(support_speed);
for (const ExtrusionEntity *ee : support_fills.entities) {
ExtrusionRole role = ee->role();
assert(role == erSupportMaterial || role == erSupportMaterialInterface);
const auto label = (role == erSupportMaterial) ? support_label : support_interface_label;
const double speed = (role == erSupportMaterial) ? support_speed : support_interface_speed;
assert(role == ExtrusionRole::SupportMaterial || role == ExtrusionRole::SupportMaterialInterface);
const auto label = (role == ExtrusionRole::SupportMaterial) ? support_label : support_interface_label;
const double speed = (role == ExtrusionRole::SupportMaterial) ? support_speed : support_interface_speed;
const ExtrusionPath *path = dynamic_cast<const ExtrusionPath*>(ee);
if (path)
gcode += this->extrude_path(*path, label, speed);
@ -2831,7 +2831,7 @@ void GCode::GCodeOutputStream::write_format(const char* format, ...)
std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view description, double speed)
{
std::string gcode;
const std::string_view description_bridge = is_bridge(path.role()) ? " (bridge)"sv : ""sv;
const std::string_view description_bridge = path.role().is_bridge() ? " (bridge)"sv : ""sv;
// go to first point of extrusion path
if (!m_last_pos_defined || m_last_pos != path.first_point()) {
@ -2852,11 +2852,11 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
acceleration = m_config.first_layer_acceleration.value;
} else if (this->object_layer_over_raft() && m_config.first_layer_acceleration_over_raft.value > 0) {
acceleration = m_config.first_layer_acceleration_over_raft.value;
} else if (m_config.bridge_acceleration.value > 0 && is_bridge(path.role())) {
} else if (m_config.bridge_acceleration.value > 0 && path.role().is_bridge()) {
acceleration = m_config.bridge_acceleration.value;
} else if (m_config.infill_acceleration.value > 0 && is_infill(path.role())) {
} else if (m_config.infill_acceleration.value > 0 && path.role().is_infill()) {
acceleration = m_config.infill_acceleration.value;
} else if (m_config.perimeter_acceleration.value > 0 && is_perimeter(path.role())) {
} else if (m_config.perimeter_acceleration.value > 0 && path.role().is_perimeter()) {
acceleration = m_config.perimeter_acceleration.value;
} else {
acceleration = m_config.default_acceleration.value;
@ -2872,21 +2872,22 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
// set speed
if (speed == -1) {
if (path.role() == erPerimeter) {
if (path.role() == ExtrusionRole::Perimeter) {
speed = m_config.get_abs_value("perimeter_speed");
} else if (path.role() == erExternalPerimeter) {
} else if (path.role() == ExtrusionRole::ExternalPerimeter) {
speed = m_config.get_abs_value("external_perimeter_speed");
} else if (path.role() == erOverhangPerimeter || path.role() == erBridgeInfill) {
} else if (path.role().is_bridge()) {
assert(path.role().is_perimeter() || path.role() == ExtrusionRole::BridgeInfill);
speed = m_config.get_abs_value("bridge_speed");
} else if (path.role() == erInternalInfill) {
} else if (path.role() == ExtrusionRole::InternalInfill) {
speed = m_config.get_abs_value("infill_speed");
} else if (path.role() == erSolidInfill) {
} else if (path.role() == ExtrusionRole::SolidInfill) {
speed = m_config.get_abs_value("solid_infill_speed");
} else if (path.role() == erTopSolidInfill) {
} else if (path.role() == ExtrusionRole::TopSolidInfill) {
speed = m_config.get_abs_value("top_solid_infill_speed");
} else if (path.role() == erIroning) {
} else if (path.role() == ExtrusionRole::Ironing) {
speed = m_config.get_abs_value("ironing_speed");
} else if (path.role() == erGapFill) {
} else if (path.role() == ExtrusionRole::GapFill) {
speed = m_config.get_abs_value("gap_fill_speed");
} else {
throw Slic3r::InvalidArgument("Invalid speed");
@ -2915,7 +2916,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
bool variable_speed = false;
std::vector<ProcessedPoint> new_points{};
if (this->m_config.enable_dynamic_overhang_speeds && !this->on_first_layer() && is_perimeter(path.role())) {
if (this->m_config.enable_dynamic_overhang_speeds && !this->on_first_layer() && path.role().is_perimeter()) {
new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, m_config.overhang_overlap_levels,
m_config.dynamic_overhang_speeds,
m_config.get_abs_value("external_perimeter_speed"), speed);
@ -2927,9 +2928,9 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
// extrude arc or line
if (m_enable_extrusion_role_markers)
{
if (path.role() != m_last_extrusion_role)
if (GCodeExtrusionRole role = extrusion_role_to_gcode_extrusion_role(path.role()); role != m_last_extrusion_role)
{
m_last_extrusion_role = path.role();
m_last_extrusion_role = role;
if (m_enable_extrusion_role_markers)
{
char buf[32];
@ -2941,14 +2942,14 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
// adds processor tags and updates processor tracking data
// PrusaMultiMaterial::Writer may generate GCodeProcessor::Height_Tag lines without updating m_last_height
// so, if the last role was erWipeTower we force export of GCodeProcessor::Height_Tag lines
bool last_was_wipe_tower = (m_last_processor_extrusion_role == erWipeTower);
// so, if the last role was GCodeExtrusionRole::WipeTower we force export of GCodeProcessor::Height_Tag lines
bool last_was_wipe_tower = (m_last_processor_extrusion_role == GCodeExtrusionRole::WipeTower);
assert(is_decimal_separator_point());
if (path.role() != m_last_processor_extrusion_role) {
m_last_processor_extrusion_role = path.role();
if (GCodeExtrusionRole role = extrusion_role_to_gcode_extrusion_role(path.role()); role != m_last_processor_extrusion_role) {
m_last_processor_extrusion_role = role;
char buf[64];
sprintf(buf, ";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(m_last_processor_extrusion_role).c_str());
sprintf(buf, ";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), gcode_extrusion_role_to_string(m_last_processor_extrusion_role).c_str());
gcode += buf;
}
@ -2975,11 +2976,11 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
std::string comment;
if (m_enable_cooling_markers) {
if (is_bridge(path.role()))
if (path.role().is_bridge())
gcode += ";_BRIDGE_FAN_START\n";
else
comment = ";_EXTRUDE_SET_SPEED";
if (path.role() == erExternalPerimeter)
if (path.role() == ExtrusionRole::ExternalPerimeter)
comment += ";_EXTERNAL_PERIMETER";
}
@ -3026,7 +3027,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
}
if (m_enable_cooling_markers)
gcode += is_bridge(path.role()) ? ";_BRIDGE_FAN_END\n" : ";_EXTRUDE_END\n";
gcode += path.role().is_bridge() ? ";_BRIDGE_FAN_END\n" : ";_EXTRUDE_END\n";
this->set_last_pos(path.last_point());
return gcode;
@ -3112,7 +3113,7 @@ bool GCode::needs_retraction(const Polyline &travel, ExtrusionRole role)
return false;
}
if (role == erSupportMaterial)
if (role == ExtrusionRole::SupportMaterial)
if (const SupportLayer *support_layer = dynamic_cast<const SupportLayer*>(m_layer);
support_layer != nullptr && ! support_layer->support_islands_bboxes.empty()) {
BoundingBox bbox_travel = get_extents(travel);

View File

@ -137,14 +137,14 @@ public:
m_enable_loop_clipping(true),
m_enable_cooling_markers(false),
m_enable_extrusion_role_markers(false),
m_last_processor_extrusion_role(erNone),
m_last_processor_extrusion_role(GCodeExtrusionRole::None),
m_layer_count(0),
m_layer_index(-1),
m_layer(nullptr),
m_object_layer_over_raft(false),
m_volumetric_speed(0),
m_last_pos_defined(false),
m_last_extrusion_role(erNone),
m_last_extrusion_role(GCodeExtrusionRole::None),
m_last_width(0.0f),
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
m_last_mm3_per_mm(0.0),
@ -326,7 +326,7 @@ private:
std::string extrude_support(const ExtrusionEntityCollection &support_fills);
std::string travel_to(const Point &point, ExtrusionRole role, std::string comment);
bool needs_retraction(const Polyline &travel, ExtrusionRole role = erNone);
bool needs_retraction(const Polyline &travel, ExtrusionRole role = ExtrusionRole::None);
std::string retract(bool toolchange = false);
std::string unretract() { return m_writer.unlift() + m_writer.unretract(); }
std::string set_extruder(unsigned int extruder_id, double print_z);
@ -363,7 +363,7 @@ private:
// The Pressure Equalizer removes the markers from the final G-code.
bool m_enable_extrusion_role_markers;
// Keeps track of the last extrusion role passed to the processor
ExtrusionRole m_last_processor_extrusion_role;
GCodeExtrusionRole m_last_processor_extrusion_role;
// How many times will change_layer() be called?
// change_layer() will update the progress bar.
unsigned int m_layer_count;
@ -376,7 +376,7 @@ private:
bool m_object_layer_over_raft;
double m_volumetric_speed;
// Support for the extrusion role markers. Which marker is active?
ExtrusionRole m_last_extrusion_role;
GCodeExtrusionRole m_last_extrusion_role;
// Support for G-Code Processor
float m_last_height{ 0.0f };
float m_last_layer_z{ 0.0f };

View File

@ -415,7 +415,7 @@ void GCodeProcessor::UsedFilaments::process_role_cache(const GCodeProcessor* pro
filament.first = role_cache / s * 0.001;
filament.second = role_cache * processor->m_result.filament_densities[processor->m_extruder_id] * 0.001;
ExtrusionRole active_role = processor->m_extrusion_role;
GCodeExtrusionRole active_role = processor->m_extrusion_role;
if (filaments_per_role.find(active_role) != filaments_per_role.end()) {
filaments_per_role[active_role].first += filament.first;
filaments_per_role[active_role].second += filament.second;
@ -942,7 +942,7 @@ void GCodeProcessor::reset()
m_fan_speed = 0.0f;
m_z_offset = 0.0f;
m_extrusion_role = erNone;
m_extrusion_role = GCodeExtrusionRole::None;
m_extruder_id = 0;
m_extruder_colors.resize(MIN_EXTRUDERS_COUNT);
for (size_t i = 0; i < MIN_EXTRUDERS_COUNT; ++i) {
@ -1170,14 +1170,14 @@ std::vector<std::pair<EMoveType, float>> GCodeProcessor::get_moves_time(PrintEst
return ret;
}
std::vector<std::pair<ExtrusionRole, float>> GCodeProcessor::get_roles_time(PrintEstimatedStatistics::ETimeMode mode) const
std::vector<std::pair<GCodeExtrusionRole, float>> GCodeProcessor::get_roles_time(PrintEstimatedStatistics::ETimeMode mode) const
{
std::vector<std::pair<ExtrusionRole, float>> ret;
std::vector<std::pair<GCodeExtrusionRole, float>> ret;
if (mode < PrintEstimatedStatistics::ETimeMode::Count) {
for (size_t i = 0; i < m_time_processor.machines[static_cast<size_t>(mode)].roles_time.size(); ++i) {
float time = m_time_processor.machines[static_cast<size_t>(mode)].roles_time[i];
if (time > 0.0f)
ret.push_back({ static_cast<ExtrusionRole>(i), time });
ret.push_back({ static_cast<GCodeExtrusionRole>(i), time });
}
}
return ret;
@ -1645,8 +1645,8 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
// extrusion role tag
if (boost::starts_with(comment, reserved_tag(ETags::Role))) {
set_extrusion_role(ExtrusionEntity::string_to_role(comment.substr(reserved_tag(ETags::Role).length())));
if (m_extrusion_role == erExternalPerimeter)
set_extrusion_role(string_to_gcode_extrusion_role(comment.substr(reserved_tag(ETags::Role).length())));
if (m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter)
m_seams_detector.activate(true);
return;
}
@ -1827,27 +1827,27 @@ bool GCodeProcessor::process_cura_tags(const std::string_view comment)
if (pos != comment.npos) {
const std::string_view type = comment.substr(pos + tag.length());
if (type == "SKIRT")
set_extrusion_role(erSkirt);
set_extrusion_role(GCodeExtrusionRole::Skirt);
else if (type == "WALL-OUTER")
set_extrusion_role(erExternalPerimeter);
set_extrusion_role(GCodeExtrusionRole::ExternalPerimeter);
else if (type == "WALL-INNER")
set_extrusion_role(erPerimeter);
set_extrusion_role(GCodeExtrusionRole::Perimeter);
else if (type == "SKIN")
set_extrusion_role(erSolidInfill);
set_extrusion_role(GCodeExtrusionRole::SolidInfill);
else if (type == "FILL")
set_extrusion_role(erInternalInfill);
set_extrusion_role(GCodeExtrusionRole::InternalInfill);
else if (type == "SUPPORT")
set_extrusion_role(erSupportMaterial);
set_extrusion_role(GCodeExtrusionRole::SupportMaterial);
else if (type == "SUPPORT-INTERFACE")
set_extrusion_role(erSupportMaterialInterface);
set_extrusion_role(GCodeExtrusionRole::SupportMaterialInterface);
else if (type == "PRIME-TOWER")
set_extrusion_role(erWipeTower);
set_extrusion_role(GCodeExtrusionRole::WipeTower);
else {
set_extrusion_role(erNone);
set_extrusion_role(GCodeExtrusionRole::None);
BOOST_LOG_TRIVIAL(warning) << "GCodeProcessor found unknown extrusion role: " << type;
}
if (m_extrusion_role == erExternalPerimeter)
if (m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter)
m_seams_detector.activate(true);
return true;
@ -1906,14 +1906,14 @@ bool GCodeProcessor::process_simplify3d_tags(const std::string_view comment)
// ; skirt
pos = cmt.find(" skirt");
if (pos == 0) {
set_extrusion_role(erSkirt);
set_extrusion_role(GCodeExtrusionRole::Skirt);
return true;
}
// ; outer perimeter
pos = cmt.find(" outer perimeter");
if (pos == 0) {
set_extrusion_role(erExternalPerimeter);
set_extrusion_role(GCodeExtrusionRole::ExternalPerimeter);
m_seams_detector.activate(true);
return true;
}
@ -1921,77 +1921,77 @@ bool GCodeProcessor::process_simplify3d_tags(const std::string_view comment)
// ; inner perimeter
pos = cmt.find(" inner perimeter");
if (pos == 0) {
set_extrusion_role(erPerimeter);
set_extrusion_role(GCodeExtrusionRole::Perimeter);
return true;
}
// ; gap fill
pos = cmt.find(" gap fill");
if (pos == 0) {
set_extrusion_role(erGapFill);
set_extrusion_role(GCodeExtrusionRole::GapFill);
return true;
}
// ; infill
pos = cmt.find(" infill");
if (pos == 0) {
set_extrusion_role(erInternalInfill);
set_extrusion_role(GCodeExtrusionRole::InternalInfill);
return true;
}
// ; solid layer
pos = cmt.find(" solid layer");
if (pos == 0) {
set_extrusion_role(erSolidInfill);
set_extrusion_role(GCodeExtrusionRole::SolidInfill);
return true;
}
// ; bridge
pos = cmt.find(" bridge");
if (pos == 0) {
set_extrusion_role(erBridgeInfill);
set_extrusion_role(GCodeExtrusionRole::BridgeInfill);
return true;
}
// ; support
pos = cmt.find(" support");
if (pos == 0) {
set_extrusion_role(erSupportMaterial);
set_extrusion_role(GCodeExtrusionRole::SupportMaterial);
return true;
}
// ; dense support
pos = cmt.find(" dense support");
if (pos == 0) {
set_extrusion_role(erSupportMaterialInterface);
set_extrusion_role(GCodeExtrusionRole::SupportMaterialInterface);
return true;
}
// ; prime pillar
pos = cmt.find(" prime pillar");
if (pos == 0) {
set_extrusion_role(erWipeTower);
set_extrusion_role(GCodeExtrusionRole::WipeTower);
return true;
}
// ; ooze shield
pos = cmt.find(" ooze shield");
if (pos == 0) {
set_extrusion_role(erNone); // Missing mapping
set_extrusion_role(GCodeExtrusionRole::None); // Missing mapping
return true;
}
// ; raft
pos = cmt.find(" raft");
if (pos == 0) {
set_extrusion_role(erSupportMaterial);
set_extrusion_role(GCodeExtrusionRole::SupportMaterial);
return true;
}
// ; internal single extrusion
pos = cmt.find(" internal single extrusion");
if (pos == 0) {
set_extrusion_role(erNone); // Missing mapping
set_extrusion_role(GCodeExtrusionRole::None); // Missing mapping
return true;
}
@ -2043,33 +2043,33 @@ bool GCodeProcessor::process_craftware_tags(const std::string_view comment)
if (pos != comment.npos) {
const std::string_view type = comment.substr(pos + tag.length());
if (type == "Skirt")
set_extrusion_role(erSkirt);
set_extrusion_role(GCodeExtrusionRole::Skirt);
else if (type == "Perimeter")
set_extrusion_role(erExternalPerimeter);
set_extrusion_role(GCodeExtrusionRole::ExternalPerimeter);
else if (type == "HShell")
set_extrusion_role(erNone); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set_extrusion_role(GCodeExtrusionRole::None); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
else if (type == "InnerHair")
set_extrusion_role(erNone); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set_extrusion_role(GCodeExtrusionRole::None); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
else if (type == "Loop")
set_extrusion_role(erNone); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set_extrusion_role(GCodeExtrusionRole::None); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
else if (type == "Infill")
set_extrusion_role(erInternalInfill);
set_extrusion_role(GCodeExtrusionRole::InternalInfill);
else if (type == "Raft")
set_extrusion_role(erSkirt);
set_extrusion_role(GCodeExtrusionRole::Skirt);
else if (type == "Support")
set_extrusion_role(erSupportMaterial);
set_extrusion_role(GCodeExtrusionRole::SupportMaterial);
else if (type == "SupportTouch")
set_extrusion_role(erSupportMaterial);
set_extrusion_role(GCodeExtrusionRole::SupportMaterial);
else if (type == "SoftSupport")
set_extrusion_role(erSupportMaterialInterface);
set_extrusion_role(GCodeExtrusionRole::SupportMaterialInterface);
else if (type == "Pillar")
set_extrusion_role(erWipeTower);
set_extrusion_role(GCodeExtrusionRole::WipeTower);
else {
set_extrusion_role(erNone);
set_extrusion_role(GCodeExtrusionRole::None);
BOOST_LOG_TRIVIAL(warning) << "GCodeProcessor found unknown extrusion role: " << type;
}
if (m_extrusion_role == erExternalPerimeter)
if (m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter)
m_seams_detector.activate(true);
return true;
@ -2093,25 +2093,25 @@ bool GCodeProcessor::process_ideamaker_tags(const std::string_view comment)
if (pos != comment.npos) {
const std::string_view type = comment.substr(pos + tag.length());
if (type == "RAFT")
set_extrusion_role(erSkirt);
set_extrusion_role(GCodeExtrusionRole::Skirt);
else if (type == "WALL-OUTER")
set_extrusion_role(erExternalPerimeter);
set_extrusion_role(GCodeExtrusionRole::ExternalPerimeter);
else if (type == "WALL-INNER")
set_extrusion_role(erPerimeter);
set_extrusion_role(GCodeExtrusionRole::Perimeter);
else if (type == "SOLID-FILL")
set_extrusion_role(erSolidInfill);
set_extrusion_role(GCodeExtrusionRole::SolidInfill);
else if (type == "FILL")
set_extrusion_role(erInternalInfill);
set_extrusion_role(GCodeExtrusionRole::InternalInfill);
else if (type == "BRIDGE")
set_extrusion_role(erBridgeInfill);
set_extrusion_role(GCodeExtrusionRole::BridgeInfill);
else if (type == "SUPPORT")
set_extrusion_role(erSupportMaterial);
set_extrusion_role(GCodeExtrusionRole::SupportMaterial);
else {
set_extrusion_role(erNone);
set_extrusion_role(GCodeExtrusionRole::None);
BOOST_LOG_TRIVIAL(warning) << "GCodeProcessor found unknown extrusion role: " << type;
}
if (m_extrusion_role == erExternalPerimeter)
if (m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter)
m_seams_detector.activate(true);
return true;
@ -2153,35 +2153,35 @@ bool GCodeProcessor::process_kissslicer_tags(const std::string_view comment)
// ; 'Raft Path'
size_t pos = comment.find(" 'Raft Path'");
if (pos == 0) {
set_extrusion_role(erSkirt);
set_extrusion_role(GCodeExtrusionRole::Skirt);
return true;
}
// ; 'Support Interface Path'
pos = comment.find(" 'Support Interface Path'");
if (pos == 0) {
set_extrusion_role(erSupportMaterialInterface);
set_extrusion_role(GCodeExtrusionRole::SupportMaterialInterface);
return true;
}
// ; 'Travel/Ironing Path'
pos = comment.find(" 'Travel/Ironing Path'");
if (pos == 0) {
set_extrusion_role(erIroning);
set_extrusion_role(GCodeExtrusionRole::Ironing);
return true;
}
// ; 'Support (may Stack) Path'
pos = comment.find(" 'Support (may Stack) Path'");
if (pos == 0) {
set_extrusion_role(erSupportMaterial);
set_extrusion_role(GCodeExtrusionRole::SupportMaterial);
return true;
}
// ; 'Perimeter Path'
pos = comment.find(" 'Perimeter Path'");
if (pos == 0) {
set_extrusion_role(erExternalPerimeter);
set_extrusion_role(GCodeExtrusionRole::ExternalPerimeter);
m_seams_detector.activate(true);
return true;
}
@ -2189,56 +2189,56 @@ bool GCodeProcessor::process_kissslicer_tags(const std::string_view comment)
// ; 'Pillar Path'
pos = comment.find(" 'Pillar Path'");
if (pos == 0) {
set_extrusion_role(erNone); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set_extrusion_role(GCodeExtrusionRole::None); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
return true;
}
// ; 'Destring/Wipe/Jump Path'
pos = comment.find(" 'Destring/Wipe/Jump Path'");
if (pos == 0) {
set_extrusion_role(erNone); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set_extrusion_role(GCodeExtrusionRole::None); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
return true;
}
// ; 'Prime Pillar Path'
pos = comment.find(" 'Prime Pillar Path'");
if (pos == 0) {
set_extrusion_role(erNone); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set_extrusion_role(GCodeExtrusionRole::None); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
return true;
}
// ; 'Loop Path'
pos = comment.find(" 'Loop Path'");
if (pos == 0) {
set_extrusion_role(erNone); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set_extrusion_role(GCodeExtrusionRole::None); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
return true;
}
// ; 'Crown Path'
pos = comment.find(" 'Crown Path'");
if (pos == 0) {
set_extrusion_role(erNone); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
set_extrusion_role(GCodeExtrusionRole::None); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
return true;
}
// ; 'Solid Path'
pos = comment.find(" 'Solid Path'");
if (pos == 0) {
set_extrusion_role(erNone);
set_extrusion_role(GCodeExtrusionRole::None);
return true;
}
// ; 'Stacked Sparse Infill Path'
pos = comment.find(" 'Stacked Sparse Infill Path'");
if (pos == 0) {
set_extrusion_role(erInternalInfill);
set_extrusion_role(GCodeExtrusionRole::InternalInfill);
return true;
}
// ; 'Sparse Infill Path'
pos = comment.find(" 'Sparse Infill Path'");
if (pos == 0) {
set_extrusion_role(erSolidInfill);
set_extrusion_role(GCodeExtrusionRole::SolidInfill);
return true;
}
@ -2263,45 +2263,45 @@ bool GCodeProcessor::process_bambustudio_tags(const std::string_view comment)
if (pos != comment.npos) {
const std::string_view type = comment.substr(pos + tag.length());
if (type == "Custom")
set_extrusion_role(erCustom);
set_extrusion_role(GCodeExtrusionRole::Custom);
else if (type == "Inner wall")
set_extrusion_role(erPerimeter);
set_extrusion_role(GCodeExtrusionRole::Perimeter);
else if (type == "Outer wall")
set_extrusion_role(erExternalPerimeter);
set_extrusion_role(GCodeExtrusionRole::ExternalPerimeter);
else if (type == "Overhang wall")
set_extrusion_role(erOverhangPerimeter);
set_extrusion_role(GCodeExtrusionRole::OverhangPerimeter);
else if (type == "Gap infill")
set_extrusion_role(erGapFill);
set_extrusion_role(GCodeExtrusionRole::GapFill);
else if (type == "Bridge")
set_extrusion_role(erBridgeInfill);
set_extrusion_role(GCodeExtrusionRole::BridgeInfill);
else if (type == "Sparse infill")
set_extrusion_role(erInternalInfill);
set_extrusion_role(GCodeExtrusionRole::InternalInfill);
else if (type == "Internal solid infill")
set_extrusion_role(erSolidInfill);
set_extrusion_role(GCodeExtrusionRole::SolidInfill);
else if (type == "Top surface")
set_extrusion_role(erTopSolidInfill);
set_extrusion_role(GCodeExtrusionRole::TopSolidInfill);
else if (type == "Bottom surface")
set_extrusion_role(erNone);
set_extrusion_role(GCodeExtrusionRole::None);
else if (type == "Ironing")
set_extrusion_role(erIroning);
set_extrusion_role(GCodeExtrusionRole::Ironing);
else if (type == "Skirt")
set_extrusion_role(erSkirt);
set_extrusion_role(GCodeExtrusionRole::Skirt);
else if (type == "Brim")
set_extrusion_role(erSkirt);
set_extrusion_role(GCodeExtrusionRole::Skirt);
else if (type == "Support")
set_extrusion_role(erSupportMaterial);
set_extrusion_role(GCodeExtrusionRole::SupportMaterial);
else if (type == "Support interface")
set_extrusion_role(erSupportMaterialInterface);
set_extrusion_role(GCodeExtrusionRole::SupportMaterialInterface);
else if (type == "Support transition")
set_extrusion_role(erNone);
set_extrusion_role(GCodeExtrusionRole::None);
else if (type == "Prime tower")
set_extrusion_role(erWipeTower);
set_extrusion_role(GCodeExtrusionRole::WipeTower);
else {
set_extrusion_role(erNone);
set_extrusion_role(GCodeExtrusionRole::None);
BOOST_LOG_TRIVIAL(warning) << "GCodeProcessor found unknown extrusion role: " << type;
}
if (m_extrusion_role == erExternalPerimeter)
if (m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter)
m_seams_detector.activate(true);
return true;
@ -2405,7 +2405,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
if (m_height == 0.0f)
m_height = DEFAULT_TOOLPATH_HEIGHT;
if (m_end_position[Z] == 0.0f || (m_extrusion_role == erCustom && m_layer_id == 0))
if (m_end_position[Z] == 0.0f || (m_extrusion_role == GCodeExtrusionRole::Custom && m_layer_id == 0))
m_end_position[Z] = m_height;
if (line.comment() != INTERNAL_G2G3_TAG)
@ -2418,10 +2418,10 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
if (m_forced_width > 0.0f)
m_width = m_forced_width;
else if (m_extrusion_role == erExternalPerimeter)
else if (m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter)
// cross section: rectangle
m_width = delta_pos[E] * static_cast<float>(M_PI * sqr(1.05f * filament_radius)) / (delta_xyz * m_height);
else if (m_extrusion_role == erBridgeInfill || m_extrusion_role == erNone)
else if (m_extrusion_role == GCodeExtrusionRole::BridgeInfill || m_extrusion_role == GCodeExtrusionRole::None)
// cross section: circle
m_width = static_cast<float>(m_result.filament_diameters[m_extruder_id]) * std::sqrt(delta_pos[E] / delta_xyz);
else
@ -2605,10 +2605,10 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
if (m_seams_detector.is_active()) {
// check for seam starting vertex
if (type == EMoveType::Extrude && m_extrusion_role == erExternalPerimeter && !m_seams_detector.has_first_vertex())
if (type == EMoveType::Extrude && m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter && !m_seams_detector.has_first_vertex())
m_seams_detector.set_first_vertex(m_result.moves.back().position - m_extruder_offsets[m_extruder_id]);
// check for seam ending vertex and store the resulting move
else if ((type != EMoveType::Extrude || (m_extrusion_role != erExternalPerimeter && m_extrusion_role != erOverhangPerimeter)) && m_seams_detector.has_first_vertex()) {
else if ((type != EMoveType::Extrude || (m_extrusion_role != GCodeExtrusionRole::ExternalPerimeter && m_extrusion_role != GCodeExtrusionRole::OverhangPerimeter)) && m_seams_detector.has_first_vertex()) {
auto set_end_position = [this](const Vec3f& pos) {
m_end_position[X] = pos.x(); m_end_position[Y] = pos.y(); m_end_position[Z] = pos.z();
};
@ -2627,7 +2627,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
m_seams_detector.activate(false);
}
}
else if (type == EMoveType::Extrude && m_extrusion_role == erExternalPerimeter) {
else if (type == EMoveType::Extrude && m_extrusion_role == GCodeExtrusionRole::ExternalPerimeter) {
m_seams_detector.activate(true);
m_seams_detector.set_first_vertex(m_result.moves.back().position - m_extruder_offsets[m_extruder_id]);
}
@ -3771,7 +3771,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type, bool internal_only)
}
}
void GCodeProcessor::set_extrusion_role(ExtrusionRole role)
void GCodeProcessor::set_extrusion_role(GCodeExtrusionRole role)
{
m_used_filaments.process_role_cache(this);
m_extrusion_role = role;

View File

@ -3,7 +3,7 @@
#include "libslic3r/GCodeReader.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/ExtrusionRole.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/CustomGCode.hpp"
@ -47,7 +47,7 @@ namespace Slic3r {
float travel_time;
std::vector<std::pair<CustomGCode::Type, std::pair<float, float>>> custom_gcode_times;
std::vector<std::pair<EMoveType, float>> moves_times;
std::vector<std::pair<ExtrusionRole, float>> roles_times;
std::vector<std::pair<GCodeExtrusionRole, float>> roles_times;
std::vector<float> layers_times;
void reset() {
@ -62,7 +62,7 @@ namespace Slic3r {
std::vector<double> volumes_per_color_change;
std::map<size_t, double> volumes_per_extruder;
std::map<ExtrusionRole, std::pair<double, double>> used_filaments_per_role;
std::map<GCodeExtrusionRole, std::pair<double, double>> used_filaments_per_role;
std::map<size_t, double> cost_per_extruder;
std::array<Mode, static_cast<size_t>(ETimeMode::Count)> modes;
@ -99,7 +99,7 @@ namespace Slic3r {
{
unsigned int gcode_id{ 0 };
EMoveType type{ EMoveType::Noop };
ExtrusionRole extrusion_role{ erNone };
GCodeExtrusionRole extrusion_role{ GCodeExtrusionRole::None };
unsigned char extruder_id{ 0 };
unsigned char cp_color_id{ 0 };
Vec3f position{ Vec3f::Zero() }; // mm
@ -238,7 +238,7 @@ namespace Slic3r {
};
EMoveType move_type{ EMoveType::Noop };
ExtrusionRole role{ erNone };
GCodeExtrusionRole role{ GCodeExtrusionRole::None };
unsigned int g1_line_id{ 0 };
unsigned int layer_id{ 0 };
float distance{ 0.0f }; // mm
@ -310,7 +310,7 @@ namespace Slic3r {
std::vector<TimeBlock> blocks;
std::vector<G1LinesCacheItem> g1_times_cache;
std::array<float, static_cast<size_t>(EMoveType::Count)> moves_time;
std::array<float, static_cast<size_t>(ExtrusionRole::erCount)> roles_time;
std::array<float, static_cast<size_t>(GCodeExtrusionRole::Count)> roles_time;
std::vector<float> layers_time;
void reset();
@ -360,7 +360,7 @@ namespace Slic3r {
std::map<size_t, double> volumes_per_extruder;
double role_cache;
std::map<ExtrusionRole, std::pair<double, double>> filaments_per_role; // ExtrusionRole -> (m, g)
std::map<GCodeExtrusionRole, std::pair<double, double>> filaments_per_role; // ExtrusionRole -> (m, g)
void reset();
@ -441,7 +441,7 @@ namespace Slic3r {
{
float value;
float tag_value;
ExtrusionRole role;
GCodeExtrusionRole role;
};
std::string type;
@ -454,8 +454,8 @@ namespace Slic3r {
: type(type), threshold(threshold)
{}
void update(float value, ExtrusionRole role) {
if (role != erCustom) {
void update(float value, GCodeExtrusionRole role) {
if (role != GCodeExtrusionRole::Custom) {
++count;
if (last_tag_value != 0.0f) {
if (std::abs(value - last_tag_value) / last_tag_value > threshold)
@ -539,7 +539,7 @@ namespace Slic3r {
float m_mm3_per_mm;
float m_fan_speed; // percentage
float m_z_offset; // mm
ExtrusionRole m_extrusion_role;
GCodeExtrusionRole m_extrusion_role;
unsigned char m_extruder_id;
ExtruderColors m_extruder_colors;
ExtruderTemps m_extruder_temps;
@ -620,7 +620,7 @@ namespace Slic3r {
std::vector<std::pair<CustomGCode::Type, std::pair<float, float>>> get_custom_gcode_times(PrintEstimatedStatistics::ETimeMode mode, bool include_remaining) const;
std::vector<std::pair<EMoveType, float>> get_moves_time(PrintEstimatedStatistics::ETimeMode mode) const;
std::vector<std::pair<ExtrusionRole, float>> get_roles_time(PrintEstimatedStatistics::ETimeMode mode) const;
std::vector<std::pair<GCodeExtrusionRole, float>> get_roles_time(PrintEstimatedStatistics::ETimeMode mode) const;
std::vector<float> get_layers_time(PrintEstimatedStatistics::ETimeMode mode) const;
private:
@ -757,7 +757,7 @@ namespace Slic3r {
void store_move_vertex(EMoveType type, bool internal_only = false);
void set_extrusion_role(ExtrusionRole role);
void set_extrusion_role(GCodeExtrusionRole role);
float minimum_feedrate(PrintEstimatedStatistics::ETimeMode mode, float feedrate) const;
float minimum_travel_feedrate(PrintEstimatedStatistics::ETimeMode mode, float feedrate) const;

View File

@ -37,7 +37,7 @@ PressureEqualizer::PressureEqualizer(const Slic3r::GCodeConfig &config) : m_use_
m_current_extruder = 0;
// Zero the position of the XYZE axes + the current feed
memset(m_current_pos, 0, sizeof(float) * 5);
m_current_extrusion_role = erNone;
m_current_extrusion_role = GCodeExtrusionRole::None;
// Expect the first command to fill the nozzle (deretract).
m_retracted = true;
@ -60,9 +60,9 @@ PressureEqualizer::PressureEqualizer(const Slic3r::GCodeConfig &config) : m_use_
}
// Don't regulate the pressure before and after gap-fill and ironing.
for (const ExtrusionRole er : {erGapFill, erIroning}) {
m_max_volumetric_extrusion_rate_slopes[er].negative = 0;
m_max_volumetric_extrusion_rate_slopes[er].positive = 0;
for (const GCodeExtrusionRole er : {GCodeExtrusionRole::GapFill, GCodeExtrusionRole::Ironing}) {
m_max_volumetric_extrusion_rate_slopes[size_t(er)].negative = 0;
m_max_volumetric_extrusion_rate_slopes[size_t(er)].positive = 0;
}
opened_extrude_set_speed_block = false;
@ -185,7 +185,7 @@ bool PressureEqualizer::process_line(const char *line, const char *line_end, GCo
if (strncmp(line, EXTRUSION_ROLE_TAG.data(), EXTRUSION_ROLE_TAG.length()) == 0) {
line += EXTRUSION_ROLE_TAG.length();
int role = atoi(line);
m_current_extrusion_role = ExtrusionRole(role);
m_current_extrusion_role = GCodeExtrusionRole(role);
#ifdef PRESSURE_EQUALIZER_DEBUG
++line_idx;
#endif
@ -519,9 +519,9 @@ void PressureEqualizer::adjust_volumetric_rate()
// Nothing to do, the last move is not extruding.
return;
std::array<float, erCount> feedrate_per_extrusion_role{};
std::array<float, size_t(GCodeExtrusionRole::Count)> feedrate_per_extrusion_role{};
feedrate_per_extrusion_role.fill(std::numeric_limits<float>::max());
feedrate_per_extrusion_role[m_gcode_lines[line_idx].extrusion_role] = m_gcode_lines[line_idx].volumetric_extrusion_rate_start;
feedrate_per_extrusion_role[int(m_gcode_lines[line_idx].extrusion_role)] = m_gcode_lines[line_idx].volumetric_extrusion_rate_start;
while (line_idx != fist_line_idx) {
size_t idx_prev = line_idx - 1;
@ -529,7 +529,7 @@ void PressureEqualizer::adjust_volumetric_rate()
if (!m_gcode_lines[idx_prev].extruding())
break;
// Don't decelerate before ironing and gap-fill.
if (m_gcode_lines[line_idx].extrusion_role == erIroning || m_gcode_lines[line_idx].extrusion_role == erGapFill) {
if (m_gcode_lines[line_idx].extrusion_role == GCodeExtrusionRole::Ironing || m_gcode_lines[line_idx].extrusion_role == GCodeExtrusionRole::GapFill) {
line_idx = idx_prev;
continue;
}
@ -539,23 +539,23 @@ void PressureEqualizer::adjust_volumetric_rate()
line_idx = idx_prev;
GCodeLine &line = m_gcode_lines[line_idx];
for (size_t iRole = 1; iRole < erCount; ++ iRole) {
for (size_t iRole = 1; iRole < size_t(GCodeExtrusionRole::Count); ++ iRole) {
const float &rate_slope = m_max_volumetric_extrusion_rate_slopes[iRole].negative;
if (rate_slope == 0 || feedrate_per_extrusion_role[iRole] == std::numeric_limits<float>::max())
continue; // The negative rate is unlimited or the rate for ExtrusionRole iRole is unlimited.
continue; // The negative rate is unlimited or the rate for GCodeExtrusionRole iRole is unlimited.
float rate_end = feedrate_per_extrusion_role[iRole];
if (iRole == line.extrusion_role && rate_succ < rate_end)
if (iRole == size_t(line.extrusion_role) && rate_succ < rate_end)
// Limit by the succeeding volumetric flow rate.
rate_end = rate_succ;
if (!line.adjustable_flow || line.extrusion_role == erExternalPerimeter || line.extrusion_role == erGapFill || line.extrusion_role == erBridgeInfill || line.extrusion_role == erIroning) {
if (!line.adjustable_flow || line.extrusion_role == GCodeExtrusionRole::ExternalPerimeter || line.extrusion_role == GCodeExtrusionRole::GapFill || line.extrusion_role == GCodeExtrusionRole::BridgeInfill || line.extrusion_role == GCodeExtrusionRole::Ironing) {
rate_end = line.volumetric_extrusion_rate_end;
} else if (line.volumetric_extrusion_rate_end > rate_end) {
line.volumetric_extrusion_rate_end = rate_end;
line.max_volumetric_extrusion_rate_slope_negative = rate_slope;
line.modified = true;
} else if (iRole == line.extrusion_role) {
} else if (iRole == size_t(line.extrusion_role)) {
rate_end = line.volumetric_extrusion_rate_end;
} else {
// Use the original, 'floating' extrusion rate as a starting point for the limiter.
@ -573,13 +573,13 @@ void PressureEqualizer::adjust_volumetric_rate()
}
// feedrate_per_extrusion_role[iRole] = (iRole == line.extrusion_role) ? line.volumetric_extrusion_rate_start : rate_start;
// Don't store feed rate for ironing and gap-fill.
if (line.extrusion_role != erIroning && line.extrusion_role != erGapFill)
if (line.extrusion_role != GCodeExtrusionRole::Ironing && line.extrusion_role != GCodeExtrusionRole::GapFill)
feedrate_per_extrusion_role[iRole] = line.volumetric_extrusion_rate_start;
}
}
feedrate_per_extrusion_role.fill(std::numeric_limits<float>::max());
feedrate_per_extrusion_role[m_gcode_lines[line_idx].extrusion_role] = m_gcode_lines[line_idx].volumetric_extrusion_rate_end;
feedrate_per_extrusion_role[size_t(m_gcode_lines[line_idx].extrusion_role)] = m_gcode_lines[line_idx].volumetric_extrusion_rate_end;
assert(m_gcode_lines[line_idx].extruding());
while (line_idx != last_line_idx) {
@ -588,7 +588,7 @@ void PressureEqualizer::adjust_volumetric_rate()
if (!m_gcode_lines[idx_next].extruding())
break;
// Don't accelerate after ironing and gap-fill.
if (m_gcode_lines[line_idx].extrusion_role == erIroning || m_gcode_lines[line_idx].extrusion_role == erGapFill) {
if (m_gcode_lines[line_idx].extrusion_role == GCodeExtrusionRole::Ironing || m_gcode_lines[line_idx].extrusion_role == GCodeExtrusionRole::GapFill) {
line_idx = idx_next;
continue;
}
@ -597,21 +597,21 @@ void PressureEqualizer::adjust_volumetric_rate()
line_idx = idx_next;
GCodeLine &line = m_gcode_lines[line_idx];
for (size_t iRole = 1; iRole < erCount; ++ iRole) {
for (size_t iRole = 1; iRole < size_t(GCodeExtrusionRole::Count); ++ iRole) {
const float &rate_slope = m_max_volumetric_extrusion_rate_slopes[iRole].positive;
if (rate_slope == 0 || feedrate_per_extrusion_role[iRole] == std::numeric_limits<float>::max())
continue; // The positive rate is unlimited or the rate for ExtrusionRole iRole is unlimited.
continue; // The positive rate is unlimited or the rate for GCodeExtrusionRole iRole is unlimited.
float rate_start = feedrate_per_extrusion_role[iRole];
if (!line.adjustable_flow || line.extrusion_role == erExternalPerimeter || line.extrusion_role == erGapFill || line.extrusion_role == erBridgeInfill || line.extrusion_role == erIroning) {
if (!line.adjustable_flow || line.extrusion_role == GCodeExtrusionRole::ExternalPerimeter || line.extrusion_role == GCodeExtrusionRole::GapFill || line.extrusion_role == GCodeExtrusionRole::BridgeInfill || line.extrusion_role == GCodeExtrusionRole::Ironing) {
rate_start = line.volumetric_extrusion_rate_start;
} else if (iRole == line.extrusion_role && rate_prec < rate_start)
} else if (iRole == size_t(line.extrusion_role) && rate_prec < rate_start)
rate_start = rate_prec;
if (line.volumetric_extrusion_rate_start > rate_start) {
line.volumetric_extrusion_rate_start = rate_start;
line.max_volumetric_extrusion_rate_slope_positive = rate_slope;
line.modified = true;
} else if (iRole == line.extrusion_role) {
} else if (iRole == size_t(line.extrusion_role)) {
rate_start = line.volumetric_extrusion_rate_start;
} else {
// Use the original, 'floating' extrusion rate as a starting point for the limiter.
@ -629,7 +629,7 @@ void PressureEqualizer::adjust_volumetric_rate()
}
// feedrate_per_extrusion_role[iRole] = (iRole == line.extrusion_role) ? line.volumetric_extrusion_rate_end : rate_end;
// Don't store feed rate for ironing and gap-fill.
if (line.extrusion_role != erIroning && line.extrusion_role != erGapFill)
if (line.extrusion_role != GCodeExtrusionRole::Ironing && line.extrusion_role != GCodeExtrusionRole::GapFill)
feedrate_per_extrusion_role[iRole] = line.volumetric_extrusion_rate_end;
}
}
@ -713,7 +713,7 @@ void PressureEqualizer::push_line_to_output(const size_t line_idx, const float n
GCodeG1Formatter feedrate_formatter;
feedrate_formatter.emit_f(new_feedrate);
feedrate_formatter.emit_string(std::string(EXTRUDE_SET_SPEED_TAG.data(), EXTRUDE_SET_SPEED_TAG.length()));
if (line.extrusion_role == erExternalPerimeter)
if (line.extrusion_role == GCodeExtrusionRole::ExternalPerimeter)
feedrate_formatter.emit_string(std::string(EXTERNAL_PERIMETER_TAG.data(), EXTERNAL_PERIMETER_TAG.length()));
push_to_output(feedrate_formatter);

View File

@ -3,7 +3,7 @@
#include "../libslic3r.h"
#include "../PrintConfig.hpp"
#include "../ExtrusionEntity.hpp"
#include "../ExtrusionRole.hpp"
#include <queue>
@ -65,7 +65,7 @@ private:
float positive;
float negative;
};
ExtrusionRateSlope m_max_volumetric_extrusion_rate_slopes[erCount];
ExtrusionRateSlope m_max_volumetric_extrusion_rate_slopes[size_t(GCodeExtrusionRole::Count)];
float m_max_volumetric_extrusion_rate_slope_positive;
float m_max_volumetric_extrusion_rate_slope_negative;
@ -77,7 +77,7 @@ private:
// X,Y,Z,E,F
float m_current_pos[5];
size_t m_current_extruder;
ExtrusionRole m_current_extrusion_role;
GCodeExtrusionRole m_current_extrusion_role;
bool m_retracted;
bool m_use_relative_e_distances;
@ -149,7 +149,7 @@ private:
// Index of the active extruder.
size_t extruder_id;
// Extrusion role of this segment.
ExtrusionRole extrusion_role;
GCodeExtrusionRole extrusion_role;
// Current volumetric extrusion rate.
float volumetric_extrusion_rate;

View File

@ -407,13 +407,13 @@ Polygons extract_perimeter_polygons(const Layer *layer, std::vector<const LayerR
ExtrusionRole role = perimeter->role();
if (perimeter->is_loop()) {
for (const ExtrusionPath &path : static_cast<const ExtrusionLoop*>(perimeter)->paths) {
if (path.role() == ExtrusionRole::erExternalPerimeter) {
role = ExtrusionRole::erExternalPerimeter;
if (path.role() == ExtrusionRole::ExternalPerimeter) {
role = ExtrusionRole::ExternalPerimeter;
}
}
}
if (role == ExtrusionRole::erExternalPerimeter) {
if (role == ExtrusionRole::ExternalPerimeter) {
Points p;
perimeter->collect_points(p);
polygons.emplace_back(std::move(p));
@ -1548,7 +1548,7 @@ void SeamPlacer::place_seam(const Layer *layer, ExtrusionLoop &loop, bool extern
Point seam_point = Point::new_scale(seam_position.x(), seam_position.y());
if (loop.role() == ExtrusionRole::erPerimeter) { //Hopefully inner perimeter
if (loop.role() == ExtrusionRole::Perimeter) { //Hopefully inner perimeter
const SeamCandidate &perimeter_point = layer_perimeters.points[seam_index];
ExtrusionLoop::ClosestPathPoint projected_point = loop.get_closest_path_and_point(seam_point, false);
// determine depth of the seam point.

View File

@ -63,11 +63,11 @@ unsigned int LayerTools::extruder(const ExtrusionEntityCollection &extrusions, c
assert(region.config().infill_extruder.value > 0);
assert(region.config().solid_infill_extruder.value > 0);
// 1 based extruder ID.
unsigned int extruder = ((this->extruder_override == 0) ?
(is_infill(extrusions.role()) ?
(is_solid_infill(extrusions.entities.front()->role()) ? region.config().solid_infill_extruder : region.config().infill_extruder) :
unsigned int extruder = this->extruder_override == 0 ?
(extrusions.role().is_infill() ?
(extrusions.entities.front()->role().is_solid_infill() ? region.config().solid_infill_extruder : region.config().infill_extruder) :
region.config().perimeter_extruder.value) :
this->extruder_override);
this->extruder_override;
return (extruder == 0) ? 0 : extruder - 1;
}
@ -197,7 +197,7 @@ void ToolOrdering::initialize_layers(std::vector<coordf_t> &zs)
if (object.config().wipe_into_objects)
return true;
if (!region.config().wipe_into_infill || eec.role() != erInternalInfill)
if (!region.config().wipe_into_infill || eec.role() != ExtrusionRole::InternalInfill)
return false;
return true;
@ -210,8 +210,8 @@ void ToolOrdering::collect_extruders(const PrintObject &object, const std::vecto
for (auto support_layer : object.support_layers()) {
LayerTools &layer_tools = this->tools_for_layer(support_layer->print_z);
ExtrusionRole role = support_layer->support_fills.role();
bool has_support = role == erMixed || role == erSupportMaterial;
bool has_interface = role == erMixed || role == erSupportMaterialInterface;
bool has_support = role == ExtrusionRole::Mixed || role == ExtrusionRole::SupportMaterial;
bool has_interface = role == ExtrusionRole::Mixed || role == ExtrusionRole::SupportMaterialInterface;
unsigned int extruder_support = object.config().support_material_extruder.value;
unsigned int extruder_interface = object.config().support_material_interface_extruder.value;
if (has_support)
@ -266,10 +266,10 @@ void ToolOrdering::collect_extruders(const PrintObject &object, const std::vecto
for (const ExtrusionEntity *ee : layerm->fills()) {
// fill represents infill extrusions of a single island.
const auto *fill = dynamic_cast<const ExtrusionEntityCollection*>(ee);
ExtrusionRole role = fill->entities.empty() ? erNone : fill->entities.front()->role();
if (is_solid_infill(role))
ExtrusionRole role = fill->entities.empty() ? ExtrusionRole::None : fill->entities.front()->role();
if (role.is_solid_infill())
has_solid_infill = true;
else if (role != erNone)
else if (role != ExtrusionRole::None)
has_infill = true;
if (m_print_config_ptr) {

View File

@ -37,7 +37,7 @@ public:
// adds tag for analyzer:
std::ostringstream str;
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height) << m_layer_height << "\n"; // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role) << ExtrusionEntity::role_to_string(erWipeTower) << "\n";
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role) << gcode_extrusion_role_to_string(GCodeExtrusionRole::WipeTower) << "\n";
m_gcode += str.str();
change_analyzer_line_width(line_width);
}

View File

@ -568,19 +568,33 @@ void Layer::sort_perimeters_into_islands(
const std::pair<ExtrusionRange, ExtrusionRange> &extrusions = perimeter_and_gapfill_ranges[islice];
Point sample;
bool sample_set = false;
if (! extrusions.first.empty()) {
sample = this_layer_region.perimeters().entities[*extrusions.first.begin()]->first_point();
sample_set = true;
} else if (! extrusions.second.empty()) {
sample = this_layer_region.thin_fills().entities[*extrusions.second.begin()]->first_point();
sample_set = true;
} else {
for (uint32_t iexpoly : fill_expolygons_ranges[islice])
if (const ExPolygon &expoly = fill_expolygons[iexpoly]; ! expoly.empty()) {
sample = expoly.contour.points.front();
// Take a sample deep inside its island if available. Infills are usually quite far from the island boundary.
for (uint32_t iexpoly : fill_expolygons_ranges[islice])
if (const ExPolygon &expoly = fill_expolygons[iexpoly]; ! expoly.empty()) {
sample = expoly.contour.points.front();
sample_set = true;
break;
}
if (! sample_set) {
// If there is no infill, take a sample of some inner perimeter.
for (uint32_t iperimeter : extrusions.first)
if (const ExtrusionEntity &ee = *this_layer_region.perimeters().entities[iperimeter]; ! ee.role().is_external()) {
sample = ee.first_point();
sample_set = true;
break;
}
if (! sample_set) {
if (! extrusions.second.empty()) {
// If there is no inner perimeter, take a sample of some gap fill extrusion.
sample = this_layer_region.thin_fills().entities[*extrusions.second.begin()]->first_point();
sample_set = true;
}
if (! sample_set && ! extrusions.first.empty()) {
// As a last resort, take a sample of some external perimeter.
sample = this_layer_region.perimeters().entities[*extrusions.first.begin()]->first_point();
sample_set = true;
}
}
}
// There may be a valid empty island.
// assert(sample_set);
@ -729,27 +743,37 @@ void Layer::sort_perimeters_into_islands(
perimeter_slices_queue.pop_back();
break;
}
// If anything fails to be sorted in using exact fit, try to find a closest island.
auto point_inside_surface_dist2 =
[&lslices = this->lslices, &lslices_ex = this->lslices_ex, bbox_eps = scaled<coord_t>(this->object()->print()->config().gcode_resolution.value) + SCALED_EPSILON]
(const size_t lslice_idx, const Point &point) {
const BoundingBox &bbox = lslices_ex[lslice_idx].bbox;
return
point.x() < bbox.min.x() - bbox_eps || point.x() > bbox.max.x() + bbox_eps ||
point.y() < bbox.min.y() - bbox_eps || point.y() > bbox.max.y() + bbox_eps ?
std::numeric_limits<double>::max() :
(lslices[lslice_idx].point_projection(point) - point).cast<double>().squaredNorm();
};
for (auto it_source_slice = perimeter_slices_queue.begin(); it_source_slice != perimeter_slices_queue.end(); ++ it_source_slice) {
double d2min = std::numeric_limits<double>::max();
int lslice_idx_min = -1;
for (int lslice_idx = int(lslices_ex.size()) - 1; lslice_idx >= 0; -- lslice_idx)
if (double d2 = point_inside_surface_dist2(lslice_idx, it_source_slice->second); d2 < d2min) {
d2min = d2;
lslice_idx_min = lslice_idx;
}
assert(lslice_idx_min != -1);
insert_into_island(lslice_idx_min, it_source_slice->first);
if (! perimeter_slices_queue.empty()) {
// If the slice sample was not fitted into any slice using exact fit, try to find a closest island as a last resort.
// This should be a rare event especially if the sample point was taken from infill or inner perimeter,
// however we may land here for external perimeter only islands with fuzzy skin applied.
// Check whether fuzzy skin was enabled and adjust the bounding box accordingly.
const PrintConfig &print_config = this->object()->print()->config();
const PrintRegionConfig &region_config = this_layer_region.region().config();
const auto bbox_eps = scaled<coord_t>(
EPSILON + print_config.gcode_resolution.value +
(region_config.fuzzy_skin.value == FuzzySkinType::None ? 0. : region_config.fuzzy_skin_thickness.value));
auto point_inside_surface_dist2 =
[&lslices = this->lslices, &lslices_ex = this->lslices_ex, bbox_eps]
(const size_t lslice_idx, const Point &point) {
const BoundingBox &bbox = lslices_ex[lslice_idx].bbox;
return
point.x() < bbox.min.x() - bbox_eps || point.x() > bbox.max.x() + bbox_eps ||
point.y() < bbox.min.y() - bbox_eps || point.y() > bbox.max.y() + bbox_eps ?
std::numeric_limits<double>::max() :
(lslices[lslice_idx].point_projection(point) - point).cast<double>().squaredNorm();
};
for (auto it_source_slice = perimeter_slices_queue.begin(); it_source_slice != perimeter_slices_queue.end(); ++ it_source_slice) {
double d2min = std::numeric_limits<double>::max();
int lslice_idx_min = -1;
for (int lslice_idx = int(lslices_ex.size()) - 1; lslice_idx >= 0; -- lslice_idx)
if (double d2 = point_inside_surface_dist2(lslice_idx, it_source_slice->second); d2 < d2min) {
d2min = d2;
lslice_idx_min = lslice_idx;
}
assert(lslice_idx_min != -1);
insert_into_island(lslice_idx_min, it_source_slice->first);
}
}
}

View File

@ -114,7 +114,7 @@ ExtrusionMultiPath PerimeterGenerator::thick_polyline_to_multi_path(const ThickP
}
const double w = fmax(line.a_width, line.b_width);
const Flow new_flow = (role == erOverhangPerimeter && flow.bridge()) ? flow : flow.with_width(unscale<float>(w) + flow.height() * float(1. - 0.25 * PI));
const Flow new_flow = (role.is_bridge() && flow.bridge()) ? flow : flow.with_width(unscale<float>(w) + flow.height() * float(1. - 0.25 * PI));
if (path.polyline.points.empty()) {
path.polyline.append(line.a);
path.polyline.append(line.b);
@ -292,9 +292,9 @@ static ExtrusionEntityCollection traverse_loops_classic(const PerimeterGenerator
for (const PerimeterGeneratorLoop &loop : loops) {
bool is_external = loop.is_external();
ExtrusionRole role;
ExtrusionLoopRole loop_role;
role = is_external ? erExternalPerimeter : erPerimeter;
ExtrusionRole role_normal = is_external ? ExtrusionRole::ExternalPerimeter : ExtrusionRole::Perimeter;
ExtrusionRole role_overhang = role_normal | ExtrusionRoleModifier::Bridge;
if (loop.is_internal_contour()) {
// Note that we set loop role to ContourInternalPerimeter
// also when loop is both internal and external (i.e.
@ -321,7 +321,7 @@ static ExtrusionEntityCollection traverse_loops_classic(const PerimeterGenerator
extrusion_paths_append(
paths,
intersection_pl({ polygon }, lower_slices_polygons_clipped),
role,
role_normal,
is_external ? params.ext_mm3_per_mm : params.mm3_per_mm,
is_external ? params.ext_perimeter_flow.width() : params.perimeter_flow.width(),
float(params.layer_height));
@ -332,7 +332,7 @@ static ExtrusionEntityCollection traverse_loops_classic(const PerimeterGenerator
extrusion_paths_append(
paths,
diff_pl({ polygon }, lower_slices_polygons_clipped),
erOverhangPerimeter,
role_overhang,
params.mm3_per_mm_overhang,
params.overhang_flow.width(),
params.overhang_flow.height());
@ -341,7 +341,7 @@ static ExtrusionEntityCollection traverse_loops_classic(const PerimeterGenerator
// We allow polyline reversal because Clipper may have randomly reversed polylines during clipping.
chain_and_reorder_extrusion_paths(paths, &paths.front().first_point());
} else {
ExtrusionPath path(role);
ExtrusionPath path(role_normal);
path.polyline = polygon.split_at_first_point();
path.mm3_per_mm = is_external ? params.ext_mm3_per_mm : params.mm3_per_mm;
path.width = is_external ? params.ext_perimeter_flow.width() : params.perimeter_flow.width();
@ -354,7 +354,7 @@ static ExtrusionEntityCollection traverse_loops_classic(const PerimeterGenerator
// Append thin walls to the nearest-neighbor search (only for first iteration)
if (! thin_walls.empty()) {
variable_width_classic(thin_walls, erExternalPerimeter, params.ext_perimeter_flow, coll.entities);
variable_width_classic(thin_walls, ExtrusionRole::ExternalPerimeter, params.ext_perimeter_flow, coll.entities);
thin_walls.clear();
}
@ -503,7 +503,8 @@ static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator::P
continue;
const bool is_external = extrusion->inset_idx == 0;
ExtrusionRole role = is_external ? erExternalPerimeter : erPerimeter;
ExtrusionRole role_normal = is_external ? ExtrusionRole::ExternalPerimeter : ExtrusionRole::Perimeter;
ExtrusionRole role_overhang = role_normal | ExtrusionRoleModifier::Bridge;
if (pg_extrusion.fuzzify)
fuzzy_extrusion_line(*extrusion, scaled<float>(params.config.fuzzy_skin_thickness.value), scaled<float>(params.config.fuzzy_skin_point_dist.value));
@ -541,13 +542,13 @@ static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator::P
}
// get non-overhang paths by intersecting this loop with the grown lower slices
extrusion_paths_append(paths, clip_extrusion(extrusion_path, lower_slices_paths, ClipperLib_Z::ctIntersection), role,
extrusion_paths_append(paths, clip_extrusion(extrusion_path, lower_slices_paths, ClipperLib_Z::ctIntersection), role_normal,
is_external ? params.ext_perimeter_flow : params.perimeter_flow);
// get overhang paths by checking what parts of this loop fall
// outside the grown lower slices (thus where the distance between
// the loop centerline and original lower slices is >= half nozzle diameter
extrusion_paths_append(paths, clip_extrusion(extrusion_path, lower_slices_paths, ClipperLib_Z::ctDifference), erOverhangPerimeter,
extrusion_paths_append(paths, clip_extrusion(extrusion_path, lower_slices_paths, ClipperLib_Z::ctDifference), role_overhang,
params.overhang_flow);
// Reapply the nearest point search for starting point.
@ -568,7 +569,7 @@ static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator::P
for (const ExtrusionPath &path : paths) {
++point_occurrence[path.polyline.first_point()].occurrence;
++point_occurrence[path.polyline.last_point()].occurrence;
if (path.role() == erOverhangPerimeter) {
if (path.role().is_bridge()) {
point_occurrence[path.polyline.first_point()].is_overhang = true;
point_occurrence[path.polyline.last_point()].is_overhang = true;
}
@ -588,7 +589,7 @@ static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator::P
chain_and_reorder_extrusion_paths(paths, &start_point);
}
} else {
extrusion_paths_append(paths, *extrusion, role, is_external ? params.ext_perimeter_flow : params.perimeter_flow);
extrusion_paths_append(paths, *extrusion, role_normal, is_external ? params.ext_perimeter_flow : params.perimeter_flow);
}
// Append paths to collection.
@ -938,7 +939,7 @@ std::tuple<std::vector<ExtrusionPaths>, Polygons> generate_extra_perimeters_over
Polygons shrinked = offset(prev, -0.4 * overhang_flow.scaled_spacing());
if (!shrinked.empty()) {
overhang_region.emplace_back();
extrusion_paths_append(overhang_region.back(), perimeter, erOverhangPerimeter, overhang_flow.mm3_per_mm(),
extrusion_paths_append(overhang_region.back(), perimeter, ExtrusionRole::OverhangPerimeter, overhang_flow.mm3_per_mm(),
overhang_flow.width(), overhang_flow.height());
}
@ -953,13 +954,13 @@ std::tuple<std::vector<ExtrusionPaths>, Polygons> generate_extra_perimeters_over
if (!fills.empty()) {
fills = intersection_pl(fills, inset_overhang_area);
overhang_region.emplace_back();
extrusion_paths_append(overhang_region.back(), fills, erOverhangPerimeter, overhang_flow.mm3_per_mm(),
extrusion_paths_append(overhang_region.back(), fills, ExtrusionRole::OverhangPerimeter, overhang_flow.mm3_per_mm(),
overhang_flow.width(), overhang_flow.height());
}
break;
} else {
overhang_region.emplace_back();
extrusion_paths_append(overhang_region.back(), perimeter, erOverhangPerimeter, overhang_flow.mm3_per_mm(),
extrusion_paths_append(overhang_region.back(), perimeter, ExtrusionRole::OverhangPerimeter, overhang_flow.mm3_per_mm(),
overhang_flow.width(), overhang_flow.height());
}
@ -981,7 +982,7 @@ std::tuple<std::vector<ExtrusionPaths>, 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, erOverhangPerimeter, overhang_flow.mm3_per_mm(),
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());
@ -1502,7 +1503,7 @@ void PerimeterGenerator::process_classic(
ex.medial_axis(min, max, &polylines);
if (! polylines.empty()) {
ExtrusionEntityCollection gap_fill;
variable_width_classic(polylines, erGapFill, params.solid_infill_flow, gap_fill.entities);
variable_width_classic(polylines, ExtrusionRole::GapFill, params.solid_infill_flow, gap_fill.entities);
/* Make sure we don't infill narrow parts that are already gap-filled
(we only consider this surface's gaps to reduce the diff() complexity).
Growing actual extrusions ensures that gaps not filled by medial axis

View File

@ -3,6 +3,7 @@
#include "libslic3r.h"
#include <vector>
#include "ExtrusionEntityCollection.hpp"
#include "Flow.hpp"
#include "Polygon.hpp"
#include "PrintConfig.hpp"

View File

@ -1029,7 +1029,7 @@ void Print::_make_skirt()
ExtrusionLoop eloop(elrSkirt);
eloop.paths.emplace_back(ExtrusionPath(
ExtrusionPath(
erSkirt,
ExtrusionRole::Skirt,
(float)mm3_per_mm, // this will be overridden at G-code export time
flow.width(),
(float)first_layer_height // this will be overridden at G-code export time

View File

@ -358,11 +358,15 @@ private:
// If ! m_slicing_params.valid, recalculate.
void update_slicing_parameters();
// Called on main thread with stopped or paused background processing to let PrintObject release data for its milestones that were invalidated or canceled.
void cleanup();
static PrintObjectConfig object_config_from_model_object(const PrintObjectConfig &default_object_config, const ModelObject &object, size_t num_extruders);
private:
void make_perimeters();
void prepare_infill();
void clear_fills();
void infill();
void ironing();
void generate_support_spots();

View File

@ -1470,9 +1470,11 @@ void Print::cleanup()
for (auto it = all_objects.begin(); it != all_objects.end();) {
PrintObjectRegions *shared_regions = (*it)->m_shared_regions;
auto it_begin = it;
for (++ it; it != all_objects.end() && shared_regions == (*it)->shared_regions(); ++ it);
for (; it != all_objects.end() && shared_regions == (*it)->shared_regions(); ++ it)
// Let the PrintObject clean up its data with invalidated milestones.
(*it)->cleanup();
auto this_objects = SpanOfConstPtrs<PrintObject>(const_cast<const PrintObject* const* const>(&(*it_begin)), it - it_begin);
if (Print::is_shared_print_object_step_valid_unguarded(this_objects, posSupportSpotsSearch))
if (! Print::is_shared_print_object_step_valid_unguarded(this_objects, posSupportSpotsSearch))
shared_regions->generated_support_points.reset();
}
}

View File

@ -23,10 +23,29 @@ public:
class PrintStateBase {
public:
enum State {
INVALID,
STARTED,
DONE,
enum class State {
// Fresh state, either the object is new or the data of that particular milestone was cleaned up.
// Fresh state may transit to Started.
Fresh,
// Milestone was started and now it is being executed.
// Started state may transit to Canceled with invalid data or Done with valid data.
Started,
// Milestone was being executed, but now it is canceled and not yet cleaned up.
// Canceled state may transit to Fresh state if its invalid data is cleaned up
// or to Started state.
// Canceled and Invalidated states are of similar nature: Canceled step was Started but canceled,
// while Invalidated state was Done but invalidated.
Canceled,
// Milestone was finished successfully, it's data is now valid.
// Done state may transit to Invalidated state if its data is no more valid
// or to a Started state.
Done,
// Milestone was finished successfully (done), but now it is invalidated and it's data is no more valid.
// Invalidated state may transit to Fresh if its invalid data is cleaned up,
// or to state Started.
// Canceled and Invalidated states are of similar nature: Canceled step was Started but canceled,
// while Invalidated state was Done but invalidated.
Invalidated,
};
enum class WarningLevel {
@ -39,9 +58,25 @@ public:
// A new unique timestamp is being assigned to the step every time the step changes its state.
struct StateWithTimeStamp
{
State state { INVALID };
State state { State::Fresh };
TimeStamp timestamp { 0 };
bool enabled { true };
bool is_done() const { return state == State::Done; }
// The milestone may have some data available, but it is no more valid and it should be cleaned up to conserve memory.
bool is_dirty() const { return state == State::Canceled || state == State::Invalidated; }
// If the milestone is Started or Done, invalidate it:
// Turn Started to Canceled, turn Done to Invalidated.
// Update timestamp of this milestone.
bool try_invalidate() {
bool invalidated = this->state == State::Started || this->state == State::Done;
if (invalidated) {
this->state = this->state == State::Started ? State::Canceled : State::Invalidated;
this->timestamp = ++ g_last_timestamp;
}
return invalidated;
}
};
struct Warning
@ -93,11 +128,11 @@ public:
}
bool is_started(StepType step, std::mutex &mtx) const {
return this->state_with_timestamp(step, mtx).state == STARTED;
return this->state_with_timestamp(step, mtx).state == State::Started;
}
bool is_done(StepType step, std::mutex &mtx) const {
return this->state_with_timestamp(step, mtx).state == DONE;
return this->state_with_timestamp(step, mtx).state == State::Done;
}
StateWithTimeStamp state_with_timestamp_unguarded(StepType step) const {
@ -105,11 +140,11 @@ public:
}
bool is_started_unguarded(StepType step) const {
return this->state_with_timestamp_unguarded(step).state == STARTED;
return this->state_with_timestamp_unguarded(step).state == State::Started;
}
bool is_done_unguarded(StepType step) const {
return this->state_with_timestamp_unguarded(step).state == DONE;
return this->state_with_timestamp_unguarded(step).state == State::Done;
}
void enable_unguarded(StepType step, bool enable) {
@ -146,12 +181,12 @@ public:
//
// assert(m_step_active == -1);
// for (int i = 0; i < int(COUNT); ++ i)
// assert(m_state[i].state != STARTED);
// assert(m_state[i].state != State::Started);
#endif // NDEBUG
PrintStateBase::StateWithWarnings &state = m_state[step];
if (! state.enabled || state.state == DONE)
if (! state.enabled || state.state == State::Done)
return false;
state.state = STARTED;
state.state = State::Started;
state.timestamp = ++ g_last_timestamp;
state.mark_warnings_non_current();
m_step_active = static_cast<int>(step);
@ -161,17 +196,17 @@ public:
// Set the step as done. Block on mutex while the Print / PrintObject / PrintRegion objects are being
// modified by the UI thread.
// Return value:
// Timestamp when this stepentered the DONE state.
// Timestamp when this step entered the Done state.
// bool indicates whether the UI has to update the slicing warnings of this step or not.
template<typename ThrowIfCanceled>
std::pair<TimeStamp, bool> set_done(StepType step, std::mutex &mtx, ThrowIfCanceled throw_if_canceled) {
std::scoped_lock<std::mutex> lock(mtx);
// If canceled, throw before changing the step state.
throw_if_canceled();
assert(m_state[step].state == STARTED);
assert(m_state[step].state == State::Started);
assert(m_step_active == static_cast<int>(step));
PrintStateBase::StateWithWarnings &state = m_state[step];
state.state = DONE;
state.state = State::Done;
state.timestamp = ++ g_last_timestamp;
m_step_active = -1;
// Remove all non-current warnings.
@ -190,16 +225,12 @@ public:
// processing by calling the cancel callback.
template<typename CancelationCallback>
bool invalidate(StepType step, CancelationCallback cancel) {
bool invalidated = m_state[step].state != INVALID;
if (invalidated) {
if (PrintStateBase::StateWithWarnings &state = m_state[step]; state.try_invalidate()) {
#if 0
if (mtx.state != mtx.HELD) {
printf("Not held!\n");
}
#endif
PrintStateBase::StateWithWarnings &state = m_state[step];
state.state = INVALID;
state.timestamp = ++ g_last_timestamp;
// Raise the mutex, so that the following cancel() callback could cancel
// the background processing.
// Internally the cancel() callback shall unlock the PrintBase::m_status_mutex to let
@ -209,21 +240,17 @@ public:
// It is safe to modify it.
state.mark_warnings_non_current();
m_step_active = -1;
}
return invalidated;
return true;
} else
return false;
}
template<typename CancelationCallback, typename StepTypeIterator>
bool invalidate_multiple(StepTypeIterator step_begin, StepTypeIterator step_end, CancelationCallback cancel) {
bool invalidated = false;
for (StepTypeIterator it = step_begin; it != step_end; ++ it) {
StateWithTimeStamp &state = m_state[*it];
if (state.state != INVALID) {
for (StepTypeIterator it = step_begin; it != step_end; ++ it)
if (m_state[*it].try_invalidate())
invalidated = true;
state.state = INVALID;
state.timestamp = ++ g_last_timestamp;
}
}
if (invalidated) {
#if 0
if (mtx.state != mtx.HELD) {
@ -251,14 +278,9 @@ public:
template<typename CancelationCallback>
bool invalidate_all(CancelationCallback cancel) {
bool invalidated = false;
for (size_t i = 0; i < COUNT; ++ i) {
StateWithTimeStamp &state = m_state[i];
if (state.state != INVALID) {
for (size_t i = 0; i < COUNT; ++ i)
if (m_state[i].try_invalidate())
invalidated = true;
state.state = INVALID;
state.timestamp = ++ g_last_timestamp;
}
}
if (invalidated) {
cancel();
// Now the worker thread should be stopped, therefore it cannot write into the warnings field.
@ -270,6 +292,26 @@ public:
return invalidated;
}
// If the milestone is Canceled or Invalidated, return true and turn the state of the milestone to Fresh.
// The caller is responsible for releasing the data of the milestone that is no more valid.
bool query_reset_dirty_unguarded(StepType step) {
if (PrintStateBase::StateWithWarnings &state = m_state[step]; state.is_dirty()) {
state.state = State::Fresh;
return true;
} else
return false;
}
// To be called after the background thread was stopped by the user pressing the Cancel button,
// which in turn stops the background thread without adjusting state of the milestone being executed.
// This method fixes the state of the canceled milestone by setting it to a Canceled state.
void mark_canceled_unguarded() {
for (size_t i = 0; i < COUNT; ++ i) {
if (State &state = m_state[i].state; state == State::Started)
state = State::Canceled;
}
}
// Update list of warnings of the current milestone with a new warning.
// The warning may already exist in the list, marked as current or not current.
// If it already exists, mark it as current.
@ -281,7 +323,7 @@ public:
std::scoped_lock<std::mutex> lock(mtx);
assert(m_step_active != -1);
StateWithWarnings &state = m_state[m_step_active];
assert(state.state == STARTED);
assert(state.state == State::Started);
std::pair<StepType, bool> retval(static_cast<StepType>(m_step_active), true);
// Does a warning of the same level and message or message_id exist already?
auto it = (message_id == 0) ?
@ -664,15 +706,19 @@ protected:
}
// Clean up after process() finished, either with success, error or if canceled.
// The adjustments on the Print / PrintObject m_stepmask data due to set_task() are to be reverted here.
// The adjustments on the Print / PrintObject m_stepmask data due to set_task() are to be reverted here:
// Execution of all milestones is enabled in case some of them were suppressed for the last background execution.
// Also if the background processing was canceled, the current milestone that was just abandoned
// in Started state is to be reset to Canceled state.
template<typename PrintObject>
void finalize_impl(std::vector<PrintObject*> &print_objects)
{
// Grab the lock for the Print / PrintObject milestones.
std::scoped_lock<std::mutex> lock(this->state_mutex());
for (auto *po : print_objects)
po->enable_all_steps_unguarded(true);
po->finalize_impl();
m_state.enable_all_unguarded(true);
m_state.mark_canceled_unguarded();
}
private:
@ -737,6 +783,11 @@ protected:
bool is_step_enabled_unguarded(PrintObjectStepEnum step) const { return m_state.is_enabled_unguarded(step); }
void enable_step_unguarded(PrintObjectStepEnum step, bool enable) { m_state.enable_unguarded(step, enable); }
void enable_all_steps_unguarded(bool enable) { m_state.enable_all_unguarded(enable); }
// See the comment at PrintBaseWithState::finalize_impl()
void finalize_impl() { m_state.enable_all_unguarded(true); m_state.mark_canceled_unguarded(); }
// If the milestone is Canceled or Invalidated, return true and turn the state of the milestone to Fresh.
// The caller is responsible for releasing the data of the milestone that is no more valid.
bool query_reset_dirty_step_unguarded(PrintObjectStepEnum step) { return m_state.query_reset_dirty_unguarded(step); }
// Add a slicing warning to the active PrintObject step and send a status notification.
// This method could be called multiple times between this->set_started() and this->set_done().

View File

@ -352,6 +352,12 @@ void PrintObject::prepare_infill()
this->set_done(posPrepareInfill);
}
void PrintObject::clear_fills()
{
for (Layer *layer : m_layers)
layer->clear_fills();
}
void PrintObject::infill()
{
// prerequisites
@ -818,6 +824,15 @@ bool PrintObject::invalidate_all_steps()
return result;
}
// Called on main thread with stopped or paused background processing to let PrintObject release data for its milestones that were invalidated or canceled.
void PrintObject::cleanup()
{
if (this->query_reset_dirty_step_unguarded(posInfill))
this->clear_fills();
if (this->query_reset_dirty_step_unguarded(posSupportMaterial))
this->clear_support_layers();
}
// This function analyzes slices of a region (SurfaceCollection slices).
// Each region slice (instance of Surface) is analyzed, whether it is supported or whether it is the top surface.
// Initially all slices are of type stInternal.

View File

@ -1178,7 +1178,7 @@ namespace SupportMaterialInternal {
static inline bool has_bridging_perimeters(const ExtrusionLoop &loop)
{
for (const ExtrusionPath &ep : loop.paths)
if (ep.role() == erOverhangPerimeter && ! ep.polyline.empty())
if (ep.role() == ExtrusionRole::OverhangPerimeter && ! ep.polyline.empty())
return int(ep.size()) >= (ep.is_closed() ? 3 : 2);
return false;
}
@ -1204,7 +1204,7 @@ namespace SupportMaterialInternal {
for (const ExtrusionEntity *ee2 : static_cast<const ExtrusionEntityCollection*>(ee)->entities) {
assert(! ee2->is_collection());
assert(! ee2->is_loop());
if (ee2->role() == erBridgeInfill)
if (ee2->role() == ExtrusionRole::BridgeInfill)
return true;
}
}
@ -1225,7 +1225,7 @@ namespace SupportMaterialInternal {
{
assert(expansion_scaled >= 0.f);
for (const ExtrusionPath &ep : loop.paths)
if (ep.role() == erOverhangPerimeter && ! ep.polyline.empty()) {
if (ep.role() == ExtrusionRole::OverhangPerimeter && ! ep.polyline.empty()) {
float exp = 0.5f * (float)scale_(ep.width) + expansion_scaled;
if (ep.is_closed()) {
if (ep.size() >= 3) {
@ -3357,7 +3357,7 @@ static inline void tree_supports_generate_paths(
ExPolygons level2 = offset2_ex({ expoly }, -1.5 * flow.scaled_width(), 0.5 * flow.scaled_width());
if (level2.size() == 1) {
Polylines polylines;
extrusion_entities_append_paths(dst, draw_perimeters(expoly, clip_length), erSupportMaterial, flow.mm3_per_mm(), flow.width(), flow.height(),
extrusion_entities_append_paths(dst, draw_perimeters(expoly, clip_length), ExtrusionRole::SupportMaterial, flow.mm3_per_mm(), flow.width(), flow.height(),
// Disable reversal of the path, always start with the anchor, always print CCW.
false);
expoly = level2.front();
@ -3460,7 +3460,7 @@ static inline void tree_supports_generate_paths(
pl.reverse();
polylines.emplace_back(std::move(pl));
}
extrusion_entities_append_paths(dst, polylines, erSupportMaterial, flow.mm3_per_mm(), flow.width(), flow.height(),
extrusion_entities_append_paths(dst, polylines, ExtrusionRole::SupportMaterial, flow.mm3_per_mm(), flow.width(), flow.height(),
// Disable reversal of the path, always start with the anchor, always print CCW.
false);
}
@ -3505,7 +3505,7 @@ static inline void fill_expolygons_with_sheath_generate_paths(
eec->no_sort = true;
}
ExtrusionEntitiesPtr &out = no_sort ? eec->entities : dst;
extrusion_entities_append_paths(out, draw_perimeters(expoly, clip_length), erSupportMaterial, flow.mm3_per_mm(), flow.width(), flow.height());
extrusion_entities_append_paths(out, draw_perimeters(expoly, clip_length), ExtrusionRole::SupportMaterial, flow.mm3_per_mm(), flow.width(), flow.height());
// Fill in the rest.
fill_expolygons_generate_paths(out, offset_ex(expoly, float(-0.4 * spacing)), filler, fill_params, density, role, flow);
if (no_sort && ! eec->empty())
@ -3817,7 +3817,7 @@ void LoopInterfaceProcessor::generate(SupportGeneratorLayerExtruded &top_contact
extrusion_entities_append_paths(
top_contact_layer.extrusions,
std::move(loop_lines),
erSupportMaterialInterface, flow.mm3_per_mm(), flow.width(), flow.height());
ExtrusionRole::SupportMaterialInterface, flow.mm3_per_mm(), flow.width(), flow.height());
}
#ifdef SLIC3R_DEBUG
@ -4252,7 +4252,7 @@ void generate_support_toolpaths(
// Filler and its parameters
filler, float(support_params.support_density),
// Extrusion parameters
erSupportMaterial, flow,
ExtrusionRole::SupportMaterial, flow,
support_params.with_sheath, false);
}
}
@ -4284,7 +4284,7 @@ void generate_support_toolpaths(
// Filler and its parameters
filler, density,
// Extrusion parameters
(support_layer_id < slicing_params.base_raft_layers) ? erSupportMaterial : erSupportMaterialInterface, flow,
(support_layer_id < slicing_params.base_raft_layers) ? ExtrusionRole::SupportMaterial : ExtrusionRole::SupportMaterialInterface, flow,
// sheath at first layer
support_layer_id == 0, support_layer_id == 0);
}
@ -4440,7 +4440,7 @@ void generate_support_toolpaths(
// Filler and its parameters
filler_interface.get(), float(density),
// Extrusion parameters
erSupportMaterialInterface, interface_flow);
ExtrusionRole::SupportMaterialInterface, interface_flow);
}
// Base interface layers under soluble interfaces
@ -4462,7 +4462,7 @@ void generate_support_toolpaths(
// Filler and its parameters
filler, float(support_params.interface_density),
// Extrusion parameters
erSupportMaterial, interface_flow);
ExtrusionRole::SupportMaterial, interface_flow);
}
// Base support or flange.
@ -4500,7 +4500,7 @@ void generate_support_toolpaths(
// Filler and its parameters
filler, density,
// Extrusion parameters
erSupportMaterial, flow,
ExtrusionRole::SupportMaterial, flow,
sheath, no_sort);
}

View File

@ -58,7 +58,7 @@ public:
bool is_external_perimeter() const
{
assert(origin_entity != nullptr);
return origin_entity->role() == erExternalPerimeter || origin_entity->role() == erOverhangPerimeter;
return origin_entity->role().is_external_perimeter();
}
Vec2f a;
@ -170,16 +170,15 @@ struct SliceConnection
float get_flow_width(const LayerRegion *region, ExtrusionRole role)
{
switch (role) {
case ExtrusionRole::erBridgeInfill: return region->flow(FlowRole::frExternalPerimeter).width();
case ExtrusionRole::erExternalPerimeter: return region->flow(FlowRole::frExternalPerimeter).width();
case ExtrusionRole::erGapFill: return region->flow(FlowRole::frInfill).width();
case ExtrusionRole::erPerimeter: return region->flow(FlowRole::frPerimeter).width();
case ExtrusionRole::erSolidInfill: return region->flow(FlowRole::frSolidInfill).width();
case ExtrusionRole::erInternalInfill: return region->flow(FlowRole::frInfill).width();
case ExtrusionRole::erTopSolidInfill: return region->flow(FlowRole::frTopSolidInfill).width();
default: return region->flow(FlowRole::frPerimeter).width();
}
if (role == ExtrusionRole::BridgeInfill) return region->flow(FlowRole::frExternalPerimeter).width();
if (role == ExtrusionRole::ExternalPerimeter) return region->flow(FlowRole::frExternalPerimeter).width();
if (role == ExtrusionRole::GapFill) return region->flow(FlowRole::frInfill).width();
if (role == ExtrusionRole::Perimeter) return region->flow(FlowRole::frPerimeter).width();
if (role == ExtrusionRole::SolidInfill) return region->flow(FlowRole::frSolidInfill).width();
if (role == ExtrusionRole::InternalInfill) return region->flow(FlowRole::frInfill).width();
if (role == ExtrusionRole::TopSolidInfill) return region->flow(FlowRole::frTopSolidInfill).width();
// default
return region->flow(FlowRole::frPerimeter).width();
}
std::vector<ExtrusionLine> to_short_lines(const ExtrusionEntity *e, float length_limit)
@ -800,7 +799,7 @@ SupportPoints check_stability(const PrintObject *po, const PrintTryCancel& cance
const LayerRegion *fill_region = layer->get_region(fill_range.region());
for (const auto &fill_idx : fill_range) {
const ExtrusionEntity *entity = fill_region->fills().entities[fill_idx];
if (entity->role() == erBridgeInfill) {
if (entity->role() == ExtrusionRole::BridgeInfill) {
for (const ExtrusionLine &bridge :
check_extrusion_entity_stability(entity, fill_region, prev_layer_ext_perim_lines,prev_layer_boundary, params)) {
if (bridge.support_point_generated) {

View File

@ -31,22 +31,33 @@ public:
constexpr enum_bitmask(option_type o) : m_bits(mask_value(o)) {}
// Set the bit corresponding to the given option.
constexpr enum_bitmask operator|(option_type t) { return enum_bitmask(m_bits | mask_value(t)); }
constexpr enum_bitmask operator|(option_type t) const { return enum_bitmask(m_bits | mask_value(t)); }
// Combine with another enum_bitmask of the same type.
constexpr enum_bitmask operator|(enum_bitmask<option_type> t) { return enum_bitmask(m_bits | t.m_bits); }
constexpr enum_bitmask operator|(enum_bitmask<option_type> t) const { return enum_bitmask(m_bits | t.m_bits); }
// Set the bit corresponding to the given option.
constexpr void operator|=(option_type t) { m_bits = enum_bitmask(m_bits | mask_value(t)); }
// Combine with another enum_bitmask of the same type.
constexpr void operator|=(enum_bitmask<option_type> t) { m_bits = enum_bitmask(m_bits | t.m_bits); }
// Get the value of the bit corresponding to the given option.
constexpr bool operator&(option_type t) { return m_bits & mask_value(t); }
constexpr bool has(option_type t) { return m_bits & mask_value(t); }
constexpr bool operator&(option_type t) const { return m_bits & mask_value(t); }
constexpr bool has(option_type t) const { return m_bits & mask_value(t); }
constexpr bool operator==(const enum_bitmask r) const { return m_bits == r.m_bits; }
constexpr bool operator!=(const enum_bitmask r) const { return m_bits != r.m_bits; }
// For sorting by the enum values.
constexpr bool lower(const enum_bitmask r) const { return m_bits < r.m_bits; }
private:
underlying_type m_bits = 0;
};
// For enabling free functions producing enum_bitmask<> type from bit operations on enums.
template<typename Enum> struct is_enum_bitmask_type { static const bool enable = false; };
#define ENABLE_ENUM_BITMASK_OPERATORS(x) template<> struct is_enum_bitmask_type<x> { static const bool enable = true; };
template<typename Enum> struct is_enum_bitmask_type { static constexpr const bool enable = false; };
#define ENABLE_ENUM_BITMASK_OPERATORS(x) template<> struct is_enum_bitmask_type<x> { static constexpr const bool enable = true; };
template<class Enum> inline constexpr bool is_enum_bitmask_type_v = is_enum_bitmask_type<Enum>::enable;
// Creates an enum_bitmask from two options, convenient for passing of options to a function:

View File

@ -1,6 +1,7 @@
#include "Downloader.hpp"
#include "GUI_App.hpp"
#include "NotificationManager.hpp"
#include "format.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/log/trivial.hpp>
@ -145,14 +146,15 @@ void Downloader::start_download(const std::string& full_url)
#else
std::string escaped_url = FileGet::escape_url(full_url.substr(24));
#endif
// TODO: enable after testing
/*
if (!boost::starts_with(escaped_url, "https://media.printables.com/")) {
BOOST_LOG_TRIVIAL(error) << "Download won't start. Download URL doesn't point to https://media.printables.com : " << escaped_url;
// TODO: show error?
if (!boost::starts_with(escaped_url, "https://files.printables.com") && !boost::starts_with(escaped_url, "https://dev-files.printables.com")) {
std::string msg = format(_L("Download won't start. Download URL doesn't point to https://files.printables.com : %1%"), escaped_url);
BOOST_LOG_TRIVIAL(error) << msg;
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
ntf_mngr->push_notification(NotificationType::CustomNotification, NotificationManager::NotificationLevel::RegularNotificationLevel, msg);
return;
}
*/
std::string text(escaped_url);
m_downloads.emplace_back(std::make_unique<Download>(id, std::move(escaped_url), this, m_dest_folder));
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
@ -177,6 +179,7 @@ void Downloader::on_error(wxCommandEvent& event)
BOOST_LOG_TRIVIAL(error) << "Download error: " << event.GetString();
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
ntf_mngr->set_download_URL_error(id, boost::nowide::narrow(event.GetString()));
show_error(nullptr, format_wxstr(L"%1%\n%2%", _L("The download has failed:"), event.GetString()));
}
void Downloader::on_complete(wxCommandEvent& event)
{

View File

@ -129,7 +129,7 @@ void FileGet::priv::get_perform()
if (m_written == 0)
file = fopen(temp_path_wstring.c_str(), "wb");
else
file = fopen(temp_path_wstring.c_str(), "a");
file = fopen(temp_path_wstring.c_str(), "ab");
assert(file != NULL);

View File

@ -560,23 +560,22 @@ void GCodeViewer::SequentialView::render(float legend_height)
gcode_window.render(legend_height, bottom, static_cast<uint64_t>(gcode_ids[current.last]));
}
const std::vector<ColorRGBA> GCodeViewer::Extrusion_Role_Colors{ {
{ 0.90f, 0.70f, 0.70f, 1.0f }, // erNone
{ 1.00f, 0.90f, 0.30f, 1.0f }, // erPerimeter
{ 1.00f, 0.49f, 0.22f, 1.0f }, // erExternalPerimeter
{ 0.12f, 0.12f, 1.00f, 1.0f }, // erOverhangPerimeter
{ 0.69f, 0.19f, 0.16f, 1.0f }, // erInternalInfill
{ 0.59f, 0.33f, 0.80f, 1.0f }, // erSolidInfill
{ 0.94f, 0.25f, 0.25f, 1.0f }, // erTopSolidInfill
{ 1.00f, 0.55f, 0.41f, 1.0f }, // erIroning
{ 0.30f, 0.50f, 0.73f, 1.0f }, // erBridgeInfill
{ 1.00f, 1.00f, 1.00f, 1.0f }, // erGapFill
{ 0.00f, 0.53f, 0.43f, 1.0f }, // erSkirt
{ 0.00f, 1.00f, 0.00f, 1.0f }, // erSupportMaterial
{ 0.00f, 0.50f, 0.00f, 1.0f }, // erSupportMaterialInterface
{ 0.70f, 0.89f, 0.67f, 1.0f }, // erWipeTower
{ 0.37f, 0.82f, 0.58f, 1.0f }, // erCustom
{ 0.00f, 0.00f, 0.00f, 1.0f } // erMixed
const std::array<ColorRGBA, static_cast<size_t>(GCodeExtrusionRole::Count)> GCodeViewer::Extrusion_Role_Colors{ {
{ 0.90f, 0.70f, 0.70f, 1.0f }, // GCodeExtrusionRole::None
{ 1.00f, 0.90f, 0.30f, 1.0f }, // GCodeExtrusionRole::Perimeter
{ 1.00f, 0.49f, 0.22f, 1.0f }, // GCodeExtrusionRole::ExternalPerimeter
{ 0.12f, 0.12f, 1.00f, 1.0f }, // GCodeExtrusionRole::OverhangPerimeter
{ 0.69f, 0.19f, 0.16f, 1.0f }, // GCodeExtrusionRole::InternalInfill
{ 0.59f, 0.33f, 0.80f, 1.0f }, // GCodeExtrusionRole::SolidInfill
{ 0.94f, 0.25f, 0.25f, 1.0f }, // GCodeExtrusionRole::TopSolidInfill
{ 1.00f, 0.55f, 0.41f, 1.0f }, // GCodeExtrusionRole::Ironing
{ 0.30f, 0.50f, 0.73f, 1.0f }, // GCodeExtrusionRole::BridgeInfill
{ 1.00f, 1.00f, 1.00f, 1.0f }, // GCodeExtrusionRole::GapFill
{ 0.00f, 0.53f, 0.43f, 1.0f }, // GCodeExtrusionRole::Skirt
{ 0.00f, 1.00f, 0.00f, 1.0f }, // GCodeExtrusionRole::SupportMaterial
{ 0.00f, 0.50f, 0.00f, 1.0f }, // GCodeExtrusionRole::SupportMaterialInterface
{ 0.70f, 0.89f, 0.67f, 1.0f }, // GCodeExtrusionRole::WipeTower
{ 0.37f, 0.82f, 0.58f, 1.0f }, // GCodeExtrusionRole::Custom
}};
const std::vector<ColorRGBA> GCodeViewer::Options_Colors{ {
@ -840,7 +839,7 @@ void GCodeViewer::refresh(const GCodeProcessorResult& gcode_result, const std::v
m_extrusions.ranges.width.update_from(round_to_bin(curr.width));
m_extrusions.ranges.fan_speed.update_from(curr.fan_speed);
m_extrusions.ranges.temperature.update_from(curr.temperature);
if (curr.extrusion_role != erCustom || is_visible(erCustom))
if (curr.extrusion_role != GCodeExtrusionRole::Custom || is_visible(GCodeExtrusionRole::Custom))
m_extrusions.ranges.volumetric_rate.update_from(round_to_bin(curr.volumetric_rate()));
[[fallthrough]];
}
@ -899,7 +898,7 @@ void GCodeViewer::reset()
m_shells.volumes.clear();
m_layers.reset();
m_layers_z_range = { 0, 0 };
m_roles = std::vector<ExtrusionRole>();
m_roles = std::vector<GCodeExtrusionRole>();
m_print_statistics.reset();
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
m_layers_times[i] = std::vector<float>();
@ -1556,7 +1555,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
// for the gcode viewer we need to take in account all moves to correctly size the printbed
m_paths_bounding_box.merge(move.position.cast<double>());
else {
if (move.type == EMoveType::Extrude && move.extrusion_role != erCustom && move.width != 0.0f && move.height != 0.0f)
if (move.type == EMoveType::Extrude && move.extrusion_role != GCodeExtrusionRole::Custom && move.width != 0.0f && move.height != 0.0f)
m_paths_bounding_box.merge(move.position.cast<double>());
}
}
@ -1603,12 +1602,11 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
const GCodeProcessorResult::MoveVertex& prev = gcode_result.moves[i - 1];
if (curr.type == EMoveType::Extrude &&
curr.extrusion_role != erSkirt &&
curr.extrusion_role != erSupportMaterial &&
curr.extrusion_role != erSupportMaterialInterface &&
curr.extrusion_role != erWipeTower &&
curr.extrusion_role != erCustom &&
curr.extrusion_role != erMixed) {
curr.extrusion_role != GCodeExtrusionRole::Skirt &&
curr.extrusion_role != GCodeExtrusionRole::SupportMaterial &&
curr.extrusion_role != GCodeExtrusionRole::SupportMaterialInterface &&
curr.extrusion_role != GCodeExtrusionRole::WipeTower &&
curr.extrusion_role != GCodeExtrusionRole::Custom) {
const Vec3d curr_pos = curr.position.cast<double>();
const Vec3d prev_pos = prev.position.cast<double>();
m_cog.add_segment(curr_pos, prev_pos, curr.mm3_per_mm * (curr_pos - prev_pos).norm());
@ -3469,12 +3467,12 @@ void GCodeViewer::render_legend(float& legend_height)
return _u8L("from") + " " + std::string(buf1) + " " + _u8L("to") + " " + std::string(buf2) + " " + _u8L("mm");
};
auto role_time_and_percent = [time_mode](ExtrusionRole role) {
auto it = std::find_if(time_mode.roles_times.begin(), time_mode.roles_times.end(), [role](const std::pair<ExtrusionRole, float>& item) { return role == item.first; });
auto role_time_and_percent = [time_mode](GCodeExtrusionRole role) {
auto it = std::find_if(time_mode.roles_times.begin(), time_mode.roles_times.end(), [role](const std::pair<GCodeExtrusionRole, float>& item) { return role == item.first; });
return (it != time_mode.roles_times.end()) ? std::make_pair(it->second, it->second / time_mode.time) : std::make_pair(0.0f, 0.0f);
};
auto used_filament_per_role = [this, imperial_units](ExtrusionRole role) {
auto used_filament_per_role = [this, imperial_units](GCodeExtrusionRole role) {
auto it = m_print_statistics.used_filaments_per_role.find(role);
if (it == m_print_statistics.used_filaments_per_role.end())
return std::make_pair(0.0, 0.0);
@ -3494,10 +3492,10 @@ void GCodeViewer::render_legend(float& legend_height)
if (m_view_type == EViewType::FeatureType) {
// calculate offsets to align time/percentage data
for (size_t i = 0; i < m_roles.size(); ++i) {
ExtrusionRole role = m_roles[i];
if (role < erCount) {
labels.push_back(_u8L(ExtrusionEntity::role_to_string(role)));
for (GCodeExtrusionRole role : m_roles) {
assert(role < GCodeExtrusionRole::Count);
if (role < GCodeExtrusionRole::Count) {
labels.push_back(_u8L(gcode_extrusion_role_to_string(role)));
auto [time, percent] = role_time_and_percent(role);
times.push_back((time > 0.0f) ? short_time(get_time_dhms(time)) : "");
percents.push_back(percent);
@ -3610,13 +3608,13 @@ void GCodeViewer::render_legend(float& legend_height)
max_time_percent = std::max(max_time_percent, time_mode.travel_time / time_mode.time);
for (size_t i = 0; i < m_roles.size(); ++i) {
ExtrusionRole role = m_roles[i];
if (role >= erCount)
GCodeExtrusionRole role = m_roles[i];
if (role >= GCodeExtrusionRole::Count)
continue;
const bool visible = is_visible(role);
append_item(EItemType::Rect, Extrusion_Role_Colors[static_cast<unsigned int>(role)], labels[i],
visible, times[i], percents[i], max_time_percent, offsets, used_filaments_m[i], used_filaments_g[i], [this, role, visible]() {
m_extrusions.role_visibility_flags = visible ? m_extrusions.role_visibility_flags & ~(1 << role) : m_extrusions.role_visibility_flags | (1 << role);
m_extrusions.role_visibility_flags = visible ? m_extrusions.role_visibility_flags & ~(1 << int(role)) : m_extrusions.role_visibility_flags | (1 << int(role));
// update buffers' render paths
refresh_render_paths(false, false);
wxGetApp().plater()->update_preview_moves_slider();

View File

@ -2,6 +2,7 @@
#define slic3r_GCodeViewer_hpp_
#include "3DScene.hpp"
#include "libslic3r/ExtrusionRole.hpp"
#include "libslic3r/GCode/GCodeProcessor.hpp"
#include "GLModel.hpp"
@ -30,7 +31,7 @@ class GCodeViewer
using InstanceIdBuffer = std::vector<size_t>;
using InstancesOffsets = std::vector<Vec3f>;
static const std::vector<ColorRGBA> Extrusion_Role_Colors;
static const std::array<ColorRGBA, static_cast<size_t>(GCodeExtrusionRole::Count)> Extrusion_Role_Colors;
static const std::vector<ColorRGBA> Options_Colors;
static const std::vector<ColorRGBA> Travel_Colors;
static const std::vector<ColorRGBA> Range_Colors;
@ -208,7 +209,7 @@ class GCodeViewer
};
EMoveType type{ EMoveType::Noop };
ExtrusionRole role{ erNone };
GCodeExtrusionRole role{ GCodeExtrusionRole::None };
float delta_extruder{ 0.0f };
float height{ 0.0f };
float width{ 0.0f };
@ -482,7 +483,7 @@ class GCodeViewer
void reset_role_visibility_flags() {
role_visibility_flags = 0;
for (unsigned int i = 0; i < erCount; ++i) {
for (uint32_t i = 0; i < uint32_t(GCodeExtrusionRole::Count); ++i) {
role_visibility_flags |= 1 << i;
}
}
@ -753,7 +754,7 @@ private:
std::vector<ColorRGBA> m_tool_colors;
Layers m_layers;
std::array<unsigned int, 2> m_layers_z_range;
std::vector<ExtrusionRole> m_roles;
std::vector<GCodeExtrusionRole> m_roles;
size_t m_extruders_count;
std::vector<unsigned char> m_extruder_ids;
std::vector<float> m_filament_diameters;
@ -849,8 +850,8 @@ private:
#if ENABLE_GCODE_VIEWER_STATISTICS
void render_statistics();
#endif // ENABLE_GCODE_VIEWER_STATISTICS
bool is_visible(ExtrusionRole role) const {
return role < erCount && (m_extrusions.role_visibility_flags & (1 << role)) != 0;
bool is_visible(GCodeExtrusionRole role) const {
return role < GCodeExtrusionRole::Count && (m_extrusions.role_visibility_flags & (1 << int(role))) != 0;
}
bool is_visible(const Path& path) const { return is_visible(path.role); }
void log_memory_used(const std::string& label, int64_t additional = 0) const;

View File

@ -6421,7 +6421,7 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
const auto *fill = dynamic_cast<const ExtrusionEntityCollection*>(ee);
if (! fill->entities.empty())
_3DScene::extrusionentity_to_verts(*fill, float(layer->print_z), copy,
select_geometry(idx_layer, is_solid_infill(fill->entities.front()->role()) ?
select_geometry(idx_layer, fill->entities.front()->role().is_solid_infill() ?
layerm->region().config().solid_infill_extruder :
layerm->region().config().infill_extruder, 1));
}
@ -6432,7 +6432,7 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
if (support_layer) {
for (const ExtrusionEntity *extrusion_entity : support_layer->support_fills.entities)
_3DScene::extrusionentity_to_verts(extrusion_entity, float(layer->print_z), copy,
select_geometry(idx_layer, (extrusion_entity->role() == erSupportMaterial) ?
select_geometry(idx_layer, (extrusion_entity->role() == ExtrusionRole::SupportMaterial) ?
support_layer->object()->config().support_material_extruder :
support_layer->object()->config().support_material_interface_extruder, 2));
}

View File

@ -276,7 +276,7 @@ private:
_L("Developed by Prusa Research.") + "\n\n" +
title + " " + _L("is licensed under the") + " " + _L("GNU Affero General Public License, version 3") + ".\n\n" +
_L("Contributions by Vojtech Bubnik, Enrico Turri, Oleksandra Iushchenko, Tamas Meszaros, Lukas Matena, Vojtech Kral, David Kocik and numerous others.") + "\n\n" +
_L("Artwork model by Leslie Ing");
_L("Artwork model by Creative Tools");
title_font = version_font = credits_font = init_font;
}

View File

@ -706,7 +706,7 @@ static void draw_mouse_offset(const std::optional<Vec2d> &offset)
}
#endif // SHOW_OFFSET_DURING_DRAGGING
namespace priv {
static void draw_origin_ball(const GLCanvas3D& canvas) {
static void draw_origin(const GLCanvas3D& canvas) {
auto draw_list = ImGui::GetOverlayDrawList();
const Selection &selection = canvas.get_selection();
Transform3d to_world = priv::world_matrix(selection);
@ -715,9 +715,22 @@ static void draw_origin_ball(const GLCanvas3D& canvas) {
const Camera &camera = wxGetApp().plater()->get_camera();
Point screen_coor = CameraUtils::project(camera, volume_zero);
ImVec2 center(screen_coor.x(), screen_coor.y());
float radius = 10.f;
ImU32 color = ImGui::GetColorU32(ImGuiWrapper::COL_ORANGE_LIGHT);
draw_list->AddCircleFilled(center, radius, color);
float radius = 16.f;
ImU32 color = ImGui::GetColorU32(ImVec4(1.f, 1.f, 1.f, .75f));
int num_segments = 0;
float thickness = 4.f;
draw_list->AddCircle(center, radius, color, num_segments, thickness);
auto dirs = {ImVec2{0, 1}, ImVec2{1, 0}, ImVec2{0, -1}, ImVec2{-1, 0}};
for (const ImVec2 &dir : dirs) {
ImVec2 start(
center.x + dir.x * 0.5 * radius,
center.y + dir.y * 0.5 * radius);
ImVec2 end(
center.x + dir.x * 1.5 * radius,
center.y + dir.y * 1.5 * radius);
draw_list->AddLine(start, end, color, thickness);
}
}
} // namespace priv
@ -736,7 +749,9 @@ void GLGizmoEmboss::on_render_input_window(float x, float y, float bottom_limit)
const ImVec2 &min_window_size = get_minimal_window_size();
ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, min_window_size);
priv::draw_origin_ball(m_parent);
// Draw origin position of text during dragging
if (m_temp_transformation.has_value())
priv::draw_origin(m_parent);
#ifdef SHOW_FINE_POSITION
draw_fine_position(m_parent.get_selection(), m_parent.get_canvas_size(), min_window_size);
@ -1104,17 +1119,9 @@ bool GLGizmoEmboss::set_volume(ModelVolume *volume)
m_style_manager.set_wx_font(wx_font);
}
}
if (!is_exact_font) {
if (!is_exact_font)
create_notification_not_valid_font(tc);
// update changed wxFont path
std::string path = WxFontUtils::store_wxFont(wx_font);
// current used style
EmbossStyle &act_style = m_style_manager.get_style();
act_style.path = path;
act_style.type = WxFontUtils::get_actual_type();
}
// The change of volume could show or hide part with setter on volume type
if (m_volume == nullptr ||
@ -2980,11 +2987,6 @@ std::optional<Vec3d> priv::calc_surface_offset(const ModelVolume &volume, Raycas
// ray in direction of text projection(from volume zero to z-dir)
std::optional<RaycastManager::Hit> hit_opt = raycast_manager.unproject(point, direction, &cond);
// start point lay on surface could appear slightly behind surface
std::optional<RaycastManager::Hit> hit_opt_opposit = raycast_manager.unproject(point, -direction, &cond);
if (!hit_opt.has_value() ||
(hit_opt_opposit.has_value() && hit_opt->squared_distance > hit_opt_opposit->squared_distance))
hit_opt = hit_opt_opposit;
// Try to find closest point when no hit object in emboss direction
if (!hit_opt.has_value())
@ -3410,31 +3412,31 @@ void GLGizmoEmboss::create_notification_not_valid_font(
auto level =
NotificationManager::NotificationLevel::WarningNotificationLevel;
const EmbossStyle &es = m_style_manager.get_style();
const auto &origin_family = tc.style.prop.face_name;
const auto &actual_family = es.prop.face_name;
const EmbossStyle &es = m_style_manager.get_style();
const auto &face_name_opt = es.prop.face_name;
const auto &face_name_3mf_opt = tc.style.prop.face_name;
const std::string &origin_font_name = origin_family.has_value() ?
*origin_family :
const std::string &face_name_3mf = face_name_3mf_opt.has_value() ?
*face_name_3mf_opt :
tc.style.path;
std::string actual_wx_face_name;
if (!actual_family.has_value()) {
auto& wx_font = m_style_manager.get_wx_font();
std::string face_name_by_wx;
if (!face_name_opt.has_value()) {
const auto& wx_font = m_style_manager.get_wx_font();
if (wx_font.has_value()) {
wxString wx_face_name = wx_font->GetFaceName();
actual_wx_face_name = std::string((const char *) wx_face_name.ToUTF8());
wxString wx_face_name = wx_font->GetFaceName();
face_name_by_wx = std::string((const char *) wx_face_name.ToUTF8());
}
}
const std::string &actual_font_name = actual_family.has_value() ? *actual_family :
(!actual_wx_face_name.empty() ? actual_wx_face_name : es.path);
const std::string &face_name = face_name_opt.has_value() ? *face_name_opt :
(!face_name_by_wx.empty() ? face_name_by_wx : es.path);
std::string text =
GUI::format(_L("Can't load exactly same font(\"%1%\"), "
"Aplication select similar one(\"%2%\"). "
"You have to specify font for enable edit text."),
origin_font_name, actual_font_name);
face_name_3mf, face_name);
auto notification_manager = wxGetApp().plater()->get_notification_manager();
notification_manager->push_notification(type, level, text);
}

View File

@ -507,7 +507,7 @@ bool GLGizmoFdmSupports::has_backend_supports()
bool done = false;
for (const PrintObject *po : m_parent.fff_print()->objects()) {
if (po->model_object()->id() == mo->id())
done = po->is_step_done(posSupportSpotsSearch);
done = done || po->is_step_done(posSupportSpotsSearch);
}
if (!done && !wxGetApp().plater()->is_background_process_update_scheduled()) {

View File

@ -13,6 +13,8 @@
#include "libnest2d/common.hpp"
#include <numeric>
namespace Slic3r { namespace GUI {
// Cache the wti info

View File

@ -533,6 +533,9 @@ void UpdateJob::update_volume(ModelVolume *volume,
// redraw scene
bool refresh_immediately = false;
canvas->reload_scene(refresh_immediately);
// Change buttons "Export G-code" into "Slice now"
canvas->post_event(SimpleEvent(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS));
}
void priv::update_volume(TriangleMesh &&mesh, const DataUpdate &data, Transform3d* tr)

View File

@ -124,9 +124,14 @@ static const std::pair<unsigned int, unsigned int> THUMBNAIL_SIZE_3MF = { 256, 2
namespace Slic3r {
namespace GUI {
// Trigger Plater::schedule_background_process().
wxDEFINE_EVENT(EVT_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent);
// BackgroundSlicingProcess updates UI with slicing progress: Status bar / progress bar has to be updated, possibly scene has to be refreshed,
// see PrintBase::SlicingStatus for the content of the message.
wxDEFINE_EVENT(EVT_SLICING_UPDATE, SlicingStatusEvent);
// FDM slicing finished, but G-code was not exported yet. Initial G-code preview shall be displayed by the UI.
wxDEFINE_EVENT(EVT_SLICING_COMPLETED, wxCommandEvent);
// BackgroundSlicingProcess finished either with success or error.
wxDEFINE_EVENT(EVT_PROCESS_COMPLETED, SlicingProcessCompletedEvent);
wxDEFINE_EVENT(EVT_EXPORT_BEGAN, wxCommandEvent);
@ -3341,10 +3346,8 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool
if (invalidated != Print::APPLY_STATUS_UNCHANGED && was_running && ! this->background_process.running() &&
(return_state & UPDATE_BACKGROUND_PROCESS_RESTART) == 0) {
// The background processing was killed and it will not be restarted.
wxCommandEvent evt(EVT_PROCESS_COMPLETED);
evt.SetInt(-1);
// Post the "canceled" callback message, so that it will be processed after any possible pending status bar update messages.
wxQueueEvent(GUI::wxGetApp().mainframe->m_plater, evt.Clone());
wxQueueEvent(GUI::wxGetApp().mainframe->m_plater, new SlicingProcessCompletedEvent(EVT_PROCESS_COMPLETED, 0, SlicingProcessCompletedEvent::Cancelled, std::exception_ptr{}));
}
if ((return_state & UPDATE_BACKGROUND_PROCESS_INVALID) != 0)

View File

@ -78,34 +78,13 @@ namespace {
DEVINST get_dev_inst_by_device_number(long device_number, UINT drive_type, WCHAR* dos_device_name)
{
bool is_floppy = (wcsstr(dos_device_name, L"\\Floppy") != NULL); // TODO: could be tested better?
GUID* guid;
switch (drive_type) {
case DRIVE_REMOVABLE:
if (is_floppy) {
// we are interested only in SD cards or USB sticks
BOOST_LOG_TRIVIAL(debug) << "get_dev_inst_by_device_number failed: Drive is floppy disk.";
return 0;
//guid = (GUID*)&GUID_DEVINTERFACE_FLOPPY;
} else {
guid = (GUID*)&GUID_DEVINTERFACE_DISK;
}
break;
case DRIVE_FIXED:
// we are interested only in SD cards or USB sticks
BOOST_LOG_TRIVIAL(debug) << "get_dev_inst_by_device_number failed: Drive is harddisk.";
return 0;
//guid = (GUID*)&GUID_DEVINTERFACE_DISK;
//break;
case DRIVE_CDROM:
BOOST_LOG_TRIVIAL(debug) << "get_dev_inst_by_device_number failed: Drive is cd-rom.";
// we are interested only in SD cards or USB sticks
return 0;
//guid = (GUID*)&GUID_DEVINTERFACE_CDROM;
//break;
default:
if (drive_type != DRIVE_REMOVABLE || is_floppy) {
BOOST_LOG_TRIVIAL(debug) << "get_dev_inst_by_device_number failed: Drive is not removable.";
return 0;
}
GUID* guid = (GUID*)& GUID_DEVINTERFACE_DISK;
// Get device interface info set handle for all devices attached to system
HDEVINFO h_dev_info = SetupDiGetClassDevs(guid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
@ -228,7 +207,11 @@ int eject_inner(const std::string& path)
// get drives's parent, e.g. the USB bridge, the SATA port, an IDE channel with two drives!
DEVINST dev_inst_parent = 0;
res = CM_Get_Parent(&dev_inst_parent, dev_inst, 0);
if (res != CR_SUCCESS) {
BOOST_LOG_TRIVIAL(error) << GUI::format("Ejecting of %1% has failed: Failed to get drive parent. Code: %2%", path, res);
return 1;
}
#if 0
// loop with several tries and sleep (this is running on main UI thread)
for (int i = 0; i < 3; ++i) {
@ -247,13 +230,22 @@ int eject_inner(const std::string& path)
}
#endif // 0
// perform eject
// Perform eject over parent dev_inst. This works for usb drives and some SD cards.
res = CM_Request_Device_EjectW(dev_inst_parent, &veto_type, veto_name, MAX_PATH, 0);
//res = CM_Query_And_Remove_SubTreeW(dev_inst_parent, &veto_type, veto_name, MAX_PATH, CM_REMOVE_UI_OK);
if (res == CR_SUCCESS && veto_type == PNP_VetoTypeUnknown) {
return 0;
}
BOOST_LOG_TRIVIAL(warning) << GUI::format("Ejecting of %1% has failed: Request to eject device has failed. Another request will follow. Veto type: %2%", path, veto_type);
// But on some PC, SD cards ejects only with its own dev_inst.
res = CM_Request_Device_EjectW(dev_inst, &veto_type, veto_name, MAX_PATH, 0);
//res = CM_Query_And_Remove_SubTreeW(dev_inst_parent, &veto_type, veto_name, MAX_PATH, CM_REMOVE_UI_OK);
if (res == CR_SUCCESS && veto_type == PNP_VetoTypeUnknown) {
return 0;
}
BOOST_LOG_TRIVIAL(error) << GUI::format("Ejecting of %1% has failed: Request to eject device has failed.", path);
BOOST_LOG_TRIVIAL(error) << GUI::format("Ejecting of %1% has failed: Request to eject device has failed. Veto type: %2%", path, veto_type);
return 1;
}
@ -272,6 +264,7 @@ void RemovableDriveManager::eject_drive()
BOOST_LOG_TRIVIAL(info) << "Ejecting started";
std::scoped_lock<std::mutex> lock(m_drives_mutex);
auto it_drive_data = this->find_last_save_path_drive_data();
#if 1
if (it_drive_data != m_current_drives.end()) {
if (!eject_inner(m_last_save_path)) {
// success
@ -291,6 +284,7 @@ void RemovableDriveManager::eject_drive()
if (m_callback_evt_handler)
wxPostEvent(m_callback_evt_handler, RemovableDriveEjectEvent(EVT_REMOVABLE_DRIVE_EJECTED, std::pair<DriveData, bool>({"",""}, false)));
}
#endif
#if 0
// Implementation used until 2.5.x version
// Some usb drives does not eject properly (still visible in file explorer). Some even does not write all content and eject.

View File

@ -192,9 +192,13 @@ bool StyleManager::load_style(const EmbossStyle &style) {
bool StyleManager::load_style(const EmbossStyle &style, const wxFont &font)
{
m_style_cache.style = style; // copy
// wx font property has bigger priority to set
// it must be after copy of the style
if (!set_wx_font(font)) return false;
m_style_cache.style = style; // copy
m_style_cache.style_index = std::numeric_limits<size_t>::max();
m_style_cache.style_index = std::numeric_limits<size_t>::max();
m_style_cache.stored_wx_font = {};
m_style_cache.truncated_name.clear();
return true;

View File

@ -124,8 +124,16 @@ std::optional<RaycastManager::Hit> RaycastManager::unproject(const Vec3d &point,
Transform3d tr_inv = transformation.inverse();
Vec3d mesh_point = tr_inv * point;
Vec3d mesh_direction = tr_inv.linear() * direction;
std::vector<AABBMesh::hit_result> hits = mesh.query_ray_hits(mesh_point, mesh_direction);
for (const AABBMesh::hit_result &hit : hits) {
// Need for detect that actual point position is on correct place
Vec3d point_positive = mesh_point - mesh_direction;
Vec3d point_negative = mesh_point + mesh_direction;
// Throw ray to both directions of ray
std::vector<AABBMesh::hit_result> hits = mesh.query_ray_hits(point_positive, mesh_direction);
std::vector<AABBMesh::hit_result> hits_neg = mesh.query_ray_hits(point_negative, -mesh_direction);
hits.insert(hits.end(), std::make_move_iterator(hits_neg.begin()), std::make_move_iterator(hits_neg.end()));
for (const AABBMesh::hit_result &hit : hits) {
double squared_distance = (mesh_point - hit.position()).squaredNorm();
if (closest.has_value() &&
closest->squared_distance < squared_distance)

View File

@ -106,6 +106,7 @@ public:
/// <summary>
/// Unproject Ray(point direction) on mesh by MeshRaycasters
/// NOTE: It inspect also oposit direction of ray !!
/// </summary>
/// <param name="point">Start point for ray</param>
/// <param name="direction">Direction of ray</param>

View File

@ -21,7 +21,7 @@ static inline Slic3r::Point random_point(float LO=-50, float HI=50)
// build a sample extrusion entity collection with random start and end points.
static Slic3r::ExtrusionPath random_path(size_t length = 20, float LO = -50, float HI = 50)
{
ExtrusionPath t {erPerimeter, 1.0, 1.0, 1.0};
ExtrusionPath t { ExtrusionRole::Perimeter, 1.0, 1.0, 1.0 };
for (size_t j = 0; j < length; ++ j)
t.polyline.append(random_point(LO, HI));
return t;
@ -37,7 +37,7 @@ static Slic3r::ExtrusionPaths random_paths(size_t count = 10, size_t length = 20
SCENARIO("ExtrusionPath", "[ExtrusionEntity]") {
GIVEN("Simple path") {
Slic3r::ExtrusionPath path{ erExternalPerimeter };
Slic3r::ExtrusionPath path{ ExtrusionRole::ExternalPerimeter };
path.polyline = { { 100, 100 }, { 200, 100 }, { 200, 200 } };
path.mm3_per_mm = 1.;
THEN("first point") {
@ -64,7 +64,7 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
Polygon square { { 100, 100 }, { 200, 100 }, { 200, 200 }, { 100, 200 } };
ExtrusionLoop loop;
loop.paths.emplace_back(new_extrusion_path(square.split_at_first_point(), erExternalPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(square.split_at_first_point(), ExtrusionRole::ExternalPerimeter, 1.));
THEN("polygon area") {
REQUIRE(loop.polygon().area() == Approx(square.area()));
}
@ -81,7 +81,7 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
REQUIRE(loop2->paths.size() == 1);
}
THEN("cloned role") {
REQUIRE(loop2->paths.front().role() == erExternalPerimeter);
REQUIRE(loop2->paths.front().role() == ExtrusionRole::ExternalPerimeter);
}
}
WHEN("cloned and split") {
@ -107,8 +107,8 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
Polyline polyline1 { { 100, 100 }, { 200, 100 }, { 200, 200 } };
Polyline polyline2 { { 200, 200 }, { 100, 200 }, { 100, 100 } };
ExtrusionLoop loop;
loop.paths.emplace_back(new_extrusion_path(polyline1, erExternalPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline2, erOverhangPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline1, ExtrusionRole::ExternalPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline2, ExtrusionRole::OverhangPerimeter, 1.));
double tot_len = polyline1.length() + polyline2.length();
THEN("length") {
@ -135,9 +135,9 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
REQUIRE(loop2->paths[1].polyline.back() == loop2->paths[2].polyline.front());
}
THEN("expected order after splitting") {
REQUIRE(loop2->paths.front().role() == erExternalPerimeter);
REQUIRE(loop2->paths[1].role() == erOverhangPerimeter);
REQUIRE(loop2->paths[2].role() == erExternalPerimeter);
REQUIRE(loop2->paths.front().role() == ExtrusionRole::ExternalPerimeter);
REQUIRE(loop2->paths[1].role() == ExtrusionRole::OverhangPerimeter);
REQUIRE(loop2->paths[2].role() == ExtrusionRole::ExternalPerimeter);
}
THEN("path has correct number of points") {
REQUIRE(loop2->paths.front().polyline.size() == 2);
@ -175,8 +175,8 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
REQUIRE(loop2->paths[1].polyline.back() == loop2->paths.front().polyline.front());
}
THEN("expected order after splitting") {
REQUIRE(loop2->paths.front().role() == erOverhangPerimeter);
REQUIRE(loop2->paths[1].role() == erExternalPerimeter);
REQUIRE(loop2->paths.front().role() == ExtrusionRole::OverhangPerimeter);
REQUIRE(loop2->paths[1].role() == ExtrusionRole::ExternalPerimeter);
}
THEN("path has correct number of points") {
REQUIRE(loop2->paths.front().polyline.size() == 3);
@ -207,10 +207,10 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
Polyline polyline3 { { 9829401, 9321068 }, { 4821067, 9321068 }, { 4821067, 4821067 }, { 9829401, 4821067 } };
Polyline polyline4 { { 9829401, 4821067 }, { 59312736,4821067 } };
ExtrusionLoop loop;
loop.paths.emplace_back(new_extrusion_path(polyline1, erExternalPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline2, erOverhangPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline3, erExternalPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline4, erOverhangPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline1, ExtrusionRole::ExternalPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline2, ExtrusionRole::OverhangPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline3, ExtrusionRole::ExternalPerimeter, 1.));
loop.paths.emplace_back(new_extrusion_path(polyline4, ExtrusionRole::OverhangPerimeter, 1.));
double len = loop.length();
WHEN("splitting at vertex") {
Point point(4821067, 9321068);
@ -220,10 +220,10 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
REQUIRE(loop.length() == Approx(len));
}
THEN("order is correctly preserved after splitting") {
REQUIRE(loop.paths.front().role() == erExternalPerimeter);
REQUIRE(loop.paths[1].role() == erOverhangPerimeter);
REQUIRE(loop.paths[2].role() == erExternalPerimeter);
REQUIRE(loop.paths[3].role() == erOverhangPerimeter);
REQUIRE(loop.paths.front().role() == ExtrusionRole::ExternalPerimeter);
REQUIRE(loop.paths[1].role() == ExtrusionRole::OverhangPerimeter);
REQUIRE(loop.paths[2].role() == ExtrusionRole::ExternalPerimeter);
REQUIRE(loop.paths[3].role() == ExtrusionRole::OverhangPerimeter);
}
}
}
@ -233,7 +233,7 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
loop.paths.emplace_back(new_extrusion_path(
Polyline { { 15896783, 15868739 }, { 24842049, 12117558 }, { 33853238, 15801279 }, { 37591780, 24780128 }, { 37591780, 24844970 },
{ 33853231, 33825297 }, { 24842049, 37509013 }, { 15896798, 33757841 }, { 12211841, 24812544 }, { 15896783, 15868739 } },
erExternalPerimeter, 1.));
ExtrusionRole::ExternalPerimeter, 1.));
double len = loop.length();
THEN("split_at() preserves total length") {
loop.split_at({ 15896783, 15868739 }, false, 0);
@ -245,9 +245,9 @@ SCENARIO("ExtrusionLoop", "[ExtrusionEntity]")
SCENARIO("ExtrusionEntityCollection: Basics", "[ExtrusionEntity]")
{
Polyline polyline { { 100, 100 }, { 200, 100 }, { 200, 200 } };
ExtrusionPath path = new_extrusion_path(polyline, erExternalPerimeter, 1.);
ExtrusionPath path = new_extrusion_path(polyline, ExtrusionRole::ExternalPerimeter, 1.);
ExtrusionLoop loop;
loop.paths.emplace_back(new_extrusion_path(Polygon(polyline.points).split_at_first_point(), erInternalInfill, 1.));
loop.paths.emplace_back(new_extrusion_path(Polygon(polyline.points).split_at_first_point(), ExtrusionRole::InternalInfill, 1.));
ExtrusionEntityCollection collection;
collection.append(path);
THEN("no_sort is false by default") {
@ -378,7 +378,7 @@ TEST_CASE("ExtrusionEntityCollection: Chained path", "[ExtrusionEntity]") {
REQUIRE(chained == test.chained);
ExtrusionEntityCollection unchained_extrusions;
extrusion_entities_append_paths(unchained_extrusions.entities, test.unchained,
erInternalInfill, 0., 0.4f, 0.3f);
ExtrusionRole::InternalInfill, 0., 0.4f, 0.3f);
THEN("Chaining works") {
ExtrusionEntityCollection chained_extrusions = unchained_extrusions.chained_path_from(test.initial_point);
REQUIRE(chained_extrusions.entities.size() == test.chained.size());

View File

@ -80,13 +80,13 @@ SCENARIO("Perimeter nesting", "[Perimeters]")
}
THEN("expected number of external loops") {
size_t num_external = std::count_if(loops.entities.begin(), loops.entities.end(),
[](const ExtrusionEntity *ee){ return ee->role() == erExternalPerimeter; });
[](const ExtrusionEntity *ee){ return ee->role() == ExtrusionRole::ExternalPerimeter; });
REQUIRE(num_external == data.external);
}
THEN("expected external order") {
std::vector<bool> ext_order;
for (auto *ee : loops.entities)
ext_order.emplace_back(ee->role() == erExternalPerimeter);
ext_order.emplace_back(ee->role() == ExtrusionRole::ExternalPerimeter);
REQUIRE(ext_order == data.ext_order);
}
THEN("expected number of internal contour loops") {