This commit is contained in:
Artix
2025-03-04 12:12:06 +02:00
parent 08f8ca60a8
commit 859ef325eb
16 changed files with 93 additions and 93 deletions

View File

@@ -1126,10 +1126,10 @@ class Excellon(Geometry):
def bounds_rec(obj):
if type(obj) is list:
minx = np.Inf
miny = np.Inf
maxx = -np.Inf
maxy = -np.Inf
minx = np.inf
miny = np.inf
maxx = -np.inf
maxy = -np.inf
for k in obj:
if type(k) is dict:

View File

@@ -70,7 +70,7 @@ class ParseFont:
executable = '/usr/sbin/chkfontpath'
if os.path.isfile(executable):
data = os.popen(executable).readlines()
match = re.compile('\d+: (.+)')
match = re.compile(r'\d+: (.+)')
set_lst = []
for line in data:
result = match.match(line)

View File

@@ -194,7 +194,7 @@ class Gerber(Geometry):
# optional coordinates but at least one in any order.
self.circ_re = re.compile(
r'^(?:G0?([23]))?(?=.*X([+-]?\d+))?(?=.*Y([+-]?\d+))' +
'?(?=.*I([+-]?\d+))?(?=.*J([+-]?\d+))?[XYIJ][^D]*(?:D0([12]))?\*$'
r'?(?=.*I([+-]?\d+))?(?=.*J([+-]?\d+))?[XYIJ][^D]*(?:D0([12]))?\*$'
)
# G01/2/3 Occurring without coordinates
@@ -1919,10 +1919,10 @@ class Gerber(Geometry):
def bounds_rec(obj):
if type(obj) is list and type(obj) is not MultiPolygon:
minx = np.Inf
miny = np.Inf
maxx = -np.Inf
maxy = -np.Inf
minx = np.inf
miny = np.inf
maxx = -np.inf
maxy = -np.inf
for k in obj:
if type(k) is dict:

View File

@@ -447,7 +447,7 @@ def getsvggeo(node, object_type, root=None, units='MM', res=64, factor=1.0, app=
else:
log = logging.getLogger('base2')
kind = re.search('(?:\{.*})?(.*)$', node.tag).group(1)
kind = re.search(r'(?:\{.*})?(.*)$', node.tag).group(1)
geo = []
# Recurse
@@ -558,7 +558,7 @@ def getsvgtext(node, object_type, app, units='MM'):
:return: List of Shapely geometry
:rtype: list
"""
kind = re.search('(?:\{.*})?(.*)$', node.tag).group(1)
kind = re.search(r'(?:\{.*})?(.*)$', node.tag).group(1)
geo = []
# Recurse