fixed bug where the option hexpattern=True would cause an error.

This commit is contained in:
Ba-So 2020-08-14 11:54:36 +02:00 committed by Florian Festi
parent 676772ee64
commit f6e2773810
2 changed files with 23 additions and 18 deletions

View File

@ -1383,6 +1383,7 @@ class Boxes:
"""
if settings is None:
settings = self.hexHolesSettings
r, b, style = settings.diameter/2, settings.distance, settings.style

View File

@ -48,9 +48,13 @@ class PaintStorage(Boxes):
if self.hexpattern:
self.moveTo(self.minspace/2, self.minspace/2)
settings = self.hexHolesSettings
settings.setValues('diameter', self.candiameter)
settings.setValues('distance', self.minspace)
settings.setValues('style', 'cricle')
self.hexHolesRectangle(self.y - 1*self.minspace,
self.x - 1*self.minspace,
(self.candiameter/2, self.minspace, 'circle'))
settings)
return
n_x = int(self.x / (self.candiameter+self.minspace))
n_y = int(self.y / (self.candiameter+self.minspace))