From eca67c3ee18337aaf0043e538ec478db5d1281c1 Mon Sep 17 00:00:00 2001 From: jneilliii Date: Sun, 30 Jan 2022 01:58:53 -0500 Subject: [PATCH] add new options for probing margins/offsets, #130, #500, #516 --- octoprint_bedlevelvisualizer/__init__.py | 11 ++++--- .../bedlevelvisualizer_settings.jinja2 | 32 ++++++++++++++++++- setup.py | 2 +- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/octoprint_bedlevelvisualizer/__init__.py b/octoprint_bedlevelvisualizer/__init__.py index dfc3d29..1d86a5f 100644 --- a/octoprint_bedlevelvisualizer/__init__.py +++ b/octoprint_bedlevelvisualizer/__init__.py @@ -82,7 +82,8 @@ def get_settings_defaults(self): 'show_webcam': False, 'graph_z_limits': "-2,2", 'colorscale': '[[0, "rebeccapurple"],[0.4, "rebeccapurple"],[0.45, "blue"],[0.5, "green"],[0.55, "yellow"],[0.6, "red"],[1, "red"]]', 'save_snapshots': False, 'camera_position': "-1.25,-1.25,0.25", 'date_locale_format': "", - 'graph_height': "450px", 'show_prusa_adjustments': False, 'show_additional_mesh_data': False, 'show_mesh_statistics': True} + 'graph_height': "450px", 'show_prusa_adjustments': False, 'show_additional_mesh_data': False, 'show_mesh_statistics': True, + 'bed_offset_left': 0, 'bed_offset_right': 0, 'bed_offset_front': 0, 'bed_offset_back': 0} def get_settings_version(self): return 1 @@ -318,10 +319,10 @@ def process_gcode(self, comm, line, *args, **kwargs): min_z = custom_box["z_min"] max_z = custom_box["z_max"] else: - min_x = 0 - max_x = volume["width"] - min_y = 0 - max_y = volume["depth"] + min_x = 0 + self._settings.get_int(["bed_offset_left"]) + max_x = volume["width"] + self._settings.get_int(["bed_offset_right"]) + min_y = 0 + self._settings.get_int(["bed_offset_front"]) + max_y = volume["depth"] + self._settings.get_int(["bed_offset_back"]) min_z = 0 max_z = volume["height"] if len(self.box) == 4: diff --git a/octoprint_bedlevelvisualizer/templates/bedlevelvisualizer_settings.jinja2 b/octoprint_bedlevelvisualizer/templates/bedlevelvisualizer_settings.jinja2 index b4fccfd..2e1bb28 100644 --- a/octoprint_bedlevelvisualizer/templates/bedlevelvisualizer_settings.jinja2 +++ b/octoprint_bedlevelvisualizer/templates/bedlevelvisualizer_settings.jinja2 @@ -44,7 +44,7 @@ data-bind="checked: settingsViewModel.settings.plugins.bedlevelvisualizer.ignore_correction_matrix" style="display: inline-block;margin-bottom: 5px;"/> Ignore Correction Matrix -
+
@@ -52,6 +52,36 @@
+
+
+ +
+ + mm +
+
+
+ +
+ + mm +
+
+
+ +
+ + mm +
+
+
+ +
+ + mm +
+
+

diff --git a/setup.py b/setup.py index 52c31a6..b2baf55 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "Bed Visualizer" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "1.1.2rc1" +plugin_version = "1.1.2rc2" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module