@@ -118,14 +118,15 @@ def manual_pattern_placement(self):
118118 @property
119119 @param ('running_stitch_length_mm' ,
120120 _ ('Running stitch length' ),
121- tooltip = _ ('Length of stitches. Stitches can be shorter according to the stitch tolerance setting.' ),
121+ tooltip = _ ('Length of stitches. Stitches can be shorter according to the stitch tolerance setting.\n '
122+ 'It is possible to create stitch length patterns by adding multiple values separated by a space.' ),
122123 unit = 'mm' ,
123- type = 'float ' ,
124+ type = 'string ' ,
124125 select_items = [('stroke_method' , 'running_stitch' ), ('stroke_method' , 'ripple_stitch' )],
125- default = 2.5 ,
126+ default = " 2.5" ,
126127 sort_index = 4 )
127128 def running_stitch_length (self ):
128- return max (self .get_float_param ("running_stitch_length_mm" , 2.5 ), 0.01 )
129+ return [ max (value , 0.01 ) for value in self .get_multiple_float_param ("running_stitch_length_mm" , " 2.5" )]
129130
130131 @property
131132 @param ('running_stitch_tolerance_mm' ,
@@ -185,13 +186,13 @@ def max_stitch_length(self):
185186 _ ('Zig-zag spacing (peak-to-peak)' ),
186187 tooltip = _ ('Length of stitches in zig-zag mode.' ),
187188 unit = 'mm' ,
188- type = 'float ' ,
189- default = 0.4 ,
189+ type = 'string ' ,
190+ default = " 0.4" ,
190191 select_items = [('stroke_method' , 'zigzag_stitch' )],
191192 sort_index = 6 )
192193 @cache
193194 def zigzag_spacing (self ):
194- return max (self .get_float_param ("zigzag_spacing_mm" , 0.4 ), 0.01 )
195+ return [ max (value , 0.01 ) for value in self .get_multiple_float_param ("zigzag_spacing_mm" , " 0.4" )]
195196
196197 @property
197198 @param ('stroke_pull_compensation_mm' ,
@@ -551,7 +552,8 @@ def simple_satin(self, path, zigzag_spacing, stroke_width, pull_compensation):
551552 # `self.zigzag_spacing` is the length for a zig and a zag
552553 # together (a V shape). Start with running stitch at half
553554 # that length:
554- stitch_group = self .running_stitch (path , zigzag_spacing / 2.0 , self .running_stitch_tolerance , False , 0 , "" )
555+ spacing = [value / 2 for value in zigzag_spacing ]
556+ stitch_group = self .running_stitch (path , spacing , self .running_stitch_tolerance , False , 0 , "" )
555557 stitch_group .stitches = zigzag_stitch (stitch_group .stitches , zigzag_spacing , stroke_width , pull_compensation )
556558
557559 return stitch_group
0 commit comments