Update a extension to work on 0.91 Living Hinges

Discussion about writing code for Inkscape.
kelu28
Posts: 2
Joined: Thu Jan 21, 2016 10:33 pm

Update a extension to work on 0.91 Living Hinges

Postby kelu28 » Thu Jan 21, 2016 10:37 pm

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)
---------------------------

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Update a extension to work on 0.91 Living Hinges

Postby brynn » Thu Jan 21, 2016 11:03 pm

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

kelu28
Posts: 2
Joined: Thu Jan 21, 2016 10:33 pm

Re: Update a extension to work on 0.91 Living Hinges

Postby kelu28 » Thu Jan 21, 2016 11:21 pm

Thank you for the other link.
The first extension have more option.

Another people to help me?

Luc

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Update a extension to work on 0.91 Living Hinges

Postby brynn » Fri Jan 22, 2016 1:30 am

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??

Moini
Posts: 3316
Joined: Mon Oct 05, 2015 10:44 am

Re: Update a extension to work on 0.91 Living Hinges

Postby Moini » Fri Jan 22, 2016 5:26 am

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 ;)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Update a extension to work on 0.91 Living Hinges

Postby ragstian » Fri Jan 22, 2016 11:30 pm

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
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Moini
Posts: 3316
Joined: Mon Oct 05, 2015 10:44 am

Re: Update a extension to work on 0.91 Living Hinges

Postby Moini » Sat Jan 23, 2016 1:39 am

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.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Update a extension to work on 0.91 Living Hinges

Postby ragstian » Sat Jan 23, 2016 2:07 am

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.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Update a extension to work on 0.91 Living Hinges

Postby brynn » Sat Jan 23, 2016 4:29 am

Hey stranger :D

Moini
Posts: 3316
Joined: Mon Oct 05, 2015 10:44 am

Re: Update a extension to work on 0.91 Living Hinges

Postby Moini » Tue Feb 23, 2016 10:32 am

@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.
Attachments
LivingHinge0.91.zip
(8.04 KiB) Downloaded 367 times
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 3316
Joined: Mon Oct 05, 2015 10:44 am

Re: Update a extension to work on 0.91 Living Hinges

Postby Moini » Sat Feb 27, 2016 3:37 am

@BariEsser: Why should anyone do this? (I'm wondering if this is spam).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Update a extension to work on 0.91 Living Hinges

Postby brynn » Sat Feb 27, 2016 8:22 pm

yes, probably spam

Amunizp
Posts: 1
Joined: Wed Apr 10, 2019 11:36 am

Re: Update a extension to work on 0.91 Living Hinges

Postby Amunizp » Wed Apr 10, 2019 11:40 am

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.

User avatar
druban
Posts: 1871
Joined: Fri Nov 20, 2009 10:48 pm

Re: Update a extension to work on 0.91 Living Hinges

Postby druban » Wed Apr 10, 2019 2:46 pm

Deleted one spam, let's hope this is not another one
Your mind is what you think it is.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests