applying LPE from an extension ? Is it possible ?

Asked by v1nce

Is it possible to trigger LPE from extension ?
Say I would add a path ( array of "mouse coordinates" ) is it possible to flag it so that when imported back in inkscape it applies a spiro on it ?

Eg going from

  <defs
     id="defs4">
    <inkscape:path-effect
       effect="spiro"
       id="path-effect2999"
       is_visible="true" />
  </defs>
...
    <path
       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
        inkscape:requesting-path-effect="#path-effect3007"
      d="m 545.71429,392.36218 c 2.2153,-19.30757 12.43427,-44.20572 0,-62.85714 C 531.96354,308.87892 502.46883,297.97939 480,292.36218 c -14.57174,-3.64293 -32.23188,-16.87508 -48.57143,-11.42857 -56.94489,18.98163 -114.12339,42.69482 -160,88.57143 -12.7422,12.7422 -17.77896,29.84364 -25.71428,45.71429 -12.67503,25.35005 -20,42.527 -20,71.42857"
       inkscape:connector-curvature="0" />

to

    <path
       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
       d="m 545.71429,392.36218 c 6.26864,-9.19497 9.69394,-20.30008 9.69394,-31.42857 0,-11.12849 -3.4253,-22.2336 -9.69394,-31.42857 -7.23509,-10.61258 -17.9733,-18.45124 -29.49952,-24.11866 -11.52622,-5.66743 -23.91392,-9.32792 -36.21477,-13.0242 -15.95457,-4.79418 -32.00016,-9.71822 -48.57143,-11.42857 -31.82987,-3.28521 -64.27172,5.68265 -91.71303,22.14193 -27.44131,16.45927 -50.11176,40.09331 -68.28697,66.4295 -9.9451,14.41062 -18.63765,29.69891 -25.71428,45.71429 -10.02729,22.69315 -16.78504,46.82797 -20,71.42857"
       id="path3005"
       inkscape:path-effect="#path-effect3007"
       inkscape:original-d="m 545.71429,392.36218 c 2.2153,-19.30757 12.43427,-44.20572 0,-62.85714 C 531.96354,308.87892 502.46883,297.97939 480,292.36218 c -14.57174,-3.64293 -32.23188,-16.87508 -48.57143,-11.42857 -56.94489,18.98163 -114.12339,42.69482 -160,88.57143 -12.7422,12.7422 -17.77896,29.84364 -25.71428,45.71429 -12.67503,25.35005 -20,42.527 -20,71.42857"
       inkscape:connector-curvature="0" />

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
mahfiaz (mahfiaz) said :
#1

I think you should ask this questions somewhere where more technical people would read it, e.g write a bug report or join the mailing list.

Revision history for this message
su_v (suv-lp) said :
#2

Please do _not_ file bug reports in order to ask for technical support. The bug tracker is for tracking reported bugs and feature requests, and not for support questions (neither about usage nor development).

Use the mailing lists if you have questions about developing extensions or internal new features.

Revision history for this message
su_v (suv-lp) said :
#3

> Say I would add a path ( array of "mouse coordinates" ) is it possible to
> flag it so that when imported back in inkscape it applies a spiro on it ?

AFAIK there is no such feature like a special attribute 'inkscape:requesting-path-effect' implemented in the current extension system for script-based extensions.

<untested>
Have you tried to trigger an update by adding a translation (e.g. rotate by 360°) to the path after having appended the path effect to the <defs> section and the 'inkscape:path-effect' attribute to the path itself in the script? IIRC I have seen this workaround mentioned in the inkscape forum [1], as workaround to apply newly added filter effects to objects…
</untested>

[1] http://www.inkscapeforum.com/viewtopic.php?f=34&t=12515&p=47066

Can you help with this problem?

Provide an answer of your own, or ask v1nce for more information if necessary.

To post a message you must log in.