- fixed some bugs
This commit is contained in:
@@ -4229,6 +4229,9 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
self.ui.geo_tools_table.cellWidget(row, 6).clicked.connect(self.on_plot_cb_click_table)
|
self.ui.geo_tools_table.cellWidget(row, 6).clicked.connect(self.on_plot_cb_click_table)
|
||||||
self.ui.plot_cb.stateChanged.connect(self.on_plot_cb_click)
|
self.ui.plot_cb.stateChanged.connect(self.on_plot_cb_click)
|
||||||
|
|
||||||
|
# common parameters update
|
||||||
|
self.ui.pp_geometry_name_cb.currentIndexChanged.connect(self.update_common_param_in_storage)
|
||||||
|
|
||||||
def ui_disconnect(self):
|
def ui_disconnect(self):
|
||||||
|
|
||||||
# on any change to the widgets that matter it will be called self.gui_form_to_storage which will save the
|
# on any change to the widgets that matter it will be called self.gui_form_to_storage which will save the
|
||||||
@@ -4969,6 +4972,10 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
temp_tools.clear()
|
temp_tools.clear()
|
||||||
self.ui_connect()
|
self.ui_connect()
|
||||||
|
|
||||||
|
def update_common_param_in_storage(self):
|
||||||
|
for tooluid_value in self.tools.values():
|
||||||
|
tooluid_value['data']['ppname_g'] = self.ui.pp_geometry_name_cb.get_value()
|
||||||
|
|
||||||
def select_tools_table_row(self, row, clearsel=None):
|
def select_tools_table_row(self, row, clearsel=None):
|
||||||
if clearsel:
|
if clearsel:
|
||||||
self.ui.geo_tools_table.clearSelection()
|
self.ui.geo_tools_table.clearSelection()
|
||||||
@@ -5117,15 +5124,13 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
# this reads the values in the UI form to the self.options dictionary
|
# this reads the values in the UI form to the self.options dictionary
|
||||||
self.read_form()
|
self.read_form()
|
||||||
|
|
||||||
self.sel_tools = {}
|
self.sel_tools = dict()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if self.special_group:
|
if self.special_group:
|
||||||
self.app.inform.emit('[WARNING_NOTCL] %s %s %s.' %
|
self.app.inform.emit(
|
||||||
(_("This Geometry can't be processed because it is"),
|
'[WARNING_NOTCL] %s %s %s.' %
|
||||||
str(self.special_group),
|
(_("This Geometry can't be processed because it is"), str(self.special_group), _("geometry"))
|
||||||
_("geometry")
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
@@ -5166,8 +5171,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
self.ui.geo_tools_table.clearSelection()
|
self.ui.geo_tools_table.clearSelection()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.app.inform.emit('[ERROR_NOTCL] %s' %
|
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Failed. No tool selected in the tool table ..."))
|
||||||
_("Failed. No tool selected in the tool table ..."))
|
|
||||||
|
|
||||||
def mtool_gen_cncjob(self, outname=None, tools_dict=None, tools_in_use=None, segx=None, segy=None,
|
def mtool_gen_cncjob(self, outname=None, tools_dict=None, tools_in_use=None, segx=None, segy=None,
|
||||||
plot=True, use_thread=True):
|
plot=True, use_thread=True):
|
||||||
@@ -5261,15 +5265,15 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
try:
|
try:
|
||||||
offset_value = float(self.ui.tool_offset_entry.get_value().replace(',', '.'))
|
offset_value = float(self.ui.tool_offset_entry.get_value().replace(',', '.'))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.app.inform.emit('[ERROR_NOTCL] %s' %
|
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Wrong value format entered, use a number."))
|
||||||
_("Wrong value format entered, use a number."))
|
|
||||||
return
|
return
|
||||||
if offset_value:
|
if offset_value:
|
||||||
tool_offset = float(offset_value)
|
tool_offset = float(offset_value)
|
||||||
else:
|
else:
|
||||||
self.app.inform.emit('[WARNING] %s' % _("Tool Offset is selected in Tool Table but "
|
self.app.inform.emit(
|
||||||
"no value is provided.\n"
|
'[WARNING] %s' % _("Tool Offset is selected in Tool Table but no value is provided.\n"
|
||||||
"Add a Tool Offset or change the Offset Type."))
|
"Add a Tool Offset or change the Offset Type.")
|
||||||
|
)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
tool_offset = 0.0
|
tool_offset = 0.0
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
31.01.2020
|
31.01.2020
|
||||||
|
|
||||||
- added a new functionality, a variation of Set Origin named Move to Origin. It will move a selection of objects to origin such as the bottom left corner of the bounding box that fit them all is in origin.
|
- added a new functionality, a variation of Set Origin named Move to Origin. It will move a selection of objects to origin such as the bottom left corner of the bounding box that fit them all is in origin.
|
||||||
|
- fixed some bugs
|
||||||
|
|
||||||
30.01.2020
|
30.01.2020
|
||||||
|
|
||||||
|
|||||||
@@ -2876,7 +2876,7 @@ class CNCjob(Geometry):
|
|||||||
|
|
||||||
# Tool change sequence (optional)
|
# Tool change sequence (optional)
|
||||||
if toolchange:
|
if toolchange:
|
||||||
gcode += self.doformat(p.toolchange_code,toolchangexy=(self.oldx, self.oldy))
|
gcode += self.doformat(p.toolchange_code, toolchangexy=(self.oldx, self.oldy))
|
||||||
gcode += self.doformat(p.spindle_code) # Spindle start)
|
gcode += self.doformat(p.spindle_code) # Spindle start)
|
||||||
if self.dwell is True:
|
if self.dwell is True:
|
||||||
gcode += self.doformat(p.dwell_code) # Dwell time
|
gcode += self.doformat(p.dwell_code) # Dwell time
|
||||||
@@ -3419,7 +3419,7 @@ class CNCjob(Geometry):
|
|||||||
self.app.inform.emit('[ERROR] %s: %s' %
|
self.app.inform.emit('[ERROR] %s: %s' %
|
||||||
(_("Expected a Geometry, got"), type(geometry)))
|
(_("Expected a Geometry, got"), type(geometry)))
|
||||||
return 'fail'
|
return 'fail'
|
||||||
log.debug("Generate_from_geometry_2()")
|
log.debug("Executing camlib.CNCJob.generate_from_geometry_2()")
|
||||||
|
|
||||||
# if solid_geometry is empty raise an exception
|
# if solid_geometry is empty raise an exception
|
||||||
if not geometry.solid_geometry:
|
if not geometry.solid_geometry:
|
||||||
@@ -3487,11 +3487,12 @@ class CNCjob(Geometry):
|
|||||||
flat_geometry = self.flatten(temp_solid_geometry, pathonly=True)
|
flat_geometry = self.flatten(temp_solid_geometry, pathonly=True)
|
||||||
log.debug("%d paths" % len(flat_geometry))
|
log.debug("%d paths" % len(flat_geometry))
|
||||||
|
|
||||||
if type(self.app.defaults["geometry_cnctooldia"]) == float:
|
default_dia = 0.01
|
||||||
|
if isinstance(self.app.defaults["geometry_cnctooldia"], float):
|
||||||
default_dia = self.app.defaults["geometry_cnctooldia"]
|
default_dia = self.app.defaults["geometry_cnctooldia"]
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
tools_string = self.defaults["geometry_cnctooldia"].split(",")
|
tools_string = self.app.defaults["geometry_cnctooldia"].split(",")
|
||||||
tools_diameters = [eval(a) for a in tools_string if a != '']
|
tools_diameters = [eval(a) for a in tools_string if a != '']
|
||||||
default_dia = tools_diameters[0] if tools_diameters else 0.0
|
default_dia = tools_diameters[0] if tools_diameters else 0.0
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ class TextEditor(QtWidgets.QWidget):
|
|||||||
if qc.hasSelection():
|
if qc.hasSelection():
|
||||||
qc.insertText(new)
|
qc.insertText(new)
|
||||||
else:
|
else:
|
||||||
self.ui.code_editor.moveCursor(QtGui.QTextCursor.Start)
|
self.code_editor.moveCursor(QtGui.QTextCursor.Start)
|
||||||
break
|
break
|
||||||
# Mark end of undo block
|
# Mark end of undo block
|
||||||
cursor.endEditBlock()
|
cursor.endEditBlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user