- added a new preprocessor: default_laser
- in the app added a new tool type: "L" (laser) which when selected will autoselect the `default_laser` preprocessor in Milling Plugin
This commit is contained in:
@@ -444,7 +444,7 @@ class ToolIsolation(AppTool, Gerber):
|
||||
|
||||
self.sel_rect = []
|
||||
|
||||
self.tool_type_item_options = ["C1", "C2", "C3", "C4", "B", "V"]
|
||||
self.tool_type_item_options = ["C1", "C2", "C3", "C4", "B", "V", "L"]
|
||||
|
||||
self.on_rest_machining_check(state=self.app.defaults["tools_iso_rest"])
|
||||
|
||||
@@ -1754,7 +1754,7 @@ class ToolIsolation(AppTool, Gerber):
|
||||
use_rest = args['rest'] if 'rest' in args else self.ui.rest_cb.get_value()
|
||||
# selection_type: [_("All"), _("Area Selection"), _("Polygon Selection"), _("Reference Object")]
|
||||
selection_type = args['sel_type'] if 'sel_type' in args else self.ui.select_combo.get_value()
|
||||
# tool_tip_shape: ["C1", "C2", "C3", "C4", "B", "V"]
|
||||
# tool_tip_shape: ["C1", "C2", "C3", "C4", "B", "V", "L"]
|
||||
tool_tip_shape = args['tip_shape'] if 'tip_shape' in args else self.ui.tool_shape_combo.get_value()
|
||||
|
||||
# update the Common Parameters values in the self.iso_tools
|
||||
@@ -3544,12 +3544,13 @@ class IsoUI:
|
||||
"Can be:\n"
|
||||
"C1 ... C4 = circular tool with x flutes\n"
|
||||
"B = ball tip milling tool\n"
|
||||
"V = v-shape milling tool")
|
||||
"V = v-shape milling tool\n"
|
||||
"L = laser")
|
||||
)
|
||||
|
||||
self.tool_shape_combo = FCComboBox2(policy=False)
|
||||
self.tool_shape_combo.setObjectName('i_tool_shape')
|
||||
self.tool_shape_combo.addItems(["C1", "C2", "C3", "C4", "B", "V"])
|
||||
self.tool_shape_combo.addItems(["C1", "C2", "C3", "C4", "B", "V", "L"])
|
||||
|
||||
idx = int(self.app.defaults['tools_iso_tool_shape'])
|
||||
# protection against having this translated or loading a project with translated values
|
||||
|
||||
@@ -1018,7 +1018,7 @@ class ToolMilling(AppTool, Excellon):
|
||||
|
||||
# -------------------- TOOL TYPE ------------------------------------- #
|
||||
# tool_type_item = FCComboBox(policy=False)
|
||||
# for item in ["C1", "C2", "C3", "C4", "B", "V"]:
|
||||
# for item in ["C1", "C2", "C3", "C4", "B", "V", "L"]:
|
||||
# tool_type_item.addItem(item)
|
||||
# idx = tool_type_item.findText(tooluid_value['data']['tools_mill_tool_type'])
|
||||
# # protection against having this translated or loading a project with translated values
|
||||
@@ -1943,9 +1943,17 @@ class ToolMilling(AppTool, Excellon):
|
||||
|
||||
tool_type = cw.currentText()
|
||||
self.ui_update_v_shape(tool_type)
|
||||
self.ui_update_l_shape(tool_type)
|
||||
|
||||
self.form_to_storage()
|
||||
|
||||
def ui_update_l_shape(self, t_type):
|
||||
if t_type.upper() == 'L':
|
||||
self.ui.pp_geo_name_cb.set_value('default_laser')
|
||||
else:
|
||||
self.ui.pp_geo_name_cb.set_value(self.app.defaults['tools_mill_ppname_g'])
|
||||
self.on_pp_changed()
|
||||
|
||||
def ui_update_v_shape(self, tool_type_txt):
|
||||
if tool_type_txt == 'V':
|
||||
self.ui.tipdialabel.show()
|
||||
@@ -4403,12 +4411,13 @@ class MillingUI:
|
||||
"Can be:\n"
|
||||
"C1 ... C4 = circular tool with x flutes\n"
|
||||
"B = ball tip milling tool\n"
|
||||
"V = v-shape milling tool")
|
||||
"V = v-shape milling tool\n"
|
||||
"L = laser")
|
||||
)
|
||||
|
||||
self.tool_shape_combo = FCComboBox2(policy=False)
|
||||
self.tool_shape_combo.setObjectName('mill_tool_shape')
|
||||
self.tool_shape_combo.addItems(["C1", "C2", "C3", "C4", "B", "V"])
|
||||
self.tool_shape_combo.addItems(["C1", "C2", "C3", "C4", "B", "V", "L"])
|
||||
|
||||
idx = int(self.app.defaults['tools_mill_tool_shape'])
|
||||
# protection against having this translated or loading a project with translated values
|
||||
|
||||
@@ -388,7 +388,7 @@ class NonCopperClear(AppTool, Gerber):
|
||||
self.bound_obj_name = ""
|
||||
self.bound_obj = None
|
||||
|
||||
self.tool_type_item_options = ["C1", "C2", "C3", "C4", "B", "V"]
|
||||
self.tool_type_item_options = ["C1", "C2", "C3", "C4", "B", "V", "L"]
|
||||
self.units = self.app.app_units.upper()
|
||||
|
||||
self.first_click = False
|
||||
@@ -4180,7 +4180,8 @@ class NccUI:
|
||||
"Can be:\n"
|
||||
"C1 ... C4 = circular tool with x flutes\n"
|
||||
"B = ball tip milling tool\n"
|
||||
"V = v-shape milling tool"))
|
||||
"V = v-shape milling tool\n"
|
||||
"L = laser"))
|
||||
|
||||
# Tool order
|
||||
self.ncc_order_label = FCLabel('%s:' % _('Tool order'))
|
||||
|
||||
@@ -103,7 +103,7 @@ class ToolPaint(AppTool, Gerber):
|
||||
# store here the default data for Geometry Data
|
||||
self.default_data = {}
|
||||
|
||||
self.tool_type_item_options = ["C1", "C2", "C3", "C4", "B", "V"]
|
||||
self.tool_type_item_options = ["C1", "C2", "C3", "C4", "B", "V", "L"]
|
||||
|
||||
self.form_fields = {
|
||||
"tools_paint_overlap": self.ui.paintoverlap_entry,
|
||||
@@ -3056,7 +3056,8 @@ class PaintUI:
|
||||
"Can be:\n"
|
||||
"C1 ... C4 = circular tool with x flutes\n"
|
||||
"B = ball tip milling tool\n"
|
||||
"V = v-shape milling tool"))
|
||||
"V = v-shape milling tool\n"
|
||||
"L = laser"))
|
||||
|
||||
# Tool Order
|
||||
self.order_label = FCLabel('<b>%s:</b>' % _('Tool order'))
|
||||
|
||||
Reference in New Issue
Block a user