Open synman opened 1 year ago
@paukstelis starting to build this up
I've tested part of this thus far.... getting the offsets is working well via the tracked_commands method and I've also ensured whenever I change them using G10 that I update their values with those changes.
this leaves us with the actual baby stepping method I threw into _bgs to support this:
def babystep_offset(_plugin, program, axis, increment):
pgm = int(program.replace("G", "")) - 53
newvalue = _plugin.offsets[program][axis] + increment
_plugin._printer.commands("G10 L2 P{} {}{}".format(pgm, axis, newvalue))
# update our offsets
_plugin.offsets[program][axis] = newvalue
calling it like so from the plugin:
_bgs.babystep_offset(self, self.grblCoordinateSystem, "z", .01 # increments z offset + .01 for active system
_bgs.babystep_offset(self, self.grblCoordinateSystem, "z", -.01 # increments z offset - .01 for active system
so with the plumbing done, now to figure out how to integrate this into the UI. I'm half tempted to create another sidebar widget like the framing / bounding box one, but specific to (baby) stepping the offsets.
We need a way to track work system offsets.
$#
facilitates this by returning a list of the X/Y/Z offsets for each coordinate work system:Here's what I envision for it as dictionary list:
and then an internal mechanism within BGS to allow for changing the X/Y/Z offsets dynamically, much like how Marlin provides for baby stepping.