summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/elements/element.py6
-rw-r--r--lib/elements/satin_column.py14
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py
index 8ff821e2..96949ca3 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -140,7 +140,7 @@ class EmbroideryElement(object):
# if a single number is given in the param, it will apply to both returned values.
# Not cached the cache will crash if the default is a numpy array.
# The ppoperty calling this will need to cache itself and can safely do so since it has no parameters
- def get_lr_float_param(self, param, default=(0, 0)):
+ def get_split_float_param(self, param, default=(0, 0)):
default = np.array(default) # type coersion in case the default is a tuple
raw = self.get_param(param, "")
@@ -159,8 +159,8 @@ class EmbroideryElement(object):
return default
# not cached
- def get_lr_mm_param_as_px(self, param, default):
- return self.get_lr_float_param(param, default) * PIXELS_PER_MM
+ def get_split_mm_param_as_px(self, param, default):
+ return self.get_split_float_param(param, default) * PIXELS_PER_MM
def set_param(self, name, value):
param = INKSTITCH_ATTRIBS[name]
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py
index 400f60d8..2cb0529d 100644
--- a/lib/elements/satin_column.py
+++ b/lib/elements/satin_column.py
@@ -125,7 +125,7 @@ class SatinColumn(EmbroideryElement):
@property
@param('zigzag_spacing_mm',
_('Zig-zag spacing (peak-to-peak)'),
- tooltip=_('Peak-to-peak distance between zig-zags. This is double the mm/stitch measurement used by most mechanichal machines.'),
+ tooltip=_('Peak-to-peak distance between zig-zags. This is double the mm/stitch measurement used by most mechanical machines.'),
unit='mm/cycle',
type='float',
default=0.4)
@@ -144,7 +144,7 @@ class SatinColumn(EmbroideryElement):
default=0)
def pull_compensation_percent(self):
# pull compensation as a percentage of the width
- return self.get_lr_float_param("pull_compensation_percent", (0, 0))
+ return self.get_split_float_param("pull_compensation_percent", (0, 0))
@property
@param(
@@ -160,7 +160,7 @@ class SatinColumn(EmbroideryElement):
# In satin stitch, the stitches have a tendency to pull together and
# narrow the entire column. We can compensate for this by stitching
# wider than we desire the column to end up.
- return self.get_lr_mm_param_as_px("pull_compensation_mm", (0, 0))
+ return self.get_split_mm_param_as_px("pull_compensation_mm", (0, 0))
@property
@param('contour_underlay', _('Contour underlay'), type='toggle', group=_('Contour Underlay'))
@@ -183,7 +183,7 @@ class SatinColumn(EmbroideryElement):
sort_index=2)
def contour_underlay_inset_px(self):
# how far inside the edge of the column to stitch the underlay
- return self.get_lr_mm_param_as_px("contour_underlay_inset_mm", (0.4, 0.4))
+ return self.get_split_mm_param_as_px("contour_underlay_inset_mm", (0.4, 0.4))
@property
@param('contour_underlay_inset_percent',
@@ -195,7 +195,7 @@ class SatinColumn(EmbroideryElement):
sort_index=3)
def contour_underlay_inset_percent(self):
# how far inside the edge of the column to stitch the underlay
- return self.get_lr_float_param("contour_underlay_inset_percent", (0, 0))
+ return self.get_split_float_param("contour_underlay_inset_percent", (0, 0))
@property
@param('center_walk_underlay', _('Center-walk underlay'), type='toggle', group=_('Center-Walk Underlay'))
@@ -263,7 +263,7 @@ class SatinColumn(EmbroideryElement):
# points of the zigzag fall outside the contour underlay but inside
# the edges of the satin column.
default = self.contour_underlay_inset_px * 0.5 / PIXELS_PER_MM
- x = self.get_lr_mm_param_as_px("zigzag_underlay_inset_mm", default)
+ x = self.get_split_mm_param_as_px("zigzag_underlay_inset_mm", default)
return x
@property
@@ -276,7 +276,7 @@ class SatinColumn(EmbroideryElement):
default="")
def zigzag_underlay_inset_percent(self):
default = self.contour_underlay_inset_percent * 0.5
- return self.get_lr_float_param("zigzag_underlay_inset_percent", default)
+ return self.get_split_float_param("zigzag_underlay_inset_percent", default)
@property
@param('zigzag_underlay_max_stitch_length_mm',