Inkscape, the most used and loved tool of Fedora’s Design Team is not just a program for doing nice vector graphics. With vector graphics (in our case SVG) a lot more can be done. Many programs can import this format. Also, Inkscape can do a lot more than just graphics. The last article of this series showed how to use Stroke or Hershey Fonts for engraving and other such methods with Inkscape. This article will look at several Inkscape extensions for making Papercraft or that otherwise help to flatten out three-dimensional (3D) objects.
Rapid Prototyping is an oft-mentioned word (even more so since the advent of 3D-Printing). Sure, you can easily 3D-print computer designed objects. But the downsides are the cost and the amount of extra work you have to put into the 3D printed objects to get a clean surface.
Especially when prototyping large objects, 3D-Printing is less attractive. The cost for the object, the time to print it and the amount of reworking that needs to be done for the surface increase with the size of the object. Other methods are more efficient under these circumstances. Among other things, building paper models is a classic method for prototyping. Architectural models are often built this way. When I was a kid, paper models were also quiet popular as toys. Also, the cosplay scene often uses this method to build thee-dimensional costumes out of foam sheets. Not to mention that you can design nice product packaging this way. You can also use Joinery to laser cut the objects and build more complex 3D objects. So there are many good reasons to learn more about Papercraft.
Linux and Papercraft
The amount of software for this area is really limited and the most used seems to be Pepakura, which gets its name from the Japanese technique. Another program is Ultimate Papercraft 3D, which is also only available for Windows.
Are Linux/Fedora users excluded because this software is so often only made for Windows? Of course not. There are some extensions for Inkscape to do this. There are extensions to do this with Blender as well. A corresponding ad-on is even included with the standard version of Blender – Paper Model. So you just have to enable it.
But we will concentrate on the Inkscape extensions. If you would like to see an article about how to do it with Blender, let me know in the comments section below.
Why use Inkscape for Papercraft?
There are a few reasons why I prefer to use Inkscape for Papercraft. First, the Blender ad-on also outputs a SVG that can be further edited/processed with Inkscape. But the process is the main reason:
- Generate flaps/joints/hems and tabs
- N-up layout (Extenstions > Render > Layout > N-up)
- Generate G-Code for laser or plasma cutting (Extensions > GCode Tools) see the first article of this series.
- Set printing marks (Extensions > Render > Layout > Printing Marks...)
Installation of Paperfold
The main extension you will need to do Papercraft is Paperfold. Another extension exists called Papercraft Unfold, which does nearly the same thing. It is written by the same author. However, according to him, Paperfold is the better option.
This extension takes a 3D object as an OBJ file and flattens it out. It then sets the folding markings and angles. To get it working, you have to install OpenMesh and the corresponding Python bindings.
$ sudo dnf install openmesh cmake g++ python3-devel $ pip3 install pybind11 $ pip3 install openmesh
After you have installed this software, you can download the extension and unpack it under ~/.config/inkscape/extensions/. With the next start of Inkscape the extension will be available under Extensions > FabLab Chemnitz > Papercraft Flatteners > Paperfold.
Usage of Paperfold
About the 3D Objects
Other needed/recommended extensions
Tabgen – Generating Flaps
You may have noticed that all Paperfold does is to flatten out the 3D object. So after using it, you end up with an object that has separate 2D areas corresponding to each of the original 3D object’s surfaces. When making papercraft, you will also need flaps to glue it together.
Of course, you can put these to the object by hand using Inkscape’s drawing tools. But that might be time consuming. There is another extension for Inkscape which is helpful for performing this task – Tabgen.
Convert to Polyline
The Tabgen extension only works with straight lines. Curves do not work. Consequently, you must convert all the curves to polylines. For this, you can use another extension – Convert to Polyline.
The path must also be clean. It cannot have any stray nodes or else another folding tab will be generated there.
As mentioned before with the flattened objects, you can do more than just papercraft. For wood or other thicker materials you need joints. And there are of course extensions and other applications for making them.
Boxes – Generating Finger Joints/Dovetails
Boxes.py is an online box generator that is available as an Inkscape extension as well. Even better, the author delivers the INX files which provide the GUI so you can use it from within Inkscape. You just have to install it with pip.
$ pip install boxes
You can also install and use Boxes directly from the Git clone. I have personally used this method when I had problems with the pip installation. It installed all the packages except boxes.generators which is needed to build the INX files. The INX files were not provided with the installation at that time. To use it this way, just download the repository or clone it.
Make sure you have the needed packages installed – setuptools, affine and markdown. Also, if you want other export options such as SVG and PS, then you will need pstoedit.
$ sudo dnf install python3-setuptools python3-affine python3-markdown2 pstoedit
Change to the directory of the Boxes git clone and run:
$ python setup.py build $ python setup.py install
After the next start of Inkscape, you will find the tools under Extensions > Boxes.py. Boxes brings a lot of pre-defined objects as well as commonly-needed designs like fan holes. The parameters for all the pre-defined objects can, of course, be adapted to suit your needs.
Lasercut Tabbed Box
Lasercut Tabbed Boxes is an Inkscape extension with functionality similar to Boxes. But it has far fewer shape options.
Joinery – the complement for all
Since Tabgen only helps with the generation of flaps for papercraft and Boxes only makes finger-joints on pre-defined objects, you might find the aforementioned Joinery very useful. Joinery is not a Inkscape extension. It’s a web application that runs in your browser (of course, there are alternatives). You can find a very good description of its possibilities and a tutorial about how to work with it in this article at Instructables (it is very impressive how many different kinds of connections are available).
Those who don’t like to use browser-based tools like Joinery, might find QuickJoint useful. It can add box tabs/finger joints to selected paths or matching slots using guidelines.
Conical Box Generator
The extensions mentioned thus far have helped to create square, rectangular or angled boxes. But there is the possibility of cutting plywood sheets with relief cuts so they can be folded. Boxes.py uses this technique on some of its designs. But if you want to design your own conical or rounded shapes then you should have a look at the Conical Box Generator extension.
Those who just want to make simple foldable boxes for packaging design should have a look at the extension Foldable Box. This extension is installed by default – Extensions > Render > Foldable Box.
The Packaging Tools extension offers some more options for this type of design. After download and unpacking the files into ~/.config/inkscape/extensions, you will find new options under Extensions > Packaging. Packaging Tools provides a set of pre-defined packaging forms.
- 4 dots tray
- Auto bottom lock case
- Snap lock bottom case
- Standard reverse tuck case
- Standard shirt tray
- Straight tuck
You can customize the parameters on these forms to create your own package design.
There is a relatively new extension called Papercraft Extruder that I think is a nifty and useful tool. What it does is to generate for a given path object the pieces for an extrusion, including the flaps. This comes in very handy if you want to quickly create 3D letters and similar things. The downside it that it works only with straight lines. The extension produces each section of the extrusion with the given depth twice. The second copy is for use with Tabgen. Unfortunately, all the pieces are put on top of each other and they are not numbered or marked. So you have to sort it out by hand.
Also new is Polygen. It is written by the same author as Tabgen and Papercraft Extruder and it is used in much the same way. It uses a path and a center line to generate a polygon object. Of course, it also flattens the object out and it attaches flaps for assembly.
Papercraft is more than just a kids toy; especially when working with materials other than paper. You have to think outside the box to imagine the awesome materials that could be worked with. I’ve come up with several new ideas just working on this article. For example, how about using the flatteners for stained glass projects? I think one could create awesome lamps this way.
Fedora Linux and Inkscape along with the mentioned extensions and other tools give you the opportunity to unleash your creativity. So go ahead and MAKE things!
P.S. Don’t forget to show us your creations.