Compare commits
22 Commits
Version_1.
...
Version_1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9c7898876 | ||
|
|
c08509a354 | ||
|
|
c2d45c696e | ||
|
|
9f5d69a0a6 | ||
|
|
45d2bf40e2 | ||
|
|
ca4e3f3824 | ||
|
|
1c1786d922 | ||
|
|
7d152a9d82 | ||
|
|
0e56a49501 | ||
|
|
ef74fffcba | ||
|
|
8656b2408f | ||
|
|
b3cd2d72cf | ||
|
|
352ac5ab2d | ||
|
|
ea99e07679 | ||
|
|
01d319ed8a | ||
|
|
34cd2c69ce | ||
|
|
73860b7625 | ||
|
|
578400753e | ||
|
|
edb08f521d | ||
|
|
5d9f6cd345 | ||
|
|
aa434bbef0 | ||
|
|
8594787d58 |
BIN
resources/icons/X-MAX 3_thumbnail.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
resources/icons/X-Plus 3_thumbnail.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
resources/icons/X-smart 3_thumbnail.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
6
resources/icons/add_machine_list.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||||
|
<path fill="#4EC256" d="M11,11V5h2v6h6v2h-6v6h-2v-6H5v-2H11z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 437 B |
6
resources/icons/arrow-left-s-line.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||||
|
<path fill="#ADADAF" d="M15.8,17l-1.4,1.4L8,12l6.4-6.3l1.4,1.4l-5,4.9L15.8,17z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 455 B |
6
resources/icons/arrow-right-s-line.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||||
|
<path fill="#ADADAF" d="M13.2,12l-5-4.9l1.4-1.4L16,12l-6.4,6.4L8.2,17L13.2,12z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 455 B |
6
resources/icons/delete_machine_list.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||||
|
<path fill="#FC5151" d="M5,13v-2h14v2H5z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 417 B |
7
resources/icons/edit_machine_list.svg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||||
|
<path fill="#ADADAF" d="M16.8,3l-2,2H5v14h14V9.2l2-2V20c0,0.6-0.4,1-1,1H4c-0.6,0-1-0.4-1-1V4c0-0.6,0.4-1,1-1H16.8z M20.5,2.1
|
||||||
|
l1.4,1.4l-9.2,9.2l-1.4,0l0-1.4L20.5,2.1z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 543 B |
11
resources/icons/printer_state.svg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path fill="#ADADAF" d="M19.4,1.9H4.6C3.2,1.9,2,3.1,2,4.5v6.4h4v-4h12v4h4V4.5C22,3.1,20.8,1.9,19.4,1.9z M19,5.9
|
||||||
|
c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1C20,5.5,19.6,5.9,19,5.9z"/>
|
||||||
|
<path fill="#ADADAF" d="M6,12.4v6.3l6.2,3.3l5.9-3.3v-6.3l-6-3.1L6,12.4z M11,19.2l-3-1.6v-2.9l3,1.6V19.2z M16,17.6l-3,1.7v-3
|
||||||
|
l3-1.8V17.6z M12,14.6L9.2,13l2.9-1.5l2.7,1.4L12,14.6z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 758 B |
8
resources/icons/refresh-line.svg
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||||
|
<path fill="#ADADAF" d="M5.5,4.4C7.2,2.9,9.5,2,12,2c5.5,0,10,4.5,10,10c0,2.1-0.7,4.1-1.8,5.7L17,12h3c0-4.4-3.6-8-8-8
|
||||||
|
C9.8,4,7.9,4.8,6.5,6.2L5.5,4.4z M18.5,19.6c-1.8,1.5-4,2.4-6.5,2.4C6.5,22,2,17.5,2,12c0-2.1,0.7-4.1,1.8-5.7L7,12H4
|
||||||
|
c0,4.4,3.6,8,8,8c2.2,0,4.1-0.8,5.5-2.2L18.5,19.6z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 659 B |
@@ -1,3 +1,5 @@
|
|||||||
|
min_slic3r_version = 1.0.8
|
||||||
|
1.0.8 Optimize parameters
|
||||||
min_slic3r_version = 1.0.7
|
min_slic3r_version = 1.0.7
|
||||||
1.0.7 Optimize parameters
|
1.0.7 Optimize parameters
|
||||||
min_slic3r_version = 1.0.6
|
min_slic3r_version = 1.0.6
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
name = QIDI Technology
|
name = QIDI Technology
|
||||||
# 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 QIDISlicer configuration to be downgraded.
|
# This means, the server may force the QIDISlicer configuration to be downgraded.
|
||||||
config_version = 1.0.7
|
config_version = 1.0.8
|
||||||
# Where to get the updates from?
|
# Where to get the updates from?
|
||||||
config_update_url = https://github.com/QIDITECH/QIDISlicer/releases/download/QIDITechnology/
|
config_update_url = https://github.com/QIDITECH/QIDISlicer/releases/download/QIDITechnology/
|
||||||
changelog_url = https://qidi3d.com/pages/software-firmware
|
changelog_url = https://qidi3d.com/pages/software-firmware
|
||||||
@@ -16,7 +16,7 @@ changelog_url = https://qidi3d.com/pages/software-firmware
|
|||||||
|
|
||||||
[printer_model:X-MAX 3]
|
[printer_model:X-MAX 3]
|
||||||
name = X-MAX 3
|
name = X-MAX 3
|
||||||
variants = 0.4; 0.2
|
variants = 0.4; 0.2; 0.6; 0.8
|
||||||
technology = FFF
|
technology = FFF
|
||||||
family = X
|
family = X
|
||||||
bed_model = X-MAX 3_bed.stl
|
bed_model = X-MAX 3_bed.stl
|
||||||
@@ -25,7 +25,7 @@ default_materials = QIDI ABS Odorless @X-MAX 3 0.4 nozzle; QIDI ABS Rapido @X-MA
|
|||||||
|
|
||||||
[printer_model:X-Plus 3]
|
[printer_model:X-Plus 3]
|
||||||
name = X-Plus 3
|
name = X-Plus 3
|
||||||
variants = 0.4; 0.2
|
variants = 0.4; 0.2; 0.6; 0.8
|
||||||
technology = FFF
|
technology = FFF
|
||||||
family = X
|
family = X
|
||||||
bed_model = X-Plus 3_bed.stl
|
bed_model = X-Plus 3_bed.stl
|
||||||
@@ -34,7 +34,7 @@ default_materials = QIDI ABS Odorless @X-Plus 3 0.4 nozzle; QIDI ABS Rapido @X-P
|
|||||||
|
|
||||||
[printer_model:X-smart 3]
|
[printer_model:X-smart 3]
|
||||||
name = X-smart 3
|
name = X-smart 3
|
||||||
variants = 0.4; 0.2
|
variants = 0.4; 0.2; 0.6; 0.8
|
||||||
technology = FFF
|
technology = FFF
|
||||||
family = X
|
family = X
|
||||||
bed_model = X-smart 3_bed.stl
|
bed_model = X-smart 3_bed.stl
|
||||||
@@ -65,7 +65,7 @@ complete_objects = 0
|
|||||||
default_acceleration = 10000
|
default_acceleration = 10000
|
||||||
dont_support_bridges = 0
|
dont_support_bridges = 0
|
||||||
draft_shield = disabled
|
draft_shield = disabled
|
||||||
elefant_foot_compensation = 0.15
|
elefant_foot_compensation = 0
|
||||||
enable_dynamic_overhang_speeds = 1
|
enable_dynamic_overhang_speeds = 1
|
||||||
external_perimeter_acceleration = 3000
|
external_perimeter_acceleration = 3000
|
||||||
external_perimeter_extrusion_width = 0.42
|
external_perimeter_extrusion_width = 0.42
|
||||||
@@ -122,7 +122,7 @@ min_feature_size = 25%
|
|||||||
min_skirt_length = 5
|
min_skirt_length = 5
|
||||||
mmu_segmented_region_max_width = 0
|
mmu_segmented_region_max_width = 0
|
||||||
notes =
|
notes =
|
||||||
only_retract_when_crossing_perimeters = 1
|
only_retract_when_crossing_perimeters = 0
|
||||||
ooze_prevention = 0
|
ooze_prevention = 0
|
||||||
output_filename_format = [input_filename_base].gcode
|
output_filename_format = [input_filename_base].gcode
|
||||||
overhang_speed_0 = 10
|
overhang_speed_0 = 10
|
||||||
@@ -202,7 +202,7 @@ top_infill_extrusion_width = 0.42
|
|||||||
top_solid_infill_acceleration = 2000
|
top_solid_infill_acceleration = 2000
|
||||||
top_solid_infill_speed = 200
|
top_solid_infill_speed = 200
|
||||||
top_solid_layers = 4
|
top_solid_layers = 4
|
||||||
top_solid_min_thickness = 0.6
|
top_solid_min_thickness = 0.8
|
||||||
travel_acceleration = 10000
|
travel_acceleration = 10000
|
||||||
travel_speed = 500
|
travel_speed = 500
|
||||||
travel_speed_z = 10
|
travel_speed_z = 10
|
||||||
@@ -236,7 +236,6 @@ inherits = *common*
|
|||||||
# Nozzle Print preset
|
# Nozzle Print preset
|
||||||
[print:*0.2 nozzle*]
|
[print:*0.2 nozzle*]
|
||||||
bottom_solid_layers = 5
|
bottom_solid_layers = 5
|
||||||
elefant_foot_compensation = 0
|
|
||||||
external_perimeter_extrusion_width = 0.22
|
external_perimeter_extrusion_width = 0.22
|
||||||
external_perimeter_speed = 120
|
external_perimeter_speed = 120
|
||||||
extrusion_width = 0.22
|
extrusion_width = 0.22
|
||||||
@@ -255,9 +254,54 @@ solid_infill_speed = 150
|
|||||||
support_material_extrusion_width = 0.22
|
support_material_extrusion_width = 0.22
|
||||||
top_infill_extrusion_width = 0.22
|
top_infill_extrusion_width = 0.22
|
||||||
top_solid_infill_speed = 150
|
top_solid_infill_speed = 150
|
||||||
top_solid_min_thickness = 0.8
|
|
||||||
|
|
||||||
[print:*0.4 nozzle*]
|
[print:*0.4 nozzle*]
|
||||||
|
elefant_foot_compensation = 0.15
|
||||||
|
|
||||||
|
[print:*0.6 nozzle*]
|
||||||
|
bridge_speed = 30
|
||||||
|
external_perimeter_extrusion_width = 0.62
|
||||||
|
external_perimeter_speed = 120
|
||||||
|
extrusion_width = 0.62
|
||||||
|
first_layer_extrusion_width = 0.62
|
||||||
|
first_layer_height = 0.3
|
||||||
|
first_layer_infill_speed = 55
|
||||||
|
first_layer_speed = 35
|
||||||
|
gap_fill_speed = 50
|
||||||
|
infill_extrusion_width = 0.62
|
||||||
|
infill_speed = 100
|
||||||
|
overhang_speed_1 = 15
|
||||||
|
perimeter_extrusion_width = 0.62
|
||||||
|
perimeter_speed = 150
|
||||||
|
solid_infill_extrusion_width = 0.62
|
||||||
|
solid_infill_speed = 150
|
||||||
|
support_material_extrusion_width = 0.62
|
||||||
|
top_infill_extrusion_width = 0.62
|
||||||
|
top_solid_infill_speed = 150
|
||||||
|
|
||||||
|
[print:*0.8 nozzle*]
|
||||||
|
bridge_speed = 30
|
||||||
|
external_perimeter_extrusion_width = 0.82
|
||||||
|
external_perimeter_speed = 120
|
||||||
|
extrusion_width = 0.82
|
||||||
|
first_layer_extrusion_width = 0.82
|
||||||
|
first_layer_height = 0.4
|
||||||
|
first_layer_infill_speed = 55
|
||||||
|
first_layer_speed = 35
|
||||||
|
gap_fill_speed = 50
|
||||||
|
infill_extrusion_width = 0.82
|
||||||
|
infill_speed = 100
|
||||||
|
overhang_speed_0 = 5
|
||||||
|
overhang_speed_1 = 25
|
||||||
|
perimeter_extrusion_width = 0.82
|
||||||
|
perimeter_speed = 150
|
||||||
|
solid_infill_extrusion_width = 0.82
|
||||||
|
solid_infill_speed = 150
|
||||||
|
support_material_extrusion_width = 0.82
|
||||||
|
support_tree_tip_diameter = 1.6
|
||||||
|
top_fill_pattern = monotonic
|
||||||
|
top_infill_extrusion_width = 0.82
|
||||||
|
top_solid_infill_speed = 150
|
||||||
|
|
||||||
# Layer Hight Print preset
|
# Layer Hight Print preset
|
||||||
# 0.2 nozzle
|
# 0.2 nozzle
|
||||||
@@ -283,7 +327,7 @@ overhang_speed_1 = 10
|
|||||||
overhang_speed_2 = 30
|
overhang_speed_2 = 30
|
||||||
overhang_speed_3 = 60
|
overhang_speed_3 = 60
|
||||||
perimeter_speed = 350
|
perimeter_speed = 350
|
||||||
solid_infill_speed = 320
|
solid_infill_speed = 300
|
||||||
top_solid_layers = 6
|
top_solid_layers = 6
|
||||||
|
|
||||||
[print:*0.16mm High*]
|
[print:*0.16mm High*]
|
||||||
@@ -296,7 +340,7 @@ overhang_speed_0 = 10
|
|||||||
overhang_speed_1 = 10
|
overhang_speed_1 = 10
|
||||||
overhang_speed_2 = 30
|
overhang_speed_2 = 30
|
||||||
overhang_speed_3 = 60
|
overhang_speed_3 = 60
|
||||||
solid_infill_speed = 270
|
solid_infill_speed = 250
|
||||||
top_solid_layers = 5
|
top_solid_layers = 5
|
||||||
|
|
||||||
[print:*0.20mm Fine*]
|
[print:*0.20mm Fine*]
|
||||||
@@ -314,7 +358,33 @@ gap_fill_speed = 230
|
|||||||
infill_speed = 220
|
infill_speed = 220
|
||||||
layer_height = 0.24
|
layer_height = 0.24
|
||||||
perimeter_speed = 230
|
perimeter_speed = 230
|
||||||
solid_infill_speed = 230
|
solid_infill_speed = 200
|
||||||
|
|
||||||
|
# 0.6 nozzle
|
||||||
|
[print:*0.24mm High*]
|
||||||
|
inherits = *0.6 nozzle*
|
||||||
|
layer_height = 0.24
|
||||||
|
|
||||||
|
[print:*0.30mm Fine*]
|
||||||
|
inherits = *0.6 nozzle*
|
||||||
|
layer_height = 0.3
|
||||||
|
|
||||||
|
[print:*0.36mm Quick*]
|
||||||
|
inherits = *0.6 nozzle*
|
||||||
|
layer_height = 0.36
|
||||||
|
|
||||||
|
# 0.8 nozzle
|
||||||
|
[print:*0.32mm High*]
|
||||||
|
inherits = *0.8 nozzle*
|
||||||
|
layer_height = 0.32
|
||||||
|
|
||||||
|
[print:*0.40mm Fine*]
|
||||||
|
inherits = *0.8 nozzle*
|
||||||
|
layer_height = 0.4
|
||||||
|
|
||||||
|
[print:*0.48mm Quick*]
|
||||||
|
inherits = *0.8 nozzle*
|
||||||
|
layer_height = 0.48
|
||||||
|
|
||||||
# Print preset
|
# Print preset
|
||||||
# X-MAX 3 0.2 nozzle Print preset
|
# X-MAX 3 0.2 nozzle Print preset
|
||||||
@@ -347,6 +417,32 @@ compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]=
|
|||||||
inherits = *X-MAX 3*; *0.24mm Quick*
|
inherits = *X-MAX 3*; *0.24mm Quick*
|
||||||
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
|
# X-MAX 3 0.6 nozzle Print preset
|
||||||
|
[print:0.24mm High @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *X-MAX 3*; *0.24mm High*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[print:0.30mm Fine @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *X-MAX 3*; *0.30mm Fine*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[print:0.36mm Fine @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *X-MAX 3*; *0.36mm Quick*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-MAX 3 0.8 nozzle Print preset
|
||||||
|
[print:0.32mm High @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *X-MAX 3*; *0.32mm High*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[print:0.40mm Fine @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *X-MAX 3*; *0.40mm Fine*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[print:0.48mm Fine @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *X-MAX 3*; *0.48mm Quick*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
# X-Plus 3 0.2 nozzle Print preset
|
# X-Plus 3 0.2 nozzle Print preset
|
||||||
[print:0.08mm Extra High @X-Plus 3 0.2 nozzle]
|
[print:0.08mm Extra High @X-Plus 3 0.2 nozzle]
|
||||||
inherits = *X-Plus 3*; *0.08mm Extra High*
|
inherits = *X-Plus 3*; *0.08mm Extra High*
|
||||||
@@ -377,6 +473,32 @@ compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]
|
|||||||
inherits = *X-Plus 3*; *0.24mm Quick*
|
inherits = *X-Plus 3*; *0.24mm Quick*
|
||||||
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
|
# X-Plus 3 0.6 nozzle Print preset
|
||||||
|
[print:0.24mm High @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *X-Plus 3*; *0.24mm High*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[print:0.30mm Fine @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *X-Plus 3*; *0.30mm Fine*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[print:0.36mm Fine @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *X-Plus 3*; *0.36mm Quick*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-Plus 3 0.8 nozzle Print preset
|
||||||
|
[print:0.32mm High @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *X-Plus 3*; *0.32mm High*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[print:0.40mm Fine @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *X-Plus 3*; *0.40mm Fine*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[print:0.48mm Fine @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *X-Plus 3*; *0.48mm Quick*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
# X-smart 3 0.2 nozzle Print preset
|
# X-smart 3 0.2 nozzle Print preset
|
||||||
[print:0.08mm Extra High @X-smart 3 0.2 nozzle]
|
[print:0.08mm Extra High @X-smart 3 0.2 nozzle]
|
||||||
inherits = *X-smart 3*; *0.08mm Extra High*
|
inherits = *X-smart 3*; *0.08mm Extra High*
|
||||||
@@ -407,6 +529,32 @@ compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0
|
|||||||
inherits = *X-smart 3*; *0.24mm Quick*
|
inherits = *X-smart 3*; *0.24mm Quick*
|
||||||
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
|
# X-smart 3 0.6 nozzle Print preset
|
||||||
|
[print:0.24mm High @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *X-smart 3*; *0.24mm High*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[print:0.30mm Fine @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *X-smart 3*; *0.30mm Fine*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[print:0.36mm Fine @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *X-smart 3*; *0.36mm Quick*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-smart 3 0.8 nozzle Print preset
|
||||||
|
[print:0.32mm High @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *X-smart 3*; *0.32mm High*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[print:0.40mm Fine @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *X-smart 3*; *0.40mm Fine*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[print:0.48mm Fine @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *X-smart 3*; *0.48mm Quick*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
# Common filament preset
|
# Common filament preset
|
||||||
[filament:*common*]
|
[filament:*common*]
|
||||||
advance_pressure = 0.031
|
advance_pressure = 0.031
|
||||||
@@ -438,7 +586,7 @@ filament_diameter = 1.75
|
|||||||
filament_load_time = 0
|
filament_load_time = 0
|
||||||
filament_loading_speed = 28
|
filament_loading_speed = 28
|
||||||
filament_loading_speed_start = 3
|
filament_loading_speed_start = 3
|
||||||
filament_max_volumetric_speed = 21
|
filament_max_volumetric_speed = 20
|
||||||
filament_minimal_purge_on_wipe_tower = 15
|
filament_minimal_purge_on_wipe_tower = 15
|
||||||
filament_notes = ""
|
filament_notes = ""
|
||||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
||||||
@@ -564,7 +712,7 @@ fan_below_layer_time = 35
|
|||||||
filament_colour = #F0E68C
|
filament_colour = #F0E68C
|
||||||
filament_density = 1.07
|
filament_density = 1.07
|
||||||
filament_max_volumetric_speed = 16
|
filament_max_volumetric_speed = 16
|
||||||
filament_type = ABS
|
filament_type = ASA
|
||||||
first_layer_bed_temperature = 90
|
first_layer_bed_temperature = 90
|
||||||
first_layer_temperature = 250
|
first_layer_temperature = 250
|
||||||
max_fan_speed = 50
|
max_fan_speed = 50
|
||||||
@@ -674,7 +822,7 @@ inherits = *common*
|
|||||||
inherits = *common*
|
inherits = *common*
|
||||||
filament_colour = #0073E6
|
filament_colour = #0073E6
|
||||||
filament_density = 1.42
|
filament_density = 1.42
|
||||||
filament_max_volumetric_speed = 22
|
filament_max_volumetric_speed = 21
|
||||||
|
|
||||||
[filament:*QIDI UltraPA*]
|
[filament:*QIDI UltraPA*]
|
||||||
inherits = *common*
|
inherits = *common*
|
||||||
@@ -875,6 +1023,161 @@ compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]=
|
|||||||
inherits = *Generic TPU 95A*
|
inherits = *Generic TPU 95A*
|
||||||
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
|
# X-MAX 3 0.6 nozzle QIDI filament preset
|
||||||
|
[filament:QIDI ABS Odorless @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS Odorless*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ABS Rapido @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS Rapido*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ABS-GF @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS-GF*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ASA @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ASA*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PA12-CF @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PA12-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PAHT-CF @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PAHT-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PET-CF @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PET-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PETG-Tough @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PETG-Tough*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido Matte @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido Matte*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI UltraPA @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI UltraPA*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-MAX 3 0.6 nozzle Generic filament preset
|
||||||
|
[filament:Generic ABS @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *Generic ABS*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic PETG @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *Generic PETG*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic PLA @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *Generic PLA*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic TPU 95A @X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *Generic TPU 95A*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-MAX 3 0.8 nozzle QIDI filament preset
|
||||||
|
[filament:QIDI ABS Odorless @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS Odorless*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ABS Rapido @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS Rapido*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ABS-GF @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS-GF*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ASA @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ASA*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PA12-CF @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PA12-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PAHT-CF @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PAHT-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PET-CF @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PET-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PETG-Tough @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PETG-Tough*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido Matte @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido Matte*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI UltraPA @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI UltraPA*
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
# X-MAX 3 0.8 nozzle Generic filament preset
|
||||||
|
[filament:Generic ABS @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *Generic ABS*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic PETG @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *Generic PETG*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic PLA @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *Generic PLA*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic TPU 95A @X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *Generic TPU 95A*
|
||||||
|
temperature = 220
|
||||||
|
compatible_printers_condition = printer_model=="X-MAX 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
# X-Plus 3 0.2 nozzle QIDI filament preset
|
# X-Plus 3 0.2 nozzle QIDI filament preset
|
||||||
[filament:QIDI ABS Odorless @X-Plus 3 0.2 nozzle]
|
[filament:QIDI ABS Odorless @X-Plus 3 0.2 nozzle]
|
||||||
inherits = *QIDI ABS Odorless*
|
inherits = *QIDI ABS Odorless*
|
||||||
@@ -987,6 +1290,161 @@ compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]
|
|||||||
inherits = *Generic TPU 95A*
|
inherits = *Generic TPU 95A*
|
||||||
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
|
# X-Plus 3 0.6 nozzle QIDI filament preset
|
||||||
|
[filament:QIDI ABS Odorless @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS Odorless*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ABS Rapido @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS Rapido*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ABS-GF @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS-GF*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ASA @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ASA*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PA12-CF @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PA12-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PAHT-CF @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PAHT-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PET-CF @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PET-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PETG-Tough @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PETG-Tough*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido Matte @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido Matte*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI UltraPA @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI UltraPA*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-Plus 3 0.6 nozzle Generic filament preset
|
||||||
|
[filament:Generic ABS @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *Generic ABS*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic PETG @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *Generic PETG*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic PLA @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *Generic PLA*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic TPU 95A @X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *Generic TPU 95A*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-Plus 3 0.8 nozzle QIDI filament preset
|
||||||
|
[filament:QIDI ABS Odorless @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS Odorless*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ABS Rapido @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS Rapido*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ABS-GF @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS-GF*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ASA @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ASA*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PA12-CF @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PA12-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PAHT-CF @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PAHT-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PET-CF @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PET-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PETG-Tough @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PETG-Tough*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido Matte @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido Matte*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI UltraPA @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI UltraPA*
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
# X-Plus 3 0.8 nozzle Generic filament preset
|
||||||
|
[filament:Generic ABS @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *Generic ABS*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic PETG @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *Generic PETG*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic PLA @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *Generic PLA*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic TPU 95A @X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *Generic TPU 95A*
|
||||||
|
temperature = 220
|
||||||
|
compatible_printers_condition = printer_model=="X-Plus 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
# X-smart 3 0.2 nozzle QIDI filament preset
|
# X-smart 3 0.2 nozzle QIDI filament preset
|
||||||
[filament:QIDI ABS Odorless @X-smart 3 0.2 nozzle]
|
[filament:QIDI ABS Odorless @X-smart 3 0.2 nozzle]
|
||||||
inherits = *QIDI ABS Odorless*
|
inherits = *QIDI ABS Odorless*
|
||||||
@@ -1120,6 +1578,161 @@ compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0
|
|||||||
inherits = *Generic TPU 95A*
|
inherits = *Generic TPU 95A*
|
||||||
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
|
# X-smart 3 0.6 nozzle QIDI filament preset
|
||||||
|
[filament:QIDI ABS Odorless @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS Odorless*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ABS Rapido @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS Rapido*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ABS-GF @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ABS-GF*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI ASA @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI ASA*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PA12-CF @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PA12-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PAHT-CF @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PAHT-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PET-CF @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PET-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PETG-Tough @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PETG-Tough*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido Matte @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido Matte*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:QIDI UltraPA @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *QIDI UltraPA*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-smart 3 0.6 nozzle Generic filament preset
|
||||||
|
[filament:Generic ABS @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *Generic ABS*
|
||||||
|
advance_pressure = 0.014
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic PETG @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *Generic PETG*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic PLA @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *Generic PLA*
|
||||||
|
advance_pressure = 0.016
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
[filament:Generic TPU 95A @X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *Generic TPU 95A*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.6
|
||||||
|
|
||||||
|
# X-smart 3 0.8 nozzle QIDI filament preset
|
||||||
|
[filament:QIDI ABS Odorless @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS Odorless*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ABS Rapido @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS Rapido*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ABS-GF @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ABS-GF*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI ASA @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI ASA*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
min_print_speed = 10
|
||||||
|
temperature = 260
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PA12-CF @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PA12-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PAHT-CF @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PAHT-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PET-CF @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PET-CF*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PETG-Tough @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PETG-Tough*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI PLA Rapido Matte @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI PLA Rapido Matte*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:QIDI UltraPA @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *QIDI UltraPA*
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
# X-smart 3 0.8 nozzle Generic filament preset
|
||||||
|
[filament:Generic ABS @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *Generic ABS*
|
||||||
|
advance_pressure = 0.011
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic PETG @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *Generic PETG*
|
||||||
|
temperature = 240
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic PLA @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *Generic PLA*
|
||||||
|
advance_pressure = 0.008
|
||||||
|
slowdown_below_layer_time = 6
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
|
[filament:Generic TPU 95A @X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *Generic TPU 95A*
|
||||||
|
temperature = 220
|
||||||
|
compatible_printers_condition = printer_model=="X-smart 3" and nozzle_diameter[0]==0.8
|
||||||
|
|
||||||
# Common printer preset
|
# Common printer preset
|
||||||
[printer:*common*]
|
[printer:*common*]
|
||||||
autoemit_temperature_commands = 1
|
autoemit_temperature_commands = 1
|
||||||
@@ -1230,6 +1843,27 @@ inherits = *X-MAX 3*
|
|||||||
default_filament_profile = Generic PLA @X-MAX 3 0.4 nozzle
|
default_filament_profile = Generic PLA @X-MAX 3 0.4 nozzle
|
||||||
default_print_profile = 0.20mm Fine @X-MAX 3 0.4 nozzle
|
default_print_profile = 0.20mm Fine @X-MAX 3 0.4 nozzle
|
||||||
|
|
||||||
|
[printer:X-MAX 3 0.6 nozzle]
|
||||||
|
inherits = *X-MAX 3*
|
||||||
|
default_filament_profile = Generic PLA @X-MAX 3 0.6 nozzle
|
||||||
|
default_print_profile = 0.30mm Fine @X-MAX 3 0.6 nozzle
|
||||||
|
max_layer_height = 0.42
|
||||||
|
min_layer_height = 0.12
|
||||||
|
nozzle_diameter = 0.6
|
||||||
|
printer_variant = 0.6
|
||||||
|
retract_before_travel = 3
|
||||||
|
retract_length = 1.4
|
||||||
|
|
||||||
|
[printer:X-MAX 3 0.8 nozzle]
|
||||||
|
inherits = *X-MAX 3*
|
||||||
|
default_filament_profile = Generic PLA @X-MAX 3 0.8 nozzle
|
||||||
|
default_print_profile = 0.40mm Fine @X-MAX 3 0.8 nozzle
|
||||||
|
max_layer_height = 0.56
|
||||||
|
min_layer_height = 0.16
|
||||||
|
nozzle_diameter = 0.8
|
||||||
|
printer_variant = 0.8
|
||||||
|
retract_length = 3
|
||||||
|
|
||||||
# X-Plus 3 preset
|
# X-Plus 3 preset
|
||||||
[printer:*X-Plus 3*]
|
[printer:*X-Plus 3*]
|
||||||
inherits = *common*
|
inherits = *common*
|
||||||
@@ -1255,6 +1889,27 @@ inherits = *X-Plus 3*
|
|||||||
default_filament_profile = Generic PLA @X-Plus 3 0.4 nozzle
|
default_filament_profile = Generic PLA @X-Plus 3 0.4 nozzle
|
||||||
default_print_profile = 0.20mm Fine @X-Plus 3 0.4 nozzle
|
default_print_profile = 0.20mm Fine @X-Plus 3 0.4 nozzle
|
||||||
|
|
||||||
|
[printer:X-Plus 3 0.6 nozzle]
|
||||||
|
inherits = *X-Plus 3*
|
||||||
|
default_filament_profile = Generic PLA @X-Plus 3 0.6 nozzle
|
||||||
|
default_print_profile = 0.30mm Fine @X-Plus 3 0.6 nozzle
|
||||||
|
max_layer_height = 0.42
|
||||||
|
min_layer_height = 0.12
|
||||||
|
nozzle_diameter = 0.6
|
||||||
|
printer_variant = 0.6
|
||||||
|
retract_before_travel = 3
|
||||||
|
retract_length = 1.4
|
||||||
|
|
||||||
|
[printer:X-Plus 3 0.8 nozzle]
|
||||||
|
inherits = *X-Plus 3*
|
||||||
|
default_filament_profile = Generic PLA @X-Plus 3 0.8 nozzle
|
||||||
|
default_print_profile = 0.40mm Fine @X-Plus 3 0.8 nozzle
|
||||||
|
max_layer_height = 0.56
|
||||||
|
min_layer_height = 0.16
|
||||||
|
nozzle_diameter = 0.8
|
||||||
|
printer_variant = 0.8
|
||||||
|
retract_length = 3
|
||||||
|
|
||||||
# X-smart 3 preset
|
# X-smart 3 preset
|
||||||
[printer:*X-smart 3*]
|
[printer:*X-smart 3*]
|
||||||
inherits = *common*
|
inherits = *common*
|
||||||
@@ -1277,3 +1932,24 @@ retract_length = 0.4
|
|||||||
inherits = *X-smart 3*
|
inherits = *X-smart 3*
|
||||||
default_filament_profile = Generic PLA @X-smart 3 0.4 nozzle
|
default_filament_profile = Generic PLA @X-smart 3 0.4 nozzle
|
||||||
default_print_profile = 0.20mm Fine @X-smart 3 0.4 nozzle
|
default_print_profile = 0.20mm Fine @X-smart 3 0.4 nozzle
|
||||||
|
|
||||||
|
[printer:X-smart 3 0.6 nozzle]
|
||||||
|
inherits = *X-smart 3*
|
||||||
|
default_filament_profile = Generic PLA @X-smart 3 0.6 nozzle
|
||||||
|
default_print_profile = 0.30mm Fine @X-smart 3 0.6 nozzle
|
||||||
|
max_layer_height = 0.42
|
||||||
|
min_layer_height = 0.12
|
||||||
|
nozzle_diameter = 0.6
|
||||||
|
printer_variant = 0.6
|
||||||
|
retract_before_travel = 3
|
||||||
|
retract_length = 1.4
|
||||||
|
|
||||||
|
[printer:X-smart 3 0.8 nozzle]
|
||||||
|
inherits = *X-smart 3*
|
||||||
|
default_filament_profile = Generic PLA @X-smart 3 0.8 nozzle
|
||||||
|
default_print_profile = 0.40mm Fine @X-smart 3 0.8 nozzle
|
||||||
|
max_layer_height = 0.56
|
||||||
|
min_layer_height = 0.16
|
||||||
|
nozzle_diameter = 0.8
|
||||||
|
printer_variant = 0.8
|
||||||
|
retract_length = 3
|
||||||
|
|||||||
@@ -296,14 +296,20 @@
|
|||||||
|
|
||||||
<div class="IntroduceBoard" board="X-MAX 3">
|
<div class="IntroduceBoard" board="X-MAX 3">
|
||||||
<div class="AutozoomImage"><img src="img/X-MAX3Poster.png"/></div>
|
<div class="AutozoomImage"><img src="img/X-MAX3Poster.png"/></div>
|
||||||
|
<div class="IntroduceTextBold trans" tid="l0"></div>
|
||||||
|
<div class="IntroduceText">https://qidi3d.com/products/qidi-x-max-3</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="IntroduceBoard" board="X-Plus 3">
|
<div class="IntroduceBoard" board="X-Plus 3">
|
||||||
<div class="AutozoomImage"><img src="img/X-Plus3Poster.png"/></div>
|
<div class="AutozoomImage"><img src="img/X-Plus3Poster.png"/></div>
|
||||||
|
<div class="IntroduceTextBold trans" tid="l0"></div>
|
||||||
|
<div class="IntroduceText">https://qidi3d.com/products/qidi-x-plus-3</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="IntroduceBoard" board="X-smart 3">
|
<div class="IntroduceBoard" board="X-smart 3">
|
||||||
<div class="AutozoomImage"><img src="img/X-smart3Poster.png"/></div>
|
<div class="AutozoomImage"><img src="img/X-smart3Poster.png"/></div>
|
||||||
|
<div class="IntroduceTextBold trans" tid="l0"></div>
|
||||||
|
<div class="IntroduceText">https://qidi3d.com/products/qidi-x-smart-3</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="IntroduceBoard" board="Filaments">
|
<div class="IntroduceBoard" board="Filaments">
|
||||||
@@ -507,6 +513,8 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="IntroduceTextBold trans" tid="l0"></div>
|
||||||
|
<div class="IntroduceText">https://qidi3d.com/collections/filaments</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="IssueBoard" board="IssueReport">
|
<div class="IssueBoard" board="IssueReport">
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
#include "FillConcentric.hpp"
|
#include "FillConcentric.hpp"
|
||||||
#include "FillEnsuring.hpp"
|
#include "FillEnsuring.hpp"
|
||||||
#include "Polygon.hpp"
|
#include "Polygon.hpp"
|
||||||
|
//w11
|
||||||
|
#define NARROW_INFILL_AREA_THRESHOLD 3
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
//static constexpr const float NarrowInfillAreaThresholdMM = 3.f;
|
//static constexpr const float NarrowInfillAreaThresholdMM = 3.f;
|
||||||
@@ -112,7 +113,15 @@ struct SurfaceFill {
|
|||||||
ExPolygons expolygons;
|
ExPolygons expolygons;
|
||||||
SurfaceFillParams params;
|
SurfaceFillParams params;
|
||||||
};
|
};
|
||||||
|
//w11
|
||||||
|
static bool is_narrow_infill_area(const ExPolygon &expolygon)
|
||||||
|
{
|
||||||
|
ExPolygons offsets = offset_ex(expolygon, -scale_(NARROW_INFILL_AREA_THRESHOLD));
|
||||||
|
if (offsets.empty())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
static inline bool fill_type_monotonic(InfillPattern pattern)
|
static inline bool fill_type_monotonic(InfillPattern pattern)
|
||||||
{
|
{
|
||||||
return pattern == ipMonotonic || pattern == ipMonotonicLines;
|
return pattern == ipMonotonic || pattern == ipMonotonicLines;
|
||||||
@@ -313,7 +322,41 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
|||||||
fill.params.pattern = ipEnsuring;
|
fill.params.pattern = ipEnsuring;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//w11
|
||||||
|
if (layer.object()->config().detect_narrow_internal_solid_infill) {
|
||||||
|
size_t surface_fills_size = surface_fills.size();
|
||||||
|
for (size_t i = 0; i < surface_fills_size; i++) {
|
||||||
|
if (surface_fills[i].surface.surface_type != stInternalSolid)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
size_t expolygons_size = surface_fills[i].expolygons.size();
|
||||||
|
std::vector<size_t> narrow_expolygons_index;
|
||||||
|
narrow_expolygons_index.reserve(expolygons_size);
|
||||||
|
for (size_t j = 0; j < expolygons_size; j++)
|
||||||
|
if (is_narrow_infill_area(surface_fills[i].expolygons[j]))
|
||||||
|
narrow_expolygons_index.push_back(j);
|
||||||
|
|
||||||
|
if (narrow_expolygons_index.size() == 0) {
|
||||||
|
continue;
|
||||||
|
} else if (narrow_expolygons_index.size() == expolygons_size) {
|
||||||
|
// w11
|
||||||
|
surface_fills[i].params.pattern = ipConcentric;
|
||||||
|
} else {
|
||||||
|
params = surface_fills[i].params;
|
||||||
|
params.pattern = ipConcentric;
|
||||||
|
surface_fills.emplace_back(params);
|
||||||
|
surface_fills.back().region_id = surface_fills[i].region_id;
|
||||||
|
surface_fills.back().surface.surface_type = stInternalSolid;
|
||||||
|
surface_fills.back().surface.thickness = surface_fills[i].surface.thickness;
|
||||||
|
for (size_t j = 0; j < narrow_expolygons_index.size(); j++) {
|
||||||
|
surface_fills.back().expolygons.emplace_back(std::move(surface_fills[i].expolygons[narrow_expolygons_index[j]]));
|
||||||
|
}
|
||||||
|
for (int j = narrow_expolygons_index.size() - 1; j >= 0; j--) {
|
||||||
|
surface_fills[i].expolygons.erase(surface_fills[i].expolygons.begin() + narrow_expolygons_index[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return surface_fills;
|
return surface_fills;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
#include "Polyline.hpp"
|
#include "Polyline.hpp"
|
||||||
#include "SVG.hpp"
|
#include "SVG.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
|
//w11
|
||||||
|
#include "../PrintConfig.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@@ -292,9 +293,19 @@ ThickPolylines make_fill_polylines(
|
|||||||
// svg.draw(to_lines(gaps_for_additional_filling), "green", scale_(0.2));
|
// svg.draw(to_lines(gaps_for_additional_filling), "green", scale_(0.2));
|
||||||
// svg.draw(vertical_lines, "black", scale_(0.1));
|
// svg.draw(vertical_lines, "black", scale_(0.1));
|
||||||
// svg.Close();
|
// svg.Close();
|
||||||
|
//w11
|
||||||
|
PrintObjectConfig config;
|
||||||
|
const coord_t threshold = scaled_spacing * 4.5;
|
||||||
for (ExPolygon &ex_poly : gaps_for_additional_filling) {
|
for (ExPolygon &ex_poly : gaps_for_additional_filling) {
|
||||||
|
//w11
|
||||||
|
if (ex_poly.contour.length() < threshold && config.detect_narrow_internal_solid_infill) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
BoundingBox ex_bb = ex_poly.contour.bounding_box();
|
BoundingBox ex_bb = ex_poly.contour.bounding_box();
|
||||||
|
//w11
|
||||||
|
if ((ex_bb.size().x() < threshold || ex_bb.size().y() < threshold) && config.detect_narrow_internal_solid_infill) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
coord_t loops_count = (std::max(ex_bb.size().x(), ex_bb.size().y()) + scaled_spacing - 1) / scaled_spacing;
|
coord_t loops_count = (std::max(ex_bb.size().x(), ex_bb.size().y()) + scaled_spacing - 1) / scaled_spacing;
|
||||||
Polygons polygons = to_polygons(ex_poly);
|
Polygons polygons = to_polygons(ex_poly);
|
||||||
Arachne::WallToolPaths wall_tool_paths(polygons, scaled_spacing, scaled_spacing, loops_count, 0, params.layer_height,
|
Arachne::WallToolPaths wall_tool_paths(polygons, scaled_spacing, scaled_spacing, loops_count, 0, params.layer_height,
|
||||||
|
|||||||
@@ -3501,7 +3501,7 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z)
|
|||||||
|
|
||||||
return gcode;
|
return gcode;
|
||||||
}
|
}
|
||||||
|
//B41
|
||||||
std::string GCode::set_object_range(Print &print)
|
std::string GCode::set_object_range(Print &print)
|
||||||
{
|
{
|
||||||
std::string gcode;
|
std::string gcode;
|
||||||
@@ -3558,6 +3558,10 @@ std::string GCode::set_object_range(Print &print)
|
|||||||
Point center = contour.centroid();
|
Point center = contour.centroid();
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
std::replace(name.begin(), name.end(), ' ', '_');
|
std::replace(name.begin(), name.end(), ' ', '_');
|
||||||
|
std::replace(name.begin(), name.end(), '#', '_');
|
||||||
|
std::replace(name.begin(), name.end(), '*', '_');
|
||||||
|
std::replace(name.begin(), name.end(), ':', '_');
|
||||||
|
std::replace(name.begin(), name.end(), ';', '_');
|
||||||
gcode += (std::string("EXCLUDE_OBJECT_DEFINE NAME=") + name);
|
gcode += (std::string("EXCLUDE_OBJECT_DEFINE NAME=") + name);
|
||||||
std::snprintf(buffer, sizeof(buffer) - 1, " CENTER=%.3f,%.3f", unscale<float>(center[0]), unscale<float>(center[1]));
|
std::snprintf(buffer, sizeof(buffer) - 1, " CENTER=%.3f,%.3f", unscale<float>(center[0]), unscale<float>(center[1]));
|
||||||
gcode += buffer + std::string(" POLYGON=[");
|
gcode += buffer + std::string(" POLYGON=[");
|
||||||
|
|||||||
@@ -479,7 +479,8 @@ static std::vector<std::string> s_Preset_print_options {
|
|||||||
"ooze_prevention", "standby_temperature_delta", "interface_shells", "extrusion_width", "first_layer_extrusion_width",
|
"ooze_prevention", "standby_temperature_delta", "interface_shells", "extrusion_width", "first_layer_extrusion_width",
|
||||||
"perimeter_extrusion_width", "external_perimeter_extrusion_width", "infill_extrusion_width", "solid_infill_extrusion_width",
|
"perimeter_extrusion_width", "external_perimeter_extrusion_width", "infill_extrusion_width", "solid_infill_extrusion_width",
|
||||||
"top_infill_extrusion_width", "support_material_extrusion_width", "infill_overlap", "infill_anchor", "infill_anchor_max", "bridge_flow_ratio",
|
"top_infill_extrusion_width", "support_material_extrusion_width", "infill_overlap", "infill_anchor", "infill_anchor_max", "bridge_flow_ratio",
|
||||||
"elefant_foot_compensation", "xy_size_compensation", "threads", "resolution", "gcode_resolution", "wipe_tower", "wipe_tower_x", "wipe_tower_y",
|
//w12
|
||||||
|
"elefant_foot_compensation", "xy_size_compensation", "xy_contour_compensation", "xy_hole_compensation", "threads", "resolution", "gcode_resolution", "wipe_tower", "wipe_tower_x", "wipe_tower_y",
|
||||||
"wipe_tower_width", "wipe_tower_cone_angle", "wipe_tower_rotation_angle", "wipe_tower_brim_width", "wipe_tower_bridging", "single_extruder_multi_material_priming", "mmu_segmented_region_max_width",
|
"wipe_tower_width", "wipe_tower_cone_angle", "wipe_tower_rotation_angle", "wipe_tower_brim_width", "wipe_tower_bridging", "single_extruder_multi_material_priming", "mmu_segmented_region_max_width",
|
||||||
"mmu_segmented_region_interlocking_depth", "wipe_tower_extruder", "wipe_tower_no_sparse_layers", "wipe_tower_extra_spacing", "compatible_printers", "compatible_printers_condition", "inherits",
|
"mmu_segmented_region_interlocking_depth", "wipe_tower_extruder", "wipe_tower_no_sparse_layers", "wipe_tower_extra_spacing", "compatible_printers", "compatible_printers_condition", "inherits",
|
||||||
"perimeter_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
|
"perimeter_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
|
||||||
@@ -488,6 +489,8 @@ static std::vector<std::string> s_Preset_print_options {
|
|||||||
,"first_layer_travel_speed"
|
,"first_layer_travel_speed"
|
||||||
//B37
|
//B37
|
||||||
,"first_layer_infill_speed"
|
,"first_layer_infill_speed"
|
||||||
|
//w11
|
||||||
|
,"detect_narrow_internal_solid_infill"
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::vector<std::string> s_Preset_filament_options {
|
static std::vector<std::string> s_Preset_filament_options {
|
||||||
|
|||||||
@@ -379,6 +379,8 @@ private:
|
|||||||
|
|
||||||
void slice_volumes();
|
void slice_volumes();
|
||||||
// Has any support (not counting the raft).
|
// Has any support (not counting the raft).
|
||||||
|
//w12
|
||||||
|
ExPolygons _shrink_contour_holes(double contour_delta, double hole_delta, const ExPolygons &polys) const;
|
||||||
void detect_surfaces_type();
|
void detect_surfaces_type();
|
||||||
void process_external_surfaces();
|
void process_external_surfaces();
|
||||||
void discover_vertical_shells();
|
void discover_vertical_shells();
|
||||||
|
|||||||
@@ -848,7 +848,8 @@ static PrintObjectRegions* generate_print_object_regions(
|
|||||||
const PrintRegionConfig &default_region_config,
|
const PrintRegionConfig &default_region_config,
|
||||||
const Transform3d &trafo,
|
const Transform3d &trafo,
|
||||||
size_t num_extruders,
|
size_t num_extruders,
|
||||||
const float xy_size_compensation,
|
//w12
|
||||||
|
const float xy_contour_compensation,
|
||||||
const std::vector<unsigned int> &painting_extruders)
|
const std::vector<unsigned int> &painting_extruders)
|
||||||
{
|
{
|
||||||
// Reuse the old object or generate a new one.
|
// Reuse the old object or generate a new one.
|
||||||
@@ -879,8 +880,9 @@ static PrintObjectRegions* generate_print_object_regions(
|
|||||||
layer_ranges_regions.push_back({ range.layer_height_range, range.config });
|
layer_ranges_regions.push_back({ range.layer_height_range, range.config });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//w12
|
||||||
const bool is_mm_painted = num_extruders > 1 && std::any_of(model_volumes.cbegin(), model_volumes.cend(), [](const ModelVolume *mv) { return mv->is_mm_painted(); });
|
const bool is_mm_painted = num_extruders > 1 && std::any_of(model_volumes.cbegin(), model_volumes.cend(), [](const ModelVolume *mv) { return mv->is_mm_painted(); });
|
||||||
update_volume_bboxes(layer_ranges_regions, out->cached_volume_ids, model_volumes, out->trafo_bboxes, is_mm_painted ? 0.f : std::max(0.f, xy_size_compensation));
|
update_volume_bboxes(layer_ranges_regions, out->cached_volume_ids, model_volumes, out->trafo_bboxes, is_mm_painted ? 0.f : std::max(0.f, xy_contour_compensation));
|
||||||
|
|
||||||
std::vector<PrintRegion*> region_set;
|
std::vector<PrintRegion*> region_set;
|
||||||
auto get_create_region = [®ion_set, &all_regions](PrintRegionConfig &&config) -> PrintRegion* {
|
auto get_create_region = [®ion_set, &all_regions](PrintRegionConfig &&config) -> PrintRegion* {
|
||||||
@@ -1403,7 +1405,8 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
|
|||||||
m_default_region_config,
|
m_default_region_config,
|
||||||
model_object_status.print_instances.front().trafo,
|
model_object_status.print_instances.front().trafo,
|
||||||
num_extruders,
|
num_extruders,
|
||||||
print_object.is_mm_painted() ? 0.f : float(print_object.config().xy_size_compensation.value),
|
//w12
|
||||||
|
print_object.is_mm_painted() ? 0.f : float(print_object.config().xy_contour_compensation.value),
|
||||||
painting_extruders);
|
painting_extruders);
|
||||||
}
|
}
|
||||||
for (auto it = it_print_object; it != it_print_object_end; ++it)
|
for (auto it = it_print_object; it != it_print_object_end; ++it)
|
||||||
|
|||||||
@@ -3386,7 +3386,7 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->mode = comExpert;
|
def->mode = comExpert;
|
||||||
def->set_default_value(new ConfigOptionInt(0));
|
def->set_default_value(new ConfigOptionInt(0));
|
||||||
|
|
||||||
def = this->add("xy_size_compensation", coFloat);
|
def = this->add("xy_size_compensation", coFloat);
|
||||||
def->label = L("XY Size Compensation");
|
def->label = L("XY Size Compensation");
|
||||||
def->category = L("Advanced");
|
def->category = L("Advanced");
|
||||||
def->tooltip = L("The object will be grown/shrunk in the XY plane by the configured value "
|
def->tooltip = L("The object will be grown/shrunk in the XY plane by the configured value "
|
||||||
@@ -3395,6 +3395,26 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->sidetext = L("mm");
|
def->sidetext = L("mm");
|
||||||
def->mode = comExpert;
|
def->mode = comExpert;
|
||||||
def->set_default_value(new ConfigOptionFloat(0));
|
def->set_default_value(new ConfigOptionFloat(0));
|
||||||
|
//w12
|
||||||
|
def = this->add("xy_hole_compensation", coFloat);
|
||||||
|
def->label = L("X-Y hole compensation");
|
||||||
|
def->category = L("Advanced");
|
||||||
|
def->tooltip = L("Holes of object will be grown or shrunk in XY plane by the configured value. "
|
||||||
|
"Positive value makes holes bigger. Negative value makes holes smaller. "
|
||||||
|
"This function is used to adjust size slightly when the object has assembling issue");
|
||||||
|
def->sidetext = L("mm");
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionFloat(0));
|
||||||
|
|
||||||
|
def = this->add("xy_contour_compensation", coFloat);
|
||||||
|
def->label = L("X-Y contour compensation");
|
||||||
|
def->category = L("Advanced");
|
||||||
|
def->tooltip = L("Contour of object will be grown or shrunk in XY plane by the configured value. "
|
||||||
|
"Positive value makes contour bigger. Negative value makes contour smaller. "
|
||||||
|
"This function is used to adjust size slightly when the object has assembling issue");
|
||||||
|
def->sidetext = L("mm");
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionFloat(0));
|
||||||
|
|
||||||
def = this->add("z_offset", coFloat);
|
def = this->add("z_offset", coFloat);
|
||||||
def->label = L("Z offset");
|
def->label = L("Z offset");
|
||||||
@@ -3519,6 +3539,16 @@ void PrintConfigDef::init_fff_params()
|
|||||||
default: assert(false);
|
default: assert(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//w11
|
||||||
|
def = this->add("detect_narrow_internal_solid_infill", coBool);
|
||||||
|
def->label = L("Detect narrow internal solid infill");
|
||||||
|
def->category = L("Infill");
|
||||||
|
def->tooltip = L("This option will auto detect narrow internal solid infill area."
|
||||||
|
" If enabled, concentric pattern will be used for the area to speed printing up."
|
||||||
|
" Otherwise, rectilinear pattern is used defaultly.");
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionBool(true));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintConfigDef::init_extruder_option_keys()
|
void PrintConfigDef::init_extruder_option_keys()
|
||||||
|
|||||||
@@ -570,7 +570,12 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||||||
// The rest
|
// The rest
|
||||||
((ConfigOptionBool, thick_bridges))
|
((ConfigOptionBool, thick_bridges))
|
||||||
((ConfigOptionFloat, xy_size_compensation))
|
((ConfigOptionFloat, xy_size_compensation))
|
||||||
|
//w12
|
||||||
|
((ConfigOptionFloat, xy_hole_compensation))
|
||||||
|
((ConfigOptionFloat, xy_contour_compensation))
|
||||||
((ConfigOptionBool, wipe_into_objects))
|
((ConfigOptionBool, wipe_into_objects))
|
||||||
|
//w11
|
||||||
|
((ConfigOptionBool, detect_narrow_internal_solid_infill))
|
||||||
)
|
)
|
||||||
|
|
||||||
PRINT_CONFIG_CLASS_DEFINE(
|
PRINT_CONFIG_CLASS_DEFINE(
|
||||||
|
|||||||
@@ -679,7 +679,10 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||||||
} else if (
|
} else if (
|
||||||
opt_key == "elefant_foot_compensation"
|
opt_key == "elefant_foot_compensation"
|
||||||
|| opt_key == "support_material_contact_distance"
|
|| opt_key == "support_material_contact_distance"
|
||||||
|| opt_key == "xy_size_compensation") {
|
//w12
|
||||||
|
|| opt_key == "xy_size_compensation"
|
||||||
|
|| opt_key == "xy_hole_compensation"
|
||||||
|
|| opt_key == "xy_contour_compensation") {
|
||||||
steps.emplace_back(posSlice);
|
steps.emplace_back(posSlice);
|
||||||
} else if (opt_key == "support_material") {
|
} else if (opt_key == "support_material") {
|
||||||
steps.emplace_back(posSupportMaterial);
|
steps.emplace_back(posSupportMaterial);
|
||||||
|
|||||||
@@ -151,7 +151,9 @@ static std::vector<VolumeSlices> slice_volumes_inner(
|
|||||||
|
|
||||||
const size_t num_extruders = print_config.nozzle_diameter.size();
|
const size_t num_extruders = print_config.nozzle_diameter.size();
|
||||||
const bool is_mm_painted = num_extruders > 1 && std::any_of(model_volumes.cbegin(), model_volumes.cend(), [](const ModelVolume *mv) { return mv->is_mm_painted(); });
|
const bool is_mm_painted = num_extruders > 1 && std::any_of(model_volumes.cbegin(), model_volumes.cend(), [](const ModelVolume *mv) { return mv->is_mm_painted(); });
|
||||||
const auto extra_offset = is_mm_painted ? 0.f : std::max(0.f, float(print_object_config.xy_size_compensation.value));
|
//w12
|
||||||
|
//const auto extra_offset = is_mm_painted ? 0.f : std::max(0.f, float(print_object_config.xy_size_compensation.value));
|
||||||
|
const auto extra_offset = 0.f;
|
||||||
|
|
||||||
for (const ModelVolume *model_volume : model_volumes)
|
for (const ModelVolume *model_volume : model_volumes)
|
||||||
if (model_volume_needs_slicing(*model_volume)) {
|
if (model_volume_needs_slicing(*model_volume)) {
|
||||||
@@ -728,7 +730,9 @@ void PrintObject::slice_volumes()
|
|||||||
|
|
||||||
// If XY Size compensation is also enabled, notify the user that XY Size compensation
|
// If XY Size compensation is also enabled, notify the user that XY Size compensation
|
||||||
// would not be used because the object is multi-material painted.
|
// would not be used because the object is multi-material painted.
|
||||||
if (m_config.xy_size_compensation.value != 0.f) {
|
//w12
|
||||||
|
//if (m_config.xy_size_compensation.value != 0.f) {
|
||||||
|
if (m_config.xy_hole_compensation.value != 0.f || m_config.xy_contour_compensation.value != 0.f) {
|
||||||
this->active_step_add_warning(
|
this->active_step_add_warning(
|
||||||
PrintStateBase::WarningLevel::CRITICAL,
|
PrintStateBase::WarningLevel::CRITICAL,
|
||||||
_u8L("An object has enabled XY Size compensation which will not be used because it is also multi-material painted.\nXY Size "
|
_u8L("An object has enabled XY Size compensation which will not be used because it is also multi-material painted.\nXY Size "
|
||||||
@@ -746,6 +750,9 @@ void PrintObject::slice_volumes()
|
|||||||
// Compensation value, scaled. Only applying the negative scaling here, as the positive scaling has already been applied during slicing.
|
// Compensation value, scaled. Only applying the negative scaling here, as the positive scaling has already been applied during slicing.
|
||||||
const size_t num_extruders = print->config().nozzle_diameter.size();
|
const size_t num_extruders = print->config().nozzle_diameter.size();
|
||||||
const auto xy_compensation_scaled = (num_extruders > 1 && this->is_mm_painted()) ? scaled<float>(0.f) : scaled<float>(std::min(m_config.xy_size_compensation.value, 0.));
|
const auto xy_compensation_scaled = (num_extruders > 1 && this->is_mm_painted()) ? scaled<float>(0.f) : scaled<float>(std::min(m_config.xy_size_compensation.value, 0.));
|
||||||
|
//w12
|
||||||
|
const auto xy_hole_scaled = (num_extruders > 1 && this->is_mm_painted()) ? scaled<float>(0.f) : scaled<float>(m_config.xy_hole_compensation.value);
|
||||||
|
const auto xy_contour_scaled = (num_extruders > 1 && this->is_mm_painted()) ? scaled<float>(0.f) : scaled<float>(m_config.xy_contour_compensation.value);
|
||||||
const float elephant_foot_compensation_scaled = (m_config.raft_layers == 0) ?
|
const float elephant_foot_compensation_scaled = (m_config.raft_layers == 0) ?
|
||||||
// Only enable Elephant foot compensation if printing directly on the print bed.
|
// Only enable Elephant foot compensation if printing directly on the print bed.
|
||||||
float(scale_(m_config.elefant_foot_compensation.value)) :
|
float(scale_(m_config.elefant_foot_compensation.value)) :
|
||||||
@@ -754,7 +761,9 @@ void PrintObject::slice_volumes()
|
|||||||
ExPolygons lslices_1st_layer;
|
ExPolygons lslices_1st_layer;
|
||||||
tbb::parallel_for(
|
tbb::parallel_for(
|
||||||
tbb::blocked_range<size_t>(0, m_layers.size()),
|
tbb::blocked_range<size_t>(0, m_layers.size()),
|
||||||
[this, xy_compensation_scaled, elephant_foot_compensation_scaled, &lslices_1st_layer](const tbb::blocked_range<size_t>& range) {
|
//w12
|
||||||
|
//[this, xy_compensation_scaled, elephant_foot_compensation_scaled, &lslices_1st_layer](const tbb::blocked_range<size_t>& range) {
|
||||||
|
[this, xy_hole_scaled, xy_contour_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) {
|
for (size_t layer_id = range.begin(); layer_id < range.end(); ++ layer_id) {
|
||||||
m_print->throw_if_canceled();
|
m_print->throw_if_canceled();
|
||||||
Layer *layer = m_layers[layer_id];
|
Layer *layer = m_layers[layer_id];
|
||||||
@@ -767,7 +776,9 @@ void PrintObject::slice_volumes()
|
|||||||
if (elfoot > 0) {
|
if (elfoot > 0) {
|
||||||
// Apply the elephant foot compensation and store the 1st layer slices without the Elephant foot compensation applied.
|
// 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->m_slices.surfaces));
|
lslices_1st_layer = to_expolygons(std::move(layerm->m_slices.surfaces));
|
||||||
float delta = xy_compensation_scaled;
|
//w12
|
||||||
|
//float delta = xy_compensation_scaled;
|
||||||
|
float delta = 0.15;
|
||||||
if (delta > elfoot) {
|
if (delta > elfoot) {
|
||||||
delta -= elfoot;
|
delta -= elfoot;
|
||||||
elfoot = 0.f;
|
elfoot = 0.f;
|
||||||
@@ -779,16 +790,45 @@ void PrintObject::slice_volumes()
|
|||||||
(delta == 0.f) ? lslices_1st_layer : offset_ex(lslices_1st_layer, delta),
|
(delta == 0.f) ? lslices_1st_layer : offset_ex(lslices_1st_layer, delta),
|
||||||
layerm->flow(frExternalPerimeter), unscale<double>(elfoot))),
|
layerm->flow(frExternalPerimeter), unscale<double>(elfoot))),
|
||||||
stInternal);
|
stInternal);
|
||||||
if (xy_compensation_scaled < 0.f)
|
//w12
|
||||||
lslices_1st_layer = offset_ex(std::move(lslices_1st_layer), xy_compensation_scaled);
|
if (m_config.xy_size_compensation.value < 0.f)
|
||||||
} else if (xy_compensation_scaled < 0.f) {
|
lslices_1st_layer = offset_ex(std::move(lslices_1st_layer), m_config.xy_size_compensation.value);
|
||||||
|
lslices_1st_layer = to_expolygons(std::move(layerm->m_slices.surfaces));
|
||||||
|
if (xy_contour_scaled > 0 || xy_hole_scaled > 0) {
|
||||||
|
lslices_1st_layer = _shrink_contour_holes(std::max(0.f, xy_contour_scaled), std::max(0.f, xy_hole_scaled),
|
||||||
|
lslices_1st_layer);
|
||||||
|
}
|
||||||
|
if (xy_contour_scaled < 0 || xy_hole_scaled < 0) {
|
||||||
|
lslices_1st_layer = _shrink_contour_holes(std::min(0.f, xy_contour_scaled), std::min(0.f, xy_hole_scaled),
|
||||||
|
lslices_1st_layer);
|
||||||
|
}
|
||||||
|
layerm->m_slices.set(union_ex(Slic3r::elephant_foot_compensation(lslices_1st_layer,
|
||||||
|
layerm->flow(frExternalPerimeter),
|
||||||
|
unscale<double>(elfoot))),
|
||||||
|
stInternal);
|
||||||
|
} /*else (xy_compensation_scaled < 0.f) {
|
||||||
// Apply the XY compensation.
|
// Apply the XY compensation.
|
||||||
layerm->m_slices.set(
|
layerm->m_slices.set(
|
||||||
offset_ex(to_expolygons(std::move(layerm->m_slices.surfaces)), xy_compensation_scaled),
|
offset_ex(to_expolygons(std::move(layerm->m_slices.surfaces)), xy_compensation_scaled),
|
||||||
stInternal);
|
stInternal);*/
|
||||||
|
//w12
|
||||||
|
else {
|
||||||
|
if (xy_contour_scaled != 0.0f || xy_hole_scaled != 0.0f) {
|
||||||
|
ExPolygons expolygons = to_expolygons(std::move(layerm->m_slices.surfaces));
|
||||||
|
if (xy_contour_scaled > 0 || xy_hole_scaled > 0) {
|
||||||
|
expolygons = _shrink_contour_holes(std::max(0.f, xy_contour_scaled), std::max(0.f, xy_hole_scaled),
|
||||||
|
expolygons);
|
||||||
|
}
|
||||||
|
if (xy_contour_scaled < 0 || xy_hole_scaled < 0) {
|
||||||
|
expolygons = _shrink_contour_holes(std::min(0.f, xy_contour_scaled), std::min(0.f, xy_hole_scaled),
|
||||||
|
expolygons);
|
||||||
|
}
|
||||||
|
layerm->m_slices.set(std::move(expolygons), stInternal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (xy_compensation_scaled < 0.f || elfoot > 0.f) {
|
//w12
|
||||||
|
/* if (xy_compensation_scaled < 0.f || elfoot > 0.f) {
|
||||||
// Apply the negative XY compensation.
|
// Apply the negative XY compensation.
|
||||||
Polygons trimming;
|
Polygons trimming;
|
||||||
static const float eps = float(scale_(m_config.slice_closing_radius.value) * 1.5);
|
static const float eps = float(scale_(m_config.slice_closing_radius.value) * 1.5);
|
||||||
@@ -800,7 +840,49 @@ void PrintObject::slice_volumes()
|
|||||||
trimming = offset(layer->merged(float(SCALED_EPSILON)), xy_compensation_scaled - float(SCALED_EPSILON));
|
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)
|
for (size_t region_id = 0; region_id < layer->m_regions.size(); ++ region_id)
|
||||||
layer->m_regions[region_id]->trim_surfaces(trimming);
|
layer->m_regions[region_id]->trim_surfaces(trimming);
|
||||||
}
|
}*/
|
||||||
|
float max_growth = std::max(xy_hole_scaled, xy_contour_scaled);
|
||||||
|
float min_growth = std::min(xy_hole_scaled, xy_contour_scaled);
|
||||||
|
ExPolygons merged_poly_for_holes_growing;
|
||||||
|
if (max_growth > 0) {
|
||||||
|
merged_poly_for_holes_growing = layer->merged(float(SCALED_EPSILON));
|
||||||
|
merged_poly_for_holes_growing = _shrink_contour_holes(std::max(0.f, xy_contour_scaled),
|
||||||
|
std::max(0.f, xy_hole_scaled),
|
||||||
|
union_ex(merged_poly_for_holes_growing));
|
||||||
|
|
||||||
|
Polygons processed;
|
||||||
|
for (size_t region_id = 0; region_id < layer->regions().size(); ++region_id) {
|
||||||
|
ExPolygons slices = to_expolygons(std::move(layer->m_regions[region_id]->m_slices.surfaces));
|
||||||
|
if (max_growth > 0.f) {
|
||||||
|
slices = intersection_ex(offset_ex(slices, max_growth), merged_poly_for_holes_growing);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (region_id > 0)
|
||||||
|
slices = diff_ex(to_polygons(std::move(slices)), processed);
|
||||||
|
if (region_id + 1 < layer->regions().size())
|
||||||
|
polygons_append(processed, slices);
|
||||||
|
layer->m_regions[region_id]->m_slices.set(std::move(slices), stInternal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (min_growth < 0.f || elfoot > 0.f) {
|
||||||
|
ExPolygons 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), -eps);
|
||||||
|
trimming = Slic3r::elephant_foot_compensation(lslices_1st_layer,
|
||||||
|
layer->m_regions.front()->flow(frExternalPerimeter),
|
||||||
|
unscale<double>(elfoot));
|
||||||
|
} else {
|
||||||
|
trimming = layer->merged(float(SCALED_EPSILON));
|
||||||
|
}
|
||||||
|
if (min_growth < 0.0f)
|
||||||
|
trimming = _shrink_contour_holes(std::min(0.f, xy_contour_scaled), std::min(0.f, xy_hole_scaled), trimming);
|
||||||
|
for (size_t region_id = 0; region_id < layer->regions().size(); ++region_id) {
|
||||||
|
ExPolygons contour_exp = to_expolygons(std::move(layer->regions()[region_id]->m_slices.surfaces));
|
||||||
|
|
||||||
|
layer->regions()[region_id]->m_slices.set(intersection_ex(contour_exp, to_polygons(trimming)), stInternal);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Merge all regions' slices to get islands sorted topologically, chain them by a shortest path in separate index list
|
// Merge all regions' slices to get islands sorted topologically, chain them by a shortest path in separate index list
|
||||||
layer->make_slices();
|
layer->make_slices();
|
||||||
@@ -821,7 +903,37 @@ void PrintObject::slice_volumes()
|
|||||||
m_print->throw_if_canceled();
|
m_print->throw_if_canceled();
|
||||||
BOOST_LOG_TRIVIAL(debug) << "Slicing volumes - make_slices in parallel - end";
|
BOOST_LOG_TRIVIAL(debug) << "Slicing volumes - make_slices in parallel - end";
|
||||||
}
|
}
|
||||||
|
//w12
|
||||||
|
ExPolygons PrintObject::_shrink_contour_holes(double contour_delta, double hole_delta, const ExPolygons &polys) const
|
||||||
|
{
|
||||||
|
ExPolygons new_ex_polys;
|
||||||
|
for (const ExPolygon &ex_poly : polys) {
|
||||||
|
Polygons contours;
|
||||||
|
Polygons holes;
|
||||||
|
for (const Polygon &hole : ex_poly.holes) {
|
||||||
|
if (hole_delta != 0) {
|
||||||
|
for (Polygon &newHole : offset(hole, -hole_delta)) {
|
||||||
|
newHole.make_counter_clockwise();
|
||||||
|
holes.emplace_back(std::move(newHole));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
holes.push_back(hole);
|
||||||
|
holes.back().make_counter_clockwise();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (contour_delta != 0) {
|
||||||
|
Polygons new_contours = offset(ex_poly.contour, contour_delta);
|
||||||
|
if (new_contours.size() == 0)
|
||||||
|
continue;
|
||||||
|
contours.insert(contours.end(), std::make_move_iterator(new_contours.begin()), std::make_move_iterator(new_contours.end()));
|
||||||
|
} else {
|
||||||
|
contours.push_back(ex_poly.contour);
|
||||||
|
}
|
||||||
|
ExPolygons temp = diff_ex(union_(contours), union_(holes));
|
||||||
|
new_ex_polys.insert(new_ex_polys.end(), std::make_move_iterator(temp.begin()), std::make_move_iterator(temp.end()));
|
||||||
|
}
|
||||||
|
return union_ex(new_ex_polys);
|
||||||
|
}
|
||||||
std::vector<Polygons> PrintObject::slice_support_volumes(const ModelVolumeType model_volume_type) const
|
std::vector<Polygons> PrintObject::slice_support_volumes(const ModelVolumeType model_volume_type) const
|
||||||
{
|
{
|
||||||
auto it_volume = this->model_object()->volumes.begin();
|
auto it_volume = this->model_object()->volumes.begin();
|
||||||
|
|||||||
@@ -181,6 +181,35 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||||||
m_support_material_overhangs_queried = false;
|
m_support_material_overhangs_queried = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//w12
|
||||||
|
if (abs(config->option<ConfigOptionFloat>("xy_hole_compensation")->value) > 2) {
|
||||||
|
const wxString msg_text = _(L("This setting is only used for model size tunning with small value in some cases.\n"
|
||||||
|
"For example, when model size has small error and hard to be assembled.\n"
|
||||||
|
"For large size tuning, please use model scale function.\n\n"
|
||||||
|
"The value will be reset to 0."));
|
||||||
|
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||||
|
DynamicPrintConfig new_conf = *config;
|
||||||
|
is_msg_dlg_already_exist = true;
|
||||||
|
dialog.ShowModal();
|
||||||
|
new_conf.set_key_value("xy_hole_compensation", new ConfigOptionFloat(0));
|
||||||
|
apply(config, &new_conf);
|
||||||
|
is_msg_dlg_already_exist = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (abs(config->option<ConfigOptionFloat>("xy_contour_compensation")->value) > 2) {
|
||||||
|
const wxString msg_text = _(L("This setting is only used for model size tunning with small value in some cases.\n"
|
||||||
|
"For example, when model size has small error and hard to be assembled.\n"
|
||||||
|
"For large size tuning, please use model scale function.\n\n"
|
||||||
|
"The value will be reset to 0."));
|
||||||
|
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||||
|
DynamicPrintConfig new_conf = *config;
|
||||||
|
is_msg_dlg_already_exist = true;
|
||||||
|
dialog.ShowModal();
|
||||||
|
new_conf.set_key_value("xy_contour_compensation", new ConfigOptionFloat(0));
|
||||||
|
apply(config, &new_conf);
|
||||||
|
is_msg_dlg_already_exist = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (config->option<ConfigOptionPercent>("fill_density")->value == 100) {
|
if (config->option<ConfigOptionPercent>("fill_density")->value == 100) {
|
||||||
const int fill_pattern = config->option<ConfigOptionEnum<InfillPattern>>("fill_pattern")->value;
|
const int fill_pattern = config->option<ConfigOptionEnum<InfillPattern>>("fill_pattern")->value;
|
||||||
if (bool correct_100p_fill = config->option_def("top_fill_pattern")->enum_def->enum_to_index(fill_pattern).has_value();
|
if (bool correct_100p_fill = config->option_def("top_fill_pattern")->enum_def->enum_to_index(fill_pattern).has_value();
|
||||||
|
|||||||
@@ -1026,8 +1026,24 @@ MenuFactory::MenuFactory()
|
|||||||
|
|
||||||
void MenuFactory::create_default_menu()
|
void MenuFactory::create_default_menu()
|
||||||
{
|
{
|
||||||
wxMenu* sub_menu = append_submenu_add_generic(&m_default_menu, ModelVolumeType::INVALID);
|
//Y17
|
||||||
append_submenu(&m_default_menu, sub_menu, wxID_ANY, _L("Add Shape"), "", "add_part",
|
wxMenu* menu = &m_default_menu;
|
||||||
|
append_menu_item(menu, wxID_ANY, _L("Select All"), _L("Selects all objects"),
|
||||||
|
[](wxCommandEvent&) { plater()->select_all(); }, "", nullptr,
|
||||||
|
[](){return (plater() != nullptr) && !plater()->model().objects.empty(); }, m_parent);
|
||||||
|
|
||||||
|
append_menu_item(menu, wxID_ANY, _L("Delete All"), _L("Deletes all objects"),
|
||||||
|
[](wxCommandEvent&) { plater()->reset(); }, "", nullptr,
|
||||||
|
[]() {return (plater() != nullptr) && !plater()->model().objects.empty(); }, m_parent);
|
||||||
|
|
||||||
|
append_menu_item(menu, wxID_ANY, _L("Arrange"), _L("Arrange all objects"),
|
||||||
|
[](wxCommandEvent&) { plater()->arrange(); }, "", nullptr,
|
||||||
|
[]() {return plater()->can_arrange(); }, m_parent);
|
||||||
|
|
||||||
|
m_default_menu.SetFirstSeparator();
|
||||||
|
|
||||||
|
wxMenu* sub_menu = append_submenu_add_generic(menu, ModelVolumeType::INVALID);
|
||||||
|
append_submenu(menu, sub_menu, wxID_ANY, _L("Add Shape"), "", "add_part",
|
||||||
[]() {return true; }, m_parent);
|
[]() {return true; }, m_parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1296,9 +1312,14 @@ void MenuFactory::update_objects_menu()
|
|||||||
|
|
||||||
void MenuFactory::update_default_menu()
|
void MenuFactory::update_default_menu()
|
||||||
{
|
{
|
||||||
const auto menu_item_id = m_default_menu.FindItem(_("Add Shape"));
|
//Y17
|
||||||
if (menu_item_id != wxNOT_FOUND)
|
for (auto& name : { _L("Select All"), _L("Delete All"), _L("Arrange"), _L("Add Shape") }) {
|
||||||
m_default_menu.Destroy(menu_item_id);
|
const auto menu_item_id = m_default_menu.FindItem(name);
|
||||||
|
if (menu_item_id != wxNOT_FOUND)
|
||||||
|
m_default_menu.Destroy(menu_item_id);
|
||||||
|
}
|
||||||
|
m_default_menu.DestroySeparators();
|
||||||
|
|
||||||
create_default_menu();
|
create_default_menu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -320,10 +320,13 @@ void GLGizmoEmboss::create_volume(ModelVolumeType volume_type, const Vec2d &mous
|
|||||||
m_raycast_manager.actualize(*obj, &cond, &meshes);
|
m_raycast_manager.actualize(*obj, &cond, &meshes);
|
||||||
std::optional<RaycastManager::Hit> hit = ray_from_camera(m_raycast_manager, coor, camera, &cond);
|
std::optional<RaycastManager::Hit> hit = ray_from_camera(m_raycast_manager, coor, camera, &cond);
|
||||||
|
|
||||||
Transform3d surface_trmat = create_transformation_onto_surface(Vec3d(mouse_pos.x(), mouse_pos.y(), 0.2),
|
DynamicPrintConfig *print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
||||||
|
double pa_first_layer_height = print_config->get_abs_value("first_layer_height");
|
||||||
|
double pa_layer_height = print_config->get_abs_value("layer_height");
|
||||||
|
Transform3d surface_trmat = create_transformation_onto_surface(Vec3d(mouse_pos.x(), mouse_pos.y(), pa_first_layer_height),
|
||||||
hit->normal,
|
hit->normal,
|
||||||
priv::up_limit);
|
priv::up_limit);
|
||||||
emboss_data.text_configuration.style.prop.emboss = 0.2;
|
emboss_data.text_configuration.style.prop.emboss = pa_layer_height;
|
||||||
emboss_data.text_configuration.style.prop.size_in_mm = 7;
|
emboss_data.text_configuration.style.prop.size_in_mm = 7;
|
||||||
|
|
||||||
const FontProp &font_prop = emboss_data.text_configuration.style.prop;
|
const FontProp &font_prop = emboss_data.text_configuration.style.prop;
|
||||||
|
|||||||
@@ -55,11 +55,18 @@
|
|||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
|
//B45
|
||||||
|
#include <regex>
|
||||||
|
#include <wx/regex.h>
|
||||||
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
wxDEFINE_EVENT(EVT_LOAD_URL, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_LOAD_URL, wxCommandEvent);
|
||||||
wxDEFINE_EVENT(EVT_LOAD_PRINTER_URL, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_LOAD_PRINTER_URL, wxCommandEvent);
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
|
|
||||||
enum class ERescaleTarget
|
enum class ERescaleTarget
|
||||||
{
|
{
|
||||||
Mainframe,
|
Mainframe,
|
||||||
@@ -743,6 +750,10 @@ void MainFrame::init_tabpanel()
|
|||||||
#else
|
#else
|
||||||
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
|
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
|
||||||
#endif
|
#endif
|
||||||
|
//B45
|
||||||
|
#if defined(__WIN32__) || defined(__WXMAC__)
|
||||||
|
m_printer_view->PauseButton();
|
||||||
|
#endif
|
||||||
if (int old_selection = e.GetOldSelection();
|
if (int old_selection = e.GetOldSelection();
|
||||||
old_selection != wxNOT_FOUND && old_selection < static_cast<int>(m_tabpanel->GetPageCount())) {
|
old_selection != wxNOT_FOUND && old_selection < static_cast<int>(m_tabpanel->GetPageCount())) {
|
||||||
Tab* old_tab = dynamic_cast<Tab*>(m_tabpanel->GetPage(old_selection));
|
Tab* old_tab = dynamic_cast<Tab*>(m_tabpanel->GetPage(old_selection));
|
||||||
@@ -886,7 +897,34 @@ void MainFrame::create_preset_tabs()
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
m_tabpanel->AddPage(m_guide_view, _L("Guide"));
|
m_tabpanel->AddPage(m_guide_view, _L("Guide"));
|
||||||
|
//B45
|
||||||
|
m_printer_view->SetUpdateHandler([this](wxCommandEvent &event) {
|
||||||
|
wxGetApp().get_tab(Preset::TYPE_PRINTER)->update_preset_choice();
|
||||||
|
wxGetApp().get_tab(Preset::TYPE_PRINTER)->update_btns_enabling();
|
||||||
|
wxGetApp().plater()->sidebar().update_presets(Preset::TYPE_PRINTER);
|
||||||
|
});
|
||||||
|
|
||||||
|
//m_printer_view->SetDeleteHandler([this](wxCommandEvent &event) {
|
||||||
|
// PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||||
|
|
||||||
|
// const std::string &printer_name = preset_bundle.physical_printers.get_selected_full_printer_name();
|
||||||
|
// if (printer_name.empty())
|
||||||
|
// return false;
|
||||||
|
|
||||||
|
// wxString msg;
|
||||||
|
// //if (!note_string.IsEmpty())
|
||||||
|
// // msg += note_string + "\n";
|
||||||
|
// msg += format_wxstr(_L("Are you sure you want to delete \"%1%\" printer?"), printer_name);
|
||||||
|
|
||||||
|
// if (MessageDialog(this, msg, _L("Delete Physical Printer"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal() != wxID_YES)
|
||||||
|
// return false;
|
||||||
|
|
||||||
|
// preset_bundle.physical_printers.delete_selected_printer();
|
||||||
|
//});
|
||||||
|
|
||||||
|
// #if defined(__WIN32__)
|
||||||
|
// m_tabpanel->Bind(wxCUSTOMEVT_NOTEBOOK_SEL_CHANGED, &MainFrame::OnTabPanelSelectionChanged, this);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainFrame::add_created_tab(Tab* panel, const std::string& bmp_name /*= ""*/)
|
void MainFrame::add_created_tab(Tab* panel, const std::string& bmp_name /*= ""*/)
|
||||||
@@ -2097,23 +2135,141 @@ void MainFrame::select_tab(Tab* tab)
|
|||||||
page_idx++;
|
page_idx++;
|
||||||
select_tab(size_t(page_idx));
|
select_tab(size_t(page_idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//B45
|
||||||
|
// void MainFrame::OnTabPanelSelectionChanged(wxCommandEvent &event)
|
||||||
|
// {
|
||||||
|
|
||||||
|
// m_printer_view->PauseButton();
|
||||||
|
// event.Skip();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//B4
|
//B4
|
||||||
|
//B45
|
||||||
void MainFrame::select_tab(size_t tab/* = size_t(-1)*/)
|
void MainFrame::select_tab(size_t tab/* = size_t(-1)*/)
|
||||||
{
|
{
|
||||||
bool tabpanel_was_hidden = false;
|
bool tabpanel_was_hidden = false;
|
||||||
|
|
||||||
// Controls on page are created on active page of active tab now.
|
// Controls on page are created on active page of active tab now.
|
||||||
// We should select/activate tab before its showing to avoid an UI-flickering
|
// We should select/activate tab before its showing to avoid an UI-flickering
|
||||||
|
//B45
|
||||||
|
|
||||||
auto select = [this, tab](bool was_hidden) {
|
auto select = [this, tab](bool was_hidden) {
|
||||||
// when tab == -1, it means we should show the last selected tab
|
// when tab == -1, it means we should show the last selected tab
|
||||||
size_t new_selection = tab == (size_t)(-1) ? m_last_selected_tab : (m_layout == ESettingsLayout::Dlg && tab != 0) ? tab - 1 : tab;
|
size_t new_selection = tab == (size_t)(-1) ? m_last_selected_tab : (m_layout == ESettingsLayout::Dlg && tab != 0) ? tab - 1 : tab;
|
||||||
//B4
|
//B4
|
||||||
if (m_tabpanel->GetSelection() == 4) {
|
if (m_tabpanel->GetSelection() == 4) {
|
||||||
|
// B45
|
||||||
|
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||||
|
const PhysicalPrinterCollection &ph_printers = preset_bundle.physical_printers;
|
||||||
|
struct PhysicalPrinterPresetData
|
||||||
|
{
|
||||||
|
wxString lower_name; // just for sorting
|
||||||
|
wxString name; // preset_name
|
||||||
|
wxString fullname; // full name
|
||||||
|
bool selected; // is selected
|
||||||
|
std::string model_id;
|
||||||
|
};
|
||||||
|
std::vector<PhysicalPrinterPresetData> preset_data;
|
||||||
|
for (PhysicalPrinterCollection::ConstIterator it = ph_printers.begin(); it != ph_printers.end(); ++it) {
|
||||||
|
for (const std::string &preset_name : it->get_preset_names()) {
|
||||||
|
|
||||||
|
Preset *preset = wxGetApp().preset_bundle->printers.find_preset(preset_name);
|
||||||
|
if (preset != nullptr) {
|
||||||
|
std::string model_id = preset->config.opt_string("printer_model");
|
||||||
|
|
||||||
|
preset_data.push_back({wxString::FromUTF8(it->get_full_name(preset_name)).Lower(), wxString::FromUTF8(preset_name),
|
||||||
|
wxString::FromUTF8(it->get_full_name(preset_name)), ph_printers.is_selected(it, preset_name),
|
||||||
|
model_id});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_collection = &preset_bundle.printers;
|
||||||
|
std::vector<const PhysicalPrinterPresetData *> missingPresets;
|
||||||
|
std::vector<MachineListButton *> m_buttons = (m_printer_view->GetButton());
|
||||||
|
|
||||||
|
for (auto it = m_buttons.begin(); it != m_buttons.end();) {
|
||||||
|
bool foundPreset = false;
|
||||||
|
for (const PhysicalPrinterPresetData &data : preset_data) {
|
||||||
|
if ((*it)->getLabel() == data.fullname) {
|
||||||
|
foundPreset = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!foundPreset) {
|
||||||
|
(*it)->StopStatusThread();
|
||||||
|
|
||||||
|
delete *it;
|
||||||
|
|
||||||
|
it = m_buttons.erase(it);
|
||||||
|
m_printer_view->SetButtons(m_buttons);
|
||||||
|
m_printer_view->UpdateLayout();
|
||||||
|
} else {
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const PhysicalPrinterPresetData &data : preset_data) {
|
||||||
|
bool foundButton = false;
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
if (button->getLabel() == data.fullname) {
|
||||||
|
foundButton = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!foundButton) {
|
||||||
|
missingPresets.push_back(&data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const PhysicalPrinterPresetData *data : missingPresets) {
|
||||||
|
|
||||||
|
Preset *preset = m_collection->find_preset((data->name).ToStdString());
|
||||||
|
if (!preset || !preset->is_visible)
|
||||||
|
continue;
|
||||||
|
wxStringTokenizer tokenizer((data->fullname), "*");
|
||||||
|
|
||||||
|
std::string tem_name = (into_u8(tokenizer.GetNextToken().Trim().mb_str()));
|
||||||
|
auto * printer = preset_bundle.physical_printers.find_printer(tem_name);
|
||||||
|
if (printer != nullptr) {
|
||||||
|
wxString host = (printer->config.opt_string("print_host"));
|
||||||
|
|
||||||
|
std::regex ipRegex(R"(\b(?:\d{1,3}\.){3}\d{1,3}\b)");
|
||||||
|
bool isValidIPAddress = std::regex_match(host.ToStdString(), ipRegex);
|
||||||
|
DynamicPrintConfig *cfg_t = &(printer->config);
|
||||||
|
|
||||||
|
wxStringTokenizer tokenizer3((data->lower_name), wxT("*"), wxTOKEN_RET_EMPTY_ALL);
|
||||||
|
wxString printer_name = tokenizer3.GetNextToken();
|
||||||
|
|
||||||
|
if (isValidIPAddress) {
|
||||||
|
m_printer_view->AddButton(
|
||||||
|
printer_name, host, (data->model_id), (data->fullname),
|
||||||
|
[host, this](wxMouseEvent &event) {
|
||||||
|
wxString formattedHost = wxString::Format("http://%s", host);
|
||||||
|
if (!host.Lower().starts_with("http"))
|
||||||
|
wxString formattedHost = wxString::Format("http://%s", host);
|
||||||
|
if (!formattedHost.Lower().ends_with("10088"))
|
||||||
|
formattedHost = wxString::Format("%s:10088", formattedHost);
|
||||||
|
this->m_printer_view->load_url(formattedHost);
|
||||||
|
},
|
||||||
|
(data->selected), cfg_t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(__WIN32__) || defined(__WXMAC__)
|
||||||
|
m_printer_view->ResumeButton();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (const DynamicPrintConfig *cfg = wxGetApp().preset_bundle->physical_printers.get_selected_printer_config(); cfg) {
|
if (const DynamicPrintConfig *cfg = wxGetApp().preset_bundle->physical_printers.get_selected_printer_config(); cfg) {
|
||||||
PresetBundle & preset_bundle = *wxGetApp().preset_bundle;
|
|
||||||
const PhysicalPrinter &pp = preset_bundle.physical_printers.get_selected_printer();
|
const PhysicalPrinter &pp = preset_bundle.physical_printers.get_selected_printer();
|
||||||
wxString host = pp.config.opt_string("print_host");
|
wxString host = pp.config.opt_string("print_host");
|
||||||
if (host.empty()) {
|
//B45
|
||||||
|
std::regex ipRegex(R"(\b(?:\d{1,3}\.){3}\d{1,3}\b)");
|
||||||
|
bool isValidIPAddress = std::regex_match(host.ToStdString(), ipRegex);
|
||||||
|
if (host.empty() || !isValidIPAddress) {
|
||||||
tem_host = "";
|
tem_host = "";
|
||||||
host = wxString::Format("file://%s/web/qidi/missing_connection.html", from_u8(resources_dir()));
|
host = wxString::Format("file://%s/web/qidi/missing_connection.html", from_u8(resources_dir()));
|
||||||
}
|
}
|
||||||
@@ -2124,10 +2280,10 @@ void MainFrame::select_tab(size_t tab/* = size_t(-1)*/)
|
|||||||
host = wxString::Format("%s:10088", host);
|
host = wxString::Format("%s:10088", host);
|
||||||
}
|
}
|
||||||
if (tem_host != host) {
|
if (tem_host != host) {
|
||||||
|
//B45
|
||||||
m_printer_view->load_url(host);
|
m_printer_view->load_url(host);
|
||||||
tem_host = host;
|
tem_host = host;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
tem_host = "";
|
tem_host = "";
|
||||||
wxString url = wxString::Format("file://%s/web/qidi/missing_connection.html", from_u8(resources_dir()));
|
wxString url = wxString::Format("file://%s/web/qidi/missing_connection.html", from_u8(resources_dir()));
|
||||||
|
|||||||
@@ -196,6 +196,9 @@ public:
|
|||||||
// When tab == -1, will be selected last selected tab
|
// When tab == -1, will be selected last selected tab
|
||||||
void select_tab(Tab* tab);
|
void select_tab(Tab* tab);
|
||||||
void select_tab(size_t tab = size_t(-1));
|
void select_tab(size_t tab = size_t(-1));
|
||||||
|
//B45
|
||||||
|
//void OnTabPanelSelectionChanged(wxCommandEvent &event);
|
||||||
|
|
||||||
void select_view(const std::string& direction);
|
void select_view(const std::string& direction);
|
||||||
// Propagate changed configuration from the Tab to the Plater and save changes to the AppConfig
|
// Propagate changed configuration from the Tab to the Plater and save changes to the AppConfig
|
||||||
void on_config_changed(DynamicPrintConfig* cfg) const ;
|
void on_config_changed(DynamicPrintConfig* cfg) const ;
|
||||||
@@ -220,6 +223,10 @@ public:
|
|||||||
PrinterWebView * m_printer_view{nullptr};
|
PrinterWebView * m_printer_view{nullptr};
|
||||||
//B28
|
//B28
|
||||||
GuideWebView * m_guide_view{nullptr};
|
GuideWebView * m_guide_view{nullptr};
|
||||||
|
//B45
|
||||||
|
PresetCollection *m_collection{nullptr};
|
||||||
|
|
||||||
|
|
||||||
wxBookCtrlBase * m_tabpanel{nullptr};
|
wxBookCtrlBase * m_tabpanel{nullptr};
|
||||||
SettingsDialog m_settings_dialog;
|
SettingsDialog m_settings_dialog;
|
||||||
DiffPresetDialog diff_dialog;
|
DiffPresetDialog diff_dialog;
|
||||||
|
|||||||
@@ -12,17 +12,185 @@
|
|||||||
|
|
||||||
#include <slic3r/GUI/Widgets/WebView.hpp>
|
#include <slic3r/GUI/Widgets/WebView.hpp>
|
||||||
|
|
||||||
|
#include "PhysicalPrinterDialog.hpp"
|
||||||
|
//B45
|
||||||
|
#include <wx/regex.h>
|
||||||
|
#include <boost/regex.hpp>
|
||||||
|
|
||||||
namespace pt = boost::property_tree;
|
namespace pt = boost::property_tree;
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
|
|
||||||
|
wxBEGIN_EVENT_TABLE(MachineListButton, wxButton) EVT_PAINT(MachineListButton::OnPaint) EVT_ENTER_WINDOW(MachineListButton::OnMouseEnter)
|
||||||
|
EVT_LEAVE_WINDOW(MachineListButton::OnMouseLeave) EVT_LEFT_DOWN(MachineListButton::OnMouseLeftDown) EVT_LEFT_UP(MachineListButton::OnMouseLeftUp)
|
||||||
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
void MachineListButton::OnPaint(wxPaintEvent &event)
|
||||||
|
{
|
||||||
|
wxPaintDC dc(this);
|
||||||
|
//m_bitmap = get_bmp_bundle("X-MAX 3_thumbnail", 80)->GetBitmapFor(this);
|
||||||
|
|
||||||
|
if (m_isSimpleMode) {
|
||||||
|
dc.SetFont(wxFont(15, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
||||||
|
dc.SetTextForeground(wxColour(230, 230, 230));
|
||||||
|
dc.DrawText(m_name_text, 10 , 10);
|
||||||
|
//wxSize textSize = dc.GetTextExtent(m_name_text);
|
||||||
|
//int x = (dc.GetSize().GetWidth() - textSize.GetWidth()) / 2;
|
||||||
|
//int y = (dc.GetSize().GetHeight() - textSize.GetHeight()) / 2;
|
||||||
|
|
||||||
|
//dc.DrawText(m_name_text, x, y);
|
||||||
|
} else {
|
||||||
|
dc.DrawBitmap(m_bitmap, 10, (GetSize().GetHeight() - m_bitmap.GetHeight()) / 2, true);
|
||||||
|
|
||||||
|
dc.SetFont(wxFont(15, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
||||||
|
dc.SetTextForeground(wxColour(230, 230, 230));
|
||||||
|
dc.DrawText(m_name_text, 10 + m_bitmap.GetWidth() + 10, 10);
|
||||||
|
dc.SetFont(wxFont(10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
||||||
|
dc.SetTextForeground(wxColour(174, 174, 174));
|
||||||
|
|
||||||
|
dc.DrawText("IP:" + m_ip_text, 10 + m_bitmap.GetWidth() + 10, 40);
|
||||||
|
|
||||||
|
wxBitmap m_bitmap_state = get_bmp_bundle("printer_state", 20)->GetBitmapFor(this);
|
||||||
|
dc.DrawBitmap(m_bitmap_state, 10 + m_bitmap.GetWidth() + 10, 55, true);
|
||||||
|
|
||||||
|
dc.SetFont(wxFont(10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
||||||
|
dc.SetTextForeground(wxColour(174, 174, 174));
|
||||||
|
|
||||||
|
dc.DrawText(m_state_text, 10 + m_bitmap.GetWidth() + m_bitmap_state.GetWidth() + 15, 60);
|
||||||
|
if (m_state_text == "printing") {
|
||||||
|
dc.SetFont(wxFont(10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
|
||||||
|
dc.SetTextForeground(wxColour(33, 148, 239));
|
||||||
|
dc.DrawText(m_progress_text, 10 + m_bitmap.GetWidth() + m_bitmap_state.GetWidth() + 77, 62);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MachineListButton::OnMouseEnter(wxMouseEvent &event)
|
||||||
|
{
|
||||||
|
SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MachineListButton::OnMouseLeave(wxMouseEvent &event)
|
||||||
|
{
|
||||||
|
if (m_isSelected)
|
||||||
|
SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
else
|
||||||
|
SetBackgroundColour(wxColour(67, 67, 71));
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MachineListButton::OnMouseLeftDown(wxMouseEvent &event)
|
||||||
|
{
|
||||||
|
SetBackgroundColour(wxColour(120, 120, 125));
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MachineListButton::OnMouseLeftUp(wxMouseEvent &event)
|
||||||
|
{
|
||||||
|
SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
if (m_handlerl) {
|
||||||
|
m_handlerl(event);
|
||||||
|
}
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//B45
|
||||||
PrinterWebView::PrinterWebView(wxWindow *parent)
|
PrinterWebView::PrinterWebView(wxWindow *parent)
|
||||||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
|
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
|
||||||
{
|
{
|
||||||
|
|
||||||
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
|
#if defined(__WIN32__) || defined(__WXMAC__)
|
||||||
// Create the webview
|
int leftsizerWidth = 300;
|
||||||
|
#else
|
||||||
|
int leftsizerWidth = 210;
|
||||||
|
#endif
|
||||||
|
topsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
leftScrolledWindow = new wxScrolledWindow(this, wxID_ANY);
|
||||||
|
leftScrolledWindow->SetBackgroundColour(wxColour(45, 45, 48));
|
||||||
|
leftsizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
wxFont font(wxFontInfo().Bold());
|
||||||
|
|
||||||
|
wxBoxSizer *titlesizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
text_static = new wxStaticText(leftScrolledWindow, wxID_ANY, "MACHINE LIST", wxDefaultPosition, wxDefaultSize);
|
||||||
|
text_static->SetForegroundColour(wxColour(255, 255, 255));
|
||||||
|
text_static->SetFont(wxFont(wxFontInfo(18).Bold()));
|
||||||
|
#if defined __linux__
|
||||||
|
text_static->SetMinSize(wxSize(200, 40));
|
||||||
|
text_static->SetFont(wxFont(wxFontInfo(12).Bold()));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
titlesizer->Add(text_static, wxSizerFlags().Align(wxALIGN_LEFT).Border(wxALL, 5));
|
||||||
|
titlesizer->AddStretchSpacer();
|
||||||
|
wxBoxSizer *buttonsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
|
//wxBU_EXACTFIT wxBORDER_NONE
|
||||||
|
#if defined(__WIN32__) || defined(__WXMAC__)
|
||||||
|
wxButton *add_button = new wxButton(leftScrolledWindow, wxID_ANY, "", wxDefaultPosition, wxSize(20, 20), wxBORDER_NONE);
|
||||||
|
add_button->SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
//add_button->SetForegroundColour(leftScrolledWindow->GetBackgroundColour());
|
||||||
|
|
||||||
|
add_button->SetMinSize(wxSize(40, -1));
|
||||||
|
add_button->SetBitmap(*get_bmp_bundle("add_machine_list", 20));
|
||||||
|
buttonsizer->Add(add_button, wxSizerFlags().Align(wxALIGN_LEFT).CenterVertical().Border(wxALL, 2));
|
||||||
|
add_button->Bind(wxEVT_BUTTON, &PrinterWebView::OnAddButtonClick, this);
|
||||||
|
|
||||||
|
|
||||||
|
wxButton *delete_button = new wxButton(leftScrolledWindow, wxID_ANY, "", wxDefaultPosition, wxSize(20, 20), wxBORDER_NONE);
|
||||||
|
delete_button->SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
//delete_button->SetForegroundColour(leftScrolledWindow->GetBackgroundColour());
|
||||||
|
|
||||||
|
delete_button->SetMinSize(wxSize(40, -1));
|
||||||
|
delete_button->SetBitmap(*get_bmp_bundle("delete_machine_list", 20));
|
||||||
|
buttonsizer->Add(delete_button, wxSizerFlags().Align(wxALIGN_LEFT).CenterVertical().Border(wxALL, 2));
|
||||||
|
delete_button->Bind(wxEVT_BUTTON, &PrinterWebView::OnDeleteButtonClick, this);
|
||||||
|
|
||||||
|
wxButton *edit_button = new wxButton(leftScrolledWindow, wxID_ANY, "", wxDefaultPosition, wxSize(20, 20), wxBORDER_NONE);
|
||||||
|
edit_button->SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
//edit_button->SetForegroundColour(leftScrolledWindow->GetBackgroundColour());
|
||||||
|
|
||||||
|
edit_button->SetMinSize(wxSize(40, -1));
|
||||||
|
edit_button->SetBitmap(*get_bmp_bundle("edit_machine_list", 20));
|
||||||
|
buttonsizer->Add(edit_button, wxSizerFlags().Align(wxALIGN_LEFT).CenterVertical().Border(wxALL, 2));
|
||||||
|
edit_button->Bind(wxEVT_BUTTON, &PrinterWebView::OnEditButtonClick, this);
|
||||||
|
|
||||||
|
|
||||||
|
wxButton *refresh_button = new wxButton(leftScrolledWindow, wxID_ANY, "", wxDefaultPosition, wxSize(20, 20), wxBORDER_NONE);
|
||||||
|
refresh_button->SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
//refresh_button->SetForegroundColour(leftScrolledWindow->GetBackgroundColour());
|
||||||
|
|
||||||
|
refresh_button->SetMinSize(wxSize(40, -1));
|
||||||
|
refresh_button->SetBitmap(*get_bmp_bundle("refresh-line", 20));
|
||||||
|
buttonsizer->Add(refresh_button, wxSizerFlags().Align(wxALIGN_LEFT).CenterVertical().Border(wxALL, 2));
|
||||||
|
refresh_button->Bind(wxEVT_BUTTON, &PrinterWebView::OnRightButtonClick, this);
|
||||||
|
|
||||||
|
arrow_button = new wxButton(leftScrolledWindow, wxID_ANY, "", wxDefaultPosition, wxSize(20, 20), wxBORDER_NONE);
|
||||||
|
arrow_button->SetFont(font);
|
||||||
|
arrow_button->SetBackgroundColour(leftScrolledWindow->GetBackgroundColour());
|
||||||
|
arrow_button->SetForegroundColour(leftScrolledWindow->GetBackgroundColour());
|
||||||
|
arrow_button->SetMinSize(wxSize(40, -1));
|
||||||
|
arrow_button->SetBitmap(*get_bmp_bundle("arrow-left-s-line", 20));
|
||||||
|
titlesizer->Add(arrow_button, wxSizerFlags().Align(wxALIGN_LEFT).CenterVertical().Border(wxALL, 2));
|
||||||
|
arrow_button->Bind(wxEVT_BUTTON, &PrinterWebView::OnLeftButtonClick, this);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
titlesizer->Layout();
|
||||||
|
buttonsizer->Layout();
|
||||||
|
|
||||||
|
leftsizer->Add(titlesizer, wxSizerFlags().Expand().Align(wxALIGN_TOP).Border(wxALL, 0));
|
||||||
|
leftsizer->Add(buttonsizer, wxSizerFlags().Expand().Align(wxALIGN_TOP).Border(wxALL, 0));
|
||||||
|
|
||||||
|
leftsizer->Layout();
|
||||||
|
leftScrolledWindow->SetSizer(leftsizer);
|
||||||
|
leftScrolledWindow->SetScrollRate(10, 10);
|
||||||
|
leftScrolledWindow->SetMinSize(wxSize(leftsizerWidth, -1));
|
||||||
|
leftScrolledWindow->FitInside();
|
||||||
|
|
||||||
m_browser = WebView::CreateWebView(this, "");
|
m_browser = WebView::CreateWebView(this, "");
|
||||||
if (m_browser == nullptr) {
|
if (m_browser == nullptr) {
|
||||||
wxLogError("Could not init m_browser");
|
wxLogError("Could not init m_browser");
|
||||||
@@ -31,33 +199,395 @@ PrinterWebView::PrinterWebView(wxWindow *parent)
|
|||||||
|
|
||||||
SetSizer(topsizer);
|
SetSizer(topsizer);
|
||||||
|
|
||||||
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
|
topsizer->Add(leftScrolledWindow, wxSizerFlags(0).Expand());
|
||||||
|
topsizer->Add(m_browser, wxSizerFlags(1).Expand().Border(wxALL, 0));
|
||||||
|
|
||||||
// Log backend information
|
// Zoom
|
||||||
//if (wxGetApp().get_mode() == comDevelop) {
|
|
||||||
// wxLogMessage(wxWebView::GetBackendVersionInfo().ToString());
|
|
||||||
// wxLogMessage("Backend: %s Version: %s", m_browser->GetClassInfo()->GetClassName(),
|
|
||||||
// wxWebView::GetBackendVersionInfo().ToString());
|
|
||||||
// wxLogMessage("User Agent: %s", m_browser->GetUserAgent());
|
|
||||||
//}
|
|
||||||
|
|
||||||
//Zoom
|
|
||||||
m_zoomFactor = 100;
|
m_zoomFactor = 100;
|
||||||
|
|
||||||
|
leftScrolledWindow->Bind(wxEVT_SCROLLWIN_TOP, &PrinterWebView::OnScroll, this);
|
||||||
|
leftScrolledWindow->Bind(wxEVT_SCROLLWIN_BOTTOM, &PrinterWebView::OnScroll, this);
|
||||||
|
leftScrolledWindow->Bind(wxEVT_SCROLLWIN_LINEUP, &PrinterWebView::OnScroll, this);
|
||||||
|
leftScrolledWindow->Bind(wxEVT_SCROLLWIN_LINEDOWN, &PrinterWebView::OnScroll, this);
|
||||||
|
leftScrolledWindow->Bind(wxEVT_SCROLLWIN_PAGEUP, &PrinterWebView::OnScroll, this);
|
||||||
|
leftScrolledWindow->Bind(wxEVT_SCROLLWIN_PAGEDOWN, &PrinterWebView::OnScroll, this);
|
||||||
|
|
||||||
|
//B45
|
||||||
|
Bind(wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED, &PrinterWebView::OnScriptMessage, this);
|
||||||
|
|
||||||
|
|
||||||
//Connect the idle events
|
//Connect the idle events
|
||||||
Bind(wxEVT_CLOSE_WINDOW, &PrinterWebView::OnClose, this);
|
Bind(wxEVT_CLOSE_WINDOW, &PrinterWebView::OnClose, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PrinterWebView::~PrinterWebView()
|
|
||||||
{
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Start";
|
|
||||||
SetEvtHandlerEnabled(false);
|
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " End";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void PrinterWebView::AddButton(const wxString & device_name,
|
||||||
|
const wxString & ip,
|
||||||
|
const wxString & machine_type,
|
||||||
|
const wxString & fullname,
|
||||||
|
const std::function<void(wxMouseEvent &)> &handler,
|
||||||
|
bool isSelected,
|
||||||
|
DynamicPrintConfig * cfg_t)
|
||||||
|
{
|
||||||
|
wxString Machine_Name = Machine_Name.Format("%s%s", machine_type, "_thumbnail");
|
||||||
|
|
||||||
|
MachineListButton *customButton = new MachineListButton(leftScrolledWindow, wxID_ANY, device_name,
|
||||||
|
fullname,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxDefaultSize, wxBU_LEFT,
|
||||||
|
wxDefaultValidator, wxButtonNameStr, isSelected);
|
||||||
|
//customButton->SetMinSize(wxSize(80, -1));
|
||||||
|
#if defined(__WIN32__) || defined(__WXMAC__)
|
||||||
|
customButton->SetBitmap(*get_bmp_bundle(std::string(Machine_Name.mb_str()), 80));
|
||||||
|
#endif
|
||||||
|
customButton->SetBitMap(get_bmp_bundle(std::string(Machine_Name.mb_str()), 80)->GetBitmapFor(this));
|
||||||
|
customButton->SetForegroundColour(wxColour(255, 255, 255));
|
||||||
|
customButton->SetNameText(device_name);
|
||||||
|
customButton->SetIPText(ip);
|
||||||
|
customButton->SetStateText("standby");
|
||||||
|
customButton->SetProgressText("(0%)");
|
||||||
|
//customButton->SetMinSize(wxSize(200, -1));
|
||||||
|
customButton->SetClickHandler(handler);
|
||||||
|
#if defined(__WIN32__) || defined(__WXMAC__)
|
||||||
|
customButton->SetStatusThread(std::move(customButton->CreatThread(device_name,ip, cfg_t)));
|
||||||
|
#else
|
||||||
|
customButton->SetSize(wxSize(200, -1));
|
||||||
|
#endif
|
||||||
|
customButton->SetSimpleMode(false);
|
||||||
|
|
||||||
|
leftsizer->Add(customButton, wxSizerFlags().Border(wxALL, 1).Expand());
|
||||||
|
leftsizer->Layout();
|
||||||
|
m_buttons.push_back(customButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
//B45
|
||||||
|
void PrinterWebView::PauseButton()
|
||||||
|
{
|
||||||
|
//BOOST_LOG_TRIVIAL(error) << " Pause";
|
||||||
|
|
||||||
|
if (m_buttons.empty()) {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << " empty";
|
||||||
|
} else {
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
button->PauseStatusThread();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//B45
|
||||||
|
void PrinterWebView::ResumeButton()
|
||||||
|
{
|
||||||
|
//BOOST_LOG_TRIVIAL(error) << " Resume";
|
||||||
|
|
||||||
|
if (m_buttons.empty()) {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << " empty";
|
||||||
|
} else {
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
button->ResumeStatusThread();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// B45
|
||||||
|
void PrinterWebView::UnSelectedButton()
|
||||||
|
{
|
||||||
|
// BOOST_LOG_TRIVIAL(error) << " Resume";
|
||||||
|
|
||||||
|
if (m_buttons.empty()) {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << " empty";
|
||||||
|
} else {
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
button->SetSelect(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//B45
|
||||||
|
void PrinterWebView::DeleteButton()
|
||||||
|
{
|
||||||
|
if (m_buttons.empty()) {
|
||||||
|
BOOST_LOG_TRIVIAL(info) <<" empty";
|
||||||
|
} else {
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
|
||||||
|
button->StopStatusThread();
|
||||||
|
|
||||||
|
delete button;
|
||||||
|
}
|
||||||
|
m_buttons.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// B45
|
||||||
|
void PrinterWebView::SetButtons(std::vector<MachineListButton *> buttons) { m_buttons = buttons; }
|
||||||
|
|
||||||
|
PrinterWebView::~PrinterWebView()
|
||||||
|
{
|
||||||
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Start";
|
||||||
|
SetEvtHandlerEnabled(false);
|
||||||
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " End";
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrinterWebView::OnLeftButtonClick(wxCommandEvent &event)
|
||||||
|
{
|
||||||
|
m_isSimpleMode = !m_isSimpleMode;
|
||||||
|
|
||||||
|
if (!m_isSimpleMode) {
|
||||||
|
leftsizer->SetMinSize(wxSize(300, -1));
|
||||||
|
leftScrolledWindow->SetMinSize(wxSize(300, -1));
|
||||||
|
arrow_button->SetBitmap(*get_bmp_bundle("arrow-left-s-line", 20));
|
||||||
|
text_static->SetFont(wxFont(wxFontInfo(18).Bold()));
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
button->SetBitmap(*get_bmp_bundle(std::string("X-MAX 3_thumbnail"), 80));
|
||||||
|
button->SetSimpleMode(m_isSimpleMode);
|
||||||
|
button->SetSize(wxSize(300, -1));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
arrow_button->SetBitmap(*get_bmp_bundle("arrow-right-s-line", 20));
|
||||||
|
leftsizer->SetMinSize(wxSize(210, -1));
|
||||||
|
leftScrolledWindow->SetMinSize(wxSize(210, -1));
|
||||||
|
text_static->SetFont(wxFont(wxFontInfo(12).Bold()));
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
button->SetBitmap(*get_bmp_bundle(std::string("X-MAX 3_thumbnail"), 30));
|
||||||
|
button->SetSimpleMode(m_isSimpleMode);
|
||||||
|
button->SetSize(wxSize(200, -1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
leftsizer->Layout();
|
||||||
|
|
||||||
|
|
||||||
|
leftScrolledWindow->Layout();
|
||||||
|
|
||||||
|
topsizer->Layout();
|
||||||
|
//UpdateLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrinterWebView::OnRightButtonClick(wxCommandEvent &event)
|
||||||
|
{
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
button->ResumeStatusThread();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrinterWebView::OnAddButtonClick(wxCommandEvent &event)
|
||||||
|
{
|
||||||
|
PhysicalPrinterDialog dlg(this->GetParent(), wxEmptyString);
|
||||||
|
if (dlg.ShowModal() == wxID_OK) {
|
||||||
|
if (m_handlerl) {
|
||||||
|
m_handlerl(event);
|
||||||
|
}
|
||||||
|
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||||
|
auto printer = preset_bundle.physical_printers.get_selected_printer();
|
||||||
|
std::string printer_name = printer.name;
|
||||||
|
wxString host = printer.config.opt_string("print_host");
|
||||||
|
|
||||||
|
wxString formattedHost = wxString::Format("http://%s", host);
|
||||||
|
if (!host.Lower().starts_with("http"))
|
||||||
|
wxString formattedHost = wxString::Format("http://%s", host);
|
||||||
|
if (!formattedHost.Lower().ends_with("10088"))
|
||||||
|
formattedHost = wxString::Format("%s:10088", formattedHost);
|
||||||
|
|
||||||
|
std::string fullname = preset_bundle.physical_printers.get_selected_full_printer_name();
|
||||||
|
std::string preset_name = printer.get_preset_name(fullname);
|
||||||
|
Preset * preset = wxGetApp().preset_bundle->printers.find_preset(preset_name);
|
||||||
|
std::string model_id = "X-MAX 3";
|
||||||
|
if (preset != nullptr) {
|
||||||
|
model_id = preset->config.opt_string("printer_model");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
boost::regex ipRegex(R"(\b(?:\d{1,3}\.){3}\d{1,3}\b)");
|
||||||
|
bool isValidIPAddress = boost::regex_match(host.ToStdString(), ipRegex);
|
||||||
|
DynamicPrintConfig *cfg_t = &(printer.config);
|
||||||
|
|
||||||
|
UnSelectedButton();
|
||||||
|
if (isValidIPAddress)
|
||||||
|
AddButton(
|
||||||
|
printer_name, host, model_id, fullname,
|
||||||
|
[formattedHost, this](wxMouseEvent &event) {
|
||||||
|
wxString host = formattedHost;
|
||||||
|
load_url(host);
|
||||||
|
},
|
||||||
|
true, cfg_t);
|
||||||
|
load_url(formattedHost);
|
||||||
|
UpdateLayout();
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrinterWebView::OnDeleteButtonClick(wxCommandEvent &event) {
|
||||||
|
|
||||||
|
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
if ((button->GetSelected())) {
|
||||||
|
|
||||||
|
wxString msg;
|
||||||
|
//if (!note_string.IsEmpty())
|
||||||
|
// msg += note_string + "\n";
|
||||||
|
|
||||||
|
#if defined(__WIN32__) || defined(__WXMAC__)
|
||||||
|
msg += format_wxstr(_L("Are you sure you want to delete \"%1%\" printer?"), (button->getLabel()));
|
||||||
|
#else
|
||||||
|
msg += _L("Are you sure you want to delete ") + (button->getLabel()) + _L("printer?");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (MessageDialog(this, msg, _L("Delete Physical Printer"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal() != wxID_YES)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
button->StopStatusThread();
|
||||||
|
preset_bundle.physical_printers.select_printer((button->getLabel()).ToStdString());
|
||||||
|
|
||||||
|
|
||||||
|
preset_bundle.physical_printers.delete_selected_printer();
|
||||||
|
|
||||||
|
auto it = std::find(m_buttons.begin(), m_buttons.end(), button);
|
||||||
|
delete button;
|
||||||
|
|
||||||
|
if (it != m_buttons.end()) {
|
||||||
|
m_buttons.erase(it);
|
||||||
|
}
|
||||||
|
|
||||||
|
leftsizer->Detach(button);
|
||||||
|
if (!m_buttons.empty())
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
button->SetSelect(true);
|
||||||
|
wxString formattedHost = wxString::Format("http://%s:10088", button->getIPLabel());
|
||||||
|
|
||||||
|
load_url(formattedHost);
|
||||||
|
preset_bundle.physical_printers.select_printer((button->getLabel()).ToStdString());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
wxString host = wxString::Format("file://%s/web/qidi/missing_connection.html", from_u8(resources_dir()));
|
||||||
|
load_url(host);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateLayout();
|
||||||
|
Refresh();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (m_handlerl) {
|
||||||
|
m_handlerl(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrinterWebView::OnEditButtonClick(wxCommandEvent &event) {
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
if ((button->GetSelected())) {
|
||||||
|
PhysicalPrinterDialog dlg(this->GetParent(), (wxString::FromUTF8((button->getLabel()).ToStdString())));
|
||||||
|
//BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << (button->getLabel());
|
||||||
|
|
||||||
|
//BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << wxString::FromUTF8((button->getLabel()).ToStdString());
|
||||||
|
|
||||||
|
if (dlg.ShowModal() == wxID_OK) {
|
||||||
|
if (m_handlerl) {
|
||||||
|
m_handlerl(event);
|
||||||
|
}
|
||||||
|
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||||
|
auto printer = preset_bundle.physical_printers.get_selected_printer();
|
||||||
|
std::string printer_name = printer.name;
|
||||||
|
wxString host = printer.config.opt_string("print_host");
|
||||||
|
std::string fullname = preset_bundle.physical_printers.get_selected_full_printer_name();
|
||||||
|
std::string preset_name = printer.get_preset_name(fullname);
|
||||||
|
Preset * preset = wxGetApp().preset_bundle->printers.find_preset(preset_name);
|
||||||
|
std::string model_id = "X-MAX 3";
|
||||||
|
if (preset != nullptr) {
|
||||||
|
model_id = preset->config.opt_string("printer_model");
|
||||||
|
}
|
||||||
|
DynamicPrintConfig *cfg_t = &(printer.config);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
button->SetNameText((wxString::FromUTF8(printer_name)));
|
||||||
|
button->SetIPText(host);
|
||||||
|
button->SetLabel(fullname);
|
||||||
|
wxString Machine_Name = Machine_Name.Format("%s%s", model_id, "_thumbnail");
|
||||||
|
|
||||||
|
button->SetBitMap(get_bmp_bundle(std::string(Machine_Name.mb_str()), 80)->GetBitmapFor(this));
|
||||||
|
UpdateLayout();
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//void PrinterWebView::SendRecentList(int images)
|
||||||
|
//{
|
||||||
|
// boost::property_tree::wptree req;
|
||||||
|
// boost::property_tree::wptree data;
|
||||||
|
// //wxGetApp().mainframe->get_recent_projects(data, images);
|
||||||
|
// req.put(L"sequence_id", "");
|
||||||
|
// req.put(L"command", L"studio_set_mallurl");
|
||||||
|
// //req.put_child(L"response", data);
|
||||||
|
// std::wostringstream oss;
|
||||||
|
// pt::write_json(oss, req, false);
|
||||||
|
// RunScript(wxString::Format("window.postMessage(%s)", oss.str()));
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void PrinterWebView::OnScriptMessage(wxWebViewEvent &evt)
|
||||||
|
{
|
||||||
|
|
||||||
|
wxLogMessage("Script message received; value = %s, handler = %s", evt.GetString(), evt.GetMessageHandler());
|
||||||
|
//std::string response = wxGetApp().handle_web_request(evt.GetString().ToUTF8().data());
|
||||||
|
//if (response.empty())
|
||||||
|
// return;
|
||||||
|
//SendRecentList(1);
|
||||||
|
///* remove \n in response string */
|
||||||
|
//response.erase(std::remove(response.begin(), response.end(), '\n'), response.end());
|
||||||
|
//if (!response.empty()) {
|
||||||
|
// m_response_js = wxString::Format("window.postMessage('%s')", response);
|
||||||
|
// wxCommandEvent *event = new wxCommandEvent(EVT_RESPONSE_MESSAGE, this->GetId());
|
||||||
|
// wxQueueEvent(this, event);
|
||||||
|
//} else {
|
||||||
|
// m_response_js.clear();
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PrinterWebView::UpdateLayout()
|
||||||
|
{
|
||||||
|
//leftScrolledWindow->SetVirtualSize(leftsizer->GetMinSize());
|
||||||
|
leftsizer->Layout();
|
||||||
|
|
||||||
|
leftScrolledWindow->Layout();
|
||||||
|
|
||||||
|
leftScrolledWindow->FitInside();
|
||||||
|
topsizer->Layout();
|
||||||
|
if (!m_buttons.empty()) {
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
button->Layout();
|
||||||
|
button->Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PrinterWebView::OnScroll(wxScrollWinEvent &event)
|
||||||
|
{
|
||||||
|
UpdateLayout();
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
//B45
|
||||||
void PrinterWebView::load_url(wxString& url)
|
void PrinterWebView::load_url(wxString& url)
|
||||||
{
|
{
|
||||||
// this->Show();
|
// this->Show();
|
||||||
@@ -65,6 +595,25 @@ void PrinterWebView::load_url(wxString& url)
|
|||||||
if (m_browser == nullptr)
|
if (m_browser == nullptr)
|
||||||
return;
|
return;
|
||||||
m_browser->LoadURL(url);
|
m_browser->LoadURL(url);
|
||||||
|
|
||||||
|
url.Remove(0, 7);
|
||||||
|
url.Remove(url.length() - 6);
|
||||||
|
for (MachineListButton *button : m_buttons) {
|
||||||
|
|
||||||
|
if (url == (button->getIPLabel()))
|
||||||
|
button->SetSelect(true);
|
||||||
|
else
|
||||||
|
button->SetSelect(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//const char *data = "Hello from C++!";
|
||||||
|
//std::string switch_dark_mode_script = "SwitchDarkMode(";
|
||||||
|
//switch_dark_mode_script += wxGetApp().app_config->get("dark_color_mode") == "1" ? "true" : "false";
|
||||||
|
//switch_dark_mode_script += ");";
|
||||||
|
//RunScript("var valueFromCpp = '" + std::string(data) + "';");
|
||||||
|
//m_browser->RunScript(switch_dark_mode_script);
|
||||||
|
|
||||||
//m_browser->SetFocus();
|
//m_browser->SetFocus();
|
||||||
UpdateState();
|
UpdateState();
|
||||||
}
|
}
|
||||||
@@ -82,6 +631,14 @@ void PrinterWebView::OnClose(wxCloseEvent& evt)
|
|||||||
this->Hide();
|
this->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PrinterWebView::RunScript(const wxString &javascript)
|
||||||
|
{
|
||||||
|
// Remember the script we run in any case, so the next time the user opens
|
||||||
|
// the "Run Script" dialog box, it is shown there for convenient updating.
|
||||||
|
|
||||||
|
|
||||||
|
WebView::RunScript(m_browser, javascript);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // GUI
|
} // GUI
|
||||||
|
|||||||
@@ -26,14 +26,188 @@
|
|||||||
#include <wx/timer.h>
|
#include <wx/timer.h>
|
||||||
|
|
||||||
//B35
|
//B35
|
||||||
|
//B45
|
||||||
#if defined __linux__
|
#if defined __linux__
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
#include <wx/wx.h>
|
||||||
|
#include <thread>
|
||||||
|
#include <boost/format.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//B45
|
||||||
|
#include "PrintHostDialogs.hpp"
|
||||||
|
#include <wx/tokenzr.h>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
|
class MachineListButton : public wxButton
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MachineListButton(wxWindow * parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString & label,
|
||||||
|
const wxString &fullname,
|
||||||
|
const wxPoint & pos = wxDefaultPosition,
|
||||||
|
const wxSize & size = wxDefaultSize,
|
||||||
|
long style = wxBORDER_DOUBLE,
|
||||||
|
const wxValidator &validator = wxDefaultValidator,
|
||||||
|
const wxString & name = wxButtonNameStr,
|
||||||
|
bool isSelected = false)
|
||||||
|
: wxButton(parent, id, label, pos, size, style, validator, name)
|
||||||
|
{
|
||||||
|
full_label = fullname;
|
||||||
|
m_isSelected = isSelected;
|
||||||
|
if (isSelected)
|
||||||
|
SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
else
|
||||||
|
SetBackgroundColour(wxColour(67, 67, 71));
|
||||||
|
//Bind(wxEVT_BUTTON, &MachineListButton::OnMouseLeftUp, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetLabel(const wxString &fullname) { full_label = fullname; }
|
||||||
|
|
||||||
|
|
||||||
|
wxString getLabel() { return full_label; }
|
||||||
|
wxString getIPLabel() { return m_ip_text; }
|
||||||
|
|
||||||
|
|
||||||
|
void SetBitMap(const wxBitmap &bitmap)
|
||||||
|
{
|
||||||
|
m_bitmap = bitmap;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SetNameText(const wxString &text)
|
||||||
|
{
|
||||||
|
m_name_text = text;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString GetNameText()
|
||||||
|
{
|
||||||
|
return m_name_text;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SetIPText(const wxString &text)
|
||||||
|
{
|
||||||
|
m_ip_text = text;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
void SetStateText(const wxString &text)
|
||||||
|
{
|
||||||
|
m_state_text = text;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetProgressText(const wxString &text)
|
||||||
|
{
|
||||||
|
m_progress_text = text;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
void SetSelect(bool isselectd)
|
||||||
|
{
|
||||||
|
m_isSelected = isselectd;
|
||||||
|
if (m_isSelected)
|
||||||
|
SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
else
|
||||||
|
SetBackgroundColour(wxColour(67, 67, 71));
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
bool GetSelected() { return m_isSelected;}
|
||||||
|
void SetSimpleMode(bool issimplemode)
|
||||||
|
{
|
||||||
|
m_isSimpleMode = issimplemode;
|
||||||
|
//if (m_isSelected)
|
||||||
|
// SetBackgroundColour(wxColour(100, 100, 105));
|
||||||
|
//else
|
||||||
|
// SetBackgroundColour(wxColour(67, 67, 71));
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetClickHandler(const std::function<void(wxMouseEvent &)> &handler) { m_handlerl = handler; }
|
||||||
|
void PauseStatusThread() { m_pauseThread = true; }
|
||||||
|
void ResumeStatusThread() { m_pauseThread = false; }
|
||||||
|
void StopStatusThread()
|
||||||
|
{
|
||||||
|
m_stopThread = true;
|
||||||
|
if (m_statusThread.joinable()) {
|
||||||
|
m_statusThread.join();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void OnPaint(wxPaintEvent &event);
|
||||||
|
void OnMouseEnter(wxMouseEvent &event);
|
||||||
|
void OnMouseLeave(wxMouseEvent &event);
|
||||||
|
void OnMouseLeftDown(wxMouseEvent &event);
|
||||||
|
void OnMouseLeftUp(wxMouseEvent &event);
|
||||||
|
void OnClickHandler(wxCommandEvent &event);
|
||||||
|
void SetStatusThread(std::thread thread) { m_statusThread = std::move(thread); }
|
||||||
|
std::thread CreatThread(const wxString &buttonText, const wxString &ip, DynamicPrintConfig *cfg_t)
|
||||||
|
{
|
||||||
|
|
||||||
|
std::thread thread([this, buttonText,ip, cfg_t]() {
|
||||||
|
std::unique_ptr<PrintHost> printhost(PrintHost::get_print_host(cfg_t));
|
||||||
|
if (!printhost) {
|
||||||
|
BOOST_LOG_TRIVIAL(error) << ("Could not get a valid Printer Host reference");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
wxString msg;
|
||||||
|
std::string state = "standby";
|
||||||
|
float progress = 0;
|
||||||
|
while (true) {
|
||||||
|
if (!m_pauseThread) {
|
||||||
|
state = printhost->get_status(msg);
|
||||||
|
if (state == "offline") {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << boost::format("%1%Got state: %2%") % buttonText % state;
|
||||||
|
SetStateText(state);
|
||||||
|
m_pauseThread = true;
|
||||||
|
}
|
||||||
|
BOOST_LOG_TRIVIAL(info) << boost::format("%1%Got state: %2%") % buttonText % state;
|
||||||
|
SetStateText(state);
|
||||||
|
|
||||||
|
if (state == "printing") {
|
||||||
|
progress = (printhost->get_progress(msg)) * 100;
|
||||||
|
int progressInt = static_cast<int>(progress);
|
||||||
|
SetProgressText(wxString::Format(wxT("(%d%%)"), progressInt));
|
||||||
|
|
||||||
|
BOOST_LOG_TRIVIAL(info) << boost::format("%1%Got progress: %2%") % buttonText % progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(3));
|
||||||
|
if (m_stopThread)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return thread;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::atomic<bool> m_stopThread{false};
|
||||||
|
std::atomic<bool> m_pauseThread{false};
|
||||||
|
|
||||||
|
bool m_isSimpleMode;
|
||||||
|
bool m_isSelected;
|
||||||
|
|
||||||
|
std::thread m_statusThread;
|
||||||
|
|
||||||
|
wxBitmap m_bitmap;
|
||||||
|
bool m_isHovered;
|
||||||
|
wxString full_label;
|
||||||
|
wxString m_name_text;
|
||||||
|
wxString m_ip_text;
|
||||||
|
wxString m_state_text;
|
||||||
|
wxString m_progress_text;
|
||||||
|
std::function<void(wxMouseEvent &)> m_handlerl;
|
||||||
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
//wxDECLARE_EVENT_TABLE();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PrinterWebView : public wxPanel {
|
class PrinterWebView : public wxPanel {
|
||||||
public:
|
public:
|
||||||
@@ -44,7 +218,60 @@ public:
|
|||||||
void UpdateState();
|
void UpdateState();
|
||||||
void OnClose(wxCloseEvent& evt);
|
void OnClose(wxCloseEvent& evt);
|
||||||
|
|
||||||
|
//B45
|
||||||
|
void OnLeftButtonClick(wxCommandEvent &event);
|
||||||
|
void OnRightButtonClick(wxCommandEvent &event);
|
||||||
|
void OnAddButtonClick(wxCommandEvent &event);
|
||||||
|
void OnDeleteButtonClick(wxCommandEvent &event);
|
||||||
|
void OnEditButtonClick(wxCommandEvent &event);
|
||||||
|
|
||||||
|
void RunScript(const wxString &javascript);
|
||||||
|
//void OnScriptMessageReceived(wxWebViewEvent &event);
|
||||||
|
void OnScriptMessage(wxWebViewEvent &evt);
|
||||||
|
void UpdateLayout();
|
||||||
|
void OnScroll(wxScrollWinEvent &event);
|
||||||
|
|
||||||
|
void SetUpdateHandler(const std::function<void(wxCommandEvent &)> &handler) { m_handlerl = handler; }
|
||||||
|
void SetDeleteHandler(const std::function<void(wxCommandEvent &)> &handler) { m_delete_handlerl = handler; }
|
||||||
|
|
||||||
|
|
||||||
|
//B45
|
||||||
|
//void SendRecentList(int images);
|
||||||
|
void SetButtons(std::vector<MachineListButton *> buttons);
|
||||||
|
void AddButton(const wxString & device_name,
|
||||||
|
const wxString & ip,
|
||||||
|
const wxString & machine_type,
|
||||||
|
const wxString & fullname,
|
||||||
|
const std::function<void(wxMouseEvent &)> &handler,
|
||||||
|
bool isSelected,
|
||||||
|
DynamicPrintConfig * cfg_t);
|
||||||
|
void DeleteButton();
|
||||||
|
void PauseButton();
|
||||||
|
void ResumeButton();
|
||||||
|
void UnSelectedButton();
|
||||||
|
|
||||||
|
std::vector<MachineListButton *> GetButton() { return m_buttons; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
//B45
|
||||||
|
wxBoxSizer *leftallsizer;
|
||||||
|
|
||||||
|
wxBoxSizer *leftsizer;
|
||||||
|
wxBoxSizer *topsizer;
|
||||||
|
bool m_isSimpleMode = false;
|
||||||
|
wxButton *arrow_button;
|
||||||
|
wxStaticText * text_static;
|
||||||
|
|
||||||
|
|
||||||
|
std::function<void(wxCommandEvent &)> m_handlerl;
|
||||||
|
std::function<void(wxCommandEvent &)> m_delete_handlerl;
|
||||||
|
|
||||||
|
|
||||||
|
wxScrolledWindow * leftScrolledWindow;
|
||||||
|
wxPanel * leftPanel;
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<MachineListButton *> m_buttons;
|
||||||
|
|
||||||
wxWebView* m_browser;
|
wxWebView* m_browser;
|
||||||
long m_zoomFactor;
|
long m_zoomFactor;
|
||||||
@@ -52,6 +279,8 @@ private:
|
|||||||
// DECLARE_EVENT_TABLE()
|
// DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // GUI
|
} // GUI
|
||||||
} // Slic3r
|
} // Slic3r
|
||||||
|
|
||||||
|
|||||||
@@ -1487,6 +1487,8 @@ void TabPrint::build()
|
|||||||
optgroup->append_single_option_line("bridge_angle");
|
optgroup->append_single_option_line("bridge_angle");
|
||||||
optgroup->append_single_option_line("only_retract_when_crossing_perimeters");
|
optgroup->append_single_option_line("only_retract_when_crossing_perimeters");
|
||||||
optgroup->append_single_option_line("infill_first");
|
optgroup->append_single_option_line("infill_first");
|
||||||
|
//w11
|
||||||
|
optgroup->append_single_option_line("detect_narrow_internal_solid_infill");
|
||||||
|
|
||||||
page = add_options_page(L("Skirt and brim"), "skirt+brim");
|
page = add_options_page(L("Skirt and brim"), "skirt+brim");
|
||||||
category_path = "skirt-and-brim_133969#";
|
category_path = "skirt-and-brim_133969#";
|
||||||
@@ -1653,7 +1655,10 @@ void TabPrint::build()
|
|||||||
optgroup->append_single_option_line("slicing_mode");
|
optgroup->append_single_option_line("slicing_mode");
|
||||||
optgroup->append_single_option_line("resolution");
|
optgroup->append_single_option_line("resolution");
|
||||||
optgroup->append_single_option_line("gcode_resolution");
|
optgroup->append_single_option_line("gcode_resolution");
|
||||||
optgroup->append_single_option_line("xy_size_compensation");
|
//w12
|
||||||
|
//optgroup->append_single_option_line("xy_size_compensation");
|
||||||
|
optgroup->append_single_option_line("xy_hole_compensation");
|
||||||
|
optgroup->append_single_option_line("xy_contour_compensation");
|
||||||
optgroup->append_single_option_line("elefant_foot_compensation", "elephant-foot-compensation_114487");
|
optgroup->append_single_option_line("elefant_foot_compensation", "elephant-foot-compensation_114487");
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Arachne perimeter generator"));
|
optgroup = page->new_optgroup(L("Arachne perimeter generator"));
|
||||||
@@ -2283,6 +2288,12 @@ void TabFilament::toggle_options()
|
|||||||
|
|
||||||
bool chamber_fan = printer_config->opt_bool("chamber_fan");
|
bool chamber_fan = printer_config->opt_bool("chamber_fan");
|
||||||
toggle_option("enable_volume_fan", chamber_fan);
|
toggle_option("enable_volume_fan", chamber_fan);
|
||||||
|
|
||||||
|
int auxiliary_fan_speed = m_config->opt_int("enable_auxiliary_fan", 0);
|
||||||
|
if (auxiliary_fan_speed == 0)
|
||||||
|
toggle_option("disable_rapid_cooling_fan_first_layers", false);
|
||||||
|
else
|
||||||
|
toggle_option("disable_rapid_cooling_fan_first_layers", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include <wx/dcgraph.h>
|
#include <wx/dcgraph.h>
|
||||||
#include "MainFrame.hpp"
|
#include "MainFrame.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
@@ -31,9 +30,7 @@ FRF_Calibration_Dlg::FRF_Calibration_Dlg(wxWindow* parent, wxWindowID id, Plater
|
|||||||
// extru
|
// extru
|
||||||
auto filament_config = &wxGetApp().preset_bundle->filaments.get_edited_preset().config;
|
auto filament_config = &wxGetApp().preset_bundle->filaments.get_edited_preset().config;
|
||||||
auto read_extrusion_multiplier = filament_config->opt_float("extrusion_multiplier", 0);
|
auto read_extrusion_multiplier = filament_config->opt_float("extrusion_multiplier", 0);
|
||||||
std::stringstream ss;
|
m_tc_extrusion_multiplier = new wxTextCtrl(this, wxID_ANY, wxString::FromDouble(read_extrusion_multiplier), wxDefaultPosition, wxSize(100, -1), wxBORDER_SIMPLE);
|
||||||
ss << read_extrusion_multiplier;
|
|
||||||
m_tc_extrusion_multiplier = new wxTextCtrl(this, wxID_ANY, ss.str(), wxDefaultPosition, wxSize(100, -1), wxBORDER_SIMPLE);
|
|
||||||
m_tc_extrusion_multiplier->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
m_tc_extrusion_multiplier->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
||||||
settings_sizer->Add(m_tc_extrusion_multiplier, 0, wxRIGHT | wxALIGN_RIGHT, 0);
|
settings_sizer->Add(m_tc_extrusion_multiplier, 0, wxRIGHT | wxALIGN_RIGHT, 0);
|
||||||
|
|
||||||
@@ -104,7 +101,7 @@ PA_Calibration_Dlg::PA_Calibration_Dlg(wxWindow* parent, wxWindowID id, Plater*
|
|||||||
auto start_pa_text = new wxStaticText(this, wxID_ANY, _L("Start PA: "), wxDefaultPosition, wxSize(80, -1), wxALIGN_LEFT);
|
auto start_pa_text = new wxStaticText(this, wxID_ANY, _L("Start PA: "), wxDefaultPosition, wxSize(80, -1), wxALIGN_LEFT);
|
||||||
start_PA_sizer->Add(start_pa_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
start_PA_sizer->Add(start_pa_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
||||||
|
|
||||||
m_tcStartPA = new wxTextCtrl(this, wxID_ANY, "0", wxDefaultPosition, wxSize(100, -1), wxBORDER_SIMPLE);
|
m_tcStartPA = new wxTextCtrl(this, wxID_ANY, wxString::FromDouble(0.0), wxDefaultPosition, wxSize(100, -1), wxBORDER_SIMPLE);
|
||||||
m_tcStartPA->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
m_tcStartPA->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
||||||
start_PA_sizer->Add(m_tcStartPA, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
start_PA_sizer->Add(m_tcStartPA, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
||||||
settings_sizer->Add(start_PA_sizer);
|
settings_sizer->Add(start_PA_sizer);
|
||||||
@@ -114,7 +111,7 @@ PA_Calibration_Dlg::PA_Calibration_Dlg(wxWindow* parent, wxWindowID id, Plater*
|
|||||||
auto end_pa_text = new wxStaticText(this, wxID_ANY, _L("End PA: "), wxDefaultPosition, wxSize(80, -1), wxALIGN_LEFT);
|
auto end_pa_text = new wxStaticText(this, wxID_ANY, _L("End PA: "), wxDefaultPosition, wxSize(80, -1), wxALIGN_LEFT);
|
||||||
end_PA_sizer->Add(end_pa_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
end_PA_sizer->Add(end_pa_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
||||||
|
|
||||||
m_tcEndPA = new wxTextCtrl(this, wxID_ANY, "0.04", wxDefaultPosition, wxSize(100, -1), wxBORDER_SIMPLE);
|
m_tcEndPA = new wxTextCtrl(this, wxID_ANY, wxString::FromDouble(0.04), wxDefaultPosition, wxSize(100, -1), wxBORDER_SIMPLE);
|
||||||
m_tcStartPA->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
m_tcStartPA->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
||||||
end_PA_sizer->Add(m_tcEndPA, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
end_PA_sizer->Add(m_tcEndPA, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
||||||
settings_sizer->Add(end_PA_sizer);
|
settings_sizer->Add(end_PA_sizer);
|
||||||
@@ -124,7 +121,7 @@ PA_Calibration_Dlg::PA_Calibration_Dlg(wxWindow* parent, wxWindowID id, Plater*
|
|||||||
auto PA_step_text = new wxStaticText(this, wxID_ANY, _L("PA step: "), wxDefaultPosition, wxSize(80, -1), wxALIGN_LEFT);
|
auto PA_step_text = new wxStaticText(this, wxID_ANY, _L("PA step: "), wxDefaultPosition, wxSize(80, -1), wxALIGN_LEFT);
|
||||||
PA_step_sizer->Add(PA_step_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
PA_step_sizer->Add(PA_step_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
||||||
|
|
||||||
m_tcPAStep = new wxTextCtrl(this, wxID_ANY, "0.002", wxDefaultPosition, wxSize(100, -1), wxBORDER_SIMPLE);
|
m_tcPAStep = new wxTextCtrl(this, wxID_ANY, wxString::FromDouble(0.002), wxDefaultPosition, wxSize(100, -1), wxBORDER_SIMPLE);
|
||||||
m_tcStartPA->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
m_tcStartPA->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
||||||
PA_step_sizer->Add(m_tcPAStep, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
PA_step_sizer->Add(m_tcPAStep, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
||||||
settings_sizer->Add(PA_step_sizer);
|
settings_sizer->Add(PA_step_sizer);
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ public:
|
|||||||
const char* get_name() const override;
|
const char* get_name() const override;
|
||||||
|
|
||||||
bool test(wxString &curl_msg) const override;
|
bool test(wxString &curl_msg) const override;
|
||||||
|
|
||||||
|
//B45
|
||||||
|
virtual std::string get_status(wxString &curl_msg) const override { return "1"; };
|
||||||
|
virtual float get_progress(wxString &curl_msg) const override { return 1; };
|
||||||
|
|
||||||
wxString get_test_ok_msg () const override;
|
wxString get_test_ok_msg () const override;
|
||||||
wxString get_test_failed_msg (wxString &msg) const override;
|
wxString get_test_failed_msg (wxString &msg) const override;
|
||||||
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ public:
|
|||||||
const char* get_name() const override;
|
const char* get_name() const override;
|
||||||
|
|
||||||
bool test(wxString &curl_msg) const override;
|
bool test(wxString &curl_msg) const override;
|
||||||
|
//B45
|
||||||
|
virtual std::string get_status(wxString &curl_msg) const override { return "1"; };
|
||||||
|
virtual float get_progress(wxString &curl_msg) const override { return 1; };
|
||||||
|
|
||||||
wxString get_test_ok_msg() const override;
|
wxString get_test_ok_msg() const override;
|
||||||
wxString get_test_failed_msg(wxString &msg) const override;
|
wxString get_test_failed_msg(wxString &msg) const override;
|
||||||
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ public:
|
|||||||
const char* get_name() const override;
|
const char* get_name() const override;
|
||||||
|
|
||||||
bool test(wxString &curl_msg) const override;
|
bool test(wxString &curl_msg) const override;
|
||||||
|
|
||||||
|
//B45
|
||||||
|
virtual std::string get_status(wxString &curl_msg) const override { return "1"; };
|
||||||
|
virtual float get_progress(wxString &curl_msg) const override { return 1; };
|
||||||
|
|
||||||
wxString get_test_ok_msg() const override;
|
wxString get_test_ok_msg() const override;
|
||||||
wxString get_test_failed_msg(wxString &msg) const override;
|
wxString get_test_failed_msg(wxString &msg) const override;
|
||||||
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ public:
|
|||||||
const char* get_name() const override;
|
const char* get_name() const override;
|
||||||
|
|
||||||
bool test(wxString& curl_msg) const override;
|
bool test(wxString& curl_msg) const override;
|
||||||
|
|
||||||
|
//B45
|
||||||
|
virtual std::string get_status(wxString &curl_msg) const override { return "1"; };
|
||||||
|
virtual float get_progress(wxString &curl_msg) const override { return 1; };
|
||||||
|
|
||||||
wxString get_test_ok_msg() const override;
|
wxString get_test_ok_msg() const override;
|
||||||
wxString get_test_failed_msg(wxString& msg) const override;
|
wxString get_test_failed_msg(wxString& msg) const override;
|
||||||
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
||||||
|
|||||||
@@ -142,6 +142,129 @@ bool Moonraker::test(wxString& msg) const
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//B45
|
||||||
|
std::string Moonraker::get_status(wxString &msg) const
|
||||||
|
{
|
||||||
|
// GET /server/info
|
||||||
|
|
||||||
|
// Since the request is performed synchronously here,
|
||||||
|
// it is ok to refer to `msg` from within the closure
|
||||||
|
const char *name = get_name();
|
||||||
|
|
||||||
|
bool res = true;
|
||||||
|
std::string print_state = "standby";
|
||||||
|
auto url = make_url("printer/objects/query?print_stats=state");
|
||||||
|
|
||||||
|
BOOST_LOG_TRIVIAL(info) << boost::format("%1%: Get version at: %2%") % name % url;
|
||||||
|
|
||||||
|
auto http = Http::get(std::move(url));
|
||||||
|
set_auth(http);
|
||||||
|
http.on_error([&](std::string body, std::string error, unsigned status) {
|
||||||
|
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error getting version: %2%, HTTP %3%, body: `%4%`") % name % error % status %
|
||||||
|
body;
|
||||||
|
print_state = "offline";
|
||||||
|
msg = format_error(body, error, status);
|
||||||
|
})
|
||||||
|
.on_complete([&](std::string body, unsigned) {
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got print_stats: %2%") % name % body;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// All successful HTTP requests will return a json encoded object in the form of :
|
||||||
|
// {result: <response data>}
|
||||||
|
std::stringstream ss(body);
|
||||||
|
pt::ptree ptree;
|
||||||
|
pt::read_json(ss, ptree);
|
||||||
|
if (ptree.front().first != "result") {
|
||||||
|
msg = "Could not parse server response";
|
||||||
|
print_state = "offline";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!ptree.front().second.get_optional<std::string>("status")) {
|
||||||
|
msg = "Could not parse server response";
|
||||||
|
print_state = "offline";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
print_state = ptree.get<std::string>("result.status.print_stats.state");
|
||||||
|
BOOST_LOG_TRIVIAL(info) << boost::format("%1%: Got state: %2%") % name % print_state;
|
||||||
|
;
|
||||||
|
} catch (const std::exception &) {
|
||||||
|
print_state = "offline";
|
||||||
|
msg = "Could not parse server response";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
#ifdef _WIN32
|
||||||
|
.ssl_revoke_best_effort(m_ssl_revoke_best_effort)
|
||||||
|
.on_ip_resolve([&](std::string address) {
|
||||||
|
// Workaround for Windows 10/11 mDNS resolve issue, where two mDNS resolves in succession fail.
|
||||||
|
// Remember resolved address to be reused at successive REST API call.
|
||||||
|
msg = GUI::from_u8(address);
|
||||||
|
})
|
||||||
|
#endif // _WIN32
|
||||||
|
.perform_sync();
|
||||||
|
|
||||||
|
return print_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Moonraker::get_progress(wxString &msg) const
|
||||||
|
{
|
||||||
|
// GET /server/info
|
||||||
|
|
||||||
|
// Since the request is performed synchronously here,
|
||||||
|
// it is ok to refer to `msg` from within the closure
|
||||||
|
const char *name = get_name();
|
||||||
|
|
||||||
|
bool res = true;
|
||||||
|
auto url = make_url("printer/objects/query?display_status=progress");
|
||||||
|
float process = 0;
|
||||||
|
BOOST_LOG_TRIVIAL(info) << boost::format("%1%: Get version at: %2%") % name % url;
|
||||||
|
|
||||||
|
auto http = Http::get(std::move(url));
|
||||||
|
set_auth(http);
|
||||||
|
http.on_error([&](std::string body, std::string error, unsigned status) {
|
||||||
|
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error getting version: %2%, HTTP %3%, body: `%4%`") % name % error % status %
|
||||||
|
body;
|
||||||
|
res = false;
|
||||||
|
msg = format_error(body, error, status);
|
||||||
|
})
|
||||||
|
.on_complete([&](std::string body, unsigned) {
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got display_status: %2%") % name % body;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// All successful HTTP requests will return a json encoded object in the form of :
|
||||||
|
// {result: <response data>}
|
||||||
|
std::stringstream ss(body);
|
||||||
|
pt::ptree ptree;
|
||||||
|
pt::read_json(ss, ptree);
|
||||||
|
if (ptree.front().first != "result") {
|
||||||
|
msg = "Could not parse server response";
|
||||||
|
res = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!ptree.front().second.get_optional<std::string>("status")) {
|
||||||
|
msg = "Could not parse server response";
|
||||||
|
res = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
process = std::stof(ptree.get<std::string>("result.status.display_status.progress"));
|
||||||
|
BOOST_LOG_TRIVIAL(info) << boost::format("%1%: Got state: %2%") % name % process;
|
||||||
|
} catch (const std::exception &) {
|
||||||
|
res = false;
|
||||||
|
msg = "Could not parse server response";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
#ifdef _WIN32
|
||||||
|
.ssl_revoke_best_effort(m_ssl_revoke_best_effort)
|
||||||
|
.on_ip_resolve([&](std::string address) {
|
||||||
|
// Workaround for Windows 10/11 mDNS resolve issue, where two mDNS resolves in succession fail.
|
||||||
|
// Remember resolved address to be reused at successive REST API call.
|
||||||
|
msg = GUI::from_u8(address);
|
||||||
|
})
|
||||||
|
#endif // _WIN32
|
||||||
|
.perform_sync();
|
||||||
|
|
||||||
|
return process;
|
||||||
|
}
|
||||||
|
|
||||||
bool Moonraker::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const
|
bool Moonraker::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const
|
||||||
{
|
{
|
||||||
// POST /server/files/upload
|
// POST /server/files/upload
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ public:
|
|||||||
const char* get_name() const override;
|
const char* get_name() const override;
|
||||||
|
|
||||||
virtual bool test(wxString &curl_msg) const override;
|
virtual bool test(wxString &curl_msg) const override;
|
||||||
|
|
||||||
|
//B45
|
||||||
|
virtual std::string get_status(wxString &curl_msg) const override;
|
||||||
|
virtual float get_progress(wxString &curl_msg) const override;
|
||||||
|
|
||||||
wxString get_test_ok_msg () const override;
|
wxString get_test_ok_msg () const override;
|
||||||
wxString get_test_failed_msg (wxString &msg) const override;
|
wxString get_test_failed_msg (wxString &msg) const override;
|
||||||
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ public:
|
|||||||
const char* get_name() const override;
|
const char* get_name() const override;
|
||||||
|
|
||||||
virtual bool test(wxString &curl_msg) const override;
|
virtual bool test(wxString &curl_msg) const override;
|
||||||
|
//B45
|
||||||
|
virtual std::string get_status(wxString &curl_msg) const override { return "1"; };
|
||||||
|
virtual float get_progress(wxString &curl_msg) const override { return 1; };
|
||||||
|
|
||||||
wxString get_test_ok_msg () const override;
|
wxString get_test_ok_msg () const override;
|
||||||
wxString get_test_failed_msg (wxString &msg) const override;
|
wxString get_test_failed_msg (wxString &msg) const override;
|
||||||
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ public:
|
|||||||
virtual const char* get_name() const = 0;
|
virtual const char* get_name() const = 0;
|
||||||
|
|
||||||
virtual bool test(wxString &curl_msg) const = 0;
|
virtual bool test(wxString &curl_msg) const = 0;
|
||||||
|
//B45
|
||||||
|
virtual std::string get_status(wxString &curl_msg) const = 0;
|
||||||
|
virtual float get_progress(wxString &curl_msg) const = 0;
|
||||||
virtual wxString get_test_ok_msg () const = 0;
|
virtual wxString get_test_ok_msg () const = 0;
|
||||||
virtual wxString get_test_failed_msg (wxString &msg) const = 0;
|
virtual wxString get_test_failed_msg (wxString &msg) const = 0;
|
||||||
virtual bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const = 0;
|
virtual bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const = 0;
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ public:
|
|||||||
const char* get_name() const override;
|
const char* get_name() const override;
|
||||||
|
|
||||||
bool test(wxString &curl_msg) const override;
|
bool test(wxString &curl_msg) const override;
|
||||||
|
//B45
|
||||||
|
virtual std::string get_status(wxString &curl_msg) const override { return "1"; };
|
||||||
|
virtual float get_progress(wxString &curl_msg) const override { return 1; };
|
||||||
wxString get_test_ok_msg () const override;
|
wxString get_test_ok_msg () const override;
|
||||||
wxString get_test_failed_msg (wxString &msg) const override;
|
wxString get_test_failed_msg (wxString &msg) const override;
|
||||||
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
set(SLIC3R_APP_NAME "QIDISlicer")
|
set(SLIC3R_APP_NAME "QIDISlicer")
|
||||||
set(SLIC3R_APP_KEY "QIDISlicer")
|
set(SLIC3R_APP_KEY "QIDISlicer")
|
||||||
set(SLIC3R_VERSION "1.0.7")
|
set(SLIC3R_VERSION "1.0.8")
|
||||||
set(SLIC3R_BUILD_ID "QIDISlicer-${SLIC3R_VERSION}+Win64")
|
set(SLIC3R_BUILD_ID "QIDISlicer-${SLIC3R_VERSION}+Win64")
|
||||||
set(SLIC3R_RC_VERSION "1,0,7,0")
|
set(SLIC3R_RC_VERSION "1,0,8,0")
|
||||||
set(SLIC3R_RC_VERSION_DOTS "1.0.7.0")
|
set(SLIC3R_RC_VERSION_DOTS "1.0.8.0")
|
||||||
|
|||||||