This commit is contained in:
fieldOfView 2016-07-12 13:10:08 +02:00
commit f5f3f9c516
8 changed files with 207 additions and 262 deletions

View file

@ -12,6 +12,6 @@ class ProfileReader(PluginObject):
## Read profile data from a file and return a filled profile.
#
# \return \type{Profile} The profile that was obtained from the file.
# \return \type{Profile|Profile[]} The profile that was obtained from the file or a list of Profiles.
def read(self, file_name):
raise NotImplementedError("Profile reader plug-in was not correctly implemented. The read function was not implemented.")

View file

@ -133,32 +133,45 @@ class CuraContainerRegistry(ContainerRegistry):
for plugin_id, meta_data in self._getIOPlugins("profile_reader"):
profile_reader = plugin_registry.getPluginObject(plugin_id)
try:
profile = profile_reader.read(file_name) #Try to open the file with the profile reader.
profile_or_list = profile_reader.read(file_name) # Try to open the file with the profile reader.
except Exception as e:
#Note that this will fail quickly. That is, if any profile reader throws an exception, it will stop reading. It will only continue reading if the reader returned None.
Logger.log("e", "Failed to import profile from %s: %s", file_name, str(e))
return { "status": "error", "message": catalog.i18nc("@info:status", "Failed to import profile from <filename>{0}</filename>: <message>{1}</message>", file_name, str(e))}
if profile: #Success!
profile.setReadOnly(False)
new_name = self.createUniqueName("quality", "", os.path.splitext(os.path.basename(file_name))[0],
catalog.i18nc("@label", "Custom profile"))
profile.setName(new_name)
profile._id = new_name
if self._machineHasOwnQualities():
profile.setDefinition(self._activeDefinition())
if self._machineHasOwnMaterials():
profile.addMetaDataEntry("material", self._activeMaterialId())
if profile_or_list: # Success!
name_seed = os.path.splitext(os.path.basename(file_name))[0]
if type(profile_or_list) is not list:
profile = profile_or_list
self._configureProfile(profile, name_seed)
return { "status": "ok", "message": catalog.i18nc("@info:status", "Successfully imported profile {0}", profile.getName()) }
else:
profile.setDefinition(ContainerRegistry.getInstance().findDefinitionContainers(id="fdmprinter")[0])
ContainerRegistry.getInstance().addContainer(profile)
for profile in profile_or_list:
self._configureProfile(profile, name_seed)
return { "status": "ok", "message": catalog.i18nc("@info:status", "Successfully imported profile {0}", profile.getName()) }
if len(profile_or_list) == 1:
return {"status": "ok", "message": catalog.i18nc("@info:status", "Successfully imported profile {0}", profile_or_list[0].getName())}
else:
profile_names = ", ".join([profile.getName() for profile in profile_or_list])
return { "status": "ok", "message": catalog.i18nc("@info:status", "Successfully imported profiles {0}", profile_names) }
#If it hasn't returned by now, none of the plugins loaded the profile successfully.
return { "status": "error", "message": catalog.i18nc("@info:status", "Profile {0} has an unknown file type.", file_name)}
def _configureProfile(self, profile, name_seed):
profile.setReadOnly(False)
new_name = self.createUniqueName("quality", "", name_seed, catalog.i18nc("@label", "Custom profile"))
profile.setName(new_name)
profile._id = new_name
if self._machineHasOwnQualities():
profile.setDefinition(self._activeDefinition())
if self._machineHasOwnMaterials():
profile.addMetaDataEntry("material", self._activeMaterialId())
else:
profile.setDefinition(ContainerRegistry.getInstance().findDefinitionContainers(id="fdmprinter")[0])
ContainerRegistry.getInstance().addContainer(profile)
## Gets a list of profile writer plugins
# \return List of tuples of (plugin_id, meta_data).
def _getIOPlugins(self, io_type):

View file

@ -3,7 +3,6 @@
import os.path
from UM.Application import Application #To get the machine manager to create the new profile in.
from UM.Logger import Logger
from UM.Settings.InstanceContainer import InstanceContainer #The new profile to make.
from cura.ProfileReader import ProfileReader

View file

@ -1,10 +1,9 @@
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
import os
import re #Regular expressions for parsing escape characters in the settings.
import json
from UM.Application import Application #To get the machine manager to create the new profile in.
from UM.Settings.InstanceContainer import InstanceContainer
from UM.Logger import Logger
from UM.i18n import i18nCatalog
@ -22,7 +21,7 @@ class GCodeProfileReader(ProfileReader):
# It can only read settings with the same version as the version it was
# written with. If the file format is changed in a way that breaks reverse
# compatibility, increment this version number!
version = 2
version = 3
## Dictionary that defines how characters are escaped when embedded in
# g-code.
@ -66,21 +65,37 @@ class GCodeProfileReader(ProfileReader):
Logger.log("e", "Unable to open file %s for reading: %s", file_name, str(e))
return None
# Un-escape the serialized profile.
pattern = re.compile("|".join(GCodeProfileReader.escape_characters.keys()))
# Perform the replacement with a regular expression.
serialized = pattern.sub(lambda m: GCodeProfileReader.escape_characters[re.escape(m.group(0))], serialized)
serialized = unescapeGcodeComment(serialized)
Logger.log("i", "Serialized the following from %s: %s" %(file_name, repr(serialized)))
# Create an empty profile - the id and name will be changed by the ContainerRegistry
profile = InstanceContainer("")
try:
profile.deserialize(serialized)
except Exception as e: # Not a valid g-code file.
Logger.log("e", "Unable to serialise the profile: %s", str(e))
return None
json_data = json.loads(serialized)
profile.addMetaDataEntry("type", "quality")
profile_strings = [json_data["global_quality"]]
profile_strings.extend(json_data.get("extruder_quality", []))
return profile
return [readQualityProfileFromString(profile_string) for profile_string in profile_strings]
## Unescape a string which has been escaped for use in a gcode comment.
#
# \param string The string to unescape.
# \return \type{str} The unscaped string.
def unescapeGcodeComment(string):
# Un-escape the serialized profile.
pattern = re.compile("|".join(GCodeProfileReader.escape_characters.keys()))
# Perform the replacement with a regular expression.
return pattern.sub(lambda m: GCodeProfileReader.escape_characters[re.escape(m.group(0))], string)
## Read in a profile from a serialized string.
#
# \param profile_string The profile data in serialized form.
# \return \type{Profile} the resulting Profile object or None if it could not be read.
def readQualityProfileFromString(profile_string):
# Create an empty profile - the id and name will be changed by the ContainerRegistry
profile = InstanceContainer("")
try:
profile.deserialize(profile_string)
except Exception as e: # Not a valid g-code file.
Logger.log("e", "Unable to serialise the profile: %s", str(e))
return None
return profile

View file

@ -4,8 +4,11 @@
from UM.Mesh.MeshWriter import MeshWriter
from UM.Logger import Logger
from UM.Application import Application
from UM.Settings.InstanceContainer import InstanceContainer #To create a complete setting profile to store in the g-code.
from cura.Settings.ExtruderManager import ExtruderManager
import re #For escaping characters in the settings.
import json
## Writes g-code to a file.
#
@ -23,7 +26,7 @@ class GCodeWriter(MeshWriter):
# It can only read settings with the same version as the version it was
# written with. If the file format is changed in a way that breaks reverse
# compatibility, increment this version number!
version = 2
version = 3
## Dictionary that defines how characters are escaped when embedded in
# g-code.
@ -64,25 +67,33 @@ class GCodeWriter(MeshWriter):
#
# \param settings A container stack to serialise.
# \return A serialised string of the settings.
def _serialiseSettings(self, settings):
def _serialiseSettings(self, stack):
prefix = ";SETTING_" + str(GCodeWriter.version) + " " # The prefix to put before each line.
prefix_length = len(prefix)
global_stack = Application.getInstance().getGlobalContainerStack()
container_with_profile = global_stack.findContainer({"type": "quality"})
container_with_profile = stack.findContainer({"type": "quality"})
serialized = container_with_profile.serialize()
data = {"global_quality": serialized}
manager = ExtruderManager.getInstance()
for extruder in manager.getMachineExtruders(stack.getBottom().getId()):
extruder_quality = extruder.findContainer({"type": "quality"})
extruder_serialized = extruder_quality.serialize()
data.setdefault("extruder_quality", []).append(extruder_serialized)
json_string = json.dumps(data)
# Escape characters that have a special meaning in g-code comments.
pattern = re.compile("|".join(GCodeWriter.escape_characters.keys()))
# Perform the replacement with a regular expression.
serialized = pattern.sub(lambda m: GCodeWriter.escape_characters[re.escape(m.group(0))], serialized)
escaped_string = pattern.sub(lambda m: GCodeWriter.escape_characters[re.escape(m.group(0))], json_string)
# Introduce line breaks so that each comment is no longer than 80 characters. Prepend each line with the prefix.
result = ""
# Lines have 80 characters, so the payload of each line is 80 - prefix.
for pos in range(0, len(serialized), 80 - prefix_length):
result += prefix + serialized[pos : pos + 80 - prefix_length] + "\n"
serialized = result
return serialized
for pos in range(0, len(escaped_string), 80 - prefix_length):
result += prefix + escaped_string[pos : pos + 80 - prefix_length] + "\n"
return result

View file

@ -29,19 +29,19 @@
{
"machine_show_variants":
{
"label": "Show machine variants",
"description": "Whether to show the different variants of this machine, which are described in separate json files.",
"default_value": false,
"type": "bool",
"label": "Show machine variants",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_start_gcode":
{
"label": "Start GCode",
"description": "Gcode commands to be executed at the very start - separated by \\n.",
"default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0",
"label": "Start GCode",
"type": "str",
"settable_per_mesh": false,
"settable_per_extruder": false,
@ -49,9 +49,9 @@
},
"machine_end_gcode":
{
"label": "End GCode",
"description": "Gcode commands to be executed at the very end - separated by \\n.",
"default_value": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84",
"label": "End GCode",
"type": "str",
"settable_per_mesh": false,
"settable_per_extruder": false,
@ -79,49 +79,49 @@
},
"material_print_temp_prepend":
{
"label": "Include material temperatures",
"description": "Whether to include nozzle temperature commands at the start of the gcode. When the start_gcode already contains nozzle temperature commands Cura frontend will automatically disable this setting.",
"default_value": true,
"type": "bool",
"label": "Wait for material heatup",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_width":
{
"label": "Machine width",
"description": "The width (X-direction) of the printable area.",
"default_value": 100,
"type": "float",
"label": "Machine width",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_depth":
{
"label": "Machine depth",
"description": "The depth (Y-direction) of the printable area.",
"default_value": 100,
"type": "float",
"label": "Machine depth",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_height":
{
"label": "Machine height",
"description": "The height (Z-direction) of the printable area.",
"default_value": 100,
"type": "float",
"label": "Machine height",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_heated_bed":
{
"label": "Has heated bed",
"description": "Whether the machine has a heated bed present.",
"default_value": false,
"label": "Has heated bed",
"type": "bool",
"settable_per_mesh": false,
"settable_per_extruder": false,
@ -129,28 +129,28 @@
},
"machine_center_is_zero":
{
"label": "Is center origin",
"description": "Whether the X/Y coordinates of the zero position of the printer is at the center of the printable area.",
"default_value": false,
"type": "bool",
"label": "Is center origin",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_extruder_count":
{
"label": "Number extruders",
"description": "Number of extruder trains. An extruder train is the combination of a feeder, bowden tube, and nozzle.",
"default_value": 1,
"type": "int",
"label": "Number extruders",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_nozzle_tip_outer_diameter":
{
"label": "Outer nozzle diameter",
"description": "The outer diameter of the tip of the nozzle.",
"label": "Outer nozzle diameter",
"default_value": 1,
"type": "float",
"settable_per_mesh": false,
@ -160,87 +160,74 @@
},
"machine_nozzle_head_distance":
{
"label": "Nozzle length",
"description": "The height difference between the tip of the nozzle and the lowest part of the print head.",
"default_value": 3,
"type": "float",
"label": "Nozzle length",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_nozzle_expansion_angle":
{
"label": "Nozzle angle",
"description": "The angle between the horizontal plane and the conical part right above the tip of the nozzle.",
"default_value": 45,
"type": "int",
"label": "Nozzle angle",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_heat_zone_length":
{
"label": "Heat zone length",
"description": "The distance from the tip of the nozzle in which heat from the nozzle is transfered to the filament.",
"default_value": 16,
"type": "float",
"label": "Heat zone length",
"settable_per_mesh": false,
"settable_per_extruder": true,
"settable_per_meshgroup": false
},
"machine_nozzle_heat_up_speed":
{
"label": "Heat up speed",
"description": "The speed (°C/s) by which the nozzle heats up averaged over the window of normal printing temperatures and the standby temperature.",
"default_value": 2.0,
"unit": "°C/s",
"type": "float",
"label": "Heat up speed",
"settable_per_mesh": false,
"settable_per_extruder": true
},
"machine_nozzle_cool_down_speed":
{
"label": "Cool down speed",
"description": "The speed (°C/s) by which the nozzle cools down averaged over the window of normal printing temperatures and the standby temperature.",
"default_value": 2.0,
"unit": "°C/s",
"type": "float",
"settable_per_mesh": false,
"settable_per_extruder": true
},
"machine_min_cool_heat_time_window":
{
"label": "Minimal Time Standby Temperature",
"description": "The minimal time an extruder has to be inactive before the nozzle is cooled. Only when an extruder is not used for longer than this time will it be allowed to cool down to the standby temperature.",
"default_value": 50.0,
"unit": "s",
"type": "float",
"label": "Cool down speed",
"settable_per_mesh": false,
"settable_per_extruder": true
},
"machine_gcode_flavor":
{
"label": "Gcode flavour",
"description": "The type of gcode to be generated.",
"default_value": "RepRap",
"type": "str",
"label": "Gcode flavour",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_disallowed_areas":
{
"label": "Disallowed areas",
"description": "A list of polygons with areas the print head is not allowed to enter.",
"type": "polygons",
"default_value": [],
"label": "Disallowed areas",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_head_polygon":
{
"label": "Machine head polygon",
"description": "A 2D silhouette of the print head (fan caps excluded).",
"type": "polygon",
"default_value":
@ -262,13 +249,13 @@
1
]
],
"label": "Machine head polygon",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_head_with_fans_polygon":
{
"label": "Machine head & Fan polygon",
"description": "A 2D silhouette of the print head (fan caps included).",
"type": "polygon",
"default_value":
@ -290,15 +277,16 @@
-10
]
],
"label": "Machine head & Fan polygon",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"gantry_height":
{
"label": "Gantry height",
"description": "The height difference between the tip of the nozzle and the gantry system (X and Y axes).",
"default_value": 99999999999,
"label": "Gantry height",
"type": "float",
"settable_per_mesh": false,
"settable_per_extruder": false,
@ -325,51 +313,6 @@
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"extruder_prime_pos_x":
{
"label": "Extruder Prime X Position",
"description": "The X coordinate of the position where the nozzle primes at the start of printing.",
"type": "float",
"unit": "mm",
"default_value": 0,
"minimum_value_warning": "-1000",
"maximum_value_warning": "1000",
"settable_per_mesh": false,
"settable_per_extruder": true
},
"extruder_prime_pos_y":
{
"label": "Extruder Prime Y Position",
"description": "The Y coordinate of the position where the nozzle primes at the start of printing.",
"type": "float",
"unit": "mm",
"default_value": 0,
"minimum_value_warning": "-1000",
"maximum_value_warning": "1000",
"settable_per_mesh": false,
"settable_per_extruder": true
},
"extruder_prime_pos_z":
{
"label": "Extruder Prime Z Position",
"description": "The Z coordinate of the position where the nozzle primes at the start of printing.",
"type": "float",
"unit": "mm",
"default_value": 0,
"minimum_value_warning": "-1000",
"maximum_value_warning": "1000",
"settable_per_mesh": false,
"settable_per_extruder": true
},
"extruder_prime_pos_abs":
{
"label": "Absolute Extruder Prime Position",
"description": "Make the extruder prime position absolute rather than relative to the last-known location of the head.",
"type": "bool",
"default_value": false,
"settable_per_mesh": false,
"settable_per_extruder": true
}
}
},
@ -465,7 +408,7 @@
},
"skin_line_width":
{
"label": "Top/Bottom Line Width",
"label": "Top/bottom Line Width",
"description": "Width of a single top/bottom line.",
"unit": "mm",
"minimum_value": "0.0001",
@ -592,7 +535,6 @@
"default_value": 0.8,
"minimum_value": "0",
"minimum_value_warning": "0.6",
"maximum_value_warning": "machine_height",
"type": "float",
"settable_per_mesh": true,
"children":
@ -604,7 +546,7 @@
"unit": "mm",
"default_value": 0.8,
"minimum_value": "0",
"maximum_value_warning": "machine_height",
"maximum_value_warning": "100",
"type": "float",
"value": "top_bottom_thickness",
"settable_per_mesh": true,
@ -632,7 +574,6 @@
"minimum_value": "0",
"type": "float",
"value": "top_bottom_thickness",
"maximum_value_warning": "machine_height",
"settable_per_mesh": true,
"children":
{
@ -774,7 +715,7 @@
"type": "float",
"default_value": 2,
"minimum_value": "0",
"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 (3 if infill_pattern == \"cubic\" 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))",
"settable_per_mesh": true
}
}
@ -782,13 +723,12 @@
"infill_pattern":
{
"label": "Infill Pattern",
"description": "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, cubic, triangle and concentric patterns are fully printed every layer.",
"description": "The pattern of the infill material of the print. The line and zig zag infill swap direction on alternate layers, reducing material cost. The grid, triangle and concentric patterns are fully printed every layer.",
"type": "enum",
"options":
{
"grid": "Grid",
"lines": "Lines",
"cubic": "Cubic",
"triangles": "Triangles",
"concentric": "Concentric",
"zigzag": "Zig Zag"
@ -984,8 +924,7 @@
"description": "Retract the filament when the nozzle is moving over a non-printed area. ",
"type": "bool",
"default_value": true,
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true
},
"retraction_amount": {
"label": "Retraction Distance",
@ -996,8 +935,7 @@
"minimum_value_warning": "-0.0001",
"maximum_value_warning": "10.0",
"enabled": "retraction_enable",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true
},
"retraction_speed": {
"label": "Retraction Speed",
@ -1009,8 +947,7 @@
"maximum_value": "299792458000",
"maximum_value_warning": "100",
"enabled": "retraction_enable",
"settable_per_mesh": false,
"settable_per_extruder": true,
"settable_per_mesh": true,
"children": {
"retraction_retract_speed": {
"label": "Retraction Retract Speed",
@ -1023,8 +960,7 @@
"maximum_value_warning": "100",
"enabled": "retraction_enable",
"value": "retraction_speed",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true
},
"retraction_prime_speed": {
"label": "Retraction Prime Speed",
@ -1037,8 +973,7 @@
"maximum_value_warning": "100",
"enabled": "retraction_enable",
"value": "retraction_speed",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true
}
}
},
@ -1051,8 +986,7 @@
"minimum_value_warning": "-0.0001",
"maximum_value_warning": "5.0",
"enabled": "retraction_enable",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true
},
"retraction_min_travel": {
"label": "Retraction Minimum Travel",
@ -1064,8 +998,7 @@
"minimum_value": "0",
"maximum_value_warning": "10",
"enabled": "retraction_enable",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true
},
"retraction_count_max": {
"label": "Maximum Retraction Count",
@ -1075,8 +1008,7 @@
"maximum_value_warning": "100",
"type": "int",
"enabled": "retraction_enable",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true
},
"retraction_extrusion_window": {
"label": "Minimum Extrusion Distance Window",
@ -1088,40 +1020,18 @@
"maximum_value_warning": "retraction_amount * 2",
"value": "retraction_amount",
"enabled": "retraction_enable",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true
},
"retraction_hop_enabled": {
"label": "Z Hop when Retracted",
"retraction_hop": {
"label": "Z Hop when Retracting",
"description": "Whenever a retraction is done, the build plate is lowered to create clearance between the nozzle and the print. It prevents the nozzle from hitting the print during travel moves, reducing the chance to knock the print from the build plate.",
"type": "bool",
"default_value": false,
"unit": "mm",
"type": "float",
"default_value": 0,
"minimum_value_warning": "-0.0001",
"maximum_value_warning": "10",
"enabled": "retraction_enable",
"settable_per_mesh": false,
"settable_per_extruder": true,
"children": {
"retraction_hop_only_when_collides": {
"label": "Z Hop Only Over Printed Parts",
"description": "Only perform a Z Hop when moving over printed parts which cannot be avoided by horizontal motion by Avoid Printed Parts when Traveling.",
"type": "bool",
"default_value": false,
"enabled": "retraction_enable and retraction_hop_enabled and travel_avoid_other_parts",
"settable_per_mesh": false,
"settable_per_extruder": true
},
"retraction_hop": {
"label": "Z Hop Height",
"description": "The height difference when performing a Z Hop.",
"unit": "mm",
"type": "float",
"default_value": 1,
"minimum_value_warning": "-0.0001",
"maximum_value_warning": "10",
"enabled": "retraction_enable and retraction_hop_enabled",
"settable_per_mesh": false,
"settable_per_extruder": true
}
}
"settable_per_mesh": true
},
"material_standby_temperature":
{
@ -1193,12 +1103,16 @@
}
}
},
"retraction_hop_after_extruder_switch": {
"label": "Z Hop After Extruder Switch",
"description": "After the machine switched from one extruder to the other, the build plate is lowered to create clearance between the nozzle and the print. This prevents the nozzle from leaving oozed material on the outside of a print.",
"type": "bool",
"default_value": true,
"enabled": "retraction_hop_enabled",
"switch_extruder_retraction_hop":
{
"label": "Nozzle Switch Z Hop",
"description": "Whenever the machine switches to another nozzle, the build plate is lowered to create clearance between the nozzle and the print. It prevents the nozzle which has been unused for a while from oozing material on the outside of the print.",
"type": "float",
"unit": "mm",
"default_value": 1,
"minimum_value_warning": "-0.0001",
"maximum_value_warning": "10",
"enabled": "retraction_enable",
"settable_per_mesh": false,
"settable_per_extruder": true
}
@ -1599,7 +1513,7 @@
"jerk_enabled": {
"label": "Enable Jerk Control",
"description": "Enables adjusting the jerk of print head when the velocity in the X or Y axis changes. Increasing the jerk can reduce printing time at the cost of print quality.",
"description": "Enables adjusting the jerk of print head when the X or Y axis halts or starts to move. Increasing the jerk can reduce printing time at the cost of print quality.",
"type": "bool",
"default_value": false,
"settable_per_mesh": false,
@ -1607,7 +1521,7 @@
},
"jerk_print": {
"label": "Print Jerk",
"description": "The maximum instantaneous velocity change of the print head.",
"description": "The maximal allowed jerk of the print head when starting to move or when changing direction.",
"unit": "mm/s³",
"type": "float",
"minimum_value": "0.1",
@ -1619,7 +1533,7 @@
"children": {
"jerk_infill": {
"label": "Infill Jerk",
"description": "The maximum instantaneous velocity change with which infill is printed.",
"description": "The jerk with which infill is printed.",
"unit": "mm/s³",
"type": "float",
"minimum_value": "0.1",
@ -1632,7 +1546,7 @@
},
"jerk_wall": {
"label": "Wall Jerk",
"description": "The maximum instantaneous velocity change with which the walls are printed.",
"description": "The jerk with which the walls are printed.",
"unit": "mm/s³",
"type": "float",
"minimum_value": "0.1",
@ -1645,7 +1559,7 @@
"children": {
"jerk_wall_0": {
"label": "Outer Wall Jerk",
"description": "The maximum instantaneous velocity change with which the outermost walls are printed.",
"description": "The jerk with which the outermost walls are printed.",
"unit": "mm/s³",
"type": "float",
"minimum_value": "0.1",
@ -1658,7 +1572,7 @@
},
"jerk_wall_x": {
"label": "Inner Wall Jerk",
"description": "The maximum instantaneous velocity change with which all inner walls are printed.",
"description": "The jerk with which all inner walls are printed.",
"unit": "mm/s³",
"type": "float",
"minimum_value": "0.1",
@ -1673,7 +1587,7 @@
},
"jerk_topbottom": {
"label": "Top/Bottom Jerk",
"description": "The maximum instantaneous velocity change with which top/bottom layers are printed.",
"description": "The jerk with which top/bottom layers are printed.",
"unit": "mm/s³",
"type": "float",
"minimum_value": "0.1",
@ -1686,7 +1600,7 @@
},
"jerk_support": {
"label": "Support Jerk",
"description": "The maximum instantaneous velocity change with which the support structure is printed.",
"description": "The jerk with which the support structure is printed.",
"unit": "mm/s³",
"type": "float",
"minimum_value": "0.1",
@ -1700,7 +1614,7 @@
"children": {
"jerk_support_infill": {
"label": "Support Infill Jerk",
"description": "The maximum instantaneous velocity change with which the infill of support is printed.",
"description": "The jerk with which the infill of support is printed.",
"unit": "mm/s³",
"type": "float",
"default_value": 20,
@ -1714,7 +1628,7 @@
},
"jerk_support_roof": {
"label": "Support Roof Jerk",
"description": "The maximum instantaneous velocity change with which the roofs of support are printed.",
"description": "The jerk with which the roofs of support are printed.",
"unit": "mm/s³",
"type": "float",
"default_value": 20,
@ -1730,7 +1644,7 @@
},
"jerk_prime_tower": {
"label": "Prime Tower Jerk",
"description": "The maximum instantaneous velocity change with which the prime tower is printed.",
"description": "The jerk with which the prime tower is printed.",
"unit": "mm/s³",
"type": "float",
"minimum_value": "0.1",
@ -1745,7 +1659,7 @@
},
"jerk_travel": {
"label": "Travel Jerk",
"description": "The maximum instantaneous velocity change with which travel moves are made.",
"description": "The jerk with which travel moves are made.",
"unit": "mm/s³",
"type": "float",
"default_value": 30,
@ -1758,7 +1672,7 @@
},
"jerk_layer_0": {
"label": "Initial Layer Jerk",
"description": "The print maximum instantaneous velocity change for the initial layer.",
"description": "The print jerk for the initial layer.",
"unit": "mm/s³",
"type": "float",
"default_value": 20,
@ -1771,7 +1685,7 @@
},
"jerk_skirt": {
"label": "Skirt Jerk",
"description": "The maximum instantaneous velocity change with which the skirt and brim are printed.",
"description": "The jerk with which the skirt and brim are printed.",
"unit": "mm/s³",
"type": "float",
"default_value": 20,
@ -1822,7 +1736,7 @@
"description": "The distance between the nozzle and already printed parts when avoiding during travel moves.",
"unit": "mm",
"type": "float",
"default_value": 0.625,
"default_value": 1.5,
"value": "machine_nozzle_tip_outer_diameter / 2 * 1.25",
"minimum_value": "0",
"maximum_value_warning": "machine_nozzle_tip_outer_diameter * 5",
@ -1898,7 +1812,7 @@
{
"label": "Regular/Maximum Fan Speed Threshold",
"description": "The layer time which sets the threshold between regular fan speed and maximum fan speed. Layers that print slower than this time use regular fan speed. For faster layers the fan speed gradually increases towards the maximum fan speed.",
"unit": "s",
"unit": "sec",
"type": "float",
"default_value": 10,
"minimum_value": "cool_min_layer_time",
@ -1913,7 +1827,7 @@
"unit": "mm",
"type": "float",
"default_value": 0.5,
"value": "0 if adhesion_type == \"raft\" else layer_height_0",
"value": "layer_height_0",
"minimum_value": "0",
"maximum_value_warning": "10.0",
"settable_per_mesh": false,
@ -1938,7 +1852,7 @@
{
"label": "Minimum Layer Time",
"description": "The minimum time spent in a layer. This forces the printer to slow down, to at least spend the time set here in one layer. This allows the printed material to cool down properly before printing the next layer.",
"unit": "s",
"unit": "sec",
"type": "float",
"default_value": 5,
"minimum_value": "0",
@ -2406,7 +2320,7 @@
"description": "If the raft is enabled, this is the extra raft area around the object which is also given a raft. Increasing this margin will create a stronger raft while using more material and leaving less area for your print.",
"unit": "mm",
"type": "float",
"default_value": 15,
"default_value": 5,
"minimum_value_warning": "0",
"maximum_value_warning": "10",
"enabled": "adhesion_type == \"raft\""
@ -2456,7 +2370,6 @@
"unit": "mm",
"type": "float",
"default_value": 0.1,
"value": "layer_height",
"minimum_value": "0",
"maximum_value_warning": "2.0",
"enabled": "adhesion_type == \"raft\"",
@ -2469,8 +2382,7 @@
"description": "Width of the lines in the top surface of the raft. These can be thin lines so that the top of the raft becomes smooth.",
"unit": "mm",
"type": "float",
"default_value": 0.4,
"value": "line_width",
"default_value": 0.3,
"minimum_value": "0.0001",
"maximum_value_warning": "machine_nozzle_size * 2",
"enabled": "adhesion_type == \"raft\"",
@ -2483,7 +2395,7 @@
"description": "The distance between the raft lines for the top raft layers. The spacing should be equal to the line width, so that the surface is solid.",
"unit": "mm",
"type": "float",
"default_value": 0.4,
"default_value": 0.3,
"minimum_value": "0.0001",
"maximum_value_warning": "5.0",
"enabled": "adhesion_type == \"raft\"",
@ -2497,8 +2409,7 @@
"description": "Layer thickness of the middle raft layer.",
"unit": "mm",
"type": "float",
"default_value": 0.15,
"value": "layer_height * 1.5",
"default_value": 0.27,
"minimum_value": "0",
"maximum_value_warning": "5.0",
"enabled": "adhesion_type == \"raft\"",
@ -2511,7 +2422,7 @@
"description": "Width of the lines in the middle raft layer. Making the second layer extrude more causes the lines to stick to the bed.",
"unit": "mm",
"type": "float",
"default_value": 0.7,
"default_value": 1,
"value": "line_width * 2",
"minimum_value": "0.0001",
"maximum_value_warning": "machine_nozzle_size * 2",
@ -2525,8 +2436,7 @@
"description": "The distance between the raft lines for the middle raft layer. The spacing of the middle should be quite wide, while being dense enough to support the top raft layers.",
"unit": "mm",
"type": "float",
"default_value": 0.9,
"value": "raft_interface_line_width + 0.2",
"default_value": 1.0,
"minimum_value": "0",
"maximum_value_warning": "15.0",
"enabled": "adhesion_type == \"raft\"",
@ -2540,7 +2450,6 @@
"unit": "mm",
"type": "float",
"default_value": 0.3,
"value": "layer_height_0 * 1.2",
"minimum_value": "0",
"maximum_value_warning": "5.0",
"enabled": "adhesion_type == \"raft\"",
@ -2553,10 +2462,10 @@
"description": "Width of the lines in the base raft layer. These should be thick lines to assist in bed adhesion.",
"unit": "mm",
"type": "float",
"default_value": 0.8,
"default_value": 1,
"minimum_value": "0.0001",
"value": "machine_nozzle_size * 2",
"maximum_value_warning": "machine_nozzle_size * 3",
"value": "line_width * 2",
"maximum_value_warning": "machine_nozzle_size * 2",
"enabled": "adhesion_type == \"raft\"",
"settable_per_mesh": false,
"settable_per_extruder": true
@ -2567,8 +2476,7 @@
"description": "The distance between the raft lines for the base raft layer. Wide spacing makes for easy removal of the raft from the build plate.",
"unit": "mm",
"type": "float",
"default_value": 1.6,
"value": "raft_base_line_width * 2",
"default_value": 3.0,
"minimum_value": "0.0001",
"maximum_value_warning": "100",
"enabled": "adhesion_type == \"raft\"",
@ -2581,7 +2489,7 @@
"description": "The speed at which the raft is printed.",
"unit": "mm/s",
"type": "float",
"default_value": 20,
"default_value": 30,
"minimum_value": "0.1",
"maximum_value": "299792458000",
"maximum_value_warning": "200",
@ -2597,7 +2505,7 @@
"description": "The speed at which the top raft layers are printed. These should be printed a bit slower, so that the nozzle can slowly smooth out adjacent surface lines.",
"unit": "mm/s",
"type": "float",
"default_value": 20,
"default_value": 30,
"minimum_value": "0.1",
"maximum_value": "299792458000",
"maximum_value_warning": "100",
@ -2613,11 +2521,11 @@
"unit": "mm/s",
"type": "float",
"default_value": 15,
"value": "raft_speed * 0.75",
"minimum_value": "0.1",
"maximum_value": "299792458000",
"maximum_value_warning": "150",
"enabled": "adhesion_type == \"raft\"",
"value": "0.5 * raft_speed",
"settable_per_mesh": false,
"settable_per_extruder": true
},
@ -2632,7 +2540,7 @@
"maximum_value": "299792458000",
"maximum_value_warning": "200",
"enabled": "adhesion_type == \"raft\"",
"value": "0.75 * raft_speed",
"value": "0.5 * raft_speed",
"settable_per_mesh": false,
"settable_per_extruder": true
}
@ -2826,7 +2734,9 @@
"label": "Platform Adhesion Extruder",
"description": "The extruder train to use for printing the skirt/brim/raft. This is used in multi-extrusion.",
"type": "extruder",
"default_value": "0",
"default_value": 0,
"minimum_value": "0",
"maximum_value": "machine_extruder_count - 1",
"settable_per_mesh": false,
"settable_per_extruder": false
},
@ -2835,7 +2745,9 @@
"label": "Support Extruder",
"description": "The extruder train to use for printing the support. This is used in multi-extrusion.",
"type": "extruder",
"default_value": "0",
"default_value": 0,
"minimum_value": "0",
"maximum_value": "machine_extruder_count - 1",
"enabled": "support_enable",
"settable_per_mesh": false,
"settable_per_extruder": false,
@ -2845,9 +2757,10 @@
"label": "Support Infill Extruder",
"description": "The extruder train to use for printing the infill of the support. This is used in multi-extrusion.",
"type": "extruder",
"default_value": "0",
"default_value": 0,
"value": "support_extruder_nr",
"enabled": "support_enable",
"minimum_value": "0",
"maximum_value": "machine_extruder_count - 1",
"settable_per_mesh": false,
"settable_per_extruder": false
},
@ -2856,9 +2769,10 @@
"label": "First Layer Support Extruder",
"description": "The extruder train to use for printing the first layer of support infill. This is used in multi-extrusion.",
"type": "extruder",
"default_value": "0",
"default_value": 0,
"value": "support_extruder_nr",
"enabled": "support_enable",
"minimum_value": "0",
"maximum_value": "machine_extruder_count - 1",
"settable_per_mesh": false,
"settable_per_extruder": false
},
@ -2867,9 +2781,10 @@
"label": "Support Roof Extruder",
"description": "The extruder train to use for printing the roof of the support. This is used in multi-extrusion.",
"type": "extruder",
"default_value": "0",
"default_value": 0,
"value": "support_extruder_nr",
"enabled": "support_enable and support_roof_enable",
"minimum_value": "0",
"maximum_value": "machine_extruder_count - 1",
"settable_per_mesh": false,
"settable_per_extruder": false
}
@ -3061,31 +2976,6 @@
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"infill_mesh":
{
"label": "Infill Mesh",
"description": "Use this mesh to modify the infill of other meshes with which it overlaps. Replaces infill regions of other meshes with regions for this mesh. It's suggested to only print one Wall and no Top/Bottom Skin for this mesh.",
"type": "bool",
"default_value": false,
"settable_per_mesh": true,
"settable_per_extruder": false,
"settable_per_meshgroup": false,
"settable_globally": false
},
"infill_mesh_order":
{
"label": "Infill Mesh Order",
"description": "Determines which infill mesh is inside the infill of another infill mesh. An infill mesh with a higher order will modify the infill of infill meshes with lower order and normal meshes.",
"default_value": 0,
"value": "1 if infill_mesh else 0",
"minimum_value_warning": "1",
"maximum_value_warning": "50",
"type": "int",
"settable_per_mesh": true,
"settable_per_extruder": false,
"settable_per_meshgroup": false,
"settable_globally": false
},
"magic_mesh_surface_mode":
{
"label": "Surface Mode",
@ -3114,7 +3004,7 @@
{
"label": "Experimental Modes",
"type": "category",
"icon": "category_experimental",
"icon": "category_blackmagic",
"description": "experimental!",
"children":
{
@ -3180,8 +3070,7 @@
"description": "The maximum angle of overhangs after the they have been made printable. At a value of 0° all overhangs are replaced by a piece of model connected to the build plate, 90° will not change the model in any way.",
"unit": "°",
"type": "float",
"minimum_value": "-89",
"minimum_value_warning": "0",
"minimum_value": "0",
"maximum_value": "89",
"default_value": 50,
"enabled": "conical_overhang_enabled"
@ -3513,7 +3402,7 @@
{
"label": "WP Top Delay",
"description": "Delay time after an upward move, so that the upward line can harden. Only applies to Wire Printing.",
"unit": "s",
"unit": "sec",
"type": "float",
"default_value": 0,
"minimum_value": "0",
@ -3527,7 +3416,7 @@
{
"label": "WP Bottom Delay",
"description": "Delay time after a downward move. Only applies to Wire Printing.",
"unit": "s",
"unit": "sec",
"type": "float",
"default_value": 0,
"minimum_value": "0",
@ -3541,7 +3430,7 @@
{
"label": "WP Flat Delay",
"description": "Delay time between two horizontal segments. Introducing such a delay can cause better adhesion to previous layers at the connection points, while too long delays cause sagging. Only applies to Wire Printing.",
"unit": "s",
"unit": "sec",
"type": "float",
"default_value": 0.1,
"minimum_value": "0",
@ -3671,7 +3560,7 @@
"label": "WP Roof Outer Delay",
"description": "Time spent at the outer perimeters of hole which is to become a roof. Longer times can ensure a better connection. Only applies to Wire Printing.",
"type": "float",
"unit": "s",
"unit": "sec",
"default_value": 0.2,
"minimum_value": "0",
"maximum_value_warning": "2.0",

View file

@ -87,6 +87,21 @@
"material_bed_temperature": {
"enabled": "False"
},
"machine_max_feedrate_x": {
"default_value": 300
},
"machine_max_feedrate_y": {
"default_value": 300
},
"machine_max_feedrate_z": {
"default_value": 40
},
"machine_max_feedrate_e": {
"default_value": 45
},
"machine_acceleration": {
"default_value": 3000
},
"material_diameter": {
"enabled": "False"
},

View file

@ -17,6 +17,9 @@
"overrides": {
"machine_heated_bed": {
"default_value": true
},
"machine_max_feedrate_z": {
"default_value": 30
}
}
}