- in FlatCAMGeometry fixed the scale and offset methods to always process the self.solid_geometry
- Calibration Tool - finished the calibrated object creation method
This commit is contained in:
@@ -1112,6 +1112,9 @@ class Excellon(Geometry):
|
||||
else:
|
||||
px, py = point
|
||||
|
||||
if xfactor == 0 and yfactor == 0:
|
||||
return
|
||||
|
||||
def scale_geom(obj):
|
||||
if type(obj) is list:
|
||||
new_obj = []
|
||||
@@ -1168,6 +1171,9 @@ class Excellon(Geometry):
|
||||
|
||||
dx, dy = vect
|
||||
|
||||
if dx == 0 and dy == 0:
|
||||
return
|
||||
|
||||
def offset_geom(obj):
|
||||
if type(obj) is list:
|
||||
new_obj = []
|
||||
@@ -1297,6 +1303,9 @@ class Excellon(Geometry):
|
||||
if angle_y is None:
|
||||
angle_y = 0.0
|
||||
|
||||
if angle_x == 0 and angle_y == 0:
|
||||
return
|
||||
|
||||
def skew_geom(obj):
|
||||
if type(obj) is list:
|
||||
new_obj = []
|
||||
@@ -1375,6 +1384,9 @@ class Excellon(Geometry):
|
||||
"""
|
||||
log.debug("flatcamParsers.ParseExcellon.Excellon.rotate()")
|
||||
|
||||
if angle == 0:
|
||||
return
|
||||
|
||||
def rotate_geom(obj, origin=None):
|
||||
if type(obj) is list:
|
||||
new_obj = []
|
||||
|
||||
@@ -1760,6 +1760,9 @@ class Gerber(Geometry):
|
||||
_("Scale factor has to be a number: integer or float."))
|
||||
return
|
||||
|
||||
if xfactor == 0 and yfactor == 0:
|
||||
return
|
||||
|
||||
if point is None:
|
||||
px = 0
|
||||
py = 0
|
||||
@@ -1769,8 +1772,7 @@ class Gerber(Geometry):
|
||||
# variables to display the percentage of work done
|
||||
self.geo_len = 0
|
||||
try:
|
||||
for __ in self.solid_geometry:
|
||||
self.geo_len += 1
|
||||
self.geo_len = len(self.solid_geometry)
|
||||
except TypeError:
|
||||
self.geo_len = 1
|
||||
|
||||
@@ -1835,8 +1837,7 @@ class Gerber(Geometry):
|
||||
log.debug('camlib.Gerber.scale() Exception --> %s' % str(e))
|
||||
return 'fail'
|
||||
|
||||
self.app.inform.emit('[success] %s' %
|
||||
_("Gerber Scale done."))
|
||||
self.app.inform.emit('[success] %s' % _("Gerber Scale done."))
|
||||
self.app.proc_container.new_text = ''
|
||||
|
||||
# ## solid_geometry ???
|
||||
@@ -1876,6 +1877,9 @@ class Gerber(Geometry):
|
||||
"Probable you entered only one value in the Offset field."))
|
||||
return
|
||||
|
||||
if dx == 0 and dy == 0:
|
||||
return
|
||||
|
||||
# variables to display the percentage of work done
|
||||
self.geo_len = 0
|
||||
try:
|
||||
@@ -2028,11 +2032,13 @@ class Gerber(Geometry):
|
||||
|
||||
px, py = point
|
||||
|
||||
if angle_x == 0 and angle_y == 0:
|
||||
return
|
||||
|
||||
# variables to display the percentage of work done
|
||||
self.geo_len = 0
|
||||
try:
|
||||
for __ in self.solid_geometry:
|
||||
self.geo_len += 1
|
||||
self.geo_len = len(self.solid_geometry)
|
||||
except TypeError:
|
||||
self.geo_len = 1
|
||||
|
||||
@@ -2089,6 +2095,9 @@ class Gerber(Geometry):
|
||||
|
||||
px, py = point
|
||||
|
||||
if angle == 0:
|
||||
return
|
||||
|
||||
# variables to display the percentage of work done
|
||||
self.geo_len = 0
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user