- in Corner Marker Tool add new feature: ability to create an Excellon object with drill holes in the corner markes
- in Corner Marker Tool, will no longer update the current object with the marker geometry but create a new Gerber object - in Join Excellon functionality made sure that the new Combo Exellon object will have copied the data from source objects and not just references, therefore will survive the delete of its parents - updated Turkish translation (by Mehmet Kaya) - updated all the languages except Turkish
This commit is contained in:
parent
55d5dece2c
commit
fac4caf961
|
@ -15,6 +15,11 @@ CHANGELOG for FlatCAM beta
|
||||||
- added to the translatable strings the category labels in the Project Tab and also updated the translations
|
- added to the translatable strings the category labels in the Project Tab and also updated the translations
|
||||||
- fixed a small issue (messages) in Corner Markers Tool
|
- fixed a small issue (messages) in Corner Markers Tool
|
||||||
- in Corners Markers Tool added a new feature: possibility to use cross shape markers
|
- in Corners Markers Tool added a new feature: possibility to use cross shape markers
|
||||||
|
- in Corner Marker Tool add new feature: ability to create an Excellon object with drill holes in the corner markes
|
||||||
|
- in Corner Marker Tool, will no longer update the current object with the marker geometry but create a new Gerber object
|
||||||
|
- in Join Excellon functionality made sure that the new Combo Exellon object will have copied the data from source objects and not just references, therefore will survive the delete of its parents
|
||||||
|
- updated Turkish translation (by Mehmet Kaya)
|
||||||
|
- updated all the languages except Turkish
|
||||||
|
|
||||||
31.10.2020
|
31.10.2020
|
||||||
|
|
||||||
|
|
|
@ -550,6 +550,7 @@ class PreferencesUIManager:
|
||||||
"tools_corners_thickness": self.ui.tools_defaults_form.tools_corners_group.thick_entry,
|
"tools_corners_thickness": self.ui.tools_defaults_form.tools_corners_group.thick_entry,
|
||||||
"tools_corners_length": self.ui.tools_defaults_form.tools_corners_group.l_entry,
|
"tools_corners_length": self.ui.tools_defaults_form.tools_corners_group.l_entry,
|
||||||
"tools_corners_margin": self.ui.tools_defaults_form.tools_corners_group.margin_entry,
|
"tools_corners_margin": self.ui.tools_defaults_form.tools_corners_group.margin_entry,
|
||||||
|
"tools_corners_drill_dia": self.ui.tools_defaults_form.tools_corners_group.drill_dia_entry,
|
||||||
|
|
||||||
# #######################################################################################################
|
# #######################################################################################################
|
||||||
# ########################################## TOOLS 2 ####################################################
|
# ########################################## TOOLS 2 ####################################################
|
||||||
|
|
|
@ -92,4 +92,17 @@ class ToolsCornersPrefGroupUI(OptionsGroupUI):
|
||||||
grid0.addWidget(self.l_label, 8, 0)
|
grid0.addWidget(self.l_label, 8, 0)
|
||||||
grid0.addWidget(self.l_entry, 8, 1)
|
grid0.addWidget(self.l_entry, 8, 1)
|
||||||
|
|
||||||
|
# Drill Tool Diameter
|
||||||
|
self.drill_dia_label = FCLabel('%s:' % _("Tool Dia"))
|
||||||
|
self.drill_dia_label.setToolTip(
|
||||||
|
'%s.' % _("Drill Diameter")
|
||||||
|
)
|
||||||
|
self.drill_dia_entry = FCDoubleSpinner()
|
||||||
|
self.drill_dia_entry.set_range(0.0000, 100.0000)
|
||||||
|
self.drill_dia_entry.set_precision(self.decimals)
|
||||||
|
self.drill_dia_entry.setWrapping(True)
|
||||||
|
|
||||||
|
grid0.addWidget(self.drill_dia_label, 10, 0)
|
||||||
|
grid0.addWidget(self.drill_dia_entry, 10, 1)
|
||||||
|
|
||||||
self.layout.addStretch()
|
self.layout.addStretch()
|
||||||
|
|
|
@ -1278,21 +1278,21 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||||
for option in exc.options:
|
for option in exc.options:
|
||||||
if option != 'name':
|
if option != 'name':
|
||||||
try:
|
try:
|
||||||
exc_final.options[option] = exc.options[option]
|
exc_final.options[option] = deepcopy(exc.options[option])
|
||||||
except Exception:
|
except Exception:
|
||||||
exc.app.log.warning("Failed to copy option.", option)
|
exc.app.log.warning("Failed to copy option.", option)
|
||||||
|
|
||||||
for tool in exc.tools:
|
for tool in exc.tools:
|
||||||
toolid += 1
|
toolid += 1
|
||||||
new_tools[toolid] = exc.tools[tool]
|
new_tools[toolid] = deepcopy(exc.tools[tool])
|
||||||
|
|
||||||
exc_final.tools = deepcopy(new_tools)
|
exc_final.tools = deepcopy(new_tools)
|
||||||
# add the zeros and units to the exc_final object
|
# add the zeros and units to the exc_final object
|
||||||
exc_final.zeros = exc.zeros
|
exc_final.zeros = deepcopy(exc.zeros)
|
||||||
exc_final.units = exc.units
|
exc_final.units = deepcopy(exc.units)
|
||||||
total_geo += exc.solid_geometry
|
total_geo += exc.solid_geometry
|
||||||
|
|
||||||
exc_final.solid_geometry = total_geo
|
exc_final.solid_geometry = deepcopy(total_geo)
|
||||||
|
|
||||||
fused_tools_dict = {}
|
fused_tools_dict = {}
|
||||||
if exc_final.tools and fuse_tools:
|
if exc_final.tools and fuse_tools:
|
||||||
|
|
|
@ -968,18 +968,20 @@ class ToolCopperThieving(AppTool):
|
||||||
geo_list.append(poly_b)
|
geo_list.append(poly_b)
|
||||||
|
|
||||||
# append into the '0' aperture
|
# append into the '0' aperture
|
||||||
geo_elem = {}
|
geo_elem = {
|
||||||
geo_elem['solid'] = poly_b
|
'solid': poly_b,
|
||||||
geo_elem['follow'] = poly_b.exterior
|
'follow': poly_b.exterior
|
||||||
|
}
|
||||||
grb_obj.apertures['0']['geometry'].append(deepcopy(geo_elem))
|
grb_obj.apertures['0']['geometry'].append(deepcopy(geo_elem))
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# append to the new solid geometry
|
# append to the new solid geometry
|
||||||
geo_list.append(thieving_solid_geo.buffer(ppm_clearance))
|
geo_list.append(thieving_solid_geo.buffer(ppm_clearance))
|
||||||
|
|
||||||
# append into the '0' aperture
|
# append into the '0' aperture
|
||||||
geo_elem = {}
|
geo_elem = {
|
||||||
geo_elem['solid'] = thieving_solid_geo.buffer(ppm_clearance)
|
'solid': thieving_solid_geo.buffer(ppm_clearance),
|
||||||
geo_elem['follow'] = thieving_solid_geo.buffer(ppm_clearance).exterior
|
'follow': thieving_solid_geo.buffer(ppm_clearance).exterior
|
||||||
|
}
|
||||||
grb_obj.apertures['0']['geometry'].append(deepcopy(geo_elem))
|
grb_obj.apertures['0']['geometry'].append(deepcopy(geo_elem))
|
||||||
|
|
||||||
# if we have robber bar geometry, add it
|
# if we have robber bar geometry, add it
|
||||||
|
@ -1008,9 +1010,10 @@ class ToolCopperThieving(AppTool):
|
||||||
grb_obj.apertures[new_apid]['size'] = rb_thickness + ppm_clearance
|
grb_obj.apertures[new_apid]['size'] = rb_thickness + ppm_clearance
|
||||||
grb_obj.apertures[new_apid]['geometry'] = []
|
grb_obj.apertures[new_apid]['geometry'] = []
|
||||||
|
|
||||||
geo_elem = {}
|
geo_elem = {
|
||||||
geo_elem['solid'] = robber_solid_geo.buffer(ppm_clearance)
|
'solid': robber_solid_geo.buffer(ppm_clearance),
|
||||||
geo_elem['follow'] = Polygon(robber_line).buffer(ppm_clearance / 2.0).exterior
|
'follow': Polygon(robber_line).buffer(ppm_clearance / 2.0).exterior
|
||||||
|
}
|
||||||
grb_obj.apertures[new_apid]['geometry'].append(deepcopy(geo_elem))
|
grb_obj.apertures[new_apid]['geometry'].append(deepcopy(geo_elem))
|
||||||
|
|
||||||
geo_list.append(robber_solid_geo.buffer(ppm_clearance))
|
geo_list.append(robber_solid_geo.buffer(ppm_clearance))
|
||||||
|
|
|
@ -10,7 +10,8 @@ from PyQt5 import QtWidgets, QtCore, QtGui
|
||||||
from appTool import AppTool
|
from appTool import AppTool
|
||||||
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, FCButton, RadioSet, FCLabel
|
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, FCButton, RadioSet, FCLabel
|
||||||
|
|
||||||
from shapely.geometry import MultiPolygon, LineString
|
from shapely.geometry import MultiPolygon, LineString, Point
|
||||||
|
from shapely.ops import unary_union
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
import logging
|
import logging
|
||||||
|
@ -37,6 +38,9 @@ class ToolCorners(AppTool):
|
||||||
self.decimals = self.app.decimals
|
self.decimals = self.app.decimals
|
||||||
self.units = ''
|
self.units = ''
|
||||||
|
|
||||||
|
# here we store the locations of the selected corners
|
||||||
|
self.points = {}
|
||||||
|
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# ######################### Tool GUI ##########################################
|
# ######################### Tool GUI ##########################################
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
@ -57,6 +61,7 @@ class ToolCorners(AppTool):
|
||||||
# SIGNALS
|
# SIGNALS
|
||||||
self.ui.add_marker_button.clicked.connect(self.add_markers)
|
self.ui.add_marker_button.clicked.connect(self.add_markers)
|
||||||
self.ui.toggle_all_cb.toggled.connect(self.on_toggle_all)
|
self.ui.toggle_all_cb.toggled.connect(self.on_toggle_all)
|
||||||
|
self.ui.drill_button.clicked.connect(self.on_create_drill_object)
|
||||||
|
|
||||||
def run(self, toggle=True):
|
def run(self, toggle=True):
|
||||||
self.app.defaults.report_usage("ToolCorners()")
|
self.app.defaults.report_usage("ToolCorners()")
|
||||||
|
@ -96,6 +101,7 @@ class ToolCorners(AppTool):
|
||||||
self.ui.margin_entry.set_value(float(self.app.defaults["tools_corners_margin"]))
|
self.ui.margin_entry.set_value(float(self.app.defaults["tools_corners_margin"]))
|
||||||
self.ui.toggle_all_cb.set_value(False)
|
self.ui.toggle_all_cb.set_value(False)
|
||||||
self.ui.type_radio.set_value(self.app.defaults["tools_corners_type"])
|
self.ui.type_radio.set_value(self.app.defaults["tools_corners_type"])
|
||||||
|
self.ui.drill_dia_entry.set_value(self.app.defaults["tools_corners_drill_dia"])
|
||||||
|
|
||||||
def on_toggle_all(self, val):
|
def on_toggle_all(self, val):
|
||||||
self.ui.bl_cb.set_value(val)
|
self.ui.bl_cb.set_value(val)
|
||||||
|
@ -123,26 +129,24 @@ class ToolCorners(AppTool):
|
||||||
return
|
return
|
||||||
|
|
||||||
xmin, ymin, xmax, ymax = self.grb_object.bounds()
|
xmin, ymin, xmax, ymax = self.grb_object.bounds()
|
||||||
points = {}
|
self.points = {}
|
||||||
if tl_state:
|
if tl_state:
|
||||||
points['tl'] = (xmin, ymax)
|
self.points['tl'] = (xmin, ymax)
|
||||||
if tr_state:
|
if tr_state:
|
||||||
points['tr'] = (xmax, ymax)
|
self.points['tr'] = (xmax, ymax)
|
||||||
if bl_state:
|
if bl_state:
|
||||||
points['bl'] = (xmin, ymin)
|
self.points['bl'] = (xmin, ymin)
|
||||||
if br_state:
|
if br_state:
|
||||||
points['br'] = (xmax, ymin)
|
self.points['br'] = (xmax, ymin)
|
||||||
|
|
||||||
ret_val = self.add_corners_geo(points, g_obj=self.grb_object)
|
ret_val = self.add_corners_geo(self.points, g_obj=self.grb_object)
|
||||||
self.app.call_source = "app"
|
self.app.call_source = "app"
|
||||||
if ret_val == 'fail':
|
if ret_val == 'fail':
|
||||||
|
self.app.call_source = "app"
|
||||||
|
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Failed."))
|
||||||
return
|
return
|
||||||
|
|
||||||
self.grb_object.source_file = self.app.f_handlers.export_gerber(obj_name=self.grb_object.options['name'],
|
self.on_exit(ret_val)
|
||||||
filename=None,
|
|
||||||
local_use=self.grb_object,
|
|
||||||
use_thread=False)
|
|
||||||
self.on_exit()
|
|
||||||
|
|
||||||
def add_corners_geo(self, points_storage, g_obj):
|
def add_corners_geo(self, points_storage, g_obj):
|
||||||
"""
|
"""
|
||||||
|
@ -155,8 +159,8 @@ class ToolCorners(AppTool):
|
||||||
|
|
||||||
marker_type = self.ui.type_radio.get_value()
|
marker_type = self.ui.type_radio.get_value()
|
||||||
line_thickness = self.ui.thick_entry.get_value()
|
line_thickness = self.ui.thick_entry.get_value()
|
||||||
line_length = self.ui.l_entry.get_value()
|
|
||||||
margin = self.ui.margin_entry.get_value()
|
margin = self.ui.margin_entry.get_value()
|
||||||
|
line_length = self.ui.l_entry.get_value()
|
||||||
|
|
||||||
geo_list = []
|
geo_list = []
|
||||||
|
|
||||||
|
@ -169,7 +173,7 @@ class ToolCorners(AppTool):
|
||||||
pt = points_storage[key]
|
pt = points_storage[key]
|
||||||
x = pt[0] - margin - line_thickness / 2.0
|
x = pt[0] - margin - line_thickness / 2.0
|
||||||
y = pt[1] + margin + line_thickness / 2.0
|
y = pt[1] + margin + line_thickness / 2.0
|
||||||
if type == 's':
|
if marker_type == 's':
|
||||||
line_geo_hor = LineString([
|
line_geo_hor = LineString([
|
||||||
(x, y), (x + line_length, y)
|
(x, y), (x + line_length, y)
|
||||||
])
|
])
|
||||||
|
@ -189,7 +193,7 @@ class ToolCorners(AppTool):
|
||||||
pt = points_storage[key]
|
pt = points_storage[key]
|
||||||
x = pt[0] + margin + line_thickness / 2.0
|
x = pt[0] + margin + line_thickness / 2.0
|
||||||
y = pt[1] + margin + line_thickness / 2.0
|
y = pt[1] + margin + line_thickness / 2.0
|
||||||
if type == 's':
|
if marker_type == 's':
|
||||||
line_geo_hor = LineString([
|
line_geo_hor = LineString([
|
||||||
(x, y), (x - line_length, y)
|
(x, y), (x - line_length, y)
|
||||||
])
|
])
|
||||||
|
@ -209,7 +213,7 @@ class ToolCorners(AppTool):
|
||||||
pt = points_storage[key]
|
pt = points_storage[key]
|
||||||
x = pt[0] - margin - line_thickness / 2.0
|
x = pt[0] - margin - line_thickness / 2.0
|
||||||
y = pt[1] - margin - line_thickness / 2.0
|
y = pt[1] - margin - line_thickness / 2.0
|
||||||
if type == 's':
|
if marker_type == 's':
|
||||||
line_geo_hor = LineString([
|
line_geo_hor = LineString([
|
||||||
(x, y), (x + line_length, y)
|
(x, y), (x + line_length, y)
|
||||||
])
|
])
|
||||||
|
@ -229,7 +233,7 @@ class ToolCorners(AppTool):
|
||||||
pt = points_storage[key]
|
pt = points_storage[key]
|
||||||
x = pt[0] + margin + line_thickness / 2.0
|
x = pt[0] + margin + line_thickness / 2.0
|
||||||
y = pt[1] - margin - line_thickness / 2.0
|
y = pt[1] - margin - line_thickness / 2.0
|
||||||
if type == 's':
|
if marker_type == 's':
|
||||||
line_geo_hor = LineString([
|
line_geo_hor = LineString([
|
||||||
(x, y), (x - line_length, y)
|
(x, y), (x - line_length, y)
|
||||||
])
|
])
|
||||||
|
@ -246,8 +250,10 @@ class ToolCorners(AppTool):
|
||||||
geo_list.append(line_geo_hor)
|
geo_list.append(line_geo_hor)
|
||||||
geo_list.append(line_geo_vert)
|
geo_list.append(line_geo_vert)
|
||||||
|
|
||||||
|
new_apertures = deepcopy(g_obj.apertures)
|
||||||
|
|
||||||
aperture_found = None
|
aperture_found = None
|
||||||
for ap_id, ap_val in g_obj.apertures.items():
|
for ap_id, ap_val in new_apertures.items():
|
||||||
if ap_val['type'] == 'C' and ap_val['size'] == line_thickness:
|
if ap_val['type'] == 'C' and ap_val['size'] == line_thickness:
|
||||||
aperture_found = ap_id
|
aperture_found = ap_id
|
||||||
break
|
break
|
||||||
|
@ -261,27 +267,25 @@ class ToolCorners(AppTool):
|
||||||
dict_el = {}
|
dict_el = {}
|
||||||
dict_el['follow'] = geo
|
dict_el['follow'] = geo
|
||||||
dict_el['solid'] = geo_buff
|
dict_el['solid'] = geo_buff
|
||||||
g_obj.apertures[aperture_found]['geometry'].append(deepcopy(dict_el))
|
new_apertures[aperture_found]['geometry'].append(deepcopy(dict_el))
|
||||||
else:
|
else:
|
||||||
ap_keys = list(g_obj.apertures.keys())
|
ap_keys = list(new_apertures.keys())
|
||||||
if ap_keys:
|
if ap_keys:
|
||||||
new_apid = str(int(max(ap_keys)) + 1)
|
new_apid = str(int(max(ap_keys)) + 1)
|
||||||
else:
|
else:
|
||||||
new_apid = '10'
|
new_apid = '10'
|
||||||
|
|
||||||
g_obj.apertures[new_apid] = {}
|
new_apertures[new_apid] = {}
|
||||||
g_obj.apertures[new_apid]['type'] = 'C'
|
new_apertures[new_apid]['type'] = 'C'
|
||||||
g_obj.apertures[new_apid]['size'] = line_thickness
|
new_apertures[new_apid]['size'] = line_thickness
|
||||||
g_obj.apertures[new_apid]['geometry'] = []
|
new_apertures[new_apid]['geometry'] = []
|
||||||
|
|
||||||
for geo in geo_list:
|
for geo in geo_list:
|
||||||
geo_buff = geo.buffer(line_thickness / 2.0, resolution=self.grb_steps_per_circle, join_style=3)
|
geo_buff = geo.buffer(line_thickness / 2.0, resolution=self.grb_steps_per_circle, join_style=3)
|
||||||
geo_buff_list.append(geo_buff)
|
geo_buff_list.append(geo_buff)
|
||||||
|
|
||||||
dict_el = {}
|
dict_el = {'follow': geo, 'solid': geo_buff}
|
||||||
dict_el['follow'] = geo
|
new_apertures[new_apid]['geometry'].append(deepcopy(dict_el))
|
||||||
dict_el['solid'] = geo_buff
|
|
||||||
g_obj.apertures[new_apid]['geometry'].append(deepcopy(dict_el))
|
|
||||||
|
|
||||||
s_list = []
|
s_list = []
|
||||||
if g_obj.solid_geometry:
|
if g_obj.solid_geometry:
|
||||||
|
@ -299,22 +303,125 @@ class ToolCorners(AppTool):
|
||||||
except TypeError:
|
except TypeError:
|
||||||
s_list.append(geo_buff_list)
|
s_list.append(geo_buff_list)
|
||||||
|
|
||||||
g_obj.solid_geometry = MultiPolygon(s_list)
|
outname = '%s_%s' % (str(self.grb_object.options['name']), 'corners')
|
||||||
|
|
||||||
|
def initialize(grb_obj, app_obj):
|
||||||
|
grb_obj.multitool = False
|
||||||
|
grb_obj.multigeo = False
|
||||||
|
grb_obj.follow = False
|
||||||
|
grb_obj.apertures = new_apertures
|
||||||
|
grb_obj.solid_geometry = unary_union(s_list)
|
||||||
|
|
||||||
|
grb_obj.source_file = app_obj.f_handlers.export_gerber(obj_name=outname, filename=None, local_use=grb_obj,
|
||||||
|
use_thread=False)
|
||||||
|
|
||||||
|
ret = self.app.app_obj.new_object('gerber', outname, initialize, plot=True)
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
|
def on_create_drill_object(self):
|
||||||
|
self.app.call_source = "corners_tool"
|
||||||
|
|
||||||
|
tooldia = self.ui.drill_dia_entry.get_value()
|
||||||
|
|
||||||
|
if tooldia == 0:
|
||||||
|
self.app.inform.emit('[WARNING_NOTCL] %s %s' % (_("Cancelled."), _("The tool diameter is zero.")))
|
||||||
|
return
|
||||||
|
|
||||||
|
line_thickness = self.ui.thick_entry.get_value()
|
||||||
|
margin = self.ui.margin_entry.get_value()
|
||||||
|
tl_state = self.ui.tl_cb.get_value()
|
||||||
|
tr_state = self.ui.tr_cb.get_value()
|
||||||
|
bl_state = self.ui.bl_cb.get_value()
|
||||||
|
br_state = self.ui.br_cb.get_value()
|
||||||
|
|
||||||
|
if not tl_state and not tr_state and not bl_state and not br_state:
|
||||||
|
self.app.inform.emit("[ERROR_NOTCL] %s." % _("Please select at least a location"))
|
||||||
|
|
||||||
|
# get the Gerber object on which the corner marker will be inserted
|
||||||
|
selection_index = self.ui.object_combo.currentIndex()
|
||||||
|
model_index = self.app.collection.index(selection_index, 0, self.ui.object_combo.rootModelIndex())
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.grb_object = model_index.internalPointer().obj
|
||||||
|
except Exception as e:
|
||||||
|
log.debug("ToolCorners.add_markers() --> %s" % str(e))
|
||||||
|
self.app.inform.emit('[WARNING_NOTCL] %s' % _("There is no Gerber object loaded ..."))
|
||||||
|
self.app.call_source = "app"
|
||||||
|
return
|
||||||
|
|
||||||
|
xmin, ymin, xmax, ymax = self.grb_object.bounds()
|
||||||
|
|
||||||
|
# list of (x,y) tuples. Store here the drill coordinates
|
||||||
|
drill_list = []
|
||||||
|
|
||||||
|
if tl_state:
|
||||||
|
x = xmin - margin - line_thickness / 2.0
|
||||||
|
y = ymax + margin + line_thickness / 2.0
|
||||||
|
drill_list.append(
|
||||||
|
Point((x, y))
|
||||||
|
)
|
||||||
|
|
||||||
|
if tr_state:
|
||||||
|
x = xmax + margin + line_thickness / 2.0
|
||||||
|
y = ymax + margin + line_thickness / 2.0
|
||||||
|
drill_list.append(
|
||||||
|
Point((x, y))
|
||||||
|
)
|
||||||
|
|
||||||
|
if bl_state:
|
||||||
|
x = xmin - margin - line_thickness / 2.0
|
||||||
|
y = ymin - margin - line_thickness / 2.0
|
||||||
|
drill_list.append(
|
||||||
|
Point((x, y))
|
||||||
|
)
|
||||||
|
|
||||||
|
if br_state:
|
||||||
|
x = xmax + margin + line_thickness / 2.0
|
||||||
|
y = ymin - margin - line_thickness / 2.0
|
||||||
|
drill_list.append(
|
||||||
|
Point((x, y))
|
||||||
|
)
|
||||||
|
|
||||||
|
tools = {1: {}}
|
||||||
|
tools[1]["tooldia"] = tooldia
|
||||||
|
tools[1]['drills'] = drill_list
|
||||||
|
tools[1]['solid_geometry'] = []
|
||||||
|
|
||||||
|
def obj_init(obj_inst, app_inst):
|
||||||
|
obj_inst.tools = deepcopy(tools)
|
||||||
|
obj_inst.create_geometry()
|
||||||
|
obj_inst.source_file = app_inst.f_handlers.export_excellon(obj_name=obj_inst.options['name'],
|
||||||
|
local_use=obj_inst,
|
||||||
|
filename=None,
|
||||||
|
use_thread=False)
|
||||||
|
|
||||||
|
outname = '%s_%s' % (str(self.grb_object.options['name']), 'corner_drills')
|
||||||
|
|
||||||
|
ret_val = self.app.app_obj.new_object("excellon", outname, obj_init)
|
||||||
|
|
||||||
|
self.app.call_source = "app"
|
||||||
|
|
||||||
|
if not ret_val == 'fail':
|
||||||
|
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Failed."))
|
||||||
|
else:
|
||||||
|
self.app.inform.emit('[success] %s' % _("Excellon object with corner drills created."))
|
||||||
|
|
||||||
def replot(self, obj, run_thread=True):
|
def replot(self, obj, run_thread=True):
|
||||||
def worker_task():
|
def worker_task():
|
||||||
with self.app.proc_container.new('%s...' % _("Plotting")):
|
with self.app.proc_container.new('%s...' % _("Plotting")):
|
||||||
obj.plot()
|
obj.plot()
|
||||||
|
self.app.app_obj.object_plotted.emit(obj)
|
||||||
|
|
||||||
if run_thread:
|
if run_thread:
|
||||||
self.app.worker_task.emit({'fcn': worker_task, 'params': []})
|
self.app.worker_task.emit({'fcn': worker_task, 'params': []})
|
||||||
else:
|
else:
|
||||||
worker_task()
|
worker_task()
|
||||||
|
|
||||||
def on_exit(self):
|
def on_exit(self, corner_gerber_obj):
|
||||||
# plot the object
|
# plot the object
|
||||||
try:
|
try:
|
||||||
self.replot(obj=self.grb_object)
|
self.replot(obj=corner_gerber_obj)
|
||||||
except (AttributeError, TypeError):
|
except (AttributeError, TypeError):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -328,11 +435,8 @@ class ToolCorners(AppTool):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug("ToolCorners.on_exit() copper_obj bounds error --> %s" % str(e))
|
log.debug("ToolCorners.on_exit() copper_obj bounds error --> %s" % str(e))
|
||||||
|
|
||||||
# reset the variables
|
|
||||||
self.grb_object = None
|
|
||||||
|
|
||||||
self.app.call_source = "app"
|
self.app.call_source = "app"
|
||||||
self.app.inform.emit('[success] %s' % _("Corners Tool exit."))
|
self.app.inform.emit('[success] %s' % _("A Gerber object with corner markers was created."))
|
||||||
|
|
||||||
|
|
||||||
class CornersUI:
|
class CornersUI:
|
||||||
|
@ -381,21 +485,25 @@ class CornersUI:
|
||||||
)
|
)
|
||||||
self.layout.addWidget(self.points_label)
|
self.layout.addWidget(self.points_label)
|
||||||
|
|
||||||
# BOTTOM LEFT
|
# ## Grid Layout
|
||||||
self.bl_cb = FCCheckBox(_("Bottom Left"))
|
grid_loc = QtWidgets.QGridLayout()
|
||||||
self.layout.addWidget(self.bl_cb)
|
self.layout.addLayout(grid_loc)
|
||||||
|
|
||||||
# BOTTOM RIGHT
|
|
||||||
self.br_cb = FCCheckBox(_("Bottom Right"))
|
|
||||||
self.layout.addWidget(self.br_cb)
|
|
||||||
|
|
||||||
# TOP LEFT
|
# TOP LEFT
|
||||||
self.tl_cb = FCCheckBox(_("Top Left"))
|
self.tl_cb = FCCheckBox(_("Top Left"))
|
||||||
self.layout.addWidget(self.tl_cb)
|
grid_loc.addWidget(self.tl_cb, 0, 0)
|
||||||
|
|
||||||
# TOP RIGHT
|
# TOP RIGHT
|
||||||
self.tr_cb = FCCheckBox(_("Top Right"))
|
self.tr_cb = FCCheckBox(_("Top Right"))
|
||||||
self.layout.addWidget(self.tr_cb)
|
grid_loc.addWidget(self.tr_cb, 0, 1)
|
||||||
|
|
||||||
|
# BOTTOM LEFT
|
||||||
|
self.bl_cb = FCCheckBox(_("Bottom Left"))
|
||||||
|
grid_loc.addWidget(self.bl_cb, 1, 0)
|
||||||
|
|
||||||
|
# BOTTOM RIGHT
|
||||||
|
self.br_cb = FCCheckBox(_("Bottom Right"))
|
||||||
|
grid_loc.addWidget(self.br_cb, 1, 1)
|
||||||
|
|
||||||
separator_line = QtWidgets.QFrame()
|
separator_line = QtWidgets.QFrame()
|
||||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||||
|
@ -443,7 +551,7 @@ class CornersUI:
|
||||||
_("The thickness of the line that makes the corner marker.")
|
_("The thickness of the line that makes the corner marker.")
|
||||||
)
|
)
|
||||||
self.thick_entry = FCDoubleSpinner(callback=self.confirmation_message)
|
self.thick_entry = FCDoubleSpinner(callback=self.confirmation_message)
|
||||||
self.thick_entry.set_range(0.0000, 9.9999)
|
self.thick_entry.set_range(0.0000, 10.0000)
|
||||||
self.thick_entry.set_precision(self.decimals)
|
self.thick_entry.set_precision(self.decimals)
|
||||||
self.thick_entry.setWrapping(True)
|
self.thick_entry.setWrapping(True)
|
||||||
self.thick_entry.setSingleStep(10 ** -self.decimals)
|
self.thick_entry.setSingleStep(10 ** -self.decimals)
|
||||||
|
@ -457,7 +565,7 @@ class CornersUI:
|
||||||
_("The length of the line that makes the corner marker.")
|
_("The length of the line that makes the corner marker.")
|
||||||
)
|
)
|
||||||
self.l_entry = FCDoubleSpinner(callback=self.confirmation_message)
|
self.l_entry = FCDoubleSpinner(callback=self.confirmation_message)
|
||||||
self.l_entry.set_range(-9999.9999, 9999.9999)
|
self.l_entry.set_range(-10000.0000, 10000.0000)
|
||||||
self.l_entry.set_precision(self.decimals)
|
self.l_entry.set_precision(self.decimals)
|
||||||
self.l_entry.setSingleStep(10 ** -self.decimals)
|
self.l_entry.setSingleStep(10 ** -self.decimals)
|
||||||
|
|
||||||
|
@ -470,17 +578,17 @@ class CornersUI:
|
||||||
_("Bounding box margin.")
|
_("Bounding box margin.")
|
||||||
)
|
)
|
||||||
self.margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
|
self.margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
|
||||||
self.margin_entry.set_range(-9999.9999, 9999.9999)
|
self.margin_entry.set_range(-10000.0000, 10000.0000)
|
||||||
self.margin_entry.set_precision(self.decimals)
|
self.margin_entry.set_precision(self.decimals)
|
||||||
self.margin_entry.setSingleStep(0.1)
|
self.margin_entry.setSingleStep(0.1)
|
||||||
|
|
||||||
grid_lay.addWidget(self.margin_label, 8, 0)
|
grid_lay.addWidget(self.margin_label, 8, 0)
|
||||||
grid_lay.addWidget(self.margin_entry, 8, 1)
|
grid_lay.addWidget(self.margin_entry, 8, 1)
|
||||||
|
|
||||||
separator_line_2 = QtWidgets.QFrame()
|
# separator_line_2 = QtWidgets.QFrame()
|
||||||
separator_line_2.setFrameShape(QtWidgets.QFrame.HLine)
|
# separator_line_2.setFrameShape(QtWidgets.QFrame.HLine)
|
||||||
separator_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
# separator_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||||
grid_lay.addWidget(separator_line_2, 10, 0, 1, 2)
|
# grid_lay.addWidget(separator_line_2, 10, 0, 1, 2)
|
||||||
|
|
||||||
# ## Insert Corner Marker
|
# ## Insert Corner Marker
|
||||||
self.add_marker_button = FCButton(_("Add Marker"))
|
self.add_marker_button = FCButton(_("Add Marker"))
|
||||||
|
@ -496,6 +604,42 @@ class CornersUI:
|
||||||
""")
|
""")
|
||||||
grid_lay.addWidget(self.add_marker_button, 12, 0, 1, 2)
|
grid_lay.addWidget(self.add_marker_button, 12, 0, 1, 2)
|
||||||
|
|
||||||
|
separator_line_2 = QtWidgets.QFrame()
|
||||||
|
separator_line_2.setFrameShape(QtWidgets.QFrame.HLine)
|
||||||
|
separator_line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||||
|
grid_lay.addWidget(separator_line_2, 14, 0, 1, 2)
|
||||||
|
|
||||||
|
# Drill is corners
|
||||||
|
self.drills_label = FCLabel('<b>%s:</b>' % _('Drills in Corners'))
|
||||||
|
grid_lay.addWidget(self.drills_label, 16, 0, 1, 2)
|
||||||
|
|
||||||
|
# Drill Tooldia #
|
||||||
|
self.drill_dia_label = FCLabel('%s:' % _("Tool Dia"))
|
||||||
|
self.drill_dia_label.setToolTip(
|
||||||
|
'%s.' % _("Drill Diameter")
|
||||||
|
)
|
||||||
|
self.drill_dia_entry = FCDoubleSpinner(callback=self.confirmation_message)
|
||||||
|
self.drill_dia_entry.set_range(0.0000, 100.0000)
|
||||||
|
self.drill_dia_entry.set_precision(self.decimals)
|
||||||
|
self.drill_dia_entry.setWrapping(True)
|
||||||
|
|
||||||
|
grid_lay.addWidget(self.drill_dia_label, 18, 0)
|
||||||
|
grid_lay.addWidget(self.drill_dia_entry, 18, 1)
|
||||||
|
|
||||||
|
# ## Create an Excellon object
|
||||||
|
self.drill_button = FCButton(_("Create Excellon Object"))
|
||||||
|
self.drill_button.setIcon(QtGui.QIcon(self.app.resource_location + '/drill32.png'))
|
||||||
|
self.drill_button.setToolTip(
|
||||||
|
_("Will add drill holes in the center of the markers.")
|
||||||
|
)
|
||||||
|
self.drill_button.setStyleSheet("""
|
||||||
|
QPushButton
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
""")
|
||||||
|
grid_lay.addWidget(self.drill_button, 20, 0, 1, 2)
|
||||||
|
|
||||||
self.layout.addStretch()
|
self.layout.addStretch()
|
||||||
|
|
||||||
# ## Reset Tool
|
# ## Reset Tool
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from PyQt5 import QtWidgets, QtCore, QtGui
|
from PyQt5 import QtWidgets, QtCore, QtGui
|
||||||
|
|
||||||
from appTool import AppTool
|
from appTool import AppTool
|
||||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCButton, FCComboBox, NumericalEvalTupleEntry
|
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCButton, FCComboBox, NumericalEvalTupleEntry, FCLabel
|
||||||
|
|
||||||
from numpy import Inf
|
from numpy import Inf
|
||||||
|
|
||||||
|
@ -182,9 +182,9 @@ class DblSidedTool(AppTool):
|
||||||
self.app.inform.emit(msg)
|
self.app.inform.emit(msg)
|
||||||
return
|
return
|
||||||
|
|
||||||
tools = {}
|
tools = {1: {}}
|
||||||
tools[1] = {}
|
|
||||||
tools[1]["tooldia"] = dia
|
tools[1]["tooldia"] = dia
|
||||||
|
tools[1]['drills'] = []
|
||||||
tools[1]['solid_geometry'] = []
|
tools[1]['solid_geometry'] = []
|
||||||
|
|
||||||
# holes = self.alignment_holes.get_value()
|
# holes = self.alignment_holes.get_value()
|
||||||
|
@ -198,9 +198,8 @@ class DblSidedTool(AppTool):
|
||||||
point = Point(hole)
|
point = Point(hole)
|
||||||
point_mirror = affinity.scale(point, xscale, yscale, origin=(px, py))
|
point_mirror = affinity.scale(point, xscale, yscale, origin=(px, py))
|
||||||
|
|
||||||
tools[1]['drills'] = [point, point_mirror]
|
tools[1]['drills'] += [point, point_mirror]
|
||||||
tools[1]['solid_geometry'].append(point)
|
tools[1]['solid_geometry'] += [point, point_mirror]
|
||||||
tools[1]['solid_geometry'].append(point_mirror)
|
|
||||||
|
|
||||||
def obj_init(obj_inst, app_inst):
|
def obj_init(obj_inst, app_inst):
|
||||||
obj_inst.tools = tools
|
obj_inst.tools = tools
|
||||||
|
@ -210,9 +209,11 @@ class DblSidedTool(AppTool):
|
||||||
filename=None,
|
filename=None,
|
||||||
use_thread=False)
|
use_thread=False)
|
||||||
|
|
||||||
self.app.app_obj.new_object("excellon", "Alignment Drills", obj_init)
|
ret_val = self.app.app_obj.new_object("excellon", _("Alignment Drills"), obj_init)
|
||||||
self.drill_values = ''
|
self.drill_values = ''
|
||||||
self.app.inform.emit('[success] %s' % _("Excellon object with alignment drills created..."))
|
|
||||||
|
if not ret_val == 'fail':
|
||||||
|
self.app.inform.emit('[success] %s' % _("Excellon object with alignment drills created..."))
|
||||||
|
|
||||||
def on_pick_hole(self):
|
def on_pick_hole(self):
|
||||||
|
|
||||||
|
@ -494,7 +495,7 @@ class DsidedUI:
|
||||||
self.layout = layout
|
self.layout = layout
|
||||||
|
|
||||||
# ## Title
|
# ## Title
|
||||||
title_label = QtWidgets.QLabel("%s" % self.toolName)
|
title_label = FCLabel("%s" % self.toolName)
|
||||||
title_label.setStyleSheet("""
|
title_label.setStyleSheet("""
|
||||||
QLabel
|
QLabel
|
||||||
{
|
{
|
||||||
|
@ -503,7 +504,7 @@ class DsidedUI:
|
||||||
}
|
}
|
||||||
""")
|
""")
|
||||||
self.layout.addWidget(title_label)
|
self.layout.addWidget(title_label)
|
||||||
self.layout.addWidget(QtWidgets.QLabel(""))
|
self.layout.addWidget(FCLabel(""))
|
||||||
|
|
||||||
# ## Grid Layout
|
# ## Grid Layout
|
||||||
grid_lay = QtWidgets.QGridLayout()
|
grid_lay = QtWidgets.QGridLayout()
|
||||||
|
@ -512,13 +513,13 @@ class DsidedUI:
|
||||||
self.layout.addLayout(grid_lay)
|
self.layout.addLayout(grid_lay)
|
||||||
|
|
||||||
# Objects to be mirrored
|
# Objects to be mirrored
|
||||||
self.m_objects_label = QtWidgets.QLabel("<b>%s:</b>" % _("Source Object"))
|
self.m_objects_label = FCLabel("<b>%s:</b>" % _("Source Object"))
|
||||||
self.m_objects_label.setToolTip('%s.' % _("Objects to be mirrored"))
|
self.m_objects_label.setToolTip('%s.' % _("Objects to be mirrored"))
|
||||||
|
|
||||||
grid_lay.addWidget(self.m_objects_label, 0, 0, 1, 2)
|
grid_lay.addWidget(self.m_objects_label, 0, 0, 1, 2)
|
||||||
|
|
||||||
# Type of object to be cutout
|
# Type of object to be cutout
|
||||||
self.type_obj_combo_label = QtWidgets.QLabel('%s:' % _("Type"))
|
self.type_obj_combo_label = FCLabel('%s:' % _("Type"))
|
||||||
self.type_obj_combo_label.setToolTip(
|
self.type_obj_combo_label.setToolTip(
|
||||||
_("Select the type of application object to be processed in this tool.")
|
_("Select the type of application object to be processed in this tool.")
|
||||||
)
|
)
|
||||||
|
@ -554,7 +555,7 @@ class DsidedUI:
|
||||||
self.layout.addLayout(grid0)
|
self.layout.addLayout(grid0)
|
||||||
|
|
||||||
# ## Title Bounds Values
|
# ## Title Bounds Values
|
||||||
self.bv_label = QtWidgets.QLabel("<b>%s:</b>" % _('Bounds Values'))
|
self.bv_label = FCLabel("<b>%s:</b>" % _('Bounds Values'))
|
||||||
self.bv_label.setToolTip(
|
self.bv_label.setToolTip(
|
||||||
_("Select on canvas the object(s)\n"
|
_("Select on canvas the object(s)\n"
|
||||||
"for which to calculate bounds values.")
|
"for which to calculate bounds values.")
|
||||||
|
@ -632,7 +633,7 @@ class DsidedUI:
|
||||||
grid0.addWidget(self.center_entry, 12, 1)
|
grid0.addWidget(self.center_entry, 12, 1)
|
||||||
|
|
||||||
# Calculate Bounding box
|
# Calculate Bounding box
|
||||||
self.calculate_bb_button = QtWidgets.QPushButton(_("Calculate Bounds Values"))
|
self.calculate_bb_button = FCButton(_("Calculate Bounds Values"))
|
||||||
self.calculate_bb_button.setToolTip(
|
self.calculate_bb_button.setToolTip(
|
||||||
_("Calculate the enveloping rectangular shape coordinates,\n"
|
_("Calculate the enveloping rectangular shape coordinates,\n"
|
||||||
"for the selection of objects.\n"
|
"for the selection of objects.\n"
|
||||||
|
@ -659,13 +660,13 @@ class DsidedUI:
|
||||||
grid1.setColumnStretch(1, 1)
|
grid1.setColumnStretch(1, 1)
|
||||||
self.layout.addLayout(grid1)
|
self.layout.addLayout(grid1)
|
||||||
|
|
||||||
self.param_label = QtWidgets.QLabel("<b>%s:</b>" % _("Mirror Operation"))
|
self.param_label = FCLabel("<b>%s:</b>" % _("Mirror Operation"))
|
||||||
self.param_label.setToolTip('%s.' % _("Parameters for the mirror operation"))
|
self.param_label.setToolTip('%s.' % _("Parameters for the mirror operation"))
|
||||||
|
|
||||||
grid1.addWidget(self.param_label, 0, 0, 1, 2)
|
grid1.addWidget(self.param_label, 0, 0, 1, 2)
|
||||||
|
|
||||||
# ## Axis
|
# ## Axis
|
||||||
self.mirax_label = QtWidgets.QLabel('%s:' % _("Axis"))
|
self.mirax_label = FCLabel('%s:' % _("Axis"))
|
||||||
self.mirax_label.setToolTip(_("Mirror vertically (X) or horizontally (Y)."))
|
self.mirax_label.setToolTip(_("Mirror vertically (X) or horizontally (Y)."))
|
||||||
self.mirror_axis = RadioSet(
|
self.mirror_axis = RadioSet(
|
||||||
[
|
[
|
||||||
|
@ -680,7 +681,7 @@ class DsidedUI:
|
||||||
grid1.addWidget(self.mirror_axis, 2, 1, 1, 2)
|
grid1.addWidget(self.mirror_axis, 2, 1, 1, 2)
|
||||||
|
|
||||||
# ## Axis Location
|
# ## Axis Location
|
||||||
self.axloc_label = QtWidgets.QLabel('%s:' % _("Reference"))
|
self.axloc_label = FCLabel('%s:' % _("Reference"))
|
||||||
self.axloc_label.setToolTip(
|
self.axloc_label.setToolTip(
|
||||||
_("The coordinates used as reference for the mirror operation.\n"
|
_("The coordinates used as reference for the mirror operation.\n"
|
||||||
"Can be:\n"
|
"Can be:\n"
|
||||||
|
@ -705,7 +706,7 @@ class DsidedUI:
|
||||||
self.point_entry.setPlaceholderText(_("Point coordinates"))
|
self.point_entry.setPlaceholderText(_("Point coordinates"))
|
||||||
|
|
||||||
# Add a reference
|
# Add a reference
|
||||||
self.add_point_button = QtWidgets.QPushButton(_("Add"))
|
self.add_point_button = FCButton(_("Add"))
|
||||||
self.add_point_button.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
|
self.add_point_button.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
|
||||||
self.add_point_button.setToolTip(
|
self.add_point_button.setToolTip(
|
||||||
_("Add the coordinates in format <b>(x, y)</b> through which the mirroring axis\n "
|
_("Add the coordinates in format <b>(x, y)</b> through which the mirroring axis\n "
|
||||||
|
@ -724,7 +725,7 @@ class DsidedUI:
|
||||||
grid1.addWidget(self.point_entry, 7, 0, 1, 2)
|
grid1.addWidget(self.point_entry, 7, 0, 1, 2)
|
||||||
grid1.addWidget(self.add_point_button, 7, 2)
|
grid1.addWidget(self.add_point_button, 7, 2)
|
||||||
|
|
||||||
self.exc_hole_lbl = QtWidgets.QLabel('%s:' % _("Excellon"))
|
self.exc_hole_lbl = FCLabel('%s:' % _("Excellon"))
|
||||||
self.exc_hole_lbl.setToolTip(
|
self.exc_hole_lbl.setToolTip(
|
||||||
_("Object that holds holes that can be picked as reference for mirroring.")
|
_("Object that holds holes that can be picked as reference for mirroring.")
|
||||||
)
|
)
|
||||||
|
@ -757,7 +758,7 @@ class DsidedUI:
|
||||||
grid_lay3.setColumnStretch(1, 1)
|
grid_lay3.setColumnStretch(1, 1)
|
||||||
grid1.addLayout(grid_lay3, 14, 0, 1, 3)
|
grid1.addLayout(grid_lay3, 14, 0, 1, 3)
|
||||||
|
|
||||||
self.box_type_label = QtWidgets.QLabel('%s:' % _("Reference Object"))
|
self.box_type_label = FCLabel('%s:' % _("Reference Object"))
|
||||||
self.box_type_label.setToolTip(
|
self.box_type_label.setToolTip(
|
||||||
_("It can be of type: Gerber or Excellon or Geometry.\n"
|
_("It can be of type: Gerber or Excellon or Geometry.\n"
|
||||||
"The coordinates of the center of the bounding box are used\n"
|
"The coordinates of the center of the bounding box are used\n"
|
||||||
|
@ -785,7 +786,7 @@ class DsidedUI:
|
||||||
|
|
||||||
grid_lay3.addWidget(self.box_combo, 3, 0, 1, 2)
|
grid_lay3.addWidget(self.box_combo, 3, 0, 1, 2)
|
||||||
|
|
||||||
self.mirror_button = QtWidgets.QPushButton(_("Mirror"))
|
self.mirror_button = FCButton(_("Mirror"))
|
||||||
self.mirror_button.setIcon(QtGui.QIcon(self.app.resource_location + '/doubleside16.png'))
|
self.mirror_button.setIcon(QtGui.QIcon(self.app.resource_location + '/doubleside16.png'))
|
||||||
self.mirror_button.setToolTip(
|
self.mirror_button.setToolTip(
|
||||||
_("Mirrors (flips) the specified object around \n"
|
_("Mirrors (flips) the specified object around \n"
|
||||||
|
@ -814,7 +815,7 @@ class DsidedUI:
|
||||||
self.layout.addLayout(grid4)
|
self.layout.addLayout(grid4)
|
||||||
|
|
||||||
# ## Alignment holes
|
# ## Alignment holes
|
||||||
self.alignment_label = QtWidgets.QLabel("<b>%s:</b>" % _('PCB Alignment'))
|
self.alignment_label = FCLabel("<b>%s:</b>" % _('PCB Alignment'))
|
||||||
self.alignment_label.setToolTip(
|
self.alignment_label.setToolTip(
|
||||||
_("Creates an Excellon Object containing the\n"
|
_("Creates an Excellon Object containing the\n"
|
||||||
"specified alignment holes and their mirror\n"
|
"specified alignment holes and their mirror\n"
|
||||||
|
@ -823,7 +824,7 @@ class DsidedUI:
|
||||||
grid4.addWidget(self.alignment_label, 0, 0, 1, 2)
|
grid4.addWidget(self.alignment_label, 0, 0, 1, 2)
|
||||||
|
|
||||||
# ## Drill diameter for alignment holes
|
# ## Drill diameter for alignment holes
|
||||||
self.dt_label = QtWidgets.QLabel("%s:" % _('Drill Diameter'))
|
self.dt_label = FCLabel("%s:" % _('Drill Diameter'))
|
||||||
self.dt_label.setToolTip(
|
self.dt_label.setToolTip(
|
||||||
_("Diameter of the drill for the alignment holes.")
|
_("Diameter of the drill for the alignment holes.")
|
||||||
)
|
)
|
||||||
|
@ -839,7 +840,7 @@ class DsidedUI:
|
||||||
grid4.addWidget(self.drill_dia, 2, 1)
|
grid4.addWidget(self.drill_dia, 2, 1)
|
||||||
|
|
||||||
# ## Alignment Axis
|
# ## Alignment Axis
|
||||||
self.align_ax_label = QtWidgets.QLabel('%s:' % _("Axis"))
|
self.align_ax_label = FCLabel('%s:' % _("Axis"))
|
||||||
self.align_ax_label.setToolTip(
|
self.align_ax_label.setToolTip(
|
||||||
_("Mirror vertically (X) or horizontally (Y).")
|
_("Mirror vertically (X) or horizontally (Y).")
|
||||||
)
|
)
|
||||||
|
@ -856,7 +857,7 @@ class DsidedUI:
|
||||||
grid4.addWidget(self.align_axis_radio, 4, 1)
|
grid4.addWidget(self.align_axis_radio, 4, 1)
|
||||||
|
|
||||||
# ## Alignment Reference Point
|
# ## Alignment Reference Point
|
||||||
self.align_ref_label = QtWidgets.QLabel('%s:' % _("Reference"))
|
self.align_ref_label = FCLabel('%s:' % _("Reference"))
|
||||||
self.align_ref_label.setToolTip(
|
self.align_ref_label.setToolTip(
|
||||||
_("The reference point used to create the second alignment drill\n"
|
_("The reference point used to create the second alignment drill\n"
|
||||||
"from the first alignment drill, by doing mirror.\n"
|
"from the first alignment drill, by doing mirror.\n"
|
||||||
|
@ -878,7 +879,7 @@ class DsidedUI:
|
||||||
self.layout.addLayout(grid5)
|
self.layout.addLayout(grid5)
|
||||||
|
|
||||||
# ## Alignment holes
|
# ## Alignment holes
|
||||||
self.ah_label = QtWidgets.QLabel("%s:" % _('Alignment Drill Coordinates'))
|
self.ah_label = FCLabel("%s:" % _('Alignment Drill Coordinates'))
|
||||||
self.ah_label.setToolTip(
|
self.ah_label.setToolTip(
|
||||||
_("Alignment holes (x1, y1), (x2, y2), ... "
|
_("Alignment holes (x1, y1), (x2, y2), ... "
|
||||||
"on one side of the mirror axis. For each set of (x, y) coordinates\n"
|
"on one side of the mirror axis. For each set of (x, y) coordinates\n"
|
||||||
|
@ -924,7 +925,7 @@ class DsidedUI:
|
||||||
grid5.addLayout(drill_hlay, 2, 0, 1, 2)
|
grid5.addLayout(drill_hlay, 2, 0, 1, 2)
|
||||||
|
|
||||||
# ## Buttons
|
# ## Buttons
|
||||||
self.create_alignment_hole_button = QtWidgets.QPushButton(_("Create Excellon Object"))
|
self.create_alignment_hole_button = FCButton(_("Create Excellon Object"))
|
||||||
self.create_alignment_hole_button.setIcon(QtGui.QIcon(self.app.resource_location + '/drill32.png'))
|
self.create_alignment_hole_button.setIcon(QtGui.QIcon(self.app.resource_location + '/drill32.png'))
|
||||||
self.create_alignment_hole_button.setToolTip(
|
self.create_alignment_hole_button.setToolTip(
|
||||||
_("Creates an Excellon Object containing the\n"
|
_("Creates an Excellon Object containing the\n"
|
||||||
|
@ -942,7 +943,7 @@ class DsidedUI:
|
||||||
self.layout.addStretch()
|
self.layout.addStretch()
|
||||||
|
|
||||||
# ## Reset Tool
|
# ## Reset Tool
|
||||||
self.reset_button = QtWidgets.QPushButton(_("Reset Tool"))
|
self.reset_button = FCButton(_("Reset Tool"))
|
||||||
self.reset_button.setIcon(QtGui.QIcon(self.app.resource_location + '/reset32.png'))
|
self.reset_button.setIcon(QtGui.QIcon(self.app.resource_location + '/reset32.png'))
|
||||||
self.reset_button.setToolTip(
|
self.reset_button.setToolTip(
|
||||||
_("Will reset the tool parameters.")
|
_("Will reset the tool parameters.")
|
||||||
|
|
|
@ -618,6 +618,7 @@ class FlatCAMDefaults:
|
||||||
"tools_corners_length": 3.0,
|
"tools_corners_length": 3.0,
|
||||||
"tools_corners_margin": 0.0,
|
"tools_corners_margin": 0.0,
|
||||||
"tools_corners_type": 's',
|
"tools_corners_type": 's',
|
||||||
|
"tools_corners_drill_dia": 0.5,
|
||||||
|
|
||||||
# ########################################################################################################
|
# ########################################################################################################
|
||||||
# ################################ TOOLS 2 ###############################################################
|
# ################################ TOOLS 2 ###############################################################
|
||||||
|
|
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.
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.
|
@ -6,7 +6,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2020-11-01 18:40+0200\n"
|
"POT-Creation-Date: 2020-11-01 18:40+0200\n"
|
||||||
"PO-Revision-Date: 2020-11-01 18:40+0200\n"
|
"PO-Revision-Date: 2020-11-01 20:34+0300\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: tr_TR\n"
|
"Language: tr_TR\n"
|
||||||
|
@ -7452,7 +7452,7 @@ msgstr "Bir dışlama alanı ekleyin."
|
||||||
#: appTools/ToolMilling.py:2267 appTools/ToolNCC.py:4364
|
#: appTools/ToolMilling.py:2267 appTools/ToolNCC.py:4364
|
||||||
#: appTools/ToolPaint.py:3154
|
#: appTools/ToolPaint.py:3154
|
||||||
msgid "The kind of selection shape used for area selection."
|
msgid "The kind of selection shape used for area selection."
|
||||||
msgstr "Dışlama alanı seçmek için kullanılan seçim şeklinin görünümü."
|
msgstr "Alan seçimi için kullanılan seçim şeklinin görünümü."
|
||||||
|
|
||||||
#: appGUI/ObjectUI.py:1616
|
#: appGUI/ObjectUI.py:1616
|
||||||
#: appGUI/preferences/utilities/AutoCompletePrefGroupUI.py:32
|
#: appGUI/preferences/utilities/AutoCompletePrefGroupUI.py:32
|
||||||
|
@ -10775,7 +10775,7 @@ msgstr "Kalibrasyon Seçenekleri"
|
||||||
#: appTools/ToolCopperThieving.py:1186 appTools/ToolCorners.py:422
|
#: appTools/ToolCopperThieving.py:1186 appTools/ToolCorners.py:422
|
||||||
#: appTools/ToolFiducials.py:767
|
#: appTools/ToolFiducials.py:767
|
||||||
msgid "Parameters used for this tool."
|
msgid "Parameters used for this tool."
|
||||||
msgstr "Referans işareti için kullanılan seçenekler."
|
msgstr "Bu araç için kullanılan seçenekler."
|
||||||
|
|
||||||
#: appGUI/preferences/tools/Tools2CalPrefGroupUI.py:43
|
#: appGUI/preferences/tools/Tools2CalPrefGroupUI.py:43
|
||||||
#: appTools/ToolCalibration.py:876
|
#: appTools/ToolCalibration.py:876
|
||||||
|
@ -11802,31 +11802,27 @@ msgstr ""
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:27
|
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:27
|
||||||
msgid "Corner Markers Options"
|
msgid "Corner Markers Options"
|
||||||
msgstr "Köşe İşaretleyici Seçenekleri"
|
msgstr "Köşe İşareti Seçenekleri"
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:44
|
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:44
|
||||||
#: appTools/ToolCorners.py:429
|
#: appTools/ToolCorners.py:429
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Show the Properties."
|
|
||||||
msgid "Shape of the marker."
|
msgid "Shape of the marker."
|
||||||
msgstr "Özellikleri göster."
|
msgstr "Köşe işaretinin şekli."
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:48
|
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:48
|
||||||
#: appTools/ToolCorners.py:433
|
#: appTools/ToolCorners.py:433
|
||||||
#, fuzzy
|
|
||||||
#| msgid "Cross"
|
|
||||||
msgid "Semi-Cross"
|
msgid "Semi-Cross"
|
||||||
msgstr "Çapraz"
|
msgstr "Yarı Çapraz"
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:58
|
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:58
|
||||||
#: appTools/ToolCorners.py:443
|
#: appTools/ToolCorners.py:443
|
||||||
msgid "The thickness of the line that makes the corner marker."
|
msgid "The thickness of the line that makes the corner marker."
|
||||||
msgstr "Köşe işaretleyici çizgisinin kalınlığı."
|
msgstr "Köşe işaretinin çizgi kalınlığı."
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:85
|
#: appGUI/preferences/tools/ToolsCornersPrefGroupUI.py:85
|
||||||
#: appTools/ToolCorners.py:457
|
#: appTools/ToolCorners.py:457
|
||||||
msgid "The length of the line that makes the corner marker."
|
msgid "The length of the line that makes the corner marker."
|
||||||
msgstr "Köşe işaretleyici çizgisinin uzunluğu."
|
msgstr "Köşe işaretinin çizgi uzunluğu."
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsCutoutPrefGroupUI.py:28
|
#: appGUI/preferences/tools/ToolsCutoutPrefGroupUI.py:28
|
||||||
msgid "Cutout Tool Options"
|
msgid "Cutout Tool Options"
|
||||||
|
@ -11945,12 +11941,14 @@ msgid ""
|
||||||
"WARNING: using rest machining will automatically set the order\n"
|
"WARNING: using rest machining will automatically set the order\n"
|
||||||
"in reverse and disable this control."
|
"in reverse and disable this control."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Bu, uçların Araçlar Tablosundaki sırayı belirler.\n"
|
"Bu, Araçlar Tablosundaki uçların kullanılma şeklini belirler.\n"
|
||||||
"'Hayır' -> Kullanılan ucun araç tablosunda belirtildiği anlamına gelir.\n"
|
"'Hayır' -> Kullanılan uç sıranın Araçlar Tablosundaki sıra olduğu anlamına "
|
||||||
|
"gelir.\n"
|
||||||
"'İleri' -> Uçların küçükten büyüğe doğru kullanılacağı anlamına gelir.\n"
|
"'İleri' -> Uçların küçükten büyüğe doğru kullanılacağı anlamına gelir.\n"
|
||||||
"Geri -> Uçların büyükten küçüğe doğru kullanılacağı anlamına gelir.\n"
|
"Geri -> Uçların büyükten küçüğe doğru kullanılacağı anlamına gelir.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"UYARI: Kalan işlemeyi kullanmak, sırayı otomatik olarak tersine çevirir \n"
|
"UYARI: Kalan parça işlemeyi kullanmak, sırayı otomatik olarak tersine "
|
||||||
|
"çevirir \n"
|
||||||
"ve bu kontrolü devre dışı bırakır."
|
"ve bu kontrolü devre dışı bırakır."
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsDrillPrefGroupUI.py:50
|
#: appGUI/preferences/tools/ToolsDrillPrefGroupUI.py:50
|
||||||
|
@ -12325,7 +12323,7 @@ msgstr ""
|
||||||
#: appTools/ToolIsolation.py:3300 appTools/ToolNCC.py:4246
|
#: appTools/ToolIsolation.py:3300 appTools/ToolNCC.py:4246
|
||||||
#: appTools/ToolPaint.py:3076
|
#: appTools/ToolPaint.py:3076
|
||||||
msgid "Rest"
|
msgid "Rest"
|
||||||
msgstr "Kalan İşleme"
|
msgstr "Kalan Parça İşleme"
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsISOPrefGroupUI.py:246
|
#: appGUI/preferences/tools/ToolsISOPrefGroupUI.py:246
|
||||||
#: appTools/ToolIsolation.py:3303
|
#: appTools/ToolIsolation.py:3303
|
||||||
|
@ -12338,7 +12336,7 @@ msgid ""
|
||||||
"no more copper features to isolate or there are no more tools.\n"
|
"no more copper features to isolate or there are no more tools.\n"
|
||||||
"If not checked, use the standard algorithm."
|
"If not checked, use the standard algorithm."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Bu onay kutusu işaretlenirse, 'Kalan İşleme' kullanılır.\n"
|
"Bu onay kutusu işaretlenirse, 'Kalan Parça İşleme' kullanılır.\n"
|
||||||
"Bu, en büyük ucu kullanarak PCB'nin ana bakırını \n"
|
"Bu, en büyük ucu kullanarak PCB'nin ana bakırını \n"
|
||||||
"temizler ve temizlenecek daha fazla bakır kalmayana veya \n"
|
"temizler ve temizlenecek daha fazla bakır kalmayana veya \n"
|
||||||
"daha fazla uç kalmayana kadar önceki uçla temizlenemeyen\n"
|
"daha fazla uç kalmayana kadar önceki uçla temizlenemeyen\n"
|
||||||
|
@ -12437,7 +12435,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Onay kutusu işaretlendiğinde, çokgenin iç kısımları \n"
|
"Onay kutusu işaretlendiğinde, çokgenin iç kısımları \n"
|
||||||
"(çokgendeki delikler) yalıtılamasa bile, yalıtım mevcut \n"
|
"(çokgendeki delikler) yalıtılamasa bile, yalıtım mevcut \n"
|
||||||
"uçla yapılacaktır. \"Kalan İşleme\" kullanıldığında çalışır."
|
"uçla yapılacaktır. \"Kalan Parça İşleme\" kullanıldığında çalışır."
|
||||||
|
|
||||||
#: appGUI/preferences/tools/ToolsISOPrefGroupUI.py:337
|
#: appGUI/preferences/tools/ToolsISOPrefGroupUI.py:337
|
||||||
#: appGUI/preferences/tools/ToolsNCCPrefGroupUI.py:339
|
#: appGUI/preferences/tools/ToolsNCCPrefGroupUI.py:339
|
||||||
|
@ -12512,7 +12510,7 @@ msgid ""
|
||||||
"no more copper to clear or there are no more tools.\n"
|
"no more copper to clear or there are no more tools.\n"
|
||||||
"If not checked, use the standard algorithm."
|
"If not checked, use the standard algorithm."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Bu onay kutusu işaretlenirse, 'Kalan İşleme' kullanılır.\n"
|
"Bu onay kutusu işaretlenirse, 'Kalan Parça İşleme' kullanılır.\n"
|
||||||
"Bu, en büyük ucu kullanarak PCB'nin ana bakırını \n"
|
"Bu, en büyük ucu kullanarak PCB'nin ana bakırını \n"
|
||||||
"temizler ve temizlenecek daha fazla bakır kalmayana veya \n"
|
"temizler ve temizlenecek daha fazla bakır kalmayana veya \n"
|
||||||
"daha fazla uç kalmayana kadar önceki uçla temizlenemeyen\n"
|
"daha fazla uç kalmayana kadar önceki uçla temizlenemeyen\n"
|
||||||
|
@ -12560,7 +12558,7 @@ msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"If not checked, use the standard algorithm."
|
"If not checked, use the standard algorithm."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Bu onay kutusu işaretlenirse, 'Kalan İşleme' kullanılır.\n"
|
"Bu onay kutusu işaretlenirse, 'Kalan Parça İşleme' kullanılır.\n"
|
||||||
"Bu, en büyük ucu kullanarak PCB'nin ana bakırını \n"
|
"Bu, en büyük ucu kullanarak PCB'nin ana bakırını \n"
|
||||||
"temizler ve temizlenecek daha fazla bakır kalmayana veya \n"
|
"temizler ve temizlenecek daha fazla bakır kalmayana veya \n"
|
||||||
"daha fazla uç kalmayana kadar önceki uçla temizlenemeyen\n"
|
"daha fazla uç kalmayana kadar önceki uçla temizlenemeyen\n"
|
||||||
|
@ -14670,11 +14668,11 @@ msgstr "Lütfen en az bir konum seçin"
|
||||||
|
|
||||||
#: appTools/ToolCorners.py:335
|
#: appTools/ToolCorners.py:335
|
||||||
msgid "Corners Tool exit."
|
msgid "Corners Tool exit."
|
||||||
msgstr "Köşe işaretleyicisi çıkış."
|
msgstr "Köşe işaretleme işlemi tamamlandı."
|
||||||
|
|
||||||
#: appTools/ToolCorners.py:362
|
#: appTools/ToolCorners.py:362
|
||||||
msgid "The Gerber object to which will be added corner markers."
|
msgid "The Gerber object to which will be added corner markers."
|
||||||
msgstr "Köşe işaretleyicileri eklenecek Gerber nesnesi."
|
msgstr "Köşe işaretleri eklenecek Gerber nesnesi."
|
||||||
|
|
||||||
#: appTools/ToolCorners.py:378
|
#: appTools/ToolCorners.py:378
|
||||||
msgid "Locations"
|
msgid "Locations"
|
||||||
|
@ -14682,7 +14680,7 @@ msgstr "Konumlar"
|
||||||
|
|
||||||
#: appTools/ToolCorners.py:380
|
#: appTools/ToolCorners.py:380
|
||||||
msgid "Locations where to place corner markers."
|
msgid "Locations where to place corner markers."
|
||||||
msgstr "Köşe işaretleyicilerinin yerleştirileceği yerler."
|
msgstr "Köşe işaretlerinin yerleştirileceği yerler."
|
||||||
|
|
||||||
#: appTools/ToolCorners.py:397 appTools/ToolFiducials.py:708
|
#: appTools/ToolCorners.py:397 appTools/ToolFiducials.py:708
|
||||||
msgid "Top Right"
|
msgid "Top Right"
|
||||||
|
@ -14698,7 +14696,7 @@ msgstr "Köşe İşareti Ekle"
|
||||||
|
|
||||||
#: appTools/ToolCorners.py:489
|
#: appTools/ToolCorners.py:489
|
||||||
msgid "Will add corner markers to the selected Gerber file."
|
msgid "Will add corner markers to the selected Gerber file."
|
||||||
msgstr "Seçilen Gerber dosyasına köşe işaretleyicileri ekler."
|
msgstr "Seçilen Gerber dosyasına köşe işaretleri ekler."
|
||||||
|
|
||||||
#: appTools/ToolCutOut.py:388
|
#: appTools/ToolCutOut.py:388
|
||||||
msgid "Updated tool from Tools Database."
|
msgid "Updated tool from Tools Database."
|
||||||
|
@ -16562,19 +16560,19 @@ msgstr "araçlar"
|
||||||
|
|
||||||
#: appTools/ToolNCC.py:2357
|
#: appTools/ToolNCC.py:2357
|
||||||
msgid "NCC Tool. Rest machining copper clearing task started."
|
msgid "NCC Tool. Rest machining copper clearing task started."
|
||||||
msgstr "Bakır temizleme \"Kalan İşleme\" yöntemiyle başlatılmıştır."
|
msgstr "Bakır temizleme \"Kalan Parça İşleme\" yöntemiyle başlatılmıştır."
|
||||||
|
|
||||||
#: appTools/ToolNCC.py:2576 appTools/ToolNCC.py:3565
|
#: appTools/ToolNCC.py:2576 appTools/ToolNCC.py:3565
|
||||||
msgid "NCC Tool Rest Machining clear all done."
|
msgid "NCC Tool Rest Machining clear all done."
|
||||||
msgstr "Bakır temizleme \"Kalan İşleme\" ile tamamlanmıştır."
|
msgstr "Bakır temizleme \"Kalan Parça İşleme\" ile tamamlanmıştır."
|
||||||
|
|
||||||
#: appTools/ToolNCC.py:2579 appTools/ToolNCC.py:3568
|
#: appTools/ToolNCC.py:2579 appTools/ToolNCC.py:3568
|
||||||
msgid ""
|
msgid ""
|
||||||
"NCC Tool Rest Machining clear all done but the copper features isolation is "
|
"NCC Tool Rest Machining clear all done but the copper features isolation is "
|
||||||
"broken for"
|
"broken for"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Bakır temizleme \"Kalan İşleme\" ile tamamlandı; ancak yollarda kırılmalar "
|
"Bakır temizleme \"Kalan Parça İşleme\" ile tamamlandı; ancak yollarda "
|
||||||
"oldu"
|
"kırılmalar oldu"
|
||||||
|
|
||||||
#: appTools/ToolNCC.py:2677
|
#: appTools/ToolNCC.py:2677
|
||||||
msgid "NCC Tool started. Reading parameters."
|
msgid "NCC Tool started. Reading parameters."
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue