- fixed PDF Tool such that now it can import more types of files including PDF files made with FlatCAM

This commit is contained in:
Marius Stanciu
2020-11-17 20:08:27 +02:00
committed by Marius
parent ced0259ba4
commit de3a23e82f
5 changed files with 89 additions and 66 deletions

View File

@@ -532,7 +532,8 @@ class PdfParser:
else:
ap_list = [int(k) for k in apertures_dict.keys()]
# perhaps it's the only aperture? and in that case we need to start from 10
ap_list.remove(0)
if 0 in ap_list and len(ap_list) == 1:
ap_list.remove(0)
if not ap_list:
aperture = 10
else:
@@ -874,7 +875,8 @@ class PdfParser:
else:
ap_list = [int(k) for k in apertures_dict.keys()]
# perhaps it's the only aperture? and in that case we need to start from 10
ap_list.remove(0)
if 0 in ap_list and len(ap_list) == 1:
ap_list.remove(0)
if not ap_list:
aperture = 10
else: