Commit d2eff2c0 authored by sumpfralle's avatar sumpfralle

partly sort the polygon order of the EngraveCutter by size

add support grids to bigger inner holes


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@653 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent ea170c89
...@@ -118,6 +118,12 @@ class EngraveCutter: ...@@ -118,6 +118,12 @@ class EngraveCutter:
return -1 return -1
elif (area2 < 0) and (area1 > 0): elif (area2 < 0) and (area1 > 0):
return 1 return 1
else:
# do a "relaxed" sorting by size
if abs(area1) < 2 * abs(area2):
return -1
elif abs(area2) < 2 * abs(area1):
return 1
else: else:
return 0 return 0
line_groups.sort(cmp=polygon_priority) line_groups.sort(cmp=polygon_priority)
......
...@@ -161,7 +161,10 @@ def get_support_distributed(model, z_plane, average_distance, ...@@ -161,7 +161,10 @@ def get_support_distributed(model, z_plane, average_distance,
# minimum required distance between two bridge start points # minimum required distance between two bridge start points
avoid_distance = 1.5 * (abs(length) + thickness) avoid_distance = 1.5 * (abs(length) + thickness)
for polygon in model.get_polygons(): for polygon in model.get_polygons():
if not polygon.is_outer(): # no grid for _small_ inner polygons
# TODO: calculate a reasonable factor (see below)
if not polygon.is_outer() \
and (abs(polygon.get_area()) < 25000 * thickness ** 2):
continue continue
lines = polygon.get_lines() lines = polygon.get_lines()
poly_lengths = polygon.get_lengths() poly_lengths = polygon.get_lengths()
......
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