Page 1 of 1

Update a extension to work on 0.91 Living Hinges

Posted: Thu Jan 21, 2016 10:37 pm
by kelu28
Hello
I try to update a extension from here:
http://www.reidb.net/LaserLivingHinges.html
but I don't arrive...
Someone could help me?

--------
Traceback (most recent call last):

File "LivingHinge.py", line 548, in <module>

effect.affect()

File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 268, in affect

self.effect()

File "LivingHinge.py", line 530, in effect

LivingHinge2((x+(Z/2), y), ((x+(Z/2)+(EllipseCircumference(X/2, Z/2)/4)), y + (dy)), hingeThick)

File "LivingHinge.py", line 199, in LivingHinge2

space = inkex.Effect.unittouu( str(space) + unit )

TypeError: unbound method unittouu() must be called with Effect instance as first argument (got str instance instead)
---------------------------

Re: Update a extension to work on 0.91 Living Hinges

Posted: Thu Jan 21, 2016 11:03 pm
by brynn
I can't help with that, but someone else might be able to.

Meanwhile, there's another living hinge extension: http://wiki.lvl1.org/Inkscape_Extension ... ving_Hinge and https://github.com/drphonon/Inkscape_LivingHinge

Re: Update a extension to work on 0.91 Living Hinges

Posted: Thu Jan 21, 2016 11:21 pm
by kelu28
Thank you for the other link.
The first extension have more option.

Another people to help me?

Luc

Re: Update a extension to work on 0.91 Living Hinges

Posted: Fri Jan 22, 2016 1:30 am
by brynn
One of our members (Moini) sometimes will fix extensions, if she can discover the problem, if she knows how to fix it, and if she has time. I can't make any promise about fixing this extension, but I'm pretty sure she will at least look at it.

Another possibility would be to try and contact the original author of that extension, and ask for a fix. I don't see any obvious want to contact. But an internet search should turn up something....or maybe there is contact info in the file, like maybe a readme or license file??

Re: Update a extension to work on 0.91 Living Hinges

Posted: Fri Jan 22, 2016 5:26 am
by Moini
I took a look, but didn't have time yet, and because of this directed kelu to the original author in the answers section, too ;)

Re: Update a extension to work on 0.91 Living Hinges

Posted: Fri Jan 22, 2016 11:30 pm
by ragstian
Hi.

If you are using Inkscape version 0.91 (or later) you have to edit the py files and change inkex.unittouu to self.unittouu for the extensions to work.


RGDS
Ragnar

Re: Update a extension to work on 0.91 Living Hinges

Posted: Sat Jan 23, 2016 1:39 am
by Moini
I thought that wouldn't work, as some things happen outside the 'effect' class. AFAIU, this would need some real refactoring - might be wrong though, didn't look long.

Re: Update a extension to work on 0.91 Living Hinges

Posted: Sat Jan 23, 2016 2:07 am
by ragstian
Hi
Moini wrote:I thought that wouldn't work, as some things happen outside the 'effect' class. AFAIU, this would need some real refactoring - might be wrong though, didn't look long.


Will give the extension a try and report back.

Re: Update a extension to work on 0.91 Living Hinges

Posted: Sat Jan 23, 2016 4:29 am
by brynn
Hey stranger :D

Re: Update a extension to work on 0.91 Living Hinges

Posted: Tue Feb 23, 2016 10:32 am
by Moini
@kelu28: Can you try if this works for you?

I've updated it to work with Inkscape 0.91, and fixed a logic problem - but I have no idea if the output is correct, as I don't even really know what a living hinge is.

All I can say is that it doesn't crash anymore.

Re: Update a extension to work on 0.91 Living Hinges

Posted: Sat Feb 27, 2016 3:37 am
by Moini
@BariEsser: Why should anyone do this? (I'm wondering if this is spam).

Re: Update a extension to work on 0.91 Living Hinges

Posted: Sat Feb 27, 2016 8:22 pm
by brynn
yes, probably spam

Re: Update a extension to work on 0.91 Living Hinges

Posted: Wed Apr 10, 2019 11:40 am
by Amunizp
Moini wrote:@kelu28: Can you try if this works for you?

I've updated it to work with Inkscape 0.91, and fixed a logic problem - but I have no idea if the output is correct, as I don't even really know what a living hinge is.

All I can say is that it doesn't crash anymore.


I can confirm that it worked for us.

Thank you very much for the update.

Re: Update a extension to work on 0.91 Living Hinges

Posted: Wed Apr 10, 2019 2:46 pm
by druban
Deleted one spam, let's hope this is not another one