Codestyle

This commit is contained in:
Jaime van Kessel 2016-07-29 17:28:58 +02:00
parent 4a5b2465ae
commit 03aa9cf8d3
2 changed files with 37 additions and 37 deletions

View file

@ -42,7 +42,8 @@ class CuraEngineBackend(Backend):
def __init__(self):
super().__init__()
# Find out where the engine is located, and how it is called. This depends on how Cura is packaged and which OS we are running on.
# Find out where the engine is located, and how it is called.
# This depends on how Cura is packaged and which OS we are running on.
default_engine_location = os.path.join(Application.getInstallPrefix(), "bin", "CuraEngine")
if hasattr(sys, "frozen"):
default_engine_location = os.path.join(os.path.dirname(os.path.abspath(sys.executable)), "CuraEngine")
@ -121,7 +122,8 @@ class CuraEngineBackend(Backend):
json_path = Resources.getPath(Resources.DefinitionContainers, "fdmprinter.def.json")
return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", json_path, ""]
## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished.
## Emitted when we get a message containing print duration and material amount.
# This also implies the slicing has finished.
# \param time The amount of time the print will take.
# \param material_amount The amount of material the print will use.
printDurationMessage = Signal()
@ -318,7 +320,7 @@ class CuraEngineBackend(Backend):
## Called when a print time message is received from the engine.
#
# \param message The protobuf message containing the print time and
# \param message The protobuff message containing the print time and
# material amount per extruder
def _onPrintTimeMaterialEstimates(self, message):
material_amounts = []

View file

@ -73,7 +73,7 @@ class ProcessSlicedLayersJob(Job):
# instead simply offset all other layers so the lowest layer is always 0.
min_layer_number = 0
for layer in self._layers:
if(layer.id < min_layer_number):
if layer.id < min_layer_number:
min_layer_number = layer.id
current_layer = 0
@ -116,7 +116,6 @@ class ProcessSlicedLayersJob(Job):
new_points[:, 1] = points[:, 2]
new_points[:, 2] = -points[:, 1]
this_poly = LayerPolygon.LayerPolygon(layer_data, extruder, line_types, new_points, line_widths)
this_poly.buildCache()
@ -184,4 +183,3 @@ class ProcessSlicedLayersJob(Job):
else:
if self._progress:
self._progress.hide()