mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Use a decorator to track Z offset
This makes it much easier to correct for Z offset after operations CURA-196 #Ready-for-Review
This commit is contained in:
parent
d0b5fe84b8
commit
07c9ecc931
3 changed files with 36 additions and 10 deletions
13
cura/ZOffsetDecorator.py
Normal file
13
cura/ZOffsetDecorator.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
||||
|
||||
## A decorator that stores the amount an object has been moved below the platform.
|
||||
class ZOffsetDecorator(SceneNodeDecorator):
|
||||
def __init__(self):
|
||||
self._z_offset = 0
|
||||
|
||||
def setZOffset(self, offset):
|
||||
print("setZOffset", offset)
|
||||
self._z_offset = offset
|
||||
|
||||
def getZOffset(self):
|
||||
return self._z_offset
|
||||
Loading…
Add table
Add a link
Reference in a new issue