- upgrade to use the new notations in the Shapely's buffer method for the cap_style and join_style parameters (used to be integers, now they are strings or defines)

This commit is contained in:
Marius Stanciu
2025-03-05 01:49:19 +02:00
parent bc3fb8fdee
commit 3f504e86c6
19 changed files with 88 additions and 84 deletions

View File

@@ -1580,7 +1580,7 @@ class Excellon(Geometry):
self.create_geometry()
self.app.proc_container.new_text = ''
def buffer(self, distance, join, factor, only_exterior=False):
def buffer(self, distance, join, factor, only_exterior=False, muted=False):
"""
:param distance: if 'factor' is True then distance is the factor

View File

@@ -2569,11 +2569,11 @@ class Gerber(Geometry):
self.app.inform.emit('[success] %s' % _("Done."))
self.app.proc_container.new_text = ''
def buffer(self, distance, join=2, factor=None, only_exterior=False):
def buffer(self, distance, join="mitre", factor=None, only_exterior=False, muted=False):
"""
:param distance: If 'factor' is True then distance is the factor
:param join: The type of joining used by the Shapely buffer method. Can be: round, square and bevel
:param join: The type of joining used by the Shapely buffer method. Can be: round, mitre and bevel
:param factor: True or False (None)
:param only_exterior: Bool. If True, the LineStrings are buffered only on the outside
:return: None
@@ -2718,8 +2718,8 @@ class Gerber(Geometry):
self.solid_geometry = MultiPolygon(new_solid_geo)
self.solid_geometry = self.solid_geometry.buffer(0.000001)
self.solid_geometry = self.solid_geometry.buffer(-0.000001)
self.app.inform.emit('[success] %s' % _("Gerber Buffer done."))
if muted is False:
self.app.inform.emit('[success] %s' % _("Gerber Buffer done."))
self.app.proc_container.new_text = ''