Skip to content

Commit

Permalink
add new options for probing margins/offsets, #130, #500, #516
Browse files Browse the repository at this point in the history
  • Loading branch information
jneilliii committed Jan 30, 2022
1 parent 7aba9a3 commit eca67c3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
11 changes: 6 additions & 5 deletions octoprint_bedlevelvisualizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,44 @@
data-bind="checked: settingsViewModel.settings.plugins.bedlevelvisualizer.ignore_correction_matrix"
style="display: inline-block;margin-bottom: 5px;"/> Ignore Correction Matrix
</div>
<div class="control-group span4">
<div class="control-group span3 offset1">
<label for="bedlevelvisualizer_rotate">Clockwise Rotation</label>
<div class="input-append" title="Clockwise rotation angle of visualized mesh to match physical orientation of bed." data-toggle="tooltip">
<input type="number" min="0" max="270" step="90" id="bedlevelvisualizer_rotate" class="input-mini text-right" data-bind="value: settingsViewModel.settings.plugins.bedlevelvisualizer.rotation">
<span class="add-on">degs</span>
</div>
</div>
</div>
<div class="row-fluid">
<div class="control-group span3">
<label for="bedlevelvisualizer_bed_offset_left">Left Offset</label>
<div class="input-append" title="Probing offset from left edge of bed." data-toggle="tooltip">
<input type="number" id="bedlevelvisualizer_bed_offset_left" class="input-mini text-right" data-bind="value: settingsViewModel.settings.plugins.bedlevelvisualizer.bed_offset_left">
<span class="add-on">mm</span>
</div>
</div>
<div class="control-group span3">
<label for="bedlevelvisualizer_bed_offset_right">Right Offset</label>
<div class="input-append" title="Probing offset from right edge of bed." data-toggle="tooltip">
<input type="number" id="bedlevelvisualizer_bed_offset_right" class="input-mini text-right" data-bind="value: settingsViewModel.settings.plugins.bedlevelvisualizer.bed_offset_right">
<span class="add-on">mm</span>
</div>
</div>
<div class="control-group span3">
<label for="bedlevelvisualizer_bed_offset_front">Front Offset</label>
<div class="input-append" title="Probing offset from front edge of bed." data-toggle="tooltip">
<input type="number" id="bedlevelvisualizer_bed_offset_front" class="input-mini text-right" data-bind="value: settingsViewModel.settings.plugins.bedlevelvisualizer.bed_offset_front">
<span class="add-on">mm</span>
</div>
</div>
<div class="control-group span3">
<label for="bedlevelvisualizer_bed_offset_back">Back Offset</label>
<div class="input-append" title="Probing offset from back edge of bed." data-toggle="tooltip">
<input type="number" id="bedlevelvisualizer_bed_offset_back" class="input-mini text-right" data-bind="value: settingsViewModel.settings.plugins.bedlevelvisualizer.bed_offset_back">
<span class="add-on">mm</span>
</div>
</div>
</div>
<hr/>
<div class="row-fluid">
<div class="control-group span4">
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eca67c3

Please sign in to comment.