Commit f7f9d6c6 authored by sumpfralle's avatar sumpfralle

process open polygons before processing outer polygons


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@879 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent bb5eb9db
...@@ -114,16 +114,16 @@ class EngraveCutter: ...@@ -114,16 +114,16 @@ class EngraveCutter:
# We do the sorting just before the final layer (breakage does not # We do the sorting just before the final layer (breakage does not
# happen before). # happen before).
def polygon_priority(poly1, poly2): def polygon_priority(poly1, poly2):
""" polygon priority comparison: first holes, then outlines """ polygon priority comparison: first holes and open polygons, then
(sorted by ascending area size) outlines (roughly sorted by ascending area size)
TODO: ordering according to the locations and groups of polygons TODO: ordering according to the locations and groups of polygons
would be even better. would be even better.
""" """
area1 = poly1.get_area() area1 = poly1.get_area()
area2 = poly2.get_area() area2 = poly2.get_area()
if (area1 < 0) and (area2 > 0): if (area1 <= 0) and (area2 > 0):
return -1 return -1
elif (area2 < 0) and (area1 > 0): elif (area2 <= 0) and (area1 > 0):
return 1 return 1
else: else:
# do a "relaxed" sorting by size # do a "relaxed" sorting by size
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment