From 80698c47de7999d50a52bbe22cd098770d0c7508 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 9 Feb 2016 13:50:02 +0100 Subject: [PATCH] Add machine_file_format setting This will determine which file formats a machine is able to save to. The setting is currently not yet used. It will be used to filter the output formats under the Save to File dialogue. Contributes to issue CURA-611. --- resources/machines/RigidBot.json | 3 +++ resources/machines/RigidBotBig.json | 3 +++ resources/machines/bq_hephestos.json | 3 +++ resources/machines/bq_hephestos_2.json | 3 +++ resources/machines/bq_hephestos_xl.json | 3 +++ resources/machines/bq_witbox.json | 3 +++ resources/machines/bq_witbox_2.json | 3 +++ resources/machines/fdmprinter.json | 6 ++++++ resources/machines/grr_neo.json | 3 +++ resources/machines/m180.json | 5 ++++- resources/machines/maker_starter.json | 5 ++++- resources/machines/prusa_i3.json | 3 +++ resources/machines/ultimaker2.json | 5 ++++- resources/machines/ultimaker_original.json | 5 ++++- 14 files changed, 49 insertions(+), 4 deletions(-) diff --git a/resources/machines/RigidBot.json b/resources/machines/RigidBot.json index 8e3793bec6..561bc064bf 100644 --- a/resources/machines/RigidBot.json +++ b/resources/machines/RigidBot.json @@ -32,6 +32,9 @@ }, "machine_end_gcode": { "default": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}" + }, + "machine_file_formats": { + "default": "text/x-gcode", } }, diff --git a/resources/machines/RigidBotBig.json b/resources/machines/RigidBotBig.json index 6518444db0..d425a8d1a3 100644 --- a/resources/machines/RigidBotBig.json +++ b/resources/machines/RigidBotBig.json @@ -30,6 +30,9 @@ }, "machine_end_gcode": { "default": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}" + }, + "machine_file_formats": { + "default": "text/x-gcode", } }, diff --git a/resources/machines/bq_hephestos.json b/resources/machines/bq_hephestos.json index 0ab0964263..71e9760d65 100644 --- a/resources/machines/bq_hephestos.json +++ b/resources/machines/bq_hephestos.json @@ -34,6 +34,9 @@ }, "machine_platform_offset": { "default": [0, -82, 0] + }, + "machine_file_formats": { + "default": "text/x-gcode" } }, "overrides": { diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json index ebe572808c..a2f4b16006 100644 --- a/resources/machines/bq_hephestos_2.json +++ b/resources/machines/bq_hephestos_2.json @@ -34,6 +34,9 @@ }, "machine_platform_offset": { "default": [6, 1320, 0] + }, + "machine_file_formats": { + "default": "text/x-gcode", } }, "overrides": { diff --git a/resources/machines/bq_hephestos_xl.json b/resources/machines/bq_hephestos_xl.json index 29b4c9cb77..693e789185 100644 --- a/resources/machines/bq_hephestos_xl.json +++ b/resources/machines/bq_hephestos_xl.json @@ -34,6 +34,9 @@ }, "machine_platform_offset": { "default": [0, -82, 0] + }, + "machine_file_formats": { + "default": "text/x-gcode", } }, "overrides": { diff --git a/resources/machines/bq_witbox.json b/resources/machines/bq_witbox.json index 445859b141..fbb96dd7b0 100644 --- a/resources/machines/bq_witbox.json +++ b/resources/machines/bq_witbox.json @@ -34,6 +34,9 @@ }, "machine_platform_offset": { "default": [0, -145, -38] + }, + "machine_file_formats": { + "default": "text/x-gcode", } }, "overrides": { diff --git a/resources/machines/bq_witbox_2.json b/resources/machines/bq_witbox_2.json index 62bbc2c5ff..c392a5b2ca 100644 --- a/resources/machines/bq_witbox_2.json +++ b/resources/machines/bq_witbox_2.json @@ -34,6 +34,9 @@ }, "machine_platform_offset": { "default": [0, -145, -38] + }, + "machine_file_formats": { + "default": "text/x-gcode", } }, "overrides": { diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index a9fa218fd1..e41df24f50 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -175,6 +175,12 @@ "description": "The height difference between the tip of the nozzle and the gantry system (X and Y axes).", "default": 99999999999, "global_only": true + }, + "machine_file_formats": { + "description": "The file formats that this printer is able to read.", + "type": "string", + "default": "text/x-gcode;application/sla;prs.wavefront-obj;application/octet-stream", + "global_only": true } }, "categories": { diff --git a/resources/machines/grr_neo.json b/resources/machines/grr_neo.json index 488909c79c..7f1959b4a1 100644 --- a/resources/machines/grr_neo.json +++ b/resources/machines/grr_neo.json @@ -30,6 +30,9 @@ }, "machine_end_gcode": { "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + }, + "machine_file_formats": { + "default": "text/x-gcode", } }, diff --git a/resources/machines/m180.json b/resources/machines/m180.json index d8fd48b587..49e0df51ec 100644 --- a/resources/machines/m180.json +++ b/resources/machines/m180.json @@ -24,7 +24,10 @@ "gantry_height": { "default": 55 }, "machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" }, "machine_start_gcode": { "default": "M136\nM73 P0\nM103\nG21\nG90\nM320\n;(**** begin homing ****)\nG162 X Y F4000\nG161 Z F3500\nG92 Z-5\nG1 Z0.0\nG161 Z F100\nM132 X Y Z A B\n;(**** end homing ****)\nG92 X147 Y66 Z5\nG1 X105 Y-60 Z10 F4000.0\nG130 X127 Y127 A127 B127\nG0 X105 Y-60\nG1 Z0.3 F300\nG92 E0\nG1 X100 E10 F300\nG92 E0\nG1 Z0.0 F300\nM320" }, - "machine_end_gcode": { "default": "G92 Z0\nG1 Z10 F400\nM18\nM109 S0 T0\nM104 S0 T0\nM73 P100 (end build progress)\nG162 X Y F3000\nM18" } + "machine_end_gcode": { "default": "G92 Z0\nG1 Z10 F400\nM18\nM109 S0 T0\nM104 S0 T0\nM73 P100 (end build progress)\nG162 X Y F3000\nM18" }, + "machine_file_formats": { + "default": "application/octet-stream", + } }, "overrides": { diff --git a/resources/machines/maker_starter.json b/resources/machines/maker_starter.json index 7e4e08f175..66d6afa2a5 100644 --- a/resources/machines/maker_starter.json +++ b/resources/machines/maker_starter.json @@ -30,7 +30,10 @@ "machine_nozzle_tip_outer_diameter": { "default": 1.0 }, "machine_nozzle_head_distance": { "default": 3.0 }, - "machine_nozzle_expansion_angle": { "default": 45 } + "machine_nozzle_expansion_angle": { "default": 45 }, + "machine_file_formats": { + "default": "text/x-gcode;application/sla;prs.wavefront-obj", + } }, "overrides": { diff --git a/resources/machines/prusa_i3.json b/resources/machines/prusa_i3.json index 997a246601..b052272b90 100644 --- a/resources/machines/prusa_i3.json +++ b/resources/machines/prusa_i3.json @@ -30,6 +30,9 @@ }, "machine_end_gcode": { "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + }, + "machine_file_formats": { + "default": "text/x-gcode", } } } diff --git a/resources/machines/ultimaker2.json b/resources/machines/ultimaker2.json index f4a4d5f6a6..b81de4943a 100644 --- a/resources/machines/ultimaker2.json +++ b/resources/machines/ultimaker2.json @@ -79,7 +79,10 @@ "machine_nozzle_tip_outer_diameter": { "default": 1.0 }, "machine_nozzle_head_distance": { "default": 3.0 }, - "machine_nozzle_expansion_angle": { "default": 45 } + "machine_nozzle_expansion_angle": { "default": 45 }, + "machine_file_formats": { + "default": "text/x-gcode", + } }, "overrides": { diff --git a/resources/machines/ultimaker_original.json b/resources/machines/ultimaker_original.json index 105bbbed58..cde89bc363 100644 --- a/resources/machines/ultimaker_original.json +++ b/resources/machines/ultimaker_original.json @@ -78,6 +78,9 @@ "default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" }, - "machine_extruder_drive_upgrade": { "default": false } + "machine_extruder_drive_upgrade": { "default": false }, + "machine_file_formats": { + "default": "text/x-gcode", + } } }