Here is a new extension designed to make the construction of practical boxes from material cut on a laser cutter trivially easy,only a few values need to be entered: length, width, height, material thickness and kerf (the width of a cut) to produce an SVGdrawing of the parts needed to construct a box.

This is an early release version so any bug fixes/comments would be welcome (email: bugs(at)twot.eu)

Cheers.

Elliot White.

P.S The extension is in the Laser Tools group (any suggestions for a more appropriate group would be welcome).

[1] I do have a lot of externally provided extensions installed for testing purposes, and for several I already edited the INX files to move to them into a custom submenu (LeWitt), i.e. I could have missed some of them in the list above

On Windows, Inkscape includes a private copy of python (with Inkscape 0.48.2 this is Python 2.6.5) - on linux (like on osx), inkscape normally executes the default system python version (based on $PATH).

elliot.white wrote:This is my first attempt at an extension and also the first python program I have written over 20 lines so forgive my naivety.

Nothing to forgive here - many thanks for writing the extension and sharing it!

In hindsight - Python 2.5.1 is quite old (considering that Python 3.x has been out for quote some time), and most systems probably by now have Python 2.7 (or at least 2.6) installed. I just wanted to give you feedback about my tests (there might have been a chance that you'd just know what the syntax error with 2.5.1 is about, and how to avoid it).

The extensions shipping with Inkscape have been updated and tested to work with Python 2.6, so one can assume that Python 2.6 would be the agreed min. Python version supported (though this is not stated as requirement anywhere). Up to you

elliot.white wrote:I created the Laser Tools group thinking that I would over time produce more extensions, but if you have a suggested group I would gladly put it there.

About the menu name, not sure how to tackle this one - maybe a discussion in a separate topic here in the forum, or on the mailing list (inkscape-devel) to brain-storm about proposals, with the goal to add some hints/information to the pages in the Inkscape wiki about extensions?

If you think the extension is beyond BETA (nearing release candidate status ) - please consider adding it to the list in the wiki (the Inkscape project doesn't yet have a real extensions repository like e.g. the GIMP has - the best we can do for now is keeping the list updated and add new ones there): Extension repository - Inkscape Wiki

In this comment (another topic about a new extension) I tried to describe the current options (externally hosted vs. bundled) and how to submit it to get your extension bundled with Inkscape (if you aim for that).

elliot.white wrote:This is the first BETA version so any bug fixes/comments would be welcome

BTW - two tiny notes on the INX file (boxmaker.inx):

File type declaration: Before 0.47 was released, all extensions shipping with Inkscape got updated to be «now propper XML files with a namespace and all validate against the new inkscape.extension.rng RelaxNG schema.» Maybe you consider changing the first line of your INX file from

Permissions: with several extensions which have been developed on Windows, I noticed that the INX file (as well as the README file) does have the executable flag set when unpacking the archive (on a unix- or linux-based platform):

this is not needed for the INX file - if at all, only the *.py files need to be executable. The INX files are plain-text XML files, read&write permissions are sufficent for those. Not sure though if and how these file permissions can be set on Windows

Hey york I ran into the same problem on my Linux box tonight. running ubuntu 11.10 inkscape 0.48 and a lot of versions on Python (don't know how to tell what one it is using just how to tell what ones I have installed). I was getting the laser tool in the list but no entries in the sub menu.

I changed to things and now have it working. First I set the executable flag on boxmaker.py

Next I went into boxmaker.inx and changed line 6 so that the dependency check matched the case of the file itself