From 055eb63bec189a04a0e42dfa377a4b19b275a870 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 11 Nov 2016 20:09:21 -0500 Subject: avoid doubly multiplying by pixels_per_mm --- embroider.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'embroider.py') diff --git a/embroider.py b/embroider.py index b19bbf2f..81722cbd 100644 --- a/embroider.py +++ b/embroider.py @@ -767,7 +767,6 @@ class SatinColumn(EmbroideryElement): @property def zigzag_spacing(self): # peak-to-peak distance between zigzags - print >> dbg, "satin zigzag spacing", self.get_float_param("zigzag_spacing_mm") return self.get_float_param("zigzag_spacing_mm") @property @@ -786,7 +785,7 @@ class SatinColumn(EmbroideryElement): @property def contour_underlay_stitch_length(self): # use "contour_underlay_stitch_length", or, if not set, default to "stitch_length" - return self.get_float_param("contour_underlay_stitch_length_mm", self.get_float_param("running_stitch_length_mm")) + return self.get_float_param("contour_underlay_stitch_length_mm") or self.get_float_param("running_stitch_length_mm") @property def contour_underlay_inset(self): @@ -802,7 +801,7 @@ class SatinColumn(EmbroideryElement): @property def center_walk_underlay_stitch_length(self): # use "center_walk_underlay_stitch_length", or, if not set, default to "stitch_length" - return self.get_float_param("center_walk_underlay_stitch_length_mm", self.get_float_param("running_stitch_length_mm")) + return self.get_float_param("center_walk_underlay_stitch_length_mm") or self.get_float_param("running_stitch_length_mm") @property def zigzag_underlay(self): @@ -822,7 +821,7 @@ class SatinColumn(EmbroideryElement): # doing both contour underlay and zigzag underlay, make sure the # points of the zigzag fall outside the contour underlay but inside # the edges of the satin column. - return self.get_float_param("zigzag_underlay_inset_mm", self.contour_underlay_inset / 2.0) + return self.get_float_param("zigzag_underlay_inset_mm") or self.contour_underlay_inset / 2.0 def get_flattened_paths(self): # Given a pair of paths made up of bezier segments, flatten -- cgit v1.2.3