diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index 6a1792bcf..4995bc953 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -1,7 +1,9 @@ min_slic3r_version = 2.6.0-alpha1 +1.6.0-alpha2 Added profile for Prusament PETG Carbon Fiber and Fiberthree F3 PA-GF30 Pro. Updated acceleration settings for Prusa MINI. 1.6.0-alpha1 Updated FW version notification. Decreased min layer time for PLA. 1.6.0-alpha0 Default top fill set to monotonic lines. Updated infill/perimeter overlap values. Updated output filename format. Enabled dynamic overhang speeds. min_slic3r_version = 2.5.0-alpha0 +1.5.7 Added filament profile for Prusament PETG Carbon Fiber and Fiberthree F3 PA-GF30 Pro. 1.5.6 Updated FW version notification (MK2.5/MK3 family). Added filament profile for Kimya PEBA-S. 1.5.5 Added new Prusament Resin material profiles. Enabled g-code thumbnails for MK2.5 family printers. 1.5.4 Added material profiles for Prusament Resin BioBased60. diff --git a/resources/profiles/PrusaResearch.ini b/resources/profiles/PrusaResearch.ini index 5928e7a73..450ff0e92 100644 --- a/resources/profiles/PrusaResearch.ini +++ b/resources/profiles/PrusaResearch.ini @@ -5,7 +5,7 @@ name = Prusa Research # Configuration version of this file. Config file will only be installed, if the config_version differs. # This means, the server may force the PrusaSlicer configuration to be downgraded. -config_version = 1.6.0-alpha1 +config_version = 1.6.0-alpha2 # Where to get the updates from? config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/PrusaResearch/ changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1% @@ -145,7 +145,6 @@ bridge_flow_ratio = 1 bridge_speed = 25 brim_width = 0 brim_separation = 0.1 -clip_multipart_objects = 1 compatible_printers = complete_objects = 0 default_acceleration = 1000 @@ -268,8 +267,10 @@ fill_pattern = grid travel_speed = 150 wipe_tower = 0 default_acceleration = 1000 -first_layer_acceleration = 800 -infill_acceleration = 1000 +first_layer_acceleration = 600 +infill_acceleration = 1500 +solid_infill_acceleration = 1500 +top_solid_infill_acceleration = 800 bridge_acceleration = 1000 support_material_speed = 40 max_print_speed = 150 @@ -373,7 +374,9 @@ fill_pattern = gyroid fill_density = 15% travel_speed = 150 perimeter_acceleration = 800 -infill_acceleration = 1000 +infill_acceleration = 1500 +solid_infill_acceleration = 1500 +top_solid_infill_acceleration = 800 bridge_acceleration = 1000 first_layer_acceleration = 800 default_acceleration = 1250 @@ -1283,6 +1286,10 @@ support_material_extrusion_width = 0.35 bridge_acceleration = 300 support_material_contact_distance = 0.1 raft_contact_distance = 0.1 +infill_acceleration = 1000 +solid_infill_acceleration = 1000 +top_solid_infill_acceleration = 800 +external_perimeter_acceleration = 300 [print:0.07mm ULTRADETAIL @MINI] inherits = *0.07mm*; *MINI* @@ -1298,6 +1305,10 @@ support_material_extrusion_width = 0.35 bridge_acceleration = 300 support_material_contact_distance = 0.1 raft_contact_distance = 0.1 +infill_acceleration = 1000 +solid_infill_acceleration = 1000 +top_solid_infill_acceleration = 800 +external_perimeter_acceleration = 300 [print:0.10mm DETAIL @MINI] inherits = *0.10mm*; *MINI* @@ -1314,6 +1325,11 @@ fill_pattern = gyroid fill_density = 15% perimeters = 3 support_material_xy_spacing = 60% +infill_acceleration = 1200 +solid_infill_acceleration = 1000 +top_solid_infill_acceleration = 800 +perimeter_acceleration = 700 +external_perimeter_acceleration = 600 [print:0.15mm QUALITY @MINI] inherits = *0.15mm*; *MINI* @@ -1326,6 +1342,8 @@ top_solid_infill_speed = 40 fill_pattern = gyroid fill_density = 15% support_material_xy_spacing = 60% +perimeter_acceleration = 900 +external_perimeter_acceleration = 800 [print:0.15mm SPEED @MINI] inherits = *0.15mm*; *MINI* @@ -1336,6 +1354,8 @@ infill_speed = 140 solid_infill_speed = 140 top_solid_infill_speed = 40 support_material_xy_spacing = 60% +perimeter_acceleration = 1000 +external_perimeter_acceleration = 800 [print:0.20mm QUALITY @MINI] inherits = *0.20mm*; *MINI* @@ -1348,6 +1368,8 @@ top_solid_infill_speed = 40 fill_pattern = gyroid fill_density = 15% support_material_xy_spacing = 60% +perimeter_acceleration = 900 +external_perimeter_acceleration = 800 [print:0.20mm SPEED @MINI] inherits = *0.20mm*; *MINI* @@ -1359,6 +1381,8 @@ max_print_speed = 150 solid_infill_speed = 140 top_solid_infill_speed = 40 support_material_xy_spacing = 60% +perimeter_acceleration = 1000 +external_perimeter_acceleration = 800 [print:0.25mm DRAFT @MINI] inherits = *0.25mm*; *MINI* @@ -1378,6 +1402,8 @@ top_infill_extrusion_width = 0.4 support_material_xy_spacing = 60% support_material_contact_distance = 0.2 raft_contact_distance = 0.2 +perimeter_acceleration = 1000 +external_perimeter_acceleration = 800 # MINI - 0.25mm nozzle @@ -1389,6 +1415,10 @@ fill_density = 20% support_material_speed = 30 support_material_contact_distance = 0.07 raft_contact_distance = 0.07 +infill_acceleration = 1000 +solid_infill_acceleration = 1000 +top_solid_infill_acceleration = 800 +external_perimeter_acceleration = 300 [print:0.07mm ULTRADETAIL @0.25 nozzle MINI] inherits = *0.07mm*; *0.25nozzle*; *MINI* @@ -1401,6 +1431,10 @@ fill_pattern = grid fill_density = 20% support_material_contact_distance = 0.07 raft_contact_distance = 0.07 +infill_acceleration = 1000 +solid_infill_acceleration = 1000 +top_solid_infill_acceleration = 800 +external_perimeter_acceleration = 300 [print:0.10mm DETAIL @0.25 nozzle MINI] inherits = *0.10mm*; *0.25nozzleMINI*; *MINI* @@ -1409,6 +1443,10 @@ fill_pattern = grid fill_density = 20% support_material_contact_distance = 0.07 raft_contact_distance = 0.07 +infill_acceleration = 1200 +solid_infill_acceleration = 1000 +top_solid_infill_acceleration = 800 +external_perimeter_acceleration = 500 [print:0.15mm QUALITY @0.25 nozzle MINI] inherits = *0.15mm*; *0.25nozzleMINI*; *MINI* @@ -1421,6 +1459,10 @@ perimeter_extrusion_width = 0.27 external_perimeter_extrusion_width = 0.27 infill_extrusion_width = 0.27 solid_infill_extrusion_width = 0.27 +infill_acceleration = 1500 +solid_infill_acceleration = 1000 +top_solid_infill_acceleration = 800 +external_perimeter_acceleration = 500 # MINI - 0.6mm nozzle @@ -1433,11 +1475,17 @@ max_print_speed = 100 perimeter_speed = 45 solid_infill_speed = 70 top_solid_infill_speed = 45 -infill_extrusion_width = 0.65 -solid_infill_extrusion_width = 0.65 +perimeter_extrusion_width = 0.6 +external_perimeter_extrusion_width = 0.6 +infill_extrusion_width = 0.6 +solid_infill_extrusion_width = 0.6 +top_infill_extrusion_width = 0.5 support_material_contact_distance = 0.22 raft_contact_distance = 0.22 bridge_flow_ratio = 1 +top_solid_infill_acceleration = 800 +perimeter_acceleration = 900 +external_perimeter_acceleration = 800 [print:0.20mm DETAIL @0.6 nozzle MINI] inherits = *0.20mm*; *0.6nozzleMINI* @@ -1448,11 +1496,16 @@ max_print_speed = 100 perimeter_speed = 45 solid_infill_speed = 70 top_solid_infill_speed = 45 -infill_extrusion_width = 0.65 -solid_infill_extrusion_width = 0.65 +perimeter_extrusion_width = 0.6 +external_perimeter_extrusion_width = 0.6 +infill_extrusion_width = 0.6 +solid_infill_extrusion_width = 0.6 +top_infill_extrusion_width = 0.5 support_material_contact_distance = 0.22 raft_contact_distance = 0.22 bridge_flow_ratio = 1 +perimeter_acceleration = 900 +external_perimeter_acceleration = 800 [print:0.30mm QUALITY @0.6 nozzle MINI] inherits = *0.30mm*; *0.6nozzleMINI* @@ -1465,9 +1518,12 @@ solid_infill_speed = 65 top_solid_infill_speed = 45 external_perimeter_extrusion_width = 0.68 perimeter_extrusion_width = 0.68 +top_infill_extrusion_width = 0.55 support_material_contact_distance = 0.25 raft_contact_distance = 0.25 bridge_flow_ratio = 1 +perimeter_acceleration = 900 +external_perimeter_acceleration = 800 [print:0.35mm SPEED @0.6 nozzle MINI] inherits = *0.35mm*; *0.6nozzleMINI* @@ -1483,6 +1539,8 @@ perimeter_extrusion_width = 0.68 support_material_contact_distance = 0.25 raft_contact_distance = 0.25 bridge_flow_ratio = 0.95 +perimeter_acceleration = 1000 +external_perimeter_acceleration = 800 [print:0.40mm DRAFT @0.6 nozzle MINI] inherits = *0.40mm*; *0.6nozzleMINI* @@ -1500,6 +1558,8 @@ solid_infill_extrusion_width = 0.68 support_material_contact_distance = 0.25 raft_contact_distance = 0.25 bridge_flow_ratio = 0.95 +perimeter_acceleration = 1000 +external_perimeter_acceleration = 800 # MINI - 0.8mm nozzle @@ -1508,13 +1568,17 @@ inherits = 0.30mm DETAIL @0.8 nozzle compatible_printers_condition = printer_model=="MINI" and nozzle_diameter[0]==0.8 perimeter_speed = 35 external_perimeter_speed = 25 -infill_acceleration = 1000 infill_speed = 50 max_print_speed = 80 solid_infill_speed = 45 top_solid_infill_speed = 35 support_material_speed = 40 travel_speed = 150 +infill_acceleration = 1500 +solid_infill_acceleration = 1500 +top_solid_infill_acceleration = 800 +perimeter_acceleration = 900 +external_perimeter_acceleration = 800 [print:0.40mm QUALITY @0.8 nozzle MINI] inherits = 0.40mm QUALITY @0.8 nozzle @@ -1525,11 +1589,15 @@ solid_infill_speed = 40 top_solid_infill_speed = 30 support_material_speed = 40 travel_speed = 150 +infill_acceleration = 1500 +solid_infill_acceleration = 1500 +top_solid_infill_acceleration = 800 +perimeter_acceleration = 1000 +external_perimeter_acceleration = 800 [print:0.55mm DRAFT @0.8 nozzle MINI] inherits = 0.55mm DRAFT @0.8 nozzle compatible_printers_condition = printer_model=="MINI" and nozzle_diameter[0]==0.8 -infill_acceleration = 1000 infill_speed = 40 solid_infill_speed = 40 support_material_speed = 35 @@ -1539,6 +1607,11 @@ top_solid_infill_speed = 28 external_perimeter_extrusion_width = 1 perimeter_extrusion_width = 1 travel_speed = 150 +infill_acceleration = 1500 +solid_infill_acceleration = 1500 +top_solid_infill_acceleration = 800 +perimeter_acceleration = 1000 +external_perimeter_acceleration = 800 # XXXXXXxxXXXXXXXXXXXXXX # XXX--- filament ---XXX @@ -3865,6 +3938,17 @@ filament_spool_weight = 201 filament_type = PETG compatible_printers_condition = nozzle_diameter[0]!=0.8 and nozzle_diameter[0]!=0.6 and printer_model!="MK2SMM" and printer_model!="MINI" and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material) +[filament:Prusament PETG Carbon Fiber] +inherits = Prusament PETG +filament_vendor = Prusa Polymers +first_layer_temperature = 260 +temperature = 265 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_density = 1.27 +filament_colour = #BBBBBB +compatible_printers_condition = nozzle_diameter[0]>=0.4 and nozzle_diameter[0]!=0.8 and nozzle_diameter[0]!=0.6 and printer_model!="MK2SMM" and printer_model!="MINI" and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material) + [filament:Prusa PETG @0.6 nozzle] inherits = *PET06* renamed_from = "Prusa PET 0.6 nozzle"; "Prusa PETG 0.6 nozzle" @@ -3883,6 +3967,14 @@ filament_density = 1.27 filament_spool_weight = 201 filament_type = PETG +[filament:Prusament PETG Carbon Fiber @0.6 nozzle] +inherits = Prusament PETG @0.6 nozzle +first_layer_temperature = 260 +temperature = 265 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_colour = #BBBBBB + [filament:Filament PM PETG @0.6 nozzle] inherits = *PET06* renamed_from = "Plasty Mladec PETG @0.6 nozzle" @@ -3976,6 +4068,14 @@ filament_cost = 36.29 filament_density = 1.27 filament_spool_weight = 201 +[filament:Prusament PETG Carbon Fiber @MMU2] +inherits = Prusament PETG @MMU2 +first_layer_temperature = 260 +temperature = 260 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_colour = #BBBBBB + [filament:Generic PETG @MMU2 0.6 nozzle] inherits = *PET MMU2 06* renamed_from = "Generic PET MMU2 0.6 nozzle"; "Generic PETG MMU2 0.6 nozzle" @@ -3995,6 +4095,14 @@ filament_cost = 36.29 filament_density = 1.27 filament_spool_weight = 201 +[filament:Prusament PETG Carbon Fiber @MMU2 0.6 nozzle] +inherits = Prusament PETG @MMU2 0.6 nozzle +first_layer_temperature = 260 +temperature = 260 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_colour = #BBBBBB + [filament:Filament PM PETG @MMU2 0.6 nozzle] inherits = *PET MMU2 06* renamed_from = "Plasty Mladec PETG @MMU2 0.6 nozzle" @@ -4079,6 +4187,87 @@ bed_temperature = 30 filament_retract_length = 0 extrusion_multiplier = 1.16 +[filament:Print With Smile PLA] +inherits = *PLA* +filament_vendor = Print With Smile +filament_cost = 535 +filament_density = 1.24 +filament_spool_weight = 0 +filament_colour = #FFFF6F +filament_max_volumetric_speed = 15 +first_layer_temperature = 205 +temperature = 205 + +[filament:Print With Smile PETG] +inherits = *PET* +filament_vendor = Print With Smile +filament_cost = 590 +filament_density = 1.27 +filament_spool_weight = 0 +filament_colour = #4D9398 +filament_max_volumetric_speed = 8 +temperature = 245 +first_layer_bed_temperature = 85 +first_layer_temperature = 240 +bed_temperature = 90 + +[filament:Print With Smile PETG @MINI] +inherits = Print With Smile PETG; *PETMINI* + +[filament:Print With Smile ASA] +inherits = Ultrafuse ASA +filament_vendor = Print With Smile +filament_cost = 625 +first_layer_temperature = 250 +temperature = 250 +first_layer_bed_temperature = 105 +bed_temperature = 110 +filament_type = ASA +max_fan_speed = 40 +bridge_fan_speed = 70 +filament_max_volumetric_speed = 11 + +[filament:Print With Smile ABS] +inherits = *ABSC* +filament_vendor = Print With Smile +filament_cost = 535 +filament_density = 1.08 +first_layer_temperature = 240 +temperature = 240 + +[filament:Print With Smile PETG CF] +inherits = Extrudr XPETG CF +filament_vendor = Print With Smile +filament_cost = 899 +filament_density = 1.29 +filament_notes = +first_layer_temperature = 260 +temperature = 260 +first_layer_bed_temperature = 85 +bed_temperature = 85 +max_fan_speed = 55 +bridge_fan_speed = 60 +filament_max_volumetric_speed = 5 + +[filament:Print With Smile PETG CF @MINI] +inherits = Print With Smile PETG CF; *PETMINI* + +[filament:Print With Smile TPU96A] +inherits = *FLEX* +filament_vendor = Print With Smile +filament_cost = 1200 +filament_density = 1.31 +extrusion_multiplier = 1.1 +filament_max_volumetric_speed = 1.35 +fan_always_on = 1 +cooling = 0 +max_fan_speed = 60 +min_fan_speed = 60 +disable_fan_first_layers = 4 +full_fan_speed_layer = 6 +filament_retract_length = 1.2 +filament_deretract_speed = 20 + [filament:Fiberlogy Easy PLA] inherits = *PLA* renamed_from = Fiberlogy PLA @@ -4680,6 +4869,23 @@ fan_always_on = 1 max_fan_speed = 15 min_fan_speed = 15 +[filament:Fiberthree F3 PA-GF30 Pro] +inherits = Prusament PC Blend Carbon Fiber +filament_vendor = Fiberthree +filament_cost = 208.01 +filament_density = 1.35 +extrusion_multiplier = 1.03 +first_layer_temperature = 275 +temperature = 285 +first_layer_bed_temperature = 90 +bed_temperature = 90 +fan_below_layer_time = 10 +compatible_printers_condition = printer_model!="MINI" and ! single_extruder_multi_material +max_fan_speed = 15 +min_fan_speed = 15 +filament_type = PA +filament_max_volumetric_speed = 6 + [filament:Taulman T-Glase] inherits = *PET* filament_vendor = Taulman @@ -4889,6 +5095,13 @@ renamed_from = "Prusa PET MMU1"; "Prusa PETG MMU1" [filament:Prusament PETG @MMU1] inherits = Prusament PETG; *PETMMU1* +[filament:Prusament PETG Carbon Fiber @MMU1] +inherits = Prusament PETG @MMU1 +first_layer_temperature = 260 +temperature = 265 +filament_cost = 54.99 +filament_colour = #BBBBBB + [filament:Taulman T-Glase @MMU1] inherits = Taulman T-Glase; *PETMMU1* start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode" @@ -5016,6 +5229,19 @@ fan_always_on = 1 max_fan_speed = 15 min_fan_speed = 15 +[filament:Fiberthree F3 PA-GF30 Pro @MINI] +inherits = Fiberthree F3 PA-GF30 Pro +filament_vendor = Fiberthree +first_layer_temperature = 275 +temperature = 280 +compatible_printers_condition = nozzle_diameter[0]>=0.4 and printer_model=="MINI" +filament_retract_length = nil +filament_retract_speed = nil +filament_retract_lift = nil +filament_retract_before_travel = nil +filament_wipe = nil +filament_type = PA + [filament:Kimya ABS Carbon @MINI] inherits = Kimya ABS Carbon; *ABSMINI* filament_max_volumetric_speed = 6 @@ -5043,6 +5269,15 @@ inherits = Verbatim ABS; *ABSMINI* inherits = Prusament PETG; *PETMINI* compatible_printers_condition = printer_model=="MINI" and nozzle_diameter[0]!=0.8 and nozzle_diameter[0]!=0.6 +[filament:Prusament PETG Carbon Fiber @MINI] +inherits = Prusament PETG @MINI +first_layer_temperature = 260 +temperature = 265 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_colour = #BBBBBB +compatible_printers_condition = printer_model=="MINI" and nozzle_diameter[0]>=0.4 and nozzle_diameter[0]!=0.8 and nozzle_diameter[0]!=0.6 + [filament:Kimya PETG Carbon @MINI] inherits = Kimya PETG Carbon; *PETMINI* filament_max_volumetric_speed = 6 @@ -5053,6 +5288,14 @@ compatible_printers_condition = nozzle_diameter[0]>=0.4 and printer_model=="MINI [filament:Prusament PETG @0.6 nozzle MINI] inherits = Prusament PETG; *PETMINI06* +[filament:Prusament PETG Carbon Fiber @0.6 nozzle MINI] +inherits = Prusament PETG @0.6 nozzle MINI +first_layer_temperature = 260 +temperature = 265 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_colour = #BBBBBB + [filament:Generic PETG @0.6 nozzle MINI] inherits = Generic PETG; *PETMINI06* renamed_from = "Generic PET 0.6 nozzle MINI"; "Generic PETG 0.6 nozzle MINI" @@ -5358,6 +5601,14 @@ filament_retract_lift = 0.2 slowdown_below_layer_time = 20 compatible_printers_condition = nozzle_diameter[0]==0.8 and printer_model!="MK2SMM" and printer_model!="MINI" and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material) +[filament:Prusament PETG Carbon Fiber @0.8 nozzle] +inherits = Prusament PETG @0.8 nozzle +first_layer_temperature = 265 +temperature = 270 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_colour = #BBBBBB + [filament:Prusament ASA @0.8 nozzle] inherits = Prusament ASA first_layer_temperature = 265 @@ -5437,6 +5688,14 @@ temperature = 240 slowdown_below_layer_time = 20 filament_ramming_parameters = "120 140 5.51613 5.6129 5.70968 5.77419 5.77419 5.74194 5.80645 5.93548 6.06452 6.19355 6.3871 6.74194 7.25806 7.87097 8.54839 9.22581 10 10.8387| 0.05 5.5032 0.45 5.63868 0.95 5.8 1.45 5.7839 1.95 6.02257 2.45 6.25811 2.95 7.08395 3.45 8.43875 3.95 9.92258 4.45 11.3419 4.95 7.6" +[filament:Prusament PETG Carbon Fiber @MMU2 0.8 nozzle] +inherits = Prusament PETG @MMU2 0.8 nozzle +first_layer_temperature = 265 +temperature = 270 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_colour = #BBBBBB + [filament:Generic PLA @MMU2 0.8 nozzle] inherits = Generic PLA @MMU2 compatible_printers_condition = nozzle_diameter[0]==0.8 and printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material @@ -5520,6 +5779,14 @@ filament_retract_lift = 0.25 slowdown_below_layer_time = 20 compatible_printers_condition = nozzle_diameter[0]==0.8 and printer_model=="MINI" +[filament:Prusament PETG Carbon Fiber @0.8 nozzle MINI] +inherits = Prusament PETG @0.8 nozzle MINI +first_layer_temperature = 265 +temperature = 270 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_colour = #BBBBBB + [filament:Prusament ASA @0.8 nozzle MINI] inherits = Prusament ASA @MINI first_layer_temperature = 265 @@ -10039,7 +10306,7 @@ default_filament_profile = "Prusament PLA" default_print_profile = 0.15mm QUALITY @MINI gcode_flavor = marlin2 machine_max_acceleration_e = 5000 -machine_max_acceleration_extruding = 1250 +machine_max_acceleration_extruding = 2000 machine_max_acceleration_retracting = 1250 machine_max_acceleration_travel = 2500 machine_max_acceleration_x = 2500 diff --git a/resources/profiles/Templates.idx b/resources/profiles/Templates.idx index 3edb4400f..297aeb1fe 100644 --- a/resources/profiles/Templates.idx +++ b/resources/profiles/Templates.idx @@ -1,2 +1,3 @@ min_slic3r_version = 2.6.0-alpha0 +1.0.1 Added Prusament PETG Carbon Fiber, Fiberthree F3 PA-GF30 Pro. 1.0.0 Initial diff --git a/resources/profiles/Templates.ini b/resources/profiles/Templates.ini index 26b0c0f12..cf7b8ebe8 100644 --- a/resources/profiles/Templates.ini +++ b/resources/profiles/Templates.ini @@ -2,14 +2,12 @@ [vendor] name = Templates -config_version = 1.0.0 +config_version = 1.0.1 config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Templates/ templates_profile = 1 ## Generic filament profiles -# Print profiles for the Prusa Research printers. - [filament:*common*] cooling = 1 compatible_printers = @@ -1547,6 +1545,16 @@ filament_density = 1.27 filament_spool_weight = 201 filament_type = PETG +[filament:Prusament PETG Carbon Fiber] +inherits = Prusament PETG +filament_vendor = Prusa Polymers +first_layer_temperature = 260 +temperature = 265 +extrusion_multiplier = 1.03 +filament_cost = 54.99 +filament_density = 1.27 +filament_colour = #BBBBBB + [filament:Prusa PLA] inherits = *PLA* filament_vendor = Made for Prusa @@ -2055,6 +2063,21 @@ fan_always_on = 1 max_fan_speed = 15 min_fan_speed = 15 +[filament:Fiberthree F3 PA-GF30 Pro] +inherits = Prusament PC Blend Carbon Fiber +filament_vendor = Fiberthree +filament_cost = 208.01 +filament_density = 1.35 +extrusion_multiplier = 1.03 +first_layer_temperature = 275 +temperature = 285 +first_layer_bed_temperature = 90 +bed_temperature = 90 +fan_below_layer_time = 10 +max_fan_speed = 15 +min_fan_speed = 15 +filament_type = PA + [filament:Taulman T-Glase] inherits = *PET* filament_vendor = Taulman diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 7088a158d..28c331313 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1,3 +1,4 @@ +#include "Config.hpp" #include "libslic3r.h" #include "GCode/ExtrusionProcessor.hpp" #include "I18N.hpp" @@ -24,6 +25,7 @@ #include #include #include +#include #include #include @@ -2867,16 +2869,36 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de ); } - bool variable_speed = false; + bool variable_speed_or_fan_speed = false; std::vector new_points{}; - if (this->m_config.enable_dynamic_overhang_speeds && !this->on_first_layer() && path.role().is_perimeter()) { + if ((this->m_config.enable_dynamic_overhang_speeds || this->config().enable_dynamic_fan_speeds.get_at(m_writer.extruder()->id())) && + !this->on_first_layer() && path.role().is_perimeter()) { + std::vector> overhangs_with_speeds = {{100, ConfigOptionFloatOrPercent{speed, false}}}; + if (this->m_config.enable_dynamic_overhang_speeds) { + overhangs_with_speeds = {{0, m_config.overhang_speed_0}, + {25, m_config.overhang_speed_1}, + {50, m_config.overhang_speed_2}, + {75, m_config.overhang_speed_3}, + {100, ConfigOptionFloatOrPercent{speed, false}}}; + } + + std::vector> overhang_w_fan_speeds = {{100, ConfigOptionInts{0}}}; + if (this->m_config.enable_dynamic_fan_speeds.get_at(m_writer.extruder()->id())) { + overhang_w_fan_speeds = {{0, m_config.overhang_fan_speed_0}, + {25, m_config.overhang_fan_speed_1}, + {50, m_config.overhang_fan_speed_2}, + {75, m_config.overhang_fan_speed_3}, + {100, ConfigOptionInts{0}}}; + } + double external_perim_reference_speed = std::min(m_config.get_abs_value("external_perimeter_speed"), std::min(EXTRUDER_CONFIG(filament_max_volumetric_speed) / path.mm3_per_mm, m_config.max_volumetric_speed.value / path.mm3_per_mm)); - new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, m_config.overhang_overlap_levels, - m_config.dynamic_overhang_speeds, - external_perim_reference_speed, speed); - variable_speed = std::any_of(new_points.begin(), new_points.end(), [speed](const ProcessedPoint &p) { return p.speed != speed; }); + new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, overhangs_with_speeds, overhang_w_fan_speeds, + m_writer.extruder()->id(), external_perim_reference_speed, + speed); + variable_speed_or_fan_speed = std::any_of(new_points.begin(), new_points.end(), + [speed](const ProcessedPoint &p) { return p.speed != speed || p.fan_speed != 0; }); } double F = speed * 60; // convert mm/sec to mm/min @@ -2932,7 +2954,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de std::string cooling_marker_setspeed_comments; if (m_enable_cooling_markers) { - if (path.role().is_bridge()) + if (path.role().is_bridge() && + (!path.role().is_perimeter() || !this->config().enable_dynamic_fan_speeds.get_at(m_writer.extruder()->id()))) gcode += ";_BRIDGE_FAN_START\n"; else cooling_marker_setspeed_comments = ";_EXTRUDE_SET_SPEED"; @@ -2940,7 +2963,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de cooling_marker_setspeed_comments += ";_EXTERNAL_PERIMETER"; } - if (!variable_speed) { + if (!variable_speed_or_fan_speed) { // F is mm per minute. gcode += m_writer.set_speed(F, "", cooling_marker_setspeed_comments); double path_length = 0.; @@ -2965,21 +2988,28 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de marked_comment = description; marked_comment += description_bridge; } - double last_set_speed = new_points[0].speed * 60.0; + double last_set_speed = new_points[0].speed * 60.0; + double last_set_fan_speed = new_points[0].fan_speed; gcode += m_writer.set_speed(last_set_speed, "", cooling_marker_setspeed_comments); + gcode += ";_SET_FAN_SPEED" + std::to_string(int(last_set_fan_speed)) + "\n"; Vec2d prev = this->point_to_gcode_quantized(new_points[0].p); for (size_t i = 1; i < new_points.size(); i++) { - const ProcessedPoint& processed_point = new_points[i]; - Vec2d p = this->point_to_gcode_quantized(processed_point.p); - const double line_length = (p - prev).norm(); + const ProcessedPoint &processed_point = new_points[i]; + Vec2d p = this->point_to_gcode_quantized(processed_point.p); + const double line_length = (p - prev).norm(); gcode += m_writer.extrude_to_xy(p, e_per_mm * line_length, marked_comment); - prev = p; + prev = p; double new_speed = processed_point.speed * 60.0; if (last_set_speed != new_speed) { gcode += m_writer.set_speed(new_speed, "", cooling_marker_setspeed_comments); last_set_speed = new_speed; } + if (last_set_fan_speed != processed_point.fan_speed) { + last_set_fan_speed = processed_point.fan_speed; + gcode += ";_SET_FAN_SPEED" + std::to_string(int(last_set_fan_speed)) + "\n"; + } } + gcode += ";_RESET_FAN_SPEED\n"; } if (m_enable_cooling_markers) diff --git a/src/libslic3r/GCode/CoolingBuffer.cpp b/src/libslic3r/GCode/CoolingBuffer.cpp index fb2d12a68..5e521f3c1 100644 --- a/src/libslic3r/GCode/CoolingBuffer.cpp +++ b/src/libslic3r/GCode/CoolingBuffer.cpp @@ -1,5 +1,6 @@ #include "../GCode.hpp" #include "CoolingBuffer.hpp" +#include #include #include #include @@ -59,6 +60,9 @@ struct CoolingLine // Would be TYPE_ADJUSTABLE, but the block of G-code lines has zero extrusion length, thus the block // cannot have its speed adjusted. This should not happen (sic!). TYPE_ADJUSTABLE_EMPTY = 1 << 12, + // Custom fan speed (introduced for overhang fan speed) + TYPE_SET_FAN_SPEED = 1 << 13, + TYPE_RESET_FAN_SPEED = 1 << 14, }; CoolingLine(unsigned int type, size_t line_start, size_t line_end) : @@ -88,6 +92,8 @@ struct CoolingLine float time; // Maximum duration of this segment. float time_max; + // Requested fan speed + int fan_speed; // If marked with the "slowdown" flag, the line has been slowed down. bool slowdown; }; @@ -497,7 +503,18 @@ std::vector CoolingBuffer::parse_layer_gcode(const std:: } else line.time = 0; line.time_max = line.time; + } else if (boost::contains(sline, ";_SET_FAN_SPEED")) { + auto speed_start = sline.find_last_of('D'); + int speed = 0; + for (char num : sline.substr(speed_start + 1)) { + speed = speed * 10 + (num - '0'); + } + line.type = CoolingLine::TYPE_SET_FAN_SPEED; + line.fan_speed = speed; + } else if (boost::contains(sline, ";_RESET_FAN_SPEED")) { + line.type = CoolingLine::TYPE_RESET_FAN_SPEED; } + if (line.type != 0) adjustment->lines.emplace_back(std::move(line)); } @@ -730,10 +747,11 @@ std::string CoolingBuffer::apply_layer_cooldown( new_gcode.reserve(gcode.size() * 2); bool bridge_fan_control = false; int bridge_fan_speed = 0; - auto change_extruder_set_fan = [ this, layer_id, layer_time, &new_gcode, &bridge_fan_control, &bridge_fan_speed ]() { + auto change_extruder_set_fan = [this, layer_id, layer_time, &new_gcode, &bridge_fan_control, &bridge_fan_speed]() { #define EXTRUDER_CONFIG(OPT) m_config.OPT.get_at(m_current_extruder) int min_fan_speed = EXTRUDER_CONFIG(min_fan_speed); int fan_speed_new = EXTRUDER_CONFIG(fan_always_on) ? min_fan_speed : 0; + std::pair custom_fan_speed_limits{fan_speed_new, 100 }; int disable_fan_first_layers = EXTRUDER_CONFIG(disable_fan_first_layers); // Is the fan speed ramp enabled? int full_fan_speed_layer = EXTRUDER_CONFIG(full_fan_speed_layer); @@ -750,11 +768,13 @@ std::string CoolingBuffer::apply_layer_cooldown( if (layer_time < slowdown_below_layer_time) { // Layer time very short. Enable the fan to a full throttle. fan_speed_new = max_fan_speed; + custom_fan_speed_limits.first = fan_speed_new; } else if (layer_time < fan_below_layer_time) { // Layer time quite short. Enable the fan proportionally according to the current layer time. assert(layer_time >= slowdown_below_layer_time); double t = (layer_time - slowdown_below_layer_time) / (fan_below_layer_time - slowdown_below_layer_time); fan_speed_new = int(floor(t * min_fan_speed + (1. - t) * max_fan_speed) + 0.5); + custom_fan_speed_limits.first = fan_speed_new; } } bridge_fan_speed = EXTRUDER_CONFIG(bridge_fan_speed); @@ -763,6 +783,7 @@ std::string CoolingBuffer::apply_layer_cooldown( float factor = float(int(layer_id + 1) - disable_fan_first_layers) / float(full_fan_speed_layer - disable_fan_first_layers); fan_speed_new = std::clamp(int(float(fan_speed_new) * factor + 0.5f), 0, 255); bridge_fan_speed = std::clamp(int(float(bridge_fan_speed) * factor + 0.5f), 0, 255); + custom_fan_speed_limits.second = fan_speed_new; } #undef EXTRUDER_CONFIG bridge_fan_control = bridge_fan_speed > fan_speed_new; @@ -775,11 +796,12 @@ std::string CoolingBuffer::apply_layer_cooldown( m_fan_speed = fan_speed_new; new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_config.gcode_comments, m_fan_speed); } + return custom_fan_speed_limits; }; const char *pos = gcode.c_str(); int current_feedrate = 0; - change_extruder_set_fan(); + std::pair fan_speed_limits = change_extruder_set_fan(); for (const CoolingLine *line : lines) { const char *line_start = gcode.c_str() + line->line_start; const char *line_end = gcode.c_str() + line->line_end; @@ -790,9 +812,17 @@ std::string CoolingBuffer::apply_layer_cooldown( auto res = std::from_chars(line_start + m_toolchange_prefix.size(), line_end, new_extruder); if (res.ec != std::errc::invalid_argument && new_extruder != m_current_extruder) { m_current_extruder = new_extruder; - change_extruder_set_fan(); + fan_speed_limits = change_extruder_set_fan(); } new_gcode.append(line_start, line_end - line_start); + } else if (line->type & CoolingLine::TYPE_SET_FAN_SPEED) { + int new_speed = std::clamp(line->fan_speed, fan_speed_limits.first, fan_speed_limits.second); + if (m_fan_speed != new_speed) { + new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_config.gcode_comments, new_speed); + m_fan_speed = new_speed; + } + } else if (line->type & CoolingLine::TYPE_RESET_FAN_SPEED){ + fan_speed_limits = change_extruder_set_fan(); } else if (line->type & CoolingLine::TYPE_BRIDGE_FAN_START) { if (bridge_fan_control) new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_config.gcode_comments, bridge_fan_speed); diff --git a/src/libslic3r/GCode/ExtrusionProcessor.hpp b/src/libslic3r/GCode/ExtrusionProcessor.hpp index 7ce7a77f6..1b1748827 100644 --- a/src/libslic3r/GCode/ExtrusionProcessor.hpp +++ b/src/libslic3r/GCode/ExtrusionProcessor.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -238,6 +239,7 @@ struct ProcessedPoint { Point p; float speed = 1.0f; + int fan_speed = 0; }; class ExtrusionQualityEstimator @@ -257,34 +259,27 @@ public: next_layer_boundaries[object] = AABBTreeLines::LinesDistancer{to_unscaled_linesf(layer->lslices)}; } - std::vector estimate_extrusion_quality(const ExtrusionPath &path, - const ConfigOptionPercents &overlaps, - const ConfigOptionFloatsOrPercents &speeds, - float ext_perimeter_speed, - float original_speed) + std::vector estimate_extrusion_quality(const ExtrusionPath &path, + const std::vector> overhangs_w_speeds, + const std::vector> overhangs_w_fan_speeds, + size_t extruder_id, + float ext_perimeter_speed, + float original_speed) { - size_t speed_sections_count = std::min(overlaps.values.size(), speeds.values.size()); - float speed_base = ext_perimeter_speed > 0 ? ext_perimeter_speed : original_speed; - std::vector> speed_sections; - for (size_t i = 0; i < speed_sections_count; i++) { - float distance = path.width * (1.0 - (overlaps.get_at(i) / 100.0)); - float speed = speeds.get_at(i).percent ? (speed_base * speeds.get_at(i).value / 100.0) : speeds.get_at(i).value; - speed_sections.push_back({distance, speed}); + float speed_base = ext_perimeter_speed > 0 ? ext_perimeter_speed : original_speed; + std::map speed_sections; + for (size_t i = 0; i < overhangs_w_speeds.size(); i++) { + float distance = path.width * (1.0 - (overhangs_w_speeds[i].first / 100.0)); + float speed = overhangs_w_speeds[i].second.percent ? (speed_base * overhangs_w_speeds[i].second.value / 100.0) : + overhangs_w_speeds[i].second.value; + speed_sections[distance] = speed; } - std::sort(speed_sections.begin(), speed_sections.end(), - [](const std::pair &a, const std::pair &b) { - if (a.first == b.first) { - return a.second > b.second; - } - return a.first < b.first; }); - std::pair last_section{INFINITY, 0}; - for (auto §ion : speed_sections) { - if (section.first == last_section.first) { - section.second = last_section.second; - } else { - last_section = section; - } + std::map fan_speed_sections; + for (size_t i = 0; i < overhangs_w_fan_speeds.size(); i++) { + float distance = path.width * (1.0 - (overhangs_w_fan_speeds[i].first / 100.0)); + float fan_speed = overhangs_w_fan_speeds[i].second.get_at(extruder_id); + fan_speed_sections[distance] = fan_speed; } std::vector extended_points = @@ -296,28 +291,26 @@ public: const ExtendedPoint &curr = extended_points[i]; const ExtendedPoint &next = extended_points[i + 1 < extended_points.size() ? i + 1 : i]; - auto calculate_speed = [&speed_sections, &original_speed](float distance) { - float final_speed; - if (distance <= speed_sections.front().first) { - final_speed = original_speed; - } else if (distance >= speed_sections.back().first) { - final_speed = speed_sections.back().second; - } else { - size_t section_idx = 0; - while (distance > speed_sections[section_idx + 1].first) { - section_idx++; - } - float t = (distance - speed_sections[section_idx].first) / - (speed_sections[section_idx + 1].first - speed_sections[section_idx].first); - t = std::clamp(t, 0.0f, 1.0f); - final_speed = (1.0f - t) * speed_sections[section_idx].second + t * speed_sections[section_idx + 1].second; + auto interpolate_speed = [](const std::map &values, float distance) { + auto upper_dist = values.lower_bound(distance); + if (upper_dist == values.end()) { + return values.rbegin()->second; } - return final_speed; + if (upper_dist == values.begin()) { + return upper_dist->second; + } + + auto lower_dist = std::prev(upper_dist); + float t = (distance - lower_dist->first) / (upper_dist->first - lower_dist->first); + return (1.0f - t) * lower_dist->second + t * upper_dist->second; }; - float extrusion_speed = std::min(calculate_speed(curr.distance), calculate_speed(next.distance)); + float extrusion_speed = std::min(interpolate_speed(speed_sections, curr.distance), + interpolate_speed(speed_sections, next.distance)); + float fan_speed = std::min(interpolate_speed(fan_speed_sections, curr.distance), + interpolate_speed(fan_speed_sections, next.distance)); - processed_points.push_back({scaled(curr.position), extrusion_speed}); + processed_points.push_back({scaled(curr.position), extrusion_speed, int(fan_speed)}); } return processed_points; } diff --git a/src/libslic3r/Geometry.cpp b/src/libslic3r/Geometry.cpp index 4b2454848..2cc34be0e 100644 --- a/src/libslic3r/Geometry.cpp +++ b/src/libslic3r/Geometry.cpp @@ -860,14 +860,26 @@ TransformationSVD::TransformationSVD(const Transform3d& trafo) rotation_90_degrees = true; for (int i = 0; i < 3; ++i) { const Vec3d row = v.row(i).cwiseAbs(); - size_t num_zeros = is_approx(row[0], 0.) + is_approx(row[1], 0.) + is_approx(row[2], 0.); - size_t num_ones = is_approx(row[0], 1.) + is_approx(row[1], 1.) + is_approx(row[2], 1.); + const size_t num_zeros = is_approx(row[0], 0.) + is_approx(row[1], 0.) + is_approx(row[2], 0.); + const size_t num_ones = is_approx(row[0], 1.) + is_approx(row[1], 1.) + is_approx(row[2], 1.); if (num_zeros != 2 || num_ones != 1) { rotation_90_degrees = false; break; } } - skew = ! rotation_90_degrees; + // Detect skew by brute force: check if the axes are still orthogonal after transformation + const Matrix3d trafo_linear = trafo.linear(); + const std::array axes = { Vec3d::UnitX(), Vec3d::UnitY(), Vec3d::UnitZ() }; + std::array transformed_axes; + for (int i = 0; i < 3; ++i) { + transformed_axes[i] = trafo_linear * axes[i]; + } + skew = std::abs(transformed_axes[0].dot(transformed_axes[1])) > EPSILON || + std::abs(transformed_axes[1].dot(transformed_axes[2])) > EPSILON || + std::abs(transformed_axes[2].dot(transformed_axes[0])) > EPSILON; + + // This following old code does not work under all conditions. The v matrix can become non diagonal (see SPE-1492) +// skew = ! rotation_90_degrees; } else skew = false; } diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index eebb4d54f..e2fb57b17 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -440,7 +440,7 @@ static std::vector s_Preset_print_options { "fuzzy_skin", "fuzzy_skin_thickness", "fuzzy_skin_point_dist", "max_volumetric_extrusion_rate_slope_positive", "max_volumetric_extrusion_rate_slope_negative", "perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "infill_speed", "solid_infill_speed", - "enable_dynamic_overhang_speeds", "dynamic_overhang_speeds", "overhang_overlap_levels", + "enable_dynamic_overhang_speeds", "overhang_speed_0", "overhang_speed_1", "overhang_speed_2", "overhang_speed_3", "top_solid_infill_speed", "support_material_speed", "support_material_xy_spacing", "support_material_interface_speed", "bridge_speed", "gap_fill_speed", "gap_fill_enabled", "travel_speed", "travel_speed_z", "first_layer_speed", "first_layer_speed_over_raft", "perimeter_acceleration", "infill_acceleration", "external_perimeter_acceleration", "top_solid_infill_acceleration", "solid_infill_acceleration", @@ -473,7 +473,8 @@ static std::vector s_Preset_filament_options { "filament_cooling_initial_speed", "filament_cooling_final_speed", "filament_ramming_parameters", "filament_minimal_purge_on_wipe_tower", "temperature", "idle_temperature", "first_layer_temperature", "bed_temperature", "first_layer_bed_temperature", "fan_always_on", "cooling", "min_fan_speed", "max_fan_speed", "bridge_fan_speed", "disable_fan_first_layers", "full_fan_speed_layer", "fan_below_layer_time", "slowdown_below_layer_time", "min_print_speed", - "start_filament_gcode", "end_filament_gcode", + "start_filament_gcode", "end_filament_gcode", "enable_dynamic_fan_speeds", + "overhang_fan_speed_0", "overhang_fan_speed_1", "overhang_fan_speed_2", "overhang_fan_speed_3", // Retract overrides "filament_retract_length", "filament_retract_lift", "filament_retract_lift_above", "filament_retract_lift_below", "filament_retract_speed", "filament_deretract_speed", "filament_retract_restart_extra", "filament_retract_before_travel", "filament_retract_layer_change", "filament_wipe", "filament_retract_before_wipe", @@ -879,7 +880,7 @@ std::pair PresetCollection::load_external_preset( // Insert a new profile. Preset &preset = this->load_preset(path, new_name, std::move(cfg), select == LoadAndSelect::Always); preset.is_external = true; - if (&this->get_selected_preset() == &preset) + if (this->m_idx_selected != size_t(-1) && &this->get_selected_preset() == &preset) this->get_edited_preset().is_external = true; return std::make_pair(&preset, false); diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 3c810b178..8d3ad0066 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -66,6 +66,11 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "between_objects_gcode", "bridge_acceleration", "bridge_fan_speed", + "enable_dynamic_fan_speeds", + "overhang_fan_speed_0", + "overhang_fan_speed_1", + "overhang_fan_speed_2", + "overhang_fan_speed_3", "colorprint_heights", "cooling", "default_acceleration", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 878acc10a..3425cfd7a 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -535,35 +535,96 @@ void PrintConfigDef::init_fff_params() def->label = L("Enable dynamic overhang speeds"); def->category = L("Speed"); def->tooltip = L("This setting enables dynamic speed control on overhangs."); - def->mode = comAdvanced; + def->mode = comExpert; def->set_default_value(new ConfigOptionBool(false)); - def = this->add("overhang_overlap_levels", coPercents); - def->full_label = L("Overhang overlap levels"); - def->category = L("Speed"); - def->tooltip = L("Controls overhang levels, expressed as a percentage of overlap of the extrusion with the previous layer - " - "100% represents full overlap - no overhang is present, while 0% represents full overhang (floating extrusion). " - "Each overhang level then corresponds with the overhang speed below. Speeds for overhang levels in between are " - "calculated via linear interpolation." - "If you set multiple different speeds for the same overhang level, only the largest speed is used. " - ); - def->sidetext = L("%"); - def->min = 0; - def->max = 100; - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionPercents({60, 40, 20, 0})); + auto overhang_speed_setting_description = L("Overhang size is expressed as a percentage of overlap of the extrusion with the previous layer: " + "100% would be full overlap (no overhang), while 0% represents full overhang (floating extrusion, bridge). " + "Speeds for overhang sizes in between are calculated via linear interpolation. " + "If set as percentage, the speed is calculated over the external perimeter speed."); - def = this->add("dynamic_overhang_speeds", coFloatsOrPercents); - def->full_label = L("Dynamic speed on overhangs"); + def = this->add("overhang_speed_0", coFloatOrPercent); + def->label = L("speed for 0\% overlap (bridge)"); def->category = L("Speed"); - def->tooltip = L("This setting controls the speed on the overhang with the overlap value set above. " - "The speed of the extrusion is calculated as a linear interpolation of the speeds for higher and lower overlap. " - "If set as percentage, the speed is calculated over the external perimeter speed." - ); + def->tooltip = overhang_speed_setting_description; def->sidetext = L("mm/s or %"); def->min = 0; - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionFloatsOrPercents({{25, false}, {20, false}, {15, false}, {15, false}})); + def->mode = comExpert; + def->set_default_value(new ConfigOptionFloatOrPercent(15, false)); + + def = this->add("overhang_speed_1", coFloatOrPercent); + def->label = L("speed for 25\% overlap"); + def->category = L("Speed"); + def->tooltip = overhang_speed_setting_description; + def->sidetext = L("mm/s or %"); + def->min = 0; + def->mode = comExpert; + def->set_default_value(new ConfigOptionFloatOrPercent(15, false)); + + def = this->add("overhang_speed_2", coFloatOrPercent); + def->label = L("speed for 50\% overlap"); + def->category = L("Speed"); + def->tooltip = overhang_speed_setting_description; + def->sidetext = L("mm/s or %"); + def->min = 0; + def->mode = comExpert; + def->set_default_value(new ConfigOptionFloatOrPercent(20, false)); + + def = this->add("overhang_speed_3", coFloatOrPercent); + def->label = L("speed for 75\% overlap"); + def->category = L("Speed"); + def->tooltip = overhang_speed_setting_description; + def->sidetext = L("mm/s or %"); + def->min = 0; + def->mode = comExpert; + def->set_default_value(new ConfigOptionFloatOrPercent(25, false)); + + def = this->add("enable_dynamic_fan_speeds", coBools); + def->label = L("Enable dynamic fan speeds"); + def->tooltip = L("This setting enables dynamic fan speed control on overhangs."); + def->mode = comExpert; + def->set_default_value(new ConfigOptionBools{false}); + + auto fan_speed_setting_description = L( + "Overhang size is expressed as a percentage of overlap of the extrusion with the previous layer: " + "100% would be full overlap (no overhang), while 0% represents full overhang (floating extrusion, bridge). " + "Fan speeds for overhang sizes in between are calculated via linear interpolation. "); + + def = this->add("overhang_fan_speed_0", coInts); + def->label = L("speed for 0\% overlap (bridge)"); + def->tooltip = fan_speed_setting_description; + def->sidetext = L("%"); + def->min = 0; + def->max = 100; + def->mode = comExpert; + def->set_default_value(new ConfigOptionInts{0}); + + def = this->add("overhang_fan_speed_1", coInts); + def->label = L("speed for 25\% overlap"); + def->tooltip = fan_speed_setting_description; + def->sidetext = L("%"); + def->min = 0; + def->max = 100; + def->mode = comExpert; + def->set_default_value(new ConfigOptionInts{0}); + + def = this->add("overhang_fan_speed_2", coInts); + def->label = L("speed for 50\% overlap"); + def->tooltip = fan_speed_setting_description; + def->sidetext = L("%"); + def->min = 0; + def->max = 100; + def->mode = comExpert; + def->set_default_value(new ConfigOptionInts{0}); + + def = this->add("overhang_fan_speed_3", coInts); + def->label = L("speed for 75\% overlap"); + def->tooltip = fan_speed_setting_description; + def->sidetext = L("%"); + def->min = 0; + def->max = 100; + def->mode = comExpert; + def->set_default_value(new ConfigOptionInts{0}); def = this->add("brim_width", coFloat); def->label = L("Brim width"); @@ -3270,9 +3331,6 @@ void PrintConfigDef::init_sla_support_params(const std::string &prefix) { ConfigOptionDef* def; - constexpr const char * pretext_unavailable = L("Unavailable for this method.\n"); - std::string pretext; - def = this->add(prefix + "support_head_front_diameter", coFloat); def->label = L("Pinhead front diameter"); def->category = L("Supports"); @@ -3322,13 +3380,9 @@ void PrintConfigDef::init_sla_support_params(const std::string &prefix) def->mode = comExpert; def->set_default_value(new ConfigOptionPercent(50)); - pretext = ""; - if (prefix == "branching") - pretext = pretext_unavailable; - def = this->add(prefix + "support_max_bridges_on_pillar", coInt); def->label = L("Max bridges on a pillar"); - def->tooltip = pretext + L( + def->tooltip = L( "Maximum number of bridges that can be placed on a pillar. Bridges " "hold support point pinheads and connect to pillars as small branches."); def->min = 0; @@ -3336,14 +3390,10 @@ void PrintConfigDef::init_sla_support_params(const std::string &prefix) def->mode = comExpert; def->set_default_value(new ConfigOptionInt(prefix == "branching" ? 2 : 3)); - pretext = ""; - if (prefix.empty()) - pretext = pretext_unavailable; - def = this->add(prefix + "support_max_weight_on_model", coFloat); def->label = L("Max weight on model"); def->category = L("Supports"); - def->tooltip = pretext + L( + def->tooltip = L( "Maximum weight of sub-trees that terminate on the model instead of the print bed. The weight is the sum of the lenghts of all " "branches emanating from the endpoint."); def->sidetext = L("mm"); @@ -3351,13 +3401,9 @@ void PrintConfigDef::init_sla_support_params(const std::string &prefix) def->mode = comExpert; def->set_default_value(new ConfigOptionFloat(10.)); - pretext = ""; - if (prefix == "branching") - pretext = pretext_unavailable; - def = this->add(prefix + "support_pillar_connection_mode", coEnum); def->label = L("Pillar connection mode"); - def->tooltip = pretext + L("Controls the bridge type between two neighboring pillars." + def->tooltip = L("Controls the bridge type between two neighboring pillars." " Can be zig-zag, cross (double zig-zag) or dynamic which" " will automatically switch between the first two depending" " on the distance of the two pillars."); @@ -3378,11 +3424,7 @@ void PrintConfigDef::init_sla_support_params(const std::string &prefix) def->label = L("Pillar widening factor"); def->category = L("Supports"); - pretext = ""; - if (prefix.empty()) - pretext = pretext_unavailable; - - def->tooltip = pretext + + def->tooltip = L("Merging bridges or pillars into another pillars can " "increase the radius. Zero means no increase, one means " "full increase. The exact amount of increase is unspecified and can " @@ -3449,14 +3491,10 @@ void PrintConfigDef::init_sla_support_params(const std::string &prefix) def->set_default_value(new ConfigOptionFloat(default_val)); - pretext = ""; - if (prefix == "branching") - pretext = pretext_unavailable; - def = this->add(prefix + "support_max_pillar_link_distance", coFloat); def->label = L("Max pillar linking distance"); def->category = L("Supports"); - def->tooltip = pretext + L("The max distance of two pillars to get linked with each other." + def->tooltip = L("The max distance of two pillars to get linked with each other." " A zero value will prohibit pillar cascading."); def->sidetext = L("mm"); def->min = 0; // 0 means no linking diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index b89957149..dde60bee4 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -573,8 +573,10 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloatOrPercent, external_perimeter_extrusion_width)) ((ConfigOptionFloatOrPercent, external_perimeter_speed)) ((ConfigOptionBool, enable_dynamic_overhang_speeds)) - ((ConfigOptionPercents, overhang_overlap_levels)) - ((ConfigOptionFloatsOrPercents, dynamic_overhang_speeds)) + ((ConfigOptionFloatOrPercent, overhang_speed_0)) + ((ConfigOptionFloatOrPercent, overhang_speed_1)) + ((ConfigOptionFloatOrPercent, overhang_speed_2)) + ((ConfigOptionFloatOrPercent, overhang_speed_3)) ((ConfigOptionBool, external_perimeters_first)) ((ConfigOptionBool, extra_perimeters)) ((ConfigOptionBool, extra_perimeters_on_overhangs)) @@ -747,6 +749,11 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionInts, bed_temperature)) ((ConfigOptionFloat, bridge_acceleration)) ((ConfigOptionInts, bridge_fan_speed)) + ((ConfigOptionBools, enable_dynamic_fan_speeds)) + ((ConfigOptionInts, overhang_fan_speed_0)) + ((ConfigOptionInts, overhang_fan_speed_1)) + ((ConfigOptionInts, overhang_fan_speed_2)) + ((ConfigOptionInts, overhang_fan_speed_3)) ((ConfigOptionBool, complete_objects)) ((ConfigOptionFloats, colorprint_heights)) ((ConfigOptionBools, cooling)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 65deb8261..0589b2859 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -766,8 +766,10 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "support_material_interface_speed" || opt_key == "bridge_speed" || opt_key == "enable_dynamic_overhang_speeds" - || opt_key == "overhang_overlap_levels" - || opt_key == "dynamic_overhang_speeds" + || opt_key == "overhang_speed_0" + || opt_key == "overhang_speed_1" + || opt_key == "overhang_speed_2" + || opt_key == "overhang_speed_3" || opt_key == "external_perimeter_speed" || opt_key == "infill_speed" || opt_key == "perimeter_speed" diff --git a/src/libslic3r/SLA/SupportTreeUtilsLegacy.hpp b/src/libslic3r/SLA/SupportTreeUtilsLegacy.hpp index b504d82fb..f8e2f3024 100644 --- a/src/libslic3r/SLA/SupportTreeUtilsLegacy.hpp +++ b/src/libslic3r/SLA/SupportTreeUtilsLegacy.hpp @@ -141,6 +141,7 @@ std::pair create_ground_pillar( if (head_id >= 0) builder.head(head_id).bridge_id = br.id; endp = diffbr->endp; radius = diffbr->end_r; + end_radius = diffbr->end_r; builder.add_junction(endp, radius); non_head = true; dir = diffbr->get_dir(); diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 120aeecf3..9a0cf3881 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -221,12 +221,11 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config) bool have_perimeters = config->opt_int("perimeters") > 0; for (auto el : { "extra_perimeters","extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "thin_walls", "overhangs", "seam_position","staggered_inner_seams", "external_perimeters_first", "external_perimeter_extrusion_width", - "perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "enable_dynamic_overhang_speeds", "overhang_overlap_levels", "dynamic_overhang_speeds" }) + "perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "enable_dynamic_overhang_speeds"}) toggle_field(el, have_perimeters); for (size_t i = 0; i < 4; i++) { - toggle_field("overhang_overlap_levels#" + std::to_string(i), config->opt_bool("enable_dynamic_overhang_speeds")); - toggle_field("dynamic_overhang_speeds#" + std::to_string(i), config->opt_bool("enable_dynamic_overhang_speeds")); + toggle_field("overhang_speed_" + std::to_string(i), config->opt_bool("enable_dynamic_overhang_speeds")); } bool have_infill = config->option("fill_density")->value > 0; diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 13a9e6e07..ffd5a6bc3 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -175,24 +175,20 @@ void Field::on_back_to_sys_value() wxString Field::get_tooltip_text(const wxString& default_string) { - wxString tooltip_text(""); - wxString tooltip = _(m_opt.tooltip); - edit_tooltip(tooltip); + if (m_opt.tooltip.empty()) + return ""; std::string opt_id = m_opt_id; - auto hash_pos = opt_id.find("#"); + auto hash_pos = opt_id.find('#'); if (hash_pos != std::string::npos) { opt_id.replace(hash_pos, 1,"["); opt_id += "]"; } - if (tooltip.length() > 0) - tooltip_text = tooltip + "\n" + _(L("default value")) + "\t: " + + return from_u8(m_opt.tooltip) + "\n" + _L("default value") + "\t: " + (boost::iends_with(opt_id, "_gcode") ? "\n" : "") + default_string + (boost::iends_with(opt_id, "_gcode") ? "" : "\n") + - _(L("parameter name")) + "\t: " + opt_id; - - return tooltip_text; + _L("parameter name") + "\t: " + opt_id; } bool Field::is_matched(const std::string& string, const std::string& pattern) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index d459c87de..d0967d3db 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3746,12 +3746,22 @@ void GLCanvas3D::do_reset_skew(const std::string& snapshot_type) if (!snapshot_type.empty()) wxGetApp().plater()->take_snapshot(_(snapshot_type)); + // stores current min_z of instances + std::map, double> min_zs; + if (!snapshot_type.empty()) { + for (int i = 0; i < static_cast(m_model->objects.size()); ++i) { + const ModelObject* obj = m_model->objects[i]; + for (int j = 0; j < static_cast(obj->instances.size()); ++j) { + min_zs[{ i, j }] = obj->instance_bounding_box(j).min.z(); + } + } + } + std::set> done; // keeps track of modified instances - const Selection::IndicesList& idxs = m_selection.get_volume_idxs(); + Selection::EMode selection_mode = m_selection.get_mode(); - for (unsigned int id : idxs) { - const GLVolume* v = m_volumes.volumes[id]; + for (const GLVolume* v : m_volumes.volumes) { int object_idx = v->object_idx(); if (object_idx < 0 || (int)m_model->objects.size() <= object_idx) continue; @@ -3761,14 +3771,30 @@ void GLCanvas3D::do_reset_skew(const std::string& snapshot_type) done.insert(std::pair(object_idx, instance_idx)); + // Mirror instances/volumes ModelObject* model_object = m_model->objects[object_idx]; if (model_object != nullptr) { - model_object->instances[instance_idx]->set_transformation(v->get_instance_transformation()); - model_object->volumes[volume_idx]->set_transformation(v->get_volume_transformation()); + if (selection_mode == Selection::Instance) + model_object->instances[instance_idx]->set_transformation(v->get_instance_transformation()); + else if (selection_mode == Selection::Volume) + model_object->volumes[volume_idx]->set_transformation(v->get_volume_transformation()); model_object->invalidate_bounding_box(); } } + // Fixes sinking/flying instances + for (const std::pair& i : done) { + ModelObject* m = m_model->objects[i.first]; + double shift_z = m->get_instance_min_z(i.second); + // leave sinking instances as sinking + if (min_zs.empty() || min_zs.find({ i.first, i.second })->second >= SINKING_Z_THRESHOLD || shift_z > SINKING_Z_THRESHOLD) { + Vec3d shift(0.0, 0.0, -shift_z); + m_selection.translate(i.first, i.second, shift); + m->translate_instance(i.second, shift); + } + wxGetApp().obj_list()->update_info_items(static_cast(i.first)); + } + post_event(SimpleEvent(EVT_GLCANVAS_RESET_SKEW)); m_dirty = true; @@ -4990,8 +5016,10 @@ void GLCanvas3D::_refresh_if_shown_on_screen() // frequently enough, we call render() here directly when we can. render(); assert(m_initialized); - if (requires_reload_scene) - reload_scene(true); + if (requires_reload_scene) { + if (wxGetApp().plater()->is_view3D_shown()) + reload_scene(true); + } } } diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 520f67aed..0c4953e3a 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -480,6 +480,8 @@ static const FileWildcards file_wildcards_by_type[FT_SIZE] = { /* FT_TEX */ { "Texture"sv, { ".png"sv, ".svg"sv } }, /* FT_SL1 */ { "Masked SLA files"sv, { ".sl1"sv, ".sl1s"sv, ".pwmx"sv } }, + + /* FT_ZIP */ { "Zip files"sv, { ".zip"sv } }, }; #if ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR @@ -885,13 +887,9 @@ wxGLContext* GUI_App::init_glcontext(wxGLCanvas& canvas) bool GUI_App::init_opengl() { -#ifdef __linux__ bool status = m_opengl_mgr.init_gl(); m_opengl_initialized = true; return status; -#else - return m_opengl_mgr.init_gl(); -#endif } // gets path to PrusaSlicer.ini, returns semver from first line comment @@ -1368,12 +1366,15 @@ bool GUI_App::on_init_inner() // An ugly solution to GH #5537 in which GUI_App::init_opengl (normally called from events wxEVT_PAINT // and wxEVT_SET_FOCUS before GUI_App::post_init is called) wasn't called before GUI_App::post_init and OpenGL wasn't initialized. -#ifdef __linux__ - if (! m_post_initialized && m_opengl_initialized) { + // Since issue #9774 Where same problem occured on MacOS Ventura, we decided to have this check on MacOS as well. + +#if defined(__linux__) || defined(__APPLE__) + if (!m_post_initialized && m_opengl_initialized) { #else - if (! m_post_initialized) { + if (!m_post_initialized) { #endif m_post_initialized = true; + #ifdef WIN32 this->mainframe->register_win32_callbacks(); #endif @@ -1977,6 +1978,17 @@ void GUI_App::import_model(wxWindow *parent, wxArrayString& input_files) const dialog.GetPaths(input_files); } +void GUI_App::import_zip(wxWindow* parent, wxString& input_file) const +{ + wxFileDialog dialog(parent ? parent : GetTopWindow(), + _L("Choose ZIP file:"), + from_u8(app_config->get_last_dir()), "", + file_wildcards(FT_ZIP), wxFD_OPEN | wxFD_FILE_MUST_EXIST); + + if (dialog.ShowModal() == wxID_OK) + input_file = dialog.GetPath(); +} + void GUI_App::load_gcode(wxWindow* parent, wxString& input_file) const { input_file.Clear(); diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 3f8d47fd7..51900a9b6 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -73,6 +73,8 @@ enum FileType FT_SL1, + FT_ZIP, + FT_SIZE, }; @@ -125,9 +127,7 @@ private: bool m_last_app_conf_lower_version{ false }; EAppMode m_app_mode{ EAppMode::Editor }; bool m_is_recreating_gui{ false }; -#ifdef __linux__ bool m_opengl_initialized{ false }; -#endif wxColour m_color_label_modified; wxColour m_color_label_sys; @@ -252,6 +252,7 @@ public: void keyboard_shortcuts(); void load_project(wxWindow *parent, wxString& input_file) const; void import_model(wxWindow *parent, wxArrayString& input_files) const; + void import_zip(wxWindow* parent, wxString& input_file) const; void load_gcode(wxWindow* parent, wxString& input_file) const; static bool catch_error(std::function cb, const std::string& err); diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index 6d4c916f1..c16d77751 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -446,7 +446,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : m_reset_rotation_button->Bind(wxEVT_BUTTON, [this](wxCommandEvent& e) { GLCanvas3D* canvas = wxGetApp().plater()->canvas3D(); Selection& selection = canvas->get_selection(); - + selection.setup_cache(); #if ENABLE_WORLD_COORDINATE if (selection.is_single_volume_or_modifier()) { GLVolume* vol = const_cast(selection.get_first_volume()); @@ -468,9 +468,11 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : else return; - // Update rotation at the GLVolumes. - selection.synchronize_unselected_instances(Selection::SyncRotationType::GENERAL); + // Synchronize instances/volumes. + + selection.synchronize_unselected_instances(Selection::SyncRotationType::RESET); selection.synchronize_unselected_volumes(); + // Copy rotation values from GLVolumes into Model (ModelInstance / ModelVolume), trigger background processing. canvas->do_rotate(L("Reset Rotation")); @@ -490,6 +492,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : #if ENABLE_WORLD_COORDINATE GLCanvas3D* canvas = wxGetApp().plater()->canvas3D(); Selection& selection = canvas->get_selection(); + selection.setup_cache(); if (selection.is_single_volume_or_modifier()) { GLVolume* vol = const_cast(selection.get_first_volume()); Geometry::Transformation trafo = vol->get_volume_transformation(); @@ -506,6 +509,10 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : else return; + // Synchronize instances/volumes. + selection.synchronize_unselected_instances(Selection::SyncRotationType::GENERAL); + selection.synchronize_unselected_volumes(); + canvas->do_scale(L("Reset scale")); UpdateAndShow(true); #else @@ -750,7 +757,7 @@ void ObjectManipulation::update_settings_value(const Selection& selection) m_new_rotation = volume->get_instance_rotation() * (180.0 / M_PI); m_new_size = volume->get_instance_scaling_factor().cwiseProduct(wxGetApp().model().objects[volume->object_idx()]->raw_mesh_bounding_box().size()); #endif // ENABLE_WORLD_COORDINATE - m_new_scale = volume->get_instance_scaling_factor() * 100.0; + m_new_scale = m_new_size.cwiseQuotient(selection.get_full_unscaled_instance_local_bounding_box().size()) * 100.0; } m_new_enabled = true; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp index a522f5533..7ce8376ba 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp @@ -996,6 +996,8 @@ void GLGizmoCut3D::update_raycasters_for_picking_transform() const Vec3d& instance_offset = mo->instances[inst_id]->get_offset(); const double sla_shift = double(m_c->selection_info()->get_sla_shift()); + const bool looking_forward = is_looking_forward(); + for (size_t i = 0; i < connectors.size(); ++i) { const CutConnector& connector = connectors[i]; @@ -1004,9 +1006,8 @@ void GLGizmoCut3D::update_raycasters_for_picking_transform() Vec3d pos = connector.pos + instance_offset; if (connector.attribs.type == CutConnectorType::Dowel && connector.attribs.style == CutConnectorStyle::Prism) { - if (is_looking_forward()) - pos -= static_cast(height - 0.05f) * m_clp_normal; - else + height = 0.05f; + if (!looking_forward) pos += 0.05 * m_clp_normal; } pos[Z] += sla_shift; @@ -2065,6 +2066,8 @@ void GLGizmoCut3D::render_connectors() m_has_invalid_connector = false; m_info_stats.invalidate(); + const bool looking_forward = is_looking_forward(); + for (size_t i = 0; i < connectors.size(); ++i) { const CutConnector& connector = connectors[i]; @@ -2093,20 +2096,19 @@ void GLGizmoCut3D::render_connectors() if (connector.attribs.type == CutConnectorType::Dowel && connector.attribs.style == CutConnectorStyle::Prism) { if (m_connectors_editing) { - if (is_looking_forward()) - pos -= static_cast(height-0.05f) * m_clp_normal; - else + height = 0.05f; + if (!looking_forward) pos += 0.05 * m_clp_normal; } else { - if (is_looking_forward()) + if (looking_forward) pos -= static_cast(height) * m_clp_normal; else pos += static_cast(height) * m_clp_normal; height *= 2; } } - else if (!is_looking_forward()) + else if (!looking_forward) pos += 0.05 * m_clp_normal; const Transform3d view_model_matrix = camera.get_view_matrix() * translation_transform(pos) * m_rotation_m * diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index 71374de23..0210de3b5 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -885,7 +885,7 @@ void GLGizmoEmboss::on_set_state() priv::get_volume(m_parent.get_selection().get_model()->objects, m_volume_id) == nullptr ) { // reopen gizmo when new object is created GLGizmoBase::m_state = GLGizmoBase::Off; - if (wxGetApp().get_mode() == comSimple) + if (wxGetApp().get_mode() == comSimple || wxGetApp().obj_list()->has_selected_cut_object()) // It's impossible to add a part in simple mode return; // start creating new object diff --git a/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp b/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp index f7951f97c..345d733af 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp @@ -238,13 +238,7 @@ void GLGizmoRotate::init_data_from_selection(const Selection& selection) selection.get_bounding_box_in_reference_system(ECoordinatesType::Local) : selection.get_bounding_box_in_current_reference_system(); m_bounding_box = box; m_center = box_trafo.translation(); - m_orient_matrix = Geometry::translation_transform(m_center); - if (!wxGetApp().obj_manipul()->is_world_coordinates() || m_force_local_coordinate) { - const GLVolume& v = *selection.get_first_volume(); - m_orient_matrix = m_orient_matrix * v.get_instance_transformation().get_rotation_matrix(); - if (selection.is_single_volume_or_modifier() && wxGetApp().obj_manipul()->is_local_coordinates() || m_force_local_coordinate) - m_orient_matrix = m_orient_matrix * v.get_volume_transformation().get_rotation_matrix(); - } + m_orient_matrix = box_trafo; m_radius = Offset + m_bounding_box.radius(); m_snap_coarse_in_radius = m_radius / 3.0f; diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index b656f056a..ab82c1033 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -1293,6 +1293,10 @@ void MainFrame::init_menubar_as_editor() [this](wxCommandEvent&) { if (m_plater) m_plater->import_sl1_archive(); }, "import_plater", nullptr, [this](){return m_plater != nullptr && m_plater->get_ui_job_worker().is_idle(); }, this); + append_menu_item(import_menu, wxID_ANY, _L("Import ZIP Achive") + dots, _L("Load a zip achive"), + [this](wxCommandEvent&) { if (m_plater) m_plater->import_zip_archive(); }, "import_plater", nullptr, + [this]() {return m_plater != nullptr; }, this); + import_menu->AppendSeparator(); append_menu_item(import_menu, wxID_ANY, _L("Import &Config") + dots + "\tCtrl+L", _L("Load exported configuration file"), [this](wxCommandEvent&) { load_config_file(); }, "import_config", nullptr, diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 688570f90..e567ac7c6 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -118,6 +118,20 @@ OptionsGroup::OptionsGroup( wxWindow* _parent, const wxString& title, { } +Option::Option(const ConfigOptionDef& _opt, t_config_option_key id) : opt(_opt), opt_id(id) +{ + if (!opt.tooltip.empty()) { + wxString tooltip; + if (opt.opt_key.rfind("branching", 0) == 0) + tooltip = _L("Unavailable for this method.") + "\n"; + tooltip += _(opt.tooltip); + + edit_tooltip(tooltip); + + opt.tooltip = into_u8(tooltip); + } +} + void Line::clear() { if (near_label_widget_win) @@ -517,9 +531,8 @@ void OptionsGroup::clear(bool destroy_custom_ctrl) Line OptionsGroup::create_single_option_line(const Option& option, const std::string& path/* = std::string()*/) const { - wxString tooltip = _(option.opt.tooltip); - edit_tooltip(tooltip); - Line retval{ _(option.opt.label), tooltip }; + Line retval{ _(option.opt.label), from_u8(option.opt.tooltip) }; + retval.label_path = path; retval.append_option(option); return retval; diff --git a/src/slic3r/GUI/OptionsGroup.hpp b/src/slic3r/GUI/OptionsGroup.hpp index 88d0ff8bf..f754505dd 100644 --- a/src/slic3r/GUI/OptionsGroup.hpp +++ b/src/slic3r/GUI/OptionsGroup.hpp @@ -47,8 +47,7 @@ struct Option { return (rhs.opt_id == this->opt_id); } - Option(const ConfigOptionDef& _opt, t_config_option_key id) : - opt(_opt), opt_id(id) {} + Option(const ConfigOptionDef& _opt, t_config_option_key id); }; using t_option = std::unique_ptr