Merge pull request #4023 from Ultimaker/add_types_volume_dimensions

Add types for width, height, depth and shape
This commit is contained in:
Diego Prado Gesto 2018-07-05 12:29:51 +02:00 committed by GitHub
commit 3d549d0fb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,10 +47,10 @@ class BuildVolume(SceneNode):
self._disallowed_area_color = None self._disallowed_area_color = None
self._error_area_color = None self._error_area_color = None
self._width = 0 self._width = 0 #type: float
self._height = 0 self._height = 0 #type: float
self._depth = 0 self._depth = 0 #type: float
self._shape = "" self._shape = "" #type: str
self._shader = None self._shader = None
@ -154,19 +154,19 @@ class BuildVolume(SceneNode):
if active_extruder_changed is not None: if active_extruder_changed is not None:
active_extruder_changed.connect(self._updateDisallowedAreasAndRebuild) active_extruder_changed.connect(self._updateDisallowedAreasAndRebuild)
def setWidth(self, width): def setWidth(self, width: float) -> None:
if width is not None: if width is not None:
self._width = width self._width = width
def setHeight(self, height): def setHeight(self, height: float) -> None:
if height is not None: if height is not None:
self._height = height self._height = height
def setDepth(self, depth): def setDepth(self, depth: float) -> None:
if depth is not None: if depth is not None:
self._depth = depth self._depth = depth
def setShape(self, shape: str): def setShape(self, shape: str) -> None:
if shape: if shape:
self._shape = shape self._shape = shape