chiark / gitweb /
Fix skeinforge bug reported by Joergen Geerds.
authorDaid <daid303@gmail.com>
Sat, 21 Apr 2012 22:46:34 +0000 (00:46 +0200)
committerDaid <daid303@gmail.com>
Sat, 21 Apr 2012 22:46:34 +0000 (00:46 +0200)
Cura/cura_sf/fabmetheus_utilities/euclidean.py

index 24708e0258c4f5e09041bc7ea56059a90733d063..f9c3148394a757243f90ff33c27ee17a325dae1a 100644 (file)
@@ -882,7 +882,7 @@ def getHalfSimplifiedLoop( loop, radius, remainder ):
        'Get the loop with half of the points inside the channel removed.'
        if len(loop) < 2:
                return loop
-       channelRadius = radius * .01
+       channelRadius = abs(radius * .01)
        simplified = []
        addIndex = 0
        if remainder == 1:
@@ -899,7 +899,7 @@ def getHalfSimplifiedPath(path, radius, remainder):
        'Get the path with half of the points inside the channel removed.'
        if len(path) < 2:
                return path
-       channelRadius = radius * .01
+       channelRadius = abs(radius * .01)
        simplified = [path[0]]
        for pointIndex in xrange(1, len(path) - 1):
                point = path[pointIndex]