- fixed some issues in panelize and cncjob Tcl commands
- reversed the mirroring axis in the `mirror` Tcl command to be consistent with the action in GUI
This commit is contained in:
@@ -17,7 +17,9 @@ CHANGELOG for FlatCAM beta
|
|||||||
- minor changed in camlib.py regarding the self.check_zcut() method setting the self.z_cut to 'fail'
|
- minor changed in camlib.py regarding the self.check_zcut() method setting the self.z_cut to 'fail'
|
||||||
- upgraded the `mirror` Tcl command to work on a selection of objects and also fixed a plot issue
|
- upgraded the `mirror` Tcl command to work on a selection of objects and also fixed a plot issue
|
||||||
- upgraded the `skew` Tcl command to work on a selection of objects and added the ability to skew not only in degrees but also by distances
|
- upgraded the `skew` Tcl command to work on a selection of objects and added the ability to skew not only in degrees but also by distances
|
||||||
-
|
- fixed some issues in `panelize` and `cncjob` Tcl commands
|
||||||
|
- reversed the mirroring axis in the `mirror` Tcl command to be consistent with the action in GUI
|
||||||
|
|
||||||
31.02.2022
|
31.02.2022
|
||||||
|
|
||||||
- fixed all the `laser` preprocessors to work correctly and the resulting GCode to be plotted
|
- fixed all the `laser` preprocessors to work correctly and the resulting GCode to be plotted
|
||||||
|
|||||||
@@ -979,7 +979,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
|||||||
las_min_pwr=0.0,
|
las_min_pwr=0.0,
|
||||||
multidepth=None, dpp=None, toolchange=None, toolchangez=None, toolchangexy=None,
|
multidepth=None, dpp=None, toolchange=None, toolchangez=None, toolchangexy=None,
|
||||||
extracut=None, extracut_length=None, startz=None, endz=None, endxy=None, pp=None,
|
extracut=None, extracut_length=None, startz=None, endz=None, endxy=None, pp=None,
|
||||||
segx=None, segy=None, use_thread=True, plot=True):
|
segx=None, segy=None, use_thread=True, plot=True, **args):
|
||||||
"""
|
"""
|
||||||
Only used by the TCL Command Cncjob.
|
Only used by the TCL Command Cncjob.
|
||||||
Creates a CNCJob out of this Geometry object. The actual
|
Creates a CNCJob out of this Geometry object. The actual
|
||||||
|
|||||||
@@ -137,9 +137,9 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
|
|
||||||
args["dia"] = args["dia"] if "dia" in args and args["dia"] else self.app.defaults["tools_mill_tooldia"]
|
args["dia"] = args["dia"] if "dia" in args and args["dia"] else self.app.defaults["tools_mill_tooldia"]
|
||||||
|
|
||||||
args["z_cut"] = args["z_cut"] if "z_cut" in args and args["z_cut"] else self.app.defaults["geometry_cutz"]
|
args["z_cut"] = args["z_cut"] if "z_cut" in args and args["z_cut"] else self.app.defaults["tools_mill_cutz"]
|
||||||
args["z_move"] = args["z_move"] if "z_move" in args and args["z_move"] else \
|
args["z_move"] = args["z_move"] if "z_move" in args and args["z_move"] else \
|
||||||
self.app.defaults["geometry_travelz"]
|
self.app.defaults["tools_mill_travelz"]
|
||||||
|
|
||||||
args["pp"] = args["pp"] if "pp" in args and isinstance(args["pp"], str) else \
|
args["pp"] = args["pp"] if "pp" in args and isinstance(args["pp"], str) else \
|
||||||
self.app.defaults["tools_mill_ppname_g"]
|
self.app.defaults["tools_mill_ppname_g"]
|
||||||
@@ -233,8 +233,6 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
return "fail"
|
return "fail"
|
||||||
|
|
||||||
args.pop('name', None)
|
args.pop('name', None)
|
||||||
args.pop('las_power', None)
|
|
||||||
args.pop('las_min_pwr', None)
|
|
||||||
|
|
||||||
for arg in args:
|
for arg in args:
|
||||||
if arg == "toolchange_xy" or arg == "spindlespeed" or arg == "startz":
|
if arg == "toolchange_xy" or arg == "spindlespeed" or arg == "startz":
|
||||||
@@ -250,10 +248,6 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
else:
|
else:
|
||||||
return "fail"
|
return "fail"
|
||||||
|
|
||||||
# HACK !!! Should be solved elsewhere!!!
|
|
||||||
# default option for multidepth is False
|
|
||||||
# obj.options['multidepth'] = False
|
|
||||||
|
|
||||||
if not obj.multigeo:
|
if not obj.multigeo:
|
||||||
obj.generatecncjob(use_thread=False, plot=False, **args)
|
obj.generatecncjob(use_thread=False, plot=False, **args)
|
||||||
else:
|
else:
|
||||||
@@ -286,7 +280,7 @@ class TclCommandCncjob(TclCommandSignaled):
|
|||||||
local_tools_dict[tool_uid]['data']['tools_mill_spindlespeed'] = args["spindlespeed"]
|
local_tools_dict[tool_uid]['data']['tools_mill_spindlespeed'] = args["spindlespeed"]
|
||||||
local_tools_dict[tool_uid]['data']['tools_mill_dwell'] = args["dwell"]
|
local_tools_dict[tool_uid]['data']['tools_mill_dwell'] = args["dwell"]
|
||||||
local_tools_dict[tool_uid]['data']['tools_mill_dwelltime'] = args["dwelltime"]
|
local_tools_dict[tool_uid]['data']['tools_mill_dwelltime'] = args["dwelltime"]
|
||||||
local_tools_dict[tool_uid]['data']['tools_mill_min_power'] = args["las_min_pwr"]
|
local_tools_dict[tool_uid]['data']['tools_mill_min_power'] = args['las_min_pwr']
|
||||||
local_tools_dict[tool_uid]['data']['tools_mill_ppname_g'] = args["pp"]
|
local_tools_dict[tool_uid]['data']['tools_mill_ppname_g'] = args["pp"]
|
||||||
|
|
||||||
self.app.milling_tool.mtool_gen_cncjob(
|
self.app.milling_tool.mtool_gen_cncjob(
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class TclCommandCutout(TclCommand):
|
|||||||
('gaps', "Type of gaps. Can be: 'tb' = top-bottom, 'lr' = left-right and '4' = one each side."),
|
('gaps', "Type of gaps. Can be: 'tb' = top-bottom, 'lr' = left-right and '4' = one each side."),
|
||||||
('outname', 'Name of the object to create.')
|
('outname', 'Name of the object to create.')
|
||||||
]),
|
]),
|
||||||
'examples': ['cutout new_geo -dia 1.2 -margin 0.1 -gapsize 1 -gaps "tb" -outname cut_geo']
|
'examples': ['cutout cut_object -dia 1.2 -margin 0.1 -gapsize 1 -gaps "tb" -outname cutout_geo']
|
||||||
}
|
}
|
||||||
|
|
||||||
def execute(self, args, unnamed_args):
|
def execute(self, args, unnamed_args):
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ class TclCommandMirror(TclCommandSignaled):
|
|||||||
if 'axis' in args:
|
if 'axis' in args:
|
||||||
try:
|
try:
|
||||||
axis = args['axis'].upper()
|
axis = args['axis'].upper()
|
||||||
|
# fix so the Tcl command works just like in GUI
|
||||||
|
axis = 'X' if axis == 'Y' else 'Y'
|
||||||
except KeyError:
|
except KeyError:
|
||||||
axis = 'Y'
|
axis = 'Y'
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ if '_' not in builtins.__dict__:
|
|||||||
|
|
||||||
class TclCommandNregions(TclCommand):
|
class TclCommandNregions(TclCommand):
|
||||||
"""
|
"""
|
||||||
Tcl shell command to follow a Gerber file
|
Tcl shell command that creates a Geometry object with the non-copper regions.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# array of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
|
# array of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ class TclCommandPanelize(TclCommand):
|
|||||||
obj_fin.tools = copied_tools
|
obj_fin.tools = copied_tools
|
||||||
if obj.multigeo is True:
|
if obj.multigeo is True:
|
||||||
for tool in obj.tools:
|
for tool in obj.tools:
|
||||||
obj_fin.tools[tool]['solid_geometry'][:] = []
|
obj_fin.tools[tool]['solid_geometry'] = []
|
||||||
|
|
||||||
for row in range(rows):
|
for row in range(rows):
|
||||||
currentx = 0.0
|
currentx = 0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user