diff --git a/CHANGELOG.md b/CHANGELOG.md index 726a8a57..e8fcba64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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' - 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 -- +- 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 - fixed all the `laser` preprocessors to work correctly and the resulting GCode to be plotted diff --git a/appObjects/FlatCAMGeometry.py b/appObjects/FlatCAMGeometry.py index 08334fd8..fb37c41d 100644 --- a/appObjects/FlatCAMGeometry.py +++ b/appObjects/FlatCAMGeometry.py @@ -979,7 +979,7 @@ class GeometryObject(FlatCAMObj, Geometry): las_min_pwr=0.0, multidepth=None, dpp=None, toolchange=None, toolchangez=None, toolchangexy=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. Creates a CNCJob out of this Geometry object. The actual diff --git a/tclCommands/TclCommandCncjob.py b/tclCommands/TclCommandCncjob.py index bb443010..99b745ba 100644 --- a/tclCommands/TclCommandCncjob.py +++ b/tclCommands/TclCommandCncjob.py @@ -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["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 \ - 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 \ self.app.defaults["tools_mill_ppname_g"] @@ -233,8 +233,6 @@ class TclCommandCncjob(TclCommandSignaled): return "fail" args.pop('name', None) - args.pop('las_power', None) - args.pop('las_min_pwr', None) for arg in args: if arg == "toolchange_xy" or arg == "spindlespeed" or arg == "startz": @@ -250,10 +248,6 @@ class TclCommandCncjob(TclCommandSignaled): else: return "fail" - # HACK !!! Should be solved elsewhere!!! - # default option for multidepth is False - # obj.options['multidepth'] = False - if not obj.multigeo: obj.generatecncjob(use_thread=False, plot=False, **args) 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_dwell'] = args["dwell"] 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"] self.app.milling_tool.mtool_gen_cncjob( diff --git a/tclCommands/TclCommandCutout.py b/tclCommands/TclCommandCutout.py index e662421e..a367d718 100644 --- a/tclCommands/TclCommandCutout.py +++ b/tclCommands/TclCommandCutout.py @@ -53,7 +53,7 @@ class TclCommandCutout(TclCommand): ('gaps', "Type of gaps. Can be: 'tb' = top-bottom, 'lr' = left-right and '4' = one each side."), ('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): diff --git a/tclCommands/TclCommandMirror.py b/tclCommands/TclCommandMirror.py index 0aaa9248..4ef909bb 100644 --- a/tclCommands/TclCommandMirror.py +++ b/tclCommands/TclCommandMirror.py @@ -106,6 +106,8 @@ class TclCommandMirror(TclCommandSignaled): if 'axis' in args: try: axis = args['axis'].upper() + # fix so the Tcl command works just like in GUI + axis = 'X' if axis == 'Y' else 'Y' except KeyError: axis = 'Y' else: diff --git a/tclCommands/TclCommandNregions.py b/tclCommands/TclCommandNregions.py index b223fd1e..8fd8753e 100644 --- a/tclCommands/TclCommandNregions.py +++ b/tclCommands/TclCommandNregions.py @@ -15,7 +15,7 @@ if '_' not in builtins.__dict__: 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) diff --git a/tclCommands/TclCommandPanelize.py b/tclCommands/TclCommandPanelize.py index 2632a29f..2cb2b86e 100644 --- a/tclCommands/TclCommandPanelize.py +++ b/tclCommands/TclCommandPanelize.py @@ -313,7 +313,7 @@ class TclCommandPanelize(TclCommand): obj_fin.tools = copied_tools if obj.multigeo is True: for tool in obj.tools: - obj_fin.tools[tool]['solid_geometry'][:] = [] + obj_fin.tools[tool]['solid_geometry'] = [] for row in range(rows): currentx = 0.0