fix typo in hatchfill

This commit is contained in:
Mario Voigt 2021-04-09 00:07:05 +02:00
parent 5d6248e21e
commit 8b88223c61
3 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>_Hatch Fill</name>
<name>Hatch Fill</name>
<id>fablabchemnitz.de.hatchfill</id>
<param name="tab" type="notebook">
<page name="splash" gui-text="Hatch Fill">

View File

@ -2,11 +2,11 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Ofsplot (Offset Paths)</name>
<id>fablabchemnitz.de.ofsplot</id>
<param name="count" type="int" min="0" max="100000" gui-text="Number of offset paths:">10</param>
<param name="offset" type="float" min="-1000" max="+1000" gui-text="Offset between two paths:">0.8</param>
<param name="init_offset" type="float" min="-1000" max="+1000" gui-text="Initial offset from original path:">0.8</param>
<param name="offset_count" type="int" min="1" max="100000" gui-text="Number of offset paths:">1</param>
<param name="offset" type="float" precision="4" min="-1000" max="+1000" gui-text="Offset between two paths:">1.0000</param>
<param name="init_offset" type="float" precision="4" min="-1000" max="+1000" gui-text="Initial offset from original path:">1.0000</param>
<param name="copy_org" type="bool" gui-text="Copy original path (=keep it)">false</param>
<param name="offset_increase" type="float" min="-1000" max="+1000" gui-text="Offset increase per iteration:">0.8</param>
<param name="offset_increase" type="float" precision="4" min="-1000" max="+1000" gui-text="Offset increase per iteration:">0.0000</param>
<param name="miterlimit" type="float" min="0.0" max="1000" gui-text="Miter limit">3.0</param>
<param name="clipperscale" type="float" min="0.0" max="9999.0" gui-text="Scaling factor">1024.0</param>
<param name="jointype" appearance="combo" type="optiongroup" default="2" gui-text="Join type">

View File

@ -9,11 +9,11 @@ import pyclipper
class ofsplot(inkex.Effect):
def __init__(self):
inkex.Effect.__init__(self)
self.arg_parser.add_argument("--count", type=int, default=10, help="Number of offset paths")
self.arg_parser.add_argument("--offset", type=float, default=2.0, help="Offset amount")
self.arg_parser.add_argument("--init_offset", type=float, default=2.0, help="Initial Offset Amount")
self.arg_parser.add_argument("--offset_count", type=int, default=1, help="Number of offset paths")
self.arg_parser.add_argument("--offset", type=float, default=1.000, help="Offset amount")
self.arg_parser.add_argument("--init_offset", type=float, default=0.000, help="Initial Offset Amount")
self.arg_parser.add_argument("--copy_org", type=inkex.Boolean, default=True, help="copy original path")
self.arg_parser.add_argument("--offset_increase", type=float, default=2.0, help="Offset increase between iterations")
self.arg_parser.add_argument("--offset_increase", type=float, default=0.000, help="Offset increase between iterations")
self.arg_parser.add_argument("--jointype", default="2", help="Join type")
self.arg_parser.add_argument("--miterlimit", type=float, default=3.0, help="Miter limit")
self.arg_parser.add_argument("--clipperscale", type=float, default=1024.0, help="Scaling factor")
@ -53,7 +53,7 @@ class ofsplot(inkex.Effect):
# calculate offset paths for different offset amounts
offset_list = []
offset_list.append(self.options.init_offset)
for i in range(0,self.options.count+1):
for i in range(0, self.options.offset_count):
ofs_inc = +math.pow(float(i)*self.options.offset_increase,2)
if self.options.offset_increase <0:
ofs_inc = -ofs_inc