- small changes in NCC tool regarding the usage of the V-shape tool
This commit is contained in:
@@ -3998,7 +3998,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
|
|||||||
|
|
||||||
tooldia = float(self.ui.geo_tools_table.item(row, 1).text())
|
tooldia = float(self.ui.geo_tools_table.item(row, 1).text())
|
||||||
new_cutz = (tooldia - vdia) / (2 * math.tan(math.radians(half_vangle)))
|
new_cutz = (tooldia - vdia) / (2 * math.tan(math.radians(half_vangle)))
|
||||||
new_cutz = float('%.4f' % -new_cutz)
|
new_cutz = float('%.4f' % -new_cutz) # this value has to be negative
|
||||||
self.ui.cutz_entry.set_value(new_cutz)
|
self.ui.cutz_entry.set_value(new_cutz)
|
||||||
|
|
||||||
# store the new CutZ value into storage (self.tools)
|
# store the new CutZ value into storage (self.tools)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
- in NCC tool there is now a depth of cut parameter named 'Cut Z' which will dictate how deep the tool will enter into the PCB material
|
- in NCC tool there is now a depth of cut parameter named 'Cut Z' which will dictate how deep the tool will enter into the PCB material
|
||||||
- in NCC tool added possibility to choose between the type of tools to be used and when V-shape is used then the tool diameter is calculated from the desired depth of cut and from the V-tip parameters
|
- in NCC tool added possibility to choose between the type of tools to be used and when V-shape is used then the tool diameter is calculated from the desired depth of cut and from the V-tip parameters
|
||||||
|
- small changes in NCC tool regarding the usage of the V-shape tool
|
||||||
|
|
||||||
2.09.2019
|
2.09.2019
|
||||||
|
|
||||||
|
|||||||
@@ -548,8 +548,8 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
"name": '_ncc',
|
"name": '_ncc',
|
||||||
"plot": self.app.defaults["geometry_plot"],
|
"plot": self.app.defaults["geometry_plot"],
|
||||||
"cutz": float(self.cutz_entry.get_value()),
|
"cutz": float(self.cutz_entry.get_value()),
|
||||||
"vtipdia": 0.2,
|
"vtipdia": float(self.tipdia_entry.get_value()),
|
||||||
"vtipangle": 30,
|
"vtipangle": float(self.tipangle_entry.get_value()),
|
||||||
"travelz": self.app.defaults["geometry_travelz"],
|
"travelz": self.app.defaults["geometry_travelz"],
|
||||||
"feedrate": self.app.defaults["geometry_feedrate"],
|
"feedrate": self.app.defaults["geometry_feedrate"],
|
||||||
"feedrate_z": self.app.defaults["geometry_feedrate_z"],
|
"feedrate_z": self.app.defaults["geometry_feedrate_z"],
|
||||||
@@ -838,6 +838,8 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
|
|
||||||
self.ui_disconnect()
|
self.ui_disconnect()
|
||||||
|
|
||||||
|
self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
|
||||||
|
|
||||||
if dia:
|
if dia:
|
||||||
tool_dia = dia
|
tool_dia = dia
|
||||||
else:
|
else:
|
||||||
@@ -875,9 +877,14 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
self.app.inform.emit(_("[ERROR_NOTCL] Wrong value format entered, "
|
self.app.inform.emit(_("[ERROR_NOTCL] Wrong value format entered, "
|
||||||
"use a number."))
|
"use a number."))
|
||||||
return
|
return
|
||||||
|
# calculated tool diameter so the cut_z parameter is obeyed
|
||||||
tool_dia = tip_dia + 2 * cut_z * math.tan(math.radians(tip_angle))
|
tool_dia = tip_dia + 2 * cut_z * math.tan(math.radians(tip_angle))
|
||||||
tool_dia = float('%.4f' % tool_dia)
|
|
||||||
|
# update the default_data so it is used in the ncc_tools dict
|
||||||
|
self.default_data.update({
|
||||||
|
"vtipdia": tip_dia,
|
||||||
|
"vtipangle": (tip_angle * 2),
|
||||||
|
})
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
tool_dia = float(self.addtool_entry.get_value())
|
tool_dia = float(self.addtool_entry.get_value())
|
||||||
@@ -895,6 +902,11 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||||||
self.app.inform.emit(_("[WARNING_NOTCL] Please enter a tool diameter to add, in Float format."))
|
self.app.inform.emit(_("[WARNING_NOTCL] Please enter a tool diameter to add, in Float format."))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if self.units == 'MM':
|
||||||
|
tool_dia = float('%.2f' % tool_dia)
|
||||||
|
else:
|
||||||
|
tool_dia = float('%.4f' % tool_dia)
|
||||||
|
|
||||||
if tool_dia == 0:
|
if tool_dia == 0:
|
||||||
self.app.inform.emit(_("[WARNING_NOTCL] Please enter a tool diameter with non-zero value, "
|
self.app.inform.emit(_("[WARNING_NOTCL] Please enter a tool diameter with non-zero value, "
|
||||||
"in Float format."))
|
"in Float format."))
|
||||||
|
|||||||
Reference in New Issue
Block a user