- updated all the language strings to the latest changes; updated the POT file
- fixed a possible malfunction in Tool Punch Gerber
This commit is contained in:
parent
7c0d2fb292
commit
facbdf0fd7
|
@ -171,7 +171,7 @@ class PdfParser(QtCore.QObject):
|
||||||
if match:
|
if match:
|
||||||
color = [float(match.group(1)), float(match.group(2)), float(match.group(3))]
|
color = [float(match.group(1)), float(match.group(2)), float(match.group(3))]
|
||||||
log.debug(
|
log.debug(
|
||||||
"ToolPDF.parse_pdf() --> STROKE Color change on line: %s --> RED=%f GREEN=%f BLUE=%f" %
|
"parse_pdf() --> STROKE Color change on line: %s --> RED=%f GREEN=%f BLUE=%f" %
|
||||||
(line_nr, color[0], color[1], color[2]))
|
(line_nr, color[0], color[1], color[2]))
|
||||||
|
|
||||||
if color[0] == old_color[0] and color[1] == old_color[1] and color[2] == old_color[2]:
|
if color[0] == old_color[0] and color[1] == old_color[1] and color[2] == old_color[2]:
|
||||||
|
@ -194,7 +194,7 @@ class PdfParser(QtCore.QObject):
|
||||||
if match:
|
if match:
|
||||||
fill_color = [float(match.group(1)), float(match.group(2)), float(match.group(3))]
|
fill_color = [float(match.group(1)), float(match.group(2)), float(match.group(3))]
|
||||||
log.debug(
|
log.debug(
|
||||||
"ToolPDF.parse_pdf() --> FILL Color change on line: %s --> RED=%f GREEN=%f BLUE=%f" %
|
"parse_pdf() --> FILL Color change on line: %s --> RED=%f GREEN=%f BLUE=%f" %
|
||||||
(line_nr, fill_color[0], fill_color[1], fill_color[2]))
|
(line_nr, fill_color[0], fill_color[1], fill_color[2]))
|
||||||
# if the color is white we are seeing 'clear_geometry' that can't be seen. It may be that those
|
# if the color is white we are seeing 'clear_geometry' that can't be seen. It may be that those
|
||||||
# geometries are actually holes from which we can make an Excellon file
|
# geometries are actually holes from which we can make an Excellon file
|
||||||
|
@ -213,7 +213,7 @@ class PdfParser(QtCore.QObject):
|
||||||
# sometimes they combine save_to_graphics_stack with the transformation on the same line
|
# sometimes they combine save_to_graphics_stack with the transformation on the same line
|
||||||
if match.group(1) == 'q':
|
if match.group(1) == 'q':
|
||||||
log.debug(
|
log.debug(
|
||||||
"ToolPDF.parse_pdf() --> Save to GS found on line: %s --> offset=[%f, %f] ||| scale=[%f, %f]" %
|
"parse_pdf() --> Save to GS found on line: %s --> offset=[%f, %f] ||| scale=[%f, %f]" %
|
||||||
(line_nr, offset_geo[0], offset_geo[1], scale_geo[0], scale_geo[1]))
|
(line_nr, offset_geo[0], offset_geo[1], scale_geo[0], scale_geo[1]))
|
||||||
|
|
||||||
self.gs['transform'].append(deepcopy([offset_geo, scale_geo]))
|
self.gs['transform'].append(deepcopy([offset_geo, scale_geo]))
|
||||||
|
@ -223,7 +223,7 @@ class PdfParser(QtCore.QObject):
|
||||||
if (float(match.group(3)) == 0 and float(match.group(4)) == 0) and \
|
if (float(match.group(3)) == 0 and float(match.group(4)) == 0) and \
|
||||||
(float(match.group(6)) != 0 or float(match.group(7)) != 0):
|
(float(match.group(6)) != 0 or float(match.group(7)) != 0):
|
||||||
log.debug(
|
log.debug(
|
||||||
"ToolPDF.parse_pdf() --> OFFSET transformation found on line: %s --> %s" % (line_nr, pline))
|
"parse_pdf() --> OFFSET transformation found on line: %s --> %s" % (line_nr, pline))
|
||||||
|
|
||||||
offset_geo[0] += float(match.group(6))
|
offset_geo[0] += float(match.group(6))
|
||||||
offset_geo[1] += float(match.group(7))
|
offset_geo[1] += float(match.group(7))
|
||||||
|
@ -232,7 +232,7 @@ class PdfParser(QtCore.QObject):
|
||||||
# transformation = SCALING
|
# transformation = SCALING
|
||||||
if float(match.group(2)) != 1 and float(match.group(5)) != 1:
|
if float(match.group(2)) != 1 and float(match.group(5)) != 1:
|
||||||
log.debug(
|
log.debug(
|
||||||
"ToolPDF.parse_pdf() --> SCALE transformation found on line: %s --> %s" % (line_nr, pline))
|
"parse_pdf() --> SCALE transformation found on line: %s --> %s" % (line_nr, pline))
|
||||||
|
|
||||||
scale_geo[0] *= float(match.group(2))
|
scale_geo[0] *= float(match.group(2))
|
||||||
scale_geo[1] *= float(match.group(5))
|
scale_geo[1] *= float(match.group(5))
|
||||||
|
@ -244,7 +244,7 @@ class PdfParser(QtCore.QObject):
|
||||||
match = self.save_gs_re.search(pline)
|
match = self.save_gs_re.search(pline)
|
||||||
if match:
|
if match:
|
||||||
log.debug(
|
log.debug(
|
||||||
"ToolPDF.parse_pdf() --> Save to GS found on line: %s --> offset=[%f, %f] ||| scale=[%f, %f]" %
|
"parse_pdf() --> Save to GS found on line: %s --> offset=[%f, %f] ||| scale=[%f, %f]" %
|
||||||
(line_nr, offset_geo[0], offset_geo[1], scale_geo[0], scale_geo[1]))
|
(line_nr, offset_geo[0], offset_geo[1], scale_geo[0], scale_geo[1]))
|
||||||
self.gs['transform'].append(deepcopy([offset_geo, scale_geo]))
|
self.gs['transform'].append(deepcopy([offset_geo, scale_geo]))
|
||||||
self.gs['line_width'].append(deepcopy(size))
|
self.gs['line_width'].append(deepcopy(size))
|
||||||
|
@ -258,18 +258,18 @@ class PdfParser(QtCore.QObject):
|
||||||
scale_geo = restored_transform[1]
|
scale_geo = restored_transform[1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
# nothing to remove
|
# nothing to remove
|
||||||
log.debug("ToolPDF.parse_pdf() --> Nothing to restore")
|
log.debug("parse_pdf() --> Nothing to restore")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
size = self.gs['line_width'].pop(-1)
|
size = self.gs['line_width'].pop(-1)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
log.debug("ToolPDF.parse_pdf() --> Nothing to restore")
|
log.debug("parse_pdf() --> Nothing to restore")
|
||||||
# nothing to remove
|
# nothing to remove
|
||||||
pass
|
pass
|
||||||
|
|
||||||
log.debug(
|
log.debug(
|
||||||
"ToolPDF.parse_pdf() --> Restore from GS found on line: %s --> "
|
"parse_pdf() --> Restore from GS found on line: %s --> "
|
||||||
"restored_offset=[%f, %f] ||| restored_scale=[%f, %f]" %
|
"restored_offset=[%f, %f] ||| restored_scale=[%f, %f]" %
|
||||||
(line_nr, offset_geo[0], offset_geo[1], scale_geo[0], scale_geo[1]))
|
(line_nr, offset_geo[0], offset_geo[1], scale_geo[0], scale_geo[1]))
|
||||||
# log.debug("Restored Offset= [%f, %f]" % (offset_geo[0], offset_geo[1]))
|
# log.debug("Restored Offset= [%f, %f]" % (offset_geo[0], offset_geo[1]))
|
||||||
|
|
|
@ -599,32 +599,31 @@ class ToolPunchGerber(AppTool):
|
||||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("The value of the fixed diameter is 0.0. Aborting."))
|
self.app.inform.emit('[WARNING_NOTCL] %s' % _("The value of the fixed diameter is 0.0. Aborting."))
|
||||||
return 'fail'
|
return 'fail'
|
||||||
|
|
||||||
|
fail_msg = _("Could not generate punched hole Gerber because the punch hole size is bigger than"
|
||||||
|
" some of the apertures in the Gerber object.")
|
||||||
|
|
||||||
punching_geo = []
|
punching_geo = []
|
||||||
for apid in grb_obj.apertures:
|
for apid in grb_obj.apertures:
|
||||||
if grb_obj.apertures[apid]['type'] == 'C' and self.circular_cb.get_value():
|
if grb_obj.apertures[apid]['type'] == 'C' and self.circular_cb.get_value():
|
||||||
if punch_size >= float(grb_obj.apertures[apid]['size']):
|
|
||||||
self.app.inform.emit('[ERROR_NOTCL] %s' %
|
|
||||||
_("Could not generate punched hole Gerber because the punch hole size"
|
|
||||||
" is bigger than some of the apertures in the Gerber object."))
|
|
||||||
return 'fail'
|
|
||||||
else:
|
|
||||||
for elem in grb_obj.apertures[apid]['geometry']:
|
for elem in grb_obj.apertures[apid]['geometry']:
|
||||||
if 'follow' in elem:
|
if 'follow' in elem:
|
||||||
if isinstance(elem['follow'], Point):
|
if isinstance(elem['follow'], Point):
|
||||||
|
if punch_size >= float(grb_obj.apertures[apid]['size']):
|
||||||
|
self.app.inform.emit('[ERROR_NOTCL] %s' % fail_msg)
|
||||||
|
return 'fail'
|
||||||
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
||||||
elif grb_obj.apertures[apid]['type'] == 'R':
|
elif grb_obj.apertures[apid]['type'] == 'R':
|
||||||
if punch_size >= float(grb_obj.apertures[apid]['width']) or \
|
|
||||||
punch_size >= float(grb_obj.apertures[apid]['height']):
|
if round(float(grb_obj.apertures[apid]['width']), self.decimals) == \
|
||||||
self.app.inform.emit('[ERROR_NOTCL] %s' %
|
|
||||||
_("Could not generate punched hole Gerber because the punch hole size"
|
|
||||||
" is bigger than some of the apertures in the Gerber object."))
|
|
||||||
return 'fail'
|
|
||||||
elif round(float(grb_obj.apertures[apid]['width']), self.decimals) == \
|
|
||||||
round(float(grb_obj.apertures[apid]['height']), self.decimals) and \
|
round(float(grb_obj.apertures[apid]['height']), self.decimals) and \
|
||||||
self.square_cb.get_value():
|
self.square_cb.get_value():
|
||||||
for elem in grb_obj.apertures[apid]['geometry']:
|
for elem in grb_obj.apertures[apid]['geometry']:
|
||||||
if 'follow' in elem:
|
if 'follow' in elem:
|
||||||
if isinstance(elem['follow'], Point):
|
if isinstance(elem['follow'], Point):
|
||||||
|
if punch_size >= float(grb_obj.apertures[apid]['width']) or \
|
||||||
|
punch_size >= float(grb_obj.apertures[apid]['height']):
|
||||||
|
self.app.inform.emit('[ERROR_NOTCL] %s' % fail_msg)
|
||||||
|
return 'fail'
|
||||||
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
||||||
elif round(float(grb_obj.apertures[apid]['width']), self.decimals) != \
|
elif round(float(grb_obj.apertures[apid]['width']), self.decimals) != \
|
||||||
round(float(grb_obj.apertures[apid]['height']), self.decimals) and \
|
round(float(grb_obj.apertures[apid]['height']), self.decimals) and \
|
||||||
|
@ -632,16 +631,26 @@ class ToolPunchGerber(AppTool):
|
||||||
for elem in grb_obj.apertures[apid]['geometry']:
|
for elem in grb_obj.apertures[apid]['geometry']:
|
||||||
if 'follow' in elem:
|
if 'follow' in elem:
|
||||||
if isinstance(elem['follow'], Point):
|
if isinstance(elem['follow'], Point):
|
||||||
|
if punch_size >= float(grb_obj.apertures[apid]['width']) or \
|
||||||
|
punch_size >= float(grb_obj.apertures[apid]['height']):
|
||||||
|
self.app.inform.emit('[ERROR_NOTCL] %s' % fail_msg)
|
||||||
|
return 'fail'
|
||||||
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
||||||
elif grb_obj.apertures[apid]['type'] == 'O' and self.oblong_cb.get_value():
|
elif grb_obj.apertures[apid]['type'] == 'O' and self.oblong_cb.get_value():
|
||||||
for elem in grb_obj.apertures[apid]['geometry']:
|
for elem in grb_obj.apertures[apid]['geometry']:
|
||||||
if 'follow' in elem:
|
if 'follow' in elem:
|
||||||
if isinstance(elem['follow'], Point):
|
if isinstance(elem['follow'], Point):
|
||||||
|
if punch_size >= float(grb_obj.apertures[apid]['size']):
|
||||||
|
self.app.inform.emit('[ERROR_NOTCL] %s' % fail_msg)
|
||||||
|
return 'fail'
|
||||||
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
||||||
elif grb_obj.apertures[apid]['type'] not in ['C', 'R', 'O'] and self.other_cb.get_value():
|
elif grb_obj.apertures[apid]['type'] not in ['C', 'R', 'O'] and self.other_cb.get_value():
|
||||||
for elem in grb_obj.apertures[apid]['geometry']:
|
for elem in grb_obj.apertures[apid]['geometry']:
|
||||||
if 'follow' in elem:
|
if 'follow' in elem:
|
||||||
if isinstance(elem['follow'], Point):
|
if isinstance(elem['follow'], Point):
|
||||||
|
if punch_size >= float(grb_obj.apertures[apid]['size']):
|
||||||
|
self.app.inform.emit('[ERROR_NOTCL] %s' % fail_msg)
|
||||||
|
return 'fail'
|
||||||
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
punching_geo.append(elem['follow'].buffer(punch_size / 2))
|
||||||
|
|
||||||
punching_geo = MultiPolygon(punching_geo)
|
punching_geo = MultiPolygon(punching_geo)
|
||||||
|
|
|
@ -10,6 +10,8 @@ CHANGELOG for FlatCAM beta
|
||||||
19.05.2020
|
19.05.2020
|
||||||
|
|
||||||
- updated the Italian language (translation incomplete)
|
- updated the Italian language (translation incomplete)
|
||||||
|
- updated all the language strings to the latest changes; updated the POT file
|
||||||
|
- fixed a possible malfunction in Tool Punch Gerber
|
||||||
|
|
||||||
18.05.2020
|
18.05.2020
|
||||||
|
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -5,8 +5,8 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2020-05-19 02:03+0300\n"
|
"POT-Creation-Date: 2020-05-19 02:26+0300\n"
|
||||||
"PO-Revision-Date: 2020-05-19 02:03+0300\n"
|
"PO-Revision-Date: 2020-05-19 02:26+0300\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: it\n"
|
"Language: it\n"
|
||||||
|
@ -15813,7 +15813,7 @@ msgstr "Strumento punzone"
|
||||||
msgid "The value of the fixed diameter is 0.0. Aborting."
|
msgid "The value of the fixed diameter is 0.0. Aborting."
|
||||||
msgstr "Il valore di diametro fisso è 0.0. Annullamento."
|
msgstr "Il valore di diametro fisso è 0.0. Annullamento."
|
||||||
|
|
||||||
#: AppTools/ToolPunchGerber.py:607 AppTools/ToolPunchGerber.py:619
|
#: AppTools/ToolPunchGerber.py:602
|
||||||
msgid ""
|
msgid ""
|
||||||
"Could not generate punched hole Gerber because the punch hole size is bigger "
|
"Could not generate punched hole Gerber because the punch hole size is bigger "
|
||||||
"than some of the apertures in the Gerber object."
|
"than some of the apertures in the Gerber object."
|
||||||
|
@ -15821,7 +15821,7 @@ msgstr ""
|
||||||
"Impossibile generare fori punzonati nel Gerber perché la dimensione del foro "
|
"Impossibile generare fori punzonati nel Gerber perché la dimensione del foro "
|
||||||
"del punzone è maggiore di alcune delle aperture nell'oggetto Gerber."
|
"del punzone è maggiore di alcune delle aperture nell'oggetto Gerber."
|
||||||
|
|
||||||
#: AppTools/ToolPunchGerber.py:656
|
#: AppTools/ToolPunchGerber.py:665
|
||||||
msgid ""
|
msgid ""
|
||||||
"Could not generate punched hole Gerber because the newly created object "
|
"Could not generate punched hole Gerber because the newly created object "
|
||||||
"geometry is the same as the one in the source object geometry..."
|
"geometry is the same as the one in the source object geometry..."
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue