Sync to 2.4.1-beta1

This commit is contained in:
Lukas Matena 2022-02-01 14:16:13 +01:00
parent ebb9041041
commit 5c616c5931
92 changed files with 920 additions and 45290 deletions

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="error"
x="0px"
y="0px"
viewBox="0 0 200 200"
enable-background="new 0 0 100 100"
xml:space="preserve"
sodipodi:docname="notification_error.svg"
width="200"
height="200"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs17" /><sodipodi:namedview
inkscape:document-rotation="0"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1377"
id="namedview15"
showgrid="false"
inkscape:zoom="5.04"
inkscape:cx="117.17146"
inkscape:cy="98.609664"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="error" />
<g
id="g4"
transform="matrix(2.52,0,0,2.52,-26,-26)">
<path
fill="#FFFFFF"
d="m 50,54.25 c -2.35,0 -4.25,-1.9 -4.25,-4.25 V 35 c 0,-2.35 1.9,-4.25 4.25,-4.25 2.35,0 4.25,1.9 4.25,4.25 v 15 c 0,2.35 -1.9,4.25 -4.25,4.25 z"
id="path2" />
</g>
<g
id="g8"
transform="matrix(2.52,0,0,2.52,-26,-26)">
<circle
fill="#FFFFFF"
cx="50"
cy="65"
r="5"
id="circle6" />
</g>
<g
id="g12"
transform="matrix(2.52,0,0,2.52,-26,-26)">
<path
fill="#FFFFFF"
d="M 50,89.25 C 28.36,89.25 10.75,71.64 10.75,50 10.75,28.36 28.36,10.75 50,10.75 71.64,10.75 89.25,28.36 89.25,50 89.25,71.64 71.64,89.25 50,89.25 Z m 0,-70 C 33.05,19.25 19.25,33.04 19.25,50 19.25,66.95 33.04,80.75 50,80.75 66.95,80.75 80.75,66.96 80.75,50 80.75,33.05 66.95,19.25 50,19.25 Z"
id="path10" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,6 @@
<<<<<<< HEAD
=======
min_slic3r_version = 2.3.2-alpha0 min_slic3r_version = 2.3.2-alpha0
0.0.12 Updated Anycubic i3 MEGA(S) profiles. 0.0.12 Updated Anycubic i3 MEGA(S) profiles.
0.0.11 Added bed model and texture for i3 Mega, i3 Mega S. 0.0.11 Added bed model and texture for i3 Mega, i3 Mega S.
>>>>>>> master
min_slic3r_version = 2.3.1-beta min_slic3r_version = 2.3.1-beta
0.0.10 Various updates for Anycubic Mega. Added filament profiles. 0.0.10 Various updates for Anycubic Mega. Added filament profiles.
0.0.9 Updated bed textures 0.0.9 Updated bed textures

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,7 @@
<<<<<<< HEAD
min_slic3r_version = 2.3.1-beta
=======
min_slic3r_version = 2.4.1-alpha0 min_slic3r_version = 2.4.1-alpha0
0.0.5 Added Artillery Hornet 0.0.5 Added Artillery Hornet
min_slic3r_version = 2.3.1-beta min_slic3r_version = 2.3.1-beta
0.0.4 Fixed first layer height in 0.28mm profile. 0.0.4 Fixed first layer height in 0.28mm profile.
>>>>>>> master
0.0.3 Fixed Genius bed size. 0.0.3 Fixed Genius bed size.
0.0.2 Updated start g-code. 0.0.2 Updated start g-code.
0.0.1 Initial Artillery bundle 0.0.1 Initial Artillery bundle

View File

@ -1,16 +1,10 @@
############### ###############
# AUTHOR: Szabolcs Hornyak / design85@gmail.com # AUTHOR: Szabolcs Hornyak / design85@gmail.com
# https://szabolcs.eu/2020/12/29/prusaslicer-sw-x1-genius/ # https://szabolcs.eu/2020/12/29/prusaslicer-sw-x1-genius/
<<<<<<< HEAD
# Tested with PrusaSlicer 2.2, 2.3
###############
=======
############### ###############
## Artillery Hornet printer profile is based on PR https://github.com/slic3r/slic3r-profiles/pull/14 created by https://github.com/newbeetle ## Artillery Hornet printer profile is based on PR https://github.com/slic3r/slic3r-profiles/pull/14 created by https://github.com/newbeetle
>>>>>>> master
# Print profiles for the Artillery printers. # Print profiles for the Artillery printers.
[vendor] [vendor]
@ -18,11 +12,7 @@
name = Artillery name = Artillery
# Configuration version of this file. Config file will only be installed, if the config_version differs. # Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded. # This means, the server may force the PrusaSlicer configuration to be downgraded.
<<<<<<< HEAD
config_version = 0.0.3
=======
config_version = 0.0.5 config_version = 0.0.5
>>>>>>> master
# Where to get the updates from? # Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Artillery/ config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Artillery/
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1% # changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
@ -36,11 +26,7 @@ config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/Prus
############# #############
[printer_model:X1] [printer_model:X1]
<<<<<<< HEAD
name = Sidewinder X1
=======
name = Artillery Sidewinder X1 name = Artillery Sidewinder X1
>>>>>>> master
variants = 0.4 variants = 0.4
technology = FFF technology = FFF
bed_model = bed-x1.stl bed_model = bed-x1.stl
@ -48,19 +34,13 @@ bed_texture = bed-x1.png
default_materials = Generic PLA @Artillery; Generic ABS @Artillery; Generic PETG @Artillery; Generic TPU @Artillery default_materials = Generic PLA @Artillery; Generic ABS @Artillery; Generic PETG @Artillery; Generic TPU @Artillery
[printer_model:Genius] [printer_model:Genius]
<<<<<<< HEAD
name = Genius
=======
name = Artillery Genius name = Artillery Genius
>>>>>>> master
variants = 0.4 variants = 0.4
technology = FFF technology = FFF
bed_model = bed-genius.stl bed_model = bed-genius.stl
bed_texture = bed-genius.png bed_texture = bed-genius.png
default_materials = Generic PLA @Artillery; Generic ABS @Artillery; Generic PETG @Artillery; Generic TPU @Artillery default_materials = Generic PLA @Artillery; Generic ABS @Artillery; Generic PETG @Artillery; Generic TPU @Artillery
<<<<<<< HEAD
=======
[printer_model:Hornet] [printer_model:Hornet]
name = Artillery Hornet name = Artillery Hornet
variants = 0.4 variants = 0.4
@ -69,7 +49,6 @@ bed_model = bed-hornet.stl
bed_texture = bed-hornet.png bed_texture = bed-hornet.png
default_materials = Generic PLA @Artillery; Generic ABS @Artillery; Generic PETG @Artillery; Generic TPU @Artillery default_materials = Generic PLA @Artillery; Generic ABS @Artillery; Generic PETG @Artillery; Generic TPU @Artillery
>>>>>>> master
# Common printer preset # Common printer preset
[printer:*common*] [printer:*common*]
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0 before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0
@ -83,10 +62,7 @@ extruder_colour = #FFFF00
extruder_offset = 0x0 extruder_offset = 0x0
gcode_flavor = marlin gcode_flavor = marlin
layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
<<<<<<< HEAD
=======
machine_limits_usage = emit_to_gcode machine_limits_usage = emit_to_gcode
>>>>>>> master
machine_max_acceleration_e = 5000,5000 machine_max_acceleration_e = 5000,5000
machine_max_acceleration_extruding = 1250,1250 machine_max_acceleration_extruding = 1250,1250
machine_max_acceleration_retracting = 1250,1250 machine_max_acceleration_retracting = 1250,1250
@ -140,10 +116,6 @@ start_gcode = ; Initial setups\nG90 ; use absolute coordinates\nM83 ; extruder r
inherits = *common* inherits = *common*
start_gcode = ; Initial setups\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM900 K0.12 ; K factor\nM900 W[extrusion_width] H[layer_height] D[filament_diameter]\nM200 D0 ; disable volumetric e\nM220 S100 ; reset speed factor to 100%\nM221 S100 ; reset extrusion rate to 100%\n\n; Set the heating\nM190 S[first_layer_bed_temperature] ; wait for bed to heat up\nM104 S[first_layer_temperature] ; start nozzle heating but don't wait\n\n; Home\nG1 Z3 F3000 ; move z up little to prevent scratching of surface\nG28 ; home all axes\nG1 X3 Y3 F5000 ; move to corner of the bed to avoid ooze over centre\n\n; Wait for final heating\nM109 S[first_layer_temperature] ; wait for the nozzle to heat up\nM190 S[first_layer_bed_temperature] ; wait for the bed to heat up\n\n;Auto bed Leveling\n@BEDLEVELVISUALIZER\nG29 ; ABL T\nM420 S1 Z3 ; reload and fade mesh bed leveling until it reach 3mm Z\n\n; Return to prime position, Prime line routine\nG92 E0 ; Reset Extruder\nG1 Z3 F3000 ; move z up little to prevent scratching of surface\nG1 X10 Y.5 Z0.25 F5000.0 ; Move to start position\nG1 X100 Y.5 Z0.25 F1500.0 E15 ; Draw the first line\nG1 X100 Y.2 Z0.25 F5000.0 ; Move to side a little\nG1 X10 Y.2 Z0.25 F1500.0 E30 ; Draw the second line\nG92 E0 ; Reset Extruder\nM221 S{if layer_height<0.075}100{else}95{endif} start_gcode = ; Initial setups\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM900 K0.12 ; K factor\nM900 W[extrusion_width] H[layer_height] D[filament_diameter]\nM200 D0 ; disable volumetric e\nM220 S100 ; reset speed factor to 100%\nM221 S100 ; reset extrusion rate to 100%\n\n; Set the heating\nM190 S[first_layer_bed_temperature] ; wait for bed to heat up\nM104 S[first_layer_temperature] ; start nozzle heating but don't wait\n\n; Home\nG1 Z3 F3000 ; move z up little to prevent scratching of surface\nG28 ; home all axes\nG1 X3 Y3 F5000 ; move to corner of the bed to avoid ooze over centre\n\n; Wait for final heating\nM109 S[first_layer_temperature] ; wait for the nozzle to heat up\nM190 S[first_layer_bed_temperature] ; wait for the bed to heat up\n\n;Auto bed Leveling\n@BEDLEVELVISUALIZER\nG29 ; ABL T\nM420 S1 Z3 ; reload and fade mesh bed leveling until it reach 3mm Z\n\n; Return to prime position, Prime line routine\nG92 E0 ; Reset Extruder\nG1 Z3 F3000 ; move z up little to prevent scratching of surface\nG1 X10 Y.5 Z0.25 F5000.0 ; Move to start position\nG1 X100 Y.5 Z0.25 F1500.0 E15 ; Draw the first line\nG1 X100 Y.2 Z0.25 F5000.0 ; Move to side a little\nG1 X10 Y.2 Z0.25 F1500.0 E30 ; Draw the second line\nG92 E0 ; Reset Extruder\nM221 S{if layer_height<0.075}100{else}95{endif}
<<<<<<< HEAD
[printer:Sidewinder X1]
inherits = *common_STOCK_FW*
=======
[printer:*bowden*] [printer:*bowden*]
inherits = *common_STOCK_FW* inherits = *common_STOCK_FW*
retract_length = 5 retract_length = 5
@ -161,57 +133,39 @@ default_print_profile = 0.20mm NORMAL @Artillery
[printer:Artillery Sidewinder X1] [printer:Artillery Sidewinder X1]
inherits = *common_STOCK_FW* inherits = *common_STOCK_FW*
renamed_from = "Sidewinder X1" renamed_from = "Sidewinder X1"
>>>>>>> master
printer_model = X1 printer_model = X1
printer_variant = 0.4 printer_variant = 0.4
bed_shape = 0x0,300x0,300x300,0x300 bed_shape = 0x0,300x0,300x300,0x300
max_print_height = 400 max_print_height = 400
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_Artillery\nPRINTER_MODEL_X1 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_Artillery\nPRINTER_MODEL_X1
<<<<<<< HEAD
[printer:Sidewinder X1 BL-TOUCH]
inherits = *common_UPD_FW*
=======
[printer:Artillery Sidewinder X1 BL-TOUCH] [printer:Artillery Sidewinder X1 BL-TOUCH]
inherits = *common_UPD_FW* inherits = *common_UPD_FW*
renamed_from = "Sidewinder X1 BL-TOUCH" renamed_from = "Sidewinder X1 BL-TOUCH"
>>>>>>> master
printer_model = X1 printer_model = X1
printer_variant = 0.4 printer_variant = 0.4
bed_shape = 0x0,300x0,300x300,0x300 bed_shape = 0x0,300x0,300x300,0x300
max_print_height = 400 max_print_height = 400
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_Artillery\nPRINTER_MODEL_X1 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_Artillery\nPRINTER_MODEL_X1
<<<<<<< HEAD
[printer:Genius]
inherits = *common_STOCK_FW*
=======
[printer:Artillery Genius] [printer:Artillery Genius]
inherits = *common_STOCK_FW* inherits = *common_STOCK_FW*
renamed_from = "Genius" renamed_from = "Genius"
>>>>>>> master
printer_model = Genius printer_model = Genius
printer_variant = 0.4 printer_variant = 0.4
bed_shape = 0x0,220x0,220x220,0x220 bed_shape = 0x0,220x0,220x220,0x220
max_print_height = 250 max_print_height = 250
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_Artillery\nPRINTER_MODEL_Genius 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_Artillery\nPRINTER_MODEL_Genius
<<<<<<< HEAD
[printer:Genius BL-TOUCH]
inherits = *common_UPD_FW*
=======
[printer:Artillery Genius BL-TOUCH] [printer:Artillery Genius BL-TOUCH]
inherits = *common_UPD_FW* inherits = *common_UPD_FW*
renamed_from = "Genius BL-TOUCH" renamed_from = "Genius BL-TOUCH"
>>>>>>> master
printer_model = Genius printer_model = Genius
printer_variant = 0.4 printer_variant = 0.4
bed_shape = 0x0,220x0,220x220,0x220 bed_shape = 0x0,220x0,220x220,0x220
max_print_height = 250 max_print_height = 250
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_Artillery\nPRINTER_MODEL_Genius 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_Artillery\nPRINTER_MODEL_Genius
<<<<<<< HEAD
=======
[printer:Artillery Hornet] [printer:Artillery Hornet]
inherits = *bowden* inherits = *bowden*
printer_model = Hornet printer_model = Hornet
@ -221,7 +175,6 @@ max_print_height = 250
machine_limits_usage = time_estimate_only machine_limits_usage = time_estimate_only
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_Artillery\nPRINTER_MODEL_Hornet\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_Artillery\nPRINTER_MODEL_Hornet\nPRINTER_HAS_Bowden
>>>>>>> master
########### ###########
## PRINT ## ## PRINT ##
########### ###########
@ -384,10 +337,7 @@ top_solid_layers = 4
[print:*0.28mm*] [print:*0.28mm*]
inherits = *common* inherits = *common*
layer_height = 0.28 layer_height = 0.28
<<<<<<< HEAD
=======
first_layer_height = 0.36 first_layer_height = 0.36
>>>>>>> master
top_infill_extrusion_width = 0.45 top_infill_extrusion_width = 0.45
first_layer_extrusion_width = 0.75 first_layer_extrusion_width = 0.75
bottom_solid_layers = 3 bottom_solid_layers = 3
@ -395,21 +345,6 @@ top_solid_layers = 4
[print:0.08mm SUPERDETAIL @Artillery] [print:0.08mm SUPERDETAIL @Artillery]
inherits = *0.08mm* inherits = *0.08mm*
<<<<<<< HEAD
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.10mm HIGHDETAIL @Artillery]
inherits = *0.10mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.12mm DETAIL @Artillery]
inherits = *0.12mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.16mm OPTIMAL @Artillery]
inherits = *0.16mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
=======
compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4 compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4
[print:0.10mm HIGHDETAIL @Artillery] [print:0.10mm HIGHDETAIL @Artillery]
@ -423,7 +358,6 @@ compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle
[print:0.16mm OPTIMAL @Artillery] [print:0.16mm OPTIMAL @Artillery]
inherits = *0.16mm* inherits = *0.16mm*
compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4 compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4
>>>>>>> master
[print:0.20mm SLOW @Artillery] [print:0.20mm SLOW @Artillery]
inherits = *0.20mm* inherits = *0.20mm*
@ -437,19 +371,11 @@ solid_infill_speed = 50
top_solid_infill_speed = 25 top_solid_infill_speed = 25
first_layer_speed = 15 first_layer_speed = 15
travel_speed = 100 travel_speed = 100
<<<<<<< HEAD
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.20mm NORMAL @Artillery]
inherits = *0.20mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
=======
compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4 compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4
[print:0.20mm NORMAL @Artillery] [print:0.20mm NORMAL @Artillery]
inherits = *0.20mm* inherits = *0.20mm*
compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4 compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4
>>>>>>> master
[print:0.20mm SPEED @Artillery] [print:0.20mm SPEED @Artillery]
inherits = *0.20mm* inherits = *0.20mm*
@ -464,17 +390,6 @@ perimeters = 2
solid_infill_speed = 150 solid_infill_speed = 150
top_solid_infill_speed = 50 top_solid_infill_speed = 50
travel_speed = 170 travel_speed = 170
<<<<<<< HEAD
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.24mm DRAFT @Artillery]
inherits = *0.24mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.28mm SUPERDRAFT @Artillery]
inherits = *0.28mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
=======
compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4 compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4
[print:0.24mm DRAFT @Artillery] [print:0.24mm DRAFT @Artillery]
@ -484,7 +399,6 @@ compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle
[print:0.28mm SUPERDRAFT @Artillery] [print:0.28mm SUPERDRAFT @Artillery]
inherits = *0.28mm* inherits = *0.28mm*
compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4 compatible_printers_condition = printer_model=~/(X1|Genius|Hornet).*/ and nozzle_diameter[0]==0.4
>>>>>>> master
############### ###############
## FILAMENTS ## ## FILAMENTS ##

View File

@ -1,11 +1,8 @@
<<<<<<< HEAD
=======
min_slic3r_version = 2.4.0-rc min_slic3r_version = 2.4.0-rc
0.1.3 Ender-3 S1 improvements. 0.1.3 Ender-3 S1 improvements.
0.1.2 Added alpha Ender 3 S1 profiles. 0.1.2 Added alpha Ender 3 S1 profiles.
min_slic3r_version = 2.4.0-beta4 min_slic3r_version = 2.4.0-beta4
0.1.1 Added Ender 2 Pro 0.1.1 Added Ender 2 Pro
>>>>>>> master
min_slic3r_version = 2.3.2-alpha0 min_slic3r_version = 2.3.2-alpha0
0.1.0 Added Ender-7, Sermoon D1, CR-10 SMART 0.1.0 Added Ender-7, Sermoon D1, CR-10 SMART
min_slic3r_version = 2.3.1-beta min_slic3r_version = 2.3.1-beta

View File

@ -5,11 +5,7 @@
name = Creality name = Creality
# Configuration version of this file. Config file will only be installed, if the config_version differs. # Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded. # This means, the server may force the PrusaSlicer configuration to be downgraded.
<<<<<<< HEAD
config_version = 0.1.0
=======
config_version = 0.1.3 config_version = 0.1.3
>>>>>>> master
# Where to get the updates from? # Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Creality/ 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% # changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
@ -45,8 +41,6 @@ bed_model = ender3v2_bed.stl
bed_texture = ender3v2.svg bed_texture = ender3v2.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 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
<<<<<<< HEAD
=======
[printer_model:ENDER3S1] [printer_model:ENDER3S1]
name = Creality Ender-3 S1 name = Creality Ender-3 S1
variants = 0.4 variants = 0.4
@ -56,7 +50,6 @@ bed_model = ender3v2_bed.stl
bed_texture = ender3v2.svg bed_texture = ender3v2.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 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
>>>>>>> master
[printer_model:ENDER3MAX] [printer_model:ENDER3MAX]
name = Creality Ender-3 Max name = Creality Ender-3 Max
variants = 0.4 variants = 0.4
@ -120,8 +113,6 @@ bed_model = ender2_bed.stl
bed_texture = ender2.svg bed_texture = ender2.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 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
<<<<<<< HEAD
=======
[printer_model:ENDER2PRO] [printer_model:ENDER2PRO]
name = Creality Ender-2 Pro name = Creality Ender-2 Pro
variants = 0.4 variants = 0.4
@ -131,7 +122,6 @@ bed_model = ender2pro_bed.stl
bed_texture = ender2pro.svg bed_texture = ender2pro.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 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
>>>>>>> master
[printer_model:CR5PRO] [printer_model:CR5PRO]
name = Creality CR-5 Pro name = Creality CR-5 Pro
variants = 0.4 variants = 0.4
@ -381,11 +371,7 @@ notes =
overhangs = 0 overhangs = 0
only_retract_when_crossing_perimeters = 0 only_retract_when_crossing_perimeters = 0
ooze_prevention = 0 ooze_prevention = 0
<<<<<<< HEAD
output_filename_format = {input_filename_base}_{print_time}_{layer_height}mm_{temperature[0]}C_{filament_type[0]}_{printer_model}.gcode
=======
output_filename_format = {input_filename_base}_{print_time}_{digits(layer_height,1,2)}mm_{temperature[0]}C_{filament_type[0]}_{printer_model}.gcode output_filename_format = {input_filename_base}_{print_time}_{digits(layer_height,1,2)}mm_{temperature[0]}C_{filament_type[0]}_{printer_model}.gcode
>>>>>>> master
perimeters = 2 perimeters = 2
perimeter_extruder = 1 perimeter_extruder = 1
perimeter_extrusion_width = 0.45 perimeter_extrusion_width = 0.45
@ -923,39 +909,6 @@ start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140
# Intended for printers with vendor official firmware verified to support M25 # Intended for printers with vendor official firmware verified to support M25
[printer:*pauseprint*] [printer:*pauseprint*]
pause_print_gcode = M25 ; pause print pause_print_gcode = M25 ; pause print
<<<<<<< HEAD
# Intended for printers where the Z-axis lowers the print bed during printing, like the Ender-5 series
[printer:*descendingz*]
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} ; move print head out of the way\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+max_print_height-10} F600{endif} ; Move print bed close to the bottom\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, 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
=======
# Intended for printers where the Z-axis lowers the print bed during printing, like the Ender-5 series # Intended for printers where the Z-axis lowers the print bed during printing, like the Ender-5 series
[printer:*descendingz*] [printer:*descendingz*]
@ -994,7 +947,6 @@ retract_restart_extra_toolchange = 0,0
retract_speed = 60,60 retract_speed = 60,60
wipe = 1,1 wipe = 1,1
>>>>>>> master
[printer:Creality Ender-3] [printer:Creality Ender-3]
inherits = *common* inherits = *common*
renamed_from = "Creality ENDER-3" renamed_from = "Creality ENDER-3"
@ -1016,8 +968,6 @@ max_print_height = 250
printer_model = ENDER3V2 printer_model = ENDER3V2
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_ENDER3V2\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_ENDER3V2\nPRINTER_HAS_BOWDEN
<<<<<<< HEAD
=======
[printer:Creality Ender-3 S1] [printer:Creality Ender-3 S1]
inherits = *common*; *spriteextruder* inherits = *common*; *spriteextruder*
bed_shape = 5x0,215x0,215x220,5x220 bed_shape = 5x0,215x0,215x220,5x220
@ -1025,7 +975,6 @@ max_print_height = 270
printer_model = ENDER3S1 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
>>>>>>> master
[printer:Creality Ender-3 Max] [printer:Creality Ender-3 Max]
inherits = *common* inherits = *common*
retract_length = 6 retract_length = 6
@ -1085,8 +1034,6 @@ max_print_height = 200
printer_model = ENDER2 printer_model = ENDER2
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_ENDER2\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_ENDER2\nPRINTER_HAS_BOWDEN
<<<<<<< HEAD
=======
[printer:Creality Ender-2 Pro] [printer:Creality Ender-2 Pro]
inherits = *common* inherits = *common*
renamed_from = "Creality ENDER-2 Pro" renamed_from = "Creality ENDER-2 Pro"
@ -1095,7 +1042,6 @@ max_print_height = 180
printer_model = ENDER2PRO printer_model = ENDER2PRO
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_ENDER2PRO\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_ENDER2PRO\nPRINTER_HAS_BOWDEN
>>>>>>> master
[printer:Creality CR-5 Pro] [printer:Creality CR-5 Pro]
inherits = *common*; *slowabl*; *descendingz* inherits = *common*; *slowabl*; *descendingz*
retract_length = 6 retract_length = 6

View File

@ -1,9 +1,4 @@
min_slic3r_version = 2.3.1-beta min_slic3r_version = 2.3.1-beta
<<<<<<< HEAD
0.0.1 Initial version
0.0.2 Improved start gcode, changed filename format
=======
0.0.3 Set default filament profile. 0.0.3 Set default filament profile.
0.0.2 Improved start gcode, changed filename format 0.0.2 Improved start gcode, changed filename format
0.0.1 Initial version 0.0.1 Initial version
>>>>>>> master

View File

@ -3,11 +3,7 @@
[vendor] [vendor]
# Vendor name will be shown by the Config Wizard. # Vendor name will be shown by the Config Wizard.
name = INAT name = INAT
<<<<<<< HEAD
config_version = 0.0.2
=======
config_version = 0.0.3 config_version = 0.0.3
>>>>>>> master
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/INAT/ config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/INAT/
### ###
@ -19,20 +15,14 @@ name = INAT Proton X Rail
variants = 0.4 variants = 0.4
technology = FFF technology = FFF
family = Proton family = Proton
<<<<<<< HEAD
=======
default_materials = PLA @PROTON_X default_materials = PLA @PROTON_X
>>>>>>> master
[printer_model:PROTON_X_ROD] [printer_model:PROTON_X_ROD]
name = INAT Proton X Rod name = INAT Proton X Rod
variants = 0.4 variants = 0.4
technology = FFF technology = FFF
family = Proton family = Proton
<<<<<<< HEAD
=======
default_materials = PLA @PROTON_X default_materials = PLA @PROTON_X
>>>>>>> master
### ###

View File

@ -1,8 +1,3 @@
<<<<<<< HEAD
min_slic3r_version = 2.3.2-alpha0
1.3.0 Added SL1S SPEED profiles.
min_slic3r_version = 2.3.0-rc1
=======
min_slic3r_version = 2.4.0-rc min_slic3r_version = 2.4.0-rc
1.4.2 Added SLA material profiles. 1.4.2 Added SLA material profiles.
1.4.1 Updated firmware version. 1.4.1 Updated firmware version.
@ -39,7 +34,6 @@ min_slic3r_version = 2.3.0-rc1
1.2.10 Added multiple profiles for Filatech filaments. Updated SLA print settings (pad wall slope angle). 1.2.10 Added multiple profiles for Filatech filaments. Updated SLA print settings (pad wall slope angle).
1.2.9 Added material profiles for Prusament Resin. 1.2.9 Added material profiles for Prusament Resin.
1.2.8 Added multiple add:north and Extrudr filament profiles. 1.2.8 Added multiple add:north and Extrudr filament profiles.
>>>>>>> master
1.2.7 Updated "Prusament PC Blend Carbon Fiber" profile for Prusa MINI. 1.2.7 Updated "Prusament PC Blend Carbon Fiber" profile for Prusa MINI.
1.2.6 Added filament profile for "Prusament PC Blend Carbon Fiber". 1.2.6 Added filament profile for "Prusament PC Blend Carbon Fiber".
1.2.5 Updated firmware version. Added filament profiles. Various improvements. 1.2.5 Updated firmware version. Added filament profiles. Various improvements.
@ -56,10 +50,7 @@ min_slic3r_version = 2.3.0-alpha4
1.2.0-alpha1 Renamed MK3S and MINI printer profiles. Updated end g-code (MINI). Added new SLA materials and filament profiles. 1.2.0-alpha1 Renamed MK3S and MINI printer profiles. Updated end g-code (MINI). Added new SLA materials and filament profiles.
1.2.0-alpha0 Added filament spool weights 1.2.0-alpha0 Added filament spool weights
min_slic3r_version = 2.2.0-alpha3 min_slic3r_version = 2.2.0-alpha3
<<<<<<< HEAD
=======
1.1.15 Updated firmware version. 1.1.15 Updated firmware version.
>>>>>>> master
1.1.14 Updated firmware version. 1.1.14 Updated firmware version.
1.1.13 Updated firmware version. Updated end g-code in MMU2 printer profiles. 1.1.13 Updated firmware version. Updated end g-code in MMU2 printer profiles.
1.1.12 Added Prusament PVB filament profile. Added 0.8mm nozzle profiles. 1.1.12 Added Prusament PVB filament profile. Added 0.8mm nozzle profiles.

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,5 @@
min_slic3r_version = 2.3.2-alpha0 min_slic3r_version = 2.3.2-alpha0
<<<<<<< HEAD
=======
0.0.9 Added AzteQ Industrial materials PC/ABS (Fillamentum), PC-Max (Polymaker), Nylon FX256 (Fillamentum), Added DeltiQ 2 materials Nylon PA12 (Fiberlogy), Nylon CF15 Carbon (Fillamentum), PEBA 90A - FlexFill (Fillamentum), MoldLay (Wax-Alike), disabled retract only when crossing perimeters, some minor setting improvements 0.0.9 Added AzteQ Industrial materials PC/ABS (Fillamentum), PC-Max (Polymaker), Nylon FX256 (Fillamentum), Added DeltiQ 2 materials Nylon PA12 (Fiberlogy), Nylon CF15 Carbon (Fillamentum), PEBA 90A - FlexFill (Fillamentum), MoldLay (Wax-Alike), disabled retract only when crossing perimeters, some minor setting improvements
>>>>>>> master
0.0.8 Added new AzteQ Industrial printer, added DeltiQ 2 profiles for 0.6mm nozzle, added material ASA 275 (Spectrum), some minor setting improvements 0.0.8 Added new AzteQ Industrial printer, added DeltiQ 2 profiles for 0.6mm nozzle, added material ASA 275 (Spectrum), some minor setting improvements
min_slic3r_version = 2.3.0-alpha3 min_slic3r_version = 2.3.0-alpha3
0.0.7 Added PLA, PETG profiles for 0.25 nozzle, fixed supports on 0.8 nozzle profile, fixed max volumetric speed, disabled elefant foot compensation 0.0.7 Added PLA, PETG profiles for 0.25 nozzle, fixed supports on 0.8 nozzle profile, fixed max volumetric speed, disabled elefant foot compensation

View File

@ -6,11 +6,7 @@
name = TriLAB name = TriLAB
# Configuration version of this file. Config file will only be installed, if the config_version differs. # Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded. # This means, the server may force the PrusaSlicer configuration to be downgraded.
<<<<<<< HEAD
config_version = 0.0.8
=======
config_version = 0.0.9 config_version = 0.0.9
>>>>>>> master
# Where to get the updates from? # Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/TriLAB/ config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/TriLAB/
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1% # changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
@ -26,11 +22,7 @@ technology = FFF
family = AzteQ family = AzteQ
bed_model = aq_bed.stl bed_model = aq_bed.stl
bed_texture = aq_bed_texture.svg bed_texture = aq_bed_texture.svg
<<<<<<< HEAD
default_materials = AzteQ Industrial (Door Opened) - PLA - ExtraFill (Fillamentum);AzteQ Industrial (Door Opened) - PLA - Generic;AzteQ Industrial (PLA Printhead) - PLA - ExtraFill (Fillamentum);AzteQ Industrial - ABS - ExtraFill (Fillamentum);AzteQ Industrial - ABS - Generic;AzteQ Industrial - ASA - ExtraFill (Fillamentum);AzteQ Industrial - ASA - Generic;AzteQ Industrial - ASA - Prusament (Prusa);AzteQ Industrial - PA - Nylon PA12 (Fiberlogy);AzteQ Industrial - PC Blend - Prusament (Prusa)
=======
default_materials = AzteQ Industrial (Door Opened) - PLA - ExtraFill (Fillamentum);AzteQ Industrial (Door Opened) - PLA - Generic;AzteQ Industrial (PLA Printhead) - PLA - ExtraFill (Fillamentum);AzteQ Industrial - ABS - ExtraFill (Fillamentum);AzteQ Industrial - ABS - Generic;AzteQ Industrial - ASA - ExtraFill (Fillamentum);AzteQ Industrial - ASA - Generic;AzteQ Industrial - ASA - Prusament (Prusa);AzteQ Industrial - PA - Nylon PA12 (Fiberlogy);AzteQ Industrial - PC Blend - Prusament (Prusa);AzteQ Industrial - PC - PolyMax (Polymaker);AzteQ Industrial - PC - PolyMax (Polymaker) @0.6 nozzle;AzteQ Industrial - PC/ABS - (Fillamentum);AzteQ Industrial - PC/ABS - (Fillamentum) @0.6 nozzle;AzteQ Industrial - PA - Nylon FX256 (Fillamentum);AzteQ Industrial - PA - Nylon FX256 (Fillamentum) @0.6 nozzle default_materials = AzteQ Industrial (Door Opened) - PLA - ExtraFill (Fillamentum);AzteQ Industrial (Door Opened) - PLA - Generic;AzteQ Industrial (PLA Printhead) - PLA - ExtraFill (Fillamentum);AzteQ Industrial - ABS - ExtraFill (Fillamentum);AzteQ Industrial - ABS - Generic;AzteQ Industrial - ASA - ExtraFill (Fillamentum);AzteQ Industrial - ASA - Generic;AzteQ Industrial - ASA - Prusament (Prusa);AzteQ Industrial - PA - Nylon PA12 (Fiberlogy);AzteQ Industrial - PC Blend - Prusament (Prusa);AzteQ Industrial - PC - PolyMax (Polymaker);AzteQ Industrial - PC - PolyMax (Polymaker) @0.6 nozzle;AzteQ Industrial - PC/ABS - (Fillamentum);AzteQ Industrial - PC/ABS - (Fillamentum) @0.6 nozzle;AzteQ Industrial - PA - Nylon FX256 (Fillamentum);AzteQ Industrial - PA - Nylon FX256 (Fillamentum) @0.6 nozzle
>>>>>>> master
[printer_model:DQ2] [printer_model:DQ2]
name = DeltiQ 2 name = DeltiQ 2
@ -39,11 +31,7 @@ technology = FFF
family = DeltiQ 2 family = DeltiQ 2
bed_model = dq2_bed.stl bed_model = dq2_bed.stl
bed_texture = dq2_bed_texture.svg bed_texture = dq2_bed_texture.svg
<<<<<<< HEAD
default_materials = DeltiQ - PLA - Generic;DeltiQ - PLA - ExtraFill (Fillamentum);DeltiQ - PETG - Generic;DeltiQ - PETG (Devil Design);DeltiQ - ABS - Generic;DeltiQ - ABS - ExtraFill (Fillamentum);DeltiQ - ASA - ExtraFill (Fillamentum);DeltiQ - ASA - ASA 275 (Spectrum);DeltiQ - CPE - HG100 (Fillamentum);DeltiQ - PLA - ExtraFill (Fillamentum) @0.25 nozzle;DeltiQ - PETG (Devil Design) @0.25 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - PETG (Devil Design) @0.6 nozzle;DeltiQ - ABS - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ASA 275 (Spectrum) @0.6 nozzle;DeltiQ - CPE - HG100 (Fillamentum) @0.6 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.8 nozzle;DeltiQ - PETG (Devil Design) @0.8 nozzle
=======
default_materials = DeltiQ - PLA - Generic;DeltiQ - PLA - ExtraFill (Fillamentum);DeltiQ - PETG - Generic;DeltiQ - PETG (Devil Design);DeltiQ - ABS - Generic;DeltiQ - ABS - ExtraFill (Fillamentum);DeltiQ - ASA - ExtraFill (Fillamentum);DeltiQ - ASA - ASA 275 (Spectrum);DeltiQ - CPE - HG100 (Fillamentum);DeltiQ - PLA - ExtraFill (Fillamentum) @0.25 nozzle;DeltiQ - PETG (Devil Design) @0.25 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - PETG (Devil Design) @0.6 nozzle;DeltiQ - ABS - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ASA 275 (Spectrum) @0.6 nozzle;DeltiQ - CPE - HG100 (Fillamentum) @0.6 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.8 nozzle;DeltiQ - PETG (Devil Design) @0.8 nozzle;DeltiQ - PA - Nylon PA12 (Fiberlogy);DeltiQ - PA - Nylon CF15 Carbon (Fillamentum);DeltiQ - MoldLay (Wax-Alike) default_materials = DeltiQ - PLA - Generic;DeltiQ - PLA - ExtraFill (Fillamentum);DeltiQ - PETG - Generic;DeltiQ - PETG (Devil Design);DeltiQ - ABS - Generic;DeltiQ - ABS - ExtraFill (Fillamentum);DeltiQ - ASA - ExtraFill (Fillamentum);DeltiQ - ASA - ASA 275 (Spectrum);DeltiQ - CPE - HG100 (Fillamentum);DeltiQ - PLA - ExtraFill (Fillamentum) @0.25 nozzle;DeltiQ - PETG (Devil Design) @0.25 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - PETG (Devil Design) @0.6 nozzle;DeltiQ - ABS - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ASA 275 (Spectrum) @0.6 nozzle;DeltiQ - CPE - HG100 (Fillamentum) @0.6 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.8 nozzle;DeltiQ - PETG (Devil Design) @0.8 nozzle;DeltiQ - PA - Nylon PA12 (Fiberlogy);DeltiQ - PA - Nylon CF15 Carbon (Fillamentum);DeltiQ - MoldLay (Wax-Alike)
>>>>>>> master
[printer_model:DQ2P] [printer_model:DQ2P]
name = DeltiQ 2 Plus name = DeltiQ 2 Plus
@ -52,11 +40,7 @@ technology = FFF
family = DeltiQ 2 family = DeltiQ 2
bed_model = dq2_bed.stl bed_model = dq2_bed.stl
bed_texture = dq2_bed_texture.svg bed_texture = dq2_bed_texture.svg
<<<<<<< HEAD
default_materials = DeltiQ - PLA - Generic;DeltiQ - PLA - ExtraFill (Fillamentum);DeltiQ - PETG - Generic;DeltiQ - PETG (Devil Design);DeltiQ - ABS - Generic;DeltiQ - ABS - ExtraFill (Fillamentum);DeltiQ - ASA - ExtraFill (Fillamentum);DeltiQ - ASA - ASA 275 (Spectrum);DeltiQ - CPE - HG100 (Fillamentum);DeltiQ - PLA - ExtraFill (Fillamentum) @0.25 nozzle;DeltiQ - PETG (Devil Design) @0.25 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - PETG (Devil Design) @0.6 nozzle;DeltiQ - ABS - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ASA 275 (Spectrum) @0.6 nozzle;DeltiQ - CPE - HG100 (Fillamentum) @0.6 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.8 nozzle;DeltiQ - PETG (Devil Design) @0.8 nozzle
=======
default_materials = DeltiQ - PLA - Generic;DeltiQ - PLA - ExtraFill (Fillamentum);DeltiQ - PETG - Generic;DeltiQ - PETG (Devil Design);DeltiQ - ABS - Generic;DeltiQ - ABS - ExtraFill (Fillamentum);DeltiQ - ASA - ExtraFill (Fillamentum);DeltiQ - ASA - ASA 275 (Spectrum);DeltiQ - CPE - HG100 (Fillamentum);DeltiQ - PLA - ExtraFill (Fillamentum) @0.25 nozzle;DeltiQ - PETG (Devil Design) @0.25 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - PETG (Devil Design) @0.6 nozzle;DeltiQ - ABS - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ASA 275 (Spectrum) @0.6 nozzle;DeltiQ - CPE - HG100 (Fillamentum) @0.6 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.8 nozzle;DeltiQ - PETG (Devil Design) @0.8 nozzle;DeltiQ - PA - Nylon PA12 (Fiberlogy);DeltiQ - PA - Nylon CF15 Carbon (Fillamentum);DeltiQ - MoldLay (Wax-Alike) default_materials = DeltiQ - PLA - Generic;DeltiQ - PLA - ExtraFill (Fillamentum);DeltiQ - PETG - Generic;DeltiQ - PETG (Devil Design);DeltiQ - ABS - Generic;DeltiQ - ABS - ExtraFill (Fillamentum);DeltiQ - ASA - ExtraFill (Fillamentum);DeltiQ - ASA - ASA 275 (Spectrum);DeltiQ - CPE - HG100 (Fillamentum);DeltiQ - PLA - ExtraFill (Fillamentum) @0.25 nozzle;DeltiQ - PETG (Devil Design) @0.25 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - PETG (Devil Design) @0.6 nozzle;DeltiQ - ABS - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ExtraFill (Fillamentum) @0.6 nozzle;DeltiQ - ASA - ASA 275 (Spectrum) @0.6 nozzle;DeltiQ - CPE - HG100 (Fillamentum) @0.6 nozzle;DeltiQ - PLA - ExtraFill (Fillamentum) @0.8 nozzle;DeltiQ - PETG (Devil Design) @0.8 nozzle;DeltiQ - PA - Nylon PA12 (Fiberlogy);DeltiQ - PA - Nylon CF15 Carbon (Fillamentum);DeltiQ - MoldLay (Wax-Alike)
>>>>>>> master
[printer_model:DQ2+FP2] [printer_model:DQ2+FP2]
name = DeltiQ 2 + FlexPrint 2 name = DeltiQ 2 + FlexPrint 2
@ -65,11 +49,7 @@ technology = FFF
family = DeltiQ 2 family = DeltiQ 2
bed_model = dq2_bed.stl bed_model = dq2_bed.stl
bed_texture = dq2_bed_texture.svg bed_texture = dq2_bed_texture.svg
<<<<<<< HEAD
default_materials = DeltiQ FP2 - PLA - Generic;DeltiQ FP2 - PLA - ExtraFill (Fillamentum);DeltiQ FP2 - PETG - Generic;DeltiQ FP2 - PETG (Devil Design);DeltiQ FP2 - ABS - Generic;DeltiQ FP2 - ABS - ExtraFill (Fillamentum);DeltiQ FP2 - ASA - ExtraFill (Fillamentum);DeltiQ FP2 - CPE - HG100 (Fillamentum);DeltiQ FP2 - FLEX - Generic;DeltiQ FP2 - TPU 92A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 98A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 93A (SMARTFIL)
=======
default_materials = DeltiQ FP2 - PLA - Generic;DeltiQ FP2 - PLA - ExtraFill (Fillamentum);DeltiQ FP2 - PETG - Generic;DeltiQ FP2 - PETG (Devil Design);DeltiQ FP2 - ABS - Generic;DeltiQ FP2 - ABS - ExtraFill (Fillamentum);DeltiQ FP2 - ASA - ExtraFill (Fillamentum);DeltiQ FP2 - CPE - HG100 (Fillamentum);DeltiQ FP2 - FLEX - Generic;DeltiQ FP2 - TPU 92A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 98A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 93A (SMARTFIL);DeltiQ FP2 - PEBA 90A - FlexFill (Fillamentum) default_materials = DeltiQ FP2 - PLA - Generic;DeltiQ FP2 - PLA - ExtraFill (Fillamentum);DeltiQ FP2 - PETG - Generic;DeltiQ FP2 - PETG (Devil Design);DeltiQ FP2 - ABS - Generic;DeltiQ FP2 - ABS - ExtraFill (Fillamentum);DeltiQ FP2 - ASA - ExtraFill (Fillamentum);DeltiQ FP2 - CPE - HG100 (Fillamentum);DeltiQ FP2 - FLEX - Generic;DeltiQ FP2 - TPU 92A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 98A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 93A (SMARTFIL);DeltiQ FP2 - PEBA 90A - FlexFill (Fillamentum)
>>>>>>> master
[printer_model:DQ2P+FP2] [printer_model:DQ2P+FP2]
name = DeltiQ 2 Plus + FlexPrint 2 name = DeltiQ 2 Plus + FlexPrint 2
@ -78,11 +58,7 @@ technology = FFF
family = DeltiQ 2 family = DeltiQ 2
bed_model = dq2_bed.stl bed_model = dq2_bed.stl
bed_texture = dq2_bed_texture.svg bed_texture = dq2_bed_texture.svg
<<<<<<< HEAD
default_materials = DeltiQ FP2 - PLA - Generic;DeltiQ FP2 - PLA - ExtraFill (Fillamentum);DeltiQ FP2 - PETG - Generic;DeltiQ FP2 - PETG (Devil Design);DeltiQ FP2 - ABS - Generic;DeltiQ FP2 - ABS - ExtraFill (Fillamentum);DeltiQ FP2 - ASA - ExtraFill (Fillamentum);DeltiQ FP2 - CPE - HG100 (Fillamentum);DeltiQ FP2 - FLEX - Generic;DeltiQ FP2 - TPU 92A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 98A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 93A (SMARTFIL)
=======
default_materials = DeltiQ FP2 - PLA - Generic;DeltiQ FP2 - PLA - ExtraFill (Fillamentum);DeltiQ FP2 - PETG - Generic;DeltiQ FP2 - PETG (Devil Design);DeltiQ FP2 - ABS - Generic;DeltiQ FP2 - ABS - ExtraFill (Fillamentum);DeltiQ FP2 - ASA - ExtraFill (Fillamentum);DeltiQ FP2 - CPE - HG100 (Fillamentum);DeltiQ FP2 - FLEX - Generic;DeltiQ FP2 - TPU 92A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 98A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 93A (SMARTFIL);DeltiQ FP2 - PEBA 90A - FlexFill (Fillamentum) default_materials = DeltiQ FP2 - PLA - Generic;DeltiQ FP2 - PLA - ExtraFill (Fillamentum);DeltiQ FP2 - PETG - Generic;DeltiQ FP2 - PETG (Devil Design);DeltiQ FP2 - ABS - Generic;DeltiQ FP2 - ABS - ExtraFill (Fillamentum);DeltiQ FP2 - ASA - ExtraFill (Fillamentum);DeltiQ FP2 - CPE - HG100 (Fillamentum);DeltiQ FP2 - FLEX - Generic;DeltiQ FP2 - TPU 92A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 98A - FlexFill (Fillamentum);DeltiQ FP2 - TPU 93A (SMARTFIL);DeltiQ FP2 - PEBA 90A - FlexFill (Fillamentum)
>>>>>>> master
[printer_model:DQ2+FP] [printer_model:DQ2+FP]
name = DeltiQ 2 + FlexPrint name = DeltiQ 2 + FlexPrint
@ -480,11 +456,7 @@ max_print_speed = 60
max_volumetric_speed = 0 max_volumetric_speed = 0
min_skirt_length = 4 min_skirt_length = 4
notes = notes =
<<<<<<< HEAD
only_retract_when_crossing_perimeters = 1
=======
only_retract_when_crossing_perimeters = 0 only_retract_when_crossing_perimeters = 0
>>>>>>> master
ooze_prevention = 0 ooze_prevention = 0
output_filename_format = {input_filename_base}_{printer_model}_{filament_type[0]}_{layer_height}mm_{print_time}_{timestamp}.gcode output_filename_format = {input_filename_base}_{printer_model}_{filament_type[0]}_{layer_height}mm_{print_time}_{timestamp}.gcode
overhangs = 1 overhangs = 1
@ -1078,8 +1050,6 @@ min_print_speed = 10
slowdown_below_layer_time = 4 slowdown_below_layer_time = 4
temperature = 235 temperature = 235
<<<<<<< HEAD
=======
[filament:DeltiQ FP2 - PEBA 90A - FlexFill (Fillamentum)] [filament:DeltiQ FP2 - PEBA 90A - FlexFill (Fillamentum)]
inherits = DeltiQ FP2 - TPU 98A - FlexFill (Fillamentum) inherits = DeltiQ FP2 - TPU 98A - FlexFill (Fillamentum)
extrusion_multiplier = 1.1 extrusion_multiplier = 1.1
@ -1137,7 +1107,6 @@ min_fan_speed = 70
temperature = 175 temperature = 175
filament_vendor = Wax-Alike filament_vendor = Wax-Alike
>>>>>>> master
# AzteQ filaments # # AzteQ filaments #
[filament:*AzteQ common*] [filament:*AzteQ common*]
@ -1299,8 +1268,6 @@ inherits = AzteQ Industrial - ABS - ExtraFill (Fillamentum)
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6 compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6
filament_max_volumetric_speed = 15 filament_max_volumetric_speed = 15
<<<<<<< HEAD
=======
[filament:AzteQ Industrial - PC/ABS - (Fillamentum)] [filament:AzteQ Industrial - PC/ABS - (Fillamentum)]
inherits = AzteQ Industrial - ABS - Generic inherits = AzteQ Industrial - ABS - Generic
filament_vendor = Fillamentum filament_vendor = Fillamentum
@ -1342,7 +1309,6 @@ inherits = AzteQ Industrial - PC - PolyMax (Polymaker)
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6 compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6
filament_max_volumetric_speed = 15 filament_max_volumetric_speed = 15
>>>>>>> master
[filament:AzteQ Industrial - ASA - Generic] [filament:AzteQ Industrial - ASA - Generic]
inherits = *AzteQ common* inherits = *AzteQ common*
bed_temperature = 100 bed_temperature = 100
@ -1377,11 +1343,7 @@ max_fan_speed = 75
min_fan_speed = 50 min_fan_speed = 50
min_print_speed = 10 min_print_speed = 10
slowdown_below_layer_time = 5 slowdown_below_layer_time = 5
<<<<<<< HEAD
start_filament_gcode = "; FILAMENT_START_GCODE\nM191 S75 ; Set and wait - chamber temperature"
=======
start_filament_gcode = "; FILAMENT_START_GCODE\nM191 S50 ; Set and wait - chamber temperature" start_filament_gcode = "; FILAMENT_START_GCODE\nM191 S50 ; Set and wait - chamber temperature"
>>>>>>> master
temperature = 265 temperature = 265
[filament:AzteQ Industrial - ASA - Generic @0.6 nozzle] [filament:AzteQ Industrial - ASA - Generic @0.6 nozzle]
@ -1392,13 +1354,10 @@ filament_max_volumetric_speed = 15
[filament:AzteQ Industrial - ASA - ExtraFill (Fillamentum)] [filament:AzteQ Industrial - ASA - ExtraFill (Fillamentum)]
inherits = AzteQ Industrial - ASA - Generic inherits = AzteQ Industrial - ASA - Generic
filament_vendor = Fillamentum filament_vendor = Fillamentum
<<<<<<< HEAD
=======
first_layer_temperature = 255 first_layer_temperature = 255
temperature = 255 temperature = 255
max_fan_speed = 80 max_fan_speed = 80
min_fan_speed = 60 min_fan_speed = 60
>>>>>>> master
[filament:AzteQ Industrial - ASA - ExtraFill (Fillamentum) @0.6 nozzle] [filament:AzteQ Industrial - ASA - ExtraFill (Fillamentum) @0.6 nozzle]
inherits = AzteQ Industrial - ASA - ExtraFill (Fillamentum) inherits = AzteQ Industrial - ASA - ExtraFill (Fillamentum)
@ -1411,19 +1370,11 @@ filament_cost = 680
filament_density = 1.07 filament_density = 1.07
filament_spool_weight = 0 filament_spool_weight = 0
filament_vendor = Prusa filament_vendor = Prusa
<<<<<<< HEAD
first_layer_temperature = 255
max_fan_speed = 100
min_fan_speed = 95
start_filament_gcode = "; FILAMENT_START_GCODE\nM191 S50 ; Set and wait - chamber temperature"
temperature = 255
=======
first_layer_temperature = 260 first_layer_temperature = 260
max_fan_speed = 70 max_fan_speed = 70
min_fan_speed = 70 min_fan_speed = 70
start_filament_gcode = "; FILAMENT_START_GCODE\nM191 S50 ; Set and wait - chamber temperature" start_filament_gcode = "; FILAMENT_START_GCODE\nM191 S50 ; Set and wait - chamber temperature"
temperature = 260 temperature = 260
>>>>>>> master
[filament:AzteQ Industrial - ASA - Prusament (Prusa) @0.6 nozzle] [filament:AzteQ Industrial - ASA - Prusament (Prusa) @0.6 nozzle]
inherits = AzteQ Industrial - ASA - Prusament (Prusa) inherits = AzteQ Industrial - ASA - Prusament (Prusa)
@ -1476,8 +1427,6 @@ inherits = AzteQ Industrial - PA - Nylon PA12 (Fiberlogy)
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6 compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6
filament_max_volumetric_speed = 15 filament_max_volumetric_speed = 15
<<<<<<< HEAD
=======
[filament:AzteQ Industrial - PA - Nylon FX256 (Fillamentum)] [filament:AzteQ Industrial - PA - Nylon FX256 (Fillamentum)]
inherits = *AzteQ common* inherits = *AzteQ common*
bed_temperature = 100 bed_temperature = 100
@ -1524,7 +1473,6 @@ inherits = AzteQ Industrial - PA - Nylon FX256 (Fillamentum)
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6 compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6
filament_max_volumetric_speed = 15 filament_max_volumetric_speed = 15
>>>>>>> master
[filament:AzteQ Industrial - PC Blend - Prusament (Prusa)] [filament:AzteQ Industrial - PC Blend - Prusament (Prusa)]
inherits = *AzteQ common* inherits = *AzteQ common*
bed_temperature = 100 bed_temperature = 100
@ -1553,33 +1501,22 @@ filament_type = PC
filament_vendor = Prusa filament_vendor = Prusa
filament_wipe = 1 filament_wipe = 1
first_layer_bed_temperature = 100 first_layer_bed_temperature = 100
<<<<<<< HEAD
first_layer_temperature = 275
=======
first_layer_temperature = 270 first_layer_temperature = 270
>>>>>>> master
full_fan_speed_layer = 0 full_fan_speed_layer = 0
max_fan_speed = 50 max_fan_speed = 50
min_fan_speed = 30 min_fan_speed = 30
min_print_speed = 10 min_print_speed = 10
slowdown_below_layer_time = 5 slowdown_below_layer_time = 5
start_filament_gcode = "; FILAMENT_START_GCODE\nM191 S75 ; Set and wait - chamber temperature" start_filament_gcode = "; FILAMENT_START_GCODE\nM191 S75 ; Set and wait - chamber temperature"
<<<<<<< HEAD
temperature = 275
=======
temperature = 270 temperature = 270
filament_notes = "S180 ; Probing temperature" filament_notes = "S180 ; Probing temperature"
>>>>>>> master
[filament:AzteQ Industrial - PC Blend - Prusament (Prusa) @0.6 nozzle] [filament:AzteQ Industrial - PC Blend - Prusament (Prusa) @0.6 nozzle]
inherits = AzteQ Industrial - PC Blend - Prusament (Prusa) inherits = AzteQ Industrial - PC Blend - Prusament (Prusa)
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6 compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_TRILAB.*/ and printer_notes=~/.*PRINTER_MODEL_AQI.*/ and nozzle_diameter[0]==0.6
filament_max_volumetric_speed = 15 filament_max_volumetric_speed = 15
<<<<<<< HEAD
=======
>>>>>>> master
# DeltiQ Printer # # DeltiQ Printer #
@ -1795,11 +1732,7 @@ retract_lift_below = 0
retract_restart_extra = 0 retract_restart_extra = 0
retract_restart_extra_toolchange = 0 retract_restart_extra_toolchange = 0
retract_speed = 30 retract_speed = 30
<<<<<<< HEAD
start_gcode = ; START_GCODE\nT0\nM220 S100 ; Set feedmultiply back to 100 percent\nG90 ; Absolute positioning for motion\nM83 ; Relative extruder\nM107 ; Layer fan off\n\nM140 S[first_layer_bed_temperature] ; Set and continue - bed temperature\n[start_filament_gcode]\nM104 S150 ; Set and continue - hotend probing temperature\nM190 S[first_layer_bed_temperature] ; Set and wait - bed temperature\nM109 S150 ; Set and wait - hotend probing temperature\n\nG28 ; Home all axes\nG32 ; Probe Z and calculate Z plane\nG29 ; Mesh bed probe\n\nM104 S[first_layer_temperature] ; Set and continue - printing temperature\n\nG1009 ; Purge hotend\nG92 E0 ; Zero extruder
=======
start_gcode = ; START_GCODE\nT0\nM220 S100 ; Set feedmultiply back to 100 percent\nG90 ; Absolute positioning for motion\nM83 ; Relative extruder\nM107 ; Layer fan off\n\nM140 S[first_layer_bed_temperature] ; Set and continue - bed temperature\nM104 S150 ; Set and continue - hotend probing temperature\n[start_filament_gcode]\nM190 S[first_layer_bed_temperature] ; Set and wait - bed temperature\nM109 [filament_notes] ; Set and wait for material specific hotend probing temperature\n\nG28 ; Home all axes\nG32 ; Probe Z and calculate Z plane\nG29 ; Mesh bed probe\n\nM104 S[first_layer_temperature] ; Set and continue - printing temperature\n\nG1009 ; Purge hotend\nG92 E0 ; Zero extruder start_gcode = ; START_GCODE\nT0\nM220 S100 ; Set feedmultiply back to 100 percent\nG90 ; Absolute positioning for motion\nM83 ; Relative extruder\nM107 ; Layer fan off\n\nM140 S[first_layer_bed_temperature] ; Set and continue - bed temperature\nM104 S150 ; Set and continue - hotend probing temperature\n[start_filament_gcode]\nM190 S[first_layer_bed_temperature] ; Set and wait - bed temperature\nM109 [filament_notes] ; Set and wait for material specific hotend probing temperature\n\nG28 ; Home all axes\nG32 ; Probe Z and calculate Z plane\nG29 ; Mesh bed probe\n\nM104 S[first_layer_temperature] ; Set and continue - printing temperature\n\nG1009 ; Purge hotend\nG92 E0 ; Zero extruder
>>>>>>> master
wipe = 1 wipe = 1
[printer:AzteQ Industrial] [printer:AzteQ Industrial]

View File

@ -184,11 +184,7 @@ int CLI::run(int argc, char **argv)
ConfigSubstitutionContext config_substitutions(config_substitution_rule); ConfigSubstitutionContext config_substitutions(config_substitution_rule);
//FIXME should we check the version here? // | Model::LoadAttribute::CheckVersion ? //FIXME should we check the version here? // | Model::LoadAttribute::CheckVersion ?
model = Model::read_from_file(file, &config, &config_substitutions, Model::LoadAttribute::AddDefaultInstances); model = Model::read_from_file(file, &config, &config_substitutions, Model::LoadAttribute::AddDefaultInstances);
<<<<<<< HEAD
PrinterTechnology other_printer_technology = Slic3r::printer_technology(config);
=======
PrinterTechnology other_printer_technology = get_printer_technology(config); PrinterTechnology other_printer_technology = get_printer_technology(config);
>>>>>>> master
if (printer_technology == ptUnknown) { if (printer_technology == ptUnknown) {
printer_technology = other_printer_technology; printer_technology = other_printer_technology;
} }
@ -647,9 +643,6 @@ bool CLI::setup(int argc, char **argv)
// Detect the operating system flavor after SLIC3R_LOGLEVEL is set. // Detect the operating system flavor after SLIC3R_LOGLEVEL is set.
detect_platform(); detect_platform();
<<<<<<< HEAD
boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]);
=======
#ifdef WIN32 #ifdef WIN32
// Notify user that a blacklisted DLL was injected into PrusaSlicer process (for example Nahimic, see GH #5573). // Notify user that a blacklisted DLL was injected into PrusaSlicer process (for example Nahimic, see GH #5573).
// We hope that if a DLL is being injected into a PrusaSlicer process, it happens at the very start of the application, // We hope that if a DLL is being injected into a PrusaSlicer process, it happens at the very start of the application,
@ -670,7 +663,6 @@ bool CLI::setup(int argc, char **argv)
// See Invoking prusa-slicer from $PATH environment variable crashes #5542 // See Invoking prusa-slicer from $PATH environment variable crashes #5542
// boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]); // boost::filesystem::path path_to_binary = boost::filesystem::system_complete(argv[0]);
boost::filesystem::path path_to_binary = boost::dll::program_location(); boost::filesystem::path path_to_binary = boost::dll::program_location();
>>>>>>> master
// Path from the Slic3r binary to its resources. // Path from the Slic3r binary to its resources.
#ifdef __APPLE__ #ifdef __APPLE__

View File

@ -227,33 +227,6 @@ static std::string appconfig_md5_hash_line(const std::string_view data)
// Assume that the last line with the comment inside the config file contains a checksum and that the user didn't modify the config file. // Assume that the last line with the comment inside the config file contains a checksum and that the user didn't modify the config file.
static bool verify_config_file_checksum(boost::nowide::ifstream &ifs) static bool verify_config_file_checksum(boost::nowide::ifstream &ifs)
<<<<<<< HEAD
{
auto read_whole_config_file = [&ifs]() -> std::string {
std::stringstream ss;
ss << ifs.rdbuf();
return ss.str();
};
ifs.seekg(0, boost::nowide::ifstream::beg);
std::string whole_config = read_whole_config_file();
// The checksum should be on the last line in the config file.
if (size_t last_comment_pos = whole_config.find_last_of('#'); last_comment_pos != std::string::npos) {
// Split read config into two parts, one with checksum, and the second part is part with configuration from the checksum was computed.
// Verify existence and validity of the MD5 checksum line at the end of the file.
// When the checksum isn't found, the checksum was not saved correctly, it was removed or it is an older config file without the checksum.
// If the checksum is incorrect, then the file was either not saved correctly or modified.
if (std::string_view(whole_config.c_str() + last_comment_pos, whole_config.size() - last_comment_pos) == appconfig_md5_hash_line({ whole_config.data(), last_comment_pos }))
return true;
}
return false;
}
#endif
std::string AppConfig::load()
=======
>>>>>>> master
{ {
auto read_whole_config_file = [&ifs]() -> std::string { auto read_whole_config_file = [&ifs]() -> std::string {
std::stringstream ss; std::stringstream ss;
@ -288,19 +261,11 @@ std::string AppConfig::load(const std::string &path)
bool recovered = false; bool recovered = false;
try { try {
<<<<<<< HEAD
ifs.open(AppConfig::config_path());
#ifdef WIN32
// Verify the checksum of the config file without taking just for debugging purpose.
if (!verify_config_file_checksum(ifs))
BOOST_LOG_TRIVIAL(info) << "The configuration file " << AppConfig::config_path() <<
=======
ifs.open(path); ifs.open(path);
#ifdef WIN32 #ifdef WIN32
// Verify the checksum of the config file without taking just for debugging purpose. // Verify the checksum of the config file without taking just for debugging purpose.
if (!verify_config_file_checksum(ifs)) if (!verify_config_file_checksum(ifs))
BOOST_LOG_TRIVIAL(info) << "The configuration file " << path << BOOST_LOG_TRIVIAL(info) << "The configuration file " << path <<
>>>>>>> master
" has a wrong MD5 checksum or the checksum is missing. This may indicate a file corruption or a harmless user edit."; " has a wrong MD5 checksum or the checksum is missing. This may indicate a file corruption or a harmless user edit.";
ifs.seekg(0, boost::nowide::ifstream::beg); ifs.seekg(0, boost::nowide::ifstream::beg);
@ -310,33 +275,11 @@ std::string AppConfig::load(const std::string &path)
#ifdef WIN32 #ifdef WIN32
// The configuration file is corrupted, try replacing it with the backup configuration. // The configuration file is corrupted, try replacing it with the backup configuration.
ifs.close(); ifs.close();
<<<<<<< HEAD
std::string backup_path = (boost::format("%1%.bak") % AppConfig::config_path()).str();
=======
std::string backup_path = (boost::format("%1%.bak") % path).str(); std::string backup_path = (boost::format("%1%.bak") % path).str();
>>>>>>> master
if (boost::filesystem::exists(backup_path)) { if (boost::filesystem::exists(backup_path)) {
// Compute checksum of the configuration backup file and try to load configuration from it when the checksum is correct. // Compute checksum of the configuration backup file and try to load configuration from it when the checksum is correct.
boost::nowide::ifstream backup_ifs(backup_path); boost::nowide::ifstream backup_ifs(backup_path);
if (!verify_config_file_checksum(backup_ifs)) { if (!verify_config_file_checksum(backup_ifs)) {
<<<<<<< HEAD
BOOST_LOG_TRIVIAL(error) << format("Both \"%1%\" and \"%2%\" are corrupted. It isn't possible to restore configuration from the backup.", AppConfig::config_path(), backup_path);
backup_ifs.close();
boost::filesystem::remove(backup_path);
} else if (std::string error_message; copy_file(backup_path, AppConfig::config_path(), error_message, false) != SUCCESS) {
BOOST_LOG_TRIVIAL(error) << format("Configuration file \"%1%\" is corrupted. Failed to restore from backup \"%2%\": %3%", AppConfig::config_path(), backup_path, error_message);
backup_ifs.close();
boost::filesystem::remove(backup_path);
} else {
BOOST_LOG_TRIVIAL(info) << format("Configuration file \"%1%\" was corrupted. It has been succesfully restored from the backup \"%2%\".", AppConfig::config_path(), backup_path);
// Try parse configuration file after restore from backup.
try {
ifs.open(AppConfig::config_path());
pt::read_ini(ifs, tree);
recovered = true;
} catch (pt::ptree_error& ex) {
BOOST_LOG_TRIVIAL(info) << format("Failed to parse configuration file \"%1%\" after it has been restored from backup: %2%", AppConfig::config_path(), ex.what());
=======
BOOST_LOG_TRIVIAL(error) << format("Both \"%1%\" and \"%2%\" are corrupted. It isn't possible to restore configuration from the backup.", path, backup_path); BOOST_LOG_TRIVIAL(error) << format("Both \"%1%\" and \"%2%\" are corrupted. It isn't possible to restore configuration from the backup.", path, backup_path);
backup_ifs.close(); backup_ifs.close();
boost::filesystem::remove(backup_path); boost::filesystem::remove(backup_path);
@ -353,16 +296,11 @@ std::string AppConfig::load(const std::string &path)
recovered = true; recovered = true;
} catch (pt::ptree_error& ex) { } catch (pt::ptree_error& ex) {
BOOST_LOG_TRIVIAL(info) << format("Failed to parse configuration file \"%1%\" after it has been restored from backup: %2%", path, ex.what()); BOOST_LOG_TRIVIAL(info) << format("Failed to parse configuration file \"%1%\" after it has been restored from backup: %2%", path, ex.what());
>>>>>>> master
} }
} }
} else } else
#endif // WIN32 #endif // WIN32
<<<<<<< HEAD
BOOST_LOG_TRIVIAL(info) << format("Failed to parse configuration file \"%1%\": %2%", AppConfig::config_path(), ex.what());
=======
BOOST_LOG_TRIVIAL(info) << format("Failed to parse configuration file \"%1%\": %2%", path, ex.what()); BOOST_LOG_TRIVIAL(info) << format("Failed to parse configuration file \"%1%\": %2%", path, ex.what());
>>>>>>> master
if (! recovered) { if (! recovered) {
// Report the initial error of parsing PrusaSlicer.ini. // Report the initial error of parsing PrusaSlicer.ini.
// Error while parsing config file. We'll customize the error message and rethrow to be displayed. // Error while parsing config file. We'll customize the error message and rethrow to be displayed.

View File

@ -35,11 +35,8 @@ public:
// Load the slic3r.ini from a user profile directory (or a datadir, if configured). // Load the slic3r.ini from a user profile directory (or a datadir, if configured).
// return error string or empty strinf // return error string or empty strinf
std::string load(); std::string load();
<<<<<<< HEAD
=======
// Load from an explicit path. // Load from an explicit path.
std::string load(const std::string &path); std::string load(const std::string &path);
>>>>>>> master
// Store the slic3r.ini into a user profile directory (or a datadir, if configured). // Store the slic3r.ini into a user profile directory (or a datadir, if configured).
void save(); void save();

View File

@ -581,13 +581,7 @@ bool ConfigBase::set_deserialize_raw(const t_config_option_key &opt_key_src, con
(optdef->type == coEnum || optdef->type == coBool) && ConfigHelpers::looks_like_enum_value(value)) { (optdef->type == coEnum || optdef->type == coBool) && ConfigHelpers::looks_like_enum_value(value)) {
// Deserialize failed, try to substitute with a default value. // Deserialize failed, try to substitute with a default value.
assert(substitutions_ctxt.rule == ForwardCompatibilitySubstitutionRule::Enable || substitutions_ctxt.rule == ForwardCompatibilitySubstitutionRule::EnableSilent); assert(substitutions_ctxt.rule == ForwardCompatibilitySubstitutionRule::Enable || substitutions_ctxt.rule == ForwardCompatibilitySubstitutionRule::EnableSilent);
<<<<<<< HEAD
if (optdef->type == coEnum && opt_key == "gcode_flavor" && (value == "marlin2" || value == "marlinfirmware"))
static_cast<ConfigOptionEnum<GCodeFlavor>*>(opt)->value = gcfMarlin;
else if (optdef->type == coBool)
=======
if (optdef->type == coBool) if (optdef->type == coBool)
>>>>>>> master
static_cast<ConfigOptionBool*>(opt)->value = ConfigHelpers::enum_looks_like_true_value(value); static_cast<ConfigOptionBool*>(opt)->value = ConfigHelpers::enum_looks_like_true_value(value);
else else
// Just use the default of the option. // Just use the default of the option.
@ -673,21 +667,6 @@ ConfigSubstitutions ConfigBase::load(const std::string &file, ForwardCompatibili
} }
ConfigSubstitutions ConfigBase::load_from_ini(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule) ConfigSubstitutions ConfigBase::load_from_ini(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule)
<<<<<<< HEAD
{
try {
boost::property_tree::ptree tree;
boost::nowide::ifstream ifs(file);
boost::property_tree::read_ini(ifs, tree);
return this->load(tree, compatibility_rule);
} catch (const ConfigurationError &e) {
throw ConfigurationError(format("Failed loading configuration file \"%1%\": %2%", file, e.what()));
}
}
ConfigSubstitutions ConfigBase::load(const boost::property_tree::ptree &tree, ForwardCompatibilitySubstitutionRule compatibility_rule)
{
=======
{ {
try { try {
boost::property_tree::ptree tree; boost::property_tree::ptree tree;
@ -748,7 +727,6 @@ ConfigSubstitutions ConfigBase::load_from_ini_string_commented(std::string &&dat
ConfigSubstitutions ConfigBase::load(const boost::property_tree::ptree &tree, ForwardCompatibilitySubstitutionRule compatibility_rule) ConfigSubstitutions ConfigBase::load(const boost::property_tree::ptree &tree, ForwardCompatibilitySubstitutionRule compatibility_rule)
{ {
>>>>>>> master
ConfigSubstitutionContext substitutions_ctxt(compatibility_rule); ConfigSubstitutionContext substitutions_ctxt(compatibility_rule);
for (const boost::property_tree::ptree::value_type &v : tree) { for (const boost::property_tree::ptree::value_type &v : tree) {
try { try {
@ -759,50 +737,10 @@ ConfigSubstitutions ConfigBase::load(const boost::property_tree::ptree &tree, Fo
} }
} }
return std::move(substitutions_ctxt.substitutions); return std::move(substitutions_ctxt.substitutions);
<<<<<<< HEAD
}
// Load the config keys from the tail of a G-code file.
ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule)
{
try {
// Read a 64k block from the end of the G-code.
boost::nowide::ifstream ifs(file);
{
const char slic3r_gcode_header[] = "; generated by Slic3r ";
const char prusaslicer_gcode_header[] = "; generated by PrusaSlicer ";
std::string firstline;
std::getline(ifs, firstline);
if (strncmp(slic3r_gcode_header, firstline.c_str(), strlen(slic3r_gcode_header)) != 0 &&
strncmp(prusaslicer_gcode_header, firstline.c_str(), strlen(prusaslicer_gcode_header)) != 0)
throw ConfigurationError("Not a PrusaSlicer / Slic3r PE generated g-code.");
}
ifs.seekg(0, ifs.end);
auto file_length = ifs.tellg();
auto data_length = std::min<std::fstream::pos_type>(65535, file_length);
ifs.seekg(file_length - data_length, ifs.beg);
std::vector<char> data(size_t(data_length) + 1, 0);
ifs.read(data.data(), data_length);
ifs.close();
ConfigSubstitutionContext substitutions_ctxt(compatibility_rule);
size_t key_value_pairs = load_from_gcode_string(data.data(), substitutions_ctxt);
if (key_value_pairs < 80)
throw ConfigurationError(format("Suspiciously low number of configuration values extracted from %1%: %2%", file, key_value_pairs));
return std::move(substitutions_ctxt.substitutions);
} catch (const ConfigurationError &e) {
throw ConfigurationError(format("Failed loading configuration from G-code \"%1%\": %2%", file, e.what()));
}
}
// Load the config keys from the given string.
size_t ConfigBase::load_from_gcode_string(const char* str, ConfigSubstitutionContext& substitutions)
=======
} }
// Load the config keys from the given string. // Load the config keys from the given string.
size_t ConfigBase::load_from_gcode_string_legacy(ConfigBase& config, const char* str, ConfigSubstitutionContext& substitutions) size_t ConfigBase::load_from_gcode_string_legacy(ConfigBase& config, const char* str, ConfigSubstitutionContext& substitutions)
>>>>>>> master
{ {
if (str == nullptr) if (str == nullptr)
return 0; return 0;
@ -847,11 +785,7 @@ size_t ConfigBase::load_from_gcode_string_legacy(ConfigBase& config, const char*
if (key == nullptr) if (key == nullptr)
break; break;
try { try {
<<<<<<< HEAD
this->set_deserialize(std::string(key, key_end), std::string(value, end), substitutions);
=======
config.set_deserialize(std::string(key, key_end), std::string(value, end), substitutions); config.set_deserialize(std::string(key, key_end), std::string(value, end), substitutions);
>>>>>>> master
++num_key_value_pairs; ++num_key_value_pairs;
} }
catch (UnknownOptionException & /* e */) { catch (UnknownOptionException & /* e */) {

View File

@ -133,7 +133,6 @@ public:
ConfigurationError("No definition exception") {} ConfigurationError("No definition exception") {}
NoDefinitionException(const std::string &opt_key) : NoDefinitionException(const std::string &opt_key) :
ConfigurationError(std::string("No definition exception: ") + opt_key) {} ConfigurationError(std::string("No definition exception: ") + opt_key) {}
<<<<<<< HEAD
}; };
// Indicate that an unsupported accessor was called on a config option. // Indicate that an unsupported accessor was called on a config option.
@ -149,23 +148,6 @@ public:
class BadOptionValueException : public ConfigurationError class BadOptionValueException : public ConfigurationError
{ {
public: public:
=======
};
// Indicate that an unsupported accessor was called on a config option.
class BadOptionTypeException : public ConfigurationError
{
public:
BadOptionTypeException() : ConfigurationError("Bad option type exception") {}
BadOptionTypeException(const std::string &message) : ConfigurationError(message) {}
BadOptionTypeException(const char* message) : ConfigurationError(message) {}
};
// Indicate that an option has been deserialized from an invalid value.
class BadOptionValueException : public ConfigurationError
{
public:
>>>>>>> master
BadOptionValueException() : ConfigurationError("Bad option value exception") {} BadOptionValueException() : ConfigurationError("Bad option value exception") {}
BadOptionValueException(const std::string &message) : ConfigurationError(message) {} BadOptionValueException(const std::string &message) : ConfigurationError(message) {}
BadOptionValueException(const char* message) : ConfigurationError(message) {} BadOptionValueException(const char* message) : ConfigurationError(message) {}
@ -2026,17 +2008,11 @@ public:
void setenv_() const; void setenv_() const;
ConfigSubstitutions load(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule); ConfigSubstitutions load(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule);
ConfigSubstitutions load_from_ini(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule); ConfigSubstitutions load_from_ini(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule);
<<<<<<< HEAD
ConfigSubstitutions load_from_gcode_file(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule);
// Returns number of key/value pairs extracted.
size_t load_from_gcode_string(const char* str, ConfigSubstitutionContext& substitutions);
=======
ConfigSubstitutions load_from_ini_string(const std::string &data, ForwardCompatibilitySubstitutionRule compatibility_rule); ConfigSubstitutions load_from_ini_string(const std::string &data, ForwardCompatibilitySubstitutionRule compatibility_rule);
// Loading a "will be one day a legacy format" of configuration stored into 3MF or AMF. // Loading a "will be one day a legacy format" of configuration stored into 3MF or AMF.
// Accepts the same data as load_from_ini_string(), only with each configuration line possibly prefixed with a semicolon (G-code comment). // Accepts the same data as load_from_ini_string(), only with each configuration line possibly prefixed with a semicolon (G-code comment).
ConfigSubstitutions load_from_ini_string_commented(std::string &&data, ForwardCompatibilitySubstitutionRule compatibility_rule); ConfigSubstitutions load_from_ini_string_commented(std::string &&data, ForwardCompatibilitySubstitutionRule compatibility_rule);
ConfigSubstitutions load_from_gcode_file(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule); ConfigSubstitutions load_from_gcode_file(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule);
>>>>>>> master
ConfigSubstitutions load(const boost::property_tree::ptree &tree, ForwardCompatibilitySubstitutionRule compatibility_rule); ConfigSubstitutions load(const boost::property_tree::ptree &tree, ForwardCompatibilitySubstitutionRule compatibility_rule);
void save(const std::string &file) const; void save(const std::string &file) const;

View File

@ -274,13 +274,8 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
} }
if (internal_solid_fill == nullptr) { if (internal_solid_fill == nullptr) {
// Produce another solid fill. // Produce another solid fill.
<<<<<<< HEAD
params.extruder = layerm.region()->extruder(frSolidInfill);
params.pattern = layerm.region()->config().top_fill_pattern == ipMonotonic ? ipMonotonic : ipRectilinear;
=======
params.extruder = layerm.region().extruder(frSolidInfill); params.extruder = layerm.region().extruder(frSolidInfill);
params.pattern = layerm.region().config().top_fill_pattern == ipMonotonic ? ipMonotonic : ipRectilinear; params.pattern = layerm.region().config().top_fill_pattern == ipMonotonic ? ipMonotonic : ipRectilinear;
>>>>>>> master
params.density = 100.f; params.density = 100.f;
params.extrusion_role = erInternalInfill; params.extrusion_role = erInternalInfill;
params.angle = float(Geometry::deg2rad(layerm.region().config().fill_angle.value)); params.angle = float(Geometry::deg2rad(layerm.region().config().fill_angle.value));

View File

@ -453,10 +453,7 @@ namespace Slic3r {
~_3MF_Importer(); ~_3MF_Importer();
bool load_model_from_file(const std::string& filename, Model& model, DynamicPrintConfig& config, ConfigSubstitutionContext& config_substitutions, bool check_version); bool load_model_from_file(const std::string& filename, Model& model, DynamicPrintConfig& config, ConfigSubstitutionContext& config_substitutions, bool check_version);
<<<<<<< HEAD
=======
unsigned int version() const { return m_version; } unsigned int version() const { return m_version; }
>>>>>>> master
private: private:
void _destroy_xml_parser(); void _destroy_xml_parser();
@ -708,10 +705,6 @@ namespace Slic3r {
close_zip_reader(&archive); close_zip_reader(&archive);
<<<<<<< HEAD
for (const IdToModelObjectMap::value_type& object : m_objects) {
if (object.second >= m_model->objects.size()) {
=======
if (m_version == 0) { if (m_version == 0) {
// if the 3mf was not produced by PrusaSlicer and there is more than one instance, // if the 3mf was not produced by PrusaSlicer and there is more than one instance,
// split the object in as many objects as instances // split the object in as many objects as instances
@ -759,7 +752,6 @@ namespace Slic3r {
for (const IdToModelObjectMap::value_type& object : m_objects) { for (const IdToModelObjectMap::value_type& object : m_objects) {
if (object.second >= int(m_model->objects.size())) { if (object.second >= int(m_model->objects.size())) {
>>>>>>> master
add_error("Unable to find object"); add_error("Unable to find object");
return false; return false;
} }
@ -922,9 +914,6 @@ namespace Slic3r {
add_error("Error while reading config data to buffer"); add_error("Error while reading config data to buffer");
return; return;
} }
<<<<<<< HEAD
config.load_from_gcode_string(buffer.data(), config_substitutions);
=======
//FIXME Loading a "will be one day a legacy format" of configuration in a form of a G-code comment. //FIXME Loading a "will be one day a legacy format" of configuration in a form of a G-code comment.
// Each config line is prefixed with a semicolon (G-code comment), that is ugly. // Each config line is prefixed with a semicolon (G-code comment), that is ugly.
@ -933,7 +922,6 @@ namespace Slic3r {
// See https://github.com/prusa3d/PrusaSlicer/issues/7155. We'll revert it for now. // See https://github.com/prusa3d/PrusaSlicer/issues/7155. We'll revert it for now.
//config_substitutions.substitutions = config.load_from_ini_string_commented(std::move(buffer), config_substitutions.rule); //config_substitutions.substitutions = config.load_from_ini_string_commented(std::move(buffer), config_substitutions.rule);
ConfigBase::load_from_gcode_string_legacy(config, buffer.data(), config_substitutions); ConfigBase::load_from_gcode_string_legacy(config, buffer.data(), config_substitutions);
>>>>>>> master
} }
} }
@ -1459,11 +1447,7 @@ namespace Slic3r {
{ {
// deletes all non-built or non-instanced objects // deletes all non-built or non-instanced objects
for (const IdToModelObjectMap::value_type& object : m_objects) { for (const IdToModelObjectMap::value_type& object : m_objects) {
<<<<<<< HEAD
if (object.second >= m_model->objects.size()) {
=======
if (object.second >= int(m_model->objects.size())) { if (object.second >= int(m_model->objects.size())) {
>>>>>>> master
add_error("Unable to find object"); add_error("Unable to find object");
return false; return false;
} }
@ -1986,18 +1970,6 @@ namespace Slic3r {
} }
{ {
<<<<<<< HEAD
unsigned int ii = i * 3;
stl_facet& facet = stl.facet_start[i];
for (unsigned int v = 0; v < 3; ++v)
{
unsigned int tri_id = geometry.triangles[src_start_id + ii + v] * 3;
if (tri_id + 2 >= geometry.vertices.size()) {
add_error("Malformed triangle mesh");
return false;
}
facet.vertex[v] = Vec3f(geometry.vertices[tri_id + 0], geometry.vertices[tri_id + 1], geometry.vertices[tri_id + 2]);
=======
int min_id = its.indices.front()[0]; int min_id = its.indices.front()[0];
int max_id = min_id; int max_id = min_id;
for (const Vec3i& face : its.indices) { for (const Vec3i& face : its.indices) {
@ -2035,7 +2007,6 @@ namespace Slic3r {
triangle_mesh.transform(object.instances.front()->get_transformation().get_matrix(), false); triangle_mesh.transform(object.instances.front()->get_transformation().get_matrix(), false);
object.instances.front()->set_transformation(Slic3r::Geometry::Transformation()); object.instances.front()->set_transformation(Slic3r::Geometry::Transformation());
//FIXME do the mesh fixing? //FIXME do the mesh fixing?
>>>>>>> master
} }
} }
if (triangle_mesh.volume() < 0) if (triangle_mesh.volume() < 0)
@ -2092,8 +2063,6 @@ namespace Slic3r {
volume->source.is_converted_from_meters = metadata.value == "1"; volume->source.is_converted_from_meters = metadata.value == "1";
else else
volume->config.set_deserialize(metadata.key, metadata.value, config_substitutions); volume->config.set_deserialize(metadata.key, metadata.value, config_substitutions);
<<<<<<< HEAD
=======
} }
// this may happen for 3mf saved by 3rd part softwares // this may happen for 3mf saved by 3rd part softwares
@ -2102,7 +2071,6 @@ namespace Slic3r {
if (renamed_volumes_count > 0) if (renamed_volumes_count > 0)
volume->name += "_" + std::to_string(renamed_volumes_count + 1); volume->name += "_" + std::to_string(renamed_volumes_count + 1);
++renamed_volumes_count; ++renamed_volumes_count;
>>>>>>> master
} }
} }
@ -3129,17 +3097,6 @@ bool _3MF_Exporter::_add_custom_gcode_per_print_z_file_to_archive( mz_zip_archiv
return true; return true;
} }
<<<<<<< HEAD
bool load_3mf(const char* path, DynamicPrintConfig& config, ConfigSubstitutionContext& config_substitutions, Model* model, bool check_version)
{
if (path == nullptr || model == nullptr)
return false;
_3MF_Importer importer;
bool res = importer.load_model_from_file(path, *model, config, config_substitutions, check_version);
importer.log_errors();
return res;
=======
// Perform conversions based on the config values available. // Perform conversions based on the config values available.
//FIXME provide a version of PrusaSlicer that stored the project file (3MF). //FIXME provide a version of PrusaSlicer that stored the project file (3MF).
static void handle_legacy_project_loaded(unsigned int version_project_file, DynamicPrintConfig& config) static void handle_legacy_project_loaded(unsigned int version_project_file, DynamicPrintConfig& config)
@ -3150,7 +3107,6 @@ static void handle_legacy_project_loaded(unsigned int version_project_file, Dyna
auto *opt_brim_separation = config.option<ConfigOptionFloat>("brim_separation", true); auto *opt_brim_separation = config.option<ConfigOptionFloat>("brim_separation", true);
opt_brim_separation->value = opt_elephant_foot->value; opt_brim_separation->value = opt_elephant_foot->value;
} }
>>>>>>> master
} }
} }

View File

@ -607,13 +607,7 @@ void AMFParserContext::endElement(const char * /* name */)
// Faces of the current volume: // Faces of the current volume:
case NODE_TYPE_TRIANGLE: case NODE_TYPE_TRIANGLE:
assert(m_object && m_volume); assert(m_object && m_volume);
<<<<<<< HEAD
m_volume_facets.emplace_back(atoi(m_value[0].c_str()));
m_volume_facets.emplace_back(atoi(m_value[1].c_str()));
m_volume_facets.emplace_back(atoi(m_value[2].c_str()));
=======
m_volume_facets.emplace_back(atoi(m_value[0].c_str()), atoi(m_value[1].c_str()), atoi(m_value[2].c_str())); m_volume_facets.emplace_back(atoi(m_value[0].c_str()), atoi(m_value[1].c_str()), atoi(m_value[2].c_str()));
>>>>>>> master
m_value[0].clear(); m_value[0].clear();
m_value[1].clear(); m_value[1].clear();
m_value[2].clear(); m_value[2].clear();
@ -623,26 +617,6 @@ void AMFParserContext::endElement(const char * /* name */)
case NODE_TYPE_VOLUME: case NODE_TYPE_VOLUME:
{ {
assert(m_object && m_volume); assert(m_object && m_volume);
<<<<<<< HEAD
TriangleMesh mesh;
stl_file &stl = mesh.stl;
stl.stats.type = inmemory;
stl.stats.number_of_facets = int(m_volume_facets.size() / 3);
stl.stats.original_num_facets = stl.stats.number_of_facets;
stl_allocate(&stl);
bool has_transform = ! m_volume_transform.isApprox(Transform3d::Identity(), 1e-10);
for (size_t i = 0; i < m_volume_facets.size();) {
stl_facet &facet = stl.facet_start[i/3];
for (unsigned int v = 0; v < 3; ++v)
{
unsigned int tri_id = m_volume_facets[i++] * 3;
if (tri_id < 0 || tri_id + 2 >= m_object_vertices.size()) {
this->stop("Malformed triangle mesh");
return;
}
facet.vertex[v] = Vec3f(m_object_vertices[tri_id + 0], m_object_vertices[tri_id + 1], m_object_vertices[tri_id + 2]);
=======
if (m_volume_facets.empty()) { if (m_volume_facets.empty()) {
this->stop("An empty triangle mesh found"); this->stop("An empty triangle mesh found");
return; return;
@ -661,7 +635,6 @@ void AMFParserContext::endElement(const char * /* name */)
min_id = std::min(min_id, tri_id); min_id = std::min(min_id, tri_id);
max_id = std::max(max_id, tri_id); max_id = std::max(max_id, tri_id);
} }
>>>>>>> master
} }
// rebase indices to the current vertices list // rebase indices to the current vertices list
@ -736,9 +709,6 @@ void AMFParserContext::endElement(const char * /* name */)
case NODE_TYPE_METADATA: case NODE_TYPE_METADATA:
if ((m_config != nullptr) && strncmp(m_value[0].c_str(), SLIC3R_CONFIG_TYPE, strlen(SLIC3R_CONFIG_TYPE)) == 0) { if ((m_config != nullptr) && strncmp(m_value[0].c_str(), SLIC3R_CONFIG_TYPE, strlen(SLIC3R_CONFIG_TYPE)) == 0) {
<<<<<<< HEAD
m_config->load_from_gcode_string(m_value[1].c_str(), *m_config_substitutions);
=======
//FIXME Loading a "will be one day a legacy format" of configuration in a form of a G-code comment. //FIXME Loading a "will be one day a legacy format" of configuration in a form of a G-code comment.
// Each config line is prefixed with a semicolon (G-code comment), that is ugly. // Each config line is prefixed with a semicolon (G-code comment), that is ugly.
@ -747,7 +717,6 @@ void AMFParserContext::endElement(const char * /* name */)
// See https://github.com/prusa3d/PrusaSlicer/issues/7155. We'll revert it for now. // See https://github.com/prusa3d/PrusaSlicer/issues/7155. We'll revert it for now.
//m_config_substitutions->substitutions = m_config->load_from_ini_string_commented(std::move(m_value[1].c_str()), m_config_substitutions->rule); //m_config_substitutions->substitutions = m_config->load_from_ini_string_commented(std::move(m_value[1].c_str()), m_config_substitutions->rule);
ConfigBase::load_from_gcode_string_legacy(*m_config, std::move(m_value[1].c_str()), *m_config_substitutions); ConfigBase::load_from_gcode_string_legacy(*m_config, std::move(m_value[1].c_str()), *m_config_substitutions);
>>>>>>> master
} }
else if (strncmp(m_value[0].c_str(), "slic3r.", 7) == 0) { else if (strncmp(m_value[0].c_str(), "slic3r.", 7) == 0) {
const char *opt_key = m_value[0].c_str() + 7; const char *opt_key = m_value[0].c_str() + 7;
@ -926,13 +895,7 @@ bool load_amf_file(const char *path, DynamicPrintConfig *config, ConfigSubstitut
} }
int done = feof(pFile); int done = feof(pFile);
if (XML_Parse(parser, buff, len, done) == XML_STATUS_ERROR || ctx.error()) { if (XML_Parse(parser, buff, len, done) == XML_STATUS_ERROR || ctx.error()) {
<<<<<<< HEAD
printf("AMF parser: Parse error at line %d:\n%s\n",
(int)XML_GetCurrentLineNumber(parser),
ctx.error_message());
=======
BOOST_LOG_TRIVIAL(error) << "AMF parser: Parse error at line " << int(XML_GetCurrentLineNumber(parser)) << ": " << ctx.error_message(); BOOST_LOG_TRIVIAL(error) << "AMF parser: Parse error at line " << int(XML_GetCurrentLineNumber(parser)) << ": " << ctx.error_message();
>>>>>>> master
break; break;
} }
if (done) { if (done) {

View File

@ -1,335 +0,0 @@
#include <string.h>
#include <exception>
#include <boost/algorithm/string.hpp>
#include <boost/nowide/convert.hpp>
#include <boost/nowide/cstdio.hpp>
#include "miniz_extension.hpp"
#include <Eigen/Geometry>
#include "../libslic3r.h"
#include "../Model.hpp"
#include "PRUS.hpp"
#if 0
// Enable debugging and assert in this file.
#define DEBUG
#define _DEBUG
#undef NDEBUG
#endif
#include <assert.h>
namespace Slic3r
{
struct StlHeader
{
char comment[80];
uint32_t nTriangles;
};
static_assert(sizeof(StlHeader) == 84, "StlHeader size not correct");
// Buffered line reader to a string buffer.
class LineReader
{
public:
LineReader(std::vector<char> &data) : m_buffer(data), m_pos(0), m_len((int)data.size()) {}
const char* next_line() {
// Skip empty lines.
while (m_pos < m_len && (m_buffer[m_pos] == '\r' || m_buffer[m_pos] == '\n'))
++ m_pos;
if (m_pos == m_len) {
// End of file.
return nullptr;
}
// The buffer is nonempty and it does not start with end of lines. Find the first end of line.
int end = m_pos + 1;
while (end < m_len && m_buffer[end] != '\r' && m_buffer[end] != '\n')
++ end;
char *ptr_out = m_buffer.data() + m_pos;
m_pos = end + 1;
m_buffer[end] = 0;
return ptr_out;
}
int next_line_scanf(const char *format, ...)
{
const char *line = next_line();
if (line == nullptr)
return -1;
int result;
va_list arglist;
va_start(arglist, format);
result = vsscanf(line, format, arglist);
va_end(arglist);
return result;
}
private:
std::vector<char> &m_buffer;
int m_pos;
int m_len;
};
static void extract_model_from_archive(
// name of the model file
const char *name,
// path to the archive
const char *path,
// content of scene.xml
const std::vector<char> &scene_xml_data,
// loaded data of this STL
std::vector<char> &data,
// Model, to which the newly loaded objects will be added
Model *model,
// To map multiple STLs into a single model object for multi-material prints.
std::map<int, ModelObject*> &group_to_model_object)
{
// Find the model entry in the XML data.
char model_name_tag[1024];
sprintf(model_name_tag, "<model name=\"%s\">", name);
const char *model_xml = strstr(scene_xml_data.data(), model_name_tag);
const char *zero_tag = "<zero>";
const char *zero_xml = strstr(scene_xml_data.data(), zero_tag);
Vec3d instance_rotation = Vec3d::Zero();
Vec3d instance_scaling_factor = Vec3d::Ones();
Vec3d instance_offset = Vec3d::Zero();
bool trafo_set = false;
unsigned int group_id = (unsigned int)-1;
unsigned int extruder_id = (unsigned int)-1;
ModelObject *model_object = nullptr;
if (model_xml != nullptr) {
model_xml += strlen(model_name_tag);
const char *position_tag = "<position>";
const char *position_xml = strstr(model_xml, position_tag);
const char *rotation_tag = "<rotation>";
const char *rotation_xml = strstr(model_xml, rotation_tag);
const char *scale_tag = "<scale>";
const char *scale_xml = strstr(model_xml, scale_tag);
float position[3], rotation[3], scale[3], zero[3];
if (position_xml != nullptr && rotation_xml != nullptr && scale_xml != nullptr && zero_xml != nullptr &&
sscanf(position_xml+strlen(position_tag),
"[%f, %f, %f]", position, position+1, position+2) == 3 &&
sscanf(rotation_xml+strlen(rotation_tag),
"[%f, %f, %f]", rotation, rotation+1, rotation+2) == 3 &&
sscanf(scale_xml+strlen(scale_tag),
"[%f, %f, %f]", scale, scale+1, scale+2) == 3 &&
sscanf(zero_xml+strlen(zero_tag),
"[%f, %f, %f]", zero, zero+1, zero+2) == 3) {
instance_scaling_factor = Vec3d((double)scale[0], (double)scale[1], (double)scale[2]);
instance_rotation = Vec3d(-(double)rotation[0], -(double)rotation[1], -(double)rotation[2]);
instance_offset = Vec3d((double)(position[0] - zero[0]), (double)(position[1] - zero[1]), (double)(position[2] - zero[2]));
trafo_set = true;
}
const char *group_tag = "<group>";
const char *group_xml = strstr(model_xml, group_tag);
const char *extruder_tag = "<extruder>";
const char *extruder_xml = strstr(model_xml, extruder_tag);
if (group_xml != nullptr) {
int group = atoi(group_xml + strlen(group_tag));
if (group > 0) {
group_id = group;
auto it = group_to_model_object.find(group_id);
if (it != group_to_model_object.end())
model_object = it->second;
}
}
if (extruder_xml != nullptr) {
int e = atoi(extruder_xml + strlen(extruder_tag));
if (e > 0)
extruder_id = e;
}
}
if (! trafo_set)
throw Slic3r::FileIOError(std::string("Archive ") + path + " does not contain a valid entry in scene.xml for " + name);
// Extract the STL.
StlHeader header;
TriangleMesh mesh;
bool mesh_valid = false;
bool stl_ascii = false;
if (data.size() > sizeof(StlHeader)) {
memcpy((char*)&header, data.data(), sizeof(StlHeader));
if (strncmp(header.comment, "solid ", 6) == 0)
stl_ascii = true;
else {
// Header has been extracted. Now read the faces.
stl_file &stl = mesh.stl;
stl.stats.type = inmemory;
stl.stats.number_of_facets = header.nTriangles;
stl.stats.original_num_facets = header.nTriangles;
stl_allocate(&stl);
if (header.nTriangles > 0 && data.size() == 50 * header.nTriangles + sizeof(StlHeader)) {
memcpy((char*)stl.facet_start.data(), data.data() + sizeof(StlHeader), 50 * header.nTriangles);
if (sizeof(stl_facet) > SIZEOF_STL_FACET) {
// The stl.facet_start is not packed tightly. Unpack the array of stl_facets.
unsigned char *data = (unsigned char*)stl.facet_start.data();
for (size_t i = header.nTriangles - 1; i > 0; -- i)
memmove(data + i * sizeof(stl_facet), data + i * SIZEOF_STL_FACET, SIZEOF_STL_FACET);
}
// All the faces have been read.
stl_get_size(&stl);
mesh.repair();
if (std::abs(stl.stats.min(2)) < EPSILON)
stl.stats.min(2) = 0.;
// Add a mesh to a model.
if (mesh.facets_count() > 0)
mesh_valid = true;
}
}
} else
stl_ascii = true;
if (stl_ascii) {
// Try to parse ASCII STL.
char normal_buf[3][32];
stl_facet facet;
std::vector<stl_facet> facets;
LineReader line_reader(data);
std::string solid_name;
facet.extra[0] = facet.extra[1] = 0;
for (;;) {
const char *line = line_reader.next_line();
if (line == nullptr)
// End of file.
break;
if (strncmp(line, "solid", 5) == 0) {
// Opening the "solid" block.
if (! solid_name.empty()) {
// Error, solid block is already open.
facets.clear();
break;
}
solid_name = line + 5;
if (solid_name.empty())
solid_name = "unknown";
continue;
}
if (strncmp(line, "endsolid", 8) == 0) {
// Closing the "solid" block.
if (solid_name.empty()) {
// Error, no solid block is open.
facets.clear();
break;
}
solid_name.clear();
continue;
}
// Line has to start with the word solid.
int res_normal = sscanf(line, " facet normal %31s %31s %31s", normal_buf[0], normal_buf[1], normal_buf[2]);
assert(res_normal == 3);
int res_outer_loop = line_reader.next_line_scanf(" outer loop");
assert(res_outer_loop == 0);
int res_vertex1 = line_reader.next_line_scanf(" vertex %f %f %f", &facet.vertex[0](0), &facet.vertex[0](1), &facet.vertex[0](2));
assert(res_vertex1 == 3);
int res_vertex2 = line_reader.next_line_scanf(" vertex %f %f %f", &facet.vertex[1](0), &facet.vertex[1](1), &facet.vertex[1](2));
assert(res_vertex2 == 3);
int res_vertex3 = line_reader.next_line_scanf(" vertex %f %f %f", &facet.vertex[2](0), &facet.vertex[2](1), &facet.vertex[2](2));
assert(res_vertex3 == 3);
int res_endloop = line_reader.next_line_scanf(" endloop");
assert(res_endloop == 0);
int res_endfacet = line_reader.next_line_scanf(" endfacet");
if (res_normal != 3 || res_outer_loop != 0 || res_vertex1 != 3 || res_vertex2 != 3 || res_vertex3 != 3 || res_endloop != 0 || res_endfacet != 0) {
// perror("Something is syntactically very wrong with this ASCII STL!");
facets.clear();
break;
}
// The facet normal has been parsed as a single string as to workaround for not a numbers in the normal definition.
if (sscanf(normal_buf[0], "%f", &facet.normal(0)) != 1 ||
sscanf(normal_buf[1], "%f", &facet.normal(1)) != 1 ||
sscanf(normal_buf[2], "%f", &facet.normal(2)) != 1) {
// Normal was mangled. Maybe denormals or "not a number" were stored?
// Just reset the normal and silently ignore it.
facet.normal = stl_normal::Zero();
}
facets.emplace_back(facet);
}
if (! facets.empty() && solid_name.empty()) {
stl_file &stl = mesh.stl;
stl.stats.type = inmemory;
stl.stats.number_of_facets = (uint32_t)facets.size();
stl.stats.original_num_facets = (int)facets.size();
stl_allocate(&stl);
memcpy((void*)stl.facet_start.data(), facets.data(), facets.size() * 50);
stl_get_size(&stl);
mesh.repair();
// Add a mesh to a model.
if (mesh.facets_count() > 0)
mesh_valid = true;
}
}
if (! mesh_valid)
throw Slic3r::FileIOError(std::string("Archive ") + path + " does not contain a valid mesh for " + name);
// Add this mesh to the model.
ModelVolume *volume = nullptr;
if (model_object == nullptr) {
// This is a first mesh of a group. Create a new object & volume.
model_object = model->add_object(name, path, std::move(mesh));
volume = model_object->volumes.front();
ModelInstance *instance = model_object->add_instance();
instance->set_rotation(instance_rotation);
instance->set_scaling_factor(instance_scaling_factor);
instance->set_offset(instance_offset);
if (group_id != (unsigned int)(-1))
group_to_model_object[group_id] = model_object;
} else {
// This is not the 1st mesh of a group. Add it to the ModelObject.
volume = model_object->add_volume(std::move(mesh));
volume->name = name;
}
// Set the extruder to the volume.
if (extruder_id != (unsigned int)-1)
volume->config.set("extruder", int(extruder_id));
}
// Load a PrusaControl project file into a provided model.
bool load_prus(const char *path, Model *model)
{
mz_zip_archive archive;
mz_zip_zero_struct(&archive);
size_t n_models_initial = model->objects.size();
mz_bool res = MZ_FALSE;
try {
if (!open_zip_reader(&archive, path))
throw Slic3r::FileIOError(std::string("Unable to init zip reader for ") + path);
std::vector<char> scene_xml_data;
// For grouping multiple STLs into a single ModelObject for multi-material prints.
std::map<int, ModelObject*> group_to_model_object;
mz_uint num_entries = mz_zip_reader_get_num_files(&archive);
for (mz_uint i = 0; i < num_entries; ++ i) {
mz_zip_archive_file_stat stat;
if (! mz_zip_reader_file_stat(&archive, i, &stat))
continue;
std::vector<char> buffer;
buffer.assign((size_t)stat.m_uncomp_size, 0);
res = mz_zip_reader_extract_file_to_mem(&archive, stat.m_filename, (char*)buffer.data(), (size_t)stat.m_uncomp_size, 0);
if (res == MZ_FALSE)
throw Slic3r::FileIOError(std::string("Error while extracting a file from ") + path);
if (strcmp(stat.m_filename, "scene.xml") == 0) {
if (! scene_xml_data.empty())
throw Slic3r::FileIOError(std::string("Multiple scene.xml were found in the archive.") + path);
scene_xml_data = std::move(buffer);
} else if (boost::iends_with(stat.m_filename, ".stl")) {
// May throw std::exception
extract_model_from_archive(stat.m_filename, path, scene_xml_data, buffer, model, group_to_model_object);
}
}
} catch (std::exception &ex) {
close_zip_reader(&archive);
throw ex;
}
close_zip_reader(&archive);
return model->objects.size() > n_models_initial;
}
}; // namespace Slic3r

View File

@ -204,11 +204,7 @@ RasterParams get_raster_params(const DynamicPrintConfig &cfg)
if (!opt_disp_cols || !opt_disp_rows || !opt_disp_w || !opt_disp_h || if (!opt_disp_cols || !opt_disp_rows || !opt_disp_w || !opt_disp_h ||
!opt_mirror_x || !opt_mirror_y || !opt_orient) !opt_mirror_x || !opt_mirror_y || !opt_orient)
<<<<<<< HEAD
throw Slic3r::FileIOError("Invalid SL1 / SL1S file");
=======
throw MissingProfileError("Invalid SL1 / SL1S file"); throw MissingProfileError("Invalid SL1 / SL1S file");
>>>>>>> master
RasterParams rstp; RasterParams rstp;
@ -234,11 +230,7 @@ SliceParams get_slice_params(const DynamicPrintConfig &cfg)
auto *opt_init_layerh = cfg.option<ConfigOptionFloat>("initial_layer_height"); auto *opt_init_layerh = cfg.option<ConfigOptionFloat>("initial_layer_height");
if (!opt_layerh || !opt_init_layerh) if (!opt_layerh || !opt_init_layerh)
<<<<<<< HEAD
throw Slic3r::FileIOError("Invalid SL1 / SL1S file");
=======
throw MissingProfileError("Invalid SL1 / SL1S file"); throw MissingProfileError("Invalid SL1 / SL1S file");
>>>>>>> master
return SliceParams{opt_layerh->getFloat(), opt_init_layerh->getFloat()}; return SliceParams{opt_layerh->getFloat(), opt_init_layerh->getFloat()};
} }
@ -302,12 +294,9 @@ ConfigSubstitutions import_sla_archive(const std::string &zipfname, DynamicPrint
return out.load(arch.profile, ForwardCompatibilitySubstitutionRule::Enable); return out.load(arch.profile, ForwardCompatibilitySubstitutionRule::Enable);
} }
<<<<<<< HEAD
=======
// If the profile is missing from the archive (older PS versions did not have // If the profile is missing from the archive (older PS versions did not have
// it), profile_out's initial value will be used as fallback. profile_out will be empty on // it), profile_out's initial value will be used as fallback. profile_out will be empty on
// function return if the archive did not contain any profile. // function return if the archive did not contain any profile.
>>>>>>> master
ConfigSubstitutions import_sla_archive( ConfigSubstitutions import_sla_archive(
const std::string & zipfname, const std::string & zipfname,
Vec2i windowsize, Vec2i windowsize,
@ -319,10 +308,6 @@ ConfigSubstitutions import_sla_archive(
windowsize.x() = std::max(2, windowsize.x()); windowsize.x() = std::max(2, windowsize.x());
windowsize.y() = std::max(2, windowsize.y()); windowsize.y() = std::max(2, windowsize.y());
<<<<<<< HEAD
ArchiveData arch = extract_sla_archive(zipfname, "thumbnail");
ConfigSubstitutions config_substitutions = profile.load(arch.profile, ForwardCompatibilitySubstitutionRule::Enable);
=======
std::string exclude_entries{"thumbnail"}; std::string exclude_entries{"thumbnail"};
ArchiveData arch = extract_sla_archive(zipfname, exclude_entries); ArchiveData arch = extract_sla_archive(zipfname, exclude_entries);
DynamicPrintConfig profile_in, profile_use; DynamicPrintConfig profile_in, profile_use;
@ -346,7 +331,6 @@ ConfigSubstitutions import_sla_archive(
} }
} }
} }
>>>>>>> master
// If the archive contains an empty profile, use the one that was passed as output argument // If the archive contains an empty profile, use the one that was passed as output argument
// then replace it with the readed profile to report that it was empty. // then replace it with the readed profile to report that it was empty.
@ -362,11 +346,7 @@ ConfigSubstitutions import_sla_archive(
extract_slices_from_sla_archive(arch, rstp, progr); extract_slices_from_sla_archive(arch, rstp, progr);
if (!slices.empty()) if (!slices.empty())
<<<<<<< HEAD
out = slices_to_triangle_mesh(slices, 0, slicp.layerh, slicp.initial_layerh);
=======
out = slices_to_mesh(slices, 0, slicp.layerh, slicp.initial_layerh); out = slices_to_mesh(slices, 0, slicp.layerh, slicp.initial_layerh);
>>>>>>> master
return config_substitutions; return config_substitutions;
} }

View File

@ -2185,11 +2185,7 @@ GCode::LayerResult GCode::process_layer(
if (single_object_instance_idx == size_t(-1)) { if (single_object_instance_idx == size_t(-1)) {
// Normal (non-sequential) print. // Normal (non-sequential) print.
<<<<<<< HEAD
gcode += ProcessLayer::emit_custom_gcode_per_print_z(*this, layer_tools.custom_gcode, first_extruder_id, print.config());
=======
gcode += ProcessLayer::emit_custom_gcode_per_print_z(*this, layer_tools.custom_gcode, m_writer.extruder()->id(), first_extruder_id, print.config()); gcode += ProcessLayer::emit_custom_gcode_per_print_z(*this, layer_tools.custom_gcode, m_writer.extruder()->id(), first_extruder_id, print.config());
>>>>>>> master
} }
// Extrude skirt at the print_z of the raft layers and normal object layers // Extrude skirt at the print_z of the raft layers and normal object layers
// not at the print_z of the interlaced support material layers. // not at the print_z of the interlaced support material layers.

View File

@ -287,11 +287,7 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly
double custom_angle = Geometry::deg2rad(this->region().config().bridge_angle.value); double custom_angle = Geometry::deg2rad(this->region().config().bridge_angle.value);
if (bd.detect_angle(custom_angle)) { if (bd.detect_angle(custom_angle)) {
bridges[idx_last].bridge_angle = bd.angle; bridges[idx_last].bridge_angle = bd.angle;
<<<<<<< HEAD
if (this->layer()->object()->config().support_material) {
=======
if (this->layer()->object()->has_support()) { if (this->layer()->object()->has_support()) {
>>>>>>> master
// polygons_append(this->bridged, bd.coverage()); // polygons_append(this->bridged, bd.coverage());
append(this->unsupported_bridge_edges, bd.unsupported_edges()); append(this->unsupported_bridge_edges, bd.unsupported_edges());
} }

View File

@ -119,11 +119,6 @@ Model Model::read_from_file(const std::string& input_file, DynamicPrintConfig* c
else if (boost::algorithm::iends_with(input_file, ".3mf")) else if (boost::algorithm::iends_with(input_file, ".3mf"))
//FIXME options & LoadAttribute::CheckVersion ? //FIXME options & LoadAttribute::CheckVersion ?
result = load_3mf(input_file.c_str(), *config, *config_substitutions, &model, false); result = load_3mf(input_file.c_str(), *config, *config_substitutions, &model, false);
<<<<<<< HEAD
else if (boost::algorithm::iends_with(input_file, ".prusa"))
result = load_prus(input_file.c_str(), &model);
=======
>>>>>>> master
else else
throw Slic3r::RuntimeError("Unknown file format. Input file must have .stl, .obj, .amf(.xml) or .prusa extension."); throw Slic3r::RuntimeError("Unknown file format. Input file must have .stl, .obj, .amf(.xml) or .prusa extension.");
@ -441,11 +436,7 @@ void Model::convert_multipart_object(unsigned int max_extruders)
int counter = 1; int counter = 1;
auto copy_volume = [o, max_extruders, &counter, &extruder_counter](ModelVolume *new_v) { auto copy_volume = [o, max_extruders, &counter, &extruder_counter](ModelVolume *new_v) {
assert(new_v != nullptr); assert(new_v != nullptr);
<<<<<<< HEAD
new_v->name = o->name + "_" + std::to_string(counter++);
=======
new_v->name = (counter > 1) ? o->name + "_" + std::to_string(counter++) : o->name; new_v->name = (counter > 1) ? o->name + "_" + std::to_string(counter++) : o->name;
>>>>>>> master
new_v->config.set("extruder", auto_extruder_id(max_extruders, extruder_counter)); new_v->config.set("extruder", auto_extruder_id(max_extruders, extruder_counter));
return new_v; return new_v;
}; };
@ -1816,11 +1807,7 @@ size_t ModelVolume::split(unsigned int max_extruders)
this->object->volumes[ivolume]->translate(offset); this->object->volumes[ivolume]->translate(offset);
this->object->volumes[ivolume]->name = name + "_" + std::to_string(idx + 1); this->object->volumes[ivolume]->name = name + "_" + std::to_string(idx + 1);
this->object->volumes[ivolume]->config.set("extruder", auto_extruder_id(max_extruders, extruder_counter)); this->object->volumes[ivolume]->config.set("extruder", auto_extruder_id(max_extruders, extruder_counter));
<<<<<<< HEAD
delete mesh;
=======
this->object->volumes[ivolume]->m_is_splittable = 0; this->object->volumes[ivolume]->m_is_splittable = 0;
>>>>>>> master
++ idx; ++ idx;
} }

View File

@ -3,15 +3,12 @@
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
#include <boost/filesystem/operations.hpp> #include <boost/filesystem/operations.hpp>
<<<<<<< HEAD
=======
#if defined(__APPLE__) #if defined(__APPLE__)
#include <sys/types.h> #include <sys/types.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <mach/machine.h> #include <mach/machine.h>
#endif #endif
>>>>>>> master
namespace Slic3r { namespace Slic3r {
static auto s_platform = Platform::Uninitialized; static auto s_platform = Platform::Uninitialized;
@ -25,10 +22,6 @@ void detect_platform()
s_platform_flavor = PlatformFlavor::Generic; s_platform_flavor = PlatformFlavor::Generic;
#elif defined(__APPLE__) #elif defined(__APPLE__)
BOOST_LOG_TRIVIAL(info) << "Platform: OSX"; BOOST_LOG_TRIVIAL(info) << "Platform: OSX";
<<<<<<< HEAD
s_platform = Platform::OSX;
s_platform_flavor = PlatformFlavor::Generic;
=======
s_platform = Platform::OSX; s_platform = Platform::OSX;
s_platform_flavor = PlatformFlavor::GenericOSX; s_platform_flavor = PlatformFlavor::GenericOSX;
{ {
@ -62,7 +55,6 @@ void detect_platform()
} }
} }
} }
>>>>>>> master
#elif defined(__linux__) #elif defined(__linux__)
BOOST_LOG_TRIVIAL(info) << "Platform: Linux"; BOOST_LOG_TRIVIAL(info) << "Platform: Linux";
s_platform = Platform::Linux; s_platform = Platform::Linux;
@ -113,8 +105,6 @@ PlatformFlavor platform_flavor()
return s_platform_flavor; return s_platform_flavor;
} }
<<<<<<< HEAD
=======
std::string platform_to_string(Platform platform) std::string platform_to_string(Platform platform)
@ -153,5 +143,4 @@ std::string platform_flavor_to_string(PlatformFlavor pf)
} }
>>>>>>> master
} // namespace Slic3r } // namespace Slic3r

View File

@ -1,11 +1,8 @@
#ifndef SLIC3R_Platform_HPP #ifndef SLIC3R_Platform_HPP
#define SLIC3R_Platform_HPP #define SLIC3R_Platform_HPP
<<<<<<< HEAD
=======
#include <string> #include <string>
>>>>>>> master
namespace Slic3r { namespace Slic3r {
enum class Platform enum class Platform
@ -21,20 +18,6 @@ enum class Platform
enum class PlatformFlavor enum class PlatformFlavor
{ {
Uninitialized, Uninitialized,
<<<<<<< HEAD
Unknown,
// For Windows and OSX, until we need to be more specific.
Generic,
// For Platform::Linux
GenericLinux,
LinuxOnChromium,
// Microsoft's Windows on Linux (Linux kernel simulated on NTFS kernel)
WSL,
// Microsoft's Windows on Linux, version 2 (virtual machine)
WSL2,
// For Platform::BSDUnix
OpenBSD,
=======
Unknown, Unknown,
Generic, // For Windows and OSX, until we need to be more specific. Generic, // For Windows and OSX, until we need to be more specific.
GenericLinux, // For Platform::Linux GenericLinux, // For Platform::Linux
@ -45,7 +28,6 @@ enum class PlatformFlavor
GenericOSX, // For Platform::OSX GenericOSX, // For Platform::OSX
OSXOnX86, // For Apple's on Intel X86 CPU OSXOnX86, // For Apple's on Intel X86 CPU
OSXOnArm, // For Apple's on Arm CPU OSXOnArm, // For Apple's on Arm CPU
>>>>>>> master
}; };
// To be called on program start-up. // To be called on program start-up.
@ -54,12 +36,9 @@ void detect_platform();
Platform platform(); Platform platform();
PlatformFlavor platform_flavor(); PlatformFlavor platform_flavor();
<<<<<<< HEAD
=======
std::string platform_to_string(Platform platform); std::string platform_to_string(Platform platform);
std::string platform_flavor_to_string(PlatformFlavor pf); std::string platform_flavor_to_string(PlatformFlavor pf);
>>>>>>> master
} // namespace Slic3r } // namespace Slic3r
#endif // SLIC3R_Platform_HPP #endif // SLIC3R_Platform_HPP

View File

@ -112,10 +112,7 @@ public:
TYPE_FILAMENT, TYPE_FILAMENT,
TYPE_SLA_MATERIAL, TYPE_SLA_MATERIAL,
TYPE_PRINTER, TYPE_PRINTER,
<<<<<<< HEAD
=======
TYPE_COUNT, TYPE_COUNT,
>>>>>>> master
// This type is here to support PresetConfigSubstitutions for physical printers, however it does not belong to the Preset class, // This type is here to support PresetConfigSubstitutions for physical printers, however it does not belong to the Preset class,
// PhysicalPrinter class is used instead. // PhysicalPrinter class is used instead.
TYPE_PHYSICAL_PRINTER, TYPE_PHYSICAL_PRINTER,

View File

@ -188,9 +188,6 @@ void PresetBundle::setup_directories()
} }
} }
<<<<<<< HEAD
PresetsConfigSubstitutions PresetBundle::load_presets(AppConfig &config, ForwardCompatibilitySubstitutionRule substitution_rule, const std::string &preferred_model_id)
=======
// recursively copy all files and dirs in from_dir to to_dir // recursively copy all files and dirs in from_dir to to_dir
static void copy_dir(const boost::filesystem::path& from_dir, const boost::filesystem::path& to_dir) static void copy_dir(const boost::filesystem::path& from_dir, const boost::filesystem::path& to_dir)
{ {
@ -264,7 +261,6 @@ void PresetBundle::import_newer_configs(const std::string& from)
PresetsConfigSubstitutions PresetBundle::load_presets(AppConfig &config, ForwardCompatibilitySubstitutionRule substitution_rule, PresetsConfigSubstitutions PresetBundle::load_presets(AppConfig &config, ForwardCompatibilitySubstitutionRule substitution_rule,
const PresetPreferences& preferred_selection/* = PresetPreferences()*/) const PresetPreferences& preferred_selection/* = PresetPreferences()*/)
>>>>>>> master
{ {
// First load the vendor specific system presets. // First load the vendor specific system presets.
PresetsConfigSubstitutions substitutions; PresetsConfigSubstitutions substitutions;
@ -315,11 +311,7 @@ PresetsConfigSubstitutions PresetBundle::load_presets(AppConfig &config, Forward
if (! errors_cummulative.empty()) if (! errors_cummulative.empty())
throw Slic3r::RuntimeError(errors_cummulative); throw Slic3r::RuntimeError(errors_cummulative);
<<<<<<< HEAD
this->load_selections(config, preferred_model_id);
=======
this->load_selections(config, preferred_selection); this->load_selections(config, preferred_selection);
>>>>>>> master
return substitutions; return substitutions;
} }
@ -1033,21 +1025,14 @@ ConfigSubstitutions PresetBundle::load_config_file_config_bundle(
// Load the config bundle, but don't save the loaded presets to user profile directory, as only the presets marked as active in the loaded preset bundle // Load the config bundle, but don't save the loaded presets to user profile directory, as only the presets marked as active in the loaded preset bundle
// will be loaded into the master PresetBundle and activated. // will be loaded into the master PresetBundle and activated.
auto [presets_substitutions, presets_imported] = tmp_bundle.load_configbundle(path, {}, compatibility_rule); auto [presets_substitutions, presets_imported] = tmp_bundle.load_configbundle(path, {}, compatibility_rule);
<<<<<<< HEAD
=======
UNUSED(presets_imported); UNUSED(presets_imported);
>>>>>>> master
std::string bundle_name = std::string(" - ") + boost::filesystem::path(path).filename().string(); std::string bundle_name = std::string(" - ") + boost::filesystem::path(path).filename().string();
// 2) Extract active configs from the config bundle, copy them and activate them in this bundle. // 2) Extract active configs from the config bundle, copy them and activate them in this bundle.
ConfigSubstitutions config_substitutions; ConfigSubstitutions config_substitutions;
<<<<<<< HEAD
auto load_one = [this, &path, &bundle_name, &presets_substitutions = presets_substitutions, &config_substitutions](PresetCollection &collection_dst, PresetCollection &collection_src, const std::string &preset_name_src, bool activate) -> std::string {
=======
auto load_one = [&path, &bundle_name, &presets_substitutions = presets_substitutions, &config_substitutions]( auto load_one = [&path, &bundle_name, &presets_substitutions = presets_substitutions, &config_substitutions](
PresetCollection &collection_dst, PresetCollection &collection_src, const std::string &preset_name_src, bool activate) -> std::string { PresetCollection &collection_dst, PresetCollection &collection_src, const std::string &preset_name_src, bool activate) -> std::string {
>>>>>>> master
// If there are substitutions reported for this preset, move them to config_substitutions. // If there are substitutions reported for this preset, move them to config_substitutions.
if (auto it = std::find_if(presets_substitutions.begin(), presets_substitutions.end(), [&preset_name_src](const PresetConfigSubstitutions& subs){ return subs.preset_name == preset_name_src; }); if (auto it = std::find_if(presets_substitutions.begin(), presets_substitutions.end(), [&preset_name_src](const PresetConfigSubstitutions& subs){ return subs.preset_name == preset_name_src; });
it != presets_substitutions.end() && ! it->substitutions.empty()) it != presets_substitutions.end() && ! it->substitutions.empty())
@ -1107,11 +1092,7 @@ ConfigSubstitutions PresetBundle::load_config_file_config_bundle(
this->update_compatible(PresetSelectCompatibleType::Never); this->update_compatible(PresetSelectCompatibleType::Never);
sort_remove_duplicates(config_substitutions); sort_remove_duplicates(config_substitutions);
<<<<<<< HEAD
return std::move(config_substitutions);
=======
return config_substitutions; return config_substitutions;
>>>>>>> master
} }
// Process the Config Bundle loaded as a Boost property tree. // Process the Config Bundle loaded as a Boost property tree.

View File

@ -35,14 +35,9 @@ public:
// Load ini files of all types (print, filament, printer) from Slic3r::data_dir() / presets. // Load ini files of all types (print, filament, printer) from Slic3r::data_dir() / presets.
// Load selections (current print, current filaments, current printer) from config.ini // Load selections (current print, current filaments, current printer) from config.ini
<<<<<<< HEAD
// This is done just once on application start up.
PresetsConfigSubstitutions load_presets(AppConfig &config, ForwardCompatibilitySubstitutionRule rule, const std::string &preferred_model_id = "");
=======
// select preferred presets, if any exist // select preferred presets, if any exist
PresetsConfigSubstitutions load_presets(AppConfig &config, ForwardCompatibilitySubstitutionRule rule, PresetsConfigSubstitutions load_presets(AppConfig &config, ForwardCompatibilitySubstitutionRule rule,
const PresetPreferences& preferred_selection = PresetPreferences()); const PresetPreferences& preferred_selection = PresetPreferences());
>>>>>>> master
// Export selections (current print, current filaments, current printer) into config.ini // Export selections (current print, current filaments, current printer) into config.ini
void export_selections(AppConfig &config); void export_selections(AppConfig &config);

View File

@ -1871,10 +1871,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("flashair"); def->enum_values.push_back("flashair");
def->enum_values.push_back("astrobox"); def->enum_values.push_back("astrobox");
def->enum_values.push_back("repetier"); def->enum_values.push_back("repetier");
<<<<<<< HEAD
=======
def->enum_values.push_back("mks"); def->enum_values.push_back("mks");
>>>>>>> master
def->enum_labels.push_back("PrusaLink"); def->enum_labels.push_back("PrusaLink");
def->enum_labels.push_back("OctoPrint"); def->enum_labels.push_back("OctoPrint");
def->enum_labels.push_back("Duet"); def->enum_labels.push_back("Duet");
@ -4414,22 +4411,8 @@ CLIMiscConfigDef::CLIMiscConfigDef()
ConfigOptionDef* def; ConfigOptionDef* def;
def = this->add("ignore_nonexistent_config", coBool); def = this->add("ignore_nonexistent_config", coBool);
def->label = "Ignore non-existent config files"; def->label = L("Ignore non-existent config files");
def->tooltip = "Do not fail if a file supplied to --load does not exist."; def->tooltip = L("Do not fail if a file supplied to --load does not exist.");
def = this->add("config_compatibility", coEnum);
def->label = "Forward-compatibility rule when loading configurations from config files and project files (3MF, AMF).";
def->tooltip = "This version of PrusaSlicer may not understand configurations produced by newest PrusaSlicer versions. "
"For example, newer PrusaSlicer may extend the list of supported firmware flavors. One may decide to "
"bail out or to substitute an unknown value with a default silently or verbosely.";
def->enum_keys_map = &ConfigOptionEnum<ForwardCompatibilitySubstitutionRule>::get_enum_values();
def->enum_values.push_back("disable");
def->enum_values.push_back("enable");
def->enum_values.push_back("enable_silent");
def->enum_labels.push_back("Bail out on unknown configuration values");
def->enum_labels.push_back("Enable reading unknown configuration values by verbosely substituting them with defaults.");
def->enum_labels.push_back("Enable reading unknown configuration values by silently substituting them with defaults.");
def->set_default_value(new ConfigOptionEnum<ForwardCompatibilitySubstitutionRule>(ForwardCompatibilitySubstitutionRule::Enable));
def = this->add("config_compatibility", coEnum); def = this->add("config_compatibility", coEnum);
def->label = L("Forward-compatibility rule when loading configurations from config files and project files (3MF, AMF)."); def->label = L("Forward-compatibility rule when loading configurations from config files and project files (3MF, AMF).");
@ -4446,40 +4429,40 @@ CLIMiscConfigDef::CLIMiscConfigDef()
def->set_default_value(new ConfigOptionEnum<ForwardCompatibilitySubstitutionRule>(ForwardCompatibilitySubstitutionRule::Enable)); def->set_default_value(new ConfigOptionEnum<ForwardCompatibilitySubstitutionRule>(ForwardCompatibilitySubstitutionRule::Enable));
def = this->add("load", coStrings); def = this->add("load", coStrings);
def->label = "Load config file"; def->label = L("Load config file");
def->tooltip = "Load configuration from the specified file. It can be used more than once to load options from multiple files."; def->tooltip = L("Load configuration from the specified file. It can be used more than once to load options from multiple files.");
def = this->add("output", coString); def = this->add("output", coString);
def->label = "Output File"; def->label = L("Output File");
def->tooltip = "The file where the output will be written (if not specified, it will be based on the input file)."; def->tooltip = L("The file where the output will be written (if not specified, it will be based on the input file).");
def->cli = "output|o"; def->cli = "output|o";
def = this->add("single_instance", coBool); def = this->add("single_instance", coBool);
def->label = "Single instance mode"; def->label = L("Single instance mode");
def->tooltip = "If enabled, the command line arguments are sent to an existing instance of GUI PrusaSlicer, " def->tooltip = L("If enabled, the command line arguments are sent to an existing instance of GUI PrusaSlicer, "
"or an existing PrusaSlicer window is activated. " "or an existing PrusaSlicer window is activated. "
"Overrides the \"single_instance\" configuration value from application preferences."; "Overrides the \"single_instance\" configuration value from application preferences.");
/* /*
def = this->add("autosave", coString); def = this->add("autosave", coString);
def->label = "Autosave"; def->label = L("Autosave");
def->tooltip = "Automatically export current configuration to the specified file."; def->tooltip = L("Automatically export current configuration to the specified file.");
*/ */
def = this->add("datadir", coString); def = this->add("datadir", coString);
def->label = "Data directory"; def->label = L("Data directory");
def->tooltip = "Load and store settings at the given directory. This is useful for maintaining different profiles or including configurations from a network storage."; def->tooltip = L("Load and store settings at the given directory. This is useful for maintaining different profiles or including configurations from a network storage.");
def = this->add("loglevel", coInt); def = this->add("loglevel", coInt);
def->label = "Logging level"; def->label = L("Logging level");
def->tooltip = "Sets logging sensitivity. 0:fatal, 1:error, 2:warning, 3:info, 4:debug, 5:trace\n" def->tooltip = L("Sets logging sensitivity. 0:fatal, 1:error, 2:warning, 3:info, 4:debug, 5:trace\n"
"For example. loglevel=2 logs fatal, error and warning level messages."; "For example. loglevel=2 logs fatal, error and warning level messages.");
def->min = 0; def->min = 0;
#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(SLIC3R_GUI) #if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(SLIC3R_GUI)
def = this->add("sw_renderer", coBool); def = this->add("sw_renderer", coBool);
def->label = "Render with a software renderer"; def->label = L("Render with a software renderer");
def->tooltip = "Render with a software renderer. The bundled MESA software renderer is loaded instead of the default OpenGL driver."; def->tooltip = L("Render with a software renderer. The bundled MESA software renderer is loaded instead of the default OpenGL driver.");
def->min = 0; def->min = 0;
#endif /* _MSC_VER */ #endif /* _MSC_VER */
} }

View File

@ -44,11 +44,7 @@ enum class MachineLimitsUsage {
}; };
enum PrintHostType { enum PrintHostType {
<<<<<<< HEAD
htPrusaLink, htOctoPrint, htDuet, htFlashAir, htAstroBox, htRepetier
=======
htPrusaLink, htOctoPrint, htDuet, htFlashAir, htAstroBox, htRepetier, htMKS htPrusaLink, htOctoPrint, htDuet, htFlashAir, htAstroBox, htRepetier, htMKS
>>>>>>> master
}; };
enum AuthorizationType { enum AuthorizationType {
@ -124,138 +120,12 @@ enum SLAPillarConnectionMode {
slapcmDynamic slapcmDynamic
}; };
<<<<<<< HEAD
template<> inline const t_config_enum_values& ConfigOptionEnum<PrinterTechnology>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["FFF"] = ptFFF;
keys_map["SLA"] = ptSLA;
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<GCodeFlavor>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["reprap"] = gcfRepRapSprinter;
keys_map["reprapfirmware"] = gcfRepRapFirmware;
keys_map["repetier"] = gcfRepetier;
keys_map["teacup"] = gcfTeacup;
keys_map["makerware"] = gcfMakerWare;
keys_map["marlin"] = gcfMarlin;
keys_map["sailfish"] = gcfSailfish;
keys_map["smoothie"] = gcfSmoothie;
keys_map["mach3"] = gcfMach3;
keys_map["machinekit"] = gcfMachinekit;
keys_map["no-extrusion"] = gcfNoExtrusion;
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<MachineLimitsUsage>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["emit_to_gcode"] = int(MachineLimitsUsage::EmitToGCode);
keys_map["time_estimate_only"] = int(MachineLimitsUsage::TimeEstimateOnly);
keys_map["ignore"] = int(MachineLimitsUsage::Ignore);
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<PrintHostType>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["prusalink"] = htPrusaLink;
keys_map["octoprint"] = htOctoPrint;
keys_map["duet"] = htDuet;
keys_map["flashair"] = htFlashAir;
keys_map["astrobox"] = htAstroBox;
keys_map["repetier"] = htRepetier;
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<AuthorizationType>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["key"] = atKeyPassword;
keys_map["user"] = atUserPassword;
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<InfillPattern>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["rectilinear"] = ipRectilinear;
keys_map["monotonic"] = ipMonotonic;
keys_map["alignedrectilinear"] = ipAlignedRectilinear;
keys_map["grid"] = ipGrid;
keys_map["triangles"] = ipTriangles;
keys_map["stars"] = ipStars;
keys_map["cubic"] = ipCubic;
keys_map["line"] = ipLine;
keys_map["concentric"] = ipConcentric;
keys_map["honeycomb"] = ipHoneycomb;
keys_map["3dhoneycomb"] = ip3DHoneycomb;
keys_map["gyroid"] = ipGyroid;
keys_map["hilbertcurve"] = ipHilbertCurve;
keys_map["archimedeanchords"] = ipArchimedeanChords;
keys_map["octagramspiral"] = ipOctagramSpiral;
keys_map["adaptivecubic"] = ipAdaptiveCubic;
keys_map["supportcubic"] = ipSupportCubic;
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<IroningType>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["top"] = int(IroningType::TopSurfaces);
keys_map["topmost"] = int(IroningType::TopmostOnly);
keys_map["solid"] = int(IroningType::AllSolid);
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<SupportMaterialPattern>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["rectilinear"] = smpRectilinear;
keys_map["rectilinear-grid"] = smpRectilinearGrid;
keys_map["honeycomb"] = smpHoneycomb;
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<SeamPosition>::get_enum_values() {
static t_config_enum_values keys_map;
if (keys_map.empty()) {
keys_map["random"] = spRandom;
keys_map["nearest"] = spNearest;
keys_map["aligned"] = spAligned;
keys_map["rear"] = spRear;
}
return keys_map;
}
template<> inline const t_config_enum_values& ConfigOptionEnum<SLADisplayOrientation>::get_enum_values() {
static const t_config_enum_values keys_map = {
{ "landscape", sladoLandscape},
{ "portrait", sladoPortrait}
};
return keys_map;
}
=======
enum BrimType { enum BrimType {
btNoBrim, btNoBrim,
btOuterOnly, btOuterOnly,
btInnerOnly, btInnerOnly,
btOuterAndInner, btOuterAndInner,
}; };
>>>>>>> master
enum DraftShield { enum DraftShield {
dsDisabled, dsLimited, dsEnabled dsDisabled, dsLimited, dsEnabled
@ -286,16 +156,6 @@ CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(ForwardCompatibilitySubstitutionRule)
#undef CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS #undef CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS
template<> inline const t_config_enum_values& ConfigOptionEnum<ForwardCompatibilitySubstitutionRule>::get_enum_values() {
static const t_config_enum_values keys_map = {
{ "disable", ForwardCompatibilitySubstitutionRule::Disable },
{ "enable", ForwardCompatibilitySubstitutionRule::Enable },
{ "enable_silent", ForwardCompatibilitySubstitutionRule::EnableSilent }
};
return keys_map;
}
// Defines each and every confiuration option of Slic3r, including the properties of the GUI dialogs. // Defines each and every confiuration option of Slic3r, including the properties of the GUI dialogs.
// Does not store the actual values, but defines default values. // Does not store the actual values, but defines default values.
class PrintConfigDef : public ConfigDef class PrintConfigDef : public ConfigDef

View File

@ -1694,687 +1694,6 @@ bool PrintObject::update_layer_height_profile(const ModelObject &model_object, c
return updated; return updated;
} }
<<<<<<< HEAD
// 1) Decides Z positions of the layers,
// 2) Initializes layers and their regions
// 3) Slices the object meshes
// 4) Slices the modifier meshes and reclassifies the slices of the object meshes by the slices of the modifier meshes
// 5) Applies size compensation (offsets the slices in XY plane)
// 6) Replaces bad slices by the slices reconstructed from the upper/lower layer
// Resulting expolygons of layer regions are marked as Internal.
//
// this should be idempotent
void PrintObject::_slice(const std::vector<coordf_t> &layer_height_profile)
{
BOOST_LOG_TRIVIAL(info) << "Slicing objects..." << log_memory_info();
m_typed_slices = false;
// 1) Initialize layers and their slice heights.
std::vector<float> slice_zs;
{
this->clear_layers();
// Object layers (pairs of bottom/top Z coordinate), without the raft.
std::vector<coordf_t> object_layers = generate_object_layers(m_slicing_params, layer_height_profile);
// Reserve object layers for the raft. Last layer of the raft is the contact layer.
int id = int(m_slicing_params.raft_layers());
slice_zs.reserve(object_layers.size());
Layer *prev = nullptr;
for (size_t i_layer = 0; i_layer < object_layers.size(); i_layer += 2) {
coordf_t lo = object_layers[i_layer];
coordf_t hi = object_layers[i_layer + 1];
coordf_t slice_z = 0.5 * (lo + hi);
Layer *layer = this->add_layer(id ++, hi - lo, hi + m_slicing_params.object_print_z_min, slice_z);
slice_zs.push_back(float(slice_z));
if (prev != nullptr) {
prev->upper_layer = layer;
layer->lower_layer = prev;
}
// Make sure all layers contain layer region objects for all regions.
for (size_t region_id = 0; region_id < this->region_volumes.size(); ++ region_id)
layer->add_region(this->print()->regions()[region_id]);
prev = layer;
}
}
// Count model parts and modifier meshes, check whether the model parts are of the same region.
int all_volumes_single_region = -2; // not set yet
bool has_z_ranges = false;
size_t num_volumes = 0;
size_t num_modifiers = 0;
for (int region_id = 0; region_id < (int)this->region_volumes.size(); ++ region_id) {
int last_volume_id = -1;
for (const std::pair<t_layer_height_range, int> &volume_and_range : this->region_volumes[region_id]) {
const int volume_id = volume_and_range.second;
const ModelVolume *model_volume = this->model_object()->volumes[volume_id];
if (model_volume->is_model_part()) {
if (last_volume_id == volume_id) {
has_z_ranges = true;
} else {
last_volume_id = volume_id;
if (all_volumes_single_region == -2)
// first model volume met
all_volumes_single_region = region_id;
else if (all_volumes_single_region != region_id)
// multiple volumes met and they are not equal
all_volumes_single_region = -1;
++ num_volumes;
}
} else if (model_volume->is_modifier())
++ num_modifiers;
}
}
assert(num_volumes > 0);
// Slice all non-modifier volumes.
bool clipped = false;
bool upscaled = false;
bool spiral_vase = this->print()->config().spiral_vase;
auto slicing_mode = spiral_vase ? SlicingMode::PositiveLargestContour : SlicingMode::Regular;
if (! has_z_ranges && (! m_config.clip_multipart_objects.value || all_volumes_single_region >= 0)) {
// Cheap path: Slice regions without mutual clipping.
// The cheap path is possible if no clipping is allowed or if slicing volumes of just a single region.
for (size_t region_id = 0; region_id < this->region_volumes.size(); ++ region_id) {
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - region " << region_id;
// slicing in parallel
size_t slicing_mode_normal_below_layer = 0;
if (spiral_vase) {
// Slice the bottom layers with SlicingMode::Regular.
// This needs to be in sync with LayerRegion::make_perimeters() spiral_vase!
const PrintRegionConfig &config = this->print()->regions()[region_id]->config();
slicing_mode_normal_below_layer = size_t(config.bottom_solid_layers.value);
for (; slicing_mode_normal_below_layer < slice_zs.size() && slice_zs[slicing_mode_normal_below_layer] < config.bottom_solid_min_thickness - EPSILON;
++ slicing_mode_normal_below_layer);
}
std::vector<ExPolygons> expolygons_by_layer = this->slice_region(region_id, slice_zs, slicing_mode, slicing_mode_normal_below_layer, SlicingMode::Regular);
m_print->throw_if_canceled();
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - append slices " << region_id << " start";
for (size_t layer_id = 0; layer_id < expolygons_by_layer.size(); ++ layer_id)
m_layers[layer_id]->regions()[region_id]->slices.append(std::move(expolygons_by_layer[layer_id]), stInternal);
m_print->throw_if_canceled();
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - append slices " << region_id << " end";
}
} else {
// Expensive path: Slice one volume after the other in the order they are presented at the user interface,
// clip the last volumes with the first.
// First slice the volumes.
struct SlicedVolume {
SlicedVolume(int volume_id, int region_id, std::vector<ExPolygons> &&expolygons_by_layer) :
volume_id(volume_id), region_id(region_id), expolygons_by_layer(std::move(expolygons_by_layer)) {}
int volume_id;
int region_id;
std::vector<ExPolygons> expolygons_by_layer;
};
std::vector<SlicedVolume> sliced_volumes;
sliced_volumes.reserve(num_volumes);
for (size_t region_id = 0; region_id < this->region_volumes.size(); ++ region_id) {
const std::vector<std::pair<t_layer_height_range, int>> &volumes_and_ranges = this->region_volumes[region_id];
for (size_t i = 0; i < volumes_and_ranges.size(); ) {
int volume_id = volumes_and_ranges[i].second;
const ModelVolume *model_volume = this->model_object()->volumes[volume_id];
if (model_volume->is_model_part()) {
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - volume " << volume_id;
// Find the ranges of this volume. Ranges in volumes_and_ranges must not overlap for a single volume.
std::vector<t_layer_height_range> ranges;
ranges.emplace_back(volumes_and_ranges[i].first);
size_t j = i + 1;
for (; j < volumes_and_ranges.size() && volume_id == volumes_and_ranges[j].second; ++ j)
if (! ranges.empty() && std::abs(ranges.back().second - volumes_and_ranges[j].first.first) < EPSILON)
ranges.back().second = volumes_and_ranges[j].first.second;
else
ranges.emplace_back(volumes_and_ranges[j].first);
// slicing in parallel
sliced_volumes.emplace_back(volume_id, (int)region_id, this->slice_volume(slice_zs, ranges, slicing_mode, *model_volume));
i = j;
} else
++ i;
}
}
// Second clip the volumes in the order they are presented at the user interface.
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - parallel clipping - start";
tbb::parallel_for(
tbb::blocked_range<size_t>(0, slice_zs.size()),
[this, &sliced_volumes, num_modifiers](const tbb::blocked_range<size_t>& range) {
float delta = float(scale_(m_config.xy_size_compensation.value));
// Only upscale together with clipping if there are no modifiers, as the modifiers shall be applied before upscaling
// (upscaling may grow the object outside of the modifier mesh).
bool upscale = delta > 0 && num_modifiers == 0;
for (size_t layer_id = range.begin(); layer_id < range.end(); ++ layer_id) {
m_print->throw_if_canceled();
// Trim volumes in a single layer, one by the other, possibly apply upscaling.
{
Polygons processed;
for (SlicedVolume &sliced_volume : sliced_volumes)
if (! sliced_volume.expolygons_by_layer.empty()) {
ExPolygons slices = std::move(sliced_volume.expolygons_by_layer[layer_id]);
if (upscale)
slices = offset_ex(std::move(slices), delta);
if (! processed.empty())
// Trim by the slices of already processed regions.
slices = diff_ex(to_polygons(std::move(slices)), processed);
if (size_t(&sliced_volume - &sliced_volumes.front()) + 1 < sliced_volumes.size())
// Collect the already processed regions to trim the to be processed regions.
polygons_append(processed, slices);
sliced_volume.expolygons_by_layer[layer_id] = std::move(slices);
}
}
// Collect and union volumes of a single region.
for (int region_id = 0; region_id < (int)this->region_volumes.size(); ++ region_id) {
ExPolygons expolygons;
size_t num_volumes = 0;
for (SlicedVolume &sliced_volume : sliced_volumes)
if (sliced_volume.region_id == region_id && ! sliced_volume.expolygons_by_layer.empty() && ! sliced_volume.expolygons_by_layer[layer_id].empty()) {
++ num_volumes;
append(expolygons, std::move(sliced_volume.expolygons_by_layer[layer_id]));
}
if (num_volumes > 1)
// Merge the islands using a positive / negative offset.
expolygons = offset_ex(offset_ex(expolygons, float(scale_(EPSILON))), -float(scale_(EPSILON)));
m_layers[layer_id]->regions()[region_id]->slices.append(std::move(expolygons), stInternal);
}
}
});
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - parallel clipping - end";
clipped = true;
upscaled = m_config.xy_size_compensation.value > 0 && num_modifiers == 0;
}
// Slice all modifier volumes.
if (this->region_volumes.size() > 1) {
for (size_t region_id = 0; region_id < this->region_volumes.size(); ++ region_id) {
BOOST_LOG_TRIVIAL(debug) << "Slicing modifier volumes - region " << region_id;
// slicing in parallel
std::vector<ExPolygons> expolygons_by_layer = this->slice_modifiers(region_id, slice_zs);
m_print->throw_if_canceled();
if (expolygons_by_layer.empty())
continue;
// loop through the other regions and 'steal' the slices belonging to this one
BOOST_LOG_TRIVIAL(debug) << "Slicing modifier volumes - stealing " << region_id << " start";
tbb::parallel_for(
tbb::blocked_range<size_t>(0, m_layers.size()),
[this, &expolygons_by_layer, region_id](const tbb::blocked_range<size_t>& range) {
for (size_t layer_id = range.begin(); layer_id < range.end(); ++ layer_id) {
for (size_t other_region_id = 0; other_region_id < this->region_volumes.size(); ++ other_region_id) {
if (region_id == other_region_id)
continue;
Layer *layer = m_layers[layer_id];
LayerRegion *layerm = layer->m_regions[region_id];
LayerRegion *other_layerm = layer->m_regions[other_region_id];
if (layerm == nullptr || other_layerm == nullptr || other_layerm->slices.empty() || expolygons_by_layer[layer_id].empty())
continue;
Polygons other_slices = to_polygons(other_layerm->slices);
ExPolygons my_parts = intersection_ex(other_slices, to_polygons(expolygons_by_layer[layer_id]));
if (my_parts.empty())
continue;
// Remove such parts from original region.
other_layerm->slices.set(diff_ex(other_slices, to_polygons(my_parts)), stInternal);
// Append new parts to our region.
layerm->slices.append(std::move(my_parts), stInternal);
}
}
});
m_print->throw_if_canceled();
BOOST_LOG_TRIVIAL(debug) << "Slicing modifier volumes - stealing " << region_id << " end";
}
}
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - removing top empty layers";
while (! m_layers.empty()) {
const Layer *layer = m_layers.back();
if (! layer->empty())
goto end;
delete layer;
m_layers.pop_back();
if (! m_layers.empty())
m_layers.back()->upper_layer = nullptr;
}
m_print->throw_if_canceled();
end:
;
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - make_slices in parallel - begin";
{
// Compensation value, scaled.
const float xy_compensation_scaled = float(scale_(m_config.xy_size_compensation.value));
const float elephant_foot_compensation_scaled = (m_config.raft_layers == 0) ?
// Only enable Elephant foot compensation if printing directly on the print bed.
float(scale_(m_config.elefant_foot_compensation.value)) :
0.f;
// Uncompensated slices for the first layer in case the Elephant foot compensation is applied.
ExPolygons lslices_1st_layer;
tbb::parallel_for(
tbb::blocked_range<size_t>(0, m_layers.size()),
[this, upscaled, clipped, xy_compensation_scaled, elephant_foot_compensation_scaled, &lslices_1st_layer]
(const tbb::blocked_range<size_t>& range) {
for (size_t layer_id = range.begin(); layer_id < range.end(); ++ layer_id) {
m_print->throw_if_canceled();
Layer *layer = m_layers[layer_id];
// Apply size compensation and perform clipping of multi-part objects.
float elfoot = (layer_id == 0) ? elephant_foot_compensation_scaled : 0.f;
if (layer->m_regions.size() == 1) {
assert(! upscaled);
assert(! clipped);
// Optimized version for a single region layer.
// Single region, growing or shrinking.
LayerRegion *layerm = layer->m_regions.front();
if (elfoot > 0) {
// Apply the elephant foot compensation and store the 1st layer slices without the Elephant foot compensation applied.
lslices_1st_layer = to_expolygons(std::move(layerm->slices.surfaces));
float delta = xy_compensation_scaled;
if (delta > elfoot) {
delta -= elfoot;
elfoot = 0.f;
} else if (delta > 0)
elfoot -= delta;
layerm->slices.set(
union_ex(
Slic3r::elephant_foot_compensation(
(delta == 0.f) ? lslices_1st_layer : offset_ex(lslices_1st_layer, delta),
layerm->flow(frExternalPerimeter), unscale<double>(elfoot))),
stInternal);
if (xy_compensation_scaled != 0.f)
lslices_1st_layer = offset_ex(std::move(lslices_1st_layer), xy_compensation_scaled);
} else if (xy_compensation_scaled != 0.f) {
// Apply the XY compensation.
layerm->slices.set(
offset_ex(to_expolygons(std::move(layerm->slices.surfaces)), xy_compensation_scaled),
stInternal);
}
} else {
bool upscale = ! upscaled && xy_compensation_scaled > 0.f;
bool clip = ! clipped && m_config.clip_multipart_objects.value;
if (upscale || clip) {
// Multiple regions, growing or just clipping one region by the other.
// When clipping the regions, priority is given to the first regions.
Polygons processed;
for (size_t region_id = 0; region_id < layer->m_regions.size(); ++ region_id) {
LayerRegion *layerm = layer->m_regions[region_id];
ExPolygons slices = to_expolygons(std::move(layerm->slices.surfaces));
if (upscale)
slices = offset_ex(std::move(slices), xy_compensation_scaled);
if (region_id > 0 && clip)
// Trim by the slices of already processed regions.
slices = diff_ex(to_polygons(std::move(slices)), processed);
if (clip && (region_id + 1 < layer->m_regions.size()))
// Collect the already processed regions to trim the to be processed regions.
polygons_append(processed, slices);
layerm->slices.set(std::move(slices), stInternal);
}
}
if (xy_compensation_scaled < 0.f || elfoot > 0.f) {
// Apply the negative XY compensation.
Polygons trimming;
static const float eps = float(scale_(m_config.slice_closing_radius.value) * 1.5);
if (elfoot > 0.f) {
lslices_1st_layer = offset_ex(layer->merged(eps), std::min(xy_compensation_scaled, 0.f) - eps);
trimming = to_polygons(Slic3r::elephant_foot_compensation(lslices_1st_layer,
layer->m_regions.front()->flow(frExternalPerimeter), unscale<double>(elfoot)));
} else
trimming = offset(layer->merged(float(SCALED_EPSILON)), xy_compensation_scaled - float(SCALED_EPSILON));
for (size_t region_id = 0; region_id < layer->m_regions.size(); ++ region_id)
layer->m_regions[region_id]->trim_surfaces(trimming);
}
}
// Merge all regions' slices to get islands, chain them by a shortest path.
layer->make_slices();
}
});
if (elephant_foot_compensation_scaled > 0.f && ! m_layers.empty()) {
// The Elephant foot has been compensated, therefore the 1st layer's lslices are shrank with the Elephant foot compensation value.
// Store the uncompensated value there.
assert(m_layers.front()->id() == 0);
m_layers.front()->lslices = std::move(lslices_1st_layer);
}
}
m_print->throw_if_canceled();
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - make_slices in parallel - end";
}
// To be used only if there are no layer span specific configurations applied, which would lead to z ranges being generated for this region.
std::vector<ExPolygons> PrintObject::slice_region(size_t region_id, const std::vector<float> &z, SlicingMode mode, size_t slicing_mode_normal_below_layer, SlicingMode mode_below) const
{
std::vector<const ModelVolume*> volumes;
if (region_id < this->region_volumes.size()) {
for (const std::pair<t_layer_height_range, int> &volume_and_range : this->region_volumes[region_id]) {
const ModelVolume *volume = this->model_object()->volumes[volume_and_range.second];
if (volume->is_model_part())
volumes.emplace_back(volume);
}
}
return this->slice_volumes(z, mode, slicing_mode_normal_below_layer, mode_below, volumes);
}
// Z ranges are not applicable to modifier meshes, therefore a single volume will be found in volume_and_range at most once.
std::vector<ExPolygons> PrintObject::slice_modifiers(size_t region_id, const std::vector<float> &slice_zs) const
{
std::vector<ExPolygons> out;
if (region_id < this->region_volumes.size())
{
std::vector<std::vector<t_layer_height_range>> volume_ranges;
const std::vector<std::pair<t_layer_height_range, int>> &volumes_and_ranges = this->region_volumes[region_id];
volume_ranges.reserve(volumes_and_ranges.size());
for (size_t i = 0; i < volumes_and_ranges.size(); ) {
int volume_id = volumes_and_ranges[i].second;
const ModelVolume *model_volume = this->model_object()->volumes[volume_id];
if (model_volume->is_modifier()) {
std::vector<t_layer_height_range> ranges;
ranges.emplace_back(volumes_and_ranges[i].first);
size_t j = i + 1;
for (; j < volumes_and_ranges.size() && volume_id == volumes_and_ranges[j].second; ++ j) {
if (! ranges.empty() && std::abs(ranges.back().second - volumes_and_ranges[j].first.first) < EPSILON)
ranges.back().second = volumes_and_ranges[j].first.second;
else
ranges.emplace_back(volumes_and_ranges[j].first);
}
volume_ranges.emplace_back(std::move(ranges));
i = j;
} else
++ i;
}
if (! volume_ranges.empty())
{
bool equal_ranges = true;
for (size_t i = 1; i < volume_ranges.size(); ++ i) {
assert(! volume_ranges[i].empty());
if (volume_ranges.front() != volume_ranges[i]) {
equal_ranges = false;
break;
}
}
if (equal_ranges && volume_ranges.front().size() == 1 && volume_ranges.front().front() == t_layer_height_range(0, DBL_MAX)) {
// No modifier in this region was split to layer spans.
std::vector<const ModelVolume*> volumes;
for (const std::pair<t_layer_height_range, int> &volume_and_range : this->region_volumes[region_id]) {
const ModelVolume *volume = this->model_object()->volumes[volume_and_range.second];
if (volume->is_modifier())
volumes.emplace_back(volume);
}
out = this->slice_volumes(slice_zs, SlicingMode::Regular, volumes);
} else {
// Some modifier in this region was split to layer spans.
std::vector<char> merge;
for (size_t region_id = 0; region_id < this->region_volumes.size(); ++ region_id) {
const std::vector<std::pair<t_layer_height_range, int>> &volumes_and_ranges = this->region_volumes[region_id];
for (size_t i = 0; i < volumes_and_ranges.size(); ) {
int volume_id = volumes_and_ranges[i].second;
const ModelVolume *model_volume = this->model_object()->volumes[volume_id];
if (model_volume->is_modifier()) {
BOOST_LOG_TRIVIAL(debug) << "Slicing modifiers - volume " << volume_id;
// Find the ranges of this volume. Ranges in volumes_and_ranges must not overlap for a single volume.
std::vector<t_layer_height_range> ranges;
ranges.emplace_back(volumes_and_ranges[i].first);
size_t j = i + 1;
for (; j < volumes_and_ranges.size() && volume_id == volumes_and_ranges[j].second; ++ j)
ranges.emplace_back(volumes_and_ranges[j].first);
// slicing in parallel
std::vector<ExPolygons> this_slices = this->slice_volume(slice_zs, ranges, SlicingMode::Regular, *model_volume);
// Variable this_slices could be empty if no value of slice_zs is within any of the ranges of this volume.
if (out.empty()) {
out = std::move(this_slices);
merge.assign(out.size(), false);
} else if (!this_slices.empty()) {
assert(out.size() == this_slices.size());
for (size_t i = 0; i < out.size(); ++ i)
if (! this_slices[i].empty()) {
if (! out[i].empty()) {
append(out[i], this_slices[i]);
merge[i] = true;
} else
out[i] = std::move(this_slices[i]);
}
}
i = j;
} else
++ i;
}
}
for (size_t i = 0; i < merge.size(); ++ i)
if (merge[i])
out[i] = union_ex(out[i]);
}
}
}
return out;
}
std::vector<ExPolygons> PrintObject::slice_support_volumes(const ModelVolumeType &model_volume_type) const
{
std::vector<const ModelVolume*> volumes;
for (const ModelVolume *volume : this->model_object()->volumes)
if (volume->type() == model_volume_type)
volumes.emplace_back(volume);
std::vector<float> zs;
zs.reserve(this->layers().size());
for (const Layer *l : this->layers())
zs.emplace_back((float)l->slice_z);
return this->slice_volumes(zs, SlicingMode::Regular, volumes);
}
//FIXME The admesh repair function may break the face connectivity, rather refresh it here as the slicing code relies on it.
static void fix_mesh_connectivity(TriangleMesh &mesh)
{
auto nr_degenerated = mesh.stl.stats.degenerate_facets;
stl_check_facets_exact(&mesh.stl);
if (nr_degenerated != mesh.stl.stats.degenerate_facets)
// stl_check_facets_exact() removed some newly degenerated faces. Some faces could become degenerate after some mesh transformation.
stl_generate_shared_vertices(&mesh.stl, mesh.its);
}
std::vector<ExPolygons> PrintObject::slice_volumes(
const std::vector<float> &z,
SlicingMode mode, size_t slicing_mode_normal_below_layer, SlicingMode mode_below,
const std::vector<const ModelVolume*> &volumes) const
{
std::vector<ExPolygons> layers;
if (! volumes.empty()) {
// Compose mesh.
//FIXME better to perform slicing over each volume separately and then to use a Boolean operation to merge them.
TriangleMesh mesh(volumes.front()->mesh());
mesh.transform(volumes.front()->get_matrix(), true);
assert(mesh.repaired);
if (volumes.size() == 1 && mesh.repaired)
fix_mesh_connectivity(mesh);
for (size_t idx_volume = 1; idx_volume < volumes.size(); ++ idx_volume) {
const ModelVolume &model_volume = *volumes[idx_volume];
TriangleMesh vol_mesh(model_volume.mesh());
vol_mesh.transform(model_volume.get_matrix(), true);
mesh.merge(vol_mesh);
}
if (mesh.stl.stats.number_of_facets > 0) {
mesh.transform(m_trafo, true);
// apply XY shift
mesh.translate(- unscale<float>(m_center_offset.x()), - unscale<float>(m_center_offset.y()), 0);
// perform actual slicing
const Print *print = this->print();
auto callback = TriangleMeshSlicer::throw_on_cancel_callback_type([print](){print->throw_if_canceled();});
// TriangleMeshSlicer needs shared vertices, also this calls the repair() function.
mesh.require_shared_vertices();
TriangleMeshSlicer mslicer;
mslicer.init(&mesh, callback);
mslicer.slice(z, mode, slicing_mode_normal_below_layer, mode_below, float(m_config.slice_closing_radius.value), &layers, callback);
m_print->throw_if_canceled();
}
}
return layers;
}
std::vector<ExPolygons> PrintObject::slice_volume(const std::vector<float> &z, SlicingMode mode, const ModelVolume &volume) const
{
std::vector<ExPolygons> layers;
if (! z.empty()) {
// Compose mesh.
//FIXME better to split the mesh into separate shells, perform slicing over each shell separately and then to use a Boolean operation to merge them.
TriangleMesh mesh(volume.mesh());
mesh.transform(volume.get_matrix(), true);
if (mesh.repaired)
fix_mesh_connectivity(mesh);
if (mesh.stl.stats.number_of_facets > 0) {
mesh.transform(m_trafo, true);
// apply XY shift
mesh.translate(- unscale<float>(m_center_offset.x()), - unscale<float>(m_center_offset.y()), 0);
// perform actual slicing
TriangleMeshSlicer mslicer;
const Print *print = this->print();
auto callback = TriangleMeshSlicer::throw_on_cancel_callback_type([print](){print->throw_if_canceled();});
// TriangleMeshSlicer needs the shared vertices.
mesh.require_shared_vertices();
mslicer.init(&mesh, callback);
mslicer.slice(z, mode, float(m_config.slice_closing_radius.value), &layers, callback);
m_print->throw_if_canceled();
}
}
return layers;
}
// Filter the zs not inside the ranges. The ranges are closed at the bottom and open at the top, they are sorted lexicographically and non overlapping.
std::vector<ExPolygons> PrintObject::slice_volume(const std::vector<float> &z, const std::vector<t_layer_height_range> &ranges, SlicingMode mode, const ModelVolume &volume) const
{
std::vector<ExPolygons> out;
if (! z.empty() && ! ranges.empty()) {
if (ranges.size() == 1 && z.front() >= ranges.front().first && z.back() < ranges.front().second) {
// All layers fit into a single range.
out = this->slice_volume(z, mode, volume);
} else {
std::vector<float> z_filtered;
std::vector<std::pair<size_t, size_t>> n_filtered;
z_filtered.reserve(z.size());
n_filtered.reserve(2 * ranges.size());
size_t i = 0;
for (const t_layer_height_range &range : ranges) {
for (; i < z.size() && z[i] < range.first; ++ i) ;
size_t first = i;
for (; i < z.size() && z[i] < range.second; ++ i)
z_filtered.emplace_back(z[i]);
if (i > first)
n_filtered.emplace_back(std::make_pair(first, i));
}
if (! n_filtered.empty()) {
std::vector<ExPolygons> layers = this->slice_volume(z_filtered, mode, volume);
out.assign(z.size(), ExPolygons());
i = 0;
for (const std::pair<size_t, size_t> &span : n_filtered)
for (size_t j = span.first; j < span.second; ++ j)
out[j] = std::move(layers[i ++]);
}
}
}
return out;
}
std::string PrintObject::_fix_slicing_errors()
{
// Collect layers with slicing errors.
// These layers will be fixed in parallel.
std::vector<size_t> buggy_layers;
buggy_layers.reserve(m_layers.size());
for (size_t idx_layer = 0; idx_layer < m_layers.size(); ++ idx_layer)
if (m_layers[idx_layer]->slicing_errors)
buggy_layers.push_back(idx_layer);
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - fixing slicing errors in parallel - begin";
tbb::parallel_for(
tbb::blocked_range<size_t>(0, buggy_layers.size()),
[this, &buggy_layers](const tbb::blocked_range<size_t>& range) {
for (size_t buggy_layer_idx = range.begin(); buggy_layer_idx < range.end(); ++ buggy_layer_idx) {
m_print->throw_if_canceled();
size_t idx_layer = buggy_layers[buggy_layer_idx];
Layer *layer = m_layers[idx_layer];
assert(layer->slicing_errors);
// Try to repair the layer surfaces by merging all contours and all holes from neighbor layers.
// BOOST_LOG_TRIVIAL(trace) << "Attempting to repair layer" << idx_layer;
for (size_t region_id = 0; region_id < layer->m_regions.size(); ++ region_id) {
LayerRegion *layerm = layer->m_regions[region_id];
// Find the first valid layer below / above the current layer.
const Surfaces *upper_surfaces = nullptr;
const Surfaces *lower_surfaces = nullptr;
for (size_t j = idx_layer + 1; j < m_layers.size(); ++ j)
if (! m_layers[j]->slicing_errors) {
upper_surfaces = &m_layers[j]->regions()[region_id]->slices.surfaces;
break;
}
for (int j = int(idx_layer) - 1; j >= 0; -- j)
if (! m_layers[j]->slicing_errors) {
lower_surfaces = &m_layers[j]->regions()[region_id]->slices.surfaces;
break;
}
// Collect outer contours and holes from the valid layers above & below.
Polygons outer;
outer.reserve(
((upper_surfaces == nullptr) ? 0 : upper_surfaces->size()) +
((lower_surfaces == nullptr) ? 0 : lower_surfaces->size()));
size_t num_holes = 0;
if (upper_surfaces)
for (const auto &surface : *upper_surfaces) {
outer.push_back(surface.expolygon.contour);
num_holes += surface.expolygon.holes.size();
}
if (lower_surfaces)
for (const auto &surface : *lower_surfaces) {
outer.push_back(surface.expolygon.contour);
num_holes += surface.expolygon.holes.size();
}
Polygons holes;
holes.reserve(num_holes);
if (upper_surfaces)
for (const auto &surface : *upper_surfaces)
polygons_append(holes, surface.expolygon.holes);
if (lower_surfaces)
for (const auto &surface : *lower_surfaces)
polygons_append(holes, surface.expolygon.holes);
layerm->slices.set(diff_ex(union_(outer), holes, false), stInternal);
}
// Update layer slices after repairing the single regions.
layer->make_slices();
}
});
m_print->throw_if_canceled();
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - fixing slicing errors in parallel - end";
// remove empty layers from bottom
while (! m_layers.empty() && (m_layers.front()->lslices.empty() || m_layers.front()->empty())) {
delete m_layers.front();
m_layers.erase(m_layers.begin());
m_layers.front()->lower_layer = nullptr;
for (size_t i = 0; i < m_layers.size(); ++ i)
m_layers[i]->set_id(m_layers[i]->id() - 1);
}
return buggy_layers.empty() ? "" :
"The model has overlapping or self-intersecting facets. I tried to repair it, "
"however you might want to check the results or repair the input file and retry.\n";
}
// Simplify the sliced model, if "resolution" configuration parameter > 0.
// The simplification is problematic, because it simplifies the slices independent from each other,
// which makes the simplified discretization visible on the object surface.
void PrintObject::simplify_slices(double distance)
{
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - siplifying slices in parallel - begin";
tbb::parallel_for(
tbb::blocked_range<size_t>(0, m_layers.size()),
[this, distance](const tbb::blocked_range<size_t>& range) {
for (size_t layer_idx = range.begin(); layer_idx < range.end(); ++ layer_idx) {
m_print->throw_if_canceled();
Layer *layer = m_layers[layer_idx];
for (size_t region_idx = 0; region_idx < layer->m_regions.size(); ++ region_idx)
layer->m_regions[region_idx]->slices.simplify(distance);
{
ExPolygons simplified;
for (const ExPolygon &expoly : layer->lslices)
expoly.simplify(distance, &simplified);
layer->lslices = std::move(simplified);
}
}
});
BOOST_LOG_TRIVIAL(debug) << "Slicing objects - siplifying slices in parallel - end";
}
=======
>>>>>>> master
// Only active if config->infill_only_where_needed. This step trims the sparse infill, // Only active if config->infill_only_where_needed. This step trims the sparse infill,
// so it acts as an internal support. It maintains all other infill types intact. // so it acts as an internal support. It maintains all other infill types intact.
// Here the internal surfaces and perimeters have to be supported by the sparse infill. // Here the internal surfaces and perimeters have to be supported by the sparse infill.

View File

@ -1766,10 +1766,6 @@ static inline std::pair<double, size_t> minimum_crossover_cost(
return std::make_pair(cost_min, flip_min); return std::make_pair(cost_min, flip_min);
} }
<<<<<<< HEAD
#if 0
=======
>>>>>>> master
// Currently not used, too slow. // Currently not used, too slow.
static inline void reorder_by_three_exchanges_with_segment_flipping2(std::vector<FlipEdge> &edges) static inline void reorder_by_three_exchanges_with_segment_flipping2(std::vector<FlipEdge> &edges)
{ {

View File

@ -47,14 +47,4 @@
#define ENABLE_Z_OFFSET_CORRECTION (1 && ENABLE_2_4_1_RC) #define ENABLE_Z_OFFSET_CORRECTION (1 && ENABLE_2_4_1_RC)
//====================
// 2.3.1.alpha1 techs
//====================
#define ENABLE_2_3_1_ALPHA1 1
#define ENABLE_SPLITTED_VERTEX_BUFFER (1 && ENABLE_2_3_1_ALPHA1)
#define ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS (1 && ENABLE_SPLITTED_VERTEX_BUFFER)
#endif // _prusaslicer_technologies_h_ #endif // _prusaslicer_technologies_h_

View File

@ -567,11 +567,7 @@ bool copy_file_linux(const boost::filesystem::path &from, const boost::filesyste
err = errno; err = errno;
goto fail; goto fail;
} }
<<<<<<< HEAD
=======
>>>>>>> master
const mode_t from_mode = from_stat.st_mode; const mode_t from_mode = from_stat.st_mode;
if (!S_ISREG(from_mode)) { if (!S_ISREG(from_mode)) {
err = ENOSYS; err = ENOSYS;
@ -648,10 +644,7 @@ bool copy_file_linux(const boost::filesystem::path &from, const boost::filesyste
offset += sz; offset += sz;
} }
} }
<<<<<<< HEAD
=======
>>>>>>> master
// If we created a new file with an explicitly added S_IWUSR permission, // If we created a new file with an explicitly added S_IWUSR permission,
// we may need to update its mode bits to match the source file. // we may need to update its mode bits to match the source file.
if (to_mode != from_mode && ::fchmod(outfile.fd, from_mode) != 0) { if (to_mode != from_mode && ::fchmod(outfile.fd, from_mode) != 0) {
@ -993,10 +986,7 @@ unsigned get_current_pid()
#endif #endif
} }
<<<<<<< HEAD
=======
//FIXME this has potentially O(n^2) time complexity! //FIXME this has potentially O(n^2) time complexity!
>>>>>>> master
std::string xml_escape(std::string text, bool is_marked/* = false*/) std::string xml_escape(std::string text, bool is_marked/* = false*/)
{ {
std::string::size_type pos = 0; std::string::size_type pos = 0;

View File

@ -22,10 +22,7 @@
#include "../GUI/GUI_App.hpp" #include "../GUI/GUI_App.hpp"
#include "../GUI/I18N.hpp" #include "../GUI/I18N.hpp"
#include "../GUI/MainFrame.hpp" #include "../GUI/MainFrame.hpp"
<<<<<<< HEAD
=======
#include "../GUI/MsgDialog.hpp" #include "../GUI/MsgDialog.hpp"
>>>>>>> master
#include <wx/richmsgdlg.h> #include <wx/richmsgdlg.h>
@ -589,15 +586,6 @@ const Snapshot* take_config_snapshot_report_error(const AppConfig &app_config, S
} }
} }
<<<<<<< HEAD
bool take_config_snapshot_cancel_on_error(const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment, const std::string &message)
{
try {
SnapshotDB::singleton().take_snapshot(app_config, reason, comment);
return true;
} catch (std::exception &err) {
wxRichMessageDialog dlg(static_cast<wxWindow*>(wxGetApp().mainframe),
=======
bool take_config_snapshot_cancel_on_error(const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment, const std::string &message, Snapshot const **psnapshot) bool take_config_snapshot_cancel_on_error(const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment, const std::string &message, Snapshot const **psnapshot)
{ {
try { try {
@ -607,7 +595,6 @@ bool take_config_snapshot_cancel_on_error(const AppConfig &app_config, Snapshot:
return true; return true;
} catch (std::exception &err) { } catch (std::exception &err) {
RichMessageDialog dlg(static_cast<wxWindow*>(wxGetApp().mainframe), RichMessageDialog dlg(static_cast<wxWindow*>(wxGetApp().mainframe),
>>>>>>> master
_L("PrusaSlicer has encountered an error while taking a configuration snapshot.") + "\n\n" + from_u8(err.what()) + "\n\n" + from_u8(message), _L("PrusaSlicer has encountered an error while taking a configuration snapshot.") + "\n\n" + from_u8(err.what()) + "\n\n" + from_u8(message),
_L("PrusaSlicer error"), _L("PrusaSlicer error"),
wxYES_NO); wxYES_NO);

View File

@ -132,11 +132,7 @@ const Snapshot* take_config_snapshot_report_error(const AppConfig &app_config, S
// Take snapshot on SnapshotDB::singleton(). If taking snapshot fails, report "message", and present a "Continue" or "Abort" buttons to respond. // Take snapshot on SnapshotDB::singleton(). If taking snapshot fails, report "message", and present a "Continue" or "Abort" buttons to respond.
// Return true on success and on "Continue" to continue with the process (for example installation of presets). // Return true on success and on "Continue" to continue with the process (for example installation of presets).
<<<<<<< HEAD
bool take_config_snapshot_cancel_on_error(const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment, const std::string &message);
=======
bool take_config_snapshot_cancel_on_error(const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment, const std::string &message, Snapshot const **psnapshot = nullptr); bool take_config_snapshot_cancel_on_error(const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment, const std::string &message, Snapshot const **psnapshot = nullptr);
>>>>>>> master
} // namespace Config } // namespace Config
} // namespace GUI } // namespace GUI

View File

@ -74,10 +74,7 @@ bool Bundle::load(fs::path source_path, bool ais_in_resources, bool ais_prusa_bu
// Throw when parsing invalid configuration. Only valid configuration is supposed to be provided over the air. // Throw when parsing invalid configuration. Only valid configuration is supposed to be provided over the air.
auto [config_substitutions, presets_loaded] = preset_bundle->load_configbundle( auto [config_substitutions, presets_loaded] = preset_bundle->load_configbundle(
path_string, PresetBundle::LoadConfigBundleAttribute::LoadSystem, ForwardCompatibilitySubstitutionRule::Disable); path_string, PresetBundle::LoadConfigBundleAttribute::LoadSystem, ForwardCompatibilitySubstitutionRule::Disable);
<<<<<<< HEAD
=======
UNUSED(config_substitutions); UNUSED(config_substitutions);
>>>>>>> master
// No substitutions shall be reported when loading a system config bundle, no substitutions are allowed. // No substitutions shall be reported when loading a system config bundle, no substitutions are allowed.
assert(config_substitutions.empty()); assert(config_substitutions.empty());
auto first_vendor = preset_bundle->vendors.begin(); auto first_vendor = preset_bundle->vendors.begin();
@ -2493,9 +2490,6 @@ bool ConfigWizard::priv::check_and_install_missing_materials(Technology technolo
return true; return true;
} }
<<<<<<< HEAD
bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater)
=======
static std::set<std::string> get_new_added_presets(const std::map<std::string, std::string>& old_data, const std::map<std::string, std::string>& new_data) static std::set<std::string> get_new_added_presets(const std::map<std::string, std::string>& old_data, const std::map<std::string, std::string>& new_data)
{ {
auto get_aliases = [](const std::map<std::string, std::string>& data) { auto get_aliases = [](const std::map<std::string, std::string>& data) {
@ -2525,7 +2519,6 @@ static std::string get_first_added_preset(const std::map<std::string, std::strin
} }
bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater, bool& apply_keeped_changes) bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater, bool& apply_keeped_changes)
>>>>>>> master
{ {
wxString header, caption = _L("Configuration is edited in ConfigWizard"); wxString header, caption = _L("Configuration is edited in ConfigWizard");
const auto enabled_vendors = appconfig_new.vendors(); const auto enabled_vendors = appconfig_new.vendors();
@ -2629,15 +2622,11 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
break; break;
} }
<<<<<<< HEAD
if (snapshot && ! take_config_snapshot_cancel_on_error(*app_config, snapshot_reason, "", _u8L("Continue with applying configuration changes?")))
=======
if (snapshot && ! take_config_snapshot_cancel_on_error(*app_config, snapshot_reason, "", _u8L("Do you want to continue changing the configuration?"))) if (snapshot && ! take_config_snapshot_cancel_on_error(*app_config, snapshot_reason, "", _u8L("Do you want to continue changing the configuration?")))
return false; return false;
if (check_unsaved_preset_changes && if (check_unsaved_preset_changes &&
!wxGetApp().check_and_keep_current_preset_changes(caption, header, act_btns, &apply_keeped_changes)) !wxGetApp().check_and_keep_current_preset_changes(caption, header, act_btns, &apply_keeped_changes))
>>>>>>> master
return false; return false;
if (install_bundles.size() > 0) { if (install_bundles.size() > 0) {
@ -2778,31 +2767,11 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
preset_bundle->load_presets(*app_config, ForwardCompatibilitySubstitutionRule::EnableSilentDisableSystem, preset_bundle->load_presets(*app_config, ForwardCompatibilitySubstitutionRule::EnableSilentDisableSystem,
{preferred_model, preferred_variant, first_added_filament, first_added_sla_material}); {preferred_model, preferred_variant, first_added_filament, first_added_sla_material});
<<<<<<< HEAD
const auto config = enabled_vendors.find(bundle.first);
if (config == enabled_vendors.end()) { continue; }
for (const auto &model : bundle.second.vendor_profile->models) {
const auto model_it = config->second.find(model.id);
if (model_it != config->second.end() && model_it->second.size() > 0) {
preferred_model = model.id;
break;
}
}
}
}
// Reloading the configs after some modifications were done to PrusaSlicer.ini.
// Just perform the substitutions silently, as the substitutions were already presented to the user on application start-up
// and the Wizard shall not create any new values that would require substitution.
// Throw on substitutions in system profiles, as the system profiles provided over the air should be compatible with this PrusaSlicer version.
preset_bundle->load_presets(*app_config, ForwardCompatibilitySubstitutionRule::EnableSilentDisableSystem, preferred_model);
=======
if (!only_sla_mode && page_custom->custom_wanted()) { if (!only_sla_mode && page_custom->custom_wanted()) {
// if unsaved changes was not cheched till this moment // if unsaved changes was not cheched till this moment
if (!check_unsaved_preset_changes && if (!check_unsaved_preset_changes &&
!wxGetApp().check_and_keep_current_preset_changes(caption, _L("Custom printer was installed and it will be activated."), act_btns, &apply_keeped_changes)) !wxGetApp().check_and_keep_current_preset_changes(caption, _L("Custom printer was installed and it will be activated."), act_btns, &apply_keeped_changes))
return false; return false;
>>>>>>> master
page_firmware->apply_custom_config(*custom_config); page_firmware->apply_custom_config(*custom_config);
page_bed->apply_custom_config(*custom_config); page_bed->apply_custom_config(*custom_config);
@ -2815,12 +2784,6 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
// Update the selections from the compatibilty. // Update the selections from the compatibilty.
preset_bundle->export_selections(*app_config); preset_bundle->export_selections(*app_config);
<<<<<<< HEAD
return true;
}
=======
>>>>>>> master
return true; return true;
} }
@ -3045,10 +3008,6 @@ bool ConfigWizard::run(RunReason reason, StartPage start_page)
p->set_start_page(start_page); p->set_start_page(start_page);
if (ShowModal() == wxID_OK) { if (ShowModal() == wxID_OK) {
<<<<<<< HEAD
if (! p->apply_config(app.app_config, app.preset_bundle, app.preset_updater))
return false;
=======
bool apply_keeped_changes = false; bool apply_keeped_changes = false;
if (! p->apply_config(app.app_config, app.preset_bundle, app.preset_updater, apply_keeped_changes)) if (! p->apply_config(app.app_config, app.preset_bundle, app.preset_updater, apply_keeped_changes))
return false; return false;
@ -3056,7 +3015,6 @@ bool ConfigWizard::run(RunReason reason, StartPage start_page)
if (apply_keeped_changes) if (apply_keeped_changes)
app.apply_keeped_preset_modifications(); app.apply_keeped_preset_modifications();
>>>>>>> master
app.app_config->set_legacy_datadir(false); app.app_config->set_legacy_datadir(false);
app.update_mode(); app.update_mode();
app.obj_manipul()->update_ui_from_settings(); app.obj_manipul()->update_ui_from_settings();

View File

@ -616,11 +616,7 @@ struct ConfigWizard::priv
bool on_bnt_finish(); bool on_bnt_finish();
bool check_and_install_missing_materials(Technology technology, const std::string &only_for_model_id = std::string()); bool check_and_install_missing_materials(Technology technology, const std::string &only_for_model_id = std::string());
<<<<<<< HEAD
bool apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater);
=======
bool apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater, bool& apply_keeped_changes); bool apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater, bool& apply_keeped_changes);
>>>>>>> master
// #ys_FIXME_alise // #ys_FIXME_alise
void update_presets_in_config(const std::string& section, const std::string& alias_key, bool add); void update_presets_in_config(const std::string& section, const std::string& alias_key, bool add);
#ifdef __linux__ #ifdef __linux__

View File

@ -174,11 +174,8 @@ void Control::msw_rescale()
void Control::sys_color_changed() void Control::sys_color_changed()
{ {
<<<<<<< HEAD
=======
GUI::wxGetApp().UpdateDarkUI(GetParent()); GUI::wxGetApp().UpdateDarkUI(GetParent());
>>>>>>> master
m_bmp_add_tick_on .msw_rescale(); m_bmp_add_tick_on .msw_rescale();
m_bmp_add_tick_off.msw_rescale(); m_bmp_add_tick_off.msw_rescale();
m_bmp_del_tick_on .msw_rescale(); m_bmp_del_tick_on .msw_rescale();
@ -757,11 +754,7 @@ wxString Control::get_label(int tick, LabelType label_type/* = ltHeightWithLayer
}; };
if (m_draw_mode == dmSequentialGCodeView) if (m_draw_mode == dmSequentialGCodeView)
<<<<<<< HEAD
return wxString::Format("%lu", static_cast<unsigned long>(m_values[value]));
=======
return wxString::Format("%lu", static_cast<unsigned long>(m_alternate_values[value])); return wxString::Format("%lu", static_cast<unsigned long>(m_alternate_values[value]));
>>>>>>> master
else { else {
if (label_type == ltEstimatedTime) { if (label_type == ltEstimatedTime) {
if (m_is_wipe_tower) { if (m_is_wipe_tower) {

View File

@ -322,20 +322,11 @@ wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelR
#ifdef __linux__ #ifdef __linux__
c_editor->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent& evt) { c_editor->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent& evt) {
<<<<<<< HEAD
evt.StopPropagation();
#ifdef __linux__
// FinishEditing grabs new selection and triggers config update. We better call
// it explicitly, automatic update on KILL_FOCUS didn't work on Linux.
this->FinishEditing();
#endif
=======
// to avoid event propagation to other sidebar items // to avoid event propagation to other sidebar items
evt.StopPropagation(); evt.StopPropagation();
// FinishEditing grabs new selection and triggers config update. We better call // FinishEditing grabs new selection and triggers config update. We better call
// it explicitly, automatic update on KILL_FOCUS didn't work on Linux. // it explicitly, automatic update on KILL_FOCUS didn't work on Linux.
this->FinishEditing(); this->FinishEditing();
>>>>>>> master
}); });
#else #else
// to avoid event propagation to other sidebar items // to avoid event propagation to other sidebar items

View File

@ -1234,31 +1234,12 @@ boost::any& Choice::get_value()
if (m_opt.type == coEnum) if (m_opt.type == coEnum)
{ {
<<<<<<< HEAD
int ret_enum = field->GetSelection();
if (m_opt_id.compare("host_type") == 0 &&
m_opt.enum_values.size() > field->GetCount()) // for case, when PrusaLink isn't used as a HostType
ret_enum++;
if (m_opt_id == "top_fill_pattern" || m_opt_id == "bottom_fill_pattern" || m_opt_id == "fill_pattern")
{
if (!m_opt.enum_values.empty()) {
std::string key = m_opt.enum_values[ret_enum];
t_config_enum_values map_names = ConfigOptionEnum<InfillPattern>::get_enum_values();
int value = map_names.at(key);
m_value = static_cast<InfillPattern>(value);
}
else
m_value = static_cast<InfillPattern>(0);
=======
if (m_opt_id.compare("host_type") == 0 && m_opt.enum_values.size() > field->GetCount()) { if (m_opt_id.compare("host_type") == 0 && m_opt.enum_values.size() > field->GetCount()) {
// for case, when PrusaLink isn't used as a HostType // for case, when PrusaLink isn't used as a HostType
m_value = field->GetSelection()+1; m_value = field->GetSelection()+1;
} else if (m_opt_id == "top_fill_pattern" || m_opt_id == "bottom_fill_pattern" || m_opt_id == "fill_pattern") { } else if (m_opt_id == "top_fill_pattern" || m_opt_id == "bottom_fill_pattern" || m_opt_id == "fill_pattern") {
const std::string& key = m_opt.enum_values[field->GetSelection()]; const std::string& key = m_opt.enum_values[field->GetSelection()];
m_value = int(ConfigOptionEnum<InfillPattern>::get_enum_values().at(key)); m_value = int(ConfigOptionEnum<InfillPattern>::get_enum_values().at(key));
>>>>>>> master
} }
else else
m_value = field->GetSelection(); m_value = field->GetSelection();

File diff suppressed because it is too large Load Diff

View File

@ -21,25 +21,11 @@ namespace GUI {
class GCodeViewer class GCodeViewer
{ {
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
using IBufferType = unsigned short;
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
using Color = std::array<float, 3>;
using VertexBuffer = std::vector<float>;
#if ENABLE_SPLITTED_VERTEX_BUFFER
using MultiVertexBuffer = std::vector<VertexBuffer>;
using IndexBuffer = std::vector<IBufferType>;
#else
using IndexBuffer = std::vector<unsigned int>;
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
using IBufferType = unsigned short; using IBufferType = unsigned short;
using Color = std::array<float, 4>; using Color = std::array<float, 4>;
using VertexBuffer = std::vector<float>; using VertexBuffer = std::vector<float>;
using MultiVertexBuffer = std::vector<VertexBuffer>; using MultiVertexBuffer = std::vector<VertexBuffer>;
using IndexBuffer = std::vector<IBufferType>; using IndexBuffer = std::vector<IBufferType>;
>>>>>>> master
using MultiIndexBuffer = std::vector<IndexBuffer>; using MultiIndexBuffer = std::vector<IndexBuffer>;
using InstanceBuffer = std::vector<float>; using InstanceBuffer = std::vector<float>;
using InstanceIdBuffer = std::vector<size_t>; using InstanceIdBuffer = std::vector<size_t>;
@ -77,45 +63,22 @@ class GCodeViewer
}; };
EFormat format{ EFormat::Position }; EFormat format{ EFormat::Position };
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
=======
>>>>>>> master
// vbos id // vbos id
std::vector<unsigned int> vbos; std::vector<unsigned int> vbos;
// sizes of the buffers, in bytes, used in export to obj // sizes of the buffers, in bytes, used in export to obj
std::vector<size_t> sizes; std::vector<size_t> sizes;
<<<<<<< HEAD
#else
// vbo id
unsigned int id{ 0 };
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
>>>>>>> master
// count of vertices, updated after data are sent to gpu // count of vertices, updated after data are sent to gpu
size_t count{ 0 }; size_t count{ 0 };
size_t data_size_bytes() const { return count * vertex_size_bytes(); } size_t data_size_bytes() const { return count * vertex_size_bytes(); }
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
// We set 65536 as max count of vertices inside a vertex buffer to allow // We set 65536 as max count of vertices inside a vertex buffer to allow
// to use unsigned short in place of unsigned int for indices in the index buffer, to save memory // to use unsigned short in place of unsigned int for indices in the index buffer, to save memory
size_t max_size_bytes() const { return 65536 * vertex_size_bytes(); } size_t max_size_bytes() const { return 65536 * vertex_size_bytes(); }
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
// We set 65536 as max count of vertices inside a vertex buffer to allow
// to use unsigned short in place of unsigned int for indices in the index buffer, to save memory
size_t max_size_bytes() const { return 65536 * vertex_size_bytes(); }
>>>>>>> master
size_t vertex_size_floats() const { return position_size_floats() + normal_size_floats(); } size_t vertex_size_floats() const { return position_size_floats() + normal_size_floats(); }
size_t vertex_size_bytes() const { return vertex_size_floats() * sizeof(float); } size_t vertex_size_bytes() const { return vertex_size_floats() * sizeof(float); }
size_t position_offset_floats() const { return 0; } size_t position_offset_floats() const { return 0; }
<<<<<<< HEAD
size_t position_offset_size() const { return position_offset_floats() * sizeof(float); }
size_t position_size_floats() const {
=======
size_t position_offset_bytes() const { return position_offset_floats() * sizeof(float); } size_t position_offset_bytes() const { return position_offset_floats() * sizeof(float); }
size_t position_size_floats() const { return 3; } size_t position_size_floats() const { return 3; }
@ -128,33 +91,15 @@ class GCodeViewer
size_t normal_offset_bytes() const { return normal_offset_floats() * sizeof(float); } size_t normal_offset_bytes() const { return normal_offset_floats() * sizeof(float); }
size_t normal_size_floats() const { size_t normal_size_floats() const {
>>>>>>> master
switch (format) switch (format)
{ {
case EFormat::PositionNormal1: { return 1; } case EFormat::PositionNormal1: { return 1; }
case EFormat::PositionNormal3: { return 3; } case EFormat::PositionNormal3: { return 3; }
<<<<<<< HEAD
case EFormat::PositionNormal1: { return 4; }
=======
>>>>>>> master
default: { return 0; } default: { return 0; }
} }
} }
size_t normal_size_bytes() const { return normal_size_floats() * sizeof(float); } size_t normal_size_bytes() const { return normal_size_floats() * sizeof(float); }
<<<<<<< HEAD
size_t normal_offset_floats() const {
switch (format)
{
case EFormat::Position:
case EFormat::PositionNormal1: { return 0; }
case EFormat::PositionNormal3: { return 3; }
default: { return 0; }
}
}
size_t normal_offset_size() const { return normal_offset_floats() * sizeof(float); }
size_t normal_size_floats() const {
=======
void reset(); void reset();
}; };
@ -203,7 +148,6 @@ class GCodeViewer
size_t data_size_bytes() const { return s_ids.size() * instance_size_bytes(); } size_t data_size_bytes() const { return s_ids.size() * instance_size_bytes(); }
size_t instance_size_floats() const { size_t instance_size_floats() const {
>>>>>>> master
switch (format) switch (format)
{ {
case EFormat::InstancedModel: { return 5; } case EFormat::InstancedModel: { return 5; }
@ -219,22 +163,10 @@ class GCodeViewer
// ibo buffer containing indices data (for lines/triangles) used to render a specific toolpath type // ibo buffer containing indices data (for lines/triangles) used to render a specific toolpath type
struct IBuffer struct IBuffer
{ {
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
// id of the associated vertex buffer // id of the associated vertex buffer
unsigned int vbo{ 0 }; unsigned int vbo{ 0 };
// ibo id // ibo id
unsigned int ibo{ 0 }; unsigned int ibo{ 0 };
#else
// ibo id
unsigned int id{ 0 };
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
// id of the associated vertex buffer
unsigned int vbo{ 0 };
// ibo id
unsigned int ibo{ 0 };
>>>>>>> master
// count of indices, updated after data are sent to gpu // count of indices, updated after data are sent to gpu
size_t count{ 0 }; size_t count{ 0 };
@ -258,10 +190,6 @@ class GCodeViewer
Vec3f position{ Vec3f::Zero() }; Vec3f position{ Vec3f::Zero() };
}; };
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
=======
>>>>>>> master
struct Sub_Path struct Sub_Path
{ {
Endpoint first; Endpoint first;
@ -271,20 +199,9 @@ class GCodeViewer
return first.s_id <= s_id && s_id <= last.s_id; return first.s_id <= s_id && s_id <= last.s_id;
} }
}; };
<<<<<<< HEAD
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
EMoveType type{ EMoveType::Noop }; EMoveType type{ EMoveType::Noop };
ExtrusionRole role{ erNone }; ExtrusionRole role{ erNone };
#if !ENABLE_SPLITTED_VERTEX_BUFFER
Endpoint first;
Endpoint last;
#endif // !ENABLE_SPLITTED_VERTEX_BUFFER
=======
EMoveType type{ EMoveType::Noop };
ExtrusionRole role{ erNone };
>>>>>>> master
float delta_extruder{ 0.0f }; float delta_extruder{ 0.0f };
float height{ 0.0f }; float height{ 0.0f };
float width{ 0.0f }; float width{ 0.0f };
@ -294,18 +211,9 @@ class GCodeViewer
float volumetric_rate{ 0.0f }; float volumetric_rate{ 0.0f };
unsigned char extruder_id{ 0 }; unsigned char extruder_id{ 0 };
unsigned char cp_color_id{ 0 }; unsigned char cp_color_id{ 0 };
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
std::vector<Sub_Path> sub_paths;
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
bool matches(const GCodeProcessor::MoveVertex& move) const;
#if ENABLE_SPLITTED_VERTEX_BUFFER
=======
std::vector<Sub_Path> sub_paths; std::vector<Sub_Path> sub_paths;
bool matches(const GCodeProcessorResult::MoveVertex& move) const; bool matches(const GCodeProcessorResult::MoveVertex& move) const;
>>>>>>> master
size_t vertices_count() const { size_t vertices_count() const {
return sub_paths.empty() ? 0 : sub_paths.back().last.s_id - sub_paths.front().first.s_id + 1; return sub_paths.empty() ? 0 : sub_paths.back().last.s_id - sub_paths.front().first.s_id + 1;
} }
@ -323,35 +231,17 @@ class GCodeViewer
return -1; return -1;
} }
} }
<<<<<<< HEAD
void add_sub_path(const GCodeProcessor::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id) {
Endpoint endpoint = { b_id, i_id, s_id, move.position };
sub_paths.push_back({ endpoint , endpoint });
}
#else
size_t vertices_count() const { return last.s_id - first.s_id + 1; }
bool contains(size_t id) const { return first.s_id <= id && id <= last.s_id; }
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
void add_sub_path(const GCodeProcessorResult::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id) { void add_sub_path(const GCodeProcessorResult::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id) {
Endpoint endpoint = { b_id, i_id, s_id, move.position }; Endpoint endpoint = { b_id, i_id, s_id, move.position };
sub_paths.push_back({ endpoint , endpoint }); sub_paths.push_back({ endpoint , endpoint });
} }
>>>>>>> master
}; };
// Used to batch the indices needed to render the paths // Used to batch the indices needed to render the paths
struct RenderPath struct RenderPath
{ {
<<<<<<< HEAD
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
// Index of the parent tbuffer // Index of the parent tbuffer
unsigned char tbuffer_id; unsigned char tbuffer_id;
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
=======
// Index of the parent tbuffer
unsigned char tbuffer_id;
>>>>>>> master
// Render path property // Render path property
Color color; Color color;
// Index of the buffer in TBuffer::indices // Index of the buffer in TBuffer::indices
@ -361,10 +251,6 @@ class GCodeViewer
unsigned int path_id; unsigned int path_id;
std::vector<unsigned int> sizes; std::vector<unsigned int> sizes;
std::vector<size_t> offsets; // use size_t because we need an unsigned integer whose size matches pointer's size (used in the call glMultiDrawElements()) std::vector<size_t> offsets; // use size_t because we need an unsigned integer whose size matches pointer's size (used in the call glMultiDrawElements())
<<<<<<< HEAD
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
=======
>>>>>>> master
bool contains(size_t offset) const { bool contains(size_t offset) const {
for (size_t i = 0; i < offsets.size(); ++i) { for (size_t i = 0; i < offsets.size(); ++i) {
if (offsets[i] <= offset && offset <= offsets[i] + static_cast<size_t>(sizes[i] * sizeof(IBufferType))) if (offsets[i] <= offset && offset <= offsets[i] + static_cast<size_t>(sizes[i] * sizeof(IBufferType)))
@ -372,27 +258,11 @@ class GCodeViewer
} }
return false; return false;
} }
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
}; };
// // for unordered_set implementation of render_paths
// struct RenderPathPropertyHash {
// size_t operator() (const RenderPath &p) const {
// // Convert the RGB value to an integer hash.
//// return (size_t(int(p.color[0] * 255) + 255 * int(p.color[1] * 255) + (255 * 255) * int(p.color[2] * 255)) * 7919) ^ size_t(p.ibuffer_id);
// return size_t(int(p.color[0] * 255) + 255 * int(p.color[1] * 255) + (255 * 255) * int(p.color[2] * 255)) ^ size_t(p.ibuffer_id);
// }
// };
struct RenderPathPropertyLower { struct RenderPathPropertyLower {
bool operator() (const RenderPath &l, const RenderPath &r) const { bool operator() (const RenderPath &l, const RenderPath &r) const {
<<<<<<< HEAD
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
if (l.tbuffer_id < r.tbuffer_id) if (l.tbuffer_id < r.tbuffer_id)
return true; return true;
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
=======
if (l.tbuffer_id < r.tbuffer_id)
return true;
>>>>>>> master
for (int i = 0; i < 3; ++i) { for (int i = 0; i < 3; ++i) {
if (l.color[i] < r.color[i]) if (l.color[i] < r.color[i])
return true; return true;
@ -404,15 +274,7 @@ class GCodeViewer
}; };
struct RenderPathPropertyEqual { struct RenderPathPropertyEqual {
bool operator() (const RenderPath &l, const RenderPath &r) const { bool operator() (const RenderPath &l, const RenderPath &r) const {
<<<<<<< HEAD
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
return l.tbuffer_id == r.tbuffer_id && l.ibuffer_id == r.ibuffer_id && l.color == r.color; return l.tbuffer_id == r.tbuffer_id && l.ibuffer_id == r.ibuffer_id && l.color == r.color;
#else
return l.color == r.color && l.ibuffer_id == r.ibuffer_id;
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
=======
return l.tbuffer_id == r.tbuffer_id && l.ibuffer_id == r.ibuffer_id && l.color == r.color;
>>>>>>> master
} }
}; };
@ -449,13 +311,7 @@ class GCodeViewer
std::string shader; std::string shader;
std::vector<Path> paths; std::vector<Path> paths;
<<<<<<< HEAD
// std::set seems to perform significantly better, at least on Windows.
// std::unordered_set<RenderPath, RenderPathPropertyHash, RenderPathPropertyEqual> render_paths;
std::set<RenderPath, RenderPathPropertyLower> render_paths;
=======
std::vector<RenderPath> render_paths; std::vector<RenderPath> render_paths;
>>>>>>> master
bool visible{ false }; bool visible{ false };
void reset(); void reset();
@ -463,48 +319,13 @@ class GCodeViewer
// b_id index of buffer contained in this->indices // b_id index of buffer contained in this->indices
// i_id index of first index contained in this->indices[b_id] // i_id index of first index contained in this->indices[b_id]
// s_id index of first vertex contained in this->vertices // s_id index of first vertex contained in this->vertices
<<<<<<< HEAD
void add_path(const GCodeProcessor::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id);
#if ENABLE_SPLITTED_VERTEX_BUFFER
unsigned int max_vertices_per_segment() const {
switch (render_primitive_type)
{
case ERenderPrimitiveType::Point: { return 1; }
case ERenderPrimitiveType::Line: { return 2; }
case ERenderPrimitiveType::Triangle: { return 8; }
default: { return 0; }
}
}
size_t max_vertices_per_segment_size_floats() const { return vertices.vertex_size_floats() * static_cast<size_t>(max_vertices_per_segment()); }
size_t max_vertices_per_segment_size_bytes() const { return max_vertices_per_segment_size_floats() * sizeof(float); }
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
unsigned int indices_per_segment() const {
=======
void add_path(const GCodeProcessorResult::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id); void add_path(const GCodeProcessorResult::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id);
unsigned int max_vertices_per_segment() const { unsigned int max_vertices_per_segment() const {
>>>>>>> master
switch (render_primitive_type) switch (render_primitive_type)
{ {
case ERenderPrimitiveType::Point: { return 1; } case ERenderPrimitiveType::Point: { return 1; }
case ERenderPrimitiveType::Line: { return 2; } case ERenderPrimitiveType::Line: { return 2; }
<<<<<<< HEAD
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
case ERenderPrimitiveType::Triangle: { return 30; } // 3 indices x 10 triangles
#else
case ERenderPrimitiveType::Triangle: { return 42; } // 3 indices x 14 triangles
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
default: { return 0; }
}
}
#if ENABLE_SPLITTED_VERTEX_BUFFER
size_t indices_per_segment_size_bytes() const { return static_cast<size_t>(indices_per_segment() * sizeof(IBufferType)); }
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
unsigned int max_indices_per_segment() const {
=======
case ERenderPrimitiveType::Triangle: { return 8; } case ERenderPrimitiveType::Triangle: { return 8; }
default: { return 0; } default: { return 0; }
} }
@ -513,33 +334,10 @@ class GCodeViewer
size_t max_vertices_per_segment_size_floats() const { return vertices.vertex_size_floats() * static_cast<size_t>(max_vertices_per_segment()); } size_t max_vertices_per_segment_size_floats() const { return vertices.vertex_size_floats() * static_cast<size_t>(max_vertices_per_segment()); }
size_t max_vertices_per_segment_size_bytes() const { return max_vertices_per_segment_size_floats() * sizeof(float); } size_t max_vertices_per_segment_size_bytes() const { return max_vertices_per_segment_size_floats() * sizeof(float); }
unsigned int indices_per_segment() const { unsigned int indices_per_segment() const {
>>>>>>> master
switch (render_primitive_type) switch (render_primitive_type)
{ {
case ERenderPrimitiveType::Point: { return 1; } case ERenderPrimitiveType::Point: { return 1; }
case ERenderPrimitiveType::Line: { return 2; } case ERenderPrimitiveType::Line: { return 2; }
<<<<<<< HEAD
case ERenderPrimitiveType::Triangle: { return 36; } // 3 indices x 12 triangles
default: { return 0; }
}
}
size_t max_indices_per_segment_size_bytes() const { return max_indices_per_segment() * sizeof(IBufferType); }
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
#if ENABLE_SPLITTED_VERTEX_BUFFER
bool has_data() const {
return !vertices.vbos.empty() && vertices.vbos.front() != 0 && !indices.empty() && indices.front().ibo != 0;
}
#else
unsigned int start_segment_vertex_offset() const { return 0; }
unsigned int end_segment_vertex_offset() const {
switch (render_primitive_type)
{
case ERenderPrimitiveType::Point: { return 0; }
case ERenderPrimitiveType::Line: { return 1; }
case ERenderPrimitiveType::Triangle: { return 36; } // 1st vertex of 13th triangle
default: { return 0; }
=======
case ERenderPrimitiveType::Triangle: { return 30; } // 3 indices x 10 triangles case ERenderPrimitiveType::Triangle: { return 30; } // 3 indices x 10 triangles
default: { return 0; } default: { return 0; }
} }
@ -552,15 +350,10 @@ class GCodeViewer
case ERenderPrimitiveType::Line: { return 2; } case ERenderPrimitiveType::Line: { return 2; }
case ERenderPrimitiveType::Triangle: { return 36; } // 3 indices x 12 triangles case ERenderPrimitiveType::Triangle: { return 36; } // 3 indices x 12 triangles
default: { return 0; } default: { return 0; }
>>>>>>> master
} }
} }
size_t max_indices_per_segment_size_bytes() const { return max_indices_per_segment() * sizeof(IBufferType); } size_t max_indices_per_segment_size_bytes() const { return max_indices_per_segment() * sizeof(IBufferType); }
<<<<<<< HEAD
bool has_data() const { return vertices.id != 0 && !indices.empty() && indices.front().id != 0; }
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
bool has_data() const { bool has_data() const {
switch (render_primitive_type) switch (render_primitive_type)
{ {
@ -577,7 +370,6 @@ class GCodeViewer
default: { return false; } default: { return false; }
} }
} }
>>>>>>> master
}; };
// helper to render shells // helper to render shells
@ -656,16 +448,8 @@ class GCodeViewer
size_t first{ 0 }; size_t first{ 0 };
size_t last{ 0 }; size_t last{ 0 };
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
bool operator == (const Endpoints& other) const {
return first == other.first && last == other.last;
}
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
bool operator == (const Endpoints& other) const { return first == other.first && last == other.last; } bool operator == (const Endpoints& other) const { return first == other.first && last == other.last; }
bool operator != (const Endpoints& other) const { return !operator==(other); } bool operator != (const Endpoints& other) const { return !operator==(other); }
>>>>>>> master
}; };
private: private:
@ -691,21 +475,6 @@ class GCodeViewer
double get_z_at(unsigned int id) const { return (id < m_zs.size()) ? m_zs[id] : 0.0; } double get_z_at(unsigned int id) const { return (id < m_zs.size()) ? m_zs[id] : 0.0; }
Endpoints get_endpoints_at(unsigned int id) const { return (id < m_endpoints.size()) ? m_endpoints[id] : Endpoints(); } Endpoints get_endpoints_at(unsigned int id) const { return (id < m_endpoints.size()) ? m_endpoints[id] : Endpoints(); }
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
bool operator != (const Layers& other) const {
if (m_zs != other.m_zs)
return true;
if (!(m_endpoints == other.m_endpoints))
return true;
return false;
}
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
};
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
=======
bool operator != (const Layers& other) const { bool operator != (const Layers& other) const {
if (m_zs != other.m_zs) if (m_zs != other.m_zs)
return true; return true;
@ -715,7 +484,6 @@ class GCodeViewer
} }
}; };
>>>>>>> master
// used to render the toolpath caps of the current sequential range // used to render the toolpath caps of the current sequential range
// (i.e. when sliding on the horizontal slider) // (i.e. when sliding on the horizontal slider)
struct SequentialRangeCap struct SequentialRangeCap
@ -730,7 +498,6 @@ class GCodeViewer
void reset(); void reset();
size_t indices_count() const { return 6; } size_t indices_count() const { return 6; }
}; };
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
#if ENABLE_GCODE_VIEWER_STATISTICS #if ENABLE_GCODE_VIEWER_STATISTICS
struct Statistics struct Statistics
@ -747,15 +514,9 @@ class GCodeViewer
int64_t gl_multi_points_calls_count{ 0 }; int64_t gl_multi_points_calls_count{ 0 };
int64_t gl_multi_lines_calls_count{ 0 }; int64_t gl_multi_lines_calls_count{ 0 };
int64_t gl_multi_triangles_calls_count{ 0 }; int64_t gl_multi_triangles_calls_count{ 0 };
<<<<<<< HEAD
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
int64_t gl_triangles_calls_count{ 0 };
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
=======
int64_t gl_triangles_calls_count{ 0 }; int64_t gl_triangles_calls_count{ 0 };
int64_t gl_instanced_models_calls_count{ 0 }; int64_t gl_instanced_models_calls_count{ 0 };
int64_t gl_batched_models_calls_count{ 0 }; int64_t gl_batched_models_calls_count{ 0 };
>>>>>>> master
// memory // memory
int64_t results_size{ 0 }; int64_t results_size{ 0 };
int64_t total_vertices_gpu_size{ 0 }; int64_t total_vertices_gpu_size{ 0 };
@ -796,15 +557,9 @@ class GCodeViewer
gl_multi_points_calls_count = 0; gl_multi_points_calls_count = 0;
gl_multi_lines_calls_count = 0; gl_multi_lines_calls_count = 0;
gl_multi_triangles_calls_count = 0; gl_multi_triangles_calls_count = 0;
<<<<<<< HEAD
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
gl_triangles_calls_count = 0;
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
=======
gl_triangles_calls_count = 0; gl_triangles_calls_count = 0;
gl_instanced_models_calls_count = 0; gl_instanced_models_calls_count = 0;
gl_batched_models_calls_count = 0; gl_batched_models_calls_count = 0;
>>>>>>> master
} }
void reset_sizes() { void reset_sizes() {
@ -946,40 +701,25 @@ private:
std::vector<ExtrusionRole> m_roles; std::vector<ExtrusionRole> m_roles;
size_t m_extruders_count; size_t m_extruders_count;
std::vector<unsigned char> m_extruder_ids; std::vector<unsigned char> m_extruder_ids;
<<<<<<< HEAD
=======
std::vector<float> m_filament_diameters; std::vector<float> m_filament_diameters;
std::vector<float> m_filament_densities; std::vector<float> m_filament_densities;
>>>>>>> master
Extrusions m_extrusions; Extrusions m_extrusions;
SequentialView m_sequential_view; SequentialView m_sequential_view;
Shells m_shells; Shells m_shells;
EViewType m_view_type{ EViewType::FeatureType }; EViewType m_view_type{ EViewType::FeatureType };
bool m_legend_enabled{ true }; bool m_legend_enabled{ true };
<<<<<<< HEAD
PrintEstimatedTimeStatistics m_time_statistics;
PrintEstimatedTimeStatistics::ETimeMode m_time_estimate_mode{ PrintEstimatedTimeStatistics::ETimeMode::Normal };
=======
PrintEstimatedStatistics m_print_statistics; PrintEstimatedStatistics m_print_statistics;
PrintEstimatedStatistics::ETimeMode m_time_estimate_mode{ PrintEstimatedStatistics::ETimeMode::Normal }; PrintEstimatedStatistics::ETimeMode m_time_estimate_mode{ PrintEstimatedStatistics::ETimeMode::Normal };
>>>>>>> master
#if ENABLE_GCODE_VIEWER_STATISTICS #if ENABLE_GCODE_VIEWER_STATISTICS
Statistics m_statistics; Statistics m_statistics;
#endif // ENABLE_GCODE_VIEWER_STATISTICS #endif // ENABLE_GCODE_VIEWER_STATISTICS
std::array<float, 2> m_detected_point_sizes = { 0.0f, 0.0f }; std::array<float, 2> m_detected_point_sizes = { 0.0f, 0.0f };
<<<<<<< HEAD
GCodeProcessor::Result::SettingsIds m_settings_ids;
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
std::array<SequentialRangeCap, 2> m_sequential_range_caps;
#endif // ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
=======
GCodeProcessorResult::SettingsIds m_settings_ids; GCodeProcessorResult::SettingsIds m_settings_ids;
std::array<SequentialRangeCap, 2> m_sequential_range_caps; std::array<SequentialRangeCap, 2> m_sequential_range_caps;
std::vector<CustomGCode::Item> m_custom_gcode_per_print_z; std::vector<CustomGCode::Item> m_custom_gcode_per_print_z;
bool m_contained_in_bed{ true }; bool m_contained_in_bed{ true };
>>>>>>> master
public: public:
GCodeViewer(); GCodeViewer();
@ -998,13 +738,7 @@ public:
void render(); void render();
bool has_data() const { return !m_roles.empty(); } bool has_data() const { return !m_roles.empty(); }
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
bool can_export_toolpaths() const; bool can_export_toolpaths() const;
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
bool can_export_toolpaths() const;
>>>>>>> master
const BoundingBoxf3& get_paths_bounding_box() const { return m_paths_bounding_box; } const BoundingBoxf3& get_paths_bounding_box() const { return m_paths_bounding_box; }
const BoundingBoxf3& get_max_bounding_box() const { return m_max_bounding_box; } const BoundingBoxf3& get_max_bounding_box() const { return m_max_bounding_box; }
@ -1042,11 +776,7 @@ public:
size_t get_extruders_count() { return m_extruders_count; } size_t get_extruders_count() { return m_extruders_count; }
private: private:
<<<<<<< HEAD
void load_toolpaths(const GCodeProcessor::Result& gcode_result);
=======
void load_toolpaths(const GCodeProcessorResult& gcode_result); void load_toolpaths(const GCodeProcessorResult& gcode_result);
>>>>>>> master
void load_shells(const Print& print, bool initialized); void load_shells(const Print& print, bool initialized);
void refresh_render_paths(bool keep_sequential_current_first, bool keep_sequential_current_last) const; void refresh_render_paths(bool keep_sequential_current_first, bool keep_sequential_current_last) const;
void render_toolpaths(); void render_toolpaths();

View File

@ -3773,15 +3773,7 @@ void GLCanvas3D::update_tooltip_for_settings_item_in_main_toolbar()
bool GLCanvas3D::has_toolpaths_to_export() const bool GLCanvas3D::has_toolpaths_to_export() const
{ {
<<<<<<< HEAD
#if ENABLE_SPLITTED_VERTEX_BUFFER
return m_gcode_viewer.can_export_toolpaths(); return m_gcode_viewer.can_export_toolpaths();
#else
return m_gcode_viewer.has_data();
#endif // ENABLE_SPLITTED_VERTEX_BUFFER
=======
return m_gcode_viewer.can_export_toolpaths();
>>>>>>> master
} }
void GLCanvas3D::export_toolpaths_to_obj(const char* filename) const void GLCanvas3D::export_toolpaths_to_obj(const char* filename) const

View File

@ -367,127 +367,6 @@ void show_substitutions_info(const ConfigSubstitutions& config_substitutions, co
msg.ShowModal(); msg.ShowModal();
} }
static wxString bold(const wxString& str)
{
return wxString::Format("<b>%s</b>", str);
};
static wxString bold_string(const wxString& str)
{
return wxString::Format("<b>\"%s\"</b>", str);
};
static void add_config_substitutions(const ConfigSubstitutions& conf_substitutions, wxString& changes)
{
changes += "<table>";
for (const ConfigSubstitution& conf_substitution : conf_substitutions) {
wxString new_val;
const ConfigOptionDef* def = conf_substitution.opt_def;
if (!def)
continue;
switch (def->type) {
case coEnum:
{
const std::vector<std::string>& labels = def->enum_labels;
const std::vector<std::string>& values = def->enum_values;
int val = conf_substitution.new_value->getInt();
bool is_infill = def->opt_key == "top_fill_pattern" ||
def->opt_key == "bottom_fill_pattern" ||
def->opt_key == "fill_pattern";
// Each infill doesn't use all list of infill declared in PrintConfig.hpp.
// So we should "convert" val to the correct one
if (is_infill) {
for (const auto& key_val : *def->enum_keys_map)
if ((int)key_val.second == val) {
auto it = std::find(values.begin(), values.end(), key_val.first);
if (it == values.end())
break;
auto idx = it - values.begin();
new_val = wxString("\"") + values[idx] + "\"" + " (" + from_u8(_utf8(labels[idx])) + ")";
break;
}
if (new_val.IsEmpty()) {
assert(false);
new_val = _L("Undefined");
}
}
else
new_val = wxString("\"") + values[val] + "\"" + " (" + from_u8(_utf8(labels[val])) + ")";
break;
}
case coBool:
new_val = conf_substitution.new_value->getBool() ? "true" : "false";
break;
case coBools:
if (conf_substitution.new_value->nullable())
for (const char v : static_cast<const ConfigOptionBoolsNullable*>(conf_substitution.new_value.get())->values)
new_val += std::string(v == ConfigOptionBoolsNullable::nil_value() ? "nil" : v ? "true" : "false") + ", ";
else
for (const char v : static_cast<const ConfigOptionBools*>(conf_substitution.new_value.get())->values)
new_val += std::string(v ? "true" : "false") + ", ";
if (! new_val.empty())
new_val.erase(new_val.begin() + new_val.size() - 2, new_val.end());
break;
default:
assert(false);
}
changes += format_wxstr("<tr><td><b>\"%1%\" (%2%)</b></td><td>: ", def->opt_key, _(def->label)) +
format_wxstr(_L("%1% was substituted with %2%"), bold_string(conf_substitution.old_value), bold(new_val)) +
"</td></tr>";
}
changes += "</table>";
}
static wxString substitution_message(const wxString& changes)
{
return
_L("Most likely the configuration was produced by a newer version of PrusaSlicer or by some PrusaSlicer fork.") + " " +
_L("The following values were substituted:") + "\n" + changes + "\n\n" +
_L("Review the substitutions and adjust them if needed.");
}
void show_substitutions_info(const PresetsConfigSubstitutions& presets_config_substitutions)
{
wxString changes;
auto preset_type_name = [](Preset::Type type) {
switch (type) {
case Preset::TYPE_PRINT: return _L("Print settings");
case Preset::TYPE_SLA_PRINT: return _L("SLA print settings");
case Preset::TYPE_FILAMENT: return _L("Filament");
case Preset::TYPE_SLA_MATERIAL: return _L("SLA material");
case Preset::TYPE_PRINTER: return _L("Printer");
case Preset::TYPE_PHYSICAL_PRINTER: return _L("Physical Printer");
default: assert(false); return wxString();
}
};
for (const PresetConfigSubstitutions& substitution : presets_config_substitutions) {
changes += "\n\n" + format_wxstr("%1% : %2%", preset_type_name(substitution.preset_type), bold_string(substitution.preset_name));
if (!substitution.preset_file.empty())
changes += format_wxstr(" (%1%)", substitution.preset_file);
add_config_substitutions(substitution.substitutions, changes);
}
InfoDialog msg(nullptr, _L("Configuration bundle was loaded, however some configuration values were not recognized."), substitution_message(changes));
msg.ShowModal();
}
void show_substitutions_info(const ConfigSubstitutions& config_substitutions, const std::string& filename)
{
wxString changes = "\n";
add_config_substitutions(config_substitutions, changes);
InfoDialog msg(nullptr,
format_wxstr(_L("Configuration file \"%1%\" was loaded, however some configuration values were not recognized."), from_u8(filename)),
substitution_message(changes));
msg.ShowModal();
}
void create_combochecklist(wxComboCtrl* comboCtrl, const std::string& text, const std::string& items) void create_combochecklist(wxComboCtrl* comboCtrl, const std::string& text, const std::string& items)
{ {
if (comboCtrl == nullptr) if (comboCtrl == nullptr)

View File

@ -492,12 +492,6 @@ static const FileWildcards file_wildcards_by_type[FT_SIZE] = {
/* FT_INI */ { "INI files"sv, { ".ini"sv } }, /* FT_INI */ { "INI files"sv, { ".ini"sv } },
/* FT_SVG */ { "SVG files"sv, { ".svg"sv } }, /* FT_SVG */ { "SVG files"sv, { ".svg"sv } },
<<<<<<< HEAD
/* FT_SL1 */ "Masked SLA files (*.sl1, *.sl1s)|*.sl1;*.SL1;*.sl1s;*.SL1S",
// Workaround for OSX file picker, for some reason it always saves with the 1st extension.
/* FT_SL1S */ "Masked SLA files (*.sl1s, *.sl1)|*.sl1s;*.SL1S;*.sl1;*.SL1",
};
=======
/* FT_TEX */ { "Texture"sv, { ".png"sv, ".svg"sv } }, /* FT_TEX */ { "Texture"sv, { ".png"sv, ".svg"sv } },
/* FT_SL1 */ { "Masked SLA files"sv, { ".sl1"sv, ".sl1s"sv } }, /* FT_SL1 */ { "Masked SLA files"sv, { ".sl1"sv, ".sl1s"sv } },
@ -513,7 +507,6 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension)
std::string title; std::string title;
std::string mask; std::string mask;
std::string custom_ext_lower; std::string custom_ext_lower;
>>>>>>> master
if (! custom_extension.empty()) { if (! custom_extension.empty()) {
// Generate an extension into the title mask and into the list of extensions. // Generate an extension into the title mask and into the list of extensions.
@ -766,28 +759,14 @@ void GUI_App::post_init()
this->mainframe->load_config(this->init_params->extra_config); this->mainframe->load_config(this->init_params->extra_config);
} }
<<<<<<< HEAD
=======
// show "Did you know" notification // show "Did you know" notification
if (app_config->get("show_hints") == "1" && ! is_gcode_viewer()) if (app_config->get("show_hints") == "1" && ! is_gcode_viewer())
plater_->get_notification_manager()->push_hint_notification(true); plater_->get_notification_manager()->push_hint_notification(true);
>>>>>>> master
// The extra CallAfter() is needed because of Mac, where this is the only way // The extra CallAfter() is needed because of Mac, where this is the only way
// to popup a modal dialog on start without screwing combo boxes. // to popup a modal dialog on start without screwing combo boxes.
// This is ugly but I honestly found no better way to do it. // This is ugly but I honestly found no better way to do it.
// Neither wxShowEvent nor wxWindowCreateEvent work reliably. // Neither wxShowEvent nor wxWindowCreateEvent work reliably.
<<<<<<< HEAD
if (this->preset_updater) {
this->check_updates(false);
CallAfter([this] {
this->config_wizard_startup();
this->preset_updater->slic3r_update_notify();
this->preset_updater->sync(preset_bundle);
});
}
=======
if (this->preset_updater) { // G-Code Viewer does not initialize preset_updater. if (this->preset_updater) { // G-Code Viewer does not initialize preset_updater.
if (! this->check_updates(false)) if (! this->check_updates(false))
// Configuration is not compatible and reconfigure was refused by the user. Application is closing. // Configuration is not compatible and reconfigure was refused by the user. Application is closing.
@ -814,7 +793,6 @@ void GUI_App::post_init()
app_config->set("version", SLIC3R_VERSION); app_config->set("version", SLIC3R_VERSION);
app_config->save(); app_config->save();
>>>>>>> master
#ifdef _WIN32 #ifdef _WIN32
// Sets window property to mainframe so other instances can indentify it. // Sets window property to mainframe so other instances can indentify it.
OtherInstanceMessageHandler::init_windows_properties(mainframe, m_instance_hash_int); OtherInstanceMessageHandler::init_windows_properties(mainframe, m_instance_hash_int);
@ -1325,12 +1303,6 @@ bool GUI_App::on_init_inner()
if (! plater_) if (! plater_)
return; return;
<<<<<<< HEAD
if (app_config->dirty() && app_config->get("autosave") == "1")
app_config->save();
=======
>>>>>>> master
this->obj_manipul()->update_if_dirty(); this->obj_manipul()->update_if_dirty();
// An ugly solution to GH #5537 in which GUI_App::init_opengl (normally called from events wxEVT_PAINT // An ugly solution to GH #5537 in which GUI_App::init_opengl (normally called from events wxEVT_PAINT
@ -1346,12 +1318,9 @@ bool GUI_App::on_init_inner()
#endif #endif
this->post_init(); this->post_init();
} }
<<<<<<< HEAD
=======
if (! update_gui_after_init && app_config->dirty() && app_config->get("autosave") == "1") if (! update_gui_after_init && app_config->dirty() && app_config->get("autosave") == "1")
app_config->save(); app_config->save();
>>>>>>> master
}); });
m_initialized = true; m_initialized = true;
@ -2357,9 +2326,6 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
// Load the currently selected preset into the GUI, update the preset selection box. // Load the currently selected preset into the GUI, update the preset selection box.
load_current_presets(); load_current_presets();
// update config wizard in respect to the new config
update_wizard_from_config();
} catch (std::exception &ex) { } catch (std::exception &ex) {
GUI::show_error(nullptr, _L("Failed to activate configuration snapshot.") + "\n" + into_u8(ex.what())); GUI::show_error(nullptr, _L("Failed to activate configuration snapshot.") + "\n" + into_u8(ex.what()));
} }
@ -2730,17 +2696,6 @@ void GUI_App::load_current_presets(bool check_printer_presets_ /*= true*/)
} }
} }
void GUI_App::update_wizard_from_config()
{
if (!m_wizard)
return;
// If ConfigWizard was created before changing of the configuration,
// we have to destroy it to have possibility to create it again in respect to the new config's parameters
m_wizard->Reparent(nullptr);
m_wizard->Destroy();
m_wizard = nullptr;
}
bool GUI_App::OnExceptionInMainLoop() bool GUI_App::OnExceptionInMainLoop()
{ {
generic_exception_handle(); generic_exception_handle();
@ -2920,20 +2875,9 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
{ {
wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null"); wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");
<<<<<<< HEAD
if (reason == ConfigWizard::RR_USER)
if (PresetUpdater::UpdateResult result = preset_updater->config_update(app_config->orig_version(), PresetUpdater::UpdateParams::FORCED_BEFORE_WIZARD);
result == PresetUpdater::R_ALL_CANCELED)
return false;
if (! m_wizard) {
wxBusyCursor wait;
m_wizard = new ConfigWizard(mainframe);
=======
if (reason == ConfigWizard::RR_USER) { if (reason == ConfigWizard::RR_USER) {
if (preset_updater->config_update(app_config->orig_version(), PresetUpdater::UpdateParams::FORCED_BEFORE_WIZARD) == PresetUpdater::R_ALL_CANCELED) if (preset_updater->config_update(app_config->orig_version(), PresetUpdater::UpdateParams::FORCED_BEFORE_WIZARD) == PresetUpdater::R_ALL_CANCELED)
return false; return false;
>>>>>>> master
} }
auto wizard = new ConfigWizard(mainframe); auto wizard = new ConfigWizard(mainframe);

View File

@ -66,11 +66,6 @@ enum FileType
FT_TEX, FT_TEX,
FT_SL1, FT_SL1,
<<<<<<< HEAD
// Workaround for OSX file picker, for some reason it always saves with the 1st extension.
FT_SL1S,
=======
>>>>>>> master
FT_SIZE, FT_SIZE,
}; };
@ -264,7 +259,6 @@ public:
bool check_print_host_queue(); bool check_print_host_queue();
bool checked_tab(Tab* tab); bool checked_tab(Tab* tab);
void load_current_presets(bool check_printer_presets = true); void load_current_presets(bool check_printer_presets = true);
void update_wizard_from_config();
wxString current_language_code() const { return m_wxLocale->GetCanonicalName(); } wxString current_language_code() const { return m_wxLocale->GetCanonicalName(); }
// Translate the language code to a code, for which Prusa Research maintains translations. Defaults to "en_US". // Translate the language code to a code, for which Prusa Research maintains translations. Defaults to "en_US".

View File

@ -413,8 +413,6 @@ void Preview::msw_rescale()
void Preview::sys_color_changed() void Preview::sys_color_changed()
{ {
<<<<<<< HEAD
=======
#ifdef _WIN32 #ifdef _WIN32
wxWindowUpdateLocker noUpdates(this); wxWindowUpdateLocker noUpdates(this);
@ -426,7 +424,6 @@ void Preview::sys_color_changed()
wxGetApp().UpdateDarkUI(static_cast<wxCheckListBoxComboPopup*>(m_combochecklist_options->GetPopupControl())); wxGetApp().UpdateDarkUI(static_cast<wxCheckListBoxComboPopup*>(m_combochecklist_options->GetPopupControl()));
#endif #endif
>>>>>>> master
if (m_layers_slider != nullptr) if (m_layers_slider != nullptr)
m_layers_slider->sys_color_changed(); m_layers_slider->sys_color_changed();
} }
@ -500,65 +497,18 @@ void Preview::on_combochecklist_features(wxCommandEvent& evt)
void Preview::on_combochecklist_options(wxCommandEvent& evt) void Preview::on_combochecklist_options(wxCommandEvent& evt)
{ {
<<<<<<< HEAD
unsigned int curr_flags = m_canvas->get_gcode_options_visibility_flags();
unsigned int new_flags = Slic3r::GUI::combochecklist_get_flags(m_combochecklist_options);
=======
const unsigned int curr_flags = m_canvas->get_gcode_options_visibility_flags(); const unsigned int curr_flags = m_canvas->get_gcode_options_visibility_flags();
const unsigned int new_flags = Slic3r::GUI::combochecklist_get_flags(m_combochecklist_options); const unsigned int new_flags = Slic3r::GUI::combochecklist_get_flags(m_combochecklist_options);
>>>>>>> master
if (curr_flags == new_flags) if (curr_flags == new_flags)
return; return;
m_canvas->set_gcode_options_visibility_from_flags(new_flags); m_canvas->set_gcode_options_visibility_from_flags(new_flags);
<<<<<<< HEAD
#if ENABLE_RENDER_PATH_REFRESH_AFTER_OPTIONS_CHANGE
m_canvas->refresh_gcode_preview_render_paths();
#else
auto xored = [](unsigned int flags1, unsigned int flags2, unsigned int flag) {
auto is_flag_set = [](unsigned int flags, unsigned int flag) {
return (flags & (1 << flag)) != 0;
};
return !is_flag_set(flags1, flag) != !is_flag_set(flags2, flag);
};
bool skip_refresh = xored(curr_flags, new_flags, static_cast<unsigned int>(OptionType::Shells)) ||
xored(curr_flags, new_flags, static_cast<unsigned int>(OptionType::ToolMarker));
if (!skip_refresh)
refresh_print();
else
m_canvas->set_as_dirty();
#endif // ENABLE_RENDER_PATH_REFRESH_AFTER_OPTIONS_CHANGE
}
#if !ENABLE_PREVIEW_TYPE_CHANGE
void Preview::update_view_type(bool keep_volumes)
{
const DynamicPrintConfig& config = wxGetApp().preset_bundle->project_config;
const wxString& choice = !wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes.empty() /*&&
(wxGetApp().extruders_edited_cnt()==1 || !slice_completed) */?
_L("Color Print") :
config.option<ConfigOptionFloats>("wiping_volumes_matrix")->values.size() > 1 ?
_L("Tool") :
_L("Feature type");
int type = m_choice_view_type->FindString(choice);
if (m_choice_view_type->GetSelection() != type) {
m_choice_view_type->SetSelection(type);
if (0 <= type && type < static_cast<int>(GCodeViewer::EViewType::Count))
m_canvas->set_gcode_view_preview_type(static_cast<GCodeViewer::EViewType>(type));
m_preferred_color_mode = "feature";
=======
if (m_canvas->get_gcode_view_type() == GCodeViewer::EViewType::Feedrate) { if (m_canvas->get_gcode_view_type() == GCodeViewer::EViewType::Feedrate) {
const unsigned int diff_flags = curr_flags ^ new_flags; const unsigned int diff_flags = curr_flags ^ new_flags;
if ((diff_flags & (1 << static_cast<unsigned int>(Preview::OptionType::Travel))) != 0) if ((diff_flags & (1 << static_cast<unsigned int>(Preview::OptionType::Travel))) != 0)
refresh_print(); refresh_print();
else else
m_canvas->refresh_gcode_preview_render_paths(); m_canvas->refresh_gcode_preview_render_paths();
>>>>>>> master
} }
else else
m_canvas->refresh_gcode_preview_render_paths(); m_canvas->refresh_gcode_preview_render_paths();

View File

@ -115,16 +115,6 @@ public:
Sel sel = Sel::modelAndProfile; Sel sel = Sel::modelAndProfile;
<<<<<<< HEAD
TriangleMesh mesh;
DynamicPrintConfig profile;
wxString path;
Vec2i win = {2, 2};
std::string err;
ConfigSubstitutions config_substitutions;
priv(Plater *plt): plater{plt} {}
=======
indexed_triangle_set mesh; indexed_triangle_set mesh;
DynamicPrintConfig profile; DynamicPrintConfig profile;
wxString path; wxString path;
@ -135,7 +125,6 @@ public:
ImportDlg import_dlg; ImportDlg import_dlg;
priv(Plater *plt) : plater{plt}, import_dlg{plt} {} priv(Plater *plt) : plater{plt}, import_dlg{plt} {}
>>>>>>> master
}; };
SLAImportJob::SLAImportJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater) SLAImportJob::SLAImportJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater)
@ -158,15 +147,8 @@ void SLAImportJob::process()
try { try {
switch (p->sel) { switch (p->sel) {
case Sel::modelAndProfile: case Sel::modelAndProfile:
<<<<<<< HEAD
p->config_substitutions = import_sla_archive(path, p->win, p->mesh, p->profile, progr);
break;
case Sel::modelOnly:
p->config_substitutions = import_sla_archive(path, p->win, p->mesh, progr);
=======
case Sel::modelOnly: case Sel::modelOnly:
p->config_substitutions = import_sla_archive(path, p->win, p->mesh, p->profile, progr); p->config_substitutions = import_sla_archive(path, p->win, p->mesh, p->profile, progr);
>>>>>>> master
break; break;
case Sel::profileOnly: case Sel::profileOnly:
p->config_substitutions = import_sla_archive(path, p->profile); p->config_substitutions = import_sla_archive(path, p->profile);
@ -199,15 +181,9 @@ void SLAImportJob::prepare()
if (p->import_dlg.ShowModal() == wxID_OK) { if (p->import_dlg.ShowModal() == wxID_OK) {
auto path = p->import_dlg.get_path(); auto path = p->import_dlg.get_path();
auto nm = wxFileName(path); auto nm = wxFileName(path);
<<<<<<< HEAD
p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : path.ToUTF8();
p->sel = dlg.get_selection();
p->win = dlg.get_marchsq_windowsize();
=======
p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : nm.GetFullPath(); p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : nm.GetFullPath();
p->sel = p->import_dlg.get_selection(); p->sel = p->import_dlg.get_selection();
p->win = p->import_dlg.get_marchsq_windowsize(); p->win = p->import_dlg.get_marchsq_windowsize();
>>>>>>> master
p->config_substitutions.clear(); p->config_substitutions.clear();
} else { } else {
p->path = ""; p->path = "";

View File

@ -1206,11 +1206,7 @@ void MainFrame::init_menubar_as_editor()
[this](wxCommandEvent&) { if (m_plater) m_plater->add_model(true); }, "import_plater", nullptr, [this](wxCommandEvent&) { if (m_plater) m_plater->add_model(true); }, "import_plater", nullptr,
[this](){return m_plater != nullptr; }, this); [this](){return m_plater != nullptr; }, this);
<<<<<<< HEAD
append_menu_item(import_menu, wxID_ANY, _L("Import SL1 / SL1S archive") + dots, _L("Load an SL1 / Sl1S archive"),
=======
append_menu_item(import_menu, wxID_ANY, _L("Import SL1 / SL1S Archive") + dots, _L("Load an SL1 / Sl1S archive"), append_menu_item(import_menu, wxID_ANY, _L("Import SL1 / SL1S Archive") + dots, _L("Load an SL1 / Sl1S archive"),
>>>>>>> master
[this](wxCommandEvent&) { if (m_plater) m_plater->import_sl1_archive(); }, "import_plater", nullptr, [this](wxCommandEvent&) { if (m_plater) m_plater->import_sl1_archive(); }, "import_plater", nullptr,
[this](){return m_plater != nullptr && !m_plater->is_any_job_running(); }, this); [this](){return m_plater != nullptr && !m_plater->is_any_job_running(); }, this);

View File

@ -60,10 +60,6 @@ MsgDialog::MsgDialog(wxWindow *parent, const wxString &title, const wxString &he
apply_style(style); apply_style(style);
<<<<<<< HEAD
topsizer->Add(logo, 0, /*wxALL*/wxTOP | wxBOTTOM | wxLEFT, BORDER);
topsizer->Add(rightsizer, 1, wxALL | wxEXPAND, BORDER);
=======
SetSizerAndFit(main_sizer); SetSizerAndFit(main_sizer);
} }
@ -106,7 +102,6 @@ void MsgDialog::apply_style(long style)
style & wxICON_INFORMATION ? "info" : style & wxICON_INFORMATION ? "info" :
style & wxICON_QUESTION ? "question" : "PrusaSlicer", this, 64, style & wxICON_ERROR)); style & wxICON_QUESTION ? "question" : "PrusaSlicer", this, 64, style & wxICON_ERROR));
} }
>>>>>>> master
void MsgDialog::finalize() void MsgDialog::finalize()
{ {
@ -350,57 +345,5 @@ wxString get_wraped_wxString(const wxString& in, size_t line_len /*=80*/)
return out; return out;
} }
// InfoDialog
InfoDialog::InfoDialog(wxWindow* parent, const wxString &title, const wxString& msg)
: MsgDialog(parent, wxString::Format(_L("%s information"), SLIC3R_APP_NAME), title)
, msg(msg)
{
this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
// Text shown as HTML, so that mouse selection and Ctrl-V to copy will work.
wxHtmlWindow* html = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO);
{
wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
wxFont monospace = wxGetApp().code_font();
wxColour text_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
wxColour bgr_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
const int font_size = font.GetPointSize() - 1;
int size[] = { font_size, font_size, font_size, font_size, font_size, font_size, font_size };
html->SetFonts(font.GetFaceName(), monospace.GetFaceName(), size);
html->SetBorders(2);
// calculate html page size from text
int lines = msg.Freq('\n');
if (msg.Contains("<tr>")) {
int pos = 0;
while (pos < (int)msg.Len() && pos != wxNOT_FOUND) {
pos = msg.find("<tr>", pos + 1);
lines+=2;
}
}
int page_height = std::min((font.GetPixelSize().y + 1) * lines, 68 * wxGetApp().em_unit());
wxSize page_size(68 * wxGetApp().em_unit(), page_height);
html->SetMinSize(page_size);
std::string msg_escaped = xml_escape(msg.ToUTF8().data(), true);
boost::replace_all(msg_escaped, "\r\n", "<br>");
boost::replace_all(msg_escaped, "\n", "<br>");
html->SetPage("<html><body bgcolor=\"" + bgr_clr_str + "\"><font color=\"" + text_clr_str + "\">" + wxString::FromUTF8(msg_escaped.data()) + "</font></body></html>");
content_sizer->Add(html, 1, wxEXPAND);
}
// Set info bitmap
logo->SetBitmap(create_scaled_bitmap("info", this, 84));
Fit();
}
} }
} }

View File

@ -74,8 +74,6 @@ private:
}; };
<<<<<<< HEAD
=======
// Generic warning dialog, used for displaying exceptions // Generic warning dialog, used for displaying exceptions
class WarningDialog : public MsgDialog class WarningDialog : public MsgDialog
{ {
@ -306,16 +304,11 @@ public:
}; };
#endif #endif
>>>>>>> master
// Generic info dialog, used for displaying exceptions // Generic info dialog, used for displaying exceptions
class InfoDialog : public MsgDialog class InfoDialog : public MsgDialog
{ {
public: public:
<<<<<<< HEAD
InfoDialog(wxWindow *parent, const wxString &title, const wxString &msg);
=======
InfoDialog(wxWindow *parent, const wxString &title, const wxString &msg, bool is_marked = false, long style = wxOK| wxICON_INFORMATION); InfoDialog(wxWindow *parent, const wxString &title, const wxString &msg, bool is_marked = false, long style = wxOK| wxICON_INFORMATION);
>>>>>>> master
InfoDialog(InfoDialog&&) = delete; InfoDialog(InfoDialog&&) = delete;
InfoDialog(const InfoDialog&) = delete; InfoDialog(const InfoDialog&) = delete;
InfoDialog&operator=(InfoDialog&&) = delete; InfoDialog&operator=(InfoDialog&&) = delete;

View File

@ -5,15 +5,11 @@
#include "ImGuiWrapper.hpp" #include "ImGuiWrapper.hpp"
#include "PrintHostDialogs.hpp" #include "PrintHostDialogs.hpp"
#include "wxExtensions.hpp" #include "wxExtensions.hpp"
<<<<<<< HEAD
#include "libslic3r/Config.hpp"
=======
#include "ObjectDataViewModel.hpp" #include "ObjectDataViewModel.hpp"
#include "libslic3r/Config.hpp" #include "libslic3r/Config.hpp"
#include "../Utils/PrintHost.hpp" #include "../Utils/PrintHost.hpp"
#include "libslic3r/Config.hpp" #include "libslic3r/Config.hpp"
#include "format.hpp" #include "format.hpp"
>>>>>>> master
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/log/trivial.hpp> #include <boost/log/trivial.hpp>
@ -37,30 +33,8 @@ wxDEFINE_EVENT(EVT_EJECT_DRIVE_NOTIFICAION_CLICKED, EjectDriveNotificationClicke
wxDEFINE_EVENT(EVT_EXPORT_GCODE_NOTIFICAION_CLICKED, ExportGcodeNotificationClickedEvent); wxDEFINE_EVENT(EVT_EXPORT_GCODE_NOTIFICAION_CLICKED, ExportGcodeNotificationClickedEvent);
wxDEFINE_EVENT(EVT_PRESET_UPDATE_AVAILABLE_CLICKED, PresetUpdateAvailableClickedEvent); wxDEFINE_EVENT(EVT_PRESET_UPDATE_AVAILABLE_CLICKED, PresetUpdateAvailableClickedEvent);
<<<<<<< HEAD
const NotificationManager::NotificationData NotificationManager::basic_notifications[] = {
// {NotificationType::SlicingNotPossible, NotificationLevel::RegularNotification, 10, _u8L("Slicing is not possible.")},
// {NotificationType::ExportToRemovableFinished, NotificationLevel::ImportantNotification, 0, _u8L("Exporting finished."), _u8L("Eject drive.") },
{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotification, 10, _u8L("3D Mouse disconnected.") },
// {NotificationType::Mouse3dConnected, NotificationLevel::RegularNotification, 5, _u8L("3D Mouse connected.") },
// {NotificationType::NewPresetsAviable, NotificationLevel::ImportantNotification, 20, _u8L("New Presets are available."), _u8L("See here.") },
{NotificationType::PresetUpdateAvailable, NotificationLevel::ImportantNotification, 20, _u8L("Configuration update is available."), _u8L("See more."), [](wxEvtHandler* evnthndlr){
if (evnthndlr != nullptr) wxPostEvent(evnthndlr, PresetUpdateAvailableClickedEvent(EVT_PRESET_UPDATE_AVAILABLE_CLICKED)); return true; }},
{NotificationType::NewAppAvailable, NotificationLevel::ImportantNotification, 20, _u8L("New version is available."), _u8L("See Releases page."), [](wxEvtHandler* evnthndlr){
wxLaunchDefaultBrowser("https://github.com/prusa3d/PrusaSlicer/releases"); return true; }},
{NotificationType::EmptyColorChangeCode, NotificationLevel::RegularNotification, 10,
_u8L("You have just added a G-code for color change, but its value is empty.\n"
"To export the G-code correctly, check the \"Color Change G-code\" in \"Printer Settings > Custom G-code\"") },
//{NotificationType::NewAppAvailable, NotificationLevel::ImportantNotification, 20, _u8L("New vesion of PrusaSlicer is available.", _u8L("Download page.") },
//{NotificationType::LoadingFailed, NotificationLevel::RegularNotification, 20, _u8L("Loading of model has Failed") },
//{NotificationType::DeviceEjected, NotificationLevel::RegularNotification, 10, _u8L("Removable device has been safely ejected")} // if we want changeble text (like here name of device), we need to do it as CustomNotification
};
namespace {
=======
namespace { namespace {
/* // not used? /* // not used?
>>>>>>> master
ImFont* add_default_font(float pixel_size) ImFont* add_default_font(float pixel_size)
{ {
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();
@ -71,11 +45,7 @@ namespace {
ImFont* font = io.Fonts->AddFontDefault(&config); ImFont* font = io.Fonts->AddFontDefault(&config);
return font; return font;
} }
<<<<<<< HEAD
=======
*/ */
>>>>>>> master
inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, float current_fade_opacity) inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, float current_fade_opacity)
{ {
if (fading_out) if (fading_out)
@ -218,33 +188,6 @@ void NotificationManager::PopNotification::render(GLCanvas3D& canvas, float init
} }
// color change based on fading out // color change based on fading out
<<<<<<< HEAD
bool fading_pop = false;
if (m_fading_out) {
push_style_color(ImGuiCol_WindowBg, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg), m_fading_out, m_current_fade_opacity);
push_style_color(ImGuiCol_Text, ImGui::GetStyleColorVec4(ImGuiCol_Text), m_fading_out, m_current_fade_opacity);
fading_pop = true;
}
// background color
if (m_is_gray) {
ImVec4 backcolor(0.7f, 0.7f, 0.7f, 0.5f);
push_style_color(ImGuiCol_WindowBg, backcolor, m_fading_out, m_current_fade_opacity);
}
else if (m_data.level == NotificationLevel::ErrorNotification) {
ImVec4 backcolor = ImGui::GetStyleColorVec4(ImGuiCol_WindowBg);
backcolor.x += 0.3f;
push_style_color(ImGuiCol_WindowBg, backcolor, m_fading_out, m_current_fade_opacity);
}
else if (m_data.level == NotificationLevel::WarningNotification) {
ImVec4 backcolor = ImGui::GetStyleColorVec4(ImGuiCol_WindowBg);
backcolor.x += 0.3f;
backcolor.y += 0.15f;
push_style_color(ImGuiCol_WindowBg, backcolor, m_fading_out, m_current_fade_opacity);
}
// name of window - probably indentifies window and is shown so last_end add whitespaces according to id
=======
if (m_state == EState::FadingOut) { if (m_state == EState::FadingOut) {
push_style_color(ImGuiCol_WindowBg, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg), true, m_current_fade_opacity); push_style_color(ImGuiCol_WindowBg, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg), true, m_current_fade_opacity);
push_style_color(ImGuiCol_Text, ImGui::GetStyleColorVec4(ImGuiCol_Text), true, m_current_fade_opacity); push_style_color(ImGuiCol_Text, ImGui::GetStyleColorVec4(ImGuiCol_Text), true, m_current_fade_opacity);
@ -256,7 +199,6 @@ void NotificationManager::PopNotification::render(GLCanvas3D& canvas, float init
// name of window indentifies window - has to be unique string // name of window indentifies window - has to be unique string
>>>>>>> master
if (m_id == 0) if (m_id == 0)
m_id = m_id_provider.allocate_id(); m_id = m_id_provider.allocate_id();
std::string name = "!!Ntfctn" + std::to_string(m_id); std::string name = "!!Ntfctn" + std::to_string(m_id);
@ -281,131 +223,6 @@ void NotificationManager::PopNotification::render(GLCanvas3D& canvas, float init
} }
bool NotificationManager::PopNotification::push_background_color() bool NotificationManager::PopNotification::push_background_color()
{ {
<<<<<<< HEAD
if (!m_initialized) {
init();
}
if (m_finished)
return RenderResult::Finished;
if (m_close_pending) {
// request of extra frame will be done in caller function by ret val ClosePending
m_finished = true;
return RenderResult::ClosePending;
}
if (m_hidden) {
m_top_y = initial_y - GAP_WIDTH;
return RenderResult::Static;
}
RenderResult ret_val = m_counting_down ? RenderResult::Countdown : RenderResult::Static;
Size cnv_size = canvas.get_canvas_size();
ImGuiWrapper& imgui = *wxGetApp().imgui();
bool shown = true;
ImVec2 mouse_pos = ImGui::GetMousePos();
float right_gap = SPACE_RIGHT_PANEL + (move_from_overlay ? overlay_width + m_line_height * 5 : 0);
if (m_line_height != ImGui::CalcTextSize("A").y)
init();
set_next_window_size(imgui);
//top y of window
m_top_y = initial_y + m_window_height;
//top right position
ImVec2 win_pos(1.0f * (float)cnv_size.get_width() - right_gap, 1.0f * (float)cnv_size.get_height() - m_top_y);
imgui.set_next_window_pos(win_pos.x, win_pos.y, ImGuiCond_Always, 1.0f, 0.0f);
imgui.set_next_window_size(m_window_width, m_window_height, ImGuiCond_Always);
//find if hovered
if (mouse_pos.x < win_pos.x && mouse_pos.x > win_pos.x - m_window_width && mouse_pos.y > win_pos.y&& mouse_pos.y < win_pos.y + m_window_height)
{
ImGui::SetNextWindowFocus();
ret_val = RenderResult::Hovered;
//reset fading
m_fading_out = false;
m_current_fade_opacity = 1.f;
m_remaining_time = m_data.duration;
m_countdown_frame = 0;
}
if (m_counting_down && m_remaining_time < 0)
m_close_pending = true;
if (m_close_pending) {
// request of extra frame will be done in caller function by ret val ClosePending
m_finished = true;
return RenderResult::ClosePending;
}
// color change based on fading out
bool fading_pop = false;
if (m_fading_out) {
if (!m_paused)
m_current_fade_opacity -= 1.f / ((m_fading_time + 1.f) * 60.f);
push_style_color(ImGuiCol_WindowBg, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg), m_fading_out, m_current_fade_opacity);
push_style_color(ImGuiCol_Text, ImGui::GetStyleColorVec4(ImGuiCol_Text), m_fading_out, m_current_fade_opacity);
fading_pop = true;
}
// background color
if (m_is_gray) {
ImVec4 backcolor(0.7f, 0.7f, 0.7f, 0.5f);
push_style_color(ImGuiCol_WindowBg, backcolor, m_fading_out, m_current_fade_opacity);
} else if (m_data.level == NotificationLevel::ErrorNotification) {
ImVec4 backcolor = ImGui::GetStyleColorVec4(ImGuiCol_WindowBg);
backcolor.x += 0.3f;
push_style_color(ImGuiCol_WindowBg, backcolor, m_fading_out, m_current_fade_opacity);
} else if (m_data.level == NotificationLevel::WarningNotification) {
ImVec4 backcolor = ImGui::GetStyleColorVec4(ImGuiCol_WindowBg);
backcolor.x += 0.3f;
backcolor.y += 0.15f;
push_style_color(ImGuiCol_WindowBg, backcolor, m_fading_out, m_current_fade_opacity);
}
//name of window - probably indentifies window and is shown so last_end add whitespaces according to id
if (! m_id)
m_id = m_id_provider.allocate_id();
std::string name;
{
// Create a unique ImGUI window name. The name may be recycled using a name of an already released notification.
char buf[32];
sprintf(buf, "!!Ntfctn%d", m_id);
name = buf;
}
if (imgui.begin(name, &shown, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar )) {
if (shown) {
ImVec2 win_size = ImGui::GetWindowSize();
//FIXME: dont forget to us this for texts
//GUI::format(_utf8(L()));
/*
//countdown numbers
ImGui::SetCursorPosX(15);
ImGui::SetCursorPosY(15);
imgui.text(std::to_string(m_remaining_time).c_str());
*/
if(m_counting_down)
render_countdown(imgui, win_size.x, win_size.y, win_pos.x, win_pos.y);
render_left_sign(imgui);
render_text(imgui, win_size.x, win_size.y, win_pos.x, win_pos.y);
render_close_button(imgui, win_size.x, win_size.y, win_pos.x, win_pos.y);
m_minimize_b_visible = false;
if (m_multiline && m_lines_count > 3)
render_minimize_button(imgui, win_pos.x, win_pos.y);
} else {
// the user clicked on the [X] button ( ImGuiWindowFlags_NoTitleBar means theres no [X] button)
m_close_pending = true;
canvas.set_as_dirty();
}
}
imgui.end();
if (fading_pop) {
ImGui::PopStyleColor();
ImGui::PopStyleColor();
=======
if (m_is_gray) { if (m_is_gray) {
ImVec4 backcolor(0.7f, 0.7f, 0.7f, 0.5f); ImVec4 backcolor(0.7f, 0.7f, 0.7f, 0.5f);
push_style_color(ImGuiCol_WindowBg, backcolor, m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_WindowBg, backcolor, m_state == EState::FadingOut, m_current_fade_opacity);
@ -423,7 +240,6 @@ bool NotificationManager::PopNotification::push_background_color()
backcolor.y += 0.15f; backcolor.y += 0.15f;
push_style_color(ImGuiCol_WindowBg, backcolor, m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_WindowBg, backcolor, m_state == EState::FadingOut, m_current_fade_opacity);
return true; return true;
>>>>>>> master
} }
return false; return false;
} }
@ -448,18 +264,12 @@ void NotificationManager::PopNotification::count_spaces()
void NotificationManager::PopNotification::count_lines() void NotificationManager::PopNotification::count_lines()
{ {
<<<<<<< HEAD
std::string text = m_text1;
int last_end = 0;
m_lines_count = 0;
=======
std::string text = m_text1; std::string text = m_text1;
size_t last_end = 0; size_t last_end = 0;
m_lines_count = 0; m_lines_count = 0;
if (text.empty()) if (text.empty())
return; return;
>>>>>>> master
m_endlines.clear(); m_endlines.clear();
while (last_end < text.length() - 1) while (last_end < text.length() - 1)
@ -474,15 +284,9 @@ void NotificationManager::PopNotification::count_lines()
// find next suitable endline // find next suitable endline
if (ImGui::CalcTextSize(text.substr(last_end).c_str()).x >= m_window_width - m_window_width_offset) { if (ImGui::CalcTextSize(text.substr(last_end).c_str()).x >= m_window_width - m_window_width_offset) {
// more than one line till end // more than one line till end
<<<<<<< HEAD
int next_space = text.find_first_of(' ', last_end);
if (next_space > 0 && next_space < text.length()) {
int next_space_candidate = text.find_first_of(' ', next_space + 1);
=======
size_t next_space = text.find_first_of(' ', last_end); size_t next_space = text.find_first_of(' ', last_end);
if (next_space > 0 && next_space < text.length()) { if (next_space > 0 && next_space < text.length()) {
size_t next_space_candidate = text.find_first_of(' ', next_space + 1); size_t next_space_candidate = text.find_first_of(' ', next_space + 1);
>>>>>>> master
while (next_space_candidate > 0 && ImGui::CalcTextSize(text.substr(last_end, next_space_candidate - last_end).c_str()).x < m_window_width - m_window_width_offset) { while (next_space_candidate > 0 && ImGui::CalcTextSize(text.substr(last_end, next_space_candidate - last_end).c_str()).x < m_window_width - m_window_width_offset) {
next_space = next_space_candidate; next_space = next_space_candidate;
next_space_candidate = text.find_first_of(' ', next_space + 1); next_space_candidate = text.find_first_of(' ', next_space + 1);
@ -491,13 +295,6 @@ void NotificationManager::PopNotification::count_lines()
next_space = text.length(); next_space = text.length();
} }
// when one word longer than line. // when one word longer than line.
<<<<<<< HEAD
if (ImGui::CalcTextSize(text.substr(last_end, next_space - last_end).c_str()).x > m_window_width - m_window_width_offset) {
float width_of_a = ImGui::CalcTextSize("a").x;
int letter_count = (int)((m_window_width - m_window_width_offset) / width_of_a);
while (last_end + letter_count < text.size() && ImGui::CalcTextSize(text.substr(last_end, letter_count).c_str()).x < m_window_width - m_window_width_offset) {
letter_count++;
=======
if (ImGui::CalcTextSize(text.substr(last_end, next_space - last_end).c_str()).x > m_window_width - m_window_width_offset || if (ImGui::CalcTextSize(text.substr(last_end, next_space - last_end).c_str()).x > m_window_width - m_window_width_offset ||
ImGui::CalcTextSize(text.substr(last_end, next_space - last_end).c_str()).x < (m_window_width - m_window_width_offset) / 4 * 3 ImGui::CalcTextSize(text.substr(last_end, next_space - last_end).c_str()).x < (m_window_width - m_window_width_offset) / 4 * 3
) { ) {
@ -505,7 +302,6 @@ void NotificationManager::PopNotification::count_lines()
int letter_count = (int)((m_window_width - m_window_width_offset) / width_of_a); int letter_count = (int)((m_window_width - m_window_width_offset) / width_of_a);
while (last_end + letter_count < text.size() && ImGui::CalcTextSize(text.substr(last_end, letter_count).c_str()).x < m_window_width - m_window_width_offset) { while (last_end + letter_count < text.size() && ImGui::CalcTextSize(text.substr(last_end, letter_count).c_str()).x < m_window_width - m_window_width_offset) {
letter_count += get_utf8_sequence_length(text, last_end + letter_count); letter_count += get_utf8_sequence_length(text, last_end + letter_count);
>>>>>>> master
} }
m_endlines.push_back(last_end + letter_count); m_endlines.push_back(last_end + letter_count);
last_end += letter_count; last_end += letter_count;
@ -530,8 +326,6 @@ void NotificationManager::PopNotification::count_lines()
m_lines_count++; m_lines_count++;
} }
} }
<<<<<<< HEAD
=======
// m_text_2 (text after hypertext) is not used for regular notifications right now. // m_text_2 (text after hypertext) is not used for regular notifications right now.
// its caluculation is in HintNotification::count_lines() // its caluculation is in HintNotification::count_lines()
@ -546,7 +340,6 @@ void NotificationManager::PopNotification::init()
count_spaces(); count_spaces();
count_lines(); count_lines();
>>>>>>> master
if (m_lines_count == 3) if (m_lines_count == 3)
m_multiline = true; m_multiline = true;
m_notification_start = GLCanvas3D::timestamp_now(); m_notification_start = GLCanvas3D::timestamp_now();
@ -563,104 +356,6 @@ void NotificationManager::PopNotification::set_next_window_size(ImGuiWrapper& im
void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y) void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
{ {
<<<<<<< HEAD
ImVec2 win_size(win_size_x, win_size_y);
ImVec2 win_pos(win_pos_x, win_pos_y);
float x_offset = m_left_indentation;
std::string fulltext = m_text1 + m_hypertext; //+ m_text2;
ImVec2 text_size = ImGui::CalcTextSize(fulltext.c_str());
// text posistions are calculated by lines count
// large texts has "more" button or are displayed whole
// smaller texts are divided as one liners and two liners
if (m_lines_count > 2) {
if (m_multiline) {
int last_end = 0;
float starting_y = m_line_height/2;//10;
float shift_y = m_line_height;// -m_line_height / 20;
std::string line;
for (size_t i = 0; i < m_lines_count; i++) {
line.clear();
ImGui::SetCursorPosX(x_offset);
ImGui::SetCursorPosY(starting_y + i * shift_y);
if (m_endlines.size() > i && m_text1.size() >= m_endlines[i]) {
line = m_text1.substr(last_end, m_endlines[i] - last_end);
last_end = m_endlines[i];
if (m_text1.size() > m_endlines[i])
last_end += (m_text1[m_endlines[i]] == '\n' || m_text1[m_endlines[i]] == ' ' ? 1 : 0);
imgui.text(line.c_str());
}
}
//hyperlink text
if (!m_hypertext.empty()) {
render_hypertext(imgui, x_offset + ImGui::CalcTextSize((line + (line.empty() ? "" : " ")).c_str()).x, starting_y + (m_lines_count - 1) * shift_y, m_hypertext);
}
} else {
// line1
if (m_text1.size() >= m_endlines[0]) {
ImGui::SetCursorPosX(x_offset);
ImGui::SetCursorPosY(win_size.y / 2 - win_size.y / 6 - m_line_height / 2);
imgui.text(m_text1.substr(0, m_endlines[0]).c_str());
}
// line2
std::string line;
ImGui::SetCursorPosX(x_offset);
ImGui::SetCursorPosY(win_size.y / 2 + win_size.y / 6 - m_line_height / 2);
if (m_text1.size() >= m_endlines[1]) {
line = m_text1.substr(m_endlines[0] + (m_text1[m_endlines[0]] == '\n' || m_text1[m_endlines[0]] == ' ' ? 1 : 0), m_endlines[1] - m_endlines[0] - (m_text1[m_endlines[0]] == '\n' || m_text1[m_endlines[0]] == ' ' ? 1 : 0));
if (ImGui::CalcTextSize(line.c_str()).x > m_window_width - m_window_width_offset - ImGui::CalcTextSize((".." + _u8L("More")).c_str()).x) {
line = line.substr(0, line.length() - 6);
line += "..";
} else
line += " ";
imgui.text(line.c_str());
}
// "More" hypertext
render_hypertext(imgui, x_offset + ImGui::CalcTextSize(line.c_str()).x, win_size.y / 2 + win_size.y / 6 - m_line_height / 2, _u8L("More"), true);
}
} else {
//text 1
float cursor_y = win_size.y / 2 - text_size.y / 2;
float cursor_x = x_offset;
if(m_lines_count > 1) {
// line1
if (m_text1.length() >= m_endlines[0]) { // could be equal than substr takes whole string
ImGui::SetCursorPosX(x_offset);
ImGui::SetCursorPosY(win_size.y / 2 - win_size.y / 6 - m_line_height / 2);
imgui.text(m_text1.substr(0, m_endlines[0]).c_str());
}
// line2
ImGui::SetCursorPosX(x_offset);
cursor_y = win_size.y / 2 + win_size.y / 6 - m_line_height / 2;
ImGui::SetCursorPosY(cursor_y);
if (m_text1.length() > m_endlines[0]) { // must be greater otherwise theres nothing to show and m_text1[m_endlines[0]] is beyond last letter
std::string line = m_text1.substr(m_endlines[0] + (m_text1[m_endlines[0]] == '\n' || m_text1[m_endlines[0]] == ' ' ? 1 : 0));
imgui.text(line.c_str());
cursor_x = x_offset + ImGui::CalcTextSize(line.c_str()).x;
}
} else {
ImGui::SetCursorPosX(x_offset);
ImGui::SetCursorPosY(cursor_y);
imgui.text(m_text1.c_str());
cursor_x = x_offset + ImGui::CalcTextSize(m_text1.c_str()).x;
}
//hyperlink text
if (!m_hypertext.empty()) {
render_hypertext(imgui, cursor_x + 4, cursor_y, m_hypertext);
}
//notification text 2
//text 2 is suposed to be after the hyperlink - currently it is not used
/*
if (!m_text2.empty())
{
ImVec2 part_size = ImGui::CalcTextSize(m_hypertext.c_str());
ImGui::SetCursorPosX(win_size.x / 2 + text_size.x / 2 - part_size.x + 8 - x_offset);
ImGui::SetCursorPosY(cursor_y);
imgui.text(m_text2.c_str());
=======
float x_offset = m_left_indentation; float x_offset = m_left_indentation;
int last_end = 0; int last_end = 0;
float starting_y = (m_lines_count == 2 ? win_size_y / 2 - m_line_height : (m_lines_count == 1 ? win_size_y / 2 - m_line_height / 2 : m_line_height / 2)); float starting_y = (m_lines_count == 2 ? win_size_y / 2 - m_line_height : (m_lines_count == 1 ? win_size_y / 2 - m_line_height / 2 : m_line_height / 2));
@ -689,7 +384,6 @@ void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, cons
if (m_text1.size() > m_endlines[i]) if (m_text1.size() > m_endlines[i])
last_end += (m_text1[m_endlines[i]] == '\n' || m_text1[m_endlines[i]] == ' ' ? 1 : 0); last_end += (m_text1[m_endlines[i]] == '\n' || m_text1[m_endlines[i]] == ' ' ? 1 : 0);
imgui.text(line.c_str()); imgui.text(line.c_str());
>>>>>>> master
} }
} }
//hyperlink text //hyperlink text
@ -732,11 +426,7 @@ void NotificationManager::PopNotification::render_hypertext(ImGuiWrapper& imgui,
orange_color.y += 0.2f; orange_color.y += 0.2f;
//text //text
<<<<<<< HEAD
push_style_color(ImGuiCol_Text, orange_color, m_fading_out, m_current_fade_opacity);
=======
push_style_color(ImGuiCol_Text, orange_color, m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_Text, orange_color, m_state == EState::FadingOut, m_current_fade_opacity);
>>>>>>> master
ImGui::SetCursorPosX(text_x); ImGui::SetCursorPosX(text_x);
ImGui::SetCursorPosY(text_y); ImGui::SetCursorPosY(text_y);
imgui.text(text.c_str()); imgui.text(text.c_str());
@ -757,13 +447,8 @@ void NotificationManager::PopNotification::render_close_button(ImGuiWrapper& img
ImVec2 win_pos(win_pos_x, win_pos_y); ImVec2 win_pos(win_pos_x, win_pos_y);
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f)); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f)); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f));
<<<<<<< HEAD
push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_fading_out, m_current_fade_opacity);
push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_fading_out, m_current_fade_opacity);
=======
push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
>>>>>>> master
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(.0f, .0f, .0f, .0f)); ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(.0f, .0f, .0f, .0f));
@ -815,15 +500,9 @@ void NotificationManager::PopNotification::render_minimize_button(ImGuiWrapper&
{ {
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f)); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f)); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f));
<<<<<<< HEAD
push_style_color(ImGuiCol_ButtonActive, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg), m_fading_out, m_current_fade_opacity);
push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_fading_out, m_current_fade_opacity);
push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_fading_out, m_current_fade_opacity);
=======
push_style_color(ImGuiCol_ButtonActive, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg), m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_ButtonActive, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg), m_state == EState::FadingOut, m_current_fade_opacity);
push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
>>>>>>> master
//button - if part if treggered //button - if part if treggered
@ -971,10 +650,7 @@ void NotificationManager::ExportFinishedNotification::render_text(ImGuiWrapper&
float starting_y = m_line_height / 2;//10; float starting_y = m_line_height / 2;//10;
float shift_y = m_line_height;// -m_line_height / 20; float shift_y = m_line_height;// -m_line_height / 20;
for (size_t i = 0; i < m_lines_count; i++) { for (size_t i = 0; i < m_lines_count; i++) {
<<<<<<< HEAD
=======
assert(m_text1.size() >= m_endlines[i]); assert(m_text1.size() >= m_endlines[i]);
>>>>>>> master
if (m_text1.size() >= m_endlines[i]) { if (m_text1.size() >= m_endlines[i]) {
std::string line = m_text1.substr(last_end, m_endlines[i] - last_end); std::string line = m_text1.substr(last_end, m_endlines[i] - last_end);
last_end = m_endlines[i]; last_end = m_endlines[i];
@ -984,11 +660,7 @@ void NotificationManager::ExportFinishedNotification::render_text(ImGuiWrapper&
ImGui::SetCursorPosY(starting_y + i * shift_y); ImGui::SetCursorPosY(starting_y + i * shift_y);
imgui.text(line.c_str()); imgui.text(line.c_str());
//hyperlink text //hyperlink text
<<<<<<< HEAD
if ( i == 0 ) {
=======
if ( i == 0 && !m_eject_pending) { if ( i == 0 && !m_eject_pending) {
>>>>>>> master
render_hypertext(imgui, x_offset + ImGui::CalcTextSize(line.c_str()).x + ImGui::CalcTextSize(" ").x, starting_y, _u8L("Open Folder.")); render_hypertext(imgui, x_offset + ImGui::CalcTextSize(line.c_str()).x + ImGui::CalcTextSize(" ").x, starting_y, _u8L("Open Folder."));
} }
} }
@ -1009,13 +681,8 @@ void NotificationManager::ExportFinishedNotification::render_eject_button(ImGuiW
ImVec2 win_pos(win_pos_x, win_pos_y); ImVec2 win_pos(win_pos_x, win_pos_y);
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f)); ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f)); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f));
<<<<<<< HEAD
push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_fading_out, m_current_fade_opacity);
push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_fading_out, m_current_fade_opacity);
=======
push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity); push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
>>>>>>> master
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(.0f, .0f, .0f, .0f)); ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(.0f, .0f, .0f, .0f));
std::string button_text; std::string button_text;
@ -1961,13 +1628,6 @@ void NotificationManager::set_upload_job_notification_percentage(int id, const s
} }
void NotificationManager::upload_job_notification_show_canceled(int id, const std::string& filename, const std::string& host) void NotificationManager::upload_job_notification_show_canceled(int id, const std::string& filename, const std::string& host)
{ {
<<<<<<< HEAD
auto it = std::find_if(std::begin(basic_notifications), std::end(basic_notifications),
boost::bind(&NotificationData::type, boost::placeholders::_1) == type);
assert(it != std::end(basic_notifications));
if (it != std::end(basic_notifications))
push_notification_data(*it, timestamp);
=======
for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) { for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
if (notification->get_type() == NotificationType::PrintHostUpload) { if (notification->get_type() == NotificationType::PrintHostUpload) {
PrintHostUploadNotification* phun = dynamic_cast<PrintHostUploadNotification*>(notification.get()); PrintHostUploadNotification* phun = dynamic_cast<PrintHostUploadNotification*>(notification.get());
@ -1978,7 +1638,6 @@ void NotificationManager::upload_job_notification_show_canceled(int id, const st
} }
} }
} }
>>>>>>> master
} }
void NotificationManager::upload_job_notification_show_error(int id, const std::string& filename, const std::string& host) void NotificationManager::upload_job_notification_show_error(int id, const std::string& filename, const std::string& host)
{ {

View File

@ -600,17 +600,6 @@ private:
bool update_state(bool paused, const int64_t delta) override; bool update_state(bool paused, const int64_t delta) override;
// Own // Own
protected: protected:
<<<<<<< HEAD
void init();
void render_text(ImGuiWrapper& imgui,
const float win_size_x, const float win_size_y,
const float win_pos_x, const float win_pos_y) override;
void render_bar(ImGuiWrapper& imgui,
const float win_size_x, const float win_size_y,
const float win_pos_x, const float win_pos_y);
bool m_progress_complete{ false };
float m_percentage;
=======
int m_range { 100 }; int m_range { 100 };
CancelFn m_cancel_callback { nullptr }; CancelFn m_cancel_callback { nullptr };
ProgressIndicatorState m_progress_state { ProgressIndicatorState::PIS_HIDDEN }; ProgressIndicatorState m_progress_state { ProgressIndicatorState::PIS_HIDDEN };
@ -622,7 +611,6 @@ private:
const float win_size_x, const float win_size_y, const float win_size_x, const float win_size_y,
const float win_pos_x, const float win_pos_y) override; const float win_pos_x, const float win_pos_y) override;
void on_cancel_button() { if (m_cancel_callback) m_cancel_callback(); } void on_cancel_button() { if (m_cancel_callback) m_cancel_callback(); }
>>>>>>> master
}; };
class ExportFinishedNotification : public PopNotification class ExportFinishedNotification : public PopNotification
@ -649,20 +637,13 @@ private:
void render_close_button(ImGuiWrapper& imgui, void render_close_button(ImGuiWrapper& imgui,
const float win_size_x, const float win_size_y, const float win_size_x, const float win_size_y,
const float win_pos_x, const float win_pos_y) override; const float win_pos_x, const float win_pos_y) override;
<<<<<<< HEAD
void render_eject_button(ImGuiWrapper& imgui,
=======
void render_eject_button(ImGuiWrapper& imgui, void render_eject_button(ImGuiWrapper& imgui,
>>>>>>> master
const float win_size_x, const float win_size_y, const float win_size_x, const float win_size_y,
const float win_pos_x, const float win_pos_y); const float win_pos_x, const float win_pos_y);
void render_minimize_button(ImGuiWrapper& imgui, const float win_pos_x, const float win_pos_y) override void render_minimize_button(ImGuiWrapper& imgui, const float win_pos_x, const float win_pos_y) override
{ m_minimize_b_visible = false; } { m_minimize_b_visible = false; }
bool on_text_click() override; bool on_text_click() override;
<<<<<<< HEAD
=======
void on_eject_click(); void on_eject_click();
>>>>>>> master
// local time of last hover for showing tooltip // local time of last hover for showing tooltip
long m_hover_time { 0 }; long m_hover_time { 0 };
bool m_eject_pending { false }; bool m_eject_pending { false };
@ -766,9 +747,6 @@ private:
NotificationType::SimplifySuggestion NotificationType::SimplifySuggestion
}; };
//prepared (basic) notifications //prepared (basic) notifications
<<<<<<< HEAD
static const NotificationData basic_notifications[];
=======
// non-static so its not loaded too early. If static, the translations wont load correctly. // non-static so its not loaded too early. If static, the translations wont load correctly.
const std::vector<NotificationData> basic_notifications = { const std::vector<NotificationData> basic_notifications = {
{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotificationLevel, 10, _u8L("3D Mouse disconnected.") }, {NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotificationLevel, 10, _u8L("3D Mouse disconnected.") },
@ -800,7 +778,6 @@ private:
//{NotificationType::DeviceEjected, NotificationLevel::RegularNotificationLevel, 10, _u8L("Removable device has been safely ejected")} // if we want changeble text (like here name of device), we need to do it as CustomNotification //{NotificationType::DeviceEjected, NotificationLevel::RegularNotificationLevel, 10, _u8L("Removable device has been safely ejected")} // if we want changeble text (like here name of device), we need to do it as CustomNotification
}; };
>>>>>>> master
}; };
}//namespace GUI }//namespace GUI

View File

@ -528,18 +528,6 @@ void PhysicalPrinterDialog::update_host_type(bool printer_change)
std::string preset_name = prstft->get_preset_name(); std::string preset_name = prstft->get_preset_name();
if (Preset* preset = wxGetApp().preset_bundle->printers.find_preset(preset_name)) { if (Preset* preset = wxGetApp().preset_bundle->printers.find_preset(preset_name)) {
std::string model_id = preset->config.opt_string("printer_model"); std::string model_id = preset->config.opt_string("printer_model");
<<<<<<< HEAD
if (preset->vendor && preset->vendor->name == "Prusa Research") {
const std::vector<VendorProfile::PrinterModel>& models = preset->vendor->models;
auto it = std::find_if(models.begin(), models.end(),
[model_id](const VendorProfile::PrinterModel& model) { return model.id == model_id; });
if (it != models.end() && it->family == "MK3")
continue;
} else if (!preset->vendor && model_id.rfind("MK3", 0) == 0) {
continue;
}
=======
auto model_supports_prusalink = [](const std::string &model) { auto model_supports_prusalink = [](const std::string &model) {
return model.size() >= 3 && return model.size() >= 3 &&
((boost::starts_with(model, "MK") && model[2] > '2' && model[2] <= '9') || ((boost::starts_with(model, "MK") && model[2] > '2' && model[2] <= '9') ||
@ -555,7 +543,6 @@ void PhysicalPrinterDialog::update_host_type(bool printer_change)
} }
} else if (model_supports_prusalink(model_id)) } else if (model_supports_prusalink(model_id))
continue; continue;
>>>>>>> master
} }
all_presets_are_from_mk3_family = false; all_presets_are_from_mk3_family = false;
break; break;

View File

@ -3678,12 +3678,7 @@ void Plater::priv::reload_from_disk()
try try
{ {
new_model = Model::read_from_file(path, nullptr, nullptr, Model::LoadAttribute::AddDefaultInstances); new_model = Model::read_from_file(path, nullptr, nullptr, Model::LoadAttribute::AddDefaultInstances);
<<<<<<< HEAD
for (ModelObject* model_object : new_model.objects)
{
=======
for (ModelObject* model_object : new_model.objects) { for (ModelObject* model_object : new_model.objects) {
>>>>>>> master
model_object->center_around_origin(); model_object->center_around_origin();
model_object->ensure_on_bed(); model_object->ensure_on_bed();
} }
@ -5400,10 +5395,6 @@ bool Plater::load_files(const wxArrayString& filenames)
assert(false); assert(false);
break; break;
} }
case LoadType::Unknown : {
assert(false);
break;
}
} }
return true; return true;
@ -5716,17 +5707,10 @@ void Plater::export_gcode(bool prefer_removable)
wxFileDialog dlg(this, (printer_technology() == ptFFF) ? _L("Save G-code file as:") : _L("Save SL1 / SL1S file as:"), wxFileDialog dlg(this, (printer_technology() == ptFFF) ? _L("Save G-code file as:") : _L("Save SL1 / SL1S file as:"),
start_dir, start_dir,
from_path(default_output_file.filename()), from_path(default_output_file.filename()),
<<<<<<< HEAD
GUI::file_wildcards((printer_technology() == ptFFF) ? FT_GCODE : boost::iequals(ext, ".sl1s") ? FT_SL1S : FT_SL1, ext),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT
);
if (dlg.ShowModal() == wxID_OK)
=======
GUI::file_wildcards((printer_technology() == ptFFF) ? FT_GCODE : FT_SL1, ext), GUI::file_wildcards((printer_technology() == ptFFF) ? FT_GCODE : FT_SL1, ext),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT wxFD_SAVE | wxFD_OVERWRITE_PROMPT
); );
if (dlg.ShowModal() == wxID_OK) { if (dlg.ShowModal() == wxID_OK) {
>>>>>>> master
output_path = into_path(dlg.GetPath()); output_path = into_path(dlg.GetPath());
while (has_illegal_filename_characters(output_path.filename().string())) { while (has_illegal_filename_characters(output_path.filename().string())) {
show_error(this, _L("The provided file name is not valid.") + "\n" + show_error(this, _L("The provided file name is not valid.") + "\n" +
@ -6365,18 +6349,6 @@ void Plater::force_print_bed_update()
void Plater::on_activate() void Plater::on_activate()
{ {
<<<<<<< HEAD
#if defined(__linux__) || defined(_WIN32)
// Activating the main frame, and no window has keyboard focus.
// Set the keyboard focus to the visible Canvas3D.
if (this->p->view3D->IsShown() && wxWindow::FindFocus() != this->p->view3D->get_wxglcanvas())
CallAfter([this]() { this->p->view3D->get_wxglcanvas()->SetFocus(); });
else if (this->p->preview->IsShown() && wxWindow::FindFocus() != this->p->view3D->get_wxglcanvas())
CallAfter([this]() { this->p->preview->get_wxglcanvas()->SetFocus(); });
#endif
=======
>>>>>>> master
this->p->show_delayed_error_message(); this->p->show_delayed_error_message();
} }

View File

@ -235,11 +235,7 @@ std::vector<DriveData> RemovableDriveManager::search_for_removable_drives() cons
#else #else
<<<<<<< HEAD
if (platform_flavor() == PlatformFlavor::LinuxOnChromium) {
=======
if (platform_flavor() == PlatformFlavor::LinuxOnChromium) { if (platform_flavor() == PlatformFlavor::LinuxOnChromium) {
>>>>>>> master
// ChromeOS specific: search /mnt/chromeos/removable/* folder // ChromeOS specific: search /mnt/chromeos/removable/* folder
search_for_drives_internal::search_path("/mnt/chromeos/removable/*", "/mnt/chromeos/removable", current_drives); search_for_drives_internal::search_path("/mnt/chromeos/removable/*", "/mnt/chromeos/removable", current_drives);
} else { } else {
@ -247,11 +243,7 @@ std::vector<DriveData> RemovableDriveManager::search_for_removable_drives() cons
search_for_drives_internal::search_path("/media/*", "/media", current_drives); search_for_drives_internal::search_path("/media/*", "/media", current_drives);
//search_path("/Volumes/*", "/Volumes"); //search_path("/Volumes/*", "/Volumes");
<<<<<<< HEAD
std::string path(std::getenv("USER"));
=======
std::string path = wxGetUserId().ToUTF8().data(); std::string path = wxGetUserId().ToUTF8().data();
>>>>>>> master
std::string pp(path); std::string pp(path);
//search /media/USERNAME/* folder //search /media/USERNAME/* folder
@ -460,11 +452,7 @@ RemovableDriveManager::RemovableDrivesStatus RemovableDriveManager::status()
RemovableDriveManager::RemovableDrivesStatus out; RemovableDriveManager::RemovableDrivesStatus out;
{ {
<<<<<<< HEAD
tbb::mutex::scoped_lock lock(m_drives_mutex);
=======
std::scoped_lock<std::mutex> lock(m_drives_mutex); std::scoped_lock<std::mutex> lock(m_drives_mutex);
>>>>>>> master
out.has_eject = out.has_eject =
// Cannot control eject on Chromium. // Cannot control eject on Chromium.
platform_flavor() != PlatformFlavor::LinuxOnChromium && platform_flavor() != PlatformFlavor::LinuxOnChromium &&

View File

@ -1199,26 +1199,6 @@ static wxString get_string_value(std::string opt_key, const DynamicPrintConfig&
return out; return out;
} }
<<<<<<< HEAD
wxString UnsavedChangesDialog::get_short_string(wxString full_string)
{
int max_len = 30;
if (full_string.IsEmpty() || full_string.StartsWith("#") ||
(full_string.Find("\n") == wxNOT_FOUND && full_string.Length() < size_t(max_len)))
return full_string;
m_has_long_strings = true;
int n_pos = full_string.Find("\n");
if (n_pos != wxNOT_FOUND && n_pos < max_len)
max_len = n_pos;
full_string.Truncate(max_len);
return full_string + dots;
}
=======
>>>>>>> master
void UnsavedChangesDialog::update(Preset::Type type, PresetCollection* dependent_presets, const std::string& new_selected_preset, const wxString& header) void UnsavedChangesDialog::update(Preset::Type type, PresetCollection* dependent_presets, const std::string& new_selected_preset, const wxString& header)
{ {
PresetCollection* presets = dependent_presets; PresetCollection* presets = dependent_presets;

View File

@ -93,13 +93,8 @@ bool MsgUpdateSlic3r::disable_version_check() const
MsgUpdateConfig::MsgUpdateConfig(const std::vector<Update> &updates, bool force_before_wizard/* = false*/) : MsgUpdateConfig::MsgUpdateConfig(const std::vector<Update> &updates, bool force_before_wizard/* = false*/) :
MsgDialog(nullptr, force_before_wizard ? _L("Opening Configuration Wizard") : _L("Configuration update"), MsgDialog(nullptr, force_before_wizard ? _L("Opening Configuration Wizard") : _L("Configuration update"),
force_before_wizard ? _L("PrusaSlicer is not using the newest configuration available.\n" force_before_wizard ? _L("PrusaSlicer is not using the newest configuration available.\n"
<<<<<<< HEAD
"Configuration Wizard may not offer the latest printers, filaments and SLA materials to be installed. ") :
_L("Configuration update is available"), wxID_NONE)
=======
"Configuration Wizard may not offer the latest printers, filaments and SLA materials to be installed.") : "Configuration Wizard may not offer the latest printers, filaments and SLA materials to be installed.") :
_L("Configuration update is available"), wxICON_ERROR) _L("Configuration update is available"), wxICON_ERROR)
>>>>>>> master
{ {
auto *text = new wxStaticText(this, wxID_ANY, _(L( auto *text = new wxStaticText(this, wxID_ANY, _(L(
"Would you like to install it?\n\n" "Would you like to install it?\n\n"
@ -144,27 +139,12 @@ MsgUpdateConfig::MsgUpdateConfig(const std::vector<Update> &updates, bool force_
content_sizer->Add(versions); content_sizer->Add(versions);
content_sizer->AddSpacer(2*VERT_SPACING); content_sizer->AddSpacer(2*VERT_SPACING);
<<<<<<< HEAD
auto* btn_ok = new wxButton(this, wxID_OK, force_before_wizard ? _L("Install") : "OK");
btn_sizer->Add(btn_ok);
btn_sizer->AddSpacer(HORIZ_SPACING);
if (force_before_wizard) {
auto* btn_no_install = new wxButton(this, wxID_ANY, _L("Don't install"));
btn_no_install->Bind(wxEVT_BUTTON, [this](wxEvent&) { this->EndModal(wxID_CLOSE); });
btn_sizer->Add(btn_no_install);
btn_sizer->AddSpacer(HORIZ_SPACING);
}
auto* btn_cancel = new wxButton(this, wxID_CANCEL);
btn_sizer->Add(btn_cancel);
btn_ok->SetFocus();
=======
add_button(wxID_OK, true, force_before_wizard ? _L("Install") : "OK"); add_button(wxID_OK, true, force_before_wizard ? _L("Install") : "OK");
if (force_before_wizard) { if (force_before_wizard) {
auto* btn = add_button(wxID_CLOSE, false, _L("Don't install")); auto* btn = add_button(wxID_CLOSE, false, _L("Don't install"));
btn->Bind(wxEVT_BUTTON, [this](const wxCommandEvent&) { this->EndModal(wxID_CLOSE); }); btn->Bind(wxEVT_BUTTON, [this](const wxCommandEvent&) { this->EndModal(wxID_CLOSE); });
} }
add_button(wxID_CANCEL); add_button(wxID_CANCEL);
>>>>>>> master
finalize(); finalize();
} }

View File

@ -323,15 +323,9 @@ void SL1Host::set_auth(Http &http) const
// PrusaLink // PrusaLink
PrusaLink::PrusaLink(DynamicPrintConfig* config) : PrusaLink::PrusaLink(DynamicPrintConfig* config) :
OctoPrint(config), OctoPrint(config),
<<<<<<< HEAD
authorization_type(dynamic_cast<const ConfigOptionEnum<AuthorizationType>*>(config->option("printhost_authorization_type"))->value),
username(config->opt_string("printhost_user")),
password(config->opt_string("printhost_password"))
=======
m_authorization_type(dynamic_cast<const ConfigOptionEnum<AuthorizationType>*>(config->option("printhost_authorization_type"))->value), m_authorization_type(dynamic_cast<const ConfigOptionEnum<AuthorizationType>*>(config->option("printhost_authorization_type"))->value),
m_username(config->opt_string("printhost_user")), m_username(config->opt_string("printhost_user")),
m_password(config->opt_string("printhost_password")) m_password(config->opt_string("printhost_password"))
>>>>>>> master
{ {
} }
@ -356,20 +350,12 @@ bool PrusaLink::validate_version_text(const boost::optional<std::string>& versio
void PrusaLink::set_auth(Http& http) const void PrusaLink::set_auth(Http& http) const
{ {
<<<<<<< HEAD
switch (authorization_type) {
=======
switch (m_authorization_type) { switch (m_authorization_type) {
>>>>>>> master
case atKeyPassword: case atKeyPassword:
http.header("X-Api-Key", get_apikey()); http.header("X-Api-Key", get_apikey());
break; break;
case atUserPassword: case atUserPassword:
<<<<<<< HEAD
http.auth_digest(username, password);
=======
http.auth_digest(m_username, m_password); http.auth_digest(m_username, m_password);
>>>>>>> master
break; break;
} }

View File

@ -96,31 +96,6 @@ private:
std::string m_password; std::string m_password;
}; };
class PrusaLink : public OctoPrint
{
public:
PrusaLink(DynamicPrintConfig* config);
~PrusaLink() override = default;
const char* get_name() const override;
wxString get_test_ok_msg() const override;
wxString get_test_failed_msg(wxString& msg) const override;
bool can_start_print() const override { return true; }
protected:
bool validate_version_text(const boost::optional<std::string>& version_text) const override;
private:
void set_auth(Http& http) const override;
// Host authorization type.
AuthorizationType authorization_type;
// username and password for HTTP Digest Authentization (RFC RFC2617)
std::string username;
std::string password;
};
} }
#endif #endif

View File

@ -772,10 +772,6 @@ void PresetUpdater::slic3r_update_notify()
} }
} }
<<<<<<< HEAD
static void reload_configs_update_gui()
{
=======
static bool reload_configs_update_gui() static bool reload_configs_update_gui()
{ {
wxString header = _L("Configuration Updates causes a lost of preset modification.\n" wxString header = _L("Configuration Updates causes a lost of preset modification.\n"
@ -783,7 +779,6 @@ static bool reload_configs_update_gui()
if (!GUI::wxGetApp().check_and_save_current_preset_changes(_L("Updating"), header, false )) if (!GUI::wxGetApp().check_and_save_current_preset_changes(_L("Updating"), header, false ))
return false; return false;
>>>>>>> master
// Reload global configuration // Reload global configuration
auto* app_config = GUI::wxGetApp().app_config; auto* app_config = GUI::wxGetApp().app_config;
// System profiles should not trigger any substitutions, user profiles may trigger substitutions, but these substitutions // System profiles should not trigger any substitutions, user profiles may trigger substitutions, but these substitutions
@ -792,12 +787,8 @@ static bool reload_configs_update_gui()
GUI::wxGetApp().preset_bundle->load_presets(*app_config, ForwardCompatibilitySubstitutionRule::EnableSilentDisableSystem); GUI::wxGetApp().preset_bundle->load_presets(*app_config, ForwardCompatibilitySubstitutionRule::EnableSilentDisableSystem);
GUI::wxGetApp().load_current_presets(); GUI::wxGetApp().load_current_presets();
GUI::wxGetApp().plater()->set_bed_shape(); GUI::wxGetApp().plater()->set_bed_shape();
<<<<<<< HEAD
GUI::wxGetApp().update_wizard_from_config();
=======
return true; return true;
>>>>>>> master
} }
PresetUpdater::UpdateResult PresetUpdater::config_update(const Semver& old_slic3r_version, UpdateParams params) const PresetUpdater::UpdateResult PresetUpdater::config_update(const Semver& old_slic3r_version, UpdateParams params) const
@ -870,15 +861,9 @@ PresetUpdater::UpdateResult PresetUpdater::config_update(const Semver& old_slic3
const auto res = dlg.ShowModal(); const auto res = dlg.ShowModal();
if (res == wxID_OK) { if (res == wxID_OK) {
BOOST_LOG_TRIVIAL(info) << "User wants to update..."; BOOST_LOG_TRIVIAL(info) << "User wants to update...";
<<<<<<< HEAD
if (! p->perform_updates(std::move(updates)))
return R_INCOMPAT_EXIT;
reload_configs_update_gui();
=======
if (! p->perform_updates(std::move(updates)) || if (! p->perform_updates(std::move(updates)) ||
! reload_configs_update_gui()) ! reload_configs_update_gui())
return R_INCOMPAT_EXIT; return R_INCOMPAT_EXIT;
>>>>>>> master
return R_UPDATE_INSTALLED; return R_UPDATE_INSTALLED;
} }
else { else {
@ -906,15 +891,9 @@ PresetUpdater::UpdateResult PresetUpdater::config_update(const Semver& old_slic3
const auto res = dlg.ShowModal(); const auto res = dlg.ShowModal();
if (res == wxID_OK) { if (res == wxID_OK) {
BOOST_LOG_TRIVIAL(debug) << "User agreed to perform the update"; BOOST_LOG_TRIVIAL(debug) << "User agreed to perform the update";
<<<<<<< HEAD
if (! p->perform_updates(std::move(updates)))
return R_ALL_CANCELED;
reload_configs_update_gui();
=======
if (! p->perform_updates(std::move(updates)) || if (! p->perform_updates(std::move(updates)) ||
! reload_configs_update_gui()) ! reload_configs_update_gui())
return R_ALL_CANCELED; return R_ALL_CANCELED;
>>>>>>> master
return R_UPDATE_INSTALLED; return R_UPDATE_INSTALLED;
} }
else { else {
@ -965,27 +944,19 @@ void PresetUpdater::on_update_notification_confirm()
const auto res = dlg.ShowModal(); const auto res = dlg.ShowModal();
if (res == wxID_OK) { if (res == wxID_OK) {
BOOST_LOG_TRIVIAL(debug) << "User agreed to perform the update"; BOOST_LOG_TRIVIAL(debug) << "User agreed to perform the update";
<<<<<<< HEAD
if (p->perform_updates(std::move(p->waiting_updates))) {
reload_configs_update_gui();
=======
if (p->perform_updates(std::move(p->waiting_updates)) && if (p->perform_updates(std::move(p->waiting_updates)) &&
reload_configs_update_gui()) { reload_configs_update_gui()) {
>>>>>>> master
p->has_waiting_updates = false; p->has_waiting_updates = false;
} }
} }
else { else {
BOOST_LOG_TRIVIAL(info) << "User refused the update"; BOOST_LOG_TRIVIAL(info) << "User refused the update";
} }
<<<<<<< HEAD
=======
} }
bool PresetUpdater::version_check_enabled() const bool PresetUpdater::version_check_enabled() const
{ {
return p->enabled_version_check; return p->enabled_version_check;
>>>>>>> master
} }
} }

View File

@ -52,10 +52,7 @@ PrintHost* PrintHost::get_print_host(DynamicPrintConfig *config)
case htAstroBox: return new AstroBox(config); case htAstroBox: return new AstroBox(config);
case htRepetier: return new Repetier(config); case htRepetier: return new Repetier(config);
case htPrusaLink: return new PrusaLink(config); case htPrusaLink: return new PrusaLink(config);
<<<<<<< HEAD
=======
case htMKS: return new MKS(config); case htMKS: return new MKS(config);
>>>>>>> master
default: return nullptr; default: return nullptr;
} }
} else { } else {

View File

@ -3,14 +3,7 @@
set(SLIC3R_APP_NAME "PrusaSlicer") set(SLIC3R_APP_NAME "PrusaSlicer")
set(SLIC3R_APP_KEY "PrusaSlicer") set(SLIC3R_APP_KEY "PrusaSlicer")
<<<<<<< HEAD
set(SLIC3R_VERSION "2.3.3")
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
set(SLIC3R_RC_VERSION "2,3,3,0")
set(SLIC3R_RC_VERSION_DOTS "2.3.3.0")
=======
set(SLIC3R_VERSION "2.4.1-beta1") set(SLIC3R_VERSION "2.4.1-beta1")
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN") set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
set(SLIC3R_RC_VERSION "2,4,1,0") set(SLIC3R_RC_VERSION "2,4,1,0")
set(SLIC3R_RC_VERSION_DOTS "2.4.1.0") set(SLIC3R_RC_VERSION_DOTS "2.4.1.0")
>>>>>>> master

View File

@ -31,11 +31,7 @@ _new_from_width(CLASS, role, width, nozzle_diameter, height)
CODE: CODE:
ConfigOptionFloatOrPercent optwidth; ConfigOptionFloatOrPercent optwidth;
optwidth.deserialize(width, ForwardCompatibilitySubstitutionRule::Disable); optwidth.deserialize(width, ForwardCompatibilitySubstitutionRule::Disable);
<<<<<<< HEAD
RETVAL = new Flow(Flow::new_from_config_width(role, optwidth, nozzle_diameter, height, bridge_flow_ratio));
=======
RETVAL = new Flow(Flow::new_from_config_width(role, optwidth, nozzle_diameter, height)); RETVAL = new Flow(Flow::new_from_config_width(role, optwidth, nozzle_diameter, height));
>>>>>>> master
OUTPUT: OUTPUT:
RETVAL RETVAL