Monthly Archives: April 2011

Processing SVG output from SketchUp

In the posts on creating Sliceforms using Google SketchUp (see below), I use an SVG export to get the slices reading for printing.
Since I work on card and cut out by hand, I will describe how to work with Inkscape to process the SVG file for this purpose. Other means of producing the output (like laser cutting) will work in a similar way. It’s mostly a matter of scaling.

Step 1 – create the SVG file
The slices from a simple model look like this using the top view in SketchUp with the 3D model hidden.

Select them all and use the SVG export plugin to create the file.

NOTE: If you use the FlightofIdeas SVG export plugin, then it is recommended that you use  version 0.92 or earlier. Version 0.99 causes problems in that the drawing is invisible and the tools to change their properties do not seem to work. You can get it from here.   You don’t need to tick any of the boxes to export and follow the steps below.

Step 2 – load into Inkscape

Use Import file on the File menu to load the SVG. You will see the slices in a long strip of the slices in a group.

The strip is a double set of slices plus some other junk, for reasons I will explain in a minute.

(Note you can use Open File, but this causes more work later on. I will only describe using Import.)

Using Import preserves your default paper size and groups all the slices. When you use this method, you may not be able to see the slices, because they are large. Use CTRL-A to select them all and you will see a message at the base of the screen showing that the group is loaded.

By various use of the zoom tool you can see them all or just one.
For example, I suggest you make sure the group is selected, then use the Zoom to drawing button.

If you zoom to one of the slices you will see something like this.

The small box on the right of the slice is the default paper, so you can see you need to reduce the whole set of slices.

Step 3 – scale the group

With the group selected (check at the bottom of the screen), go to Transform on the Object menu and choose the Scale tab in the dialogue box.
I usually scale to 1% as a first test. You can always scale again if necessary.

Make sure the Scale proportionately box is ticked and Apply the transformation.

This will normally give you a strip you can see at a reasonably useful size. It should be workable and can be adjusted by rescaling later.

WARNING: always rescale everything as a group, otherwise you will never get the slices to match.

Now scaling will also make the line thickness small too, so with the group selected, choose Fill and Stroke on the Object menu.

Set the units to pts and enter 1 and press Return. The strip will appear much clearer.

Step 4 – delete unwanted parts

When the SliceModeler plugin creates the slices, it makes them according to the thickness you defined.
This means that the slice is a solid and has two faces with rectangles along and at the end of the slots. The end of a slot looks like this when you zoom in SketchUp.

So each slice appears double in the SVG file, once for the top and once for the bottom.

This is one pair of slices and the lines you can see at the bottom left are the rectangles for the slots plus some text.

In order to get rid of this, first ungroup the whole set of slices using Ungroup on the Object menu (or Shift Ctrl-G).

Work down the strip deleting the junk and one of each pair of slices.

Step 5 – Arrange on paper

Now you have the slices, arrange them on the paper. The complete slices may be too large. If that is the case, use CRTL-A to select all, group them (CTRL-G) and then scale the group to fit.

I often work on two sheets of A4 for each set of slices. Inkscape has only one page. So I would work on a sheet of A3 and print this as two pages.