- Isolation Tool: updated the tools dict with the common parameters value on isolating
- Fixed a recent change that made the edited Geometry objects in the Geometry Editor not to be plotted after saving changes
This commit is contained in:
parent
0d57852ec5
commit
9eea4f6333
|
@ -1718,6 +1718,16 @@ class ToolIsolation(AppTool, Gerber):
|
|||
combine = self.combine_passes_cb.get_value()
|
||||
tools_storage = self.iso_tools
|
||||
|
||||
# update the Common Parameters valuse in the self.iso_tools
|
||||
for tool_iso in self.iso_tools:
|
||||
for key in self.iso_tools[tool_iso]:
|
||||
if key == 'data':
|
||||
self.iso_tools[tool_iso][key]["tools_iso_rest"] = self.rest_cb.get_value()
|
||||
self.iso_tools[tool_iso][key]["tools_iso_combine_passes"] = combine
|
||||
self.iso_tools[tool_iso][key]["tools_iso_isoexcept"] = self.except_cb.get_value()
|
||||
self.iso_tools[tool_iso][key]["tools_iso_selection"] = self.select_combo.get_value()
|
||||
self.iso_tools[tool_iso][key]["tools_iso_area_shape"] = self.area_shape_radio.get_value()
|
||||
|
||||
if combine:
|
||||
if self.rest_cb.get_value():
|
||||
self.combined_rest(iso_obj=isolated_obj, iso2geo=geometry, tools_storage=tools_storage,
|
||||
|
@ -1747,7 +1757,7 @@ class ToolIsolation(AppTool, Gerber):
|
|||
|
||||
milling_type = tool_data['tools_iso_milling_type']
|
||||
|
||||
iso_except = tool_data['tools_iso_isoexcept']
|
||||
iso_except = self.except_cb.get_value()
|
||||
|
||||
for i in range(passes):
|
||||
tool_dia = tools_storage[tool]['tooldia']
|
||||
|
@ -1918,7 +1928,7 @@ class ToolIsolation(AppTool, Gerber):
|
|||
# if milling type is climb then the move is counter-clockwise around features
|
||||
mill_dir = True if milling_type == 'cl' else False
|
||||
|
||||
iso_except = tool_data['tools_iso_isoexcept']
|
||||
iso_except = self.except_cb.get_value()
|
||||
|
||||
outname = "%s_%.*f" % (iso_obj.options["name"], self.decimals, float(tool_dia))
|
||||
|
||||
|
@ -1928,23 +1938,9 @@ class ToolIsolation(AppTool, Gerber):
|
|||
elif iso_t == 1:
|
||||
internal_name = outname + "_int_iso"
|
||||
|
||||
# transfer the Cut Z and Vtip and VAngle values in case that we use the V-Shape tool in Gerber UI
|
||||
if tool_type.lower() == 'v':
|
||||
new_cutz = self.ui.cutz_spinner.get_value()
|
||||
new_vtipdia = self.ui.tipdia_spinner.get_value()
|
||||
new_vtipangle = self.ui.tipangle_spinner.get_value()
|
||||
tool_type = 'V'
|
||||
tool_data.update({
|
||||
"name": internal_name,
|
||||
"cutz": new_cutz,
|
||||
"vtipdia": new_vtipdia,
|
||||
"vtipangle": new_vtipangle,
|
||||
})
|
||||
else:
|
||||
tool_data.update({
|
||||
"name": internal_name,
|
||||
})
|
||||
tool_type = 'C1'
|
||||
|
||||
solid_geo, work_geo = self.generate_rest_geometry(geometry=work_geo, tooldia=tool_dia,
|
||||
passes=passes, overlap=overlap, invert=mill_dir,
|
||||
|
@ -2084,7 +2080,7 @@ class ToolIsolation(AppTool, Gerber):
|
|||
|
||||
milling_type = tool_data['tools_iso_milling_type']
|
||||
|
||||
iso_except = tool_data['tools_iso_isoexcept']
|
||||
iso_except = self.except_cb.get_value()
|
||||
|
||||
outname = "%s_%.*f" % (iso_obj.options["name"], self.decimals, float(tool_dia))
|
||||
|
||||
|
@ -2094,23 +2090,9 @@ class ToolIsolation(AppTool, Gerber):
|
|||
elif iso_t == 1:
|
||||
internal_name = outname + "_int_iso"
|
||||
|
||||
# transfer the Cut Z and Vtip and VAngle values in case that we use the V-Shape tool in Gerber UI
|
||||
if tool_type.lower() == 'v':
|
||||
new_cutz = self.ui.cutz_spinner.get_value()
|
||||
new_vtipdia = self.ui.tipdia_spinner.get_value()
|
||||
new_vtipangle = self.ui.tipangle_spinner.get_value()
|
||||
tool_type = 'V'
|
||||
tool_data.update({
|
||||
"name": internal_name,
|
||||
"cutz": new_cutz,
|
||||
"vtipdia": new_vtipdia,
|
||||
"vtipangle": new_vtipangle,
|
||||
})
|
||||
else:
|
||||
tool_data.update({
|
||||
"name": internal_name,
|
||||
})
|
||||
tool_type = 'C1'
|
||||
|
||||
solid_geo = []
|
||||
for nr_pass in range(passes):
|
||||
|
@ -2194,7 +2176,7 @@ class ToolIsolation(AppTool, Gerber):
|
|||
|
||||
self.app.app_obj.new_object("geometry", iso_name, iso_init, plot=plot)
|
||||
|
||||
def area_subtraction(self, geo, subtraction_geo):
|
||||
def area_subtraction(self, geo, subtraction_geo=None):
|
||||
"""
|
||||
Subtracts the subtraction_geo (if present else self.solid_geometry) from the geo
|
||||
|
||||
|
|
|
@ -2249,6 +2249,7 @@ class App(QtCore.QObject):
|
|||
log.debug("App.editor2object() --> Geometry --> %s" % str(e))
|
||||
|
||||
edited_obj.build_ui()
|
||||
edited_obj.plot()
|
||||
self.inform.emit('[success] %s' % _("Editor exited. Editor content saved."))
|
||||
|
||||
elif isinstance(edited_obj, GerberObject):
|
||||
|
@ -2305,6 +2306,7 @@ class App(QtCore.QObject):
|
|||
if isinstance(edited_obj, GeometryObject):
|
||||
self.geo_editor.deactivate()
|
||||
edited_obj.build_ui()
|
||||
edited_obj.plot()
|
||||
elif isinstance(edited_obj, GerberObject):
|
||||
self.grb_editor.deactivate_grb_editor()
|
||||
edited_obj.build_ui()
|
||||
|
|
|
@ -13,6 +13,8 @@ CHANGELOG for FlatCAM beta
|
|||
- Isolation Tool: working on the Rest machining: almost there, perhaps I will use multiprocessing
|
||||
- Isolation Tool: removed the tools that have empty geometry in case of rest machining
|
||||
- Isolation Tool: solved some naming issues
|
||||
- Isolation Tool: updated the tools dict with the common parameters value on isolating
|
||||
- Fixed a recent change that made the edited Geometry objects in the Geometry Editor not to be plotted after saving changes
|
||||
|
||||
29.05.2020
|
||||
|
||||
|
|
Loading…
Reference in New Issue