Fix to build and run on Artix (https://aur.archlinux.org/packages/flatcam-qt6).
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user