chiark / gitweb /
Fix rostock options.
authordaid303 <daid303@gmail.com>
Mon, 27 May 2013 15:21:19 +0000 (17:21 +0200)
committerdaid303 <daid303@gmail.com>
Mon, 27 May 2013 15:21:19 +0000 (17:21 +0200)
Cura/util/sliceEngine.py

index 0cbbb8fc38b6abdcc2946afc4c721ff2422fd689..fa25bab0a74b2bf3b672415a8b30b003d3ef23b5 100644 (file)
@@ -105,7 +105,7 @@ class Slicer(object):
                with open(self._binaryStorageFilename, "wb") as f:
                        order = scene.printOrder()
                        if order is None:
-                               pos = numpy.array([profile.getPreferenceFloat('machine_width') * 1000 / 2, profile.getPreferenceFloat('machine_depth') * 1000 / 2])
+                               pos = numpy.array(profile.getMachineCenterCoords()) * 1000
                                commandList += ['-s', 'posx=%d' % int(pos[0]), '-s', 'posy=%d' % int(pos[1])]
 
                                vertexTotal = 0
@@ -132,7 +132,7 @@ class Slicer(object):
                                                f.write(numpy.array([mesh.vertexCount], numpy.int32).tostring())
                                                f.write(mesh.vertexes.tostring())
                                        pos = obj.getPosition() * 1000
-                                       pos += numpy.array([profile.getPreferenceFloat('machine_width') * 1000 / 2, profile.getPreferenceFloat('machine_depth') * 1000 / 2])
+                                       pos += numpy.array(profile.getMachineCenterCoords()) * 1000
                                        commandList += ['-m', ','.join(map(str, obj._matrix.getA().flatten()))]
                                        commandList += ['-s', 'posx=%d' % int(pos[0]), '-s', 'posy=%d' % int(pos[1])]
                                        commandList += ['#' * len(obj._meshList)]