diff options
| author | Lex Neva <github@lexneva.name> | 2016-11-11 20:09:21 -0500 |
|---|---|---|
| committer | Lex Neva <github@lexneva.name> | 2016-11-11 20:09:21 -0500 |
| commit | 055eb63bec189a04a0e42dfa377a4b19b275a870 (patch) | |
| tree | dcaf860f34219659f6438149fdcb08b31bdcb81d | |
| parent | 9d7a148f63053cd79fffd0bf0f4b282e7f79ef0d (diff) | |
avoid doubly multiplying by pixels_per_mm
| -rw-r--r-- | embroider.py | 7 |
1 files changed, 3 insertions, 4 deletions
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 |
