Solves seed painting problem in issue #102.

This commit is contained in:
jpcaram
2015-01-21 09:50:01 -05:00
parent 0cee5d95cc
commit fd2657a8d7
2 changed files with 15 additions and 15 deletions

View File

@@ -329,10 +329,6 @@ class Geometry(object):
:return:
"""
# Estimate good seedpoint if not provided.
if seedpoint is None:
seedpoint = polygon.representative_point()
# Current buffer radius
radius = tooldia / 2 * (1 - overlap)
@@ -342,6 +338,10 @@ class Geometry(object):
# Path margin
path_margin = polygon.buffer(-tooldia / 2)
# Estimate good seedpoint if not provided.
if seedpoint is None:
seedpoint = path_margin.representative_point()
# Grow from seed until outside the box.
while 1:
path = Point(seedpoint).buffer(radius).exterior
@@ -3091,7 +3091,7 @@ def parse_gerber_number(strnumber, frac_digits):
:return: The number in floating point.
:rtype: float
"""
return int(strnumber)*(10**(-frac_digits))
return int(strnumber) * (10 ** (-frac_digits))
# def voronoi(P):