New Inkscape Extension: Tabbed Box Maker

Other sites and resources for Inkscape users.
elliot.white
Posts: 7
Joined: Sun Oct 09, 2011 9:17 am

New Inkscape Extension: Tabbed Box Maker

Postby elliot.white » Sun Oct 09, 2011 10:02 pm

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 SVG
drawing 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).

boxmaker0.85.zip
Boxmaker files
(12.61 KiB) Downloaded 4331 times

Note: Linux users - you need to make boxmaker.py executable
Last edited by elliot.white on Tue Feb 28, 2012 3:35 am, edited 3 times in total.

User avatar
prokoudine
Posts: 186
Joined: Sat Jun 09, 2007 4:32 am
Contact:

Re: New Inkscape Extension: Tabbed Box Maker

Postby prokoudine » Wed Oct 12, 2011 6:44 pm

elliot.white wrote:P.S The extension is in the Laser Tools group.

Sadly, no. It just creates a "Laser Tools" menu item inside Extensions menu. That's all.
http://libregraphicsworld.org — news and tutorials on free design software

elliot.white
Posts: 7
Joined: Sun Oct 09, 2011 9:17 am

Re: New Inkscape Extension: Tabbed Box Maker

Postby elliot.white » Wed Oct 12, 2011 8:33 pm

So you got no "Tabbed Box Maker" item inside laser tools, hmm, I've not met this problem before,
could you please tell me what your set up is ie OS, Inkscape version.

Thanks in advance,

Elliot White

P.S you can see an example of what you should get at my site: twot.eu

A few examples:

4-axis controller.JPG
4-axis controller.JPG (21.3 KiB) Viewed 35045 times


Open Topped.jpg
Open Topped.jpg (15.55 KiB) Viewed 35045 times


Arduino box.jpg
Arduino box.jpg (21.46 KiB) Viewed 35045 times
Last edited by elliot.white on Tue Dec 13, 2011 8:24 pm, edited 1 time in total.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: New Inkscape Extension: Tabbed Box Maker

Postby ~suv » Wed Oct 12, 2011 10:48 pm

Menu entry is present as expected (Inkscape 0.48.2 and 0.48+devel r10672 on Mac OS X 10.5.8 (i386)).
However - about the menu structure - can't you cutters agree on a common submenu for such tools? ;)

At the moment [1] these seem to be the most prominent submenus for what are (IMHO) related extensions/tools:
[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 ;)
Attachments
BoxMaker-extensions-menu-0482-osx.png
BoxMaker dialog + Extensions menu (current development build) with lots of external extensions installed…
BoxMaker-extensions-menu-0482-osx.png (75.37 KiB) Viewed 35447 times

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: New Inkscape Extension: Tabbed Box Maker

Postby ~suv » Wed Oct 12, 2011 11:04 pm

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

Tested on (legacy) Mac OS X 10.5.8 (Leopard, i386) with the official package (bundled as osxapp) as well as local builds of Inkscape stable (0.48.x) and trunk (0.48+devel):

In case you want to support older systems: Your extension works fine with Python 2.6.7 and 2.7.2 (installed with MacPorts), but fails with Python 2.5.1 (default python version on Leopard):

Code: Select all

  File "boxmaker.py", line 152
    pieces=[[(2,0,0,1),(3,0,1,1),X,Z,0b1010],[(1,0,0,0),(2,0,0,1),Z,Y,0b1111],
                                          ^
SyntaxError: invalid syntax

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
Posts: 7
Joined: Sun Oct 09, 2011 9:17 am

Re: New Inkscape Extension: Tabbed Box Maker

Postby elliot.white » Thu Oct 13, 2011 5:13 am

Thanks for the info ~suv,

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

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.

I will set up a test box to see if I can make changes to improve backward compatability.

Cheers,

Elliot White

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: New Inkscape Extension: Tabbed Box Maker

Postby ~suv » Thu Oct 13, 2011 6:25 pm

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

    Code: Select all

    <inkscape-extension>
    to

    Code: Select all

    <?xml version="1.0" encoding="UTF-8"?>
    <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
  • 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):

    Code: Select all

    LeWitt:BoxMaker suv$ ls -lFG *
    -rwxr-xr-x  1 suv  staff  2491 Oct  9 13:00 README.txt*
    -rwxr-xr-x  1 suv  staff  2351 Oct  7 10:33 boxmaker.inx*
    -rwxr-xr-x  1 suv  staff  7638 Oct  9 00:06 boxmaker.py*
    LeWitt:BoxMaker suv$
    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 ;)

york
Posts: 2
Joined: Tue Feb 07, 2012 6:25 am

Re: New Inkscape Extension: Tabbed Box Maker

Postby york » Tue Feb 07, 2012 6:47 am

elliot.white wrote:So you got no "Tabbed Box Maker" item inside laser tools, hmm, I've not met this problem before,
could you please tell me what your set up is ie OS, Inkscape version.

I have the same problem: Only "Laser Tools" and a very small box but without "Tabbed Box Maker". I use Ubuntu 10.04 LTS, Inkscape 0.48, Python 2.6.5.

lvl_joe
Posts: 1
Joined: Mon Feb 27, 2012 9:49 pm

Re: New Inkscape Extension: Tabbed Box Maker

Postby lvl_joe » Mon Feb 27, 2012 10:28 pm

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

From:

Code: Select all

  <dependency type="executable" location="extensions">BoxMaker.py</dependency>


To:

Code: Select all

  <dependency type="executable" location="extensions">boxmaker.py</dependency>


I hope this helps you and others. I will send it to the dev and hopefully this can be updated in the extension.

york
Posts: 2
Joined: Tue Feb 07, 2012 6:25 am

Re: New Inkscape Extension: Tabbed Box Maker

Postby york » Wed Feb 29, 2012 3:53 am

Hello IvI_joe,
now it works. Thank You very much for your two hints! I saw that boxmaker.py in the download-file boxmaker.inx file is uddated now into lower case.
york

emlaurent
Posts: 1
Joined: Sun Mar 25, 2012 3:12 am

Re: New Inkscape Extension: Tabbed Box Maker

Postby emlaurent » Mon Mar 26, 2012 6:49 am

Hello,

great work Elliot !!
I will use it pour my wood boxes !

Is there any new version of this extension ?
Where can we find it on the net ?

thanks
emmanuel


Return to “Inkscape Resources”