diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 3b31f061..f940fd08 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -1129,6 +1129,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber): :return: None :rtype: None """ + log.debug("FlatCAMObj.FlatCAMGerber.convert_units()") factor = Gerber.convert_units(self, units) @@ -2768,8 +2769,9 @@ class FlatCAMExcellon(FlatCAMObj, Excellon): self.app.worker_task.emit({'fcn': job_thread, 'params': [self.app]}) def convert_units(self, units): - factor = Excellon.convert_units(self, units) + log.debug("FlatCAMObj.FlatCAMExcellon.convert_units()") + factor = Excellon.convert_units(self, units) self.options['drillz'] = float(self.options['drillz']) * factor self.options['travelz'] = float(self.options['travelz']) * factor self.options['feedrate'] = float(self.options['feedrate']) * factor @@ -4956,6 +4958,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): :return: None :rtype: None """ + log.debug("FlatCAMObj.FlatCAMGeometry.scale()") try: xfactor = float(xfactor) @@ -5025,6 +5028,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): :return: None :rtype: None """ + log.debug("FlatCAMObj.FlatCAMGeometry.offset()") try: dx, dy = vect @@ -5055,6 +5059,8 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): self.app.inform.emit(_("[success] Geometry Offset done.")) def convert_units(self, units): + log.debug("FlatCAMObj.FlatCAMGeometry.convert_units()") + self.ui_disconnect() factor = Geometry.convert_units(self, units) @@ -6022,8 +6028,9 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob): self.annotation.redraw() def convert_units(self, units): + log.debug("FlatCAMObj.FlatCAMECNCjob.convert_units()") + factor = CNCjob.convert_units(self, units) - FlatCAMApp.App.log.debug("FlatCAMCNCjob.convert_units()") self.options["tooldia"] = float(self.options["tooldia"]) * factor param_list = ['cutz', 'depthperpass', 'travelz', 'feedrate', 'feedrate_z', 'feedrate_rapid', diff --git a/camlib.py b/camlib.py index 242b4bd1..0eddddf3 100644 --- a/camlib.py +++ b/camlib.py @@ -229,7 +229,8 @@ class Geometry(object): # fixed issue of getting bounds only for one level lists of objects # now it can get bounds for nested lists of objects - log.debug("Geometry->bounds()") + log.debug("camlib.Geometry.bounds()") + if self.solid_geometry is None: log.debug("solid_geometry is None") return 0, 0, 0, 0 @@ -1278,7 +1279,7 @@ class Geometry(object): :return: Scaling factor resulting from unit change. :rtype: float """ - log.debug("Geometry.convert_units()") + log.debug("camlib.Geometry.convert_units()") if units.upper() == self.units.upper(): return 1.0 @@ -1378,6 +1379,7 @@ class Geometry(object): :type point: list :return: None """ + log.debug("camlib.Geometry.mirror()") px, py = point xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] @@ -1420,6 +1422,7 @@ class Geometry(object): See shapely manual for more information: http://toblerity.org/shapely/manual.html#affine-transformations """ + log.debug("camlib.Geometry.rotate()") px, py = point @@ -1460,6 +1463,8 @@ class Geometry(object): See shapely manual for more information: http://toblerity.org/shapely/manual.html#affine-transformations """ + log.debug("camlib.Geometry.skew()") + px, py = point def skew_geom(obj): @@ -3298,7 +3303,8 @@ class Gerber (Geometry): # fixed issue of getting bounds only for one level lists of objects # now it can get bounds for nested lists of objects - log.debug("Gerber->bounds()") + log.debug("camlib.Gerber.bounds()") + if self.solid_geometry is None: log.debug("solid_geometry is None") return 0, 0, 0, 0 @@ -3442,6 +3448,8 @@ class Gerber (Geometry): :type vect: tuple :return: None """ + log.debug("camlib.Gerber.offset()") + try: dx, dy = vect except TypeError: @@ -3504,6 +3512,7 @@ class Gerber (Geometry): :type point: list :return: None """ + log.debug("camlib.Gerber.mirror()") px, py = point xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] @@ -3554,6 +3563,7 @@ class Gerber (Geometry): See shapely manual for more information: http://toblerity.org/shapely/manual.html#affine-transformations """ + log.debug("camlib.Gerber.skew()") px, py = point @@ -3596,6 +3606,7 @@ class Gerber (Geometry): :param point: :return: """ + log.debug("camlib.Gerber.rotate()") px, py = point @@ -4631,7 +4642,7 @@ class Excellon(Geometry): # fixed issue of getting bounds only for one level lists of objects # now it can get bounds for nested lists of objects - log.debug("Excellon() -> bounds()") + log.debug("camlib.Excellon.bounds()") # if self.solid_geometry is None: # log.debug("solid_geometry is None") # return 0, 0, 0, 0 @@ -4691,6 +4702,8 @@ class Excellon(Geometry): :type str: IN or MM :return: """ + log.debug("camlib.Excellon.convert_units()") + factor = Geometry.convert_units(self, units) # Tools @@ -4711,6 +4724,8 @@ class Excellon(Geometry): :return: None :rtype: NOne """ + log.debug("camlib.Excellon.scale()") + if yfactor is None: yfactor = xfactor @@ -4755,6 +4770,7 @@ class Excellon(Geometry): :type vect: tuple :return: None """ + log.debug("camlib.Excellon.offset()") dx, dy = vect @@ -4795,6 +4811,8 @@ class Excellon(Geometry): :type point: list :return: None """ + log.debug("camlib.Excellon.mirror()") + px, py = point xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] @@ -4842,6 +4860,8 @@ class Excellon(Geometry): See shapely manual for more information: http://toblerity.org/shapely/manual.html#affine-transformations """ + log.debug("camlib.Excellon.skew()") + if angle_x is None: angle_x = 0.0 @@ -4900,6 +4920,7 @@ class Excellon(Geometry): :param point: tuple of coordinates (x, y) :return: """ + log.debug("camlib.Excellon.rotate()") def rotate_geom(obj, origin=None): if type(obj) is list: @@ -5092,8 +5113,9 @@ class CNCjob(Geometry): return self.__dict__ def convert_units(self, units): + log.debug("camlib.CNCJob.convert_units()") + factor = Geometry.convert_units(self, units) - log.debug("CNCjob.convert_units()") self.z_cut = float(self.z_cut) * factor self.z_move *= factor @@ -6987,6 +7009,8 @@ class CNCjob(Geometry): # fixed issue of getting bounds only for one level lists of objects # now it can get bounds for nested lists of objects + log.debug("camlib.CNCJob.bounds()") + def bounds_rec(obj): if type(obj) is list: minx = Inf @@ -7058,6 +7082,7 @@ class CNCjob(Geometry): :return: None :rtype: None """ + log.debug("camlib.CNCJob.scale()") if yfactor is None: yfactor = xfactor @@ -7207,6 +7232,8 @@ class CNCjob(Geometry): :type vect: tuple :return: None """ + log.debug("camlib.CNCJob.offset()") + dx, dy = vect def offset_g(g): @@ -7271,6 +7298,8 @@ class CNCjob(Geometry): :param point: tupple of coordinates (x,y) :return: """ + log.debug("camlib.CNCJob.mirror()") + px, py = point xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis] @@ -7296,6 +7325,8 @@ class CNCjob(Geometry): See shapely manual for more information: http://toblerity.org/shapely/manual.html#affine-transformations """ + log.debug("camlib.CNCJob.skew()") + px, py = point for g in self.gcode_parsed: @@ -7312,6 +7343,7 @@ class CNCjob(Geometry): :param point: tupple of coordinates (x,y) :return: """ + log.debug("camlib.CNCJob.rotate()") px, py = point