some more adjustments

This commit is contained in:
Mario Voigt 2021-04-04 01:52:28 +02:00
parent 1a921db33c
commit f869b7ffbd
2 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ def draw_SVG_circle(parent, r, cx, cy, name):
circle = etree.SubElement(parent, inkex.addNS('circle','svg'), circ_attribs )
class Gasket(inkex.Effect): # choose a better name
class Gasket(inkex.EffectExtension): # choose a better name
def __init__(self):
" define how the options are mapped from the inx file "
@ -55,7 +55,7 @@ class Gasket(inkex.Effect): # choose a better name
'stroke-width': path_stroke_width }
# This finds center of current view in inkscape
t = 'translate(%s,%s)' % (self.svg.namedview.center[0], self.svg.namedview.center[1] )
t = 'translate(%s,%s)' % (self.svg.namedview.center[0], self.svg.namedview.center[1])
# add a group to the document's current layer
#all the circles inherit style from this group
@ -65,7 +65,7 @@ class Gasket(inkex.Effect): # choose a better name
'transform': t,
'style' : str(inkex.Style((style_curve))),
'info':'N: '}
topgroup = etree.SubElement(self.svg.get_current_layer(), 'g', g_attribs )
topgroup = etree.SubElement(self.svg.get_current_layer(), 'g', g_attribs)
circles = apolloniangasket_func.main(c1=self.options.c1,
c2=self.options.c2,
@ -89,8 +89,8 @@ class Gasket(inkex.Effect): # choose a better name
cx, cy, r = c.m.real, c.m.imag, abs(c.r)
#rescale and add circle to document
cx, cy, r = scale_factor*cx , scale_factor*cy, scale_factor*r
draw_SVG_circle(topgroup,r,cx,cy,'apo')
cx, cy, r = scale_factor * cx , scale_factor * cy, scale_factor * r
draw_SVG_circle(topgroup, r, cx, cy, 'apo')
if __name__ == '__main__':
Gasket().run()

View File

@ -9,7 +9,7 @@
<spacer/>
<label appearance="header">General Settings</label>
<param name="flattenbezier" type="bool" gui-text="Flatten bezier curves to polylines" gui-description="Converts bezier curves to polylines.">true</param>
<param name="flatness" type="float" min="0.001" max="99999.000" precision="3" gui-text="flatness" gui-description="Minimum flatness = 0.001. The smaller the value the more fine segments you will get.">0.100</param>
<param name="flatness" type="float" min="0.001" max="99999.000" precision="3" gui-text="flatness" gui-description="Minimum flatness = 0.001. The smaller the value the more fine segments you will get.">0.100</param>
<param name="apply_transformations" type="bool" gui-text="Use 'Apply Transformations' extension" gui-description="Run 'Apply Transformations' extension before running vpype. Helps avoiding geometry shifting">false</param>
<param name="output_show" type="bool" gui-text="Show debug output" gui-description="This will open a new matplotlib window showing modified SVG data">false</param>
<param name="output_stats" type="bool" gui-text="Show conversion statistics" gui-description="Show output statistics before/after conversion">false</param>