\
1091 | Direct Drive: 0.005 \
1092 | Bowden Extruder: 0.02 \
1093 | Suggested for Current Retraction Distance:%s" % suggested_factor)
1094 |
1095 | return [message, preset_title] # type: List[str]
1096 |
1097 | def _showPresetMessage(self, settings_changed: str=None, preset_msg: List[str]=None) -> None:
1098 | """Shows message box with a preset message and/or any affected user settings.
1099 |
1100 | + settings_changed: String of every user setting affected by preset.
1101 | + preset_msg: List of strings for preset message[0] and message title[1].
1102 | """
1103 | show_changes = [] # type: List[str]
1104 | preset_title = None
1105 | msg_title = "Suggested Settings Applied to Preset"
1106 |
1107 | if preset_msg and type(preset_msg) is list:
1108 | try: preset_title = preset_msg[1] # Safety check
1109 | except: preset_title = "Tuning Tower Preset"
1110 | finally: preset_msg = preset_msg[0]
1111 |
1112 | if settings_changed:
1113 | show_changes.append("Settings Changed:
")
1114 | show_changes.append(" * Disable suggested settings to revert changes")
1115 | show_changes.insert(1, settings_changed)
1116 |
1117 | if preset_msg: # Preface with preset message
1118 | show_changes.insert(0, preset_msg)
1119 |
1120 | show_changes = "".join(show_changes) # Convert message to single string
1121 |
1122 | elif preset_msg and not self._override_on: # Show only default preset message
1123 | msg_title = preset_title
1124 | show_changes = preset_msg
1125 |
1126 | if show_changes:
1127 | self.showMessage(
1128 | show_changes, "WARNING" if settings_changed else "NEUTRAL",
1129 | msg_title,
1130 | msg_time = 60 if settings_changed else 30,
1131 | stack_msg = bool(settings_changed))
1132 |
1133 |
1134 | def _getBackup(self, section: str="") -> Dict[Any, Any]:
1135 | """Dict of settings stored in Cura user config.
1136 |
1137 | Uses existing config parser to get preference data from [klipper_settings] sections.
1138 | The user settings backup is only needed if Cura closes with override enabled.
1139 | Preset section 'preset' returns user preset values or defaults if none exist.
1140 | * section: Str for [klipper_settings_] config section
1141 | """
1142 | ## Restricted: Uses Cura config parser for simplicity.
1143 | config_parser = self._application.getPreferences()._parser
1144 |
1145 | config_key = "klipper_settings" + ("_%s" % section.lstrip("_") if section else "")
1146 | config_settings = {} # type: Dict[str, Any]
1147 | preset_settings = {} # type: Dict[str, Any]
1148 |
1149 | try: # Get preset section key
1150 | preset_key = int(section[-1])
1151 | except IndexError:
1152 | preset_key = None
1153 |
1154 | try: # Get any settings in config section
1155 | config_settings.update(config_parser.items(config_key))
1156 | except configparser.NoSectionError:
1157 | Logger.log('d', "[%s] not found in Cura config", config_key)
1158 | except:
1159 | Logger.logException('e', "Could not load Cura config file.")
1160 |
1161 | if not preset_key:
1162 | return config_settings
1163 |
1164 | if not config_settings: # Get default preset settings
1165 | config_settings = self.getPresetDefinition("default")
1166 |
1167 | for setting, value in config_settings.items():
1168 | try: value = float(value) if value != None else "" # Convert number values back into float
1169 | except ValueError: pass
1170 |
1171 | preset_settings[preset_key, setting] = value
1172 |
1173 | return preset_settings # type: Dict[(int, str), Any]
1174 |
1175 | def _restoreUserSettings(self, reset_override: bool=True, announce: bool=True) -> None:
1176 | """Restore non tuning tower settings changed by preset.
1177 |
1178 | All user settings are restored from backup in real time.
1179 | + announce: False disables status message when complete.
1180 | + reset_override: True ensures suggested settings option is disabled.
1181 | """
1182 | if reset_override: # Disables suggested settings option if enabled
1183 | self.settingWizard("klipper_tuning_tower_override", action = 'Reset')
1184 |
1185 | if not self._user_settings:
1186 | if self._override_on:
1187 | Logger.log('d', "No saved user settings to restore.")
1188 | else:
1189 | for setting, value in self._user_settings.items():
1190 | self.settingWizard(setting, value, "Restore")
1191 |
1192 | self._user_settings.clear()
1193 | Logger.log('d', "All user settings have been restored.")
1194 |
1195 | if announce and self._override_on:
1196 | self.showMessage(
1197 | "Suggested tuning tower settings restored to original values.",
1198 | "POSITIVE", "Suggested Settings Disabled", 5)
1199 |
1200 | self._override_on = False
1201 |
1202 |
1203 | def settingWizard(self, setting_key: str, new_value: Any=None, action: str='Get') -> Optional[Any]:
1204 | """Action manager to control Cura settings and store values to local Cura config.
1205 |
1206 | Returns Cura setting from either global or active extruder stack.
1207 | Clears setting instance if new set value same as default value.
1208 | User setting changes are stored in Cura config under [klipper_settings].
1209 | Custom preset values stored in Cura config under [klipper_settings_preset].
1210 | * setting_key: String for existing Cura setting.
1211 | + new_value: Any value for setting_key or comparative for 'Save' action.
1212 | + action: String specifying the operation for setting_key;
1213 | Get (default) : Return value from global or active extruder stack
1214 | Get : Return any existing setting property (e.g. 'Get label')
1215 | Save, Set, Save&Set : Save value to config and temp dict [and/or] set new_value
1216 | SaveCustom : Save current preset value to config and preset dict
1217 | Restore : Restore setting_key value from local config
1218 | Reset, Save&Reset : Save value to config and temp dict [and/or] reset to default value
1219 | """
1220 | # TODO: Only active extruder is currently supported.
1221 | extruder_stack = self._application.getExtruderManager().getActiveExtruderStack()
1222 | global_stack = self._application.getGlobalContainerStack()
1223 |
1224 | if not global_stack or not extruder_stack:
1225 | return
1226 |
1227 | if isinstance(setting_key, tuple): # Get setting key if a custom preset tuple key
1228 | custom_key = setting_key
1229 | setting_key = setting_key[1]
1230 |
1231 | if action.startswith(("Save", "Restore")): # Set and check config key
1232 | preferences = self._application.getPreferences()
1233 | config_setting = "klipper_settings/%s" % setting_key
1234 |
1235 | extruder_setting = True if setting_key.startswith("extruder") else (
1236 | global_stack.getProperty(setting_key,'settable_per_extruder'))
1237 |
1238 | for stack in [extruder_stack] if extruder_setting else [global_stack]:
1239 | current_value = stack.getProperty(setting_key, 'value')
1240 | value_changed = current_value != new_value
1241 |
1242 | if action.startswith("Get"):
1243 | if not action.endswith("Get"): # Action string contains property
1244 | property = "".join(action.split()).lower()[3:]
1245 | try: # Get requested property
1246 | if property.endswith("uservalue"): # Return true if user value
1247 | current_value = stack.hasUserValue(setting_key)
1248 | else: # Return value of property
1249 | current_value = stack.getProperty(setting_key, property)
1250 | except:
1251 | Logger.log('e', "Invalid Property '%s'", property)
1252 |
1253 | return current_value
1254 |
1255 | if action.startswith("Save"):
1256 | if action.endswith("Custom"): # Value saved to global dict and preset in user config
1257 | config_setting = "klipper_settings_preset%i/%s" % (custom_key[0], custom_key[1])
1258 | self._custom_presets[custom_key] = current_value # type: Dict[(int, str), Any]
1259 | preferences.addPreference(config_setting, None)
1260 | preferences.setValue(config_setting, str(current_value))
1261 |
1262 | elif value_changed: # New value saved to global dict and user config
1263 | self._user_settings[setting_key] = current_value # type: Dict[str, Any]
1264 | preferences.addPreference(config_setting, None)
1265 | preferences.setValue(config_setting, current_value)
1266 |
1267 | if action == "Restore":
1268 | # Clear redundant config backup
1269 | preferences.removePreference(config_setting) # Logged by cura
1270 |
1271 | action += "Set" # Set original user value
1272 | Logger.log('d', "%s restored to original value.", setting_key)
1273 |
1274 | if action.endswith("Set") and value_changed:
1275 | stack.setProperty(setting_key, 'value', new_value)
1276 |
1277 | # Clear setting instance if new value same as default value
1278 | if new_value == stack.getProperty(setting_key, 'default_value'):
1279 | action += "Reset"
1280 |
1281 | if action.endswith("Reset"): # Removes setting instance
1282 | # TODO: Settings tied to multiple extruders may not get reset.
1283 | stack.getTop().removeInstance(setting_key)
1284 |
1285 |
1286 | def _showWarningMessage(self, msg_time: int=45) -> None:
1287 | """Show final setting warnings as a single message box upon saving print file.
1288 |
1289 | + msg_time: Integer in seconds until message disappears.
1290 | """
1291 | if self._warning_msg:
1292 | self.showMessage("
".join(self._warning_msg), "WARNING", "Klipper Settings Warnings", msg_time)
1293 | self._warning_msg.clear()
1294 |
1295 | def _hideActiveMessages(self, msg_type: Optional[List[int]]=-3) -> None:
1296 | """Hide potentially active plugin messages.
1297 |
1298 | + msg_type: Integer or list[int] from 0-3 for icon type(s) to hide;
1299 | Negative integer hides all types except the specified value.
1300 | """
1301 | if self._previous_msg:
1302 | for message in self._active_msg_list:
1303 | self.hideMessageType(message, msg_type)
1304 |
1305 | def showMessage(self, text: str, msg_type: Any=1, msg_title: str="Klipper Settings", msg_time: int=20, stack_msg: bool=False) -> None:
1306 | """Display customized message box in Cura.
1307 |
1308 | Previous plugin message will be hidden by default.
1309 | Maintains list of potentially active messages to be hidden when necessary.
1310 | Message types only compatible with Cura version 4.10+
1311 | * text: String to set message status.
1312 | + msg_type: String or integer to set icon type; 0:POSITIVE 1:NEUTRAL 2:WARNING 3:ERROR
1313 | + msg_title: String to set message title.
1314 | + msg_time: Integer in seconds until message disappears.
1315 | + stack_msg: True will not hide a previous message.
1316 | """
1317 | # TODO: Should really categorize plugin messages instead of just using universal types.
1318 | if not isinstance(msg_type, int):
1319 | msg_type = (
1320 | 0 if msg_type == "POSITIVE" else
1321 | 1 if msg_type == "NEUTRAL" else
1322 | 2 if msg_type == "WARNING" else 3
1323 | )
1324 |
1325 | if not stack_msg and self._previous_msg:
1326 | self.hideMessageType(self._previous_msg, -3) # Hides a previous non-error message
1327 | if self._previous_msg in self._active_msg_list:
1328 | self._active_msg_list.remove(self._previous_msg)
1329 |
1330 | if self._cura_version <= Version("4.10.0"):
1331 | display_message = Message(catalog.i18nc("@info:status", text),
1332 | lifetime = msg_time,
1333 | title = catalog.i18nc("@info:title", "%s" % msg_title))
1334 | else:
1335 | display_message = Message(catalog.i18nc("@info:status", text),
1336 | lifetime = msg_time,
1337 | title = catalog.i18nc("@info:title", "%s" % msg_title),
1338 | message_type = msg_type)
1339 |
1340 | self._previous_msg = display_message # Saves copy of message
1341 | if display_message not in self._active_msg_list: # Add to potentially active messages
1342 | self._active_msg_list.append(display_message)
1343 |
1344 | display_message.show()
1345 |
1346 | def hideMessageType(self, message: Message, msg_type: Optional[List[int]]=1) -> None:
1347 | """Hide previous message box only by specific icon types.
1348 |
1349 | Defaults to hiding neutral messages only.
1350 | All message types are hidden if Cura version < 4.10.
1351 | * message: Message object to hide if still active.
1352 | + msg_type: Integer or list[int] from '0-3' for icon type(s) to be hidden;
1353 | Negative integer will hide all types except the specified value.
1354 | """
1355 | if not message:
1356 | return
1357 |
1358 | legacy_version = self._cura_version <= Version("4.10.0")
1359 | hide_types = [0, 1, 2, 3]
1360 | active_msg_type = message.getMessageType() if not legacy_version else 1
1361 |
1362 | try:
1363 | if msg_type < 0:
1364 | hide_types.pop(abs(msg_type)) # Hides all other types
1365 | else:
1366 | hide_types = [msg_type] # Hides a specific type
1367 | except TypeError:
1368 | hide_types = list(msg_type) # type: List[int]
1369 |
1370 | if active_msg_type in hide_types or legacy_version:
1371 | if message in self._active_msg_list:
1372 | self._active_msg_list.remove(message)
1373 |
1374 | message.hide()
1375 |
1376 |
1377 | def getPresetDefinition(self, new_preset: str, override: bool=False) -> Dict[str, Any]:
1378 | """Dict of predefined setting values for tuning tower presets.
1379 |
1380 | Klipper Pressure Advance and Input Shaper calibrations currently supported.
1381 | * new_preset: String for preset name
1382 | + override: True includes any settings enabled by 'Apply Suggested Settings'.
1383 | """
1384 | # Tuple lists only necessary to guarantee OrderedDict in older Cura versions
1385 | presets = [(
1386 | 'default', [
1387 | ('klipper_tuning_tower_command', ''),
1388 | ('klipper_tuning_tower_parameter', ''),
1389 | ('klipper_tuning_tower_method', 'factor'),
1390 | ('klipper_tuning_tower_start', 0),
1391 | ('klipper_tuning_tower_skip', 0),
1392 | ('klipper_tuning_tower_factor', 0),
1393 | ('klipper_tuning_tower_band', 0),
1394 | ('klipper_tuning_tower_step_delta', 0),
1395 | ('klipper_tuning_tower_step_height', 0),
1396 | ]),(
1397 | 'pressure', [
1398 | ('klipper_tuning_tower_command', 'SET_PRESSURE_ADVANCE'),
1399 | ('klipper_tuning_tower_parameter', 'ADVANCE'),
1400 | ('klipper_tuning_tower_method', 'factor'),
1401 | ('klipper_tuning_tower_start', 0),
1402 | ('klipper_tuning_tower_skip', 0),
1403 | ('klipper_tuning_tower_factor', 0),
1404 | ('klipper_tuning_tower_band', 0),
1405 | ('klipper_velocity_limits_enable', True),
1406 | ('klipper_velocity_limit', 0),
1407 | ('klipper_accel_limit', 500),
1408 | ('klipper_accel_to_decel_limit', 0),
1409 | ('klipper_corner_velocity_limit', 1.0),
1410 | ('klipper_pressure_advance_enable', True),
1411 | ('klipper_pressure_advance_factor', 0),
1412 | ('acceleration_enabled', False)
1413 | ]),(
1414 | 'accel', [
1415 | ('klipper_tuning_tower_command', 'SET_VELOCITY_LIMIT'),
1416 | ('klipper_tuning_tower_parameter', 'ACCEL'),
1417 | ('klipper_tuning_tower_method', 'step'),
1418 | ('klipper_tuning_tower_start', 1500),
1419 | ('klipper_tuning_tower_skip', 0),
1420 | ('klipper_tuning_tower_step_delta', 500),
1421 | ('klipper_tuning_tower_step_height', 5),
1422 | ('klipper_velocity_limits_enable', True),
1423 | ('klipper_velocity_limit', 0),
1424 | ('klipper_accel_limit', 0),
1425 | ('klipper_accel_to_decel_limit', 7000),
1426 | ('klipper_corner_velocity_limit', 1.0),
1427 | ('klipper_pressure_advance_enable', True),
1428 | ('klipper_pressure_advance_factor', 0),
1429 | ('klipper_input_shaper_enable', True),
1430 | ('klipper_shaper_freq_x', 0),
1431 | ('klipper_shaper_freq_y', 0),
1432 | ('acceleration_enabled', False)
1433 | ])
1434 | ## Next Preset:
1435 | ]
1436 | presets = OrderedDict(presets) # Convert and preserve setting order
1437 | preset_dict = OrderedDict() # type: OrderedDict[str, Any]
1438 |
1439 | for preset in presets:
1440 |
1441 | if preset == new_preset:
1442 | preset_dict.update(presets[preset])
1443 |
1444 | if not override: # Dict order isn't necessary
1445 | preset_dict = {k: v for k, v in preset_dict.items() if k.startswith('klipper_tuning')}
1446 |
1447 | return preset_dict
1448 |
1449 |
1450 | # Dict order must be preserved
1451 | __pressure_advance_setting_key = [
1452 | ("_FACTORS", "klipper_pressure_advance_factor"), ## [0-3] Parent settings
1453 | ("_WALLS", "klipper_pressure_advance_wall"),
1454 | ("_SUPPORTS", "klipper_pressure_advance_support"),
1455 | ("LAYER_0", "klipper_pressure_advance_layer_0"),
1456 | ("WALL-OUTER", "klipper_pressure_advance_wall_0"), ## [4-7] Gcode mesh features
1457 | ("WALL-INNER", "klipper_pressure_advance_wall_x"),
1458 | ("SKIN", "klipper_pressure_advance_topbottom"),
1459 | ("FILL", "klipper_pressure_advance_infill"),
1460 | ("SUPPORT", "klipper_pressure_advance_support_infill"), ## [8-11] Gcode non-mesh features
1461 | ("SUPPORT-INTERFACE", "klipper_pressure_advance_support_interface"),
1462 | ("PRIME-TOWER", "klipper_pressure_advance_prime_tower"),
1463 | ("SKIRT", "klipper_pressure_advance_skirt_brim")
1464 | ]
1465 | __pressure_advance_setting_key = OrderedDict(__pressure_advance_setting_key) # Older cura compatibility
1466 |
1467 | __tuning_tower_setting_key = [
1468 | ("tuning_method", "klipper_tuning_tower_method"),
1469 | ("command", "klipper_tuning_tower_command"),
1470 | ("parameter", "klipper_tuning_tower_parameter"),
1471 | ("start", "klipper_tuning_tower_start"),
1472 | ("skip", "klipper_tuning_tower_skip"),
1473 | ("factor", "klipper_tuning_tower_factor"),
1474 | ("band", "klipper_tuning_tower_band"),
1475 | ("step_delta", "klipper_tuning_tower_step_delta"),
1476 | ("step_height", "klipper_tuning_tower_step_height")
1477 | ]
1478 | __tuning_tower_setting_key = OrderedDict(__tuning_tower_setting_key)
1479 |
1480 | __velocity_limit_setting_key = {
1481 | "velocity": "klipper_velocity_limit",
1482 | "accel": "klipper_accel_limit",
1483 | "accel_to_decel": "klipper_accel_to_decel_limit",
1484 | "square_corner_velocity": "klipper_corner_velocity_limit"
1485 | }
1486 | __firmware_retraction_setting_key = {
1487 | "retract_length": "klipper_retract_length",
1488 | "unretract_extra_length": "klipper_retract_prime_length",
1489 | "retract_speed": "klipper_retract_speed",
1490 | "unretract_speed": "klipper_retract_prime_speed"
1491 | }
1492 | __input_shaper_setting_key = {
1493 | "shaper_freq_x": "klipper_shaper_freq_x",
1494 | "shaper_freq_y": "klipper_shaper_freq_y",
1495 | "shaper_type_x": "klipper_shaper_type_x",
1496 | "shaper_type_y": "klipper_shaper_type_y",
1497 | "damping_ratio_x": "klipper_damping_ratio_x",
1498 | "damping_ratio_y": "klipper_damping_ratio_y"
1499 | }
1500 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## KlipperSettingsPlugin
2 |
3 | **Klipper Settings 1.0 is now available in the [Cura Marketplace](https://marketplace.ultimaker.com/app/cura/plugins/JJGraphiX/KlipperSettingsPlugin)!**
4 | *Thank you to everyone who helped with beta testing and provided feedback.*
5 |
6 | Plugin for Ultimaker Cura which adds a new **Klipper Settings** category with a number of Klipper-specific settings and features to the main settings list. Only compatible with [*Klipper firmware*](https://github.com/Klipper3d/klipper/). All features are designed to work without the need for additional Klipper macros.
7 |
8 | Klipper Settings is an evolution of my [PressureAdvanceSettingPlugin](https://github.com/jjgraphix/PressureAdvanceSettingPlugin), which is no longer supported. The new Klipper settings category includes improved Pressure Advance settings as well as a number of additional settings and features, including firmware retraction and calibration presets to initiate Klipper's Tuning Tower sequence. Most settings can be saved for indvidual material profiles using the [Material Settings Plugin](https://marketplace.ultimaker.com/app/cura/plugins/fieldofview/MaterialSettingsPlugin) by FieldOfView.
9 |
10 | ### Major Release Notes - v1.0.x
11 | - Z Offset Setting
12 | - Z Offset Layer 0 feature
13 | - Pressure Advance Smooth Time
14 | - Support for 3 Tuning Tower user presets
15 | - Pressure Advance preset calculates suggested factor value
16 | - Firmware retraction multi-extruder support
17 | - Firmware retraction uses Cura retraction values by default
18 | - Various bug fixes and UI improvements
19 | - *Experimental Features:*
20 | - Bed Mesh Calibrate
21 | - Klipper UI Preheat Support
22 |
23 | ***Check setting visibility after updating from a previous version.***
24 |
25 | Latest Update Notes
26 |
27 |
Bug Fix v1.0.2
28 |
29 |
Setting definition compatibility for older versions
30 |
Fixed duplicate setting relations
31 |
Fixed changing machines with preset settings enabled
32 |
Smooth time not tied to pressure advance control
33 |
Final warnings now combined into single message
34 |
Minor fixes and setting cleanup
35 |
36 |
37 |
38 |
39 | Previous Release Notes (Beta)
40 |
41 |
v0.8.0
42 |
43 |
Compatibility for Cura version 5
44 |
Adds new "Klipper Settings" category
45 |
Adds Klipper velocity limit settings
46 |
Pressure Advance supports per-object settings and multiple extruders
47 |
Simplified Tuning Tower settings
48 |
49 |
v0.9.0
50 |
51 |
Adds Klipper category icon
52 |
Firmware retraction settings
53 |
Input shaper settings
54 |
New presets feature for tuning tower:
55 |
56 |
Pressure Advance preset
57 |
Ringing Tower preset
58 |
59 |
Improved descriptions and setting behavior
60 |
Various bug fixes and improvements
61 |
62 |
v0.9.1
63 |
64 |
Fixed crashing in older Cura versions
65 |
Custom icon now only enabled for Cura 5.0+
66 |
Improved presets and backup behavior
67 |
68 |
v0.9.2
69 |
70 |
Fixed incorrect parameter in Pressure Advance Preset
71 |
Preset layer height now suggested from nozzle size
72 |
73 |
74 |
75 |
76 | ### Cura Compatibility
77 | **Recommended to use Cura 5.0 (SDK 8.0.0) and newer.**
78 | Versions prior to 4.0.0 (SDK 6.0.0) are not supported and prior to 4.5.0 may not be compatible in the future. Testing may be limited in versions before Cura 5.0 so please report any issues if they are still needed.
79 |
80 | **Multiple extruders are supported for compatible settings.**
81 |
82 | ### How to Use
83 | After installation the new Klipper Settings category will be hidden and appears at the bottom of setting visibility preferences. It's recommended to first enable visibility of every setting then hide whatever isn't needed later. If it's not appearing, try selecting the "All" settings preset. Options such as *Apply Suggested Settings* only appear when other settings are active and should be left visible.
84 |
85 | **Most setting values will remain applied after the print until the printer is restarted**. Klipper config values cannot be modified by the plugin.
86 |
87 |
88 | Example of Available Klipper Settings:
89 | Tool tips explain why some values are negative by default.
90 |
91 | 
92 |
93 |
94 | **See tool tips in Cura for descriptions of every setting.**
95 |
96 | *I highly recommend Ghostkeeper's [Settings Guide](https://marketplace.ultimaker.com/app/cura/plugins/Ghostkeeper/SettingsGuide2) plugin to improve tool tip readability.*
97 |
98 | ## Feature Overview
99 | - **Tuning Tower Calibration**
100 | [Klipper Tuning Tower](https://www.klipper3d.org/G-Codes.html#tuning_tower) settings can be used to fine tune a wide range of Klipper commands. Presets are available to run common *Pressure Advance* and *Input Shaper* calibrations. The *Apply Suggested Settings* option will automatically apply additional printer settings necessary for the calibration as defined in the Klipper documentation. Any changes to Cura settings are backed up and restored to their prior values when the tuning tower is disabled. Custom presets allow 3 unique tuning tower profiles to be saved for frequent calibrations.
101 |
102 |
103 | Example of tuning tower preset:
107 |
108 | - **Pressure Advance**
109 | Klipper's pressure advance is used sharpen the appearance of corners, improve line width consistency and reduce ooze during non-extrude moves. This can be adjusted for multiple extruders, individual line types and different mesh objects in the same print. The *Pressure Advance* tuning tower preset can be used to tune these values as described in the [Klipper documentation](https://www.klipper3d.org/Pressure_Advance.html). *Pressure Advance Smooth Time* can also be adjusted for each print.
110 |
111 | - **Firmware Retraction**
112 | Enables the use of G10 and G11 firmware retraction gcode commands. The [firmware_retraction] section in [Klipper configuration](https://www.klipper3d.org/Config_Reference.html#firmware_retraction) must first be enabled to use this feature. Cura's standard retraction settings are mirrored as the default values, allowing settings to easily be stored for individual materials. Multiple extruders are supported without needing additional macros. Settings for each extruder are applied immediately following gcode tool change commands (T0, T1, etc.).
113 |
114 | - **Z Offset Control**
115 | Due to the inherent risk, no setting will apply a permanent adjustment to an existing offset. The *Initial Layer Z Offset* feature applies SET_GCODE_OFFSET Z_ADJUST= before all gcode coordinates equal to the first layer height then instructs Klipper to revert the offset on the next z axis change, even if the print is stopped. For added safety, the maximum adjustment is +/- first layer height.
116 | The *Override Z Offset* option defines a total offset value with SET_GCODE_OFFSET Z= after the start gcode sequence. This overrides any existing z offset adjustment and will remain applied. **Use caution when enabling these options.**
117 |
118 | *If both options are enabled, their effects will be combined for the first layer.*
119 |
120 | - **Input Shaper Control**
121 | Controls settings associated with Klipper's resonance compensation. The *Ringing Tower* tuning tower preset can be used to manually tune these values as described in the [Klipper documentation](https://www.klipper3d.org/Resonance_Compensation.html).
122 |
123 | - **Velocity Limits Control**
124 | Controls the printer's [velocity and acceleration limits](https://www.klipper3d.org/Config_Reference.html#printer). Any changes will persist after the print has completed. These are generally not necessary to adjust outside of tuning tower calibrations.
125 |
126 | - **Experimental Features**
127 | New features in development which have been tested but may be modified or removed in the future. Read corresponding tool tips in Cura for more information. Most new feature requests will first be tested here moving forward.
128 |
129 |
130 | ## Installation
131 | Klipper Settings can now be installed directly from the [Cura Marketplace](https://marketplace.ultimaker.com/app/cura/plugins/JJGraphiX/KlipperSettingsPlugin).
132 |
133 | After installing, enable visibility of all new settings in Cura preferences.
134 |
135 | To Install/Update from Source Files:
136 |
137 | - Download source .zip file from Github.
138 | - Open Cura, click Help, Show Configuration Folder, then navigate to "plugins" folder and unpack .zip file.
139 | - Rename the unpacked folder to "KlipperSettingsPlugin", removing Github suffix (e.g. "-main").
140 | - Restart Cura and check settings visibility in preferences.
141 | To update a previous version, simply replace all contents of the KlipperSettingsPlugin folder with the latest release.
142 |
143 |
144 |
145 | ## More Info
146 |
147 | For more information about Klipper firmware, see the official documentation at [Klipper3D.org](https://www.klipper3d.org).
148 |
149 | *For questions or feedback, you can contact me directly at jjfx.contact@gmail.com.*
150 |
151 | *If you wish to support my work, buying me a coffee on [Ko-Fi](https://ko-fi.com/jjjfx) is greatly appreciated.*
152 |
--------------------------------------------------------------------------------
/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2023 J.Jarrard / JJFX
2 | # The KlipperSettingsPlugin is released under the terms of the AGPLv3 or higher.
3 |
4 | from . import KlipperSettingsPlugin
5 |
6 |
7 | def getMetaData():
8 | return {}
9 |
10 | def register(app):
11 | return {"extension": KlipperSettingsPlugin.KlipperSettingsPlugin()}
12 |
--------------------------------------------------------------------------------
/klipper_settings.def.json:
--------------------------------------------------------------------------------
1 | {
2 | "klipper_tuning_tower_enable": {
3 | "label": "Enable Tuning Tower",
4 | "description": "Enable Klipper's tuning tower sequence to precisely tune a specified parameter at given intervals during the print.
Any models on the build plate will be affected by the tuning sequence.",
5 | "type": "bool",
6 | "default_value": false,
7 | "warning_value": true,
8 | "settable_per_mesh": false,
9 | "settable_per_extruder": false
10 | },
11 | "klipper_tuning_tower_preset": {
12 | "label": "Tuning Tower Presets",
13 | "description": "Presets for common Tuning Tower calibrations and custom user profiles. Only Tuning Tower settings are affected by a preset unless Apply Suggested Settings is also enabled.
Custom preset profiles are saved in the Cura config and only affect Tuning Tower settings.
Recommended to use with Klipper's calibration models.",
14 | "type": "enum",
15 | "options": {
16 | "pressure": "Pressure Advance",
17 | "accel": "Ringing Tower",
18 | "custom1": "Custom Preset 1",
19 | "custom2": "Custom Preset 2",
20 | "custom3": "Custom Preset 3"
21 | },
22 | "default_value": "custom1",
23 | "enabled": "klipper_tuning_tower_enable",
24 | "settable_per_mesh": false,
25 | "settable_per_extruder": false,
26 | "children": {
27 | "klipper_tuning_tower_override": {
28 | "label": "Apply Suggested Settings",
29 | "description": "Applies additional Klipper settings necessary for the current calibration sequence. When enabled, a number of additional Klipper and Cura settings defined by the preset will be adjusted. Otherwise presets only affect Tuning Tower setting values. All changes are as described in the Klipper documentation.
Suggestions are shown for any settings which still need to be set manually.
Disable to restore changed setting values.",
30 | "type": "bool",
31 | "default_value": false,
32 | "enabled": "klipper_tuning_tower_enable and klipper_tuning_tower_preset in ['pressure', 'accel']",
33 | "warning_value": true,
34 | "settable_per_mesh": false,
35 | "settable_per_extruder": false
36 | }
37 | }
38 | },
39 | "klipper_tuning_tower_command": {
40 | "label": "Tuning Tower Command",
41 | "description": "The Klipper command to execute during the tuning process. This value must be specified.
Common Examples: SET_PRESSURE_ADVANCE SET_VELOCITY_LIMIT SET_RETRACTION
Quotes automatically added for multiple words: 'SET_HEATER_TEMPERATURE HEATER=extruder'",
42 | "type": "str",
43 | "default_value": "",
44 | "allow_empty": false,
45 | "regex_blacklist_pattern": ".{60,}|^.{,59}[^a-zA-Z0-9_='\\s].*(?# Limit 60 usable chars)",
46 | "enabled": "klipper_tuning_tower_enable",
47 | "settable_per_mesh": false,
48 | "settable_per_extruder": false
49 | },
50 | "klipper_tuning_tower_parameter": {
51 | "label": "Tuning Tower Parameter",
52 | "description": "The parameter of the command to execute during the tuning process. This value must be specified.
Input can not contain spaces or special characters.
Common Examples: FACTOR ACCEL RETRACT_LENGTH TARGET",
53 | "type": "str",
54 | "default_value": "",
55 | "allow_empty": false,
56 | "regex_blacklist_pattern": ".{40,}|.{,39}\\W.*(?# Limit 40 usable chars)",
57 | "enabled": "klipper_tuning_tower_enable",
58 | "settable_per_mesh": false,
59 | "settable_per_extruder": false
60 | },
61 | "klipper_tuning_tower_start": {
62 | "label": "Tuning Tower Start Value",
63 | "description": "The starting value of the parameter specified for the tuning process.
A value of '0' typically starts with the command disabled.",
64 | "type": "float",
65 | "default_value": 0,
66 | "minimum_value": "0",
67 | "enabled": "klipper_tuning_tower_enable",
68 | "settable_per_mesh": false,
69 | "settable_per_extruder": false,
70 | "children": {
71 | "klipper_tuning_tower_skip": {
72 | "label": "Tuning Tower Skip Height",
73 | "description": "(Optional) The z-height in mm at which the tuning process will begin. Below this height only the start value will be used. If omitted, the tuning process simply begins at the first layer. This is often used to skip the initial layers of the print.
A value of '0' will disable skip height.",
74 | "type": "float",
75 | "unit": "mm",
76 | "default_value": 0,
77 | "minimum_value": "0",
78 | "maximum_value_warning": "99",
79 | "enabled": "klipper_tuning_tower_enable",
80 | "settable_per_mesh": false,
81 | "settable_per_extruder": false
82 | }
83 | }
84 | },
85 | "klipper_tuning_tower_method": {
86 | "label": "Tuning Tower Method",
87 | "description": "The adjustment method used for the tuning process.
Use FACTOR when precisely measuring the z-height of the tuning tower to determine the optimum value. Used to tune a wide range of values for features like pressure advance. This enables the optional band height setting to specify an incremental height adjustment.
Use STEP if the tower model has steps of discrete values which can be counted to determine the optimum value. Typically best suited for objects like temperature towers. This enables the required settings step delta and step height.",
88 | "type": "enum",
89 | "options": {
90 | "factor": "Factor",
91 | "step": "Step"
92 | },
93 | "default_value": "factor",
94 | "enabled": "klipper_tuning_tower_enable",
95 | "settable_per_mesh": false,
96 | "settable_per_extruder": false,
97 | "children": {
98 | "klipper_tuning_tower_factor": {
99 | "label": "Tuning Tower Factor",
100 | "description": "The factor used to continuously adjust the start value throughout the tuning process. The value will change at a rate of factor per mm. This may be used in combination with band height.
A value greater than '0' is required.
To determine result, precisely measure the desired Z height then use the following formula:
START + FACTOR * Z_HEIGHT",
101 | "type": "float",
102 | "default_value": 0,
103 | "minimum_value": "0.001",
104 | "enabled": "klipper_tuning_tower_enable and klipper_tuning_tower_method == 'factor'",
105 | "settable_per_mesh": false,
106 | "settable_per_extruder": false
107 | },
108 | "klipper_tuning_tower_band": {
109 | "label": "Tuning Tower Band Height",
110 | "description": "(Optional) The height in mm of each adjustment band. The value is adjusted at an average rate of factor per mm, but only applied in discrete bands of Z height.
A value of '0' disables the band height option.
Formula with band enabled: START + FACTOR * ((floor(Z_HEIGHT / BAND) + .5) * BAND)",
111 | "type": "float",
112 | "unit": "mm",
113 | "default_value": 0,
114 | "minimum_value": "0",
115 | "maximum_value_warning": "99",
116 | "enabled": "klipper_tuning_tower_enable and klipper_tuning_tower_method == 'factor'",
117 | "settable_per_mesh": false,
118 | "settable_per_extruder": false
119 | },
120 | "klipper_tuning_tower_step_delta": {
121 | "label": "Tuning Tower Step Delta",
122 | "description": "The step factor used to adjust the start value throughout the tuning process. The start value will change by step delta every step height in mm.
Value can be positive or negative and used in combination with step height.
To determine result, simply count the bands or labels on the model.
Formula: START + STEP_DELTA * floor(Z_HEIGHT / STEP_HEIGHT)",
123 | "type": "float",
124 | "default_value": 0,
125 | "minimum_value_warning": "-0.001",
126 | "maximum_value_warning": "9999",
127 | "enabled": "klipper_tuning_tower_enable and klipper_tuning_tower_method == 'step'",
128 | "settable_per_mesh": false,
129 | "settable_per_extruder": false
130 | },
131 | "klipper_tuning_tower_step_height": {
132 | "label": "Tuning Tower Step Height",
133 | "description": "An incremental distance in mm at which step delta will adjust the start value throughout the tuning process.
Value must be greater than '0' and used in combination with step delta.
To determine the result, simply count the bands or labels on the model.
Formula: START + STEP_DELTA * floor(Z_HEIGHT / STEP_HEIGHT)",
134 | "type": "float",
135 | "unit": "mm",
136 | "default_value": 0,
137 | "minimum_value": "0.0001",
138 | "maximum_value_warning": "50",
139 | "enabled": "klipper_tuning_tower_enable and klipper_tuning_tower_method == 'step'",
140 | "settable_per_mesh": false,
141 | "settable_per_extruder": false
142 | }
143 | }
144 | },
145 | "klipper_pressure_advance_enable": {
146 | "label": "Pressure Advance Control",
147 | "description": "Enables control of Pressure Advance for Klipper firmware. This feature can greatly sharpen the appearance of corners, improve line width consistency and reduce the need for retraction during non-extrusion moves. Supports control of individual mesh objects and multiple extruders.
To disable Pressure Advance, enable and set values to '0'.",
148 | "type": "bool",
149 | "default_value": false,
150 | "settable_per_mesh": false,
151 | "settable_per_extruder": false
152 | },
153 | "klipper_pressure_advance_factor": {
154 | "label": "Pressure Advance Factor",
155 | "description": "Extrusion coefficient for Klipper's Pressure Advance feature.
Common values are 0.01 - 0.10 for direct drive and 0.20 - 0.60 for bowden extruders. High values can cause excessive extruder movements which may result in missed extruder steps when accelerating/decelerating. Recommended to keep values below 0.50. Adjustments may be necessary for different materials, nozzles, etc.
A value of '0' will disable Pressure Advance.
Default: 0 (Disable)",
156 | "type": "float",
157 | "default_value": 0,
158 | "minimum_value": "0",
159 | "maximum_value": "2",
160 | "maximum_value_warning": "0.8",
161 | "enabled": "resolveOrValue('klipper_pressure_advance_enable')",
162 | "settable_per_mesh": true,
163 | "settable_per_extruder": true,
164 | "children": {
165 | "klipper_pressure_advance_infill": {
166 | "label": "Infill Pressure Advance",
167 | "description": "Pressure Advance factor when printing infill. Could be used to minimize excessive extruder movement during infill but reducing too much may increase stringing.
A value of '0' disables pressure advance for this feature.",
168 | "type": "float",
169 | "default_value": 0,
170 | "value": "klipper_pressure_advance_factor",
171 | "minimum_value": "0",
172 | "maximum_value": "2",
173 | "maximum_value_warning": "0.8",
174 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and infill_sparse_density > 0",
175 | "settable_per_mesh": true,
176 | "settable_per_extruder": true,
177 | "limit_to_extruder": "infill_extruder_nr"
178 | },
179 | "klipper_pressure_advance_wall": {
180 | "label": "Wall Pressure Advance",
181 | "description": "Pressure Advance factor used when printing walls. Optimized values can sharpen the appearance of corners, reduce bulging and improve extrusion consistency when varying print speeds.
A value of '0' disables pressure advance for this feature.",
182 | "type": "float",
183 | "default_value": 0,
184 | "value": "klipper_pressure_advance_factor",
185 | "minimum_value": "0",
186 | "maximum_value": "2",
187 | "maximum_value_warning": "0.8",
188 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and wall_line_count > 0",
189 | "settable_per_mesh": true,
190 | "settable_per_extruder": true,
191 | "children": {
192 | "klipper_pressure_advance_wall_0": {
193 | "label": "Outer Wall Pressure Advance",
194 | "description": "Pressure Advance factor used for the outermost wall. Optimized values can greatly improve the appearance of corners.
A value of '0' disables pressure advance for this feature.",
195 | "type": "float",
196 | "default_value": 0,
197 | "value": "klipper_pressure_advance_wall",
198 | "minimum_value": "0",
199 | "maximum_value": "2",
200 | "maximum_value_warning": "0.8",
201 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and wall_line_count > 0",
202 | "settable_per_mesh": true,
203 | "settable_per_extruder": true,
204 | "limit_to_extruder": "wall_0_extruder_nr"
205 | },
206 | "klipper_pressure_advance_wall_x": {
207 | "label": "Inner Wall Pressure Advance",
208 | "description": "Pressure Advance factor used only for inner walls.
A value of '0' disables pressure advance for this feature.",
209 | "type": "float",
210 | "default_value": 0,
211 | "value": "klipper_pressure_advance_wall",
212 | "minimum_value": "0",
213 | "maximum_value": "2",
214 | "maximum_value_warning": "0.8",
215 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and wall_line_count > 1",
216 | "settable_per_mesh": true,
217 | "settable_per_extruder": true,
218 | "limit_to_extruder": "wall_x_extruder_nr"
219 | }
220 | }
221 | },
222 | "klipper_pressure_advance_topbottom": {
223 | "label": "Top/Bottom Pressure Advance",
224 | "description": "Pressure Advance factor used for top/bottom skin layers. Optimized value can improve surface appearance and line width consistency for these layers. High values may lead to excessive extruder movements.
A value of '0' disables pressure advance for this feature.",
225 | "type": "float",
226 | "default_value": 0,
227 | "value": "klipper_pressure_advance_factor",
228 | "minimum_value": "0",
229 | "maximum_value": "2",
230 | "maximum_value_warning": "0.8",
231 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and top_bottom_thickness > 0",
232 | "settable_per_mesh": true,
233 | "settable_per_extruder": true,
234 | "limit_to_extruder": "top_bottom_extruder_nr"
235 | },
236 | "klipper_pressure_advance_layer_0": {
237 | "label": "Initial Layer Pressure Advance",
238 | "description": "Pressure Advance factor used only during the first layer. This value overrides all other line types while printing the first layer. Adjusting could be used to optimize line width consistency when varying print speed.
A value of '0' disables pressure advance for the first layer.",
239 | "type": "float",
240 | "default_value": 0,
241 | "value": "klipper_pressure_advance_factor",
242 | "minimum_value": "0",
243 | "maximum_value": "2",
244 | "maximum_value_warning": "0.8",
245 | "enabled": "resolveOrValue('klipper_pressure_advance_enable')",
246 | "settable_per_mesh": false,
247 | "settable_per_extruder": true
248 | },
249 | "klipper_pressure_advance_support": {
250 | "label": "Support Pressure Advance",
251 | "description": "Pressure Advance factor used for support infill and interface structures. Adjustments could be used to minimize excessive extruder movement but there is typically little benefit from changing these values.
A value of '0' disables pressure advance for this feature.",
252 | "type": "float",
253 | "default_value": 0,
254 | "value": "klipper_pressure_advance_factor",
255 | "minimum_value": "0",
256 | "maximum_value": "2",
257 | "maximum_value_warning": "0.8",
258 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and (support_enable or support_meshes_present)",
259 | "settable_per_mesh": false,
260 | "settable_per_extruder": true,
261 | "limit_to_extruder": "support_extruder_nr",
262 | "children": {
263 | "klipper_pressure_advance_support_infill": {
264 | "label": "Support Infill Pressure Advance",
265 | "description": "Pressure Advance factor used only for support infill.
A value of '0' disables pressure advance for this feature.",
266 | "type": "float",
267 | "default_value": 0,
268 | "value": "klipper_pressure_advance_support",
269 | "minimum_value": "0",
270 | "maximum_value": "2",
271 | "maximum_value_warning": "0.8",
272 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and (support_enable or support_meshes_present)",
273 | "settable_per_mesh": false,
274 | "settable_per_extruder": true,
275 | "limit_to_extruder": "support_infill_extruder_nr"
276 | },
277 | "klipper_pressure_advance_support_interface": {
278 | "label": "Support Interface Pressure Advance",
279 | "description": "Pressure Advance factor used only for the support interface.
A value of '0' disables pressure advance for this feature.",
280 | "type": "float",
281 | "default_value": 0,
282 | "value": "klipper_pressure_advance_support",
283 | "minimum_value": "0",
284 | "maximum_value": "2",
285 | "maximum_value_warning": "0.8",
286 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and support_interface_enable and (support_enable or support_meshes_present)",
287 | "settable_per_mesh": false,
288 | "settable_per_extruder": true,
289 | "limit_to_extruder": "support_interface_extruder_nr"
290 | }
291 | }
292 | },
293 | "klipper_pressure_advance_prime_tower": {
294 | "label": "Prime Tower Pressure Advance",
295 | "description": "Pressure Advance factor used when printing a prime tower.
A value of '0' disables pressure advance for this feature.",
296 | "type": "float",
297 | "default_value": 0,
298 | "value": "klipper_pressure_advance_factor",
299 | "minimum_value": "0",
300 | "maximum_value": "2",
301 | "maximum_value_warning": "0.8",
302 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and resolveOrValue('prime_tower_enable')",
303 | "settable_per_mesh": false,
304 | "settable_per_extruder": true
305 | },
306 | "klipper_pressure_advance_skirt_brim": {
307 | "label": "Skirt/Brim Pressure Advance",
308 | "description": "Pressure Advance factor used when printing skirts or brims.
A value of '0' disables pressure advance for this feature.",
309 | "type": "float",
310 | "default_value": 0,
311 | "value": "klipper_pressure_advance_factor",
312 | "minimum_value": "0",
313 | "maximum_value": "2",
314 | "maximum_value_warning": "0.8",
315 | "enabled": "resolveOrValue('klipper_pressure_advance_enable') and (resolveOrValue('adhesion_type') == 'skirt' or resolveOrValue('adhesion_type') == 'brim' or resolveOrValue('draft_shield_enabled') or resolveOrValue('ooze_shield_enabled'))",
316 | "settable_per_mesh": false,
317 | "settable_per_extruder": true,
318 | "limit_to_extruder": "adhesion_extruder_nr"
319 | }
320 | }
321 | },
322 | "klipper_smooth_time_enable": {
323 | "label": "Pressure Advance Smooth Time",
324 | "description": "Enables control of the smooth time variable for Klipper's Pressure Advance. Can be applied with or without Pressure Advance Control but has no effect if pressure advance factor is '0'.",
325 | "type": "bool",
326 | "default_value": false,
327 | "resolve": "any(extruderValues('klipper_smooth_time_enable'))",
328 | "settable_per_mesh": false,
329 | "settable_per_extruder": false,
330 | "children": {
331 | "klipper_smooth_time_factor": {
332 | "label": "Smooth Time Range",
333 | "description": "The time range in seconds used when calculating the average extruder velocity for pressure advance. It is generally recommended to use the default Klipper value. Higher values may result in smoother extruder movements.
Value must be above 0 with a maximum range of 0.20 sec.
Has no effect if pressure advance factor is '0'.
Default: 0.04 (Klipper Default)",
334 | "type": "float",
335 | "unit": "sec",
336 | "default_value": 0.04,
337 | "minimum_value": "0.001",
338 | "maximum_value": "0.2",
339 | "maximum_value_warning": "0.1",
340 | "enabled": "resolveOrValue('klipper_smooth_time_enable')",
341 | "settable_per_mesh": false,
342 | "settable_per_extruder": true
343 | }
344 | }
345 | },
346 | "machine_firmware_retract": {
347 | "label": "Enable Firmware Retraction",
348 | "description": "Enables G10 & G11 firmware retraction commands in gcode. This is a duplicate of the firmware retraction option normally hidden in machine settings. When enabled, Cura's retraction settings are used as the default values. Any specified retraction values will override current values in Klipper config.
Multiple extruders are supported.
The [firmware_retraction] section must be enabled in Klipper config.",
349 | "type": "bool",
350 | "default_value": false,
351 | "settable_per_mesh": false,
352 | "settable_per_extruder": false
353 | },
354 | "klipper_retract_length": {
355 | "label": "Retraction Length",
356 | "description": "The length in mm of material retracted during a G10 retract command. Cura's retraction setting is used as the default value.
The [firmware_retraction] section must be enabled in Klipper config.
A value of '-1.0' will disable control and use the current Klipper config value.
Default: Cura 'retraction_amount'",
357 | "type": "float",
358 | "unit": "mm",
359 | "default_value": -1,
360 | "value": "retraction_amount",
361 | "minimum_value": "-1",
362 | "minimum_value_warning": "0.0001 if klipper_retract_length >= 0 else -1",
363 | "maximum_value_warning": "10",
364 | "enabled": "resolveOrValue('machine_firmware_retract')",
365 | "settable_per_mesh": false,
366 | "settable_per_extruder": true
367 | },
368 | "klipper_retract_prime_length": {
369 | "label": "Unretract Extra Length",
370 | "description": "The length in mm of extra material added to a G11 unretract command. Cura's retraction setting is ignored by default. A value above zero is generally not necessary but can be used to compensate for material oozing during travel moves.
The [firmware_retraction] section must be enabled in Klipper config.
A value of '-1.0' will disable control and use the current Klipper config value.
Default: -1.0 (Disabled)",
371 | "type": "float",
372 | "unit": "mm",
373 | "default_value": -1,
374 | "minimum_value": "-1",
375 | "maximum_value_warning": "5",
376 | "enabled": "resolveOrValue('machine_firmware_retract')",
377 | "settable_per_mesh": false,
378 | "settable_per_extruder": true
379 | },
380 | "klipper_retraction_speed": {
381 | "label": "Retraction Speed",
382 | "description": "The speed in mm/s at which filament is retracted and primed during G10 & G11 commands. Cura's retraction setting is used as the default value.
The [firmware_retraction] section must be enabled in Klipper config.
A value of '0' will disable speed control and use current Klipper config values.
Default: Cura 'Retraction Speed'",
383 | "type": "float",
384 | "unit": "mm/s",
385 | "default_value": 0,
386 | "value": "retraction_speed",
387 | "minimum_value": "0",
388 | "minimum_value_warning": "5 if klipper_retract_speed >= 1 or klipper_retract_prime_speed >= 1 else 0",
389 | "maximum_value_warning": "99",
390 | "enabled": "resolveOrValue('machine_firmware_retract')",
391 | "settable_per_mesh": false,
392 | "settable_per_extruder": true,
393 | "children": {
394 | "klipper_retract_speed": {
395 | "label": "Retract Speed",
396 | "description": "The speed at which filament is retracted during a G10 command. Cura's retraction setting is used as the default value.
Klipper Default: 20 mm/s
The [firmware_retraction] section must be enabled in Klipper config.
A value of '0' will disable control and use the current Klipper config value.
Default: Cura 'Retraction Retract Speed'",
397 | "type": "float",
398 | "unit": "mm/s",
399 | "default_value": 0,
400 | "value": "retraction_retract_speed",
401 | "minimum_value": "0",
402 | "minimum_value_warning": "5 if klipper_retract_speed >= 1 else 0",
403 | "maximum_value_warning": "99",
404 | "enabled": "resolveOrValue('machine_firmware_retract')",
405 | "settable_per_mesh": false,
406 | "settable_per_extruder": true
407 | },
408 | "klipper_retract_prime_speed": {
409 | "label": "Unretract Speed",
410 | "description": "The speed at which filament unretracts during a G11 command. Cura's retraction setting is used as the default value.
Klipper Default: 10 mm/s
The [firmware_retraction] section must be enabled in Klipper config.
A value of '0' will disable control and use the current Klipper config value.
Default: Cura 'Retraction Prime Speed'",
411 | "type": "float",
412 | "unit": "mm/s",
413 | "default_value": 0,
414 | "value": "retraction_prime_speed",
415 | "minimum_value": "0",
416 | "minimum_value_warning": "5 if klipper_retract_prime_speed >= 1 else 0",
417 | "maximum_value_warning": "99",
418 | "enabled": "resolveOrValue('machine_firmware_retract')",
419 | "settable_per_mesh": false,
420 | "settable_per_extruder": true
421 | }
422 | }
423 | },
424 | "klipper_z_offset_control_enable": {
425 | "label": "Z Offset Control",
426 | "description": "Enables control of Klipper's Z offset and first layer Z offset feature.",
427 | "type": "bool",
428 | "default_value": false,
429 | "settable_per_mesh": false,
430 | "settable_per_extruder": false,
431 | "children": {
432 | "klipper_z_offset_set_enable": {
433 | "label": "Override Z Axis Offset",
434 | "description": "Enable to define a total Z axis offset adjustment for the toolhead. This will override and remove any existing Z offset since restarting the printer. It is only recommended to enable this feature to remove an existing offset or if an exact value is needed.
SET_GCODE_OFFSET Z=",
435 | "type": "bool",
436 | "default_value": false,
437 | "enabled": "klipper_z_offset_control_enable",
438 | "settable_per_mesh": false,
439 | "settable_per_extruder": false
440 | },
441 | "klipper_z_offset_set_total": {
442 | "label": "Set Z Axis Offset",
443 | "description": "Defines a total Z axis offset adjustment in mm for the toolhead. If defined, the Z height of all gcode commands will be adjusted by this value after the start gcode sequence. For safety, the max adjustment range is +/- 0.4 mm.
If Adjust Initial Layer Z Offset is also defined, it will combine with this value.
A negative value will move the nozzle closer to the bed.
A value of '0' resets any adjustment since the printer was restarted.
Default: 0",
444 | "type": "float",
445 | "unit": "mm",
446 | "default_value": 0,
447 | "minimum_value": "-0.4",
448 | "minimum_value_warning": "-0.1 if klipper_z_offset_set_total < 0 else 0.0001",
449 | "maximum_value": "0.4",
450 | "maximum_value_warning": "0.1",
451 | "enabled": "klipper_z_offset_control_enable and klipper_z_offset_set_enable",
452 | "settable_per_mesh": false,
453 | "settable_per_extruder": false
454 | },
455 | "klipper_z_offset_layer_0": {
456 | "label": "Adjust Initial Layer Z Offset",
457 | "description": "Z axis offset adjustment in mm applied only to initial layer of the print. Additional first layer 'squish' is often used to improve bed adhesion. The offset applies only to z coordinates equal to the first layer height then instructs Klipper to revert the offset for the next z axis change. Typical adjustments are between -0.005 and -0.05. The max adjustment range is +/- first layer height.
If Set Z Axis Offset is also enabled, the values will be combined.
A negative value will move the nozzle closer to the bed.
Typically only necessary to change these values for calibration purposes.",
474 | "type": "bool",
475 | "default_value": false,
476 | "settable_per_mesh": false,
477 | "settable_per_extruder": false,
478 | "children": {
479 | "klipper_velocity_limit": {
480 | "label": "Velocity Limit",
481 | "description": "The maximum velocity limit in mm/s of the toolhead relative to the print. Print speeds will not be able to exceed this value. It is usually not necessary to adjust a printer's default value.
A value of '0' will disable control and not affect current config.
Default: 0 (Disabled)",
482 | "type": "int",
483 | "unit": "mm/s",
484 | "default_value": 0,
485 | "minimum_value": "0",
486 | "minimum_value_warning": "10 if klipper_velocity_limit > 0 else 0",
487 | "maximum_value_warning": "999",
488 | "enabled": "klipper_velocity_limits_enable",
489 | "settable_per_mesh": false,
490 | "settable_per_extruder": false
491 | },
492 | "klipper_accel_limit": {
493 | "label": "Acceleration Limit",
494 | "description": "The maximum acceleration limit in mm/s² of the toolhead relative to the print. If Cura's acceleration control is enabled those values also change max_accel so they will override this value. This is intended to adjust max_accel temporarily, such as in preparation for a tuning sequence.
A value of '0' will disable control and not affect current config.
Default: 0 (Disabled)",
495 | "type": "int",
496 | "unit": "mm/s²",
497 | "default_value": 0,
498 | "minimum_value": "0",
499 | "minimum_value_warning": "100 if klipper_accel_limit > 0 else 0",
500 | "maximum_value_warning": "50000",
501 | "enabled": "klipper_velocity_limits_enable",
502 | "settable_per_mesh": false,
503 | "settable_per_extruder": false
504 | },
505 | "klipper_accel_to_decel_limit": {
506 | "label": "Accel to Decel Limit",
507 | "description": "The maximum rate in mm/s² for how quickly the toolhead can switch from acceleration to deceleration. This is a pseudo acceleration used to reduce the top speed of short zig-zag moves which can cause excessive vibration.
The Klipper default is generally recommended which is calculated as 'max_accel / 2' and does not dynamically change with max_accel during the print.
A value of '0' will disable control and not affect current config.
Default: 0 (Disabled)",
508 | "type": "int",
509 | "unit": "mm/s²",
510 | "default_value": 0,
511 | "minimum_value": "0",
512 | "minimum_value_warning": "100 if klipper_accel_to_decel_limit > 0 else 0",
513 | "maximum_value_warning": "50000",
514 | "enabled": "klipper_velocity_limits_enable",
515 | "settable_per_mesh": false,
516 | "settable_per_extruder": false
517 | },
518 | "klipper_corner_velocity_limit": {
519 | "label": "Square Corner Velocity Limit",
520 | "description": "The maximum velocity in mm/s of the toolhead during a 90 degree cornering move. A non-zero value can reduce changes in extruder flow rates when cornering by enabling instantaneous velocity changes. Corners with angles above 90 degrees will have a higher cornering velocity while corners with angles with less will have a lower cornering velocity.
A value of '0' would decelerate the toolhead to a stop at each corner.
Klipper default is 5.0 mm/s.
A value of '-1.0' will disable control and not affect current config.
The [input_shaper] section must be enabled in Klipper config.
Typically only recommended to enable for calibration purposes.",
536 | "type": "bool",
537 | "default_value": false,
538 | "settable_per_mesh": false,
539 | "settable_per_extruder": false,
540 | "children": {
541 | "klipper_shaper_freq_x": {
542 | "label": "Shaper Frequency X",
543 | "description": "The frequency in Hz for the X axis input shaper. Typically a resonance frequency of the X axis to suppress.
The Klipper default of '0' will disable input shaping for X axis.
A value of '-1' will disable control and not affect current config.
Default: -1 (Disabled)",
544 | "type": "float",
545 | "unit": "Hz",
546 | "default_value": -1,
547 | "minimum_value": "-1",
548 | "minimum_value_warning": "0.0001 if klipper_shaper_freq_x >= 0 else -1",
549 | "maximum_value_warning": "999",
550 | "enabled": "klipper_input_shaper_enable",
551 | "settable_per_mesh": false,
552 | "settable_per_extruder": false
553 | },
554 | "klipper_shaper_freq_y": {
555 | "label": "Shaper Frequency Y",
556 | "description": "The frequency in Hz for the Y axis input shaper. Typically a resonance frequency of the Y axis to suppress.
The Klipper default of '0' will disable input shaping for Y axis.
A value of '-1' will disable control and not affect current config.
Default: -1 (Disabled)",
557 | "type": "float",
558 | "unit": "Hz",
559 | "default_value": -1,
560 | "minimum_value": "-1",
561 | "minimum_value_warning": "0.0001 if klipper_shaper_freq_y >= 0 else -1",
562 | "maximum_value_warning": "999",
563 | "enabled": "klipper_input_shaper_enable",
564 | "settable_per_mesh": false,
565 | "settable_per_extruder": false
566 | },
567 | "klipper_shaper_type": {
568 | "label": "Shaper Type",
569 | "description": "The type of input shaper to use for both X and Y axes.
Supported Types: ZV, MZV, ZVD, EI, 2HUMP_EI, 3HUMP_EI
Klipper Default: MZV
Not specifying a type will use current shaper_type in Klipper config.",
570 | "type": "enum",
571 | "options": {
572 | "disabled": "",
573 | "mzv": "MZV",
574 | "zv": "ZV",
575 | "zvd": "ZVD",
576 | "ei": "EI",
577 | "2hump_ei": "2HUMP_EI",
578 | "3hump_ei": "3HUMP_EI"
579 | },
580 | "default_value": "disabled",
581 | "enabled": "klipper_input_shaper_enable",
582 | "settable_per_mesh": false,
583 | "settable_per_extruder": false,
584 | "children": {
585 | "klipper_shaper_type_x": {
586 | "label": "Shaper Type X",
587 | "description": "The type of input shaper to use for only the X axis.
Klipper Default: MZV",
588 | "type": "enum",
589 | "options": {
590 | "disabled": "",
591 | "mzv": "MZV",
592 | "zv": "ZV",
593 | "zvd": "ZVD",
594 | "ei": "EI",
595 | "2hump_ei": "2HUMP_EI",
596 | "3hump_ei": "3HUMP_EI"
597 | },
598 | "default_value": "disabled",
599 | "value": "klipper_shaper_type",
600 | "enabled": "klipper_input_shaper_enable",
601 | "settable_per_mesh": false,
602 | "settable_per_extruder": false
603 | },
604 | "klipper_shaper_type_y": {
605 | "label": "Shaper Type Y",
606 | "description": "The input shaper type to use only for the Y axis.
Klipper Default: MZV",
607 | "type": "enum",
608 | "options": {
609 | "disabled": "",
610 | "mzv": "MZV",
611 | "zv": "ZV",
612 | "zvd": "ZVD",
613 | "ei": "EI",
614 | "2hump_ei": "2HUMP_EI",
615 | "3hump_ei": "3HUMP_EI"
616 | },
617 | "default_value": "disabled",
618 | "value": "klipper_shaper_type",
619 | "enabled": "klipper_input_shaper_enable",
620 | "settable_per_mesh": false,
621 | "settable_per_extruder": false
622 | }
623 | }
624 | },
625 | "klipper_damping_ratio_x": {
626 | "label": "Damping Ratio X",
627 | "description": "Damping ratio of X axis vibrations used by input shapers to improve vibration suppression. This generally requires no tuning and is recommended to use the default value.
A value of '-1' will disable control and not affect current config.
Klipper Default: 0.1 Default: -1 (Disabled)",
628 | "type": "float",
629 | "default_value": -1,
630 | "minimum_value": "-1",
631 | "maximum_value": "1",
632 | "minimum_value_warning": "0.0001 if klipper_damping_ratio_x >= 0 else -1",
633 | "enabled": "klipper_input_shaper_enable",
634 | "settable_per_mesh": false,
635 | "settable_per_extruder": false
636 | },
637 | "klipper_damping_ratio_y": {
638 | "label": "Damping Ratio Y",
639 | "description": "Damping ratio of Y axis vibrations used by input shapers to improve vibration suppression. This generally requires no tuning and is not recommended to change from default value.
A value of '-1' will disable control and not affect current config.
Klipper Default: 0.1 Default: -1 (Disabled)",
640 | "type": "float",
641 | "default_value": -1,
642 | "minimum_value": "-1",
643 | "maximum_value": "1",
644 | "minimum_value_warning": "0.0001 if klipper_damping_ratio_y >= 0 else -1",
645 | "enabled": "klipper_input_shaper_enable",
646 | "settable_per_mesh": false,
647 | "settable_per_extruder": false
648 | }
649 | }
650 | },
651 | "klipper_experimental_enable": {
652 | "label": "Experimental Features",
653 | "description": "Klipper setting features currently in development will frequently be listed in this section. These are beta features which have been tested but may be modified or removed in future versions.
Feedback or suggestions is appreciated.",
654 | "type": "bool",
655 | "default_value": false,
656 | "settable_per_mesh": false,
657 | "settable_per_extruder": false,
658 | "children": {
659 | "klipper_mesh_calibrate_enable": {
660 | "label": "Enable Bed Mesh Calibration",
661 | "description": "Enable to preheat the bed and run Klipper's Bed Mesh Calibrate before the start of the print. Before enabling, ensure any existing bed mesh calibration in start gcode is disabled. This option simply offers a convenient way to toggle on/off the standard calibration sequence.
If enabled, the following commands will execute before Cura's start gcode:
M190 S{material_bed_temperature_layer_0} G28 ;Home BED_MESH_CALIBRATE",
662 | "type": "bool",
663 | "default_value": false,
664 | "warning_value": true,
665 | "enabled": "klipper_experimental_enable",
666 | "settable_per_mesh": false,
667 | "settable_per_extruder": false
668 | },
669 | "klipper_ui_temp_support_enable": {
670 | "label": "UI Preheating Support",
671 | "description": "Ensures a Klipper UI such as Fluidd or Mainsail are able to detect print temps in gcode for preheating actions. If enabled, commented lines defining initial bed and nozzle temps are added to start gcode, unless they already exist. This is only necessary when using internal klipper macros and M190 and M109 gcode commands are not visible in the start gcode.