From c69652531753364a8d326848a1448f0b54807068 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 3 May 2016 11:38:59 +0200 Subject: [PATCH] Updated inherit function to value (and in cases where there was implicit inheritance made it explicit) CURA-1278 --- resources/machines/fdmprinter.def.json | 175 +++++++++++++------------ 1 file changed, 94 insertions(+), 81 deletions(-) diff --git a/resources/machines/fdmprinter.def.json b/resources/machines/fdmprinter.def.json index 3bf66226f5..cf92aa847f 100644 --- a/resources/machines/fdmprinter.def.json +++ b/resources/machines/fdmprinter.def.json @@ -284,7 +284,7 @@ "maximum_value_warning": "2 * machine_nozzle_size", "default_value": 0.4, "type": "float", - "inherit_function": "machine_nozzle_size", + "value": "machine_nozzle_size", "children": { "wall_line_width": @@ -295,6 +295,7 @@ "minimum_value": "0.0001", "minimum_value_warning": "0.2", "maximum_value_warning": "5", + "value":"line_width", "default_value": 0.4, "type": "float", "children": @@ -308,6 +309,7 @@ "minimum_value_warning": "0.2", "maximum_value_warning": "5", "default_value": 0.4, + "value":"wall_line_width", "type": "float" }, "wall_line_width_x": @@ -319,6 +321,7 @@ "minimum_value_warning": "0.2", "maximum_value_warning": "5", "default_value": 0.4, + "value":"wall_line_width", "type": "float" } } @@ -332,7 +335,8 @@ "minimum_value_warning": "0.2", "maximum_value_warning": "5", "default_value": 0.4, - "type": "float" + "type": "float", + "value": "line_width" }, "infill_line_width": { @@ -343,7 +347,8 @@ "minimum_value_warning": "0.2", "maximum_value_warning": "5", "default_value": 0.4, - "type": "float" + "type": "float", + "value": "line_width" }, "skirt_line_width": { @@ -355,7 +360,8 @@ "maximum_value_warning": "5", "default_value": 0.4, "type": "float", - "global_only": true + "global_only": true, + "value": "line_width" }, "support_line_width": { @@ -368,7 +374,8 @@ "default_value": 0.4, "type": "float", "enabled": "support_enable", - "global_only": true + "global_only": true, + "value": "line_width" }, "support_roof_line_width": { @@ -380,7 +387,8 @@ "maximum_value_warning": "machine_nozzle_size * 2", "type": "float", "enabled": "support_roof_enable", - "global_only": true + "global_only": true, + "value": "line_width" } } } @@ -413,7 +421,7 @@ "default_value": 2, "minimum_value": "0", "type": "int", - "inherit_function": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" + "value": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" } } }, @@ -438,6 +446,7 @@ "minimum_value": "0", "maximum_value_warning": "100", "type": "float", + "value": "top_bottom_thickness", "children": { "top_layers": @@ -448,7 +457,7 @@ "minimum_value": "0", "maximum_value_warning": "100", "type": "int", - "inherit_function": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + "value": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" } } }, @@ -460,6 +469,7 @@ "default_value": 0.6, "minimum_value": "0", "type": "float", + "value": "top_bottom_thickness", "children": { "bottom_layers": @@ -469,7 +479,7 @@ "minimum_value": "0", "default_value": 6, "type": "int", - "inherit_function": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" + "value": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" } } } @@ -495,7 +505,7 @@ "unit": "mm", "type": "float", "default_value": 0.0, - "inherit_function": "(machine_nozzle_size - wall_line_width_0) / 2 if wall_line_width_0 < machine_nozzle_size else 0", + "value": "(machine_nozzle_size - wall_line_width_0) / 2 if wall_line_width_0 < machine_nozzle_size else 0", "minimum_value_warning": "0", "maximum_value_warning": "machine_nozzle_size" }, @@ -504,8 +514,7 @@ "label": "Alternate Extra Wall", "description": "Prints an extra wall at every other layer. This way infill gets caught between these extra walls, resulting in stronger prints.", "type": "bool", - "default_value": false, - "inherit": false + "default_value": false }, "remove_overlapping_walls_enabled": { @@ -522,7 +531,7 @@ "description": "Remove parts of an outer wall which share an overlap which would result in overextrusion in some places. These overlaps occur in thin pieces in a model and sharp corners.", "type": "bool", "default_value": false, - "inherit": true, + "value": "remove_overlapping_walls_enabled", "enabled": "False" }, "remove_overlapping_walls_x_enabled": @@ -531,7 +540,7 @@ "description": "Remove parts of an inner wall that would otherwise overlap and cause over-extrusion. These overlaps occur in thin pieces in a model and sharp corners.", "type": "bool", "default_value": true, - "inherit": false + "value": "remove_overlapping_walls_enabled" } } }, @@ -615,7 +624,7 @@ "type": "float", "default_value": 2, "minimum_value": "0", - "inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" + "value": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" } } }, @@ -633,7 +642,7 @@ "zigzag": "Zig Zag" }, "default_value": "grid", - "inherit_function": "'lines' if infill_sparse_density > 25 else 'grid'" + "value": "'lines' if infill_sparse_density > 25 else 'grid'" }, "infill_overlap": { @@ -642,7 +651,7 @@ "unit": "%", "type": "float", "default_value": 10, - "inherit_function": "10 if infill_sparse_density < 95 else 0", + "value": "10 if infill_sparse_density < 95 else 0", "minimum_value_warning": "-50", "maximum_value_warning": "100", "children": @@ -656,7 +665,7 @@ "default_value": 0.04, "minimum_value_warning": "-0.5 * machine_nozzle_size", "maximum_value_warning": "machine_nozzle_size", - "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 else 0" + "value": "infill_line_width * infill_overlap / 100 if infill_sparse_density < 95 else 0" } } }, @@ -667,7 +676,7 @@ "unit": "mm", "type": "float", "default_value": 0.04, - "inherit_function": "wall_line_width_0 / 4 if wall_line_count == 1 else wall_line_width_x / 4", + "value": "wall_line_width_0 / 4 if wall_line_count == 1 else wall_line_width_x / 4", "minimum_value_warning": "0", "maximum_value_warning": "machine_nozzle_size" }, @@ -681,7 +690,7 @@ "minimum_value": "0.0001", "maximum_value_warning": "0.32", "maximum_value": "layer_height * 8", - "inherit_function": "layer_height" + "value": "layer_height" }, "infill_before_walls": { @@ -700,7 +709,8 @@ "type": "category", "children": { - "material_flow_dependent_temperature": { + "material_flow_dependent_temperature": + { "label": "Auto Temperature", "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", "type": "bool", @@ -708,7 +718,8 @@ "enabled": "False", "global_only": true }, - "material_print_temperature": { + "material_print_temperature": + { "label": "Printing Temperature", "description": "The temperature used for printing. Set at 0 to pre-heat the printer manually.", "unit": "°C", @@ -718,14 +729,15 @@ "maximum_value_warning": "260", "enabled": "not (material_flow_dependent_temperature)" }, - "material_flow_temp_graph": { + "material_flow_temp_graph": + { "label": "Flow Temperature Graph", "description": "Data linking material flow (in mm3 per second) to temperature (degrees Celsius).", "unit": "", "type": "str", "default_value": "[[3.5,200],[7.0,240]]", "enabled": "False", - "enabled_before_removal": "material_flow_dependent_temperature", + "comments": "old enabled function: material_flow_dependent_temperature", "global_only": true }, "material_extrusion_cool_down_speed": { @@ -738,7 +750,7 @@ "maximum_value_warning": "10.0", "global_only": "True", "enabled": "False", - "enabled_before_removal": "material_flow_dependent_temperature or machine_extruder_count > 1" + "comments": "old enabled function: material_flow_dependent_temperature or machine_extruder_count > 1" }, "material_bed_temperature": { "label": "Bed Temperature", @@ -786,7 +798,6 @@ "default_value": 6.5, "minimum_value_warning": "-0.0001", "maximum_value_warning": "10.0", - "inherit": false, "enabled": "retraction_enable" }, "retraction_speed": { @@ -798,7 +809,6 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "inherit": false, "enabled": "retraction_enable", "children": { "retraction_retract_speed": { @@ -810,7 +820,8 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "enabled": "retraction_enable" + "enabled": "retraction_enable", + "value": "retraction_speed" }, "retraction_prime_speed": { "label": "Retraction Prime Speed", @@ -821,7 +832,8 @@ "minimum_value": "0", "maximum_value": "299792458000", "maximum_value_warning": "100", - "enabled": "retraction_enable" + "enabled": "retraction_enable", + "value": "retraction_speed" } } }, @@ -833,7 +845,6 @@ "default_value": 0, "minimum_value_warning": "-0.0001", "maximum_value_warning": "5.0", - "inherit": false, "enabled": "retraction_enable" }, "retraction_min_travel": { @@ -842,10 +853,9 @@ "unit": "mm", "type": "float", "default_value": 1.5, - "inherit_function": "line_width * 2", + "value": "line_width * 2", "minimum_value": "0", "maximum_value_warning": "10", - "inherit": false, "enabled": "retraction_enable" }, "retraction_count_max": { @@ -855,7 +865,6 @@ "minimum_value": "0", "maximum_value_warning": "100", "type": "int", - "inherit": false, "enabled": "retraction_enable" }, "retraction_extrusion_window": { @@ -866,7 +875,7 @@ "default_value": 4.5, "minimum_value": "0", "maximum_value_warning": "retraction_amount * 2", - "inherit_function": "retraction_amount", + "value": "retraction_amount", "enabled": "retraction_enable" }, "retraction_hop": { @@ -877,7 +886,6 @@ "default_value": 0, "minimum_value_warning": "-0.0001", "maximum_value_warning": "10", - "inherit": false, "enabled": "retraction_enable" } } @@ -911,7 +919,8 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "150", - "default_value": 60 + "default_value": 60, + "value": "speed_print" }, "speed_wall": { @@ -923,7 +932,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 30, - "inherit_function": "parent_value / 2", + "value": "speed_print / 2", "children": { "speed_wall_0": @@ -935,7 +944,8 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "150", - "default_value": 30 + "default_value": 30, + "value": "speed_wall" }, "speed_wall_x": { @@ -947,7 +957,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 60, - "inherit_function": "parent_value * 2" + "value": "speed_wall * 2" } } }, @@ -961,7 +971,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 30, - "inherit_function": "parent_value / 2" + "value": "speed_print / 2" }, "speed_support": { @@ -973,7 +983,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "default_value": 60, - "inherit_function": "speed_print", + "value": "speed_print", "enabled": "support_roof_enable", "children": { @@ -987,7 +997,7 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "150", - "inherit": true, + "value": "speed_support", "enabled": "support_enable", "global_only": true }, @@ -1002,7 +1012,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "enabled": "support_roof_enable", - "inherit_function": "parent_value / 1.5", + "value": "speed_support / 1.5", "global_only": true } } @@ -1019,7 +1029,7 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "300", - "inherit_function": "speed_print if magic_spiralize else 120", + "value": "speed_print if magic_spiralize else 120", "global_only": true }, "speed_layer_0": { @@ -1041,7 +1051,7 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "300", - "inherit_function": "speed_layer_0", + "value": "speed_layer_0", "global_only": true }, "speed_slowdown_layers": @@ -1095,10 +1105,9 @@ "unit": "mm", "type": "float", "default_value": 1.5, - "inherit_function": "machine_nozzle_tip_outer_diameter / 2 * 1.25", + "value": "machine_nozzle_tip_outer_diameter / 2 * 1.25", "minimum_value": "0", "maximum_value_warning": "machine_nozzle_tip_outer_diameter * 5", - "inherit": false, "enabled": "retraction_combing != \"off\" and travel_avoid_other_parts", "global_only": "True" } @@ -1129,7 +1138,7 @@ "minimum_value": "0", "maximum_value": "100", "default_value": 100, - "inherit_function": "100.0 if cool_fan_enabled else 0.0", + "value": "100.0 if cool_fan_enabled else 0.0", "enabled": "cool_fan_enabled", "global_only": "True", "children": @@ -1142,7 +1151,7 @@ "type": "float", "minimum_value": "0", "maximum_value": "100", - "inherit_function": "parent_value", + "value": "cool_fan_speed", "default_value": 100, "enabled": "cool_fan_enabled", "global_only": "True" @@ -1157,7 +1166,8 @@ "maximum_value": "100", "default_value": 100, "enabled": "cool_fan_enabled", - "global_only": "True" + "global_only": "True", + "value": "cool_fan_speed" } } }, @@ -1179,7 +1189,7 @@ "unit": "mm", "type": "float", "default_value": 0.5, - "inherit_function": "layer_height_0", + "value": "layer_height_0", "minimum_value": "0", "maximum_value_warning": "10.0", "global_only": "True", @@ -1193,7 +1203,7 @@ "default_value": 1, "minimum_value": "0", "maximum_value_warning": "100", - "inherit_function": "int((parent_value - layer_height_0 + 0.001) / layer_height) + 1", + "value": "int((cool_fan_full_at_height - layer_height_0 + 0.001) / layer_height) + 1", "global_only": "True" } } @@ -1316,7 +1326,7 @@ "minimum_value": "0", "default_value": 2.66, "enabled": "support_enable", - "inherit_function": "(support_line_width * 100) / parent_value * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", + "value": "(support_line_width * 100) / support_infill_rate * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", "global_only": true } } @@ -1354,7 +1364,8 @@ "maximum_value_warning": "10", "default_value": 0.15, "type": "float", - "enabled": "support_enable" + "enabled": "support_enable", + "value": "support_z_distance" }, "support_bottom_distance": { @@ -1364,7 +1375,7 @@ "minimum_value": "0", "maximum_value_warning": "10", "default_value": 0.1, - "inherit_function": "0.1 if support_type == 'everywhere' else 0", + "value": "0.1 if support_type == 'everywhere' else 0", "type": "float", "enabled": "support_enable and support_type == 'everywhere'" } @@ -1454,7 +1465,7 @@ "type": "float", "default_value": 0.4, "minimum_value": "0", - "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", + "value": "0 if support_roof_density == 0 else (support_roof_line_width * 100) / support_roof_density * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", "enabled": "support_roof_enable", "global_only": true } @@ -1506,7 +1517,6 @@ "minimum_value": "0", "maximum_value_warning": "10", "maximum_value": "support_tower_diameter", - "inherit": true, "enabled": "support_enable and support_use_towers" }, "support_tower_roof_angle": @@ -1601,7 +1611,7 @@ "default_value": 20, "minimum_value": "0", "maximum_value_warning": "300", - "inherit_function": "math.ceil(parent_value / skirt_line_width)", + "value": "math.ceil(brim_width / skirt_line_width)", "enabled": "adhesion_type == \"brim\"", "global_only": "True" } @@ -1676,7 +1686,7 @@ "minimum_value": "0.0001", "maximum_value_warning": "5.0", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "raft_surface_line_width", + "value": "raft_surface_line_width", "global_only": "True" }, "raft_interface_thickness": @@ -1698,7 +1708,7 @@ "unit": "mm", "type": "float", "default_value": 1, - "inherit_function": "line_width", + "value": "line_width", "minimum_value": "0.0001", "maximum_value_warning": "machine_nozzle_size * 2", "enabled": "adhesion_type == \"raft\"", @@ -1736,7 +1746,7 @@ "type": "float", "default_value": 1, "minimum_value": "0.0001", - "inherit_function": "line_width", + "value": "line_width", "maximum_value_warning": "machine_nozzle_size * 2", "enabled": "adhesion_type == \"raft\"", "global_only": "True" @@ -1764,7 +1774,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "200", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "speed_print / 60 * 30", + "value": "speed_print / 60 * 30", "global_only": "True", "children": { @@ -1779,7 +1789,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "100", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "parent_value", + "value": "raft_speed", "global_only": "True" }, "raft_interface_speed": @@ -1793,7 +1803,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "150", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value", + "value": "0.5 * raft_speed", "global_only": "True" }, "raft_base_speed": @@ -1807,7 +1817,7 @@ "maximum_value": "299792458000", "maximum_value_warning": "200", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value", + "value": "0.5 * raft_speed", "global_only": "True" } } @@ -1835,7 +1845,7 @@ "maximum_value": "100", "default_value": 100, "global_only": "True", - "inherit": true, + "value": "raft_fan_speed", "enabled": "adhesion_type == \"raft\"" }, "raft_interface_fan_speed": @@ -1848,7 +1858,7 @@ "maximum_value": "100", "default_value": 100, "global_only": "True", - "inherit": true, + "value": "raft_fan_speed", "enabled": "adhesion_type == \"raft\"" }, "raft_base_fan_speed": @@ -1861,7 +1871,7 @@ "maximum_value": "100", "default_value": 100, "global_only": "True", - "inherit": true, + "value": "raft_fan_speed", "enabled": "adhesion_type == \"raft\"" } } @@ -1950,12 +1960,12 @@ } } }, - "blackmagic": + "experimental": { "label": "Experimental Modes", "type": "category", "icon": "category_blackmagic", - "description": "category_blackmagic", + "description": "experimental!", "children": { "draft_shield_enabled": @@ -2001,7 +2011,7 @@ "minimum_value": "0", "maximum_value_warning": "9999", "default_value": 0, - "inherit_function": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", + "value": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", "enabled": "draft_shield_height_limitation == \"limited\"", "global_only": true }, @@ -2022,7 +2032,6 @@ "default_value": 0.064, "minimum_value": "0", "maximum_value_warning": "2.0", - "inherit": false, "enabled": "coasting_enable", "global_only": true }, @@ -2047,7 +2056,6 @@ "default_value": 90, "minimum_value": "0.0001", "maximum_value_warning": "100", - "inherit": false, "enabled": "coasting_enable", "global_only": true }, @@ -2143,7 +2151,7 @@ "minimum_value": "magic_fuzzy_skin_thickness / 2", "minimum_value_warning": "0.1", "maximum_value_warning": "10", - "inherit_function": "10000 if parent_value == 0 else 1 / parent_value", + "value": "10000 if parent_value == 0 else 1 / magic_fuzzy_skin_point_density", "enabled": "magic_fuzzy_skin_enabled" } } @@ -2179,7 +2187,7 @@ "minimum_value_warning": "machine_nozzle_size", "maximum_value_warning": "20", "enabled": "wireframe_enabled", - "inherit_function": "wireframe_height", + "value": "wireframe_height", "global_only": "True" }, "wireframe_printspeed": @@ -2207,7 +2215,8 @@ "maximum_value": "299792458000", "maximum_value_warning": "50", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_printspeed" }, "wireframe_printspeed_up": { @@ -2220,7 +2229,8 @@ "maximum_value": "299792458000", "maximum_value_warning": "50", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_printspeed" }, "wireframe_printspeed_down": { @@ -2233,7 +2243,8 @@ "maximum_value": "299792458000", "maximum_value_warning": "50", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_printspeed" }, "wireframe_printspeed_flat": { @@ -2245,7 +2256,7 @@ "minimum_value": "0.1", "maximum_value": "299792458000", "maximum_value_warning": "100", - "inherit": true, + "value": "wireframe_printspeed", "enabled": "wireframe_enabled", "global_only": "True" } @@ -2274,7 +2285,8 @@ "maximum_value_warning": "100", "type": "float", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_flow" }, "wireframe_flow_flat": { @@ -2286,7 +2298,8 @@ "maximum_value_warning": "100", "type": "float", "enabled": "wireframe_enabled", - "global_only": "True" + "global_only": "True", + "value": "wireframe_flow" } } },