kopia lustrzana https://github.com/inkstitch/inkstitch
Custom filling angle support. Angle in degrees 0..180
rodzic
97070898b4
commit
0a62680124
|
@ -7,6 +7,7 @@
|
|||
<param name="zigzag_spacing_mm" type="float" min="0.01" max="5.00" precision="2" _gui-text="Zigzag spacing (mm)">1.00</param>
|
||||
<param name="row_spacing_mm" type="float" min="0.01" max="5.00" precision="2" _gui-text="Row spacing (mm)">0.40</param>
|
||||
<param name="max_stitch_len_mm" type="float" min="0.1" max="100.0" _gui-text="Maximum stitch length (mm)">3.0</param>
|
||||
<param name="fill_angle_deg" type="float" min="0" max="180" precision="0" _gui-text="Fill angle (deg)">0.0</param>
|
||||
<param name="collapse_len_mm" type="float" min="0.0" max="10.0" _gui-text="Maximum collapse length (mm)">0.0</param>
|
||||
<param name="preserve_order" type="boolean" _gui-text="Preserve stacking order" description="if false, sorts by color, which saves thread changes. True preserves stacking order, important if you're laying colors over each other.">false</param>
|
||||
<param name="hatch_filled_paths" type="boolean" _gui-text="Hatch filled paths" description="If false, filled paths are filled using equally-spaced lines. If true, filled paths are filled using hatching lines.">false</param>
|
||||
|
|
|
@ -480,6 +480,10 @@ class Embroider(inkex.Effect):
|
|||
action="store", type="float",
|
||||
dest="max_stitch_len_mm", default=3.0,
|
||||
help="max stitch length (mm)")
|
||||
self.OptionParser.add_option("-a", "--fill_angle_deg",
|
||||
action="store", type="float",
|
||||
dest="fill_angle_deg", default=0,
|
||||
help="fill angle (deg)")
|
||||
self.OptionParser.add_option("-c", "--collapse_len_mm",
|
||||
action="store", type="float",
|
||||
dest="collapse_len_mm", default=0.0,
|
||||
|
@ -645,7 +649,7 @@ class Embroider(inkex.Effect):
|
|||
self.patchList.patches.extend(self.path_to_patch_list(node))
|
||||
else:
|
||||
if (self.get_style(node, "fill")!=None):
|
||||
angle = math.radians(float(descparts.get('embroider_angle', 0)))
|
||||
angle = math.radians(float(descparts.get('embroider_angle', 0))) + self.options.fill_angle_deg/180.0*math.pi
|
||||
self.patchList.patches.extend(self.filled_region_to_patchlist(node, angle))
|
||||
if (self.get_style(node, "stroke")!=None):
|
||||
self.patchList.patches.extend(self.path_to_patch_list(node))
|
||||
|
|
Ładowanie…
Reference in New Issue