Merge remote-tracking branch 'remotes/origin/master' into spiky2021-sp_base_interfaces

This commit is contained in:
Vojtech Bubnik 2021-02-15 16:37:19 +01:00
commit a3b53bec68
24 changed files with 692 additions and 110 deletions

View File

@ -90,8 +90,9 @@ Works on a fresh installation of MacOS Catalina 10.15.6
- Enter:
```brew install cmake git gettext
```
brew update
brew install cmake git gettext
brew upgrade
git clone https://github.com/prusa3d/PrusaSlicer/
cd PrusaSlicer/deps
@ -105,3 +106,4 @@ cd build
cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local"
make
src/prusa-slicer
```

View File

@ -0,0 +1,2 @@
min_slic3r_version = 2.3.0
0.0.1 Initial Artillery bundle

View File

@ -0,0 +1,477 @@
###############
# AUTHOR: Szabolcs Hornyak / design85@gmail.com
# https://szabolcs.eu/2020/12/29/prusaslicer-sw-x1-genius/
# Tested with PrusaSlicer 2.2, 2.3
###############
# Print profiles for the Artillery printers.
[vendor]
# Vendor name will be shown by the Config Wizard.
name = Artillery
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 0.0.1
# Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Artillery/
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
# The printer models will be shown by the Configuration Wizard in this order,
# also the first model installed & the first nozzle installed will be activated after install.
# Printer model name will be shown by the installation wizard.
#############
## PRINTER ##
#############
[printer_model:X1]
name = Sidewinder X1
variants = 0.4
technology = FFF
bed_model = bed-x1.stl
bed_texture = bed-x1.png
default_materials = Generic PLA @Artillery; Generic ABS @Artillery; Generic PETG @Artillery; Generic TPU @Artillery
[printer_model:Genius]
name = Genius
variants = 0.4
technology = FFF
bed_model = bed-genius.stl
bed_texture = bed-genius.png
default_materials = Generic PLA @Artillery; Generic ABS @Artillery; Generic PETG @Artillery; Generic TPU @Artillery
# Common printer preset
[printer:*common*]
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0
between_objects_gcode =
cooling_tube_length = 5
cooling_tube_retraction = 91.5
default_filament_profile = Generic PLA @Artillery
default_print_profile = 0.20mm NORMAL @Artillery
deretract_speed = 0
extruder_colour = #FFFF00
extruder_offset = 0x0
gcode_flavor = marlin
layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
machine_max_acceleration_e = 5000,5000
machine_max_acceleration_extruding = 1250,1250
machine_max_acceleration_retracting = 1250,1250
machine_max_acceleration_x = 1000,960
machine_max_acceleration_y = 1000,960
machine_max_acceleration_z = 1000,1000
machine_max_feedrate_e = 120,120
machine_max_feedrate_x = 200,100
machine_max_feedrate_y = 200,100
machine_max_feedrate_z = 12,12
machine_max_jerk_e = 1.5,1.5
machine_max_jerk_x = 8,8
machine_max_jerk_y = 8,8
machine_max_jerk_z = 0.4,0.4
machine_min_extruding_rate = 0,0
machine_min_travel_rate = 0,0
max_layer_height = 0.25
max_print_height = 250
min_layer_height = 0.07
nozzle_diameter = 0.4
pause_print_gcode =
printer_technology = FFF
remaining_times = 0
retract_before_travel = 1
retract_before_wipe = 0%
retract_layer_change = 1
retract_length = 1.9
retract_length_toolchange = 4
retract_lift = 0.6
retract_lift_above = 0
retract_lift_below = 380
retract_restart_extra = 0
retract_restart_extra_toolchange = 0
retract_speed = 35
silent_mode = 0
single_extruder_multi_material = 0
toolchange_gcode =
use_firmware_retraction = 0
use_relative_e_distances = 1
use_volumetric_e = 0
variable_layer_height = 1
wipe = 1
z_offset = 0
end_gcode = G4 ; wait\nG92 E0 ; prepare to retract\nG1 E-0.5 F3000; retract to avoid stringing\n\n; Anti-stringing end wiggle\nG91 ; use relative coordinates\nG1 X1 Y1 F1200\n\n; Raise nozzle and present bed\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+120, max_print_height)}{endif} ; Move print head up\nG90 ; use absolute coordinates\n\n; Reset print setting overrides\nM200 D0 ; disable volumetric e\nM220 S100 ; reset speed factor to 100%\nM221 S100 ; reset extrusion rate to 100%\n\n; Shut down printer\nM106 S0 ; turn-off fan\nM104 S0 ; turn-off hotend\nM140 S0 ; turn-off bed\nM150 P0 ; turn off led\nM85 S0 ; deactivate idle timeout\nM84 ; disable motors\n
[printer:*common_STOCK_FW*]
inherits = *common*
start_gcode = ; Initial setups\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM900 W[extrusion_width] H[layer_height] D[filament_diameter]\nM200 D0 ; disable volumetric e\nM220 S100 ; reset speed factor to 100%\nM221 S100 ; reset extrusion rate to 100%\n\n; Set the heating\nM190 S[first_layer_bed_temperature]; wait for bed to heat up\nM104 S[first_layer_temperature]; start nozzle heating but don't wait\n\n; Home\nG1 Z3 F3000 ; move z up little to prevent scratching of surface\nG28 ; home all axes\nG1 X3 Y3 F5000 ; move to corner of the bed to avoid ooze over centre\n\n; Wait for final heating\nM109 S[first_layer_temperature] ; wait for the nozzle to heat up\nM190 S[first_layer_bed_temperature] ; wait for the bed to heat up\n\n; Return to prime position, Prime line routine\nG92 E0 ; Reset Extruder\nG1 Z3 F3000 ; move z up little to prevent scratching of surface\nG1 X10 Y.5 Z0.25 F5000.0 ; Move to start position\nG1 X100 Y.5 Z0.25 F1500.0 E15 ; Draw the first line\nG1 X100 Y.2 Z0.25 F5000.0 ; Move to side a little\nG1 X10 Y.2 Z0.25 F1500.0 E30 ; Draw the second line\nG92 E0 ; Reset Extruder\nM221 S{if layer_height<0.075}100{else}95{endif}
[printer:*common_UPD_FW*]
inherits = *common*
start_gcode = ; Initial setups\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM900 K0.12; K factor\nM900 W[extrusion_width] H[layer_height] D[filament_diameter]\nM200 D0 ; disable volumetric e\nM220 S100 ; reset speed factor to 100%\nM221 S100 ; reset extrusion rate to 100%\n\n; Set the heating\nM190 S[first_layer_bed_temperature]; wait for bed to heat up\nM104 S[first_layer_temperature]; start nozzle heating but don't wait\n\n; Home\nG1 Z3 F3000 ; move z up little to prevent scratching of surface\nG28 ; home all axes\nG1 X3 Y3 F5000 ; move to corner of the bed to avoid ooze over centre\n\n; Wait for final heating\nM109 S[first_layer_temperature] ; wait for the nozzle to heat up\nM190 S[first_layer_bed_temperature] ; wait for the bed to heat up\n\n;Auto bed Leveling\n@BEDLEVELVISUALIZER\nG29 ; ABL T\nM420 S1 Z3 ; reload and fade mesh bed leveling until it reach 3mm Z\n\n; Return to prime position, Prime line routine\nG92 E0 ; Reset Extruder\nG1 Z3 F3000 ; move z up little to prevent scratching of surface\nG1 X10 Y.5 Z0.25 F5000.0 ; Move to start position\nG1 X100 Y.5 Z0.25 F1500.0 E15 ; Draw the first line\nG1 X100 Y.2 Z0.25 F5000.0 ; Move to side a little\nG1 X10 Y.2 Z0.25 F1500.0 E30 ; Draw the second line\nG92 E0 ; Reset Extruder\nM221 S{if layer_height<0.075}100{else}95{endif}
[printer:Sidewinder X1]
inherits = *common_STOCK_FW*
printer_model = X1
printer_variant = 0.4
bed_shape = 0x0,300x0,300x300,0x300
max_print_height = 400
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_Artillery\nPRINTER_MODEL_X1
[printer:Sidewinder X1 BL-TOUCH]
inherits = *common_UPD_FW*
printer_model = X1
printer_variant = 0.4
bed_shape = 0x0,300x0,300x300,0x300
max_print_height = 400
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_Artillery\nPRINTER_MODEL_X1
[printer:Genius]
inherits = *common_STOCK_FW*
printer_model = Genius
printer_variant = 0.4
bed_shape = 0x0,230x0,230x230,0x230
max_print_height = 250
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_Artillery\nPRINTER_MODEL_Genius
[printer:Genius BL-TOUCH]
inherits = *common_UPD_FW*
printer_model = Genius
printer_variant = 0.4
bed_shape = 0x0,230x0,230x230,0x230
max_print_height = 250
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_Artillery\nPRINTER_MODEL_Genius
###########
## PRINT ##
###########
# Common print preset
[print:*common*]
# V2.2 #
#bottom_fill_pattern = rectilinear
#top_fill_pattern = rectilinear
#fill_pattern = cubic
# V2.3 #
top_fill_pattern = monotonic
bottom_fill_pattern = monotonic
fill_pattern = adaptivecubic
avoid_crossing_perimeters = 0
bridge_acceleration = 1000
bridge_angle = 0
bridge_flow_ratio = 0.78
bridge_speed = 20
# brim_width = 5
bottom_solid_min_thickness = 1.2
clip_multipart_objects = 1
compatible_printers =
complete_objects = 0
default_acceleration = 1000
dont_support_bridges = 1
elefant_foot_compensation = 0
ensure_vertical_shell_thickness = 1
external_perimeter_extrusion_width = 0.45
external_perimeter_speed = 25
external_perimeters_first = 0
extra_perimeters = 0
extruder_clearance_height = 25
extruder_clearance_radius = 45
extrusion_width = 0.45
fill_angle = 45
fill_density = 15%
first_layer_acceleration = 500
first_layer_extrusion_width = 0.42
first_layer_height = 150%
first_layer_speed = 20
gap_fill_speed = 30
gcode_comments = 1
gcode_label_objects = 1
infill_acceleration = 1000
infill_every_layers = 1
infill_extruder = 1
infill_extrusion_width = 0.45
infill_first = 0
infill_only_where_needed = 0
infill_overlap = 25%
infill_speed = 50
interface_shells = 0
max_print_speed = 150
max_volumetric_extrusion_rate_slope_negative = 0
max_volumetric_extrusion_rate_slope_positive = 0
max_volumetric_speed = 0
min_skirt_length = 4
notes =
overhangs = 1
only_retract_when_crossing_perimeters = 0
ooze_prevention = 0
output_filename_format = {input_filename_base}_{layer_height}mm_{filament_type[0]}_{printer_model}_{print_time}.gcode
perimeters = 3
perimeter_acceleration = 800
perimeter_extruder = 1
perimeter_extrusion_width = 0
perimeter_speed = 45
post_process =
print_settings_id =
raft_layers = 0
resolution = 0
seam_position = nearest
single_extruder_multi_material_priming = 0
skirts = 1
skirt_distance = 6
skirt_height = 1
small_perimeter_speed = 25
solid_infill_below_area = 0
solid_infill_every_layers = 0
solid_infill_extruder = 1
solid_infill_extrusion_width = 0.45
solid_infill_speed = 50
spiral_vase = 0
standby_temperature_delta = -5
support_material = 0
support_material_extruder = 0
support_material_extrusion_width = 0.35
support_material_interface_extruder = 0
support_material_angle = 0
support_material_buildplate_only = 0
support_material_enforce_layers = 0
support_material_contact_distance = 0.15
support_material_interface_contact_loops = 0
support_material_interface_layers = 2
support_material_interface_spacing = 0.2
support_material_interface_speed = 100%
support_material_pattern = rectilinear
support_material_spacing = 2
support_material_speed = 50
support_material_synchronize_layers = 0
support_material_threshold = 55
support_material_with_sheath = 0
support_material_xy_spacing = 50%
thin_walls = 1
travel_speed = 130
top_infill_extrusion_width = 0.4
top_solid_infill_speed = 30
wipe_tower = 0
wipe_tower_bridging = 10
wipe_tower_rotation_angle = 0
wipe_tower_width = 60
wipe_tower_x = 170
wipe_tower_y = 125
xy_size_compensation = 0
[print:*0.08mm*]
inherits = *common*
default_acceleration = 500
layer_height = 0.08
perimeters = 3
bottom_solid_layers = 9
top_solid_layers = 11
[print:*0.10mm*]
inherits = *common*
default_acceleration = 500
layer_height = 0.1
perimeters = 3
bottom_solid_layers = 7
top_solid_layers = 9
[print:*0.12mm*]
inherits = *common*
default_acceleration = 500
layer_height = 0.12
perimeters = 3
bottom_solid_layers = 6
top_solid_layers = 7
[print:*0.16mm*]
inherits = *common*
layer_height = 0.16
bottom_solid_layers = 5
top_solid_layers = 7
[print:*0.20mm*]
inherits = *common*
layer_height = 0.20
bottom_solid_layers = 4
top_solid_layers = 5
[print:*0.24mm*]
inherits = *common*
layer_height = 0.24
top_infill_extrusion_width = 0.45
bottom_solid_layers = 3
top_solid_layers = 4
[print:*0.28mm*]
inherits = *common*
layer_height = 0.28
top_infill_extrusion_width = 0.45
first_layer_extrusion_width = 0.75
bottom_solid_layers = 3
top_solid_layers = 4
[print:0.08mm SUPERDETAIL @Artillery]
inherits = *0.08mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.10mm HIGHDETAIL @Artillery]
inherits = *0.10mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.12mm DETAIL @Artillery]
inherits = *0.12mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.16mm OPTIMAL @Artillery]
inherits = *0.16mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.20mm SLOW @Artillery]
inherits = *0.20mm*
external_perimeter_speed = 15
fill_density = 20%
gap_fill_speed = 25
infill_speed = 50
perimeter_speed = 30
perimeters = 3
solid_infill_speed = 50
top_solid_infill_speed = 25
first_layer_speed = 15
travel_speed = 100
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.20mm NORMAL @Artillery]
inherits = *0.20mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.20mm SPEED @Artillery]
inherits = *0.20mm*
external_perimeter_speed = 35
fill_density = 15%
fill_pattern = grid
gap_fill_speed = 45
infill_speed = 150
infill_only_where_needed = 1
perimeter_speed = 60
perimeters = 2
solid_infill_speed = 150
top_solid_infill_speed = 50
travel_speed = 170
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.24mm DRAFT @Artillery]
inherits = *0.24mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
[print:0.28mm SUPERDRAFT @Artillery]
inherits = *0.28mm*
compatible_printers_condition = printer_model=~/(X1|Genius).*/ and nozzle_diameter[0]==0.4
###############
## FILAMENTS ##
###############
# Common filament preset
[filament:*common*]
cooling = 1
compatible_printers =
extrusion_multiplier = 1
filament_cost = 0
filament_density = 0
filament_diameter = 1.75
filament_notes = ""
filament_settings_id = ""
filament_soluble = 0
min_print_speed = 15
slowdown_below_layer_time = 15
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_Artillery.*/
[filament:*PLA*]
inherits = *common*
bed_temperature = 60
bridge_fan_speed = 100
cooling = 1
disable_fan_first_layers = 1
fan_always_on = 1
fan_below_layer_time = 100
filament_colour = #428AF5
filament_cost = 20
filament_density = 1.24
filament_max_volumetric_speed = 15
filament_type = PLA
first_layer_bed_temperature = 65
first_layer_temperature = 210
full_fan_speed_layer = 3
max_fan_speed = 100
min_fan_speed = 100
temperature = 205
[filament:*PET*]
inherits = *common*
bed_temperature = 70
bridge_fan_speed = 100
cooling = 1
disable_fan_first_layers = 3
fan_always_on = 1
fan_below_layer_time = 20
filament_colour = #42E9F5
filament_cost = 30
filament_density = 1.27
filament_max_volumetric_speed = 8
filament_type = PETG
first_layer_bed_temperature = 70
first_layer_temperature = 235
max_fan_speed = 50
min_fan_speed = 20
temperature = 230
[filament:*ABS*]
inherits = *common*
bed_temperature = 90
bridge_fan_speed = 30
cooling = 0
disable_fan_first_layers = 3
fan_always_on = 0
fan_below_layer_time = 20
filament_colour = #6603FC
filament_cost = 20
filament_density = 1.04
filament_max_volumetric_speed = 11
filament_type = ABS
first_layer_bed_temperature = 90
first_layer_temperature = 240
max_fan_speed = 0
min_fan_speed = 0
temperature = 240
top_fan_speed = 0
[filament:*TPU*]
inherits = *common*
bed_temperature = 55
cooling = 0
disable_fan_first_layers = 3
fan_always_on = 0
fan_below_layer_time = 20
filament_colour = #CFFFFB
filament_cost = 30
filament_density = 1.2
filament_max_volumetric_speed = 11
filament_retract_before_travel = 4
filament_retract_length = 2.5
filament_retract_speed = 30
filament_type = TPU
first_layer_bed_temperature = 55
first_layer_temperature = 210
max_fan_speed = 70
min_fan_speed = 0
[filament:Generic PLA @Artillery]
inherits = *PLA*
filament_vendor = Generic
[filament:Generic PETG @Artillery]
inherits = *PET*
filament_vendor = Generic
[filament:Generic ABS @Artillery]
inherits = *ABS*
filament_vendor = Generic
[filament:Generic TPU @Artillery]
inherits = *TPU*
filament_vendor = Generic

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -23,6 +23,15 @@ bed_model = ender3_bed.stl
bed_texture = ender3.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA (Galaxy) @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 123-3D Jupiter PLA @CREALITY
[printer_model:ENDER3BLTOUCH]
name = Creality Ender-3 BLTouch
variants = 0.4
technology = FFF
family = ENDER
bed_model = ender3_bed.stl
bed_texture = ender3.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA (Galaxy) @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 123-3D Jupiter PLA @CREALITY
[printer_model:ENDER3V2]
name = Creality Ender-3 V2
variants = 0.4
@ -32,14 +41,14 @@ bed_model = ender3_bed.stl
bed_texture = ender3.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA (Galaxy) @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 123-3D Jupiter PLA @CREALITY
[printer_model:ENDER3BLTOUCH]
name = Creality Ender-3 BLTouch
variants = 0.4
technology = FFF
family = ENDER
bed_model = ender3_bed.stl
bed_texture = ender3.svg
default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA (Galaxy) @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 123-3D Jupiter PLA @CREALITY
#[printer_model:ENDER3MAX]
#name = Creality Ender-3 Max
#variants = 0.4
#technology = FFF
#family = ENDER
#bed_model = cr10v2_bed.stl
#bed_texture = cr10spro.svg
#default_materials = Generic PLA @CREALITY; Generic PETG @CREALITY; Generic ABS @CREALITY; Creality PLA @CREALITY; Prusament PLA @CREALITY; Prusament PETG @CREALITY; AzureFilm PLA @CREALITY; Devil Design PLA @CREALITY; Devil Design PLA (Galaxy) @CREALITY; Extrudr PLA NX2 @CREALITY; Real Filament PLA @CREALITY; Velleman PLA @CREALITY; 3DJAKE ecoPLA @CREALITY; 123-3D Jupiter PLA @CREALITY
[printer_model:ENDER5]
name = Creality Ender-5
@ -763,12 +772,6 @@ retract_before_wipe = 70%
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set extruder temp for auto bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nG4 S10 ; wait for partial warmup\nG28 ; home all\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set extruder temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; intro line\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; intro line\nG92 E0
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600 ; Move print head up{endif}\nG1 X5 Y{print_bed_max[1]*0.8} F{travel_speed*60} ; present print\n{if max_layer_z < max_print_height-10}G1 Z{z_offset+min(max_layer_z+70, max_print_height-10)} F600 ; Move print head further up{endif}\n{if max_layer_z < max_print_height*0.6}G1 Z{max_print_height*0.6} F600 ; Move print head further up{endif}\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
[printer:Creality Ender-3 V2]
inherits = Creality Ender-3
renamed_from = "Creality Ender-3V2"
printer_model = ENDER3V2
bed_shape = 0x0,220x0,220x220,0x220
# Intended for printers with a smaller bed, like the Ender-3 series
[printer:*fastabl*]
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S120 ; set extruder temp for auto bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nG4 S10 ; wait for partial warmup\nG28 ; home all\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set extruder temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; intro line\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; intro line\nG92 E0
@ -812,6 +815,20 @@ inherits = Creality Ender-3; *fastabl*
renamed_from = "Creality ENDER-3 BLTouch"
printer_model = ENDER3BLTOUCH
[printer:Creality Ender-3 V2]
inherits = Creality Ender-3
renamed_from = "Creality Ender-3V2"
printer_model = ENDER3V2
bed_shape = 0x0,220x0,220x220,0x220
#[printer:Creality Ender-3 Max]
#inherits = Creality Ender-3
#retract_length = 6
#bed_shape = 5x5,295x5,295x295,5x295
#printer_model = ENDER3MAX
#printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3MAX\nPRINTER_HAS_BOWDEN
#max_print_height = 340
[printer:Creality Ender-5]
inherits = Creality Ender-3; *invertedz*
retract_length = 6

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -710,6 +710,10 @@ namespace Slic3r {
#endif // ENABLE_RELOAD_FROM_DISK_FOR_3MF
for (const IdToModelObjectMap::value_type& object : m_objects) {
if (object.second >= m_model->objects.size()) {
add_error("Unable to find object");
return false;
}
ModelObject* model_object = m_model->objects[object.second];
IdToGeometryMap::const_iterator obj_geometry = m_geometries.find(object.first);
if (obj_geometry == m_geometries.end()) {
@ -1391,6 +1395,10 @@ namespace Slic3r {
{
// deletes all non-built or non-instanced objects
for (const IdToModelObjectMap::value_type& object : m_objects) {
if (object.second >= m_model->objects.size()) {
add_error("Unable to find object");
return false;
}
ModelObject *model_object = m_model->objects[object.second];
if (model_object != nullptr && model_object->instances.size() == 0)
m_model->delete_object(model_object);

View File

@ -116,6 +116,7 @@
#define ENABLE_SPLITTED_VERTEX_BUFFER (1 && ENABLE_2_3_1_ALPHA1)
#define ENABLE_RELOAD_FROM_DISK_FOR_3MF (1 && ENABLE_2_3_1_ALPHA1)
#define ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS (1 && ENABLE_SPLITTED_VERTEX_BUFFER)
#define ENABLE_WARNING_TEXTURE_REMOVAL (1 && ENABLE_2_3_1_ALPHA1)
#endif // _prusaslicer_technologies_h_

View File

@ -34,7 +34,7 @@ bool GeometryBuffer::set_from_triangles(const std::vector<Vec2f> &triangles, flo
assert(triangles.size() % 3 == 0);
m_vertices = std::vector<Vertex>(triangles.size(), Vertex());
Vec2f min(unscaled<float>(triangles.front()));
Vec2f min = triangles.front();
Vec2f max = min;
for (size_t v_count = 0; v_count < triangles.size(); ++ v_count) {

View File

@ -611,6 +611,7 @@ GLCanvas3D::Mouse::Mouse()
{
}
#if !ENABLE_WARNING_TEXTURE_REMOVAL
const unsigned char GLCanvas3D::WarningTexture::Background_Color[3] = { 120, 120, 120 };//{ 9, 91, 134 };
const unsigned char GLCanvas3D::WarningTexture::Opacity = 255;
@ -879,6 +880,7 @@ void GLCanvas3D::WarningTexture::msw_rescale(const GLCanvas3D& canvas)
generate(m_msg_text, canvas, true, m_is_colored_red);
}
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_instances) const
{
@ -1302,7 +1304,11 @@ void GLCanvas3D::reset_volumes()
m_volumes.clear();
m_dirty = true;
#if ENABLE_WARNING_TEXTURE_REMOVAL
_set_warning_notification(EWarning::ObjectOutside, false);
#else
_set_warning_texture(WarningTexture::ObjectOutside, false);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
}
int GLCanvas3D::check_volumes_outside_state() const
@ -1356,11 +1362,19 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject
if (visible && !mo)
toggle_sla_auxiliaries_visibility(true, mo, instance_idx);
#if ENABLE_WARNING_TEXTURE_REMOVAL
if (!mo && !visible && !m_model->objects.empty() && (m_model->objects.size() > 1 || m_model->objects.front()->instances.size() > 1))
_set_warning_notification(EWarning::SomethingNotShown, true);
if (!mo && visible)
_set_warning_notification(EWarning::SomethingNotShown, false);
#else
if (!mo && !visible && !m_model->objects.empty() && (m_model->objects.size() > 1 || m_model->objects.front()->instances.size() > 1))
_set_warning_texture(WarningTexture::SomethingNotShown, true);
if (!mo && visible)
_set_warning_texture(WarningTexture::SomethingNotShown, false);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
}
void GLCanvas3D::update_instance_printable_state_for_object(const size_t obj_idx)
@ -2236,18 +2250,31 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
const bool contained_min_one = m_volumes.check_outside_state(m_config, &state);
#if ENABLE_WARNING_TEXTURE_REMOVAL
_set_warning_notification(EWarning::ObjectClashed, state == ModelInstancePVS_Partly_Outside);
_set_warning_notification(EWarning::ObjectOutside, state == ModelInstancePVS_Fully_Outside);
if (printer_technology != ptSLA || state == ModelInstancePVS_Inside)
_set_warning_notification(EWarning::SlaSupportsOutside, false);
#else
_set_warning_texture(WarningTexture::ObjectClashed, state == ModelInstancePVS_Partly_Outside);
_set_warning_texture(WarningTexture::ObjectOutside, state == ModelInstancePVS_Fully_Outside);
if(printer_technology != ptSLA || state == ModelInstancePVS_Inside)
_set_warning_texture(WarningTexture::SlaSupportsOutside, false);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
post_event(Event<bool>(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS,
contained_min_one && !m_model->objects.empty() && state != ModelInstancePVS_Partly_Outside));
}
else {
#if ENABLE_WARNING_TEXTURE_REMOVAL
_set_warning_notification(EWarning::ObjectOutside, false);
_set_warning_notification(EWarning::ObjectClashed, false);
_set_warning_notification(EWarning::SlaSupportsOutside, false);
#else
_set_warning_texture(WarningTexture::ObjectOutside, false);
_set_warning_texture(WarningTexture::ObjectClashed, false);
_set_warning_texture(WarningTexture::SlaSupportsOutside, false);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
post_event(Event<bool>(EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, false));
}
@ -2290,7 +2317,11 @@ void GLCanvas3D::load_gcode_preview(const GCodeProcessor::Result& gcode_result)
if (wxGetApp().is_editor()) {
m_gcode_viewer.update_shells_color_by_extruder(m_config);
#if ENABLE_WARNING_TEXTURE_REMOVAL
_set_warning_notification_if_needed(EWarning::ToolpathOutside);
#else
_show_warning_texture_if_needed(WarningTexture::ToolpathOutside);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
}
}
@ -2319,7 +2350,11 @@ void GLCanvas3D::load_sla_preview()
this->reset_volumes();
_load_sla_shells();
_update_sla_shells_outside_state();
#if ENABLE_WARNING_TEXTURE_REMOVAL
_set_warning_notification_if_needed(EWarning::SlaSupportsOutside);
#else
_show_warning_texture_if_needed(WarningTexture::SlaSupportsOutside);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
}
}
@ -2340,7 +2375,11 @@ void GLCanvas3D::load_preview(const std::vector<std::string>& str_tool_colors, c
_load_print_object_toolpaths(*object, str_tool_colors, color_print_values);
_update_toolpath_volumes_outside_state();
#if ENABLE_WARNING_TEXTURE_REMOVAL
_set_warning_notification_if_needed(EWarning::ToolpathOutside);
#else
_show_warning_texture_if_needed(WarningTexture::ToolpathOutside);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
}
void GLCanvas3D::bind_event_handlers()
@ -3850,7 +3889,9 @@ void GLCanvas3D::set_cursor(ECursorType type)
void GLCanvas3D::msw_rescale()
{
#if !ENABLE_WARNING_TEXTURE_REMOVAL
m_warning_texture.msw_rescale(*this);
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
}
void GLCanvas3D::update_tooltip_for_settings_item_in_main_toolbar()
@ -5190,7 +5231,9 @@ void GLCanvas3D::_render_overlays() const
_check_and_update_toolbar_icon_scale();
_render_gizmos_overlay();
#if !ENABLE_WARNING_TEXTURE_REMOVAL
_render_warning_texture();
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
// main toolbar and undoredo toolbar need to be both updated before rendering because both their sizes are needed
// to correctly place them
@ -5211,7 +5254,7 @@ void GLCanvas3D::_render_overlays() const
_render_collapse_toolbar();
_render_view_toolbar();
if ((m_layers_editing.last_object_id >= 0) && (m_layers_editing.object_max_z() > 0.0f))
if (m_layers_editing.last_object_id >= 0 && m_layers_editing.object_max_z() > 0.0f)
m_layers_editing.render_overlay(*this);
const ConfigOptionBool* opt = dynamic_cast<const ConfigOptionBool*>(m_config->option("complete_objects"));
@ -5228,10 +5271,12 @@ void GLCanvas3D::_render_overlays() const
glsafe(::glPopMatrix());
}
#if !ENABLE_WARNING_TEXTURE_REMOVAL
void GLCanvas3D::_render_warning_texture() const
{
m_warning_texture.render(*this);
}
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
void GLCanvas3D::_render_volumes_for_picking() const
{
@ -5401,8 +5446,7 @@ void GLCanvas3D::_render_sla_slices() const
double clip_min_z = -m_clipping_planes[0].get_data()[3];
double clip_max_z = m_clipping_planes[1].get_data()[3];
for (unsigned int i = 0; i < (unsigned int)print_objects.size(); ++i)
{
for (unsigned int i = 0; i < (unsigned int)print_objects.size(); ++i) {
const SLAPrintObject* obj = print_objects[i];
if (!obj->is_step_done(slaposSliceSupports))
@ -5473,10 +5517,8 @@ void GLCanvas3D::_render_sla_slices() const
}
}
if (!bottom_obj_triangles.empty() || !top_obj_triangles.empty() || !bottom_sup_triangles.empty() || !top_sup_triangles.empty())
{
for (const SLAPrintObject::Instance& inst : obj->instances())
{
if (!bottom_obj_triangles.empty() || !top_obj_triangles.empty() || !bottom_sup_triangles.empty() || !top_sup_triangles.empty()) {
for (const SLAPrintObject::Instance& inst : obj->instances()) {
glsafe(::glPushMatrix());
glsafe(::glTranslated(unscale<double>(inst.shift.x()), unscale<double>(inst.shift.y()), 0));
glsafe(::glRotatef(Geometry::rad2deg(inst.rotation), 0.0, 0.0, 1.0));
@ -5516,8 +5558,7 @@ void GLCanvas3D::_render_selection_sidebar_hints() const
void GLCanvas3D::_update_volumes_hover_state() const
{
for (GLVolume* v : m_volumes.volumes)
{
for (GLVolume* v : m_volumes.volumes) {
v->hover = GLVolume::HS_None;
}
@ -5528,8 +5569,7 @@ void GLCanvas3D::_update_volumes_hover_state() const
bool shift_pressed = wxGetKeyState(WXK_SHIFT); // select by rectangle
bool alt_pressed = wxGetKeyState(WXK_ALT); // deselect by rectangle
if (alt_pressed && (shift_pressed || ctrl_pressed))
{
if (alt_pressed && (shift_pressed || ctrl_pressed)) {
// illegal combinations of keys
m_hover_volume_idxs.clear();
return;
@ -5538,33 +5578,28 @@ void GLCanvas3D::_update_volumes_hover_state() const
bool selection_modifiers_only = m_selection.is_empty() || m_selection.is_any_modifier();
bool hover_modifiers_only = true;
for (int i : m_hover_volume_idxs)
{
if (!m_volumes.volumes[i]->is_modifier)
{
for (int i : m_hover_volume_idxs) {
if (!m_volumes.volumes[i]->is_modifier) {
hover_modifiers_only = false;
break;
}
}
std::set<std::pair<int, int>> hover_instances;
for (int i : m_hover_volume_idxs)
{
for (int i : m_hover_volume_idxs) {
const GLVolume& v = *m_volumes.volumes[i];
hover_instances.insert(std::make_pair(v.object_idx(), v.instance_idx()));
}
bool hover_from_single_instance = hover_instances.size() == 1;
if (hover_modifiers_only && !hover_from_single_instance)
{
if (hover_modifiers_only && !hover_from_single_instance) {
// do not allow to select volumes from different instances
m_hover_volume_idxs.clear();
return;
}
for (int i : m_hover_volume_idxs)
{
for (int i : m_hover_volume_idxs) {
GLVolume& volume = *m_volumes.volumes[i];
if (volume.hover != GLVolume::HS_None)
continue;
@ -5573,8 +5608,7 @@ void GLCanvas3D::_update_volumes_hover_state() const
// (volume->is_modifier && !selection_modifiers_only && !is_ctrl_pressed) -> allows hovering on selected modifiers belonging to selection of type Instance
bool select = (!volume.selected || (volume.is_modifier && !selection_modifiers_only && !ctrl_pressed)) && !alt_pressed;
if (select || deselect)
{
if (select || deselect) {
bool as_volume =
volume.is_modifier && hover_from_single_instance && !ctrl_pressed &&
(
@ -5582,22 +5616,18 @@ void GLCanvas3D::_update_volumes_hover_state() const
(deselect && !m_selection.is_single_full_instance() && (volume.object_idx() == m_selection.get_object_idx()) && (volume.instance_idx() == m_selection.get_instance_idx()))
);
if (as_volume)
{
if (as_volume) {
if (deselect)
volume.hover = GLVolume::HS_Deselect;
else
volume.hover = GLVolume::HS_Select;
}
else
{
else {
int object_idx = volume.object_idx();
int instance_idx = volume.instance_idx();
for (GLVolume* v : m_volumes.volumes)
{
if ((v->object_idx() == object_idx) && (v->instance_idx() == instance_idx))
{
for (GLVolume* v : m_volumes.volumes) {
if (v->object_idx() == object_idx && v->instance_idx() == instance_idx) {
if (deselect)
v->hover = GLVolume::HS_Deselect;
else
@ -5616,8 +5646,7 @@ void GLCanvas3D::_perform_layer_editing_action(wxMouseEvent* evt)
return;
// A volume is selected. Test, whether hovering over a layer thickness bar.
if (evt != nullptr)
{
if (evt != nullptr) {
const Rect& rect = LayersEditing::get_bar_rect_screen(*this);
float b = rect.get_bottom();
m_layers_editing.last_z = m_layers_editing.object_max_z() * (b - evt->GetY() - 1.0f) / (b - rect.get_top());
@ -5686,8 +5715,7 @@ void GLCanvas3D::_load_print_toolpaths()
// number of skirt layers
size_t total_layer_count = 0;
for (const PrintObject* print_object : print->objects())
{
for (const PrintObject* print_object : print->objects()) {
total_layer_count = std::max(total_layer_count, print_object->total_layer_count());
}
size_t skirt_height = print->has_infinite_skirt() ? total_layer_count : std::min<size_t>(print->config().skirt_height.value, total_layer_count);
@ -5768,8 +5796,7 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
auto it = std::find_if(color_print_values->begin(), color_print_values->end(),
[print_z](const CustomGCode::Item& code)
{ return fabs(code.print_z - print_z) < EPSILON; });
if (it != color_print_values->end())
{
if (it != color_print_values->end()) {
CustomGCode::Type type = it->type;
// pause print or custom Gcode
if (type == CustomGCode::PausePrint ||
@ -5789,8 +5816,7 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
const CustomGCode::Item value{print_z + EPSILON, CustomGCode::Custom, 0, ""};
it = std::lower_bound(color_print_values->begin(), color_print_values->end(), value);
while (it != color_print_values->begin())
{
while (it != color_print_values->begin()) {
--it;
// change color for current extruder
if (it->type == CustomGCode::ColorChange) {
@ -6252,6 +6278,24 @@ void GLCanvas3D::_update_sla_shells_outside_state()
}
}
#if ENABLE_WARNING_TEXTURE_REMOVAL
void GLCanvas3D::_set_warning_notification_if_needed(EWarning warning)
{
_set_current();
bool show = false;
if (!m_volumes.empty())
show = _is_any_volume_outside();
else {
if (wxGetApp().is_editor()) {
BoundingBoxf3 test_volume = (m_config != nullptr) ? print_volume(*m_config) : BoundingBoxf3();
const BoundingBoxf3& paths_volume = m_gcode_viewer.get_paths_bounding_box();
if (test_volume.radius() > 0.0 && paths_volume.radius() > 0.0)
show = !test_volume.contains(paths_volume);
}
}
_set_warning_notification(warning, show);
}
#else
void GLCanvas3D::_show_warning_texture_if_needed(WarningTexture::Warning warning)
{
_set_current();
@ -6268,23 +6312,21 @@ void GLCanvas3D::_show_warning_texture_if_needed(WarningTexture::Warning warning
}
_set_warning_texture(warning, show);
}
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
std::vector<float> GLCanvas3D::_parse_colors(const std::vector<std::string>& colors)
{
static const float INV_255 = 1.0f / 255.0f;
std::vector<float> output(colors.size() * 4, 1.0f);
for (size_t i = 0; i < colors.size(); ++i)
{
for (size_t i = 0; i < colors.size(); ++i) {
const std::string& color = colors[i];
const char* c = color.data() + 1;
if ((color.size() == 7) && (color.front() == '#'))
{
for (size_t j = 0; j < 3; ++j)
{
if (color.size() == 7 && color.front() == '#') {
for (size_t j = 0; j < 3; ++j) {
int digit1 = hex_digit_to_int(*c++);
int digit2 = hex_digit_to_int(*c++);
if ((digit1 == -1) || (digit2 == -1))
if (digit1 == -1 || digit2 == -1)
break;
output[i * 4 + j] = float(digit1 * 16 + digit2) * INV_255;
@ -6294,10 +6336,42 @@ std::vector<float> GLCanvas3D::_parse_colors(const std::vector<std::string>& col
return output;
}
#if ENABLE_WARNING_TEXTURE_REMOVAL
void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
{
std::string text;
bool error = false;
switch (warning) {
case EWarning::ObjectOutside: text = _u8L("An object outside the print area was detected."); break;
case EWarning::ToolpathOutside: text = _u8L("A toolpath outside the print area was detected."); error = true; break;
case EWarning::SlaSupportsOutside: text = _u8L("SLA supports outside the print area were detected."); error = true; break;
case EWarning::SomethingNotShown: text = _u8L("Some objects are not visible."); break;
case EWarning::ObjectClashed:
text = _u8L("An object outside the print area was detected.\n"
"Resolve the current problem to continue slicing.");
error = true;
break;
}
auto& notification_manager = *wxGetApp().plater()->get_notification_manager();
if (state) {
if (error)
notification_manager.push_plater_error_notification(text);
else
notification_manager.push_plater_warning_notification(text);
}
else {
if (error)
notification_manager.close_plater_error_notification(text);
else
notification_manager.close_plater_warning_notification(text);
}
}
#else
void GLCanvas3D::_set_warning_texture(WarningTexture::Warning warning, bool state)
{
m_warning_texture.activate(warning, state, *this);
}
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
bool GLCanvas3D::_is_any_volume_outside() const
{
@ -6313,8 +6387,7 @@ void GLCanvas3D::_update_selection_from_hover()
{
bool ctrl_pressed = wxGetKeyState(WXK_CONTROL);
if (m_hover_volume_idxs.empty())
{
if (m_hover_volume_idxs.empty()) {
if (!ctrl_pressed && (m_rectangle_selection.get_state() == GLSelectionRectangle::Select))
m_selection.remove_all();
@ -6324,50 +6397,40 @@ void GLCanvas3D::_update_selection_from_hover()
GLSelectionRectangle::EState state = m_rectangle_selection.get_state();
bool hover_modifiers_only = true;
for (int i : m_hover_volume_idxs)
{
if (!m_volumes.volumes[i]->is_modifier)
{
for (int i : m_hover_volume_idxs) {
if (!m_volumes.volumes[i]->is_modifier) {
hover_modifiers_only = false;
break;
}
}
bool selection_changed = false;
if (state == GLSelectionRectangle::Select)
{
if (state == GLSelectionRectangle::Select) {
bool contains_all = true;
for (int i : m_hover_volume_idxs)
{
if (!m_selection.contains_volume((unsigned int)i))
{
for (int i : m_hover_volume_idxs) {
if (!m_selection.contains_volume((unsigned int)i)) {
contains_all = false;
break;
}
}
// the selection is going to be modified (Add)
if (!contains_all)
{
if (!contains_all) {
wxGetApp().plater()->take_snapshot(_(L("Selection-Add from rectangle")));
selection_changed = true;
}
}
else
{
else {
bool contains_any = false;
for (int i : m_hover_volume_idxs)
{
if (m_selection.contains_volume((unsigned int)i))
{
for (int i : m_hover_volume_idxs) {
if (m_selection.contains_volume((unsigned int)i)) {
contains_any = true;
break;
}
}
// the selection is going to be modified (Remove)
if (contains_any)
{
if (contains_any) {
wxGetApp().plater()->take_snapshot(_(L("Selection-Remove from rectangle")));
selection_changed = true;
}
@ -6381,12 +6444,9 @@ void GLCanvas3D::_update_selection_from_hover()
if ((state == GLSelectionRectangle::Select) && !ctrl_pressed)
m_selection.clear();
for (int i : m_hover_volume_idxs)
{
if (state == GLSelectionRectangle::Select)
{
if (hover_modifiers_only)
{
for (int i : m_hover_volume_idxs) {
if (state == GLSelectionRectangle::Select) {
if (hover_modifiers_only) {
const GLVolume& v = *m_volumes.volumes[i];
m_selection.add_volume(v.object_idx(), v.volume_idx(), v.instance_idx(), false);
}
@ -6409,13 +6469,11 @@ void GLCanvas3D::_update_selection_from_hover()
bool GLCanvas3D::_deactivate_undo_redo_toolbar_items()
{
if (m_undoredo_toolbar.is_item_pressed("undo"))
{
if (m_undoredo_toolbar.is_item_pressed("undo")) {
m_undoredo_toolbar.force_right_action(m_undoredo_toolbar.get_item_id("undo"), *this);
return true;
}
else if (m_undoredo_toolbar.is_item_pressed("redo"))
{
else if (m_undoredo_toolbar.is_item_pressed("redo")) {
m_undoredo_toolbar.force_right_action(m_undoredo_toolbar.get_item_id("redo"), *this);
return true;
}
@ -6440,8 +6498,7 @@ bool GLCanvas3D::_deactivate_arrange_menu()
bool GLCanvas3D::_deactivate_search_toolbar_item()
{
if (is_search_pressed())
{
if (is_search_pressed()) {
m_main_toolbar.force_left_action(m_main_toolbar.get_item_id("search"), *this);
return true;
}
@ -6451,8 +6508,7 @@ bool GLCanvas3D::_deactivate_search_toolbar_item()
bool GLCanvas3D::_activate_search_toolbar_item()
{
if (!m_main_toolbar.is_item_pressed("search"))
{
if (!m_main_toolbar.is_item_pressed("search")) {
m_main_toolbar.force_left_action(m_main_toolbar.get_item_id("search"), *this);
return true;
}
@ -6463,8 +6519,7 @@ bool GLCanvas3D::_activate_search_toolbar_item()
bool GLCanvas3D::_deactivate_collapse_toolbar_items()
{
GLToolbar& collapse_toolbar = wxGetApp().plater()->get_collapse_toolbar();
if (collapse_toolbar.is_item_pressed("print"))
{
if (collapse_toolbar.is_item_pressed("print")) {
collapse_toolbar.force_left_action(collapse_toolbar.get_item_id("print"), *this);
return true;
}

View File

@ -302,6 +302,15 @@ class GLCanvas3D
bool matches(double z) const { return this->z == z; }
};
#if ENABLE_WARNING_TEXTURE_REMOVAL
enum class EWarning {
ObjectOutside,
ToolpathOutside,
SlaSupportsOutside,
SomethingNotShown,
ObjectClashed
};
#else
class WarningTexture : public GUI::GLTexture
{
public:
@ -340,6 +349,7 @@ class GLCanvas3D
// Generates the texture with given text.
bool generate(const std::string& msg, const GLCanvas3D& canvas, bool compress, bool red_colored = false);
};
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
#if ENABLE_RENDER_STATISTICS
class RenderStats
@ -437,7 +447,9 @@ private:
std::unique_ptr<RetinaHelper> m_retina_helper;
#endif
bool m_in_render;
#if !ENABLE_WARNING_TEXTURE_REMOVAL
WarningTexture m_warning_texture;
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
wxTimer m_timer;
LayersEditing m_layers_editing;
Mouse m_mouse;
@ -578,10 +590,8 @@ public:
void bed_shape_changed();
void set_clipping_plane(unsigned int id, const ClippingPlane& plane)
{
if (id < 2)
{
void set_clipping_plane(unsigned int id, const ClippingPlane& plane) {
if (id < 2) {
m_clipping_planes[id] = plane;
m_sla_caps[id].reset();
}
@ -812,7 +822,9 @@ private:
#endif // ENABLE_RENDER_SELECTION_CENTER
void _check_and_update_toolbar_icon_scale() const;
void _render_overlays() const;
#if !ENABLE_WARNING_TEXTURE_REMOVAL
void _render_warning_texture() const;
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
void _render_volumes_for_picking() const;
void _render_current_gizmo() const;
void _render_gizmos_overlay() const;
@ -865,10 +877,17 @@ private:
void _load_sla_shells();
void _update_toolpath_volumes_outside_state();
void _update_sla_shells_outside_state();
#if ENABLE_WARNING_TEXTURE_REMOVAL
void _set_warning_notification_if_needed(EWarning warning);
// generates a warning notification containing the given message
void _set_warning_notification(EWarning warning, bool state);
#else
void _show_warning_texture_if_needed(WarningTexture::Warning warning);
// generates a warning texture containing the given message
void _set_warning_texture(WarningTexture::Warning warning, bool state);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
bool _is_any_volume_outside() const;

View File

@ -3720,7 +3720,7 @@ bool Plater::priv::warnings_dialog()
text += it.first.message;
}
//text += "\n\nDo you still wish to export?";
wxMessageDialog msg_wingow(this->q, text, wxString(SLIC3R_APP_NAME " ") + _L("generated warnings"), wxOK);
wxMessageDialog msg_wingow(this->q, from_u8(text), wxString(SLIC3R_APP_NAME " ") + _L("generated warnings"), wxOK);
const auto res = msg_wingow.ShowModal();
return res == wxID_OK;

View File

@ -388,9 +388,10 @@ void PreferencesDialog::accept()
app_config->set(it->first, it->second);
app_config->save();
wxGetApp().set_label_clr_sys(m_sys_colour->GetColour());
wxGetApp().set_label_clr_modified(m_mod_colour->GetColour());
if (wxGetApp().is_editor()) {
wxGetApp().set_label_clr_sys(m_sys_colour->GetColour());
wxGetApp().set_label_clr_modified(m_mod_colour->GetColour());
}
EndModal(wxID_OK);

View File

@ -201,9 +201,9 @@ void ModelNode::UpdateIcons()
{
// update icons for the colors, if any exists
if (!m_old_color.IsEmpty())
m_old_color_bmp = get_bitmap(m_toggle ? m_old_color : grey.c_str());
m_old_color_bmp = get_bitmap(m_toggle ? m_old_color : wxString::FromUTF8(grey.c_str()));
if (!m_new_color.IsEmpty())
m_new_color_bmp = get_bitmap(m_toggle ? m_new_color : grey.c_str());
m_new_color_bmp = get_bitmap(m_toggle ? m_new_color : wxString::FromUTF8(grey.c_str()));
// update main icon, if any exists
if (m_icon_name.empty())