Solves seed painting problem in issue #102.
This commit is contained in:
10
camlib.py
10
camlib.py
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user