diff --git a/cura/Arrange.py b/cura/Arrange.py index 148661c45b..2ab407205c 100755 --- a/cura/Arrange.py +++ b/cura/Arrange.py @@ -2,6 +2,7 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Logger import Logger from UM.Math.Vector import Vector from cura.ShapeArray import ShapeArray +from cura import ZOffsetDecorator from collections import namedtuple @@ -67,12 +68,19 @@ class Arrange: offset_shape_arr, start_prio = start_prio, step = step) x, y = best_spot.x, best_spot.y start_prio = best_spot.priority + # Ensure that the object is above the build platform + new_node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator) + if new_node.getBoundingBox(): + center_y = new_node.getWorldPosition().y - new_node.getBoundingBox().bottom + else: + center_y = 0 + if x is not None: # We could find a place - new_node.setPosition(Vector(x, 0, y)) - self.place(x, y, hull_shape_arr) # take place before the next one + new_node.setPosition(Vector(x, center_y, y)) + self.place(x, y, hull_shape_arr) # place the object in arranger else: Logger.log("d", "Could not find spot!") - new_node.setPosition(Vector(200, 0, 100 - i * 20)) + new_node.setPosition(Vector(200, center_y, 100 - i * 20)) nodes.append(new_node) return nodes diff --git a/cura/ArrangeObjectsJob.py b/cura/ArrangeObjectsJob.py index 746914ea6a..17bc9b0333 100755 --- a/cura/ArrangeObjectsJob.py +++ b/cura/ArrangeObjectsJob.py @@ -5,6 +5,7 @@ from UM.Job import Job from UM.Scene.SceneNode import SceneNode from UM.Math.Vector import Vector from UM.Operations.SetTransformOperation import SetTransformOperation +from UM.Operations.TranslateOperation import TranslateOperation from UM.Operations.GroupedOperation import GroupedOperation from UM.Logger import Logger from UM.Message import Message @@ -66,10 +67,10 @@ class ArrangeObjectsJob(Job): arranger.place(x, y, hull_shape_arr) # take place before the next one - grouped_operation.addOperation(SetTransformOperation(node, Vector(x, center_y, y))) + grouped_operation.addOperation(TranslateOperation(node, Vector(x, center_y, y), set_position = True)) else: Logger.log("d", "Arrange all: could not find spot!") - grouped_operation.addOperation(SetTransformOperation(node, Vector(200, center_y, - idx * 20))) + grouped_operation.addOperation(TranslateOperation(node, Vector(200, center_y, - idx * 20), set_position = True)) status_message.setProgress((idx + 1) / len(nodes_arr) * 100) Job.yieldThread() diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 0ca4550d7f..ab756d133e 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -208,7 +208,7 @@ class BuildVolume(SceneNode): # Mark the node as outside the build volume if the bounding box test fails. if build_volume_bounding_box.intersectsBox(bbox) != AxisAlignedBox.IntersectionResult.FullIntersection: node._outside_buildarea = True - break + continue convex_hull = node.callDecoration("getConvexHull") if convex_hull: @@ -220,7 +220,7 @@ class BuildVolume(SceneNode): if overlap is None: continue node._outside_buildarea = True - break + continue # Group nodes should override the _outside_buildarea property of their children. for group_node in group_nodes: diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index a4aea5ecb8..7c58f2bb66 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -816,10 +816,10 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): return # Stop trying to zip, abort was called. if self._use_gzip: + batched_line += line # if the gcode was read from a gcode file, self._gcode will be a list of all lines in that file. # Compressing line by line in this case is extremely slow, so we need to batch them. if len(batched_line) < max_chars_per_line: - batched_line += line continue byte_array_file_data += _compress_data_and_notify_qt(batched_line) diff --git a/resources/definitions/cartesio.def.json b/resources/definitions/cartesio.def.json index 2415a6372a..d0904b9716 100644 --- a/resources/definitions/cartesio.def.json +++ b/resources/definitions/cartesio.def.json @@ -37,14 +37,22 @@ "machine_depth": { "default_value": 270 }, "machine_width": { "default_value": 430 }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, + "material_print_temp_wait": { "default_value": false }, + "material_bed_temp_wait": { "default_value": false }, + "infill_pattern": { "default_value": "grid"}, + "prime_tower_enable": { "default_value": true }, + "prime_tower_wall_thickness": { "resolve": 0.7 }, + "prime_tower_position_x": { "default_value": 30 }, + "prime_tower_position_y": { "default_value": 71 }, "machine_start_gcode": { - "default_value": "M92 E159\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\nM140 S{material_bed_temperature}\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature}\nM104 S120 T1\nM109 S{material_print_temperature} T0\nM104 S21 T1\n\nM117 purging nozzle....\n\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-{retraction_amount} F600\nG92 E0\n\nM117 wiping nozzle....\n\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM117 Printing .....\n\nG1 E1 F100\nG92 E-1\n" + "default_value": "\nM104 S120 T1\nM104 S120 T2\nM104 S120 T3\n\nM92 E159\n\nG21\nG90\nM42 S255 P13;chamber lights\nM42 S255 P12;fume extraction\n\nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\nG1 X70 Y20 F9000;go to wipe point\n\nM190 S{material_bed_temperature_layer_0}\n\nM117 Heating for 50 sec.\nG4 S20\nM117 Heating for 30 sec.\nG4 S20\nM117 Heating for 10 sec.\nM300 S600 P1000\nG4 S9\n\nM117 purging nozzle....\nT0\nG92 E0;set E\nG1 E10 F100\nG92 E0\nG1 E-1 F600\n\nM117 wiping nozzle....\nG1 X1 Y24 F3000\nG1 X70 F9000\n\nM104 S21 T1\nM104 S21 T2\nM104 S21 T3\n\nM117 Printing .....\n" }, "machine_end_gcode": { - "default_value": "; -- END GCODE --\nM106 S255\nM140 S5\nM104 S5 T0\nM104 S5 T1\nG1 X20.0 Y260.0 F6000\nG4 S7\nM84\nG4 S90\nM107\nM42 P12 S0\nM42 P13 S0\nM84\n; -- end of END GCODE --" + "default_value": "; -- END GCODE --\nM106 S255\nM140 S5\nM104 S5 T0\nM104 S5 T1\nM104 S5 T2\nM104 S5 T3\nG1 X20.0 Y260.0 F6000\nG4 S7\nM84\nG4 S90\nM107\nM42 P12 S0\nM42 P13 S0\nM84\nT0\n; -- end of GCODE --" }, "layer_height": { "maximum_value": "(0.8 * min(extruderValues('machine_nozzle_size')))" }, "layer_height_0": { "maximum_value": "(0.8 * min(extruderValues('machine_nozzle_size')))" }, + "layer_height_0": { "resolve": "0.2 if min(extruderValues('machine_nozzle_size')) < 0.3 else 0.3 "}, "machine_nozzle_heat_up_speed": {"default_value": 20}, "machine_nozzle_cool_down_speed": {"default_value": 20}, "machine_min_cool_heat_time_window": {"default_value": 5} diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 2aa5a1ee6c..e0532b3e5b 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4271,7 +4271,8 @@ "description": "Spiralize smooths out the Z move of the outer edge. This will create a steady Z increase over the whole print. This feature turns a solid model into a single walled print with a solid bottom. This feature used to be called Joris in older versions.", "type": "bool", "default_value": false, - "settable_per_mesh": true + "settable_per_mesh": false, + "settable_per_extruder": false } } }, diff --git a/resources/extruders/cartesio_extruder_0.def.json b/resources/extruders/cartesio_extruder_0.def.json index cda2f48bc0..7dc3aaa8af 100644 --- a/resources/extruders/cartesio_extruder_0.def.json +++ b/resources/extruders/cartesio_extruder_0.def.json @@ -16,10 +16,10 @@ "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_0\nM117 Heating nozzles....\nM104 S190 T0\nG1 X70 Y20 F9000\nM109 S190 T0\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_0\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 T0 S155\n;end extruder_0\nM117 temp is {material_print_temp}" + "default_value": "\nM104 T0 S155\nG91\nG1 Z0.5 F900\nG90\nG1 X1 Y260 F9000\n;end extruder_0\nM117 temp is {material_print_temp}" } } } diff --git a/resources/extruders/cartesio_extruder_1.def.json b/resources/extruders/cartesio_extruder_1.def.json index b2bae26983..d8c2e00aed 100644 --- a/resources/extruders/cartesio_extruder_1.def.json +++ b/resources/extruders/cartesio_extruder_1.def.json @@ -16,10 +16,10 @@ "machine_nozzle_offset_x": { "default_value": 24.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_1\nM117 Heating nozzles....\nM104 S190 T1\nG1 X70 Y20 F9000\nM109 S190 T1\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_1\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 T1 S155\n;end extruder_1\n" + "default_value": "\nM104 T1 S155\nG91\nG1 Z0.5 F900\nG90\nG1 X1 Y260 F9000\n;end extruder_1\n" } } } diff --git a/resources/extruders/cartesio_extruder_2.def.json b/resources/extruders/cartesio_extruder_2.def.json index b7c382538a..062b80581c 100644 --- a/resources/extruders/cartesio_extruder_2.def.json +++ b/resources/extruders/cartesio_extruder_2.def.json @@ -16,10 +16,10 @@ "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 60.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_2\nM117 Heating nozzles....\nM104 S190 T2\nG1 X70 Y20 F9000\nM109 S190 T2\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_2\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 T2 S155\n;end extruder_2\n" + "default_value": "\nM104 T2 S155\nG91\nG1 Z0.5 F900\nG90\nG1 X1 Y260 F9000\n;end extruder_2\n" } } } diff --git a/resources/extruders/cartesio_extruder_3.def.json b/resources/extruders/cartesio_extruder_3.def.json index ec400103aa..5582f0f436 100644 --- a/resources/extruders/cartesio_extruder_3.def.json +++ b/resources/extruders/cartesio_extruder_3.def.json @@ -16,10 +16,10 @@ "machine_nozzle_offset_x": { "default_value": 24.0 }, "machine_nozzle_offset_y": { "default_value": 60.0 }, "machine_extruder_start_code": { - "default_value": "\n;start extruder_3\nM117 Heating nozzles....\nM104 S190 T3\nG1 X70 Y20 F9000\nM109 S190 T3\n\nM117 purging nozzle\nG92 E0\nG1 E6 F90\nG92 E0\nG1 E-2 F300\nG92 E0\n\nM117 wiping nozzle\nG1 X1 Y28 F3000\nG1 X70 F6000\n\nM117 printing\n" + "default_value": "\n;start extruder_3\n\nM117 printing\n" }, "machine_extruder_end_code": { - "default_value": "\nM104 T3 S155\n;end extruder_3\n" + "default_value": "\nM104 T3 S155\nG91\nG1 Z0.5 F900\nG90\nG1 X1 Y260 F9000\n;end extruder_3\n" } } } diff --git a/resources/variants/cartesio_0.25.inst.cfg b/resources/variants/cartesio_0.25.inst.cfg index 39f8e4e09d..b64f5121a8 100644 --- a/resources/variants/cartesio_0.25.inst.cfg +++ b/resources/variants/cartesio_0.25.inst.cfg @@ -14,22 +14,23 @@ machine_nozzle_tip_outer_diameter = 1.05 infill_line_width = 0.3 wall_thickness = 1 +top_bottom_thickness = 0.8 wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 30 +infill_sparse_density = 40 +infill_pattern = grid material_print_temperature_layer_0 = =round(material_print_temperature) material_initial_print_temperature = =round(material_print_temperature) material_diameter = 1.75 retraction_amount = 1 -retraction_speed = 40 -retraction_prime_speed = =round(retraction_speed / 4) +retraction_prime_speed = =round(retraction_speed / 5) retraction_min_travel = =round(line_width * 10) switch_extruder_retraction_amount = 2 -switch_extruder_retraction_speeds = 40 -switch_extruder_prime_speed = =round(switch_extruder_retraction_speeds / 4) +switch_extruder_retraction_speeds = =round(retraction_speed) +switch_extruder_prime_speed = =round(retraction_prime_speed) speed_print = =50 if layer_height < 0.4 else 30 speed_infill = =round(speed_print) @@ -46,6 +47,9 @@ retraction_combing = off retraction_hop_enabled = True retraction_hop = 1 +cool_min_layer_time_fan_speed_max = =round(cool_min_layer_time) +cool_min_layer_time = 20 + support_z_distance = 0 support_xy_distance = 0.5 support_join_distance = 10 diff --git a/resources/variants/cartesio_0.4.inst.cfg b/resources/variants/cartesio_0.4.inst.cfg index 3a818469b9..3462133717 100644 --- a/resources/variants/cartesio_0.4.inst.cfg +++ b/resources/variants/cartesio_0.4.inst.cfg @@ -1,11 +1,10 @@ - [general] name = 0.4 mm version = 2 definition = cartesio [metadata] -author = Scheepers +author = Cartesio type = variant [values] @@ -15,32 +14,32 @@ machine_nozzle_tip_outer_diameter = 0.8 infill_line_width = 0.5 wall_thickness = 1.2 +top_bottom_thickness = 0.8 wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 25 -infill_overlap = -50 -skin_overlap = -40 +infill_sparse_density = 40 +infill_pattern = grid material_print_temperature_layer_0 = =round(material_print_temperature) material_initial_print_temperature = =round(material_print_temperature) material_diameter = 1.75 retraction_amount = 1 -retraction_speed = 40 -retraction_prime_speed = =round(retraction_speed /4) +retraction_prime_speed = =round(retraction_speed / 5) retraction_min_travel = =round(line_width * 10) switch_extruder_retraction_amount = 2 -switch_extruder_retraction_speeds = 40 -switch_extruder_prime_speed = =round(switch_extruder_retraction_speeds /4) +switch_extruder_retraction_speeds = =round(retraction_speed) +switch_extruder_prime_speed = =round(retraction_prime_speed) speed_print = 50 +speed_infill = =round(speed_print) speed_layer_0 = =round(speed_print / 5 * 4) -speed_wall = =round(speed_print / 2, 1) +speed_wall = =round(speed_print / 2) speed_wall_0 = =10 if speed_wall < 11 else (speed_print / 5 *3) speed_topbottom = =round(speed_print / 5 * 4) speed_slowdown_layers = 1 -speed_travel = =round(speed_print if magic_spiralize else 150) +speed_travel = =round(speed_print if magic_spiralize else 150) speed_travel_layer_0 = =round(speed_travel) speed_support_interface = =round(speed_topbottom) @@ -48,6 +47,9 @@ retraction_combing = off retraction_hop_enabled = True retraction_hop = 1 +cool_min_layer_time_fan_speed_max = =round(cool_min_layer_time) +cool_min_layer_time = 20 + support_z_distance = 0 support_xy_distance = 0.5 support_join_distance = 10 diff --git a/resources/variants/cartesio_0.8.inst.cfg b/resources/variants/cartesio_0.8.inst.cfg index 3f6502667c..bdaae61af5 100644 --- a/resources/variants/cartesio_0.8.inst.cfg +++ b/resources/variants/cartesio_0.8.inst.cfg @@ -19,20 +19,18 @@ wall_0_inset = -0.05 fill_perimeter_gaps = nowhere travel_compensate_overlapping_walls_enabled = -infill_sparse_density = 15 -infill_overlap = -50 -skin_overlap = -40 +infill_sparse_density = 24 +infill_pattern = grid material_print_temperature_layer_0 = =round(material_print_temperature) material_initial_print_temperature = =round(material_print_temperature) material_diameter = 1.75 retraction_amount = 1.5 -retraction_speed = 40 -retraction_prime_speed = =round(retraction_speed / 4) +retraction_prime_speed = =round(retraction_speed / 5) retraction_min_travel = =round(line_width * 10) switch_extruder_retraction_amount = 2 -switch_extruder_retraction_speeds = 40 -switch_extruder_prime_speed = =round(switch_extruder_retraction_speeds / 4) +switch_extruder_retraction_speeds = =round(retraction_speed) +switch_extruder_prime_speed = =round(retraction_prime_speed) speed_print = =50 if layer_height < 0.4 else 30 speed_infill = =round(speed_print) @@ -49,6 +47,9 @@ retraction_combing = off retraction_hop_enabled = True retraction_hop = 1 +cool_min_layer_time_fan_speed_max = =round(cool_min_layer_time) +cool_min_layer_time = 20 + support_z_distance = 0 support_xy_distance = 0.5 support_join_distance = 10